結果

問題 No.1692 Expectations
ユーザー 👑 tatt61880tatt61880
提出日時 2021-10-05 01:32:46
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 196 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 2,924 ms
コンパイル使用メモリ 151,252 KB
実行使用メモリ 14,288 KB
最終ジャッジ日時 2023-09-30 07:55:02
合計ジャッジ時間 5,901 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 3 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 73 ms
4,904 KB
testcase_11 AC 74 ms
4,904 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 15 ms
4,604 KB
testcase_15 AC 157 ms
10,156 KB
testcase_16 AC 15 ms
4,568 KB
testcase_17 AC 76 ms
7,412 KB
testcase_18 AC 28 ms
5,184 KB
testcase_19 AC 196 ms
11,032 KB
testcase_20 AC 124 ms
12,788 KB
testcase_21 AC 145 ms
14,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var m: int :: cui@inputInt()
	var d: dict<int, bool> :: #dict<int, bool>
	var a: []int :: #[n]int
	for i(0, n - 1)
		do a[i] :: cui@inputInt()
		do d.add(a[i], true)
	end for
	
	var max: int :: ^d
	var min: int :: 0
	if(m = n)
		if(^d = 1)
			do min :: 1
		end if
	end if
	do cui@print("\{max} \{min}\n")
end func
0