結果

問題 No.182 新規性の虜
ユーザー 👑 tatt61880tatt61880
提出日時 2020-07-12 01:35:54
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 98 ms / 5,000 ms
コード長 466 bytes
コンパイル時間 2,563 ms
コンパイル使用メモリ 155,076 KB
実行使用メモリ 8,328 KB
最終ジャッジ日時 2023-10-14 16:58:43
合計ジャッジ時間 4,678 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,368 KB
testcase_01 AC 2 ms
4,372 KB
testcase_02 AC 2 ms
4,368 KB
testcase_03 AC 2 ms
4,368 KB
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 2 ms
4,368 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,372 KB
testcase_08 AC 58 ms
6,212 KB
testcase_09 AC 98 ms
7,640 KB
testcase_10 AC 84 ms
7,108 KB
testcase_11 AC 68 ms
6,672 KB
testcase_12 AC 28 ms
5,120 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,372 KB
testcase_15 AC 2 ms
4,368 KB
testcase_16 AC 2 ms
4,368 KB
testcase_17 AC 2 ms
4,372 KB
testcase_18 AC 58 ms
4,408 KB
testcase_19 AC 42 ms
4,368 KB
testcase_20 AC 26 ms
4,368 KB
testcase_21 AC 66 ms
4,372 KB
testcase_22 AC 33 ms
4,376 KB
testcase_23 AC 2 ms
4,372 KB
testcase_24 AC 79 ms
8,328 KB
testcase_25 AC 30 ms
4,368 KB
testcase_26 AC 13 ms
4,448 KB
testcase_27 AC 2 ms
4,372 KB
evil01.txt AC 91 ms
8,368 KB
evil02.txt AC 90 ms
8,424 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}\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