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') { cout<<"Yes"; return 0; } } } } cout<<"No"; return 0; }
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(register int j=i+1;j<l;j++) | ^ /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
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') { cout<<"Yes"; return 0; } } } } cout<<"No"; return 0; }
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(register int j=i+1;j<l;j++) | ^ /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
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; } } } } cout<<"No"; cout<<endl; return 0; | ^ /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
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') { f=1; continue; } } cout<<"No"; } /*题目大意: 问一个字符串S(2<=S<=100)中是否可以去掉几个字符,变成CF(大写)两个字母,如果可以,输出‘Yes’,不可以,输出‘No’。 输入格式:字符串S 输出格式:如果可以去掉几个数字,变成CF(大写),输出‘Yes’,不可以,输出‘No’。*/ /*#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; } if(s[i]=='F') { fflag=1; } } if(cflag==1&&fflag==1) { cout<<"Yes"; } else { cout<<"No"; } cout<<endl; return 0; }*/
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::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:9:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:9:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:9:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 9 | if(c==1&&f==1) | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 9 | if(c==1&&f==1) | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | if(c==1&&f==1) | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | if(c==1&&f==1) | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 9 | if(c==1&&f==1) | ^ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 9 | if(c==1&&f==1) | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:9:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | if(c==1&&f==1) | ^ /usr
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') { cout<<"Yes"; return 0; } } } } cout<<"No"; return 0; }
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(register int j=i+1;j<l;j++) | ^ /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
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 13 | for(int j=i+1;j<l;j++){ | ^ a.cc:14:41: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 14 | if(a[j]="F") cout<<"Yes"; | ^~~ | | | const char*
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"; return 0; } } } } cout<<"No"; return 0; }
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(register int j=i+1;j<l;j++) | ^ /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
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 | else: | ^~~~ a.cc:10:1: error: expected unqualified-id before 'else' 10 | else: | ^~~~
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;i++) #define range(i,s,n) for(int i=s;i<n;i++) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define fs first #define sc second #define pb push_back #define eb emplace_back #define mp make_pair #define INF 1E9 #define EPS 1E-9 #define MOD (1E9+7) #define PI 3.1415926535897932384 std::ostream &operator<<(std::ostream &out, const vector<int> &tgt) { string s; for (int i = 0; i<tgt.size(); i++) { s += (to_string(tgt[i]) + ((i != tgt.size() - 1) ? " " : "")); } out << s; return out; } int main() { string s; cin >> s; rep(i, s.size()) { if(s[i]=='C'){ rep(j, i + 1, s.size()) { if (s[j] == 'F') { cout << "Yes" << endl; return 0; } } } } cout << "No" << endl; return 0; }
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()': a.cc:41:25: error: 'rep' was not declared in this scope 41 | rep(j, i + 1, s.size()) { | ^~~
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;i++) #define range(i,s,n) for(int i=s;i<n;i++) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define fs first #define sc second #define pb push_back #define eb emplace_back #define mp make_pair #define INF 1E9 #define EPS 1E-9 #define MOD (1E9+7) #define PI 3.1415926535897932384 std::ostream &operator<<(std::ostream &out, const vector<int> &tgt) { string s; for (int i = 0; i<tgt.size(); i++) { s += (to_string(tgt[i]) + ((i != tgt.size() - 1) ? " " : "")); } out << s; return out; } int main() { string s; cin >> s; rep(i, s.size()) { if(s[i]=='C'){ rep(j, i + 1, s.size()) { if (s[j] == 'F') { cout << "Yes" << endl; return 0; } } } } cout << "No" << endl; return 0; }
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()': a.cc:41:25: error: 'rep' was not declared in this scope 41 | rep(j, i + 1, s.size()) { | ^~~
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; } } cout << "No" << 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) { cout<<"Yes"<<endl; return 0; } } cout<<"No"<<endl; return 0; }
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 from /usr/include/c++/14/cstring:43, from a.cc:6: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
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<<"Yes"<<endl; return 0; } } cout<<"No"<<endl; return 0; }
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_string<char>} In file included from /usr/include/c++/14/cstring:43, from a.cc:6: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__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 scope 9 | for (int i=1;i<=strlen(a);i++) | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring> 3 | using namespace std; a.cc:10:18: error: no match for 'operator||' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | if (a[i]=="C"||a[i]="F") printf("YES"); | ~~~~~~~~~^~~~~~ | | | | bool std::string {aka std::__cxx11::basic_string<char>} a.cc:10:18: note: candidate: 'operator||(bool, bool)' (built-in) 10 | if (a[i]=="C"||a[i]="F") printf("YES"); | ~~~~~~~~~^~~~~~ a.cc:10:18: note: no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
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,j; | ^ a.cc:5:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 5 | register int ss,i,j; | ^ a.cc: At global scope: a.cc:21:9: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
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') { cout<<"Yes"; return 0; } } } } cout<<"No"; return 0; }
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(register int j=i+1;j<l;j++) | ^ /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
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"; p=1; break; } } if(p==0)cout<<"No"; return 0; }
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"); return 0; }
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"); | ^~~~~~ a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 2 | #include<cstring> +++ |+#include <cstdio> 3 | char a[10010]; a.cc:18:9: error: 'printf' was not declared in this scope 18 | printf("No\n"); | ^~~~~~ a.cc:18:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
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') { cout<<"Yes"; return 0; } } } } cout<<"No"; return 0; }
/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(){ main.c:6:17: error: 'false' undeclared (first use in this function) 6 | bool bz=false; | ^~~~~ main.c:6:17: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in main.c:9:36: error: 'true' undeclared (first use in this function) 9 | if(strk[i]=='C')bz=true; | ^~~~ main.c:9:36: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
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<<"Yes"; else cout<<"No"; return 0; }
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> +++ |+#include <cstring> 3 | using namespace std;
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') { cout<<"Yes"; return 0; } } } } cout<<"No"; return 0; }
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(register int j=i+1;j<l;j++) | ^ /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
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 < s.length(); j++) { if(s[j] == 'F') { return 1; } } } } return 0;}
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();i++) { if(s[i] == 'C') { for(j = i+1 ;j < s.length(); j++) { if(s[j] == 'F') { return 1; } } } } return 0;} | ^ /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
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::sync_with_stdio(false); bool a,b; string s; cin >> s; for (int i = 0; i < 100; i++ ){ if (s[i] == 'C' ){ a = true; } else if (a && s[i]== 'F') b = true; } } if ( a && b){ cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
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 declaration before '}' token 41 | } | ^
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 'char*' 2 | main(){std::string s;fgets(&s,100,stdin);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/stdio.h:654:38: note: initializing argument 1 of 'char* fgets(char*, int, FILE*)' 654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ~~~~~~~~~~~~~~~~~^~~
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(){std::string s;gets_s(&s[0],100);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~~~ | getsid
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 s(gets(&s));puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ | getw
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;gets(&s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ | getw
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*' 2 | main(){std::string s;fgets(&s[0],100,std::cin);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ~~~~~^~~ | | | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/stdio.h:654:69: note: initializing argument 3 of 'char* fgets(char*, int, FILE*)' 654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ~~~~~~~~~~~~~~~~~^~~~~~~~
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(){std::string s;fgets(&s[0],100);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ~~~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/stdio.h:654:14: note: declared here 654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ^~~~~
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 | main(){std::string s;fgets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/stdio.h:654:38: note: initializing argument 1 of 'char* fgets(char*, int, FILE*)' 654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ~~~~~~~~~~~~~~~~~^~~
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;gets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ | getw
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;gets(s);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~ | getw
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(70,s.find(67))!=-1?"Yes":"No");} | ^
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 type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 2 | main(){std::string s=std::cin.get();puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ~~~~~~~~~~~~^~
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);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^
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("%s",c);)s+=c;puts(s.find(70,s.find(67))>0?"Yes":"No");} | ^
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",c);)s+=c;puts(s.find(70,s.find(67))>0?"Yes":"No");} | ^
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];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~~ a.cc:1:39: error: 'string' is not a member of 'std' 1 | 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: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | main(){char c[100];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} a.cc:1:56: error: 's' was not declared in this scope 1 | main(){char c[100];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^ a.cc:1:51: error: 'puts' was not declared in this scope 1 | main(){char c[100];scanf("%s",c);std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~~
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::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^~~ | ; a.cc:2:55: error: 's' was not declared in this scope 2 | main(){char c[100];scanf("%s",c)std::string s(c);puts(s.find(70,s.find(67))!=-1?"Yes":"No");} | ^
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 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:72: error: 'std::string printf' redeclared as different kind of entity 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"); | ^ In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from a.cc:1: /usr/include/stdio.h:363:12: note: previous declaration 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ^~~~~~
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 | main(){std::string s;std::cin>>s;std::cout<<(s.find('F',s.find('C'))!=-1?"Yes":"No")<<endl;} | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
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.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
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 | #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");} | ^~~~~~~~~~~~~ compilation terminated.
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; | ~~~~~~~~~~~~^~~~~~~~~ | | | | | std::__cxx11::basic_string<char>::iterator | std::__cxx11::basic_string<char>::size_type {aka long unsigned int} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1132:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1132 | operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1132:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:1212:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1212 | operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1212:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:1305:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1305 | operator!=(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1305:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:1379:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1379 | operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1379:5: note: template argument deduction/substitution failed: a.cc:10:32: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:1473:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1473 | operator!=(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1473:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:1547:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1547 | operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1547:5: note: template argument deduction/substitution failed: a.cc:10:32: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:1647:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1647 | operator!=(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1647:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/regex.h:2213:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2213 | operator!=(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2213:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::pair<_T1, _T2>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 455 | operator!=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 500 | operator!=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1686 | operator!=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1753 | operator!=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)' 197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed: a.cc:10:32: note: mismatched types 'const std::fpos<_StateT>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 10 | if(s.find("CF")!=s.end())cout<<"Yes"<<endl; | ^ In file included from /usr/include/c++/14/string:43: /usr/i
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') f1=true; if(f1&&s[i]=='F') f2=true; } cout<<(f2?:"Yes":"No")<<endl; return 0; }
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.size()){ if(s[index]=='C'){ haveC=true; break; } index++; } while(index<s.size()){ if(s[index]=='F'){ haveF=true; break; } } if(haveC&&haveF)coue<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
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') { ans = true; } } } } // 出力 printf("%s\n", ans? "Yes":"No"); return 0; }
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: error: 'false' undeclared (first use in this function) 6 | bool ans = false; | ^~~~~ main.c:6:16: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in main.c:20:27: error: 'true' undeclared (first use in this function) 20 | ans = true; | ^~~~ main.c:20:27: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
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 = true; } } } } // 出力 printf("%s\n", ans? "Yes":"No"); return 0; }
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:16: error: 'false' undeclared (first use in this function) 4 | bool ans = false; | ^~~~~ main.c:4:16: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' main.c:4:16: note: each undeclared identifier is reported only once for each function it appears in main.c:10:16: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 10 | for (i=0;i<strlen(s);++i) | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include<stdio.h> +++ |+#include <string.h> 2 | int main() main.c:10:16: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 10 | for (i=0;i<strlen(s);++i) | ^~~~~~ main.c:10:16: note: include '<string.h>' or provide a declaration of 'strlen' main.c:18:27: error: 'true' undeclared (first use in this function) 18 | ans = true; | ^~~~ main.c:18:27: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
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 pair<lli,lli> int main(){ int f=0; string str; cin>>str; for(int i=0;i<str.length();i++){ if(str[i]=="C")f=1; if(str[i]=="F" and f=1)f=2; } if(f==2)cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
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 left operand of assignment 22 | if(str[i]=="F" and f=1)f=2;
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"; } System.out.println(a); } }
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) cout << "No" <<endl; }
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) { | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:3842:5: note: candidate: '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Tp = char]' 3842 | find(_InputIterator __first, _InputIterator __last, | ^~~~ /usr/include/c++/14/bits/stl_algo.h:3842:49: note: no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 3842 | find(_InputIterator __first, _InputIterator __last, | ~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)' 60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate expects 4 arguments, 3 provided In file included from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)' 435 | find(istreambuf_iterator<_CharT> __first, | ^~~~ /usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed: a.cc:7:16: note: '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >' 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++){ sum += cake[i]; } if(cake[T-1]-sum-1 > 0)cout<<cake[T-1]-sum-1<<endl; else {cout<<'0'<<endl;} } else cout<<'0'<<endl;
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 that minimizes the number of days on which he has to eat the same type of cake as the day before. Compute the minimum number of days on which the same type of cake as the previous day will be eaten.
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: 'There' does not name a type 1 | There are K pieces of cakes. Mr. Takahashi would like to eat one cake per day, taking K days to eat them all. | ^~~~~
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 cout << "No" << endl; return 0; }
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++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> str; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:12: error: 'str' was not declared in this scope; did you mean 'std'? 6 | cin >> str; | ^~~ | std a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout << "Yes" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout << "Yes" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "No" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 17 | cout << "No" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 10 | if(k==2)printf("Yes"); | ^
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] == 'F') check = true; } } if(check) printf("Yes\n"); else printf("No\n"); } return 0; }
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(line, regexp); if(match = true ){ System.out.println("Yes"); }else{ System.out.println("No"); } catch(IOException e) { System.err.println(e.getMessage()); } } } } //&& line.indexOf( "F")>-1 }
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) { ^ Main.java:5: error: class, interface, enum, or record expected } else { ^ Main.java:7: error: class, interface, enum, or record expected } ^ 5 errors
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.java:8: error: class, interface, enum, or record expected if (m.find()){ ^ Main.java:10: error: class, interface, enum, or record expected } ^ Main.java:12: error: class, interface, enum, or record expected if(a==2){System.out.print("true");} ^ Main.java:13: error: class, interface, enum, or record expected else{System.out.print("no");} ^ 7 errors
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-id before 'if' 8 | if (m.find()){ | ^~ a.cc:12:1: error: expected unqualified-id before 'if' 12 | if(a==2){System.out.print("true");} | ^~ a.cc:13:1: error: expected unqualified-id before 'else' 13 | else{System.out.print("no");} | ^~~~
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)) #define ALL(a) a.begin(),a.end() const LL MOD = 1e9+7; const int INF = (1e9); const double EPS=1.0e-9; const double PI=atan2(0,-1); int main() { string s; cin>>s; bool f1=0,f2=0; REP(i,n) { if(!f1) { if(s[i]=='C') f1=1; } if(!f2) { if(s[i]=='F') f2=1; } } if(f2) cout<<"Yes"<<endl; else cout<<"No"<<endl; }
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 'REP' 27 | REP(i,n) | ^~~
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 >= r) return l; swap(&first[l], &first[r]); } } void QuickSort(int *first, int *last){ int size = last - first; if (size <= 1) return; // pivotの決定 // 先頭・真ん中・末尾の中央値 int a = first[0]; int b = first[size/2]; int c = first[size-1]; int pivot; if ((a-b)*(b-c)*(c-a) != 0){ pivot = max(min(a,b), min(max(a,b),c)); } else { // 中央値が取れない場合は最初に見つかった異なる2つの数のうち大きい方 bool flag = true; for (int i=1; i<size; ++i){ if (first[i-1] != first[i]) { pivot = max(first[i-1], first[i]); flag = false; break; } } if (flag) return; // 全て同じならソート済みと判定 } int k = partition(first, last, pivot); // 配列の分割 QuickSort(first, first+k); QuickSort(first+k, last); } int main(){ int K; int T; cin >> K >> T; vector<int> aa(T); for(int i=0;i<T;i++){ cin >> aa[i]; } QuickSort(aa.begin(),aa.end()); reverse(aa.begin(),aa.end()); int count =0; int i=0,j=1; while(true){ if(j==T) break; if(aa[i]>aa[j]){ aa[i]-=aa[j]; j++; }else if(aa[i]<=aa[j]){ aa[j]-=aa[i]; i=j; j++; } } if(aa[i]>0)aa[i]--; cout << aa[i] << endl; return 0; }
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/exception:166, from /usr/include/c++/14/ios:41, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/move.h:226:5: note: candidate: 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = int*; _Require<__not_<__is_tuple_like<_Tp> >, is_move_constructible<_Tp>, is_move_assignable<_Tp> > = void]' (near match) 226 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/14/bits/move.h:226:5: note: conversion of argument 2 would be ill-formed: a.cc:15:25: error: cannot bind non-const lvalue reference of type 'int*&' to an rvalue of type 'int*' 15 | swap(&first[l], &first[r]); | ^~~~~~~~~ /usr/include/c++/14/bits/exception_ptr.h:229:5: note: candidate: 'void std::__exception_ptr::swap(exception_ptr&, exception_ptr&)' 229 | swap(exception_ptr& __lhs, exception_ptr& __rhs) | ^~~~ /usr/include/c++/14/bits/exception_ptr.h:229:25: note: no known conversion for argument 1 from 'int*' to 'std::__exception_ptr::exception_ptr&' 229 | swap(exception_ptr& __lhs, exception_ptr& __rhs) | ~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/move.h:250:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> std::__enable_if_t<((bool)std::__is_swappable<_Tp>::value)> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])' 250 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~~ /usr/include/c++/14/bits/move.h:250:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types '_Tp [_Nm]' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/stl_pair.h:1089:5: note: candidate: 'template<class _T1, class _T2> typename std::enable_if<std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value>::type std::swap(pair<_T1, _T2>&, pair<_T1, _T2>&)' 1089 | swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) | ^~~~ /usr/include/c++/14/bits/stl_pair.h:1089:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types 'std::pair<_T1, _T2>' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1106:5: note: candidate: 'template<class _T1, class _T2> typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type std::swap(pair<_T1, _T2>&, pair<_T1, _T2>&)' (deleted) 1106 | swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; | ^~~~ /usr/include/c++/14/bits/stl_pair.h:1106:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types 'std::pair<_T1, _T2>' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:54: /usr/include/c++/14/bits/basic_string.h:4039:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> void std::swap(__cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4039 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~ /usr/include/c++/14/bits/basic_string.h:4039:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2805:5: note: candidate: 'template<class ... _Elements> typename std::enable_if<std::__and_<std::__is_swappable<_Elements>...>::value>::type std::swap(tuple<_UTypes ...>&, tuple<_UTypes ...>&)' 2805 | swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) | ^~~~ /usr/include/c++/14/tuple:2805:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types 'std::tuple<_UTypes ...>' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/tuple:2823:5: note: candidate: 'template<class ... _Elements> typename std::enable_if<(! std::__and_<std::__is_swappable<_Elements>...>::value)>::type std::swap(tuple<_UTypes ...>&, tuple<_UTypes ...>&)' (deleted) 2823 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; | ^~~~ /usr/include/c++/14/tuple:2823:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types 'std::tuple<_UTypes ...>' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:2122:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(vector<_Tp, _Alloc>&, vector<_Tp, _Alloc>&)' 2122 | swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) | ^~~~ /usr/include/c++/14/bits/stl_vector.h:2122:5: note: template argument deduction/substitution failed: a.cc:15:13: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'int*' 15 | swap(&first[l], &first[r]); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:57:27: error: cannot convert 'std::vector<int>::iterator' to 'int*' 57 | QuickSort(aa.begin(),aa.end()); | ~~~~~~~~^~ | | | std::vector<int>::iterator a.cc:19:21: note: initializing argument 1 of 'void QuickSort(int*, int*)' 19 | void QuickSort(int *first, int *last){ | ~~~~~^~~~~
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 | #include<cstdio> +++ |+#include <iostream> 2 | using namespace std; a.cc:17:16: error: 'cout' was not declared in this scope 17 | if(!f) cout << "No"; | ^~~~ a.cc:17:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
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()) cout << "Yes" << endl; else cout << "No" << endl; } }
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; return 0; } Submission
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 long i64; typedef vector<int> ivec; typedef vector<string> svec; int main() { char in[101]; scanf("%s", &s); int a = 0; for (int i = 0; s[i]; ++i) { if (a == 0 && s[i] == 'C') ++a; if (a == 1 && s[i] == 'F') ++a; } puts(a == 2 ? "Yes" : "No"); return 0; }
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; } if (y == 1) { break; } tmp[i + 1] = s[i + j]; } } if (y == 1) { break; } } if (y == 1) { printf("YES"); } else { printf("NO"); } getchar(); getchar(); return 0; }
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: error: 'cin' does not name a type 9 | cin >> s>>t; | ^~~ a.cc:10:1: error: expected unqualified-id before 'for' 10 | for(int i=0;i <t;i++){ | ^~~ a.cc:10:13: error: 'i' does not name a type 10 | for(int i=0;i <t;i++){ | ^ a.cc:10:18: error: 'i' does not name a type 10 | for(int i=0;i <t;i++){ | ^ a.cc:16:1: error: 's' does not name a type 16 | s -= maxa; | ^ a.cc:17:1: error: 'cout' does not name a type 17 | cout << max(maxa-k-1,0)<<endl; | ^~~~ a.cc:18:1: error: expected unqualified-id before 'return' 18 | return 0; | ^~~~~~ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
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(); for(i=0;i<str.length();i++){ char c = str.charAt(i); if(c =='C'){ flag1 = 1; memo = i; } } while(memo<str.length()){ char c = str.charAt(memo); if(c == 'F'){ flag2 = 1; } memo++; } if(flag1 == flag2){ System.out.println("Yes"); } else System.out.println("No"); } }
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(); for(i=0;i<str.length();i++){ char c = str.charAt(i); if(c =='C'){ flag1 = 1; memo = i; } } while(memo<str.length()){ char c = str.charAt(memo); if(c == 'F'){ flag2 = 1; } memo++; } if(flag1 == flag2){ System.out.println("Yes"); } else System.out.println("No"); } }
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 <<"No"<<endl; } return 0; }
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 i = 0; i < a.length; i++) { a[i] = sc.nextInt(); } int fIndex = 0; int sIndex = 1; if (a[0] < a[1]) { fIndex = 1; sIndex = 0; } for (int i = 0; i < K / 2; i++) { for (int j = 0; j < a.length; j++) { if (a[j] > a[fIndex]) { sIndex = fIndex; fIndex = j; } else if (a[j] > a[sIndex] && j != fIndex) { sIndex = j; } } if (a[sIndex] == 0) { System.out.println(a[fIndex] - 1); return; } a[fIndex]--; a[sIndex]--; } System.out.println(0); } }
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++) { for (int c = 1; b < c && c < a.Length; c++) { if (a[b] == 'C' && a[c] == 'F') Console.WriteLine("YES"); if (a[b] == 'C' && a[c] == 'F') break; } } Console.WriteLine("NO"); } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:27:6: error: expected ';' after class definition 27 | } | ^ | ; a.cc: In static member function 'static void ConsoleApplication11::Program::Main(int*)': a.cc:13:13: error: 'string' was not declared in this scope 13 | string a = Console.ReadLine(); | ^~~~~~ a.cc:14:33: error: 'a' was not declared in this scope 14 | for (int b = 0; b < a.Length; b++) | ^ a.cc:19:25: error: 'Console' was not declared in this scope 19 | Console.WriteLine("YES"); | ^~~~~~~ a.cc:24:13: error: 'Console' was not declared in this scope 24 | Console.WriteLine("NO"); | ^~~~~~~
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"); } else { printf("No\n") } return 0; }
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 unsigned int]' (did you forget the '()' ?) 12 | for (int i = 0; i < str.length - 1; i++) | ~~~~^~~~~~ | ()
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 (int c = 1; b < c && c < a.Length; c++) { if (a[b] == 'C' && a[c] == 'F') Console.WriteLine("YES"); else Console.WriteLine("NO"); } } } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:9:26: error: 'string' has not been declared 9 | static void Main(string[] args) | ^~~~~~ a.cc:9:35: error: expected ',' or '...' before 'args' 9 | static void Main(string[] args) | ^~~~ a.cc:25:6: error: expected ';' after class definition 25 | } | ^ | ; a.cc: In static member function 'static void ConsoleApplication11::Program::Main(int*)': a.cc:11:13: error: 'string' was not declared in this scope 11 | string a = Console.ReadLine(); | ^~~~~~ a.cc:12:33: error: 'a' was not declared in this scope 12 | for (int b = 0; b < a.Length; b++) | ^ a.cc:17:25: error: 'Console' was not declared in this scope 17 | Console.WriteLine("YES"); | ^~~~~~~ a.cc:21:25: error: 'Console' was not declared in this scope 21 | Console.WriteLine("NO"); | ^~~~~~~
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")){ if(cok = false){ cok = true; } } else if(cok = true && String.valueOf(s.charAt(i)).equals("F")){ fok = true; } } if(fok){ System.out.println("Yes"); } else{ System.out.println("No"); } } }
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; i < Slen; i++) { if (S[i] == 'C') { count = i; } } if (count != -1) { for (i = count + 1; i < Slen; i++) { if (S[i] == 'F') { cout << "Yes" << endl; break; } else if (i == Slen - 1) { cout << "No" << endl; break; } } } else cout << "No" << endl; return 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 <cstring> 11 |
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') printf("No\n"); return 0; }
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")){ if(cok = false){ cok = true; } } else if(cok = true && String.valueOf(s.charAt(i).)equals("F")){ fok = true; } } if(fok){ System.out.println("Yes"); } else{ System.out.println("No"); } } }
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")){ ^ Main.java:15: error: ';' expected else if(cok = true && String.valueOf(s.charAt(i).)equals("F")){ ^ 3 errors
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) { break; } tmp[i + 1] = s[i + j]; } } if (y == 1) { break; } } if (y == 1) { printf("YES"); } else { printf("NO"); } } }
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 | for (int j=0, j < x, j++) { | ^ main.c:25:17: error: expected expression before '}' token 25 | } | ^ main.c:25:17: error: expected expression before '}' token main.c:25:17: error: expected expression before '}' token main.c: At top level: main.c:38:1: error: expected identifier or '(' before '}' token 38 | } | ^
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; return 0; } } } } cout << "No" << 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 << "No\n"; } return 0; }
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> 2 | #include <string>
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("Yes\n"); } else { printf("No\n"); } return 0; }
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> 1 | int main (int argc, char *argv[]) { main.c:7:29: error: 'EOF' undeclared (first use in this function) 7 | while (i <= 100 && c != EOF) { | ^~~ main.c:7:29: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:7:29: note: each undeclared identifier is reported only once for each function it appears in main.c:14:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 14 | printf("Yes\n"); | ^~~~~~ main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:14:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:16:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 16 | printf("No\n"); | ^~~~~~ main.c:16:9: note: include '<stdio.h>' or provide a declaration of 'printf'