Submission #1675658
Source Code Expand
#include <stdio.h> int main(void){ int i,j,f; int n,a,b; char s[100000]; scanf("%d %d %d",&n,&a,&b); for(i=0,j=0,f=0;i<n;i++){ scanf("%c",&s[i]); if(s[i]=='c') printf("No\n"); else if(s[i]=='a' && j+f<a+b){ printf("Yes\n"); j++; }else if(s[i]=='b' && j+f<a+b && f<=b){ printf("Yes\n"); f++; }else printf("No\n"); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Qualification simulator |
User | mutsuro_626 |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 460 Byte |
Status | WA |
Exec Time | 8 ms |
Memory | 640 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:6:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d",&n,&a,&b); ^ ./Main.c:8:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%c",&s[i]); ^
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
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 | 7 ms | 512 KB |
02.txt | WA | 7 ms | 640 KB |
03.txt | WA | 8 ms | 640 KB |
04.txt | WA | 8 ms | 640 KB |
05.txt | WA | 6 ms | 512 KB |
06.txt | WA | 7 ms | 512 KB |
07.txt | WA | 7 ms | 640 KB |
08.txt | WA | 7 ms | 640 KB |
09.txt | WA | 7 ms | 640 KB |
10.txt | WA | 7 ms | 640 KB |
s1.txt | WA | 1 ms | 128 KB |
s2.txt | WA | 1 ms | 128 KB |
s3.txt | AC | 1 ms | 128 KB |