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

Автор hatim009, история, 7 лет назад, По-английски

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.

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

»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
7 лет назад, # |
  Проголосовать: нравится +40 Проголосовать: не нравится

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 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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