Submission #1228466
Source Code Expand
/* Author : akgarhwal Date : 18-04-2017 14:30:04 Description : */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; #define sz(a) int((a).size()) #define pb push_back #define all(c) (c).begin(),(c).end() #define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++) #define present(c,x) ((c).find(x) != (c).end()) #define cpresent(c,x) (find(all(c),x) != (c).end()) int main(){ //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int n,X,Y; cin>>n>>X>>Y; string s; cin>>s; int fy =0,sy=0; for(int i=0; i< sz(s); i++){ if(s[i] == 'a' and (i+1) <= (X+Y)){ cout<<"Yes\n"; } else if(s[i] == 'b' and (i+1) <= (X+Y) and (i+1) <= Y ){ cout<<"Yes\n"; } else{ cout<<"No\n"; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Qualification simulator |
User | akgarhwal |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 900 Byte |
Status | WA |
Exec Time | 8 ms |
Memory | 896 KB |
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 | 8 ms | 768 KB |
02.txt | WA | 8 ms | 768 KB |
03.txt | WA | 8 ms | 768 KB |
04.txt | WA | 8 ms | 768 KB |
05.txt | AC | 7 ms | 768 KB |
06.txt | WA | 8 ms | 768 KB |
07.txt | WA | 8 ms | 896 KB |
08.txt | WA | 8 ms | 768 KB |
09.txt | AC | 8 ms | 768 KB |
10.txt | AC | 8 ms | 768 KB |
s1.txt | WA | 1 ms | 256 KB |
s2.txt | WA | 1 ms | 256 KB |
s3.txt | AC | 1 ms | 256 KB |