結果

問題 No.406 鴨等間隔の法則
ユーザー 👑 tatt61880tatt61880
提出日時 2020-04-22 23:09:55
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 2,381 ms
コンパイル使用メモリ 156,668 KB
実行使用メモリ 19,368 KB
最終ジャッジ日時 2023-10-14 16:19:16
合計ジャッジ時間 7,015 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,124 KB
testcase_01 AC 2 ms
4,356 KB
testcase_02 AC 2 ms
4,356 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 74 ms
17,752 KB
testcase_05 AC 28 ms
8,892 KB
testcase_06 AC 30 ms
9,260 KB
testcase_07 AC 30 ms
9,356 KB
testcase_08 AC 73 ms
17,832 KB
testcase_09 AC 81 ms
19,164 KB
testcase_10 AC 34 ms
9,812 KB
testcase_11 AC 66 ms
15,888 KB
testcase_12 AC 41 ms
11,712 KB
testcase_13 AC 38 ms
10,904 KB
testcase_14 AC 69 ms
16,428 KB
testcase_15 AC 6 ms
4,796 KB
testcase_16 AC 7 ms
4,828 KB
testcase_17 AC 4 ms
4,472 KB
testcase_18 AC 7 ms
4,976 KB
testcase_19 AC 8 ms
5,192 KB
testcase_20 AC 10 ms
5,720 KB
testcase_21 AC 11 ms
5,640 KB
testcase_22 AC 19 ms
7,024 KB
testcase_23 AC 43 ms
11,716 KB
testcase_24 AC 61 ms
14,968 KB
testcase_25 AC 83 ms
19,304 KB
testcase_26 AC 82 ms
19,320 KB
testcase_27 AC 74 ms
19,368 KB
testcase_28 AC 75 ms
19,364 KB
testcase_29 AC 81 ms
19,240 KB
testcase_30 AC 80 ms
19,076 KB
testcase_31 AC 77 ms
18,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var ss: [][]char
	var n: int :: cui@input().toInt(&)
	do ss :: cui@input().split(" ")
	var a: []int :: #[n]int
	for i(0, n - 1)
		do a[i] :: ss[i].toInt(&)
	end for
	do a.sort()
	
	var ans: bool :: a[0] <> a[1]
	for i(1, n - 1)
		if(a[i] - a[i - 1] <> a[1] - a[0])
			do ans :: false
		end if
	end for
	do cui@print(ans ?("YES\n", "NO\n"))
end func
0