Just For Curiosity! Please don't Down Vote. Also if possible has anyone done this before?
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Proof_by_QED | 146 |
| 3 | Um_nik | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
Just For Curiosity! Please don't Down Vote. Also if possible has anyone done this before?
| Название |
|---|



I don't think that is possible, depending on the written code, one of them will come before the other.
i guess this will work (anyways, cf will show only one verdict):
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
The verdict is also language-dependent. For example for the code you mentioned above, you would most likely get TLE with python since it is too slow but will hit MLE with c++ since it will fill the memory faster. That is quite funny.
Wont TLE occur before MLE here, I think we have enough memory in 256mb to store 1e18 1's but 2s is not enought to store that many 1's
you only have enough memory for ~66 million 1's, assuming each one is stored as a 32 bit integer taking 4 bytes. 2.5e8 if you use
char. which is within the TL range so MLE comes first. unless the many, many reallocations that vector does over the runtime end up tanking the performance. only way to find out is to try it6 7
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.