Problem 1986C Submission: 304652327 For the test case: 7 10 traktor 7 6 5 4 3 2 1 6 4 2 codeforces
My system gives the correct output of ccdeefo but the judge reverses the entire thing and outputs ofeedcc
I have tried a lot of things but i genuinely do not understand why it reverses my output for that one test case. I really need any help i can get.
This is because you are using python3 in your local and have submitted in pypy3 here. In python3 the set stores the values in sorted order and In pypy3 the order is same as the list element you are converting in set. That's why, if you submit the same code in python3, it might work.
or you can sort the list first before converting into set [if you want to use pypy3]