結果
問題 | No.2372 既視感 |
ユーザー |
![]() |
提出日時 | 2023-07-07 22:11:07 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 96 ms / 2,000 ms |
コード長 | 1,224 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 82,488 KB |
実行使用メモリ | 77,672 KB |
最終ジャッジ日時 | 2024-07-21 18:14:51 |
合計ジャッジ時間 | 2,872 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
N,K,Q = map(int,input().split())dict = {}cnt = 1def check(x):if x in dict:if dict[x] > cnt-N-1:return Trueelse:return Falseelse:return Falsedef addd(x):global cntfor xx in x:dict[xx] = cntcnt+=1for i in range(Q):que = int(input())if que == 1:nex = input()dict[nex] = cntcnt += 1else:tes = 0ans = 0flg = Trueasa = []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 += tians = j+1asa.append(nex2[0])else:flg = Falseelse:ti = int(nex2[1])if tes + ti <= 60:tes += tians = j+1asa.append(nex2[0])else:flg = Falseaddd(asa)print(ans) #ans#print(dict,cnt)