結果
| 問題 |
No.2372 既視感
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-08 00:09:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 520 bytes |
| コンパイル時間 | 216 ms |
| コンパイル使用メモリ | 82,444 KB |
| 実行使用メモリ | 78,128 KB |
| 最終ジャッジ日時 | 2024-07-21 20:32:51 |
| 合計ジャッジ時間 | 2,845 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 21 |
ソースコード
from collections import deque
n,k,q=map(int,input().split())
que=deque([0]*n)
for _ in range(q):
q1=int(input())
if q1==1:
s=input()
que.append(s)
que.popleft()
else:
Q=[list(input().split()) for _ in range(6)]
for i in range(6):
Q[i][1]=int(Q[i][1])
for i in range(6):
if Q[i][0] in que:
Q[i][1]=min(Q[i][1],k)
t,cnt=60,0
for p,d in Q:
if d<=t:
cnt+=1
t-=d
que.append(p)
que.popleft()
print(cnt)