結果
問題 | No.2372 既視感 |
ユーザー |
|
提出日時 | 2023-07-07 22:20:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 155 ms / 2,000 ms |
コード長 | 773 bytes |
コンパイル時間 | 178 ms |
コンパイル使用メモリ | 82,672 KB |
実行使用メモリ | 77,848 KB |
最終ジャッジ日時 | 2024-07-21 18:26:12 |
合計ジャッジ時間 | 2,943 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#int(input())#map(int, input().split())#list(map(int, input().split()))N, K, Q = map(int, input().split())ans = []A = []for i in range(Q):q = int(input())if q == 1:s = input()A.append(s)else:t = [0] * 6d = [0] * 6for j in range(6):t[j], d[j] = input().split()d[j] = int(d[j])M = len(A)for j in range(max(0, M-N), M):if A[j] in t:u = t.index(A[j])d[u] = min(K, d[u])s = 0for j in range(6):if sum(d[:j+1]) <= 60:s += 1else:breakans.append(s)for j in range(s):A.append(t[j])for x in ans:print(x)