結果

問題 No.469 区間加算と一致検索の問題
ユーザー tkc60kmphtkc60kmph
提出日時 2016-12-21 16:45:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
実行時間 -
コード長 417 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 819,328 KB
最終ジャッジ日時 2024-05-08 09:32:22
合計ジャッジ時間 8,616 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 183 ms
20,836 KB
testcase_03 AC 70 ms
13,952 KB
testcase_04 AC 125 ms
23,424 KB
testcase_05 AC 113 ms
19,320 KB
testcase_06 AC 121 ms
21,248 KB
testcase_07 AC 148 ms
25,600 KB
testcase_08 AC 132 ms
19,968 KB
testcase_09 AC 82 ms
16,768 KB
testcase_10 AC 84 ms
12,288 KB
testcase_11 AC 64 ms
14,848 KB
testcase_12 AC 119 ms
18,924 KB
testcase_13 AC 90 ms
17,664 KB
testcase_14 AC 47 ms
12,544 KB
testcase_15 AC 50 ms
12,160 KB
testcase_16 AC 101 ms
16,640 KB
testcase_17 AC 127 ms
21,760 KB
testcase_18 AC 144 ms
24,576 KB
testcase_19 AC 47 ms
12,416 KB
testcase_20 AC 114 ms
18,304 KB
testcase_21 AC 60 ms
13,824 KB
testcase_22 AC 32 ms
10,880 KB
testcase_23 MLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
x = [0]*n
q = [0]*m
for i in range(m):
	q[i] = input().split()
	if q[i][0] == "!":
		for j in [1,2,3]:
			q[i][j] = int(q[i][j])
ans = {tuple(x[:]):0}
chk = {tuple(x[:])}
for i in range(m):
	if q[i][0] == "!":
		for j in range(q[i][2]-q[i][1]):
			x[q[i][1]+j] += q[i][3]
		l = len(chk)
		chk.add(tuple(x[:]))
		if l < len(chk):
			ans[tuple(x[:])] = i+1
	else:
		print(ans[tuple(x)])
0