結果
問題 | No.2372 既視感 |
ユーザー | moharan627 |
提出日時 | 2023-07-07 21:55:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,382 bytes |
コンパイル時間 | 2,298 ms |
コンパイル使用メモリ | 86,420 KB |
実行使用メモリ | 77,752 KB |
最終ジャッジ日時 | 2023-09-28 23:05:49 |
合計ジャッジ時間 | 6,671 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 100 ms
71,324 KB |
testcase_01 | AC | 102 ms
71,604 KB |
testcase_02 | AC | 101 ms
71,136 KB |
testcase_03 | AC | 102 ms
71,604 KB |
testcase_04 | AC | 101 ms
71,132 KB |
testcase_05 | WA | - |
testcase_06 | AC | 97 ms
71,660 KB |
testcase_07 | AC | 97 ms
71,128 KB |
testcase_08 | WA | - |
testcase_09 | AC | 114 ms
76,300 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 123 ms
75,964 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 109 ms
72,012 KB |
testcase_23 | AC | 134 ms
77,648 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 132 ms
77,716 KB |
testcase_28 | AC | 142 ms
77,752 KB |
ソースコード
import sys #sys.setrecursionlimit(10 ** 6) INF = float('inf') MOD = 10**9 + 7 MOD2 = 998244353 from collections import defaultdict def ceil(A,B): return -(-A//B) def solve(): def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LC(): return list(sys.stdin.readline().rstrip()) def IC(): return [int(c) for c in sys.stdin.readline().rstrip()] def MI(): return map(int, sys.stdin.readline().split()) N,K,Q = input().split() N = int(N) K = int(K) Q = int(Q) a = 0 A = [""]*N for _ in range(Q): que = II() if(que==1): S = input() A[a] = S a+=1 a%=N elif(que==2): T = [""]*6 D = [0]*6 for i in range(6): T[i],D[i] = input().split() D[i] = int(D[i]) Time = 0 for i in range(6): if(T[i] in A): Time += min(D[i],K) else: Time += D[i] #print(Time) if(60<Time): print(i) break if(i==5): print(6) break for i in range(6): A[a]=T[i] a+=1 a%=N return solve()