結果
問題 |
No.2372 既視感
|
ユーザー |
![]() |
提出日時 | 2023-07-07 22:06:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,038 bytes |
コンパイル時間 | 328 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 77,056 KB |
最終ジャッジ日時 | 2024-07-21 18:09:22 |
合計ジャッジ時間 | 3,583 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 17 |
ソースコード
N,K,Q = map(int,input().split()) dict = {} cnt = 1 def check(x): global cnt if x in dict: if dict[x] > cnt-N-1: return True else: return False else: return False for i in range(Q): que = int(input()) if que == 1: nex = input() dict[nex] = cnt cnt += 1 else: tes = 0 ans = 0 flg = True for j in range(6): nex2 = list(map(str,input().split())) if not flg: continue # print("j",j,"tes",tes) if check(nex2[0]): ti = min(int(nex2[1]),K) if tes + ti <= 60: tes += ti ans = j+1 else: flg = False else: ti = int(nex2[1]) if tes + ti <= 60: tes += ti ans = j+1 else: flg = False print(ans) #ans #print(dict,cnt)