結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー 👑 tatt61880tatt61880
提出日時 2023-08-05 12:29:46
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 563 bytes
コンパイル時間 2,457 ms
コンパイル使用メモリ 146,960 KB
実行使用メモリ 13,568 KB
最終ジャッジ日時 2024-04-23 09:40:35
合計ジャッジ時間 4,244 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 58 ms
8,704 KB
testcase_04 AC 71 ms
10,112 KB
testcase_05 AC 22 ms
5,760 KB
testcase_06 AC 57 ms
8,704 KB
testcase_07 AC 105 ms
12,160 KB
testcase_08 AC 43 ms
7,680 KB
testcase_09 AC 8 ms
5,376 KB
testcase_10 AC 34 ms
6,528 KB
testcase_11 AC 148 ms
13,440 KB
testcase_12 AC 124 ms
13,568 KB
testcase_13 AC 3 ms
5,376 KB
testcase_14 AC 3 ms
5,376 KB
testcase_15 AC 3 ms
5,376 KB
testcase_16 AC 3 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 3 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 2 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 3 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	
	var m1: int :: cui@inputInt()
	var a: []int :: #[m1]int
	for i(0, m1 - 1)
		do a[i] :: cui@inputInt()
	end for
	
	var m2: int :: cui@inputInt()
	var b: []int :: #[m2]int
	for i(0, m2 - 1)
		do b[i] :: cui@inputInt()
	end for
	
	var isDirty: dict<int, bool> :: #dict<int, bool>
	var step: int :: 0
	for i(0, m1 - 1)
		do step :+ a[i]
		do isDirty.add(step, true)
	end for
	
	for i(0, m2 - 1)
		do step :- b[i]
		do isDirty.add(step, true)
	end for
	
	var ans: int :: n + 1 - ^isDirty
	do cui@print("\{ans}\n")
end func
0