結果
問題 |
No.3041 非対称じゃんけん
|
ユーザー |
![]() |
提出日時 | 2025-02-28 22:51:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 625 bytes |
コンパイル時間 | 515 ms |
コンパイル使用メモリ | 82,660 KB |
実行使用メモリ | 713,764 KB |
最終ジャッジ日時 | 2025-02-28 22:51:45 |
合計ジャッジ時間 | 15,226 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 WA * 22 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=[len(use)] for j in range(61): for u in use: l[j].append(u) 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(61): l[j].append(n) ans.append(len(use)) print(*ans,sep="\n")