https://codeforces.me/problemset/problem/1380/C https://codeforces.me/contest/2091/problem/B both problems are same one is 800 other one is 1400
Exactly same code gets AC for both problems
https://codeforces.me/problemset/problem/1380/C https://codeforces.me/contest/2091/problem/B both problems are same one is 800 other one is 1400