提出 #34343


ソースコード 拡げる

Copy
<?php
 
//ini_set('display_errors', 1);
$A = explode(' ', trim(fgets(STDIN)));
fscanf(STDIN, "%d", $B);
$S = explode(' ', fgets(STDIN));
 
$diff = checkA($A, $S);
if(count($diff)){
	if(count($diff) === 1 && checkB($B, $diff)){
		$c = 6 - (count($diff) - 1);
	}else{
		$c = 6 - count($diff);
	}
	if($c >= 3){
		echo (string) (8 - $c);
	}else{
		echo '0';
	}
}else{
	echo '1';
}
echo "\n";
 
 
 
function checkA($A, $S){
	return array_diff($S, $A);
}
 
function checkB($B, $S){
	if(in_array($B, $S)){
		return TRUE;
	}else{
		return FALSE;
	}
}

提出情報

提出日時
問題 A - 宝くじ
ユーザ okumin
言語 PHP (PHP 5.3.10)
得点 0
コード長 578 Byte
結果 WA
実行時間 45 ms
メモリ 3760 KB

ジャッジ結果

セット名 All
得点 / 配点 0 / 100
結果
AC × 20
WA × 31
セット名 テストケース
All 00_1_01.txt, 00_1_02.txt, 00_2_01.txt, 00_2_02.txt, 00_3_01.txt, 00_3_02.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 01_rand_20.txt, 01_rand_21.txt, 01_rand_22.txt, 01_rand_23.txt, 01_rand_24.txt, 01_rand_25.txt, 01_rand_26.txt, 01_rand_27.txt, 01_rand_28.txt, 01_rand_29.txt, 01_rand_30.txt, 01_rand_31.txt, 01_rand_32.txt, 01_rand_33.txt, 01_rand_34.txt, 01_rand_35.txt, 01_rand_36.txt, 01_rand_37.txt, 01_rand_38.txt, 01_rand_39.txt
ケース名 結果 実行時間 メモリ
00_1_01.txt WA 42 ms 3680 KB
00_1_02.txt WA 44 ms 3684 KB
00_2_01.txt AC 42 ms 3676 KB
00_2_02.txt WA 42 ms 3680 KB
00_3_01.txt AC 42 ms 3652 KB
00_3_02.txt WA 40 ms 3688 KB
00_sample_01.txt WA 43 ms 3688 KB
00_sample_02.txt AC 44 ms 3760 KB
00_sample_03.txt WA 43 ms 3688 KB
00_sample_04.txt AC 43 ms 3684 KB
00_sample_05.txt AC 43 ms 3680 KB
01_rand_00.txt WA 43 ms 3684 KB
01_rand_01.txt WA 43 ms 3656 KB
01_rand_02.txt WA 42 ms 3684 KB
01_rand_03.txt WA 43 ms 3692 KB
01_rand_04.txt WA 43 ms 3688 KB
01_rand_05.txt WA 40 ms 3692 KB
01_rand_06.txt AC 43 ms 3688 KB
01_rand_07.txt WA 42 ms 3688 KB
01_rand_08.txt WA 43 ms 3684 KB
01_rand_09.txt WA 43 ms 3688 KB
01_rand_10.txt WA 43 ms 3684 KB
01_rand_11.txt AC 42 ms 3684 KB
01_rand_12.txt AC 42 ms 3680 KB
01_rand_13.txt AC 43 ms 3696 KB
01_rand_14.txt WA 43 ms 3648 KB
01_rand_15.txt WA 43 ms 3696 KB
01_rand_16.txt AC 42 ms 3688 KB
01_rand_17.txt WA 44 ms 3624 KB
01_rand_18.txt AC 43 ms 3688 KB
01_rand_19.txt AC 42 ms 3684 KB
01_rand_20.txt AC 43 ms 3648 KB
01_rand_21.txt WA 43 ms 3692 KB
01_rand_22.txt AC 43 ms 3688 KB
01_rand_23.txt WA 43 ms 3688 KB
01_rand_24.txt WA 43 ms 3684 KB
01_rand_25.txt WA 43 ms 3684 KB
01_rand_26.txt WA 43 ms 3700 KB
01_rand_27.txt WA 42 ms 3696 KB
01_rand_28.txt WA 44 ms 3684 KB
01_rand_29.txt WA 43 ms 3688 KB
01_rand_30.txt WA 43 ms 3676 KB
01_rand_31.txt AC 43 ms 3696 KB
01_rand_32.txt AC 40 ms 3676 KB
01_rand_33.txt WA 45 ms 3688 KB
01_rand_34.txt WA 44 ms 3696 KB
01_rand_35.txt AC 43 ms 3648 KB
01_rand_36.txt WA 43 ms 3684 KB
01_rand_37.txt AC 43 ms 3672 KB
01_rand_38.txt AC 43 ms 3688 KB
01_rand_39.txt AC 44 ms 3656 KB