結果
問題 |
No.3041 非対称じゃんけん
|
ユーザー |
![]() |
提出日時 | 2025-02-28 22:15:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 654 bytes |
コンパイル時間 | 421 ms |
コンパイル使用メモリ | 82,364 KB |
実行使用メモリ | 662,728 KB |
最終ジャッジ日時 | 2025-02-28 22:15:19 |
合計ジャッジ時間 | 15,462 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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(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")