Hi! I am new into coding competitions and have started trying to solve past problems. I got no problem while solving 2019 Qualification Round problems A, B and C, but when it comes to the problem D, even when it works when I run it locally, google sends me a Runtime Error (RE), but I don't really know why this happens and I would really appreciate if someone could help me.
I think the problem comes with the interactive part of the problem. Also I want to notice that I know my solutions does not work for Test Set 2 since I have not come with an answer for that, but for Test Set 1 it should work fine, but as I said before I get an RE. Here is the code I use to trying solving it in Python 3: ------------------------------------------- def solve1(n): l = len(bin(n).lstrip('0b')) inp = [''] * l for i in range(n): a = bin(i).lstrip('0b').zfill(n) for j in range(l): inp[j] += a[n-j-1] return inp , l def solve2(m,l): a = [''] * len(m[0]) p = [] for i in range(len(m[0])): for j in range(l): a[i] += m[l-j-1][i] for k in a: p.append(int(k,2)) return p def get_values(n,a,b): sol = [] for i in range(n): if i not in a: sol.append(i) b -= 1 if b == 0: break return sol def solve(): m = [] n, b, f = map(int, input().split()) inp , l = solve1(n) for i in range(l): print(inp[i] , flush = True) m.append(str(input())) p = solve2(m,l) sol = get_values(n,p,b) print(*sol , flush = True) verdict = int(input()) t = int(input()) for _ in range(t): solve() ---------------------------------------------- If someone knows why locally works with F = 10, but when I submit it to Google I get the RE error I would be really happy. Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-code+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/6d776be6-9c70-483c-bf44-5a3e386e5df5n%40googlegroups.com.