RTE but AC when added inline of problem 1137C

Правка en1, от Libraion, 2021-07-19 17:35:42

Recently, a friend of mine do this problem 1137C.

His solution involves using dfs for Tarjan algorithm. As the number of vertices is pretty big, about $$$50 \times 10^5$$$, the submission without inline get RTE 123001685. Depend on the exit code, I doubt that it get stack overflow error. And after putting inline in front of the dfs function for tarjan, it gets AC 123002929.

Not only that, here are 2 submissions (my friend took from someone) that is completely the same but with RTE and AC status. RTE: 123002279, AC: 123002352. The only difference is he added 3 non-sense lines into the RTE code and it got AC.

I have some questions in mind:

  • Does Stack overflow error the main thing that caused RTE?

  • Inline is supposed to be automatically added by the compiler when possible, isn't it? (As I heard somebody says so)

  • Why putting those 3 non-sense lines work the same as adding inline?

Теги rte, stack overflow, 1137c

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Libraion 2021-07-19 17:35:42 1131 Initial revision (published)