結果

問題 No.182 新規性の虜
ユーザー 👑 tatt61880tatt61880
提出日時 2020-07-01 03:52:20
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 103 ms / 5,000 ms
コード長 472 bytes
コンパイル時間 2,329 ms
コンパイル使用メモリ 154,732 KB
実行使用メモリ 8,380 KB
最終ジャッジ日時 2023-10-14 16:55:58
合計ジャッジ時間 4,699 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,352 KB
testcase_08 AC 60 ms
6,052 KB
testcase_09 AC 103 ms
7,816 KB
testcase_10 AC 87 ms
7,048 KB
testcase_11 AC 70 ms
6,664 KB
testcase_12 AC 29 ms
4,888 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,352 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 58 ms
4,352 KB
testcase_19 AC 42 ms
4,356 KB
testcase_20 AC 27 ms
4,348 KB
testcase_21 AC 66 ms
4,348 KB
testcase_22 AC 34 ms
4,480 KB
testcase_23 AC 2 ms
4,348 KB
testcase_24 AC 81 ms
8,380 KB
testcase_25 AC 29 ms
4,348 KB
testcase_26 AC 12 ms
4,352 KB
testcase_27 AC 2 ms
4,352 KB
evil01.txt AC 92 ms
8,540 KB
evil02.txt AC 92 ms
8,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var dic: dict<int, int> :: #dict<int, int>
	for i(0, n - 1)
		var a: int :: cui@inputInt()
		var cnt: int :: 0
		if(dic.exist(a))
			do cnt :: dic.get(a, &)
		end if
		do dic.add(a, cnt + 1)
	end for
	var ans: lib@Int :: #lib@Int
	do dic.forEach(f, ans)
	do cui@print("\{ans.value}\n")
	
	func f(key: int, value: int, data: kuin@Class): bool
		if(value = 1)
			do(data $ lib@Int).value :+ 1
		end if
		ret true
	end func
end func
0