結果

問題 No.607 開通777年記念
ユーザー %20%20
提出日時 2017-12-07 01:08:07
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,689 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 456 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 10,064 KB
最終ジャッジ日時 2023-08-19 10:14:10
合計ジャッジ時間 4,819 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,284 KB
testcase_01 AC 5 ms
5,228 KB
testcase_02 AC 6 ms
5,212 KB
testcase_03 AC 6 ms
5,344 KB
testcase_04 AC 7 ms
5,144 KB
testcase_05 AC 6 ms
5,140 KB
testcase_06 AC 6 ms
5,072 KB
testcase_07 AC 123 ms
6,068 KB
testcase_08 AC 6 ms
5,276 KB
testcase_09 AC 25 ms
5,208 KB
testcase_10 AC 7 ms
5,204 KB
testcase_11 AC 1,514 ms
10,064 KB
testcase_12 AC 1,689 ms
9,488 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::M" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($N,$M)=glob<>;
for(<>){
	$i=0;
	$_[$i++]+=$_ for glob;
	$s=$l=$r=0;
	while($r<=$N){
		if($s==777){
			exit!print'YES'
		}elsif($s<777){
			$s+=$_[$r++]
		}else{
			$s-=$_[$l++]
		}
	}
}
print'NO'
0