Why I am getting TLE test 1 in task D?

Revision ru2, by qscfthmko147, 2021-11-29 13:51:13

Today was Technocup Elimination round where task D was interactive. I wrote my solution and tested it locally, and it was perfectly working, but because of some reason I've got TLE in test 1 (i checked, it is sample test). I did some researches trying to investigate why I am getting TLE but I found nothing — i completely don't understand the reason of TLE and i hope someone who knows why can help me to understand where is my mistake. Sorry for my bad English.

This is my first submission — 132252489, and I think this is most correct solution among all my submissions (at least not worse than any other I did).

Thank you for reading and helping.

UPD: sorry for late updating, but the problem is fixed. I was getting TL 1 because statements allow ask only numbers from 1 to n, but i asked n+1, and for some reason it's TL, not WA.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru2 Russian qscfthmko147 2021-11-29 13:51:13 191
ru1 Russian qscfthmko147 2021-10-17 16:48:17 793 Первая редакция (опубликовано)