結果

問題 No.2372 既視感
ユーザー 👑 p-adicp-adic
提出日時 2023-07-07 21:49:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 78,952 KB
最終ジャッジ日時 2023-09-28 22:54:38
合計ジャッジ時間 4,248 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,588 KB
testcase_01 AC 69 ms
71,532 KB
testcase_02 AC 68 ms
71,244 KB
testcase_03 AC 69 ms
71,588 KB
testcase_04 AC 68 ms
71,432 KB
testcase_05 AC 69 ms
71,536 KB
testcase_06 AC 69 ms
71,384 KB
testcase_07 AC 68 ms
71,592 KB
testcase_08 AC 114 ms
77,312 KB
testcase_09 AC 84 ms
76,160 KB
testcase_10 AC 99 ms
77,328 KB
testcase_11 AC 109 ms
78,348 KB
testcase_12 AC 70 ms
71,500 KB
testcase_13 AC 119 ms
77,884 KB
testcase_14 AC 77 ms
75,700 KB
testcase_15 AC 102 ms
77,388 KB
testcase_16 AC 101 ms
78,240 KB
testcase_17 AC 78 ms
75,808 KB
testcase_18 AC 78 ms
75,760 KB
testcase_19 AC 72 ms
71,432 KB
testcase_20 AC 77 ms
75,760 KB
testcase_21 AC 74 ms
75,668 KB
testcase_22 AC 77 ms
75,700 KB
testcase_23 AC 117 ms
78,544 KB
testcase_24 AC 115 ms
78,312 KB
testcase_25 AC 113 ms
77,600 KB
testcase_26 AC 108 ms
77,600 KB
testcase_27 AC 120 ms
77,712 KB
testcase_28 AC 162 ms
78,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,P=input,range,print
def J():
	return map(int,I().split())
N,K,Q=J()
A=[]
for q in R(Q):
	t=I()
	if t=="1":A+=[I()]
	else:
		i,c,B=60,6,[]
		while i*c>0:
			t,d=I().split()
			d=int(d)
			for a in A[-N:]:
				if t==a:d=min(d,K)
			i,c=i-d,c-1
			B+=[t]
		if i<0:
			P(6-c-1),B.pop()
		else:P(6-c)
		for b in B:A+=[b]
		while c>0:
			t,d=I().split()
			c-=1
0