結果

問題 No.607 開通777年記念
ユーザー %20%20
提出日時 2017-12-07 01:08:07
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,507 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-05-06 17:26:28
合計ジャッジ時間 3,798 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
6,812 KB
testcase_01 AC 7 ms
6,944 KB
testcase_02 AC 7 ms
6,940 KB
testcase_03 AC 7 ms
6,940 KB
testcase_04 AC 7 ms
6,944 KB
testcase_05 AC 7 ms
6,940 KB
testcase_06 AC 7 ms
6,944 KB
testcase_07 AC 116 ms
6,944 KB
testcase_08 AC 7 ms
6,944 KB
testcase_09 AC 22 ms
6,940 KB
testcase_10 AC 8 ms
6,940 KB
testcase_11 AC 1,363 ms
10,624 KB
testcase_12 AC 1,507 ms
10,240 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