結果

問題 No.245 貫け!
ユーザー kor_expkor_exp
提出日時 2015-07-17 23:26:34
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 689 bytes
コンパイル時間 851 ms
コンパイル使用メモリ 18,572 KB
実行使用メモリ 19,060 KB
最終ジャッジ日時 2023-09-22 18:17:13
合計ジャッジ時間 1,368 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
18,792 KB
testcase_01 AC 17 ms
18,808 KB
testcase_02 AC 16 ms
19,000 KB
testcase_03 AC 16 ms
18,880 KB
testcase_04 WA -
testcase_05 AC 16 ms
18,804 KB
testcase_06 AC 17 ms
18,860 KB
testcase_07 AC 16 ms
18,840 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
fscanf(STDIN,"%d",$n);
$a=array_fill(0,101,"");
for($i=0;$i<=100;$i++){
    $a[$i]=array_fill(0,101,"");
}
for($i=0;$i<$n;$i++){
    $l=explode(" ",trim(fgets(STDIN)));
    $a[$l[0]][$l[1]].=chr(60+$i);
    $a[$l[2]][$l[3]].=chr(60+$i);
}
//x
$sum=0;
$max=-INF;

for($i=0;$i<=100;$i++){
    $sum=0;
    $str="";
    for($j=0;$j<=100;$j++){
        $str.=$a[$i][$j];
    }
    $sum=sizeof(array_unique(str_split($str)));
    if($max < $sum)
        $max = $sum;
}

for($i=0;$i<=100;$i++){
    $sum=0;
    $str="";
    for($j=0;$j<=100;$j++){
        $str.=$a[$j][$i];
    }
    $sum=sizeof(array_unique(str_split($str)));
    if($max < $sum)
        $max = $sum;
}

echo $max."\n";
?>
0