submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s568736622
p03957
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int a=0; int b=0; for(int i=0;i<str.size(s);i++){ if(s[i]=='C')a=1; if(a==1&&s[i]=='F')b=1; } if(b==1)cout<<"Yes"<<endl; else cout<<"No"<<endl; }
a.cc: In function 'int main()': a.cc:9:17: error: 'str' was not declared in this scope; did you mean 'std'? 9 | for(int i=0;i<str.size(s);i++){ | ^~~ | std
s235692440
p03957
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; string s; int l; int mian() { cin>>s; l=s.size(); for(register int i=0;i<l;i++) { if(s[i]=='C') { for(register int j=i+1;j<l;j++) { if(s[j]=='F') { ...
a.cc: In function 'int mian()': a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 11 | for(register int i=0;i<l;i++) | ^ a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | for(reg...
s315271504
p03957
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; string s; int l; int mian() { cin>>s; l=s.size(); for(register int i=0;i<l;i++) { if(s[i]=='C') { for(register int j=i+1;j<l;j++) { if(s[j]=='F') { ...
a.cc: In function 'int mian()': a.cc:13:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 13 | for(register int i=0;i<l;i++) | ^ a.cc:17:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 17 | for(reg...
s834116989
p03957
C++
#include <iostream> #include <string> using namespace std; int main() { int c; int cflag=0; int fflag=0; string s; cin>>s; c=s.size(); for(int i=0;i<c;i++) { if(s[i]=='C') { cflag=1; for(int j=i+1;j<c;j++) { if(s[j]=='F') { cout<<"Yes"; return 0; } } } } cout<<"No"; cout<<endl; return 0;
a.cc:1:21: warning: extra tokens at end of #include directive 1 | #include <iostream> #include <string> using namespace std; int main() { int c; int cflag=0; int fflag=0; string s; cin>>s; c=s.size(); for(int i=0;i<c;i++) { if(s[i]=='C') { cflag=1; for(int j=i+1;j<c;j++) { if(s[j]=='F') { cout<<"Yes"; return 0; } }...
s781571705
p03957
C++
#include<bits/stdc++.h> using namespace std; int main() { string s,c=0,f=0; cin>>s; for(int i=0;i<s.size();i++) { if(c==1&&f==1) { cout<<"Yes"; exit(0); } if(s[i]=='C') { c=1; continue; } if(s[i]=='F'...
a.cc: In function 'int main()': a.cc:9:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 9 | if(c==1&&f==1) | ~^~~ | | | | | int | std::string {aka std::__cxx11::basi...
s347733376
p03957
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; string s; int l; int mian() { cin>>s; l=s.size(); for(register int i=0;i<l;i++) { if(s[i]=='C') { for(register int j=i+1;j<l;j++) { if(s[j]=='F') { ...
a.cc: In function 'int mian()': a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 11 | for(register int i=0;i<l;i++) | ^ a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | for(reg...
s944259159
p03957
C++
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> using namespace std; string a; int main(){ cin>>a; len=a.size; for(int i=0;i<len;i++){ if(a[i]=="C"){ for(int j=i+1;j<l;j++){ if(a[j]="F") cout<<"Yes"; return 0; } } } cout<<"No"; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'len' was not declared in this scope 10 | len=a.size; | ^~~ a.cc:12:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(a[i]=="C"){ a.cc:13:41: error: 'l' was not declared in this scope ...
s248273354
p03957
C++
#include <bits/stdc++.h> using namespace std; string s; int l; int mian() { cin>>s; l=s.size(); for(register int i=0;i<l;i++) { if(s[i]=='C') { for(register int j=i+1;j<l;j++) { if(s[j]=='F') { cout<<"Yes"; ...
a.cc: In function 'int mian()': a.cc:9:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 9 | for(register int i=0;i<l;i++) | ^ a.cc:13:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 13 | for(regi...
s970119335
p03957
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,n,sum,ans; cin>>a>>b; for(int i=1;i<=n;i++) for(int i=1;i<=100;i++) if(i<=n) cout<<"Yes"; ans++; else cout<<"No"; cout<<ans; sum++; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'else' without a previous 'if' 12 | else | ^~~~
s543931598
p03957
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,n,sum; cin>>a>>b; for(int i=1;i<=n;i++) for(int i=1;i<=n-1;i++) if(i<=n) cout<<"Yes"; sum++; else cout<<"No"; sum++; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'else' without a previous 'if' 12 | else | ^~~~
s440693565
p03957
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,n,sum; cin>>a>>b; for(int i=1;i<=n;i++) for(int i=1;i<=100;i++) if(i<=n) cout<<"Yes"; sum++; else cout<<"No"; sum++; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'else' without a previous 'if' 12 | else | ^~~~
s282173966
p03957
C++
s = input() idx1 = s.find('C'); if idx1 >= 0 : idx2 = s.find('F'); if idx2 > idx1 : print("Yes"); else: print("No"); else: print("No");
a.cc:1:1: error: 's' does not name a type 1 | s = input() | ^ a.cc:4:1: error: expected unqualified-id before 'if' 4 | if idx1 >= 0 : | ^~ a.cc:6:5: error: expected unqualified-id before 'if' 6 | if idx2 > idx1 : | ^~ a.cc:8:5: error: expected unqualified-id before 'else' 8 | ...
s275362417
p03957
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vs = vector<string>; using msi = map<string, int>; using mii = map<int, int>; using psi = pair<string, int>; using pii = pair<int, int>; using vlai = valarray<int>; #define rep(i,n) for(int i=0;i<n;...
a.cc:41:47: error: macro "rep" passed 3 arguments, but takes just 2 41 | rep(j, i + 1, s.size()) { | ^ a.cc:12:9: note: macro "rep" defined here 12 | #define rep(i,n) for(int i=0;i<n;i++) | ^~~ a.cc: In function 'int main()'...
s278860758
p03957
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vs = vector<string>; using msi = map<string, int>; using mii = map<int, int>; using psi = pair<string, int>; using pii = pair<int, int>; using vlai = valarray<int>; #define rep(i,n) for(int i=0;i<n;...
a.cc:41:47: error: macro "rep" passed 3 arguments, but takes just 2 41 | rep(j, i + 1, s.size()) { | ^ a.cc:12:9: note: macro "rep" defined here 12 | #define rep(i,n) for(int i=0;i<n;i++) | ^~~ a.cc: In function 'int main()'...
s277010856
p03957
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> long long s1; string s; using namespace std; int main() { cin >> s; s1 = strlen(s); for (int i = 0; i < s1; i++) { if (s[i] == 'C') { for (int j = i + 1; j < s1; j++) if (s[j] == 'F') cout << "Yes" << endl; return 0;...
a.cc:7:1: error: 'string' does not name a type; did you mean 'stdin'? 7 | string s; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:11:16: error: 's' was not declared in this scope; did you mean 's1'? 11 | cin >> s; | ^ | s1
s992871232
p03957
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> using namespace std; int main() { string a; cin>>a; int n=0; int la=strlen(a); for(int i=0;i<la;i++) { if(a[i]=='C') n=1; if(a[i]=='F'&&n==1) { ...
a.cc: In function 'int main()': a.cc:13:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 13 | int la=strlen(a); | ^ | | | std::string {aka std::__cxx11::basic_string<char>} In file included fr...
s883501357
p03957
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> using namespace std; int main() { string a; cin>>a; int n=0; for(int i=0;i<strlen(a);i++) { if(a[i]=='C') n=1; if(a[i]=='F'&&n==1) { cout<<"Ye...
a.cc: In function 'int main()': a.cc:13:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 13 | for(int i=0;i<strlen(a);i++) | ^ | | | std::string {aka std::__cxx11::basic_s...
s326495880
p03957
C++
#include<iostream> #include<cstdio> using namespace std; string a[201]; int main() { while(a[i]=='EOF') cin>>a[i]; for (int i=1;i<=strlen(a);i++) if (a[i]=="C"||a[i]="F") printf("YES"); printf("NO"); return 0; }
a.cc:7:17: warning: multi-character character constant [-Wmultichar] 7 | while(a[i]=='EOF') | ^~~~~ a.cc: In function 'int main()': a.cc:7:13: error: 'i' was not declared in this scope 7 | while(a[i]=='EOF') | ^ a.cc:9:21: error: 'strlen' was not declared in this ...
s152223130
p03957
C++
#include<bits/stdc++.h> using namespace std; int main(){ string ch; register int ss,i,j; cin>>ch; ss=ch.length(); for(i=0;i<ss;i++){ if(ch[i]=='C'){ for(j=i+1;j<ss;j++){ if(ch[j]=='F'){ cout<<"YES"; return 0; } } } } cout<<"NO"; return 0; } return 0; }
a.cc: In function 'int main()': a.cc:5:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 5 | register int ss,i,j; | ^~ a.cc:5:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 5 | register int ss,i...
s368011232
p03957
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; string s; int l; int mian() { cin>>s; l=s.size(); for(register int i=0;i<l;i++) { if(s[i]=='C') { for(register int j=i+1;j<l;j++) { if(s[j]=='F') { ...
a.cc: In function 'int mian()': a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 11 | for(register int i=0;i<l;i++) | ^ a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | for(reg...
s129361061
p03957
C++
#include<bits/stdc++.h> using namespace std; string str; bool k,y; int main() { cin>>str; for(int i=0;i<str.size()-1;i++) { if(str[i]=="C")k=true; if(str[i]=="F"&&k==true) { y=true; break; } } if(y==true)cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(str[i]=="C")k=true; a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(str[i]=="F"&&k==true)
s163439865
p03957
C++
#include<bits/stdc++.h> using namespace std; int n; bool c,f; string s; int main() { cin>>s; for(i=0;i<n;i++) if(s[i]=='C') { c=false; for(j=i;j<n;j++) if(s[i]=='F') { cout<<"Yes"<<endl; return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'i' was not declared in this scope 9 | for(i=0;i<n;i++) | ^ a.cc:13:13: error: 'j' was not declared in this scope 13 | for(j=i;j<n;j++) | ^
s202901428
p03957
C++
#include<cstdio> #include<cstring> using namespace std; string s; int l,i,j; int main() { scanf("%s",s); l=strlen(s); for(i=0;i<l;i++) if(s[i]=='C') for(j=i+1;j<l;j++) if(s[j]=='F') return puts("Yes")&0; puts("No"); printf("\n"); return 0; }
a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'? 4 | string s; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:8:16: error: 's' was not declared in this scope 8 | scanf("%s",s); | ^
s699565885
p03957
C++
#include<bits/stdc++.h> using namespace std; string a; char t; int aa,b; bool p; int main() { t=="l"; cin>>a; aa=a.size(); for(int i=0;i<aa;i++) { if(a[i]=='C' && b!=0) { b++; t='C'; } if(a[i]=='F' && t=='C') { cout<<"Yes"; ...
a.cc: In function 'int main()': a.cc:9:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | t=="l"; | ~^~~~~
s133280255
p03957
C++
#include<bits/stdc++.h> using namespace std int main(){ string s; cin >> s; bool a=true; for(int i=0;i<s.size();i++){ if(s[i]=='C'){ a=false; }else if(s[i]=='F'&&a==false){ cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
a.cc:2:20: error: expected ';' before 'int' 2 | using namespace std | ^ | ; 3 | int main(){ | ~~~
s287529377
p03957
C++
include<cstdio> #include<cstring> char a[10010]; bool c,f; int main() { scanf("%s",a); for(int i=0; i<strlen(a); i++) { if(a[i]=='C') c=true; if(a[i]=='F'&&c==true) f=true; } if(f==true) printf("Yes\n"); else printf("No\n"); r...
a.cc:1:1: error: 'include' does not name a type 1 | include<cstdio> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'scanf' was not declared in this scope 7 | scanf("%s",a); | ^~~~~ a.cc:16:9: error: 'printf' was not declared in this scope 16 | printf("Yes\n"); | ...
s989026354
p03957
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; string s; int l; int mian() { string s; int l; cin>>s; l=s.size(); for(int i=0;i<l;i++) { if(s[i]=='C') { for(int j=i+1;j<l;j++) { if(s[j]=='F') { ...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s048332264
p03957
C
#include <stdio.h> #include <math.h> #include <string.h> int main(){ char strk[1000001]; bool bz=false; scanf("%s",strk); for(int i=0;i<=strlen(strk)-1;i++){ if(strk[i]=='C')bz=true; if(strk[i]=='F'&&bz==true){ printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
main.c: In function 'main': main.c:6:9: error: unknown type name 'bool' 6 | bool bz=false; | ^~~~ main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 3 | #include <string.h> +++ |+#include <stdbool.h> 4 | int main(){ ...
s680169144
p03957
C++
#include<iostream> #include<cstdio> using namespace std; int main() { char str[1010],s=0; cin>>str; for(int i=0;i<strlen(str);i++) { if(s==0) { if(str[i]=='C') s++; } if(s==1) { if(str[i]=='F') s++; } } if(s==2) cout...
a.cc: In function 'int main()': a.cc:8:19: error: 'strlen' was not declared in this scope 8 | for(int i=0;i<strlen(str);i++) | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#inclu...
s906204708
p03957
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; string s; int l; int mian() { cin>>s; l=s.size(); for(register int i=0;i<l;i++) { if(s[i]=='C') { for(register int j=i+1;j<l;j++) { if(s[j]=='F') { ...
a.cc: In function 'int mian()': a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 11 | for(register int i=0;i<l;i++) | ^ a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | for(reg...
s881945652
p03957
C++
#include<cstdio> #include<iostream> using namespace std; int i; char cf[3C]="CF",a[105]; int main(){ scanf("%s",a); for(int j=0;a[j];j++){ if(a[j]==cf[i])i++; if(i==2){ puts("Yes"); return 0; } } puts("No"); return 0; }
a.cc:5:9: error: unable to find numeric literal operator 'operator""C' 5 | char cf[3C]="CF",a[105]; | ^~ a.cc: In function 'int main()': a.cc:9:26: error: 'cf' was not declared in this scope 9 | if(a[j]==cf[i])i++; | ^~
s678922484
p03957
C++
#include<iostream>#include<string>using namespace std;int traveral(string);int main(){ string s; cin>>s; if(traveral(s)) cout<<"Yes"; else cout<<"No"; return 0;}int traveral(string s){ int i,j; for(i = 0;i < s.length();i++) { if(s[i] == 'C') { for(j = i+1 ;j <...
a.cc:1:19: warning: extra tokens at end of #include directive 1 | #include<iostream>#include<string>using namespace std;int traveral(string);int main(){ string s; cin>>s; if(traveral(s)) cout<<"Yes"; else cout<<"No"; return 0;}int traveral(string s){ int i,j; for(i = 0;i < s.length()...
s225596587
p03957
C++
#include <iostream> #include <cstring> #include <cstdlib> #include <cmath> #include <algorithm> #include <functional> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <bitset> #include <cassert> #include <exception> using namespace std; int main(){ cin.tie(0); ios::sy...
a.cc:34:5: error: expected unqualified-id before 'if' 34 | if ( a && b){ | ^~ a.cc:37:5: error: expected unqualified-id before 'else' 37 | else { | ^~~~ a.cc:40:5: error: expected unqualified-id before 'return' 40 | return 0; | ^~~~~~ a.cc:41:1: error: expected declara...
s523063052
p03957
C++
#include<bits/stdc++.h> main(){std::string s;fgets(&s,100,stdin);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;fgets(&s,100,stdin);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:28: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'c...
s368344026
p03957
C++
#include<bits/stdc++.h> main(){std::string s;gets_s(&s[0],100);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;gets_s(&s[0],100);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:22: error: 'gets_s' was not declared in this scope; did you mean 'getsid'? 2 | main(){...
s210865909
p03957
C++
#include<bits/stdc++.h> main(){std::string s(gets(&s));puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s(gets(&s));puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:22: error: 'gets' was not declared in this scope; did you mean 'getw'? 2 | main(){std::string ...
s781886279
p03957
C++
#include<bits/stdc++.h> main(){std::string s;gets(&s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;gets(&s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:22: error: 'gets' was not declared in this scope; did you mean 'getw'? 2 | main(){std::string s...
s335454226
p03957
C++
#include<bits/stdc++.h> main(){std::string s;fgets(&s[0],100,std::cin);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;fgets(&s[0],100,std::cin);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:43: error: cannot convert 'std::istream' {aka 'std::basic_istream<char>'} to 'FILE...
s174041113
p03957
C++
#include<bits/stdc++.h> main(){std::string s;fgets(&s[0],100);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;fgets(&s[0],100);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:27: error: too few arguments to function 'char* fgets(char*, int, FILE*)' 2 | main(){st...
s402757224
p03957
C++
#include<bits/stdc++.h> main(){std::string s;fgets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;fgets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:28: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char*' 2 |...
s471997286
p03957
C++
#include<bits/stdc++.h> main(){std::string s;gets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;gets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:22: error: 'gets' was not declared in this scope; did you mean 'getw'? 2 | main(){std::string s;...
s501226850
p03957
C++
#include<bits/stdc++.h> main(){std::string s;gets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;gets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:22: error: 'gets' was not declared in this scope; did you mean 'getw'? 2 | main(){std::string s;...
s577345886
p03957
C++
#include<bits/stdc++.h> main(s){std::getline(std::cin,s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(s){std::getline(std::cin,s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^
s616175924
p03957
C++
#include<bits/stdc++.h> main(){std::getline(std::cin,s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::getline(std::cin,s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:30: error: 's' was not declared in this scope 2 | main(){std::getline(std::cin,s);puts(s.find...
s131075344
p03957
C++
#include<bits/stdc++.h> main(){std::string s=std::cin.get();puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s=std::cin.get();puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:34: error: conversion from 'std::basic_istream<char>::int_type' {aka 'int'} to non-scalar typ...
s495800575
p03957
C++
#include<string> main(){char c[];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){char c[];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:13: error: storage size of 'c' isn't known 2 | main(){char c[];scanf("%s",c);s...
s003328939
p03957
C++
#include<string> main(i,c)char*c;{std::string s;for(;~scanf("%s",c);)s+=c;puts(s.find(70,s.find(67))>0?"Yes":"No");}
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(i,c)char*c;{std::string s;for(;~scanf("%s",c);)s+=c;puts(s.find(70,s.find(67))>0?"Yes":"No");} | ^ a.cc:2:17: error: expected unqualified-id before '{' token 2 | main(i,c)char*c;{std::string s;for(;~scanf("...
s604810844
p03957
C++
#include<string> main(c)char*c;{std::string s;for(;~scanf("%s",c);)s+=c;puts(s.find(70,s.find(67))>0?"Yes":"No");}
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(c)char*c;{std::string s;for(;~scanf("%s",c);)s+=c;puts(s.find(70,s.find(67))>0?"Yes":"No");} | ^ a.cc:2:15: error: expected unqualified-id before '{' token 2 | main(c)char*c;{std::string s;for(;~scanf("%s",...
s434953743
p03957
C++
main(){char c[100];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){char c[100];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:1:20: error: 'scanf' was not declared in this scope 1 | main(){char c[100];sc...
s311354267
p03957
C++
#include<string> main(){char c[100];scanf("%s",c)std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){char c[100];scanf("%s",c)std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ a.cc: In function 'int main()': a.cc:2:33: error: expected ';' before 'std' 2 | main(){char c[100];scanf("%s",c)std...
s695070804
p03957
C++
#include<string> using namespace std;main()char c[100],scanf("%s",&c);string s(c),printf("%s\n",s.find('F',s.find('C'))!=-1?"Yes":"No");
a.cc:2:27: error: expected constructor, destructor, or type conversion before 'char' 2 | using namespace std;main()char c[100],scanf("%s",&c);string s(c),printf("%s\n",s.find('F',s.find('C'))!=-1?"Yes":"No"); | ^~~~ a.cc:2:63: error: 'c' was not declared in this scope 2 | using n...
s575764655
p03957
C++
#include<bits/stdc++.h> main(){std::string s;std::cin>>s;std::cout<<(s.find('F',s.find('C'))!=-1?"Yes":"No")<<endl;}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){std::string s;std::cin>>s;std::cout<<(s.find('F',s.find('C'))!=-1?"Yes":"No")<<endl;} | ^~~~ a.cc: In function 'int main()': a.cc:2:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 2...
s489953235
p03957
C++
#include <bits/stdc++.h> main(){std::string s;std::cin>>s;printf("%s\n",s.find('F',s.find('C'))!=-1?"Yes":"No");}
a.cc:1:26: warning: extra tokens at end of #include directive 1 | #include <bits/stdc++.h> main(){std::string s;std::cin>>s;printf("%s\n",s.find('F',s.find('C'))!=-1?"Yes":"No");} | ^~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_sta...
s864256801
p03957
C++
#include <string> using namespace std;main(){string s;scanf("%s", s);int f=s.rfind('F'),c=s.find('C');printf("%s\n",c>=0&&f>c?"Yes":"No");}
a.cc:1:19: warning: extra tokens at end of #include directive 1 | #include <string> using namespace std;main(){string s;scanf("%s", s);int f=s.rfind('F'),c=s.find('C');printf("%s\n",c>=0&&f>c?"Yes":"No");} | ^~~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1....
s568604931
p03957
C++
#include <string>using namespace std;main(){string s;scanf("%s", s);int f=s.rfind('F'),c=s.find('C');printf("%s\n",c>=0&&f>c?"Yes":"No");}
a.cc:1:24: warning: extra tokens at end of #include directive 1 | #include <string>using namespace std;main(){string s;scanf("%s", s);int f=s.rfind('F'),c=s.find('C');printf("%s\n",c>=0&&f>c?"Yes":"No");} | ^~~~~~~~~ a.cc:1:10: fatal error: string>usin: No such file or directory 1 |...
s494427260
p03957
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; #define F first #define S second int main(){ string s; cin>>s; if(s.find("CF")!=s.end())cout<<"Yes"<<endl; else cout<<"No"<<endl; }
a.cc: In function 'int main()': a.cc:10:24: error: no match for 'operator!=' (operand types are 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'std::__cxx11::basic_string<char>::iterator') 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ~~~~~~~~~~~~^~~~~~~~~ ...
s632775081
p03957
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #include <cmath> #include <string> #define pb push_back #define mod 1000000007 using namespace std; typedef long long int ll; int main(void){ string s; cin>>s; bool f1,f2; f1=f2=false; for(int i=0;i<s.size();i++){ if(s[i]=='C')...
a.cc: In function 'int main()': a.cc:22:12: error: operands to '?:' have different types 'bool' and 'const char*' 22 | cout<<(f2?:"Yes":"No")<<endl; | ~~^~~~~~~ a.cc:22:19: error: expected ')' before ':' token 22 | cout<<(f2?:"Yes":"No")<<endl; | ~ ^ | ...
s375936854
p03957
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() #define LL long long #define pii pair<int,int> #define pll pair<LL,LL> using namespace std; int main(){ string s; cin>>s; bool haveC=false; bool haveF=false; int index=0; while(index<s...
a.cc: In function 'int main()': a.cc:32:21: error: 'coue' was not declared in this scope 32 | if(haveC&&haveF)coue<<"Yes"<<endl; | ^~~~
s010974802
p03957
C
#include <stdio.h> #include <string.h> int main() { bool ans = false; int i,j; char s[101]; // 整数の入力 scanf("%s",s); // 解析 for (i=0;i<strlen(s);++i) { if (s[i]=='C') { for (j=i+1;j<strlen(s);++j) { if (s[j]=='F') { ...
main.c: In function 'main': main.c:6:5: error: unknown type name 'bool' 6 | bool ans = false; | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <string.h> +++ |+#include <stdbool.h> 3 | main.c:6:16: err...
s718902855
p03957
C
#include<stdio.h> int main() { bool ans = false; int i,j; char s[101]; // 整数の入力 scanf("%s",s); // 解析 for (i=0;i<strlen(s);++i) { if (s[i]=='C') { for (j=i+1;j<strlen(s);++j) { if (s[j]=='F') { ans...
main.c: In function 'main': main.c:4:5: error: unknown type name 'bool' 4 | bool ans = false; | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include<stdio.h> +++ |+#include <stdbool.h> 2 | int main() main.c:4...
s893388127
p03957
C++
#include<bits/stdc++.h> using namespace std; #define lli long long #define FOR(i,a,b) for (lli i=(a);i<(b);i++) #define REP(i,n) for (lli i=0;i<(n);i++) #define rep(i,n) for (lli i=0;i<(n);i++) #define INF LONG_MAX/3 #define PB push_back #define pb push_back #define all(a) (a).begin(),(a),end() #define pll ...
a.cc: In function 'int main()': a.cc:21:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(str[i]=="C")f=1; a.cc:22:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 22 | if(str[i]=="F" and f=1)f=2; a.cc:22:20: error: lvalue required as ...
s869530232
p03957
Java
import java.util.Scanner; class main{ public static void main(String[] args){ Scanner inp=new Scanner(System.in); string a=inp.next(); int b=0; while(a.charAt(b)!="c"&&b>a.length()){ b++; } if(b!=a.length()-1){ while(a.charAt(b)!="f"&&b>a.length()){ b++; } } if(b=>a.length()){ a="No"; }else{ a="Yes"; } Syste...
Main.java:15: error: illegal start of expression if(b=>a.length()){ ^ 1 error
s059574375
p03957
C++
#include <iostream> using namespace std; void main(void) { string temp; int aru=0; cin >> temp; for(char find:temp){ if('C' == find&&aru == 0) aru++; if(aru == 1&&'F' == find){ cout << "Yes" <<endl; aru++; } } if(aru<2) ...
a.cc:5:1: error: '::main' must return 'int' 5 | void main(void) { | ^~~~
s719018425
p03957
Java
import java.util.Scanner; class Check {
Main.java:4: error: reached end of file while parsing { ^ 1 error
s256139580
p03957
C++
#include <bits/stdc++.h> using namespace std; int main() { string input; cin >> input; if(find(find(input.begin(), input.end(), 'C'), input.end, 'F') != string::npos) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:7:16: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, <unresolved overloaded function type>, char)' 7 | if(find(find(input.begin(), input.end(), 'C'), input.end, 'F') != string::npos) { | ...
s891368117
p03957
C++
#include<iostream> #include<algorithm> using namespace std; int K,T; int cake[101]; int main(){ cin>>K>>T; for(int i = 0; i < T; i++){ cin>>cake[i]; } sort(cake,cake+T); if(T == 1){ cout<<cake[0]-1<<endl; } else if(cake[T-1] - cake[T-2] > 1){ int sum = 0; for(int i = 0; i < T-1; i...
a.cc: In function 'int main()': a.cc:28:24: error: expected '}' at end of input 28 | else cout<<'0'<<endl; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s783389490
p03957
C++
There are K pieces of cakes. Mr. Takahashi would like to eat one cake per day, taking K days to eat them all. There are T types of cake, and the number of the cakes of type i (1≤i≤T) is ai. Eating the same type of cake two days in a row would be no fun, so Mr. Takahashi would like to decide the order for eating cakes...
a.cc:3:67: error: extended character ≤ is not valid in an identifier 3 | There are T types of cake, and the number of the cakes of type i (1≤i≤T) is ai. | ^ a.cc:3:67: error: extended character ≤ is not valid in an identifier a.cc:1:1: error: '...
s414926904
p03957
C++
#include <iostream> #include <string> int main(){ string str; cin >> str; bool a(false),b(false); for(int i = 0; i < str.length(); i++){ if(str[i] == 'C') a = true; if(a && str[i] == 'F' ) b = true; } if(a & b) cout << "Yes" << endl; else ...
a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c+...
s426392331
p03957
C++
#include <cstdio> #include <cstring> int main() { char s[100],c[2]={C,F}; scanf("%s",s); int len=strlen(s); for(int i=0,k=0;i<len&&k<2;i++) if(s[i]==c[k]) break; if(k==2)printf("Yes"); else printf("No"); return 0; }
a.cc: In function 'int main()': a.cc:5:21: error: 'C' was not declared in this scope 5 | char s[100],c[2]={C,F}; | ^ a.cc:5:23: error: 'F' was not declared in this scope 5 | char s[100],c[2]={C,F}; | ^ a.cc:10:6: error: 'k' was not declared in this scope...
s654247705
p03957
C++
#include <bits/stdc++.h> using namespace std; int main() { char s[120]; while(~scanf("%s", s)) { bool flag, check; flag = check = false; int len = strlen(s); for(int i = 0; i < s; i++) { if(s[i] == 'C') flag = true; if(flag) { if(s[i] == ...
a.cc: In function 'int main()': a.cc:11:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | for(int i = 0; i < s; i++) { | ~~^~~
s770152574
p03957
Java
import java.io.*; import java.util.regex.Pattern; public class Main { public static void main(String args[]) { try { BufferedReader Reader = new BufferedReader(new InputStreamReader(System.in)); String line = Reader.readLine(); String regexp = "C.*F"; boolean match = Pattern.matches(l...
Main.java:17: error: 'catch' without 'try' } catch(IOException e) { ^ Main.java:8: error: 'try' without 'catch', 'finally' or resource declarations try { ^ 2 errors
s202348530
p03957
Java
String s; str22 = "C"; if (s.indexOf(str22) != -1) { System.out.println( "true" ); } else { System.out.println( "no" ); }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. String s; ^ (use --enable-preview to enable unnamed classes) Main.java:2: error: class, interface, enum, or record expected str22 = "C"; ^ Main.java:3: error: class, interface, enum, or record expected if (s.indexOf(str22) != -1)...
s640486408
p03957
Java
Matcher m = p.matcher(C); int a = 0; if (m.find()){ a = a+1; } Matcher n = p.matcher(F); if (m.find()){ a = a+1; } if(a==2){System.out.print("true");} else{System.out.print("no");}
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. Matcher m = p.matcher(C); ^ (use --enable-preview to enable unnamed classes) Main.java:3: error: class, interface, enum, or record expected if (m.find()){ ^ Main.java:5: error: class, interface, enum, or record expected } ^ Main.ja...
s732827302
p03957
C++
Matcher m = p.matcher(C); int a = 0; if (m.find()){ a = a+1; } Matcher n = p.matcher(F); if (m.find()){ a = a+1; } if(a==2){System.out.print("true");} else{System.out.print("no");}
a.cc:1:1: error: 'Matcher' does not name a type 1 | Matcher m = p.matcher(C); | ^~~~~~~ a.cc:3:1: error: expected unqualified-id before 'if' 3 | if (m.find()){ | ^~ a.cc:6:1: error: 'Matcher' does not name a type 6 | Matcher n = p.matcher(F); | ^~~~~~~ a.cc:8:1: error: expected unqualified...
s445216159
p03957
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef pair<LL, LL> PLL; typedef long double LD; typedef pair<LD, int> PLDI; typedef pair<LD, LD> PLDLD; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define CLR(a) memset((a), 0 ,sizeof(a)) #...
a.cc: In function 'int main()': a.cc:27:15: error: 'n' was not declared in this scope 27 | REP(i,n) | ^ a.cc:12:37: note: in definition of macro 'FOR' 12 | #define FOR(i,a,b) for(int i=(a);i<(b);++i) | ^ a.cc:27:9: note: in expansion of macro '...
s247025617
p03957
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> using namespace std; int partition(int *first, int *last, int pivot) { int l = 0; int r = last - first -1; while (true){ while (first[l] < pivot) ++l; while (first[r] >= pivot) --r; if (l >...
a.cc: In function 'int partition(int*, int*, int)': a.cc:15:13: error: no matching function for call to 'swap(int*, int*)' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/e...
s929761407
p03957
C++
#include<cstdio> using namespace std; int main(){ char s; bool c,f; while(scanf("%C",&s)){ if (s =='C') c = true; else if(s == 'F'){ if(c){ f = true; cout << "Yes"; return 0; } } } if(!f) cout << "No"; return 0; }
a.cc: In function 'int main()': a.cc:12:33: error: 'cout' was not declared in this scope 12 | cout << "Yes"; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #in...
s496528867
p03957
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; string str1="CF" while (cin >> str){ int a=0, b = 0; while (a < str.length()&&b<str1.length()){ if (str[a++] == str1[b]) b++; } if (b == str1.length()) ...
a.cc: In function 'int main()': a.cc:8:5: error: expected ',' or ';' before 'while' 8 | while (cin >> str){ | ^~~~~
s341381241
p03957
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { string pat = "CODEFESTIVAL2016"; string txt; cin >> txt; int cnt = 0; for(int i = 0; i < txt.size(); i++){ if(txt[i] != pat[i]){ cnt++; } } cout << cnt << endl; re...
a.cc:23:1: error: 'Submission' does not name a type 23 | Submission | ^~~~~~~~~~
s157244139
p03957
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <cmath> #include <map> using namespace std; #define MOD 1000000007 #define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD) typedef long lo...
a.cc: In function 'int main()': a.cc:21:22: error: 's' was not declared in this scope 21 | scanf("%s", &s); | ^
s807399716
p03957
C
#include <stdio.h> #include <string.h> int main() { int x = 0; int y = 0; char s[100] = {0}; char tmp[2] = {0}; int i = 0, j = 0; scanf_s("%s", &s); x = strlen(s); for (i = 0; i < x; i++) { if (s[i] == 'C') { tmp[i] = s[i]; for (j = 0; j < x; j++) { if (s[j] == 'F') { y = 1; break; ...
main.c: In function 'main': main.c:12:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 12 | scanf_s("%s", &s); | ^~~~~~~ | scanf
s354063403
p03957
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ int s, t,maxa =0; cin >> s>>t; for(int i=0;i <t;i++){ int a; cin >> a; maxa=max(maxa,a); } s -= maxa; cout << max(maxa-k-1,0)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:17:18: error: 'k' was not declared in this scope 17 | cout << max(maxa-k-1,0)<<endl; | ^
s725069940
p03957
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main{ int s, t,maxa =0; cin >> s>>t; for(int i=0;i <t;i++){ int a; cin >> a; maxa=max(maxa,a); } s -= maxa; cout << max(maxa-k-1,0)<<endl; return 0; }
a.cc:7:5: error: cannot declare '::main' to be a global variable 7 | int main{ | ^~~~ a.cc:8:1: error: expected primary-expression before 'int' 8 | int s, t,maxa =0; | ^~~ a.cc:8:1: error: expected '}' before 'int' a.cc:7:9: note: to match this '{' 7 | int main{ | ^ a.cc:9:1: e...
s464886622
p03957
Java
package cf; import java.io.*; public class CF { public static void main(String[] args)throws IOException { int i,memo=0,flag1=0,flag2=0; InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String str = br.readLine(); ...
Main.java:3: error: class CF is public, should be declared in a file named CF.java public class CF { ^ 1 error
s778205371
p03957
C++
#include <iostream> #include <string> #include <algorithm > using namespace std; int main{ int s, t,maxa =0; cin >> s>>t; for(int i=0;i <t;i++){ int a; cin >> a; maxa=max(maxa,a); } s -= maxa; cout << max(maxa-k-1,0)<<endl; return 0; }
a.cc:3:10: fatal error: algorithm : No such file or directory 3 | #include <algorithm > | ^~~~~~~~~~~~ compilation terminated.
s821953424
p03957
Java
package cf; import java.io.*; public class CF { public static void main(String[] args)throws IOException { int i,memo=0,flag1=0,flag2=0; InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String str = br.readLine(); ...
Main.java:3: error: class CF is public, should be declared in a file named CF.java public class CF { ^ 1 error
s825492481
p03957
C++
#include <iostream> #include <string> using namespace std; int main(){ string S; cin >> S; count=0; for(int i=0;S[i]!='\0';i++){ if(S[i]=='C'&&count == 0){ count++; } if(S[i]=='F'&&count == 1){ count++; break; } } if(count == 2){ cout <<"Yes" << endl; }else{ cout...
a.cc: In function 'int main()': a.cc:8:3: error: 'count' was not declared in this scope 8 | count=0; | ^~~~~
s359593448
p03957
Java
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); if (K == 1) { System.out.println(0); } int T = sc.nextInt(); int[] a = new int[T]; for (int ...
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java public class Solution { ^ 1 error
s122153811
p03957
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication11 { class Program { static void Main(string[] args) { string a = Console.ReadLine(); for (int b = 0; b < a.Length; b++) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s954230071
p03957
C
#include <stdio.h> int main(void) { char S[102]; int i,ans = 0; fgets(S,sizeof(S),stdin); for (i = 0;i < sizeof(S);i++) { if (ans == 0) { if (S[i] == 'C') { ans = 1; } } else { if (S[i] == 'F') { ans = 2; } } } if (ans == 2) { printf("Yes\n"); } el...
main.c: In function 'main': main.c:22:19: error: expected ';' before '}' token 22 | printf("No\n") | ^ | ; 23 | } | ~
s698747975
p03957
C++
#include<vector> #include<algorithm> #include<iostream> #include<string> using namespace std; int main() { string str; cin >> str; for (int i = 0; i < str.length - 1; i++) { if (str[i] == 'C'&&str[i + 1] == 'F') { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:12:33: 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...
s002361859
p03957
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication11 { class Program { static void Main(string[] args) { string a = Console.ReadLine(); for (int b = 0; b < a.Length; b++) { for (in...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s212683251
p03957
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.next(); // 出力 boolean cok = false; boolean fok = false; for(int i=0; i<s.length; i++){ if(String.valueOf(s.charAt(i)).equals("C")){ ...
Main.java:9: error: cannot find symbol for(int i=0; i<s.length; i++){ ^ symbol: variable length location: variable s of type String 1 error
s732121404
p03957
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <string> #include <cctype> #include <stack> #include <queue> #include <vector> #include <cstdlib> using namespace std; int main(void){ int Slen, i = 0, j = 0, count = -1; char S[100]; cin >> S; Slen = strlen(S); for (i = 0; ...
a.cc: In function 'int main()': a.cc:21:16: error: 'strlen' was not declared in this scope 21 | Slen = strlen(S); | ^~~~~~ a.cc:11:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <cstdlib> +++ |+#include <cstr...
s823397016
p03957
C
#include <stdio.h> int main(void) { char S[102]; int i,ans = 0; fgets(S,sizeof(S),stdin); for (i = 0;i < sizeof(S);i++) { if (ans == 0) { if (S[i] == 'C') { ans = 1; } } else { if (S[i] == 'F') { printf("Yes\n"); } } if (i + 1 == sizeof(S) && S[i] != 'F') print...
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s237645757
p03957
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.next(); // 出力 boolean cok = false; boolean fok = false; for(int i=0; i<s.length; i++){ if(String.valueOf(s.charAt(i)).equals("C")){ ...
Main.java:15: error: <identifier> expected else if(cok = true && String.valueOf(s.charAt(i).)equals("F")){ ^ Main.java:15: error: ')' expected else if(cok = true && String.valueOf(s.charAt(i).)equals("F")){ ...
s312728370
p03957
C
#include <stdio.h> #include <string.h> int main() { int x = 0; int y = 0; char s[100] = {0}; char tmp[2] = {0}; scanf("%d", &s); x = strlen(s); for (int i = 0; i < x,i++){ if (s[i] == 'C') { tmp[i] = s[i]; for (int j=0, j < x, j++) { if (s[j] == 'F') { y = 1; break; } if (y == 1)...
main.c: In function 'main': main.c:12:34: error: expected ';' before ')' token 12 | for (int i = 0; i < x,i++){ | ^ | ; main.c:16:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 16 | ...
s348940970
p03957
C++
#include <iostream> #include <string> #include <cstdio.h> using namespace std; int main() { char s[100]; cin >> s; for(int i = 0; i < 100; i++){ if(s[i] == 'C'){ for(int j = i; j < 100; j++){ if(s[j] == 'S'){ cout << "Yes" << endl; ...
a.cc:3:10: fatal error: cstdio.h: No such file or directory 3 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s638513540
p03957
C++
#include <iostream> #include <string> using namespace std; int main() { char s[101]; int l; bool x = false; cin >> s; l = strlen(s); for(int i=0; i<l; i++){ if(s[i] == 'C'){ for(int j=i+1; j<l; j++){ if(s[j] == 'F'){ x = true; } } } } if(x == true){ cout << "Yes\n"; } else{ cout...
a.cc: In function 'int main()': a.cc:12:13: error: 'strlen' was not declared in this scope 12 | l = strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s559453861
p03957
C
int main (int argc, char *argv[]) { int i = 2; int first = 0; int isFound = 0; char c; c = getchar(); while (i <= 100 && c != EOF) { if (c == 'C') first = 1; if (first == 1 && c == 'F') isFound = 1; c = getchar(); i++; } if (isFound == 1) { printf(...
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration] 6 | c = getchar(); | ^~~~~~~ main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' +++ |+#include <stdio.h> ...