Submission #1726079


Source Code Expand

<?php
fscanf(STDIN, '%d %d %d', $N, $A, $B);
fscanf(STDIN, "%s", $str);

$passed = $A + $B;
$countPassed = 0;
$countB = 0;

for ($i = 0; $i < $N; $i++) {
	if ($str[$i] === 'a' && $countPassed < $passed) {
		$countPassed++;
		echo 'YES'. PHP_EOL;
	} else if ($str[$i] === 'b' && $countPassed < $passed && $countB <= $B) {
		$countPassed++;
		$countB++;
		echo 'YES'. PHP_EOL;
	} else {
		echo 'NO'. PHP_EOL;
	}
}

Submission Info

Submission Time
Task B - Qualification simulator
User sms13242000
Language PHP7 (7.0.15)
Score 0
Code Size 430 Byte
Status WA
Exec Time 177 ms
Memory 4984 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
WA × 3
WA × 13
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt WA 167 ms 4856 KB
02.txt WA 177 ms 4984 KB
03.txt WA 174 ms 4984 KB
04.txt WA 167 ms 4984 KB
05.txt WA 147 ms 4856 KB
06.txt WA 168 ms 4856 KB
07.txt WA 173 ms 4984 KB
08.txt WA 177 ms 4984 KB
09.txt WA 171 ms 4984 KB
10.txt WA 171 ms 4984 KB
s1.txt WA 9 ms 4604 KB
s2.txt WA 9 ms 4604 KB
s3.txt WA 9 ms 4604 KB