結果

問題 No.607 開通777年記念
ユーザー %20%20
提出日時 2018-02-16 22:40:28
言語 Perl
(5.38.2)
結果
AC  
実行時間 554 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 9,908 KB
最終ジャッジ日時 2023-09-05 07:29:53
合計ジャッジ時間 2,489 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,172 KB
testcase_01 AC 6 ms
5,312 KB
testcase_02 AC 6 ms
5,172 KB
testcase_03 AC 6 ms
5,272 KB
testcase_04 AC 6 ms
5,172 KB
testcase_05 AC 6 ms
5,172 KB
testcase_06 AC 7 ms
5,372 KB
testcase_07 AC 35 ms
5,932 KB
testcase_08 AC 6 ms
5,176 KB
testcase_09 AC 12 ms
5,400 KB
testcase_10 AC 6 ms
5,260 KB
testcase_11 AC 500 ms
9,908 KB
testcase_12 AC 554 ms
9,396 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 split;
	$s=$l=$r=0;
	while($r<=$N){
		if($s==777){
			exit!print'YES'
		}elsif($s<777){
			$s+=$_[$r++]
		}else{
			$s-=$_[$l++]
		}
	}
}
print'NO'
0