結果

問題 No.408 五輪ピック
ユーザー %20%20
提出日時 2020-06-28 09:24:57
言語 Perl
(5.38.2)
結果
AC  
実行時間 483 ms / 5,000 ms
コード長 218 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 30,324 KB
最終ジャッジ日時 2023-09-21 09:28:18
合計ジャッジ時間 9,014 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,376 KB
testcase_01 AC 6 ms
5,164 KB
testcase_02 AC 6 ms
5,188 KB
testcase_03 AC 6 ms
5,160 KB
testcase_04 AC 6 ms
5,224 KB
testcase_05 AC 360 ms
20,936 KB
testcase_06 AC 218 ms
20,712 KB
testcase_07 AC 296 ms
21,824 KB
testcase_08 AC 242 ms
15,724 KB
testcase_09 AC 250 ms
16,668 KB
testcase_10 AC 195 ms
17,428 KB
testcase_11 AC 189 ms
16,388 KB
testcase_12 AC 342 ms
22,448 KB
testcase_13 AC 343 ms
20,416 KB
testcase_14 AC 70 ms
10,220 KB
testcase_15 AC 354 ms
21,076 KB
testcase_16 AC 371 ms
20,984 KB
testcase_17 AC 376 ms
20,500 KB
testcase_18 AC 380 ms
21,924 KB
testcase_19 AC 409 ms
24,064 KB
testcase_20 AC 108 ms
13,872 KB
testcase_21 AC 58 ms
10,048 KB
testcase_22 AC 184 ms
19,940 KB
testcase_23 AC 483 ms
30,324 KB
testcase_24 AC 319 ms
25,372 KB
testcase_25 AC 334 ms
21,092 KB
testcase_26 AC 417 ms
27,944 KB
testcase_27 AC 339 ms
20,764 KB
testcase_28 AC 236 ms
19,124 KB
testcase_29 AC 235 ms
19,040 KB
testcase_30 AC 6 ms
5,156 KB
testcase_31 AC 6 ms
5,120 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$N=<>;
map{push@$_,$_[--$|]for@_=glob}<>;
for$i(@1){
	$V[$_]=$V[$_]?-1:$i for@$i
}
$V[1]=0;
for$i(1..$N){
	map{
		$z|=$V[$i]&&$V[$_]&&$V[$i]!=$_&&$V[$_]!=$i&&($V[$i]<0||$V[$_]<0||$V[$i]!=$V[$_])
	}@$i
}
print$z?YES:NO
0