Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

Traceback (most recent call last):
  File "challenge.py", line 50, in <module>
    main()
  File "challenge.py", line 45, in main
    check(c, s, t, p, a, w, 0)
  File "challenge.py", line 33, in check
    if check(c, s, t - 1, [pi + ai for pi, ai in zip(p, a)], a, w, r):
  File "challenge.py", line 37, in check
    check(c, s, t, p, a, w, r + 1)
  File "challenge.py", line 37, in check
    check(c, s, t, p, a, w, r + 1)
  File "challenge.py", line 37, in check
    check(c, s, t, p, a, w, r + 1)
  [Previous line repeated 11 more times]
  File "challenge.py", line 33, in check
    if check(c, s, t - 1, [pi + ai for pi, ai in zip(p, a)], a, w, r):
  File "challenge.py", line 37, in check
    check(c, s, t, p, a, w, r + 1)
  File "challenge.py", line 37, in check
    check(c, s, t, p, a, w, r + 1)
  File "challenge.py", line 37, in check
    check(c, s, t, p, a, w, r + 1)
  [Previous line repeated 12 more times]
  File "challenge.py", line 33, in check
    if check(c, s, t - 1, [pi + ai for pi, ai in zip(p, a)],

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 120, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

[32, 140, 117, 149, 58, 178, 196, 74, 135, 106, 82, 44, 180, 48, 56, 111, 145, 71, 144, 23, 54, 73, 135, 133, 7, 167, 197, 110, 115, 143]
[6214356, 359315, 8652667, 7031492, 635744, 8821326, 3342549, 1282517, 4232489, 2250623, 877176, 8526081, 5446348, 8899079, 762098, 4231546, 1739848, 9383769, 5537521, 370734, 4397609, 6547125, 6686045, 5474296, 7718558, 2946913, 4169598, 7283804, 3519582, 7401309]
[13403670, 9522767, 15907560, 14449718, 10021724, 16138753, 7594246, 2134972, 10125414, 2459590, 8480320, 18216760, 10198747, 10265155, 4681147, 5983142, 10246123, 16175356, 13409804, 8208384, 8505204, 14530110, 11789108, 12843528, 11438032, 11732412, 4949229, 8249745, 8111839, 15977131]

JOJ Answer

2316