Блог пользователя anayush_py

Автор anayush_py, история, 15 месяцев назад, По-английски

I want to know why my code gets different verdicts in different languages. When I upload my code using GNU C++20 (64), GNU C++17, or GNU C++17 (64) then I am getting "Wrong ans of test 1". But when I use Clang++17 Diagnostics or Clang++20 Diagnostics, the verdict is "Accepted". I used GNU C++20 (64) before and it used to be accepted but nowadays it doesn't. Please help!. Below is the submission link.

Code Submission

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
15 месяцев назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

I haven't yet figured out the mistake but just a suggestion that please write neater codes. No need to use these kinds of templates at this level. Just simple codes... It will be helpful for you to figure out your mistakes that way.

»
15 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

You unsynchronized cin/cout with stdio then proceed to use scanf and cin. Maybe that is it, but I haven’t run locally.

see: https://stackoverflow.com/questions/31162367/significance-of-ios-basesync-with-stdiofalse-cin-tienull