my code of problem c is misjudged and given wrong answer but on different compilers it is giving right answer. My rating has been decreased. Submission link: **https://codeforces.me/contest/1111/submission/49432400** contest link: **https://codeforces.me/contest/1111**









There is at least one mistake in your code, on line 90
This should be
because the array has k elements, not n. And accessing elements outside the array is undefined behavior, so the codeforces compiler is probably ok.
welcome to undefined behaviour world
The results given by your program differ, depending on the compilation flags. Compiler on CF used different settings than you on your own computer. The problem occurs because you've got technical mistakes in your code. I don't know which one exactly caused that but for example you've got 'dfs' function that is int type but returns nothing.