Блог пользователя tanmay.cse

Автор tanmay.cse, 3 месяца назад, По-английски

Just For Curiosity! Please don't Down Vote. Also if possible has anyone done this before?

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

I don't think that is possible, depending on the written code, one of them will come before the other.

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

i guess this will work (anyways, cf will show only one verdict):

code

Plus, I remember a moment when I got MLE for the first time because of infinite loop caused by corner case that i didn't notice (it was like 6-7 months ago). I don't remember the problem tho

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

Surely MLE has priority. Resources are hard-limited so a process gets immediately terminated if it demands more than permitted from the OS, but TLE is evaluated after the run and processes are allowed to run longer than the time limit since tracking time by the millisecond would slow it down. A hard limit on runtime is much looser so it only has to be checked rarely.