結果

問題 No.397 NO MORE KADOMATSU
ユーザー 👑 tatt61880tatt61880
提出日時 2021-03-30 02:13:39
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 2,484 ms
コンパイル使用メモリ 154,432 KB
実行使用メモリ 24,372 KB
平均クエリ数 28.94
最終ジャッジ日時 2023-10-14 18:10:26
合計ジャッジ時間 5,426 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
24,072 KB
testcase_01 AC 26 ms
23,580 KB
testcase_02 AC 26 ms
23,424 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 27 ms
24,288 KB
testcase_10 AC 27 ms
23,868 KB
testcase_11 AC 27 ms
24,060 KB
testcase_12 AC 27 ms
24,348 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 26 ms
23,868 KB
testcase_17 AC 26 ms
23,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var a: []int :: #[n]int
	for i(0, n - 1)
		do a[i] :: cui@inputInt()
	end for
	
	var u: []int :: #[0]int
	var v: []int :: #[0]int
	var minIdx: int :: 0
	for target(1, 100)
		for i(minIdx, n - 1)
			if(a[i] = target)
				if(i <> minIdx)
					do u :~ [minIdx]
					do v :~ [i]
				end if
				do minIdx :+ 1
			end if
		end for
	end for
	do cui@print("\{^u}\n")
	do cui@flush()
	for i(0, ^u - 1)
		do cui@print("\{u[i]} \{v[i]}\n")
		do cui@flush()
	end for
	do cui@input()
end func
0