結果

問題 No.482 あなたの名は
ユーザー tailstails
提出日時 2017-02-10 22:38:17
言語 Perl
(5.38.2)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 5,360 KB
実行使用メモリ 31,392 KB
最終ジャッジ日時 2023-08-28 15:44:46
合計ジャッジ時間 4,306 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,384 KB
testcase_01 AC 6 ms
5,292 KB
testcase_02 AC 6 ms
5,352 KB
testcase_03 AC 6 ms
5,208 KB
testcase_04 AC 6 ms
5,292 KB
testcase_05 AC 6 ms
5,128 KB
testcase_06 AC 5 ms
5,160 KB
testcase_07 AC 6 ms
5,364 KB
testcase_08 AC 6 ms
5,200 KB
testcase_09 AC 5 ms
5,284 KB
testcase_10 AC 6 ms
5,168 KB
testcase_11 AC 6 ms
5,272 KB
testcase_12 AC 7 ms
5,176 KB
testcase_13 AC 6 ms
5,132 KB
testcase_14 AC 5 ms
5,184 KB
testcase_15 AC 184 ms
31,340 KB
testcase_16 AC 180 ms
31,296 KB
testcase_17 AC 179 ms
31,352 KB
testcase_18 AC 184 ms
31,352 KB
testcase_19 AC 183 ms
31,272 KB
testcase_20 AC 183 ms
31,328 KB
testcase_21 AC 179 ms
31,272 KB
testcase_22 AC 188 ms
31,236 KB
testcase_23 AC 182 ms
31,392 KB
testcase_24 AC 183 ms
31,236 KB
testcase_25 AC 191 ms
31,160 KB
testcase_26 AC 190 ms
31,248 KB
testcase_27 AC 180 ms
31,196 KB
testcase_28 AC 187 ms
31,368 KB
testcase_29 AC 166 ms
29,772 KB
testcase_30 AC 6 ms
5,120 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$k)=glob<>;
@d=(0,<>=~/\d+/g);
for$i(1..$n){
	if($d[$i]){
		while($d[$i]){
			($d[$i],$i)=(0,$d[$i]);
			++$c;
		}
		--$c;
	}
}
print $k>=$c && ($k^$c^1)&1 ? YES : NO
0