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

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

Take a look at the end of these two programs:

https://atcoder.jp/contests/abc188/submissions/19361247

https://atcoder.jp/contests/abc188/submissions/19361394

One is correct and the other is not, even though in theory the one with std::min should be equivalent, since the first values of the arrays are all pairwise distinct.

EDIT: std::array variable holding fundamental types of local scope is not zero initialized (unlike other containers to my knowledge).

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

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

I've initialized array in the second submission and got AC. But I have no idea why your first solution works, it passed in 3 out of 3 tries.

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

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