submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s221899975
p00006
C++
#include <iostream> #include <string> #include <stdlib.h> using namespace std; void reverse(char[]); int main() { char str[21]; cin >> str; reverse(str); } void reverse(char s[]) { int i, l=strlen(s); char t; for(i=0; i<l/2; i++) { t=s[i]; s[i]=s[l-i-1]; s[l-i-1]=t; } cout << s; }
a.cc: In function 'void reverse(char*)': a.cc:17:18: error: 'strlen' was not declared in this scope 17 | int i, l=strlen(s); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <stdlib.h> +++ |+#include <cstring> 4 |
s080192493
p00006
C++
#include <iostream> using namespace std; int main() { int l; char t, str[21]; cin >> str; l=strlen(str); for(int i=0; i<l/2; i++) { t=str[i]; str[i]=str[l-i-1]; str[l-i-1]=t; } cout << str; }
a.cc: In function 'int main()': a.cc:11:11: error: 'strlen' was not declared in this scope 11 | l=strlen(str); | ^~~~~~ 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 |
s327466259
p00006
C++
#include <iostream> using namespace std; int main() { int l; char t, str[64]; cin >> str; l=strlen(str); for(int i=0; i<l/2; i++) { t=str[i]; str[i]=str[l-i-1]; str[l-i-1]=t; } cout << str; }
a.cc: In function 'int main()': a.cc:11:11: error: 'strlen' was not declared in this scope 11 | l=strlen(str); | ^~~~~~ 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 |
s836634490
p00006
C++
#include <iostream> #include <vector> #include <cmath> #include <map> #include <algorithm> typedef long long ll; using namespace std; int main() { string buf cin >> buf; reverse(buf.begin(),buf.end()); cout << buf << endl; } }
a.cc: In function 'int main()': a.cc:13:1: error: expected initializer before 'cin' 13 | cin >> buf; | ^~~ a.cc:14:9: error: 'buf' was not declared in this scope 14 | reverse(buf.begin(),buf.end()); | ^~~ a.cc: At global scope: a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s982586623
p00006
C++
#include <iostream> #include <vector> #include <cmath> #include <map> #include <algorithm> typedef long long ll; using namespace std; int main() { string buf cin >> buf; reverse(buf.begin(),buf.end()); cout << buf << endl; }
a.cc: In function 'int main()': a.cc:13:1: error: expected initializer before 'cin' 13 | cin >> buf; | ^~~ a.cc:14:9: error: 'buf' was not declared in this scope 14 | reverse(buf.begin(),buf.end()); | ^~~
s575571736
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; cin >> str; int i = 0,j = str.size() - 1; while(i < j){ string tmp; tmp = str[i]; str[i] = str[j]; str[j] = tmp; } cout << str << endl; }
a.cc: In function 'int main()': a.cc:14:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment 14 | str[j] = tmp; | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>}
s221848327
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; cin >> str; int i = 0,j = str.size() - 1; while(i < j){ string tmp; tmp = str[i]; str[i] = str[j]; str[j] = tmp; } cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment 14 | str[j] = tmp; | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>}
s940753374
p00006
C++
#include <cstdio> #include <string> using namespace std; int main() { char str[20]; scanf("%s", str); int len = strlen(str); for (int i = len-1; i >= 0; i--) { printf("%c", str[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: 'strlen' was not declared in this scope 7 | int len = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <string> +++ |+#include <cstring> 3 | using namespace std;
s837135997
p00006
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <functional> using namespace std; int gcd( int, int ); int main() { char str[21]; scanf("%s", str ); vector<char> v( str, str + strlen( str ) ); reverse( v.begin(), v.end() ); for ( unsigned int i = 0; i < v.size(); i++ ) { printf("%c", v[i] ); } return 0; }
a.cc: In function 'int main()': a.cc:25:36: error: 'strlen' was not declared in this scope 25 | vector<char> v( str, str + strlen( str ) ); | ^~~~~~ a.cc:14:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include <functional> +++ |+#include <cstring> 14 |
s169540696
p00006
C++
#include <cstdio> #include <cstring> int main( void ) { int len; char s[128]; gets( s ); len = strlen( s ); for( int i=len-1; i>=0; i-- ) putchar( s[i] ); putchar( '\n' ); return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets( s ); | ^~~~ | getw
s613680847
p00006
C++
#include <iostream> using namespace std; int main(){ char str[21]; char temp[21]; int i = 0; memset(str, 0, sizeof(str)); memset(temp, 0, sizeof(temp)); while(cin >> str){ int n = strlen(str); for(; n!=0; ){ temp[i++] = str[--n]; } cout << temp << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'memset' was not declared in this scope 9 | memset(str, 0, sizeof(str)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | using namespace std; a.cc:13:25: error: 'strlen' was not declared in this scope 13 | int n = strlen(str); | ^~~~~~ a.cc:13:25: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
s536751411
p00006
C++
#include <stdio.h> #include <string.h> int main() {char Tex[25];gets(Tex);for (int j=strlen(Tex)-1;j>=0;printf("%c",Tex[j--]));puts("");return 0;}
a.cc: In function 'int main()': a.cc:3:26: error: 'gets' was not declared in this scope; did you mean 'getw'? 3 | int main() {char Tex[25];gets(Tex);for (int j=strlen(Tex)-1;j>=0;printf("%c",Tex[j--]));puts("");return 0;} | ^~~~ | getw
s748365152
p00006
C++
#include<stdio.h> #include<string.h> int main(){ int i,j,a,b; char str[21]; scanf("%s",str); a=strlen(str); for(i=a;i>=0;i--){ printf("%c",str[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: unable to find numeric literal operator 'operator""\U0000ff11' 5 | char str[21]; | ^~~ a.cc:6:14: error: 'str' was not declared in this scope; did you mean 'std'? 6 | scanf("%s",str); | ^~~ | std
s042521090
p00006
C++
#include <stdio.h> #include <string.h> int main() { int i=0, len=0; char str[21]; gets(str); len = strlen(str); for(i=len; i>=0; i--) { printf("%c",str[i]); } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(str); | ^~~~ | getw
s494740306
p00006
C++
#include <iostream> #include <string> using namespace std; void srot(char *str){ int len, len3 = 0; char str2[20], work; len = strlen(str); for(int len2 = 0; len > len2; len2++){ str2[len2] = str[len2]; } for(len3 = 0, len = len - 1; len >= len3; len--,len3++){ work = str[len]; str[len] = str[len3]; str[len3] = work; } } int main(){ char str[20]; while (cin >> str) { srot(str); cout << str << endl; } }
a.cc: In function 'void srot(char*)': a.cc:8:15: error: 'strlen' was not declared in this scope 8 | len = strlen(str); | ^~~~~~ 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>
s874723365
p00006
C++
#include <string> #include <iostream> using namespace std; int main() { string str; cin >> str; reverse( str.begin() , str.end() ); cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'reverse' was not declared in this scope 11 | reverse( str.begin() , str.end() ); | ^~~~~~~
s578856515
p00006
C++
print raw_input()[::-1]
a.cc:1:1: error: 'print' does not name a type; did you mean 'int'? 1 | print raw_input()[::-1] | ^~~~~ | int
s616748595
p00006
C++
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string str; get.line (cin, string); reverse(str.begin(), str.end()); cout << str << endl; }
a.cc: In function 'int main()': a.cc:8:7: error: overloaded function with no contextual type information 8 | get.line (cin, string); | ^~~~ a.cc:8:24: error: expected primary-expression before ')' token 8 | get.line (cin, string); | ^
s579653168
p00006
C++
#include<iostream> using namespace std; int main(void){ string str; cin >> str; int l = str.size(); for(i = l; i >= 0; i++){ cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | for(i = l; i >= 0; i++){ | ^
s695224523
p00006
C++
#include<cstdio> #include<cstring> using namespace std; int main(void){ char str[25]; scanf("%s",str); int l = strlen(str); for(int i = l; i >= 0; i--){ putchar(str[i]); } putchar('\n"); return 0; }
a.cc:12:11: warning: missing terminating ' character 12 | putchar('\n"); | ^ a.cc:12:11: error: missing terminating ' character 12 | putchar('\n"); | ^~~~~~ a.cc: In function 'int main()': a.cc:13:3: error: expected primary-expression before 'return' 13 | return 0; | ^~~~~~
s130924475
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string a; int c; string d[20]; c=0; cin >> a; while(string b(a,c,0)){ d[c]=b; c=c+1;} int e; e=c-1; while(e>=0){ cout << d[e]; e=e-1;} }
a.cc: In function 'int main()': a.cc:11:15: error: expected initializer before '(' token 11 | while(string b(a,c,0)){ | ^ a.cc:11:15: error: could not convert 'b' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 11 | while(string b(a,c,0)){ | ^ | | | std::string {aka std::__cxx11::basic_string<char>} a.cc:11:15: error: expected ')' before '(' token 11 | while(string b(a,c,0)){ | ~ ^ | ) a.cc:11:22: error: expected ';' before ')' token 11 | while(string b(a,c,0)){ | ^ | ;
s872621087
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string a; cin >> a; int b; b=a size(); int c; c=b-1; while(c>=0){ string d(a,c,1); cout << d; c=c-1;} }
a.cc: In function 'int main()': a.cc:9:3: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment 9 | b=a size(); | ^ | | | std::string {aka std::__cxx11::basic_string<char>}
s178408403
p00006
C++
#include <iostream> #include<string> using namespace std; int main(){ string s; cin>>s; for(int i=s.size()-1;i--){ cout<<s[i]; }cout<<endl; }
a.cc: In function 'int main()': a.cc:9:33: error: expected ';' before ')' token 9 | for(int i=s.size()-1;i--){ | ^ | ;
s375084522
p00006
C++
#include <iostream> using namespace std; int main(void) { char str[20]; cin >> str; for(int i=strlen(str) - 1;i>=0;i--) { putchar(str[i]); } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: 'strlen' was not declared in this scope 10 | for(int i=strlen(str) - 1;i>=0;i--) | ^~~~~~ 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 | using namespace std;
s318385310
p00006
C++
#include <iostream> #include <string> #include <algorithm.h> using namespace std; int main() { string a; cin>>a; reverse(a.begin(),a.end()); cout<<a<<endl; return 0; }
a.cc:3:10: fatal error: algorithm.h: No such file or directory 3 | #include <algorithm.h> | ^~~~~~~~~~~~~ compilation terminated.
s699594195
p00006
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; void main() { char k[25]; scanf("%s",k); reverse(k,k+strlen(k)); printf("%s",k); }
a.cc:7:1: error: '::main' must return 'int' 7 | void main() | ^~~~
s833226247
p00006
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; void main() { char k[100]; scanf("%s",k); reverse(k,k+strlen(k)); printf("%s",k); }
a.cc:7:1: error: '::main' must return 'int' 7 | void main() | ^~~~
s314048838
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main( void ) { string in; while( cin >> in ) { reverse(in.begin(), in.end()) cout << in << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:35: error: expected ';' before 'cout' 12 | reverse(in.begin(), in.end()) | ^ | ; 13 | cout << in << endl; | ~~~~
s980138720
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main( void ) { string in; while( cin >> in ) { reverse(in.begin(), in.end())' cout << in << endl; } return 0; }
a.cc:12:35: warning: missing terminating ' character 12 | reverse(in.begin(), in.end())' | ^ a.cc:12:35: error: missing terminating ' character a.cc: In function 'int main()': a.cc:12:35: error: expected ';' before 'cout' 12 | reverse(in.begin(), in.end())' | ^ | ; 13 | cout << in << endl; | ~~~~
s142447844
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { stirng s; while(cin >> s) { reverse(s.begin(), s.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'stirng' was not declared in this scope 7 | stirng s; | ^~~~~~ a.cc:8:16: error: 's' was not declared in this scope 8 | while(cin >> s) { | ^
s567515105
p00006
C++
#include <iostream> #include <string.h> using namespace std; int main() { char *rev; cin>>rev; strrev(rev); cout<<rev<<"\n"; }
a.cc: In function 'int main()': a.cc:9:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 9 | strrev(rev); | ^~~~~~ | strsep
s161701313
p00006
C++
#include <iostream> #include <string.h> using namespace std; int main() { while(1) { char str[20]; cin>>str; strrev(str); cout<<str<<"\n"; } return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 11 | strrev(str); | ^~~~~~ | strsep
s639707930
p00006
C++
nclude<iostream> #include<vector> #include<set> #include<climits> #include<cfloat> #include<cmath> #include<algorithm> #include<string> using namespace std; int main(void){ string s; cin >> s; reverse(s.begin(),s.end()); cout << s << endl; return 0; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared 984 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std' 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std' 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std' 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std' 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope 1451 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 63 | #include <bits/version.h> +++ |+#include <cstddef> 64 | /usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid 1451 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared 1453 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope 1454 | struct extent<_Tp[_Size], 0> | ^~~~~ /usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid 1454 | struct extent<_Tp[_Size], 0> | ^ /usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~ /usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid 1455 | : public integral_constant<size_t, _Size> { }; | ^ /usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid /usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared 1457 | template<typename _Tp, unsigned _Uint, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope 1458 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid 1458 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope 1463 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid 1463 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type 1857 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ /usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp' 1860 | struct __select; | ^~~~~~~~ /usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared 1862 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared 1866 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> |
s142338961
p00006
C++
(function() { 'use strict'; var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; var push = ArrayProto.push, slice = ArrayProto.slice, concat = ArrayProto.concat, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; var nativeForEach = ArrayProto.forEach, nativeMap = ArrayProto.map, nativeReduce = ArrayProto.reduce, nativeReduceRight = ArrayProto.reduceRight, nativeFilter = ArrayProto.filter, nativeEvery = ArrayProto.every, nativeSome = ArrayProto.some, nativeIndexOf = ArrayProto.indexOf, nativeLastIndexOf = ArrayProto.lastIndexOf, nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeBind = FuncProto.bind; this._ = {}; var each = _.each = _.forEach = function(obj, iterator, context) { if (obj == null) return; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { for (var i = 0, l = obj.length; i < l; i++) { if (iterator.call(context, obj[i], i, obj) === breaker) return; } } else { for (var key in obj) { if (_.has(obj, key)) { if (iterator.call(context, obj[key], key, obj) === breaker) return; } } } }; _.extend = function(obj) { each(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { obj[prop] = source[prop]; } } }); return obj; }; }).call(global); (function(undefined){ 'use strict'; var INPUT_TYPE = 'string'; var INPUT_REGEXP_LIST = {}; INPUT_REGEXP_LIST['string'] = /\w*/g; INPUT_REGEXP_LIST['number'] = /[-]?\d+/g; var INPUT_REGEXP = INPUT_REGEXP_LIST[INPUT_TYPE]; (function init() { this.output = function() { console.log.apply( console, arguments ); }; this.stdin = process.openStdin(); stdin.setEncoding('utf8'); this.input_list = []; stdin.on('data', function(chunk){ var result = chunk.match(INPUT_REGEXP); input_list = input_list.concat(result); }); stdin.on('end', function(){ fire(); }); _.extend( this, { input_number: function() { return parseInt( input_list.splice(0,1)[0] ); }, input_text: function() { return input_list.splice(0,1)[0]; }, has_next: function() { return ! input_list.length; } } ); }).call( this ); (function solver(){ this.fire = function() { setTimeout( solve, 0, this ); }; function solve() { output( input_text().split('').reverse().join('') ); if ( ! has_next() ) setTimeout( solve, 0, this ); } }).call(this); }).call(global);
a.cc:2:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 2 | 'use strict'; | ^~~~~~~~~~~~ a.cc:56:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 56 | 'use strict'; | ^~~~~~~~~~~~ a.cc:58:26: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 58 | var INPUT_TYPE = 'string'; | ^~~~~~~~ a.cc:61:27: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 61 | INPUT_REGEXP_LIST['string'] = /\w*/g; | ^~~~~~~~ a.cc:61:40: error: stray '\' in program 61 | INPUT_REGEXP_LIST['string'] = /\w*/g; | ^ a.cc:62:27: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 62 | INPUT_REGEXP_LIST['number'] = /[-]?\d+/g; | ^~~~~~~~ a.cc:62:44: error: stray '\' in program 62 | INPUT_REGEXP_LIST['number'] = /[-]?\d+/g; | ^ a.cc:70:35: warning: multi-character character constant [-Wmultichar] 70 | stdin.setEncoding('utf8'); | ^~~~~~ a.cc:72:26: warning: multi-character character constant [-Wmultichar] 72 | stdin.on('data', function(chunk){ | ^~~~~~ a.cc:76:26: warning: multi-character character constant [-Wmultichar] 76 | stdin.on('end', function(){ | ^~~~~ a.cc:97:52: error: empty character constant 97 | output( input_text().split('').reverse().join('') ); | ^~ a.cc:97:71: error: empty character constant 97 | output( input_text().split('').reverse().join('') ); | ^~ a.cc:1:12: error: expected ')' before '{' token 1 | (function() { | ~ ^~ | ) a.cc:53:2: error: expected unqualified-id before ')' token 53 | }).call(global); | ^ a.cc:55:10: error: expected ')' before '(' token 55 | (function(undefined){ | ~ ^ | ) a.cc:103:2: error: expected unqualified-id before ')' token 103 | }).call(global); | ^
s013449857
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main() { int i,j; char s[20]; cin>>s; for(i=0,j=strlen(s)-1;i<j;i++,j--) {char temp; atemp=s[i]; s[i]=s[j]; s[j]=temp; } cout<<s; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'atemp' was not declared in this scope; did you mean 'temp'? 10 | atemp=s[i]; | ^~~~~ | temp
s141205159
p00006
C++
#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { string src; cin >> src; reverse(src.begin(), src.end()); cout << src << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(src.begin(), src.end()); | ^~~~~~~
s325513893
p00006
C++
#include <iostream> #include <iomanip> #include <list> #include <map> #include <algorithm> #include <stack> using namespace std; int main(){ char str[20]; int j = 0; memset(str,'\0',sizeof(str)); while(cin >> str){ for(int i = sizeof(str) / sizeof(char) - 1; i >= 0; i--){ if(str[i] != '\0'){ cout << str[i]; } } cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'memset' was not declared in this scope 14 | memset(str,'\0',sizeof(str)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <stack> +++ |+#include <cstring> 7 |
s564139301
p00006
C++
#include <stdio.h> #include <string.h> int main (void) { char s[21]; int i; int l; printf("Input text: "); gets(s); l=strlen(s); for (i=l-1;i>=0;i--){ printf("%c",s[i]); } printf("\n"); system("pause"); }
a.cc: In function 'int main()': a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(s); | ^~~~ | getw a.cc:16:5: error: 'system' was not declared in this scope 16 | system("pause"); | ^~~~~~
s642606146
p00006
C++
#include <iostream> #include <stdlib.h> #include <string.h> #include <string> using namespace std; int main() { string s; cin>>s; cout<<strrev((char*)s.c_str())<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 10 | cout<<strrev((char*)s.c_str())<<endl; | ^~~~~~ | strsep
s426385714
p00006
C++
#include <iostream> #include <string.h> using namespace std; int main() { char str[21]; cin>>str; while(cin>>str) { int len=strlen(str); for(int i=str;i>=0;i--) cout<<str[i]; cout<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: invalid conversion from 'char*' to 'int' [-fpermissive] 11 | for(int i=str;i>=0;i--) | ^~~ | | | char*
s791460693
p00006
C++
int main() { char *a; char str[256]; // cout << "data_size=" << data_size << endl; while (cin.getline(str,256)){ int data_size = sizeof(a) / sizeof(a[0]); for(int i=0;i<=data_size;i++) cout << str[data_size - i]; cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: 'cin' was not declared in this scope 6 | while (cin.getline(str,256)){ | ^~~ a.cc:9:25: error: 'cout' was not declared in this scope 9 | cout << str[data_size - i]; | ^~~~ a.cc:10:17: error: 'cout' was not declared in this scope 10 | cout << endl; | ^~~~ a.cc:10:25: error: 'endl' was not declared in this scope 10 | cout << endl; | ^~~~
s862475093
p00006
C++
#include <iostream> #include <iomanip> using namespace std; int main(){ int size; char str[21]; cin >> setw(21) >> str; size = strlen(str); for(int i=size-1;0<=i;i--){ cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:12: error: 'strlen' was not declared in this scope 10 | size = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iomanip> +++ |+#include <cstring> 3 |
s931003675
p00006
C++
#include <iostream> #include <iomanip> #include <string> using namespace std; int main(){ int size; char str[21]; cin >> setw(21) >> str; size = strlen(str); for(int i=size-1;0<=i;i--){ cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:12: error: 'strlen' was not declared in this scope 11 | size = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iomanip> +++ |+#include <cstring> 3 | #include <string>
s851229506
p00006
C++
#include <string> #include <cstdio> #include <iostream> #include <iomanip> using namespace std; int main(){ int size; char str[21]; cin >> setw(21) >> str; size = strlen(str); for(int i=size-1;0<=i;i--){ cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:12: error: 'strlen' was not declared in this scope 12 | size = strlen(str); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <iomanip> +++ |+#include <cstring> 5 |
s200097680
p00006
C++
#include<stdio.h> #include<string.h> int void() { char str[20]; gets(str); strrev(str); puts(str); }
a.cc:3:10: error: expected unqualified-id before ')' token 3 | int void() | ^
s727409808
p00006
C++
#include <iostream> #include <string> using namespace std; int main(void){ string str; cin >> str; reverse(str.begin(), str.end()); cout << str << endl; }
a.cc: In function 'int main()': a.cc:8:3: error: 'reverse' was not declared in this scope 8 | reverse(str.begin(), str.end()); | ^~~~~~~
s272846266
p00006
C++
#include <stdio.h> #include <iostream> #include <string> using namespace std; int main() { int kazu; char rin[21]; scanf("%s",rin); kazu = strlen(rin); for(int i = kazu-1; i >= 0; i--) { cout << rin[i]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:13:16: error: 'strlen' was not declared in this scope 13 | kazu = strlen(rin); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |+#include <cstring> 3 | #include <string>
s299672630
p00006
C++
#include<iostream> #include<string> int main(){ std::string str; std::cin>>str; for(int i=str.size-1;i>=0;i--){ std::cout<<str[i]; } return 0; }
a.cc: In function 'int main()': a.cc:6:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 6 | for(int i=str.size-1;i>=0;i--){ | ~~~~^~~~ | ()
s108845320
p00006
C++
#include <stdio.h> #include <string> int main() { char p[20]; int i; gets(p); for(i=(strlen(p)-1);i>=0;i--) printf("%c",p[i]); printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(p); | ^~~~ | getw a.cc:8:8: error: 'strlen' was not declared in this scope 8 | for(i=(strlen(p)-1);i>=0;i--) | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <string> +++ |+#include <cstring> 3 | int main()
s678443548
p00006
C++
#include<iostream> #include<iomanip> using namespace std; int main(){ char str[21]; int i, l; cin >> setw(21) >>str; l = strlen(str); for( i=1; i<=l; i++ ){ cout << str[ l - i ]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: 'strlen' was not declared in this scope 12 | l = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iomanip> +++ |+#include <cstring> 3 | using namespace std;
s821019704
p00006
C++
#include<stdio.h> #include<string.h> int main() { char ch[20]; int i; while(gets(ch)!=EOF) { for(i=0;ch[i]!='\0';i++) { } for(i=i-1;i>=0;i--) { printf("%c",ch[i]); } printf("\n"); } return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | while(gets(ch)!=EOF) | ^~~~ | getw
s087421862
p00006
C++
#include<iostream> #include<string> int main(){ std::string a; srd::cin>>a; for(int i=a.size();i>=0;i--){ std::cout<<a[i]; } std::cout<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:2: error: 'srd' has not been declared 5 | srd::cin>>a; | ^~~
s393149462
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(), s.end()); | ^~~~~~~
s687671583
p00006
C++
#include<iostream> using namespace std; int main(){ string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:4: error: 'reverse' was not declared in this scope 11 | reverse(str.begin(),str.end()); | ^~~~~~~
s902210447
p00006
C++
#include<iostream> using namespace std; int main(){ string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:4: error: 'reverse' was not declared in this scope 11 | reverse(str.begin(),str.end()); | ^~~~~~~
s978352864
p00006
C++
#include<iostream> using namespace std; int main(){ string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:4: error: 'reverse' was not declared in this scope 11 | reverse(str.begin(),str.end()); | ^~~~~~~
s312852085
p00006
C++
include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s708307866
p00006
C++
#include<stdio.h> #include <string.h> int main() { char a[30]; scanf("%s",&a); strrev(a); printf("%s\n",a); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev(a); | ^~~~~~ | strsep
s150099094
p00006
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main(){ char str[30]={}; int i=0; cin >> str; for(i = str.length() - 1;i>=0;i--) cout<<str[i]; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:21: error: request for member 'length' in 'str', which is of non-class type 'char [30]' 12 | for(i = str.length() - 1;i>=0;i--) cout<<str[i]; | ^~~~~~
s050884734
p00006
C++
#include<iostream> #include<stdio.h> #include <string> using namespace std; int main(){ string a; cin>>a; reverse(a.begin(), a.end()); cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(a.begin(), a.end()); | ^~~~~~~
s919432849
p00006
C++
#include<iostream> #include<stdio.h> #include <string> using namespace std; int main(){ string a; cin>>a; reverse(a.begin(), a.end()); cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(a.begin(), a.end()); | ^~~~~~~
s297019853
p00006
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> using namespace std; int main(void){ string str; cin>>str; for(int i=length(str);i--;){ cout<<str[i]; } cout<<endl; }
a.cc: In function 'int main()': a.cc:11:19: error: 'length' was not declared in this scope 11 | for(int i=length(str);i--;){ | ^~~~~~
s746359641
p00006
C++
#include <iostream> #include <string> using namespace std; int main(void){ string text; cin>>text; reverse(text.begin(), text.end()); cout<<text<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'reverse' was not declared in this scope 9 | reverse(text.begin(), text.end()); | ^~~~~~~
s321252118
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ cin>>string s; for(int i=s.length();i>0;i--) cout<<s.at(i-1); cout<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:6:21: error: expected primary-expression before 's' 6 | cin>>string s; | ^ a.cc:7:19: error: 's' was not declared in this scope 7 | for(int i=s.length();i>0;i--) cout<<s.at(i-1); | ^
s324934819
p00006
C++
#include<iostream> #include<cstdio> #include<string> //入力された文字列を逆順に出力 using namespace std; int main(){ char a[20]; scanf("%s",a); for(int i =strlen(a)-1;i >=0;i--){ putchar(a[i]); } }
a.cc: In function 'int main()': a.cc:10:14: error: 'strlen' was not declared in this scope 10 | for(int i =strlen(a)-1;i >=0;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 | #include<string>
s489233982
p00006
C++
#include<iostream> #include<cstdio> #include<string> //入力された文字列を逆順に出力 using namespace std; int main(){ char a[20]; scanf("%s",a); for(int i =strlen(a)-1;i >=0;i--){ putchar(a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: 'strlen' was not declared in this scope 10 | for(int i =strlen(a)-1;i >=0;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 | #include<string>
s091778034
p00006
C++
#include<iostream> #include<cstdio> #include<string> #include<stdio.h> //入力された文字列を逆順に出力 using namespace std; int main(){ char a[20]; scanf("%s",a); for(int i =strlen(a)-1;i >=0;i--){ putchar(a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: 'strlen' was not declared in this scope 11 | for(int i =strlen(a)-1;i >=0;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 | #include<string>
s569432420
p00006
C++
#include<iostream> #include<cstdio> #include<string> #include<stdio.h> //入力された文字列を逆順に出力 using namespace std; int main(){ char a[20]; scanf("%s",a); for(int i =strlen(a)-1;i >=0;i--){ putchar(a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: 'strlen' was not declared in this scope 11 | for(int i =strlen(a)-1;i >=0;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 | #include<string>
s802989575
p00006
C++
#include<iostream> #include<cstdio> #include<string> #include<stdio.h> //入力された文字列を逆順に出力 using namespace std; int main(){ char a[20]; scanf("%s",a); for(int i =strlen(a)-1;i >=0;i--){ putchar(a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: 'strlen' was not declared in this scope 11 | for(int i =strlen(a)-1;i >=0;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 | #include<string>
s871287533
p00006
C++
#include<iostream> #include<cstdio> #include<string> #include<stdio.h> //入力された文字列を逆順に出力 using namespace std; int main(){ char a[20]; scanf("%s",a); for(int i =strlen(a)-1;i >=0;i--){ putchar(a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: 'strlen' was not declared in this scope 11 | for(int i =strlen(a)-1;i >=0;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 | #include<string>
s543317978
p00006
C++
#include<iostream> using namespace std; int main() { char a[20]; cin >> a; for (int i = strlen(a)-1;i>=0;i--){ cout << a[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:22: error: 'strlen' was not declared in this scope 9 | for (int i = strlen(a)-1;i>=0;i--){ | ^~~~~~ 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 | using namespace std;
s792047874
p00006
C++
#include <stdio.h> #include <string.h> int main() { char arr[21]; gets(arr); strrev(arr); printf("%s",arr); return 0; }
a.cc: In function 'int main()': a.cc:7:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(arr); | ^~~~ | getw a.cc:8:4: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(arr); | ^~~~~~ | strsep
s997721536
p00006
C++
#include <iostream> using namespace std; int main(){ char a[40]; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len;i>=0;i--){ cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'strlen' was not declared in this scope 7 | len = strlen(a); | ^~~~~~ 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 | using namespace std;
s370176092
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ char a[40]; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len;i>=0;i--){ cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | len = strlen(a); | ^~~~~~ 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>
s743551421
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ char a[40]; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len;i>=0;i--){ cout<<a[i]; } return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | len = strlen(a); | ^~~~~~ 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>
s758387167
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ char a[40]; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len;i>=0;i--){ cout<<a[i]; } cout<<\n<<endl; return 0; }
a.cc:12:7: error: stray '\' in program 12 | cout<<\n<<endl; | ^ a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | len = strlen(a); | ^~~~~~ 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> a.cc:12:8: error: 'n' was not declared in this scope 12 | cout<<\n<<endl; | ^
s565721055
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ char a[40]; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len;i>=0;i--){ cout<<a[i]; } cout<<' '<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | len = strlen(a); | ^~~~~~ 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>
s592989530
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ char a[40]; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len;i>=0;i--){ cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: 'strlen' was not declared in this scope 9 | len = strlen(a); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 | using namespace std;
s427389885
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ char a[40]={0}; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len-1;i>=0;i--){ cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: 'strlen' was not declared in this scope 9 | len = strlen(a); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 | using namespace std;
s424025272
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ char a[40]={0}; int len,b; cin>>a; len = strlen(a); for(int i=len-1;i>=0;i--){ cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: 'strlen' was not declared in this scope 9 | len = strlen(a); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 | using namespace std;
s618215276
p00006
C++
#include <iostream> #include <iostring> #include <algorithm> using namespace std; int main(){ char a[40]={0}; int len,b; cin.getline(a,40); len = strlen(a); for(int i=len-1;i>=0;i--){ cout<<a[i]; } cout<<endl; return 0; }
a.cc:2:10: fatal error: iostring: No such file or directory 2 | #include <iostring> | ^~~~~~~~~~ compilation terminated.
s414066165
p00006
C++
#include<stdio.h> #include<string.h> int main() { char a[21]; gets(a); strrev(a); puts(a); return 0; }
a.cc: In function 'int main()': a.cc:7:6: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw a.cc:8:6: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(a); | ^~~~~~ | strsep
s874882661
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; int i; while(cin>>s) { strreverse(s) cout<<s<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:3: error: 'strreverse' was not declared in this scope 15 | strreverse(s) | ^~~~~~~~~~
s454828019
p00006
C++
#include <iostream> #include<algorithm> #include<string.h> using namespace std; int main() { char ar[25]; gets(ar); reverse(ar,ar + strlen(ar)); puts(ar); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(ar); | ^~~~ | getw
s726732225
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; }
a.cc: In function 'int main()': a.cc:7:9: error: 'reverse' was not declared in this scope 7 | reverse(str.begin(),str.end()); | ^~~~~~~
s357215177
p00006
C++
#include<iostream> using namespace std; int main() { char s[21]; cin.getline(s, 21, '\n'); int l = strlen(s); for (int i = l - 1; i >= 0; i--) cout << s[i]; return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: 'strlen' was not declared in this scope 8 | int 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 | using namespace std;
s926746293
p00006
C++
#include<iostream> using namespace std; int main() { char s[21]; cin.getline(s, 21, '\n'); int l = strlen(s); for (int i = l - 1; i >= 0; i--) cout << s[i]; return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: 'strlen' was not declared in this scope 8 | int 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 | using namespace std;
s806924812
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char s[21]; cin.getline(s, 21, '\n'); int l = strlen(s); for (int i = l - 1; i >= 0; i--) cout << s[i]; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: 'strlen' was not declared in this scope 9 | int 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>
s238436567
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char s[21]; cin.getline(s, 21, '\n'); int l = strlen(s); for (int i = l - 1; i >= 0; i--) cout << s[i]; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: 'strlen' was not declared in this scope 9 | int 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>
s473666757
p00006
C++
#include <iostream> using namespace std; int main() { string s; cin>>s; for(int i=s.size();--i); cout<<s[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:7:31: error: expected ';' before ')' token 7 | for(int i=s.size();--i); | ^ | ; a.cc:8:25: error: 'i' was not declared in this scope 8 | cout<<s[i]; | ^
s729645176
p00006
C++
#include <iostream> using namespace std; int main() { string s; cin>>s; for(int i=s.size();--i) cout<<s[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:7:31: error: expected ';' before ')' token 7 | for(int i=s.size();--i) | ^ | ;
s324547042
p00006
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #define ll long long using namespace std; int main() { //int k,i,j,tep,x,a[170],m; char a[22]; gets(a); cout<<strrev(a)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 13 | gets(a); | ^~~~ | getw a.cc:14:12: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 14 | cout<<strrev(a)<<endl; | ^~~~~~ | strsep
s894110266
p00006
C++
#include<stdio.h> #include<string.h> int main() { char arr[20]; gets(arr); strrev(arr); printf("%s\n",arr); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(arr); | ^~~~ | getw a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev(arr); | ^~~~~~ | strsep
s790137220
p00006
C++
#include<stdio.h> #include<string.h> int main(){ char str[50]; char *rev; scanf("%s",str); rev = strrev(str); printf("%s ",rev); return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | rev = strrev(str); | ^~~~~~ | strsep
s759729051
p00006
C++
#include<stdio.h> #include<string.h> int main(){ char str [20]; gets(str ); strrev(str ); printf("%s",str ); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(str ); | ^~~~ | getw a.cc:6:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 6 | strrev(str ); | ^~~~~~ | strsep
s854519099
p00006
C++
#include<bits/stdc++.h> int main() { int m,n,i,j,k,l; char a[400]; while(scanf("%s",&a)==1) { strrev(a); printf("%s",a); printf("\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(a); | ^~~~~~ | strsep
s264045970
p00006
C++
#include<stdio.h> #include<string.h> int main() { char str,rev,arr[100]; printf("Enter a string to reverse\n"); gets(arr); strrev(arr); printf("%s",arr); return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(arr); | ^~~~ | getw a.cc:9:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 9 | strrev(arr); | ^~~~~~ | strsep
s623556021
p00006
C++
#include<stdio.h> #include<string.h> int main() { char str,rev,arr[100]; gets(arr); strrev(arr); printf("%s",arr); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(arr); | ^~~~ | getw a.cc:8:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(arr); | ^~~~~~ | strsep
s529577976
p00006
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string s; cin>>s; reverse(s.begin(),s.end()); cout<<s<<endl;
a.cc: In function 'int main()': a.cc:9:23: error: expected '}' at end of input 9 | cout<<s<<endl; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s469478379
p00006
C++
#include <string.h> int main( void ){ char str[20]; scanf( "%s",str ); for( int i = strlen( str )-1;i > 0;i-- )printf( "%c",str[i-1] ); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'scanf' was not declared in this scope 5 | scanf( "%s",str ); | ^~~~~ a.cc:6:45: error: 'printf' was not declared in this scope 6 | for( int i = strlen( str )-1;i > 0;i-- )printf( "%c",str[i-1] ); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 1 | #include <string.h> +++ |+#include <cstdio> 2 |