結果
問題 |
No.3041 非対称じゃんけん
|
ユーザー |
![]() |
提出日時 | 2025-02-28 22:11:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 647 bytes |
コンパイル時間 | 487 ms |
コンパイル使用メモリ | 82,764 KB |
実行使用メモリ | 759,516 KB |
最終ジャッジ日時 | 2025-02-28 22:11:23 |
合計ジャッジ時間 | 16,265 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 26 TLE * 2 MLE * 1 |
ソースコード
from collections import deque N,F=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) C=list(map(int,input().split())) l = [deque() for _ in range(61)] use = {A[0],B[0],C[0]} ans=[3] for j in range(1,61): l[j].append(A[0]) l[j].append(B[0]) l[j].append(C[0]) for i in range(1,N): new=[] for d in [A[i],B[i],C[i]]: while len(l[d]) != 0: x = l[d].popleft() if x+d not in use: new.append(x+d) use.add(x+d) for n in new: for j in range(1,61): l[j].append(n) ans.append(len(use)) print(*ans,sep="\n")