N0V1CE's blog

By N0V1CE, history, 20 months ago, In English

Hello everyone, This is about today's (Feb 28th) Codeforces Educational Rounds contest.

I usually code in python and use the same template that I am using today to solve in the contests. But my code output in my compiler was different but in codeforces output it was way different, This happened to me in both the questions today: Question A and B. Also, when I submitted the same code without any template usage, my code got accepted. I am attaching the screenshots below for your reference. Please let me know if anything can be done in order to avoid negative delta.

Also, how did it happen only during this contest only and not in any other contests inspite of me using the same template in all other contests and submissions. Any help in regard to this would be appreciated.

Problem A: VS Code Output  Problem A: Wrong answer according to CF

Problem A: CF Accepted submission

Problem B: VS Code Output

Problem B: Wrong answer according to CF

But when I submitted the same code as in my other submission which was showing wrong answer according to CF compiler, it got accepted.

Here's the accepted code link: https://codeforces.net/contest/1796/submission/195355146

  • Vote: I like it
  • -21
  • Vote: I do not like it

| Write comment?
»
20 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Your code saves \r and \n when reading in strings as well. This is your own problem please don't bother mike.

Solution: For the read string, clear it if the end is \r\n, otherwise do nothing.