When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

hatim009's blog

By hatim009, history, 7 years ago, In English

149C - Разделение на команды

Hi,

My solution in C++ was giving WA while the same solution got AC in python.

python code

C++ code

In case you are down voting, please tell the reason as well.

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

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by hatim009 (previous revision, new revision, compare).

»
7 years ago, # |
  Vote: I like it +40 Vote: I do not like it

I'm pretty surprised that the same code in C++ and python didn't get compile error :)

On the more serious side, it seems that your array is too small in C++ solution.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks for pointing out the mistake. C++ code also got AC

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm pretty surprised that the same code in C++ and python didn't get compile error :)
    Lol, you reminded me this.