Get the right answer when test on local, but get WA when submit

Правка en1, от Philosophi, 2026-03-16 09:15:43

Hi everyone, im currently solving this problem. I dont know why if i test on my computer, the answer is right but when i submit, i get WA. I suspect its because of some memory issues, but i cant find any.

https://mirror.codeforces.com/contest/1712/submission/366889551

Heres the test

4 1 2 2 3 1000000000

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Philosophi 2026-03-16 09:15:43 446 Initial revision (published)