Problem link : https://codeforces.net/contest/1338/problem/C .
When you saw the problem , what came to your mind ? what was thought process ? How much time did you took to solve it ? I am a beginner and whenever i see such kind of problem , i get stuck and can't think of different approaches