Logically same code are giving different answer. Help!!

Правка en1, от death_bringer, 2022-12-18 20:09:44

My submission 185845851 is getting accepted while another submission 185834138 with the same logic is failed on test case 2.

The only difference is

answer = i;
break;

in accepted vs

answer = min(answer,i);

in failed.

As the value of i is increasing second code line should also give the same output as the first one but it's not.
Please help me where I'm missing something.

Теги help, div2

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский death_bringer 2022-12-18 20:09:44 497 Initial revision (published)