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 | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
8 | Dominater069 | 154 |
8 | nor | 154 |
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.me/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.