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 | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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://codeforces.net/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.