submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s235550284 | p03970 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
string s0 = "CODEFESTIVAL2016";
int ans = 0;
for(int i = 0; i < s0.length; i++){
if(s[i] != s0[i]) ans++;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:11:25: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s861966786 | p03970 | C | #include <stdio.h>
int main(void)
{
char fes[16] = 'CODEFESTIVAL2016' ;
char s[16] ;
int i,n ;
scanf("%s",&s) ;
for(i=0 ; i<16 ; i++){
if(fes[i]==s[i]) n++ ;
}
printf("%d\n",n) ;
return 0 ;
} | main.c: In function 'main':
main.c:5:24: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes
5 | char fes[16] = 'CODEFESTIVAL2016' ;
| ^~~~~~~~~~~~~~~~~~
main.c:5:24: error: invalid initializer
|
s576554333 | p03970 | C | #inlcude<stdio.h>
int main(){
char ,w[20],s[]={"C0DEFESTIVAL2O16"};
int i,j=0;
scanf("%s",w);
for(i=0;s[i];i++){
if(s[i]-w[i])j++;
}
printf("%d\n",j);
return 0;
}
| main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:3:14: error: expected identifier or '(' before ',' token
3 | char ,w[20],s[]={"C0DEFESTIVAL2O16"};
| ^
main.c:... |
s623263751 | p03970 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
string a = "CODEFESTIVAL2016";
int cnt = 0;
s << cin;
for (int i = 0; i < 16; i++) {
if (s.at(i) != a.at(i)) {
cnt++;
}
}
cout << cnt << endl;
}
| a.cc: In function 'int main()':
a.cc:9:11: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::istream' {aka 'std::basic_istream<char>'})
9 | s << cin;
| ~ ^~ ~~~
| | |
| | std::istream {aka std:... |
s640835189 | p03970 | C++ | #include <iostream> #include <string> using namespace std;
int main() ... | a.cc:1:81: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <string> using name... |
s736108183 | p03970 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
string a = "CODEFESTIVAL2016";
int cnt = 0;
s << cin;
for (int i = 0; i < 16; i++) {
if (s.at(i) != a.at(i)) {
cnt++
}
}
cout << cnt << endl;
}
| a.cc: In function 'int main()':
a.cc:9:11: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::istream' {aka 'std::basic_istream<char>'})
9 | s << cin;
| ~ ^~ ~~~
| | |
| | std::istream {aka std:... |
s721924399 | p03970 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
int ma... | a.cc: In function 'int main()':
a.cc:23:29: error: expected ';' before '}' token
23 | if(s[i]!=ans[i]) count++
| ^
| ;
24 |
25 | }
| ~
|
s003883623 | p03970 | C++ | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
public class Main {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
public static void main(String[] args) throws Exception {
new Main().run(... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.ByteArrayInputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available wit... |
s450730765 | p03970 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
string a = "CODEFESTIVAL2016";
int cnt = 0;
s << cin;
for (int i = 0; i < 16; i++) {
if (s.at(i) != a.at(i)) {
cnt++
}
}
cout << cnt << endl;
}
| a.cc: In function 'int main()':
a.cc:9:11: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::istream' {aka 'std::basic_istream<char>'})
9 | s << cin;
| ~ ^~ ~~~
| | |
| | std::istream {aka std:... |
s494294915 | p03970 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
string a,b="CODEFESTIVAL2016";
cin>>a;
int c=0;
for(i=0;i<a.size();i++) if(a[i]!=b[i])c++;
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
9 | for(i=0;i<a.size();i++) if(a[i]!=b[i])c++;
| ^
|
s563994537 | p03970 | C++ | Last login: Mon Oct 10 12:45:01 on console
yutakasehiroto-no-MacBook-Air:~ toyosehiroto$ cd ./Documents/Atcoder/
yutakasehiroto-no-MacBook-Air:Atcoder toyosehiroto$ cd others/
yutakasehiroto-no-MacBook-Air:others toyosehiroto$ lla
total 24
drwxr-xr-x 7 toyosehiroto staff 238 10 2 20:42 .
drwxr-xr-x 8 toyosehiro... | a.cc:8:11: error: stray '@' in program
8 | -rw-r--r--@ 1 toyosehiroto staff 8196 9 24 17:44 .DS_Store
| ^
a.cc:18:11: error: stray '@' in program
18 | -rw-r--r--@ 1 toyosehiroto staff 6148 9 24 17:44 .DS_Store
| ^
a.cc:1:1: error: 'Last' does not name a type
1 | Last l... |
s199758337 | p03970 | C++ | ans = 0
s = 'CODEFESTIVAL2016'
t = raw_input().strip()
for i in xrange(16):
if s[i] != t[i]: ans +=1
print ans
| a.cc:2:5: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes
2 | s = 'CODEFESTIVAL2016'
| ^~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'ans' does not name a type
1 | ans = 0
| ^~~
|
s914372147 | p03970 | C++ | #include <iostream>
#include <queue>
#include <stack>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <vector>
#include <list>
int main() {
const char* s = "CODEFESTIVAL2016";
std::string str;
std::cin >> str;
int cnt = 0;
for(int i = 0; i < str.size(); ++i) {... | a.cc: In function 'int main()':
a.cc:20:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
20 | if(str[i] != s) {
|
s670609020 | p03970 | C++ | s = raw_input()
t = "CODEFESTIVAL2016"
x = 0
assert len(s) == len(t)
for i in range(len(t)):
x += 1 if s[i] != t[i] else 0
print x
| a.cc:1:1: error: 's' does not name a type
1 | s = raw_input()
| ^
|
s159068933 | p03970 | C++ | #include <bits/stdc++.h>
using namespace std;
const int dx[]={1,0,-1,0,1,-1,-1,1};
const int dy[]={0,1,0,-1,1,1,-1,-1};
const int INF = 1e9;
const long long LINF = 1e18;
const double EPS = 1e-8;
#define pb emplace_back
#define mk make_pair
#define fr first
#define sc second
#define ll long long
#define reps... | a.cc: In function 'int main()':
a.cc:13:21: error: expected ',' or ';' before 'for'
13 | #define reps(i,j,k) for(int i = (j); i < (k); ++i)
| ^~~
a.cc:14:18: note: in expansion of macro 'reps'
14 | #define rep(i,j) reps(i,0,j)
| ^~~~
a.cc:26:9: note: in expansion o... |
s030424907 | p03970 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
#include<string>
#include <math.h>
#include<algorithm>
// #include <boost/multiprecision/cpp_int.hpp>
... | a.cc: In function 'int main()':
a.cc:76:37: error: expected ';' before '}' token
76 | if(s[i]!=t[i]) ans++
| ^
| ;
77 | }
| ~
|
s990853532 | p03970 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <cctype>
#include <stack>
#include <queue>
#include <cstring>
#include <map>
#include <list>
#in... | a.cc: In function 'int main()':
a.cc:38:23: error: 'n' was not declared in this scope
38 | for(int i=0;i<n;i++) res+=s[i]!=t[i];
| ^
|
s329981844 | p03971 | C++ | #include <bits\stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
const ll INF = 1001001001;
int main(){
int n,a,b;
cin >> n >> a >> b;
string s;
cin >> s;
int cnt = 0;
int cntb = 0;
rep(i,n){
if(s[i]=='a... | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s199660382 | p03971 | Java | import java.util.*; import java.io.*; import java.math.*;
public class Main{
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = ne... | Main.java:80: error: cannot find symbol
String tmp = list.get(i);
^
symbol: variable list
location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s562318964 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, a, b;
cin >> n >> a >> b;
int cnt=0, cnt_i=0;
string s;
cin >> s;
for(int i=0; i<n; i++)
{
if(s.at[i]=='a')
{
if(cnt<a+b){
cout << "Yes" << endl;
cnt++;
}
else
{
cout << "No" << en... | a.cc: In function 'int main()':
a.cc:16:12: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
16 | if(s.at[i]=='a')
| ^
a.cc:27:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
27 | else if(s.at[i]=='b')
| ... |
s166050677 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, a, b;
cin >> n >> a >> b;
int cnt=0, cnt_i=0;
string s;
cin >> s;
for(int i=0; i<s.size(); i++)
{
if(s.at[i]=='a')
{
if(cnt<a+b){
cout << "Yes" << endl;
cnt++;
}
else
{
cout << "No... | a.cc: In function 'int main()':
a.cc:16:12: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
16 | if(s.at[i]=='a')
| ^
a.cc:27:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
27 | else if(s.at[i]=='b')
| ... |
s114927139 | p03971 | C | #include<stdio.h>
int main(){
int N,B,A;
scanf("%d%d%d",&N,&B,&A);
char S[10000000];
scanf("%s",S);
int counta=0,countb=0;
for(int i=0;i<N;i++){
if(S[i]=='a'){
if(A+B>counta){
counta++;
printf("Yes\n");
}
else if(S[i]=='b'){
if(A+B>counta && countb<=B){
c... | main.c: In function 'main':
main.c:29:1: error: expected declaration or statement at end of input
29 | }
| ^
main.c:29:1: error: expected declaration or statement at end of input
|
s169293566 | p03971 | C | #include<stdio.h>
int main(){
int N,B,A;
scanf("%d%d%d",&N,&B,&A);
char S[10000000];
scanf("%s",S);
int counta=0,countb=0;
for(int i=0;i<N;i++){
if(S[i]=='a'){
if(A+B>counta){
counta++;
printf("Yes\n");
}
else if(S[i]=='b'){
if(A+B>counta && countb<=B){
c... | main.c: In function 'main':
main.c:29:1: error: expected declaration or statement at end of input
29 | }
| ^
main.c:29:1: error: expected declaration or statement at end of input
|
s129529785 | p03971 | C++ | #include <iostream>
#include<algorithm>
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
string s;
cin >> s;
int count = 0;
int countf = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'a') {
if (count < a + b) {
cout << "Yes" << endl;
count++;
}
else {... | a.cc: In function 'int main()':
a.cc:36:10: error: expected '}' at end of input
36 | }
| ^
a.cc:6:12: note: to match this '{'
6 | int main() {
| ^
|
s534161665 | p03971 | C++ | #include <iostream>
#include<algorithm>
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
string s;
cin >> s;
int count = 0;
int countf = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'a') {
if (count < a + b) {
cout << "Yes" << endl;
count++;
}
else {... | a.cc: In function 'int main()':
a.cc:30:46: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
30 | cout << "No" << end;
| ~~~~~~~~~~~~~^~~~~~
In file included from /usr/incl... |
s230456918 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N, A, B, S;
cin >> N >>A >>B;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(i);
}
for (int j = 0; j < N; j++) {
if(vec.at(j)=="a" && sum<A+B ){
cout << "Yes" <<endl;
S++;
}
... | a.cc: In function 'int main()':
a.cc:14:30: error: 'sum' was not declared in this scope
14 | if(vec.at(j)=="a" && sum<A+B ){
| ^~~
|
s198925695 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n , a, b;
cin >> n >> a >> b;
string s ;
int dom = 0;
int fore = 0;
for ( int i=0 ; i<n ; i++){
if (s.at(i) == 'c'){
cout << "No"<< endl;
continue ;
}else if ( s.at(i) == 'a'){
if (dom+fore<=n){
cout << "Yes" ... | a.cc: In function 'int main()':
a.cc:33:2: error: expected '}' at end of input
33 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s952864761 | p03971 | C++ | #include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define pi 3.141592653589... | a.cc: In function 'int main()':
a.cc:21:27: error: expected unqualified-id before ';' token
21 | int N, A, B, Pa=0, Pb=0,;
| ^
|
s921492601 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N=0,A=0,B=0;
cin>>N>>A>>B;
string S;
cin>>S;
int count=0;
int countb=0;
for(int i=0;i<N;i++){
string S.at(i);
if(S.at(i)=="a"&&count<(A+B)){
count+=1;
cout<<"Yes"<<endl;
}
else if(S.at(i)=="b"&&count<(A+B)&&countb... | a.cc: In function 'int main()':
a.cc:11:13: error: expected initializer before '.' token
11 | string S.at(i);
| ^
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if(S.at(i)=="a"&&count<(A+B)){
| ~~~~~~~^~~~~
a.cc:16:20: error: IS... |
s299090977 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N=0,A=0,B=0;
cin>>N>>A>>B;
string S;
cin>>S;
int count=0;
int countb=0;
for(int i=0;i<N;i++){
char S.at(i);
if(S.at(i)=="a"&&count<(A+B)){
count+=1;
cout<<"Yes"<<endl;
}
else if(S.at(i)=="b"&&count<(A+B)&&countb<B... | a.cc: In function 'int main()':
a.cc:11:11: error: expected initializer before '.' token
11 | char S.at(i);
| ^
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if(S.at(i)=="a"&&count<(A+B)){
| ~~~~~~~^~~~~
a.cc:16:20: error: ISO C+... |
s598708180 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,A,B,a=0,b=1;
string S;
cin>>N>>A>>B>>S;
for(int i=0; i<N; i++){
if(S[i] == 'c'){
cout << "No" << endl;
}
else if(S[i] == 'a'){
if(a<A+B){
cou t<< "Yes" << endl;
a++;
}
else{
cout<<"No"<<e... | a.cc: In function 'int main()':
a.cc:14:9: error: 'cou' was not declared in this scope; did you mean 'cos'?
14 | cou t<< "Yes" << endl;
| ^~~
| cos
a.cc:31:2: error: expected '}' at end of input
31 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ... |
s528779857 | p03971 | Java | n,a,b = map(int,input().split())
a_cnt,b_cnt,cnt = 0,0,0
s = input()
cnt = a+b
for i in range(n):
if s[i] == "a":
if a_cnt + b_cnt <= cnt:
#print(a_cnt + b_cnt)
print("Yes")
else:
print("No")
a_cnt +=1
elif s[i] == "b":
if a_cnt + b_cnt < cnt ... | Main.java:1: error: class, interface, enum, or record expected
n,a,b = map(int,input().split())
^
Main.java:9: error: illegal character: '#'
#print(a_cnt + b_cnt)
^
2 errors
|
s139452275 | p03971 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int inf = 1001001001;
int main(){
int n,a,b;
cin >> n >> a >> b;
string s;
int cnt_tot = 0;
int cnt_foreign = 0;
int m = s.size();
rep(i,n) {
if(s[i] == 'a'){
if(cnt_tot <... | a.cc: In function 'int main()':
a.cc:19:33: error: 'Yes' was not declared in this scope
19 | if(cnt_tot < a+b) cout << Yes << endl;
| ^~~
|
s913773094 | p03971 | C++ | n, a, b = list(map(int, input().split()))
s = input()
cnt = 0
oversea = 0
for each in s:
if each == 'a' and cnt < a + b:
print('Yes')
cnt += 1
continue
if each == 'b' and cnt < a + b and oversea < b:
print('Yes')
cnt += 1
oversea += 1
continue
else:
... | a.cc:9:15: warning: multi-character character constant [-Wmultichar]
9 | print('Yes')
| ^~~~~
a.cc:13:15: warning: multi-character character constant [-Wmultichar]
13 | print('Yes')
| ^~~~~
a.cc:18:15: warning: multi-character character constant [-Wmulticha... |
s555056125 | p03971 | C++ | #include<iostream>
using namespace std;
int main(){
int x=0,y=0;
int n; cin >> n;
int a,b; cin >> a >> b;
string s; cin >> s;
int n = (int)s.size();
for(int i = 0; i < n; ++i){
if(s[i] == 'a'){
if(x+y<a+b){
cout << "yes" << endl;
x++;
}
else cout << "No" << endl;
} ... | a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int n'
8 | int n = (int)s.size();
| ^
a.cc:5:7: note: 'int n' previously declared here
5 | int n; cin >> n;
| ^
|
s961104001 | p03971 | C++ | #include<iosteam>
using namespace std;
int main(){
int x=0,y=0;
int n; cin >> n;
int a,b; cin >> a >> b;
string s; cin >> s;
int n = (int)s.size();
for(int i = 0; i < n; ++i){
if(s[i] == 'a'){
if(x+y<a+b){
cout << "yes" << endl;
x++;
}
else cout << "No" << endl;
} e... | a.cc:1:9: fatal error: iosteam: No such file or directory
1 | #include<iosteam>
| ^~~~~~~~~
compilation terminated.
|
s095004518 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,a,b;
string s;
cin >> n >> a >> b >> s;
int s=0;
for ( int i=0; i<n; i++ ) {
if ( s[i]=='a' ) {
if ( s<a+b ) {
cout << "Yes" << '\n';
s++;
} else {
cout << "No" << '\n';
}
}
else if ( s[i]==... | a.cc: In function 'int main()':
a.cc:8:7: error: conflicting declaration 'int s'
8 | int s=0;
| ^
a.cc:6:10: note: previous declaration as 'std::string s'
6 | string s;
| ^
a.cc:11:13: error: no match for 'operator<' (operand types are 'std::string' {aka 'std::__cxx11::basic_strin... |
s414872982 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B, hito, kokugai;
string S;
cin >> N >> A >> B >> S;
hito =0; kokugai =0;
for(int i= 0; i<N; i++){
if(S.at(i)=="a" && hito < A+B){
cout << "Yes" << endl;
hito ++;
}
else if(S.at(i)=="b" && hito < A+B && kokugai <B... | a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(S.at(i)=="a" && hito < A+B){
| ~~~~~~~^~~~~
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | else if(S.at(i)=="b" && hi... |
s437386954 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B, hito, kokugai;
string S;
cin >> N >> A >> B >> S;
hito =0; kokugai =0;
for(int i= 0; i<N; i++){
if(S.at(i)=="a" && hito < A+B){
cout << "Yes" << endl;
hito ++;
}
else if(S.at(i)=="b" && hito < A+B && kokugai <B... | a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(S.at(i)=="a" && hito < A+B){
| ~~~~~~~^~~~~
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | else if(S.at(i)=="b" && hi... |
s216675513 | p03971 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B, hito, kokugai;
string S;
cin >> N >> A >> B >> S;
kokunai =0; kokugai =0;
for(int i= 0; i<N; i++){
if(S.at(i)=="a" && hito < A+B){
cout << "Yes" << endl;
hito ++;
}
else if(S.at(i)=="b" && hito < A+B && kokuga... | a.cc: In function 'int main()':
a.cc:9:3: error: 'kokunai' was not declared in this scope; did you mean 'kokugai'?
9 | kokunai =0; kokugai =0;
| ^~~~~~~
| kokugai
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if(S.at(i)=="a" && hito < A+B){
... |
s662653381 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000; // n の最大値
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-... | a.cc: In function 'int main()':
a.cc:34:24: error: expected '}' at end of input
34 | cout << "No" << endl;}}
| ^
a.cc:19:12: note: to match this '{'
19 | int main() {
| ^
|
s354651230 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
ll n,A,B;
string s;
cin>>n>>A>>B>>s;
ll iketaa=0, iketab=0;
rep(i,n){
if(iketaa+iketab>=A+B){
cout<<"No"<<endl;
}
else if(s[i]=='c'){
cout<<"No"... | a.cc: In function 'int main()':
a.cc:22:21: error: 'b' was not declared in this scope
22 | else if(s[i]==b&&iketab<=B){
| ^
|
s955473972 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int ok = 0;
int B_cnt = 1;
cin >> N >> A >> B;
cin >> data;
for (int i=0; i<N; i++) {
if (data[i] == 'c') {
cout << "No" << endl;
}
if (data[i] == 'a') {
if (ok < A+B) {
cout << "Ye... | a.cc:27:21: error: extended character is not valid in an identifier
27 | if ((ok < A+B) && (B_cnt <= B)) {
| ^
a.cc:27:25: error: extended character is not valid in an identifier
27 | if ((ok < A+B) && (B_cnt <= B)) {
| ^
a.cc: In function 'i... |
s133884727 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int ok = 0;
int B_cnt = 1;
cin >> N >> A >> B;
cin >> data;
for (int i=0; i<N; i++) {
if (data[i] == 'c') {
cout << "No" << endl;
}
if (data[i] == 'a') {
if (ok < A+B) {
cout << "Ye... | a.cc:27:16: error: extended character is not valid in an identifier
27 | if (ok<A+B && B_cnt<=B) {
| ^
a.cc:27:21: error: extended character is not valid in an identifier
27 | if (ok<A+B && B_cnt<=B) {
| ^
a.cc: In function 'int main()':
a.cc:27:16: e... |
s430923415 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int B_cnt = 0;
cin >> N >> A >> B;
cin >> data;
for (int i=0; i<N; i++) {
if (data[i] == 'c') {
cout << "No" <<endl;
}
if (data[i] == 'a') {
if (i <= A+B) {
cout << "Yes" <<endl;
... | a.cc: In function 'int main()':
a.cc:27:24: error: 'B_cnk' was not declared in this scope; did you mean 'B_cnt'?
27 | if ((i <= A+B)&&(B_cnk <= B)) {
| ^~~~~
| B_cnt
|
s180924694 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int B_cnt = 0;
cin >> N >> A >> B;
cin >> data;
for (int i=0; i<N; i++) {
if (data[i] == 'c') {
cout << "No" <<endl;
}
if (data[i] == 'a') {
if (i <= A+B) {
cout << "Yes" <<endl;
... | a.cc: In function 'int main()':
a.cc:26:7: error: 'B_cnk' was not declared in this scope; did you mean 'B_cnt'?
26 | B_cnk += 1;
| ^~~~~
| B_cnt
|
s148346312 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int B_cnt = 0;
cin >> N >> A >> B;
cin >> data;
for (int i=0; i<N; i++) {
if (data[i] == 'c') {
cout << "No" <<endl;
}
if (data[i] == 'a') {
if (i <= A+B) {
cout << "Yes" <<endl;
... | a.cc: In function 'int main()':
a.cc:25:7: error: 'B_cnk' was not declared in this scope; did you mean 'B_cnt'?
25 | B_cnk += 1;
| ^~~~~
| B_cnt
a.cc:34:2: error: expected '}' at end of input
34 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ... |
s830914306 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int B_cnt = 0;
cin >> N >> A >> B;
cin >> data;
for (int i=0; i<N; i++) {
if (data[i] == 'c') {
cout << 'No' <<endl;
}
if (data[i] == 'a') {
if (i <= A+B) {
cout << 'Yes' <<endl;
... | a.cc:13:15: warning: multi-character character constant [-Wmultichar]
13 | cout << 'No' <<endl;
| ^~~~
a.cc:18:17: warning: multi-character character constant [-Wmultichar]
18 | cout << 'Yes' <<endl;
| ^~~~~
a.cc:21:17: warning: multi-character character con... |
s914260013 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string data;
int N,A,B;
int B_cnt = 0
cin >> N >> A >> B;
cin >> data;
for (int i=0, i<N, i++) {
if (data[i] == 'c') {
cout << 'No' <<endl;
}
if (data[i] == 'a') {
if (i <= A+B) {
cout << 'Yes' <<endl;
... | a.cc:13:15: warning: multi-character character constant [-Wmultichar]
13 | cout << 'No' <<endl;
| ^~~~
a.cc:18:17: warning: multi-character character constant [-Wmultichar]
18 | cout << 'Yes' <<endl;
| ^~~~~
a.cc:21:17: warning: multi-character character con... |
s999082173 | p03971 | C | #include<stdio.h>
int main(){
char m[100005];
int n,s,t,d[100005];
int sum,count1=0,count2=0;
scanf("%d %d %d",&n,&s,&t);
scanf("%c",m);
sum=s+t;
for(int i=0;i<n;i++){
if(s[i]=='c')d[i]=0;
else if(s[i]=='a' && count1<sum+1){
d[i]=1;
count1+=1;
}
else if(s[i]=='b' && count1<sum+... | main.c: In function 'main':
main.c:10:9: error: subscripted value is neither array nor pointer nor vector
10 | if(s[i]=='c')d[i]=0;
| ^
main.c:11:14: error: subscripted value is neither array nor pointer nor vector
11 | else if(s[i]=='a' && count1<sum+1){
| ^
main.c:15:14:... |
s674816560 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, c) for(ll i = 0; i < (ll)c; i++)
#define ll long long
#define upd_max(maxer, updater) if (maxer < updater) maxer = updater;
#define upd_min(miner, updater) if (miner > updater) miner = updater;
const int inf = 1000000000; // 10^9
int main(){
string s[1100... | a.cc: In function 'int main()':
a.cc:13:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::string [110000]' {aka 'std::__cxx11::basic_string<char> [110000]'})
13 | cin >> n >> a >> b >> s;
| ~~~~~~~~~~~~~~~~~~ ^~... |
s764539130 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i=0; i<(int)(n); i++)
#define all(x) x.begin(), x.end()
#define mod 1000000007
typedef long long ll;
int main(){
int N, A, B;
cin >> N >> A >> B;
string str;
cin >> str;
int ac = 0;
int foreignRanking = 0;
rep(i, str.length()){
... | a.cc: In function 'int main()':
a.cc:30:6: error: expected '}' before 'else'
30 | }else{
| ^~~~
a.cc:23:28: note: to match this '{'
23 | }else if(str[i] == 'b'){
| ^
|
s782442452 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> gokaku;
int A,B,N;
string number;
int Bcount=1;
cin>>N>>A>>B;
cin>>number;
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A+B)){
gokaku.push... | a.cc: In function 'int main()':
a.cc:14:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
14 | if(number.at(i)=="a"){
| ~~~~~~~~~~~~^~~~~
a.cc:23:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
23 | if(number.at(i)=="b"){
|... |
s488807738 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> gokaku;
int A,B,N;
string numner;
int Bcount=1;
cin>>N>>A>>B;
cin>>number;
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A+B)){
gokaku.push... | a.cc: In function 'int main()':
a.cc:11:8: error: 'number' was not declared in this scope; did you mean 'numner'?
11 | cin>>number;
| ^~~~~~
| numner
|
s921591195 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>N>>A>>B;
vector<char> number(N);
cin>>number;
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A+B)){
... | a.cc: In function 'int main()':
a.cc:12:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
12 | cin>>number;
| ~~~^~~~~~~~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<char>}
In ... |
s109335241 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>N>>A>>B;
vector<string> number(N);
cin>>number;
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A+B)){
... | a.cc: In function 'int main()':
a.cc:12:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
12 | cin>>number;
| ~~~^~~~~~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >... |
s028842830 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> number(N);
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>N>>A>>B;
cin>>number;
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A+B)){
gok... | a.cc: In function 'int main()':
a.cc:5:25: error: 'N' was not declared in this scope
5 | vector<string> number(N);
| ^
a.cc:10:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
... |
s750476294 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> number;
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>N>>A>>B;
cin>>number;
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A+B)){
gokaku... | a.cc: In function 'int main()':
a.cc:10:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
10 | cin>>number;
| ~~~^~~~~~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >... |
s352801899 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> number;
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>N>>A>>B;
cin>>number;
number.push_back(X);
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.push_back("Yes");
}
if(i>(A... | a.cc: In function 'int main()':
a.cc:10:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
10 | cin>>number;
| ~~~^~~~~~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >... |
s654611418 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> number;
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>N>>A>>B;
for(int i=0;i<N;i++){
string X;
cin>>X;
number.push_back(X);
}
for(int i=0;i<N;i++){
if(number.at(i)=='a'){
if(i<=(A+B)){
gokaku... | a.cc:18:26: warning: multi-character character constant [-Wmultichar]
18 | gokaku.push_back('Yes');
| ^~~~~
a.cc:21:26: warning: multi-character character constant [-Wmultichar]
21 | gokaku.push_back('No');
| ^~~~
a.cc:28:28: warning: m... |
s348745233 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> number;
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>A>>B>>N;
for(int i=0;i<N;i++){
string X;
cin>>X;
number.push_back(X);
}
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku... | a.cc: In function 'int main()':
a.cc:43:12: error: expected ';' before '==' token
43 | for(int i==0;i<N;i++){
| ^~
| ;
a.cc:43:12: error: expected primary-expression before '==' token
43 | for(int i==0;i<N;i++){
| ^~
a.cc:43:19: error: expected ')' before ';'... |
s540923603 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> number;
vector<string> gokaku;
int A,B,N;
int Bcount=1;
cin>>A>B>>N;
for(int i=0;i<N;i++){
string X;
cin>>X;
number.push_back(X);
}
for(int i=0;i<N;i++){
if(number.at(i)=="a"){
if(i<=(A+B)){
gokaku.... | a.cc: In function 'int main()':
a.cc:9:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
9 | cin>>A>B>>N;
| ~~~~~~^~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type... |
s924076951 | p03971 | C++ | #include <stdio.h>
#include <iostream>
using namespace std;
using ll = long long;
int main(void) {
int N, A, B;
scanf("%d%d%d", &N, &A, &B);
string S;
cin >> S;
int passed = 0;
for (int i = 0; i < N; i++) {
char c = S.at(i);
if (c == 'a' && passed < A + B) {
passed++;
printf("Yes\n");
} else if (c ==... | a.cc: In function 'int main()':
a.cc:21:40: error: expected primary-expression before ')' token
21 | printf("No\n", );
| ^
|
s165786642 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,cnt=0,bnt=1;
string s,ans = "No";
cin n >> a >> b >>s;
vector<int>k;
for(int i = 0;i < n;i++){
asn = "false";
if(s[i] == 'a'){
if((a + b) > cnt){
cnt++;
ans = "Yes";
}
}
if(s[i] == 'b'){
if... | a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'n'
7 | cin n >> a >> b >>s;
| ^~
| ;
a.cc:10:5: error: 'asn' was not declared in this scope; did you mean 'ans'?
10 | asn = "false";
| ^~~
| ans
|
s391100952 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long n,a,b,pas=0; string s;
cin>>n>>a>>b;
cin>>s;
int foreign = 0;
for(long long i=0;i<s.length();i++)
{
if(s[i] == 'a'){
if(pas < a+b){
cout<<"Yes"<<endl;
pas++; }
else cout<<"No"<<endl;
}
else if(s[i] == 'b'){
... | a.cc: In function 'int main()':
a.cc:28:27: error: expected '}' at end of input
28 | else cout<<"No"<<endl;
| ^
a.cc:23:23: note: to match this '{'
23 | else if(s[i] == 'b'){
| ^
a.cc:28:27: error: expected '}' at end of input
28 | else cout... |
s995051134 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long n,a,b,pas=0; string s;
cin>>n>>a>>b;
cin>>s;
int foreign = 0;
for(long long i=0;i<s.length();i++)
{
if(s[i] == 'a'){
if(cnt < a+b){
cout<<"Yes"<<endl;
pas++; }
else cout<<"No"<<endl;
}
else if(s[i] == 'b'){
... | a.cc: In function 'int main()':
a.cc:18:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
18 | if(cnt < a+b){
| ^~~
| int
a.cc:25:8: error: 'cnt' was not declared in this scope; did you mean 'int'?
25 | if(cnt < a+b && foreign<=b){
| ^~~
... |
s413456011 | p03971 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int N, A, B;
string S;
cin >> N >> A >> B;
cin >> S;
int pass = 0;
int passb = 0;
for(int i = 0; i < S.length; i++) {
if(S[i] == 'c') cout << "No" << endl;
else {
if(S[i] == 'a' && pass < (A + B)) {
pass++;
... | a.cc: In function 'int main()':
a.cc:12:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s716240707 | p03971 | C | #include <stdio.h>
int main(){
int honsen,honsenf,A,B,N;
scanf("%d %d %d",&N,&A,&B);
honsen = A + B;
honsenf = B;
char c;
for(int o=0;i<N;i++){
getchar(c);
if(c=='a'){
if(honsen > 0){
printf("Yes\n");
honsen--;
}else{
printf("No\n");
}
}else if(c == 'b'){
if(honsen > 0){
if(hons... | main.c: In function 'main':
main.c:9:21: error: 'i' undeclared (first use in this function)
9 | for(int o=0;i<N;i++){
| ^
main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:17: error: too many arguments to function 'getchar... |
s525369632 | p03971 | C++ | #include <bits/stdc++.h>
#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, a, b;
string ... | a.cc:52:5: error: redefinition of 'int main()'
52 | int main() {
| ^~~~
a.cc:13:5: note: 'int main()' previously defined here
13 | int main() {
| ^~~~
|
s132689789 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
#define cinsc ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define FOR(i,k,n) for(int64 i=k;i<n;i++)
#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)... | a.cc: In function 'int main()':
a.cc:50:21: error: expected ';' before 'cin'
50 | cin>>n>>a>>b
| ^
| ;
51 | cin>>s;
| ~~~
|
s268104714 | p03971 | C++ | #include<stdio.h>
using namespace std;
int main()
{
int n,A,B;
cin >> n >> A >> B;
char a[n];
cin>>a;
int c1=0,c2=0;
for(int i=0;i<n;i++)
{
if(a[i]=='c')
{
cout<<"No"<<endl;
continue;
}
if(a[i]=='a')
{
if(c1< A+B)
{
c1++;
cout<<"Yes"<<endl;
... | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> n >> A >> B;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<stdio.h>
+++ |+#include <iostream>
2 | using nam... |
s955694091 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; int A; int B;
cin>>N>>A>>B;
string S;
cin>>S;
int X=0; int C=0; //XはBのかず CはA+Bのかず
for(int i=0; i<N; i++;){
if(S.at(i)=='c')
cout<<"No"<<endl;
else if(S.at(i)=='a'){
C++;
if(C<=A+B)
cout<<"Yes"<<endl;
else cout<<"No"<<endl;
... | a.cc: In function 'int main()':
a.cc:10:24: error: expected ')' before ';' token
10 | for(int i=0; i<N; i++;){
| ~ ^
| )
a.cc:10:25: error: expected primary-expression before ')' token
10 | for(int i=0; i<N; i++;){
| ^
|
s743738471 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; int A; int B;
cin>>N>>A>>B;
string S;
cin>>S;
int X=0;
for(int i=0; i<N; i++;){
if(S.at(i)=='c')
cout<<"No"<<endl;
else if(S.at(i)=='a'){
if(i<=A+B)
cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
else{
X++;
if(i<=... | a.cc: In function 'int main()':
a.cc:10:24: error: expected ')' before ';' token
10 | for(int i=0; i<N; i++;){
| ~ ^
| )
a.cc:10:25: error: expected primary-expression before ')' token
10 | for(int i=0; i<N; i++;){
| ^
|
s595655525 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; int A; int B;
cin>>N>>A>>B;
string S(N);
cin>>S;
int X=0;
for(int i=0; i<N; i++;){
if(S.at(i)=='c')
cout<<"No"<<endl;
else if(S.at(i)=='a'){
if(i<=A+B)
cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
else{
X++;
if(... | a.cc: In function 'int main()':
a.cc:7:13: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
7 | string S(N);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/incl... |
s675230116 | p03971 | C++ | #include <bits/stdc++.h>
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int n, a, b;
string s;
cin >> n >> a >> b;
cin >> s;
int total = a + b;
int count = 0;
int foreign_count = 0;
rep (i, n) {
string state = s[i];... | a.cc:21:25: warning: multi-character character constant [-Wmultichar]
21 | cout << 'Yes' << endl;
| ^~~~~
a.cc:23:25: warning: multi-character character constant [-Wmultichar]
23 | cout << 'No' << endl;
| ^~~~
a.cc:28:25: ... |
s715284543 | p03971 | C | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, A, B;
cin >> n >> A >> B;
string x;
cin >> x;
int suma=0, sumb=0, sumab=0;
for(int i=0; i<n; i++){
if(x.at(i)=='c') {
cout << "No" << endl;
}
if(x.at(i)=='a'){
if(sumab<A+B){
suma++... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s737375062 | p03971 | C++ | #include<iostream>
#include<string>
using namespaces std;
int main()
{
int n, a, b;
string s;
cin >> n >> a >> b >> s;
int cnta = 0, cntb = 0;
for(int i = 0; i < n; i ++){
if(s[i] == 'a' && cnta < a + b){
cout << "Yes\n";
cnta ++;
}
else if(s[i] == 'b'... | a.cc:4:7: error: expected nested-name-specifier before 'namespaces'
4 | using namespaces std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'string' was not declared in this scope
9 | string s;
| ^~~~~~
a.cc:9:9: note: suggested alternatives:
In file included fr... |
s768851412 | p03971 | C++ | #include <iostream>
#include <string>
#include <limits.h>
#include <numeric>
#include <math.h>
#include <bits/stdc++.h>
#define rep(i,c) for (int i=0;i<c;i++)
using namespace std;
int main(){
cout <"a" <endl;
} | a.cc: In function 'int main()':
a.cc:10:6: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
10 | cout <"a" <endl;
| ~~~~ ^~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
In file included... |
s417588718 | p03971 | C++ | #include <iostream>
#include <string>
#include <limits.h>
#include <numeric>
#include <math.h>
#include <bits/stdc++.h>
#define rep(i,c) for (int i=0;i<c;i++)
using namespace std;
cout <<"a" <<endl; | a.cc:9:1: error: 'cout' does not name a type
9 | cout <<"a" <<endl;
| ^~~~
|
s524450151 | p03971 | C++ | #include <iostream>
#include <string>
#include <limits.h>
#include <numeric>
#include <math.h>
#include <bits/stdc++.h>
#define rep(i,c) for (int i=0;i<c;i++)
using namespace std;
cout <"a" <endl; | a.cc:9:1: error: 'cout' does not name a type
9 | cout <"a" <endl;
| ^~~~
|
s416347722 | p03971 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int overseaStudent = 1;
String s = sc.next();
int... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s217252151 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,A,B;
cin >> N >> A >> B;
string S;
cin >> S;
vector<int> vec(N);
int total = 0;
int abroad = 0;
for(int i=0;i<N;i++){
char s = S[i];
if(s=='a'){
if(total<A+B){vec[i] = 1; total+=1;}
e... | a.cc: In function 'int main()':
a.cc:25:6: error: 'd' was not declared in this scope
25 | }d
| ^
|
s866779684 | p03971 | C | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;
int main(){
int n,a,b;
cin >> n >> a >> b;
string s;
cin >> s;
int j = 0,r = 0;
rep(i,n){
if(s[i] == 'a'){
if(a+b > r){
... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s462252499 | p03971 | C++ |
int main(){
int N,A,B;
string S;
cin>>N>>A>>B;
cin>>S;
int n=(A+B);
int b=1;
int p=0;
for(int i=1; i<=N;i++){
if(S.at(i-1)=='a'){
if(p<n){cout<<"Yes"<<endl; p++;}
else{cout<<"No"<<endl;}
}
if(S.at(i-1)=='b'){
if(p<n && b<=B){cout<<"Yes"<<endl; b++; p++;}
else{cout<<"... | a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
4 | string S;
| ^~~~~~
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin>>N>>A>>B;
| ^~~
a.cc:6:8: error: 'S' was not declared in this scope
6 | cin>>S;
| ^
a.cc:12:15: err... |
s944614821 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios_base::sync_with_stdio(false);
int n,a,b;
cin>>n>>a>>b;
string s;
cin>>s;
int c=0;
int d=0;
int e=0;
for(int i=0;i<n;i++){
if(s[i]=='a' && e<a+b;){
cout<<"Yes"<<"\n";
e++;
}else if(s[i]=='b' && d+1<=b && e<... | a.cc: In function 'int main()':
a.cc:16:27: error: expected primary-expression before ')' token
16 | if(s[i]=='a' && e<a+b;){
| ^
|
s986328374 | p03971 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int n,a,b,con=0,count=0;
cin>>n>>a>>b;
vector<char> mozi[n];
scanf("%s",mozi);
int i,j;
for(i=0;i<n;i++){
if(mozi[i]=='a'&&a+b>count){
cout<<"Yes"<<endl;
count++;
}
else if(a[i]=='b'&&con<b&&count<a+b){
cou... | a.cc: In function 'int main()':
a.cc:11:15: error: no match for 'operator==' (operand types are 'std::vector<char>' and 'char')
11 | if(mozi[i]=='a'&&a+b>count){
| ~~~~~~~^~~~~
| | |
| | char
| std::vector<char>
In file included from /usr/in... |
s607310348 | p03971 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int n,a,b,con=0,count=0;
cin>>n>>a>>b;
vector<char> mozi[n];
cin>>mozi;
int i,j;
for(i=0;i<n;i++){
if(mozi[i]=='a'&&a+b>count){
cout<<"Yes"<<endl;
count++;
}
else if(a[i]=='b'&&con<b&&count<a+b){
cout<<"Yes... | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char> [n]')
8 | cin>>mozi;
| ~~~^~~~~~
| | |
| | std::vector<char> [n]
| std::istream {aka std::basic_istream<char>}
... |
s206532686 | p03971 | C++ | #include<iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int n, a, b;
cin >> n >> a >> b;
int domestic = 0;
int foreigner = 0;
int max = a + b;
string s;
cin >> s;
for (int i = 0; i < n; i ++)
{
if (s.at(i) == 'a')
{
if (domestic + foreigner < max)
{... | a.cc: In function 'int main()':
a.cc:15:3: error: 'string' was not declared in this scope
15 | string s;
| ^~~~~~
a.cc:15:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream... |
s241684066 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long; // ll は long long と同じとする。(int64_t)
int main(){
int N , A , B;
cin >> N >> A >> B;
int sum = A + B;{
char C;
cin >> C;
cout << (c == 'a' && AB-- > 0 || c == 'b' && b-- > 0 && ab-- > 0 ? "Yes" : "No") << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:18: error: 'c' was not declared in this scope
10 | cout << (c == 'a' && AB-- > 0 || c == 'b' && b-- > 0 && ab-- > 0 ? "Yes" : "No") << endl;
| ^
a.cc:10:30: error: 'AB' was not declared in this scope; did you mean 'B'?
10 | cout << (c ... |
s631699573 | p03971 | C++ | int main() {
int N, A, B;
string S;
cin >> N >> A >> B >> S;
int cnt = 0;
int acnt = 0;
for (char c : S) {
if (c == 'a') {
if (cnt < A + B) {
cout << "Yes" << endl;
cnt ++;
}
else {
cout << "No" << endl;
}
}
if (c == 'b') {
acnt++;
if (... | a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
3 | string S;
| ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin >> N >> A >> B >> S;
| ^~~
a.cc:4:25: error: 'S' was not declared in this scope
4 | cin >> N >> A >> B >> S;
... |
s107991744 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,A,B;
int sum=0;
int pon=0;
cin>>N>>A>>B;
string k;
vector<int> vec;
for(int i=0;i<N;i++){
if(k.at(i)==a&&sum<A+B)
{cout<<"Yes"<<endl;
sum++;
}
if(k.at(i)==b&&sum<A+B&&pon<=B){
cout<<"Yes"<<endl;
sum++;
pon++;
}
... | a.cc: In function 'int main()':
a.cc:11:15: error: 'a' was not declared in this scope
11 | if(k.at(i)==a&&sum<A+B)
| ^
a.cc:15:17: error: 'b' was not declared in this scope
15 | if(k.at(i)==b&&sum<A+B&&pon<=B){
| ^
|
s289654869 | p03971 | C++ | import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math
n,a,b = map(int,input().split())
s = input()
cnt = 0
cnt_b = 0
for i in range(len(s)):
if s[i] == "c":
print("No")
elif s[... | a.cc:1:1: error: 'import' does not name a type
1 | import collections
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s907924352 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int n, a, b;
cin>>n>>a>>b;
string s;
cin>>s;
int passed = 0;
int passed_oversea = 0;
for (int i=0; i<n; i++){
if (s[i]=='a' and passed < a+... | a.cc:32:5: error: redefinition of 'int main()'
32 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
|
s846448053 | p03971 | C | #include <stdio.h>
int main()
{
int n,a,b;
scanf("%d%d%d",&n,&a,&b);
char s[n + 1];
scanf("%s",&s);
int i = 0;
int countera = 0;
int counterb = 0;
while (s[i])
{
if ((s[i] == 'a' && countera <= a+b))
{
printf("Yes\n");
countera++;
}
else if (s[i] == 'b' && counter <= a+b &&... | main.c: In function 'main':
main.c:18:29: error: 'counter' undeclared (first use in this function); did you mean 'counterb'?
18 | else if (s[i] == 'b' && counter <= a+b && counter <= b)
| ^~~~~~~
| counterb
main.c:18:29: note: each undeclared id... |
s205331265 | p03971 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#define pb push_b... | a.cc: In function 'int main()':
a.cc:495:17: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
495 | cout<<"No"<endl;
| ~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_... |
s203794847 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,A,B;
string str = "S";
cin >> N >> A >> B >> S;
int P = 0;
int O = 0;
for(int H = 0;H < N;H++){
if(str.at(H) == 'a' && A + B > P){
cout << "Yes" << endl;
P++;
}
else{
cout << "No" << endl;
}
if(str... | a.cc: In function 'int main()':
a.cc:7:27: error: 'S' was not declared in this scope
7 | cin >> N >> A >> B >> S;
| ^
|
s352744307 | p03971 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,A,B;
string str = S;
cin >> N >> A >> B >> S;
int P = 0;
int O = 0;
for(int H = 0;H < N;H++){
if(str.at(H) == 'a' && A + B > P){
cout << "Yes" << endl;
P++;
}
else{
cout << "No" << endl;
}
if(str.a... | a.cc: In function 'int main()':
a.cc:6:16: error: 'S' was not declared in this scope
6 | string str = S;
| ^
|
s703476761 | p03971 | C++ | def solve():
n,a,b = map(int,input().split())
s = input()
cnt_a=0
cnt_b=0
for i in s:
if i=='a':
if cnt_a<a+b:
print('Yes')
cnt_a+=1
else:
print('No')
elif i=='b':
if cnt_a<a+b and cnt_b<b:
... | a.cc:9:23: warning: multi-character character constant [-Wmultichar]
9 | print('Yes')
| ^~~~~
a.cc:12:23: warning: multi-character character constant [-Wmultichar]
12 | print('No')
| ^~~~
a.cc:15:23: warning: multi-character ... |
s035838456 | p03971 | C++ | N, A , B = map(int,input().split())
S = input()
count_b = 0
count_total = 0
ans = ["No"] * N
for i in range(N):
if count_total >= A+B:
break
if S[i] == "c":
continue
if S[i] == "a":
count_total += 1
ans[i] = "Yes"
if S[i] == "b":
count_b += 1
if count_b... | a.cc:1:1: error: 'N' does not name a type
1 | N, A , B = map(int,input().split())
| ^
|
s233112598 | p03971 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main(){
int N;
int A,B;
cin>>N>>A>>B;
string S;
cin>>S;
int sum = A+B;
int cnt =0;
int cntf =0;
for (size_t i = 0; i < N; i++)//A
{
if (S[i]=="a" && cnt... | a.cc: In function 'int main()':
a.cc:17:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | if (S[i]=="a" && cnt<sum)
a.cc:21:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | }else if (S[i]=="b"&&cntf<B&&cnt<sum)//B
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.