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 | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | cry | 161 |
2 | awoo | 160 |
2 | maomao90 | 160 |
4 | atcoder_official | 157 |
5 | -is-this-fft- | 155 |
5 | nor | 155 |
7 | adamant | 153 |
8 | maroonrk | 152 |
8 | Um_nik | 152 |
10 | djm03178 | 146 |
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.