結果
| 問題 |
No.3041 非対称じゃんけん
|
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2025-02-28 22:59:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 726 bytes |
| コンパイル時間 | 216 ms |
| コンパイル使用メモリ | 82,256 KB |
| 実行使用メモリ | 702,184 KB |
| 最終ジャッジ日時 | 2025-02-28 22:59:52 |
| 合計ジャッジ時間 | 14,545 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 24 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 = [False for _ in range(N*F+1)]
use[A[0]]=True
use[B[0]]=True
use[C[0]]=True
c=len({A[0],B[0],C[0]})
ans=[c]
for j in range(61):
for u in {A[0],B[0],C[0]}:
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 not use[x+d]:
use[x+d]=True
new.append(x+d)
c+=1
for n in new:
for j in range(61):
l[j].append(n)
ans.append(c)
print(*ans,sep="\n")
nikoro256