Assert(false) giving WA?

Правка en2, от teochaban, 2018-10-26 03:05:16

On this problem I was trying to debug my code. Since it was an interactive problem I wanted to check if I was making less than the total amount of legal queries, and for that I checked if the number of queries was >= a number a little less than the limit and used an assert(false) in case I had too many queries. I kept getting WA. After further investigation I noticed that this WA was actually supposed to be a RE, so I changed the assert(false) for a while(1) and got a TLE. Codes: here and here (code not rly relevant, if you can't see it). Why did I not get a RE with the assert and got a wrong answer instead? The problem being interactive changes anything in this case?

Теги assert, runtime error, interactive

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский teochaban 2018-10-26 03:05:16 19 Tiny change: ' queries. After fu' -> ' queries. I kept getting WA. After fu'
en1 Английский teochaban 2018-10-26 03:01:47 840 Initial revision (published)