結果

問題 No.607 開通777年記念
ユーザー 👑 tatt61880tatt61880
提出日時 2021-03-03 01:51:03
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 311 ms / 2,000 ms
コード長 497 bytes
コンパイル時間 3,053 ms
コンパイル使用メモリ 145,712 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-14 17:33:24
合計ジャッジ時間 3,596 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 2 ms
4,356 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 1 ms
4,352 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 22 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 5 ms
4,348 KB
testcase_10 AC 1 ms
4,352 KB
testcase_11 AC 299 ms
4,348 KB
testcase_12 AC 311 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var m: int :: cui@inputInt()
	var a: []int :: #[n]int
	for(1, m)
		for i(0, n - 1)
			do a[i] :+ cui@inputInt()
		end for
		var l: int :: 0
		var r: int :: 0
		var sum: int :: 0
		while loop(true)
			if(sum < 777)
				if(r = n)
					break loop
				end if
				do sum :+ a[r]
				do r :+ 1
			else
				do sum :- a[l]
				do l :+ 1
			end if
			if(sum = 777)
				do cui@print("YES\n")
				ret
			end if
		end while
	end for
	
	do cui@print("NO\n")
end func
0