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

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

The first code is giving correct answer while second code is giving wrong answer. The only difference between these two codes is:
In the first code the return value is -2*inf in the getmax function while it is -inf in the second code. Can anybody please help me figure out what is the problem?
Link to Problem

Code 1
Code 2
  • Проголосовать: нравится
  • -18
  • Проголосовать: не нравится

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

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

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

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

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

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

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

After wasting 5 minutes of looking at those codes, I submitted both codes and got AC twice... Come on, can't you double-check before posting your question in Codeforces?