結果
問題 | No.2372 既視感 |
ユーザー | PNJ |
提出日時 | 2023-07-07 21:58:08 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 564 bytes |
コンパイル時間 | 950 ms |
コンパイル使用メモリ | 10,852 KB |
実行使用メモリ | 8,692 KB |
最終ジャッジ日時 | 2023-09-28 23:09:18 |
合計ジャッジ時間 | 1,937 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 20 ms
8,628 KB |
testcase_01 | AC | 20 ms
8,640 KB |
testcase_02 | AC | 19 ms
8,488 KB |
testcase_03 | AC | 18 ms
8,524 KB |
testcase_04 | AC | 18 ms
8,536 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 19 ms
8,488 KB |
testcase_08 | WA | - |
testcase_09 | AC | 23 ms
8,548 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 25 ms
8,516 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 20 ms
8,568 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 30 ms
8,508 KB |
testcase_28 | AC | 30 ms
8,496 KB |
ソースコード
from collections import deque N,K,Q = map(int,input().split()) A = deque([]) for i in range(Q): q = int(input()) if q == 1: s = input() if s not in A: A.append(s) if len(A) > N: A.popleft() else: ans = 0 T = 0 f = 1 for i in range(6): t,dd = map(str,input().split()) d = int(dd) X = [] if t in A: d = min(d,K) if T + d > 60: f = 0 if f: T += d ans += 1 for x in X: A.append(x) if len(A) > N: A.popleft() print(ans)