Hello! This code is working fine locally, so I don't know why it's giving me the Exit code is 1 Runtime Error. Can anyone take a look? Thank you. The submission
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 160 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 151 |
Hello! This code is working fine locally, so I don't know why it's giving me the Exit code is 1 Runtime Error. Can anyone take a look? Thank you. The submission
Name |
---|
“You are not allowed To view the contest”
Hey, please try this link Submission
It's sometimes because the default recursion limit in python is lesser than required. Try using these lines at the top, import sys sys.setrecursionlimit(10**6)
after using this either it would pass or show you tle(if the dfs is not efficient with the given constraints).
ok thank you so much.
less*
https://pyrival.readthedocs.io/en/latest/bootstrap.html
https://github.com/cheran-senthil/PyRival/blob/master/pyrival/misc/bootstrap.py
Try using bootstrap, refer to this blog here, since just changing the recursion limit will probably you give memory limit exceeded since the stack overflows, in case of bootstrap you will have to change the function a bit like rather than return you will have to use 'yield' and all but you will get used to it. https://mirror.codeforces.com/blog/entry/91490
Basically , just add bootstrap to your code and use the decorater above your function and it should work fine , this is the best way to do recursion in python on cf.