submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s683256747
p00006
C++
#include <iostream> #include <string> #define MAX 20 using namespace std; int main() { char str[MAX]; cin >> str; int len = strlen(str); for (int i = len - 1; i >= 0; i--) { cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: 'strlen' was not declared in this scope 12 | int 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> +++ |+#inclu...
s193510135
p00006
C++
#include "bits/stdc++.h" using namespace std; long long int gcd(long long int l, long long int r) { assert(l > 0 && r > 0); if (l > r)return gcd(r, l); else { const long long int num = r%l; if (num) { return gcd(l, num); } else { return l; } } } long long int lca(long long int l, long long int r) {...
a.cc: In function 'int main()': a.cc:22:39: error: expected primary-expression before '%' token 22 | reverse(st.begin(), st.end());% | ^ a.cc:23:9: error: expected primary-expression before 'return' 23 | return 0; | ^~~~~~
s665212489
p00006
C++
#include <bits/stdcc++.h> using namespace std; int main() { char a[21]; scanf("%s",a); int b=strlen(a); for(int c=b-1;c!=-1;c--)printf("a[c]"); printf("\n"); }
a.cc:1:10: fatal error: bits/stdcc++.h: No such file or directory 1 | #include <bits/stdcc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s083419109
p00006
C++
#include <bits/stdcc++.h> using namespace std; int main() { char a[21]; scanf("%s",a); int b=strlen(a); for(int c=b-1;c!=-1;c--)printf("%c",a[c]); printf("\n"); }
a.cc:1:10: fatal error: bits/stdcc++.h: No such file or directory 1 | #include <bits/stdcc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s557805912
p00006
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> //ranker using namespace std; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, stri...
a.cc:19:11: error: 'complex' does not name a type 19 | using P = complex<D>; | ^~~~~~~ a.cc:20:34: error: 'priority_queue' does not name a type 20 | template <typename T> using PQ = priority_queue<T>; | ^~~~~~~~~~~~~~ a.cc:21:37: error: 'priority_queue' does ...
s968516940
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()); | ^~~~~~~
s732253701
p00006
C++
#include <iostream> #include <string> int main(){ string str; int num; std::cin >> str; num = str.length(); for(int i=num-1; i>=0; i--){ std::cout << str[i]; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream...
s329468962
p00006
C++
#include <iostream> #include <string> int main(){ string str; int num; std::cin >> str; num = str.length(); for(int i=num-1; i>=0; i--){ std::cout << str[i]; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream...
s855676333
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str),x; for (int i = 0; i < length; i++){ x = length - i-1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: 'strlen' was not declared in this scope 7 | int length = strlen(str),x; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+...
s869056029
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str),x; for (int i = 0; i < length; i++){ x = length - i-1; cout <<str[x]; } cout << "\n"; cin >> x; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'strlen' was not declared in this scope 8 | int length = strlen(str),x; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+...
s648118919
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'strlen' was not declared in this scope 8 | int length = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#i...
s546320141
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'strlen' was not declared in this scope 8 | int length = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#i...
s313425495
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = std::strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 8 | int length = std::strlen(str); | ^~~~~~ | mbrlen
s715774744
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = std::strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\0\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 8 | int length = std::strlen(str); | ^~~~~~ | mbrlen
s770077100
p00006
C++
#include<iostream> //#include<algorithm> //#include<cmath> #include<string> //#include<cctype> //#include <vector> 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:11:9: error: 'reverse' was not declared in this scope 11 | reverse(s.begin(), s.end()); | ^~~~~~~
s798995881
p00006
C++
#include<iostream> #include<string.h> using namespace std; int main() { char a[30]; while (cin >> a) { strrev(a); cout << a << endl; } }
a.cc: In function 'int main()': a.cc:9:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 9 | strrev(a); | ^~~~~~ | strsep
s466057814
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[20] = {}; char b[20] = {}; cin >> a; for (int i = 0; i < strlen(a); i++) { b[i] = a[strlen(a) - i]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:29: error: 'strlen' was not declared in this scope 9 | for (int i = 0; i < strlen(a); i++) { | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<i...
s229320163
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[20] = {}; char b[20] = {}; int alen; cin >> a; alen = strlen(a); for (int i = 0; i < alen; i++) { b[i] = a[alen - i-1]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'strlen' was not declared in this scope 10 | alen = 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 <cstri...
s364373906
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[21] = {}; char b[21] = {}; int alen = 0; cin >> a; alen = strlen(a); for (int i = 0; i < alen; i++) { b[i] = a[alen - i-1]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'strlen' was not declared in this scope 10 | alen = 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 <cstri...
s785502833
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[21] = {}; char b[21] = {}; int alen = 0; cin >> a; alen = strlen(a); for (int i = 0; alen >= 0; alen--, i++) { b[i] = a[alen -1]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'strlen' was not declared in this scope 10 | alen = 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 <cstri...
s639270639
p00006
C++
#include <iostream> #include <algorithm> #include <stdlib.h> #include <iomanip> #include <String> #include <cmath> #define PI 3.14159265359 using namespace std; int main() { char tmpstr[20]; cin >> tmpstr; string str(tmpstr); auto itr = str.end() - 1; for (; itr > str.begin(); --itr) { cout << *itr; } cout <<...
a.cc:5:10: fatal error: String: No such file or directory 5 | #include <String> | ^~~~~~~~ compilation terminated.
s115495329
p00006
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int n; n=strlen(s); char a[n]; for(int i=0;i<n;i++){ a[i]=s[i]; } for(int i=n-1;i>=0;i--){ s[i]=a[i]; } cout<<s<<endl; return(0); }
a.cc: In function 'int main()': a.cc:8:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 8 | n=strlen(s); | ^ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/1...
s803859651
p00006
C++
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <s...
a.cc: In function 'int main()': a.cc:29:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s879835068
p00006
C++
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <s...
a.cc:25:1: error: '::main' must return 'int' 25 | string main() | ^~~~~~ a.cc: In function 'int main()': a.cc:29:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Tr...
s432259844
p00006
C++
#include <iostream> using namespace std; int main() { char str[20]; cin >> str; int len = strlen(str); for (int i = len; i >0; i--) { cout << str[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: 'strlen' was not declared in this scope 9 | int 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> +++ |+#includ...
s573487502
p00006
C++
#include <iostream> #include<stdio.h> using namespace std; int main() { char str[20]; cin >> str; int len = strlen(str); for (int i = len; i >0; i--) { cout << str[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: 'strlen' was not declared in this scope 10 | int 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> +++ |+#inclu...
s377234685
p00006
C++
#include <iostream> #include<stdio.h> using namespace std; int main() { char str[20]; cin >> str; int len = strlen(str); for (int i = len; i >0; i--) { cout << str[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: 'strlen' was not declared in this scope 10 | int 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> +++ |+#inclu...
s320215698
p00006
C++
#include <iostream> using namespace std; int main() { char sr[20]; cin >> sr; int len = strlen(sr); for (int i = len; i >0; i--) { cout << sr[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: 'strlen' was not declared in this scope 9 | int len = strlen(sr); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include...
s392510710
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string str[20]; string str2[20]; cin >> str; for(int i=0; i<sizeof(str)/; i++){ int j = sizeof(str) / sizeof(string); str2[i] = str[j--]; } return 0; }
a.cc: In function 'int main()': a.cc:9:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'}) 9 | cin >> str; | ~~~ ^~ ~~~ | | | | | std::string [20] {aka std::__cxx1...
s488875324
p00006
C++
#include <iostream> using namespace std; int main() { string str,str2=""; cin >> str; for(int i = str.length() - 1; i >= 0; i--) str2 += str[i]; str2 += NULL; cout << str2; return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: ambiguous overload for 'operator+=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'long int') 11 | str2 += NULL; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c+...
s808787499
p00006
C++
process.stdin.resume(); process.stdin.setEncoding('utf8'); // Here your code ! process.stdin.on("data",function(chunk){ console.log(chunk.split("").reverse().join()) })
a.cc:2:27: warning: multi-character character constant [-Wmultichar] 2 | process.stdin.setEncoding('utf8'); | ^~~~~~ a.cc:1:1: error: 'process' does not name a type 1 | process.stdin.resume(); | ^~~~~~~ a.cc:2:1: error: 'process' does not name a type 2 | process.stdin.s...
s709255987
p00006
C++
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on("data",function(chunk){ console.log(chunk.split("").reverse().join()) })
a.cc:2:27: warning: multi-character character constant [-Wmultichar] 2 | process.stdin.setEncoding('utf8'); | ^~~~~~ a.cc:1:1: error: 'process' does not name a type 1 | process.stdin.resume(); | ^~~~~~~ a.cc:2:1: error: 'process' does not name a type 2 | process.stdin.s...
s052858309
p00006
C++
import sys lines = [] for line in sys.stdin: print(line[::-1])
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s337608564
p00006
C++
#include "stdafx.h" #include <iostream> #include <sstream> #include <vector> #include <algorithm> #include <string> #include <functional> #include <numeric> #include <ctype.h> #include <cstdlib> #include <string.h> #include <cmath> #include <cstdio> using namespace std; int main() { string input, str; cin >> ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s748525140
p00006
C++
include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; for (int i = str.size()-1; i >= 0; i--) { cout << str[i]; } 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 typ...
s014989259
p00006
C++
include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; for (int i = str.size()-1; i >= 0; i--) { cout << str[i]; } cout<<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 typ...
s598002432
p00006
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string.h> using namespace std; int main(){ string x; int i; cin>>x; for(i=x.size();i--){ cout<<x[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:23: error: expected ';' before ')' token 10 | for(i=x.size();i--){ | ^ | ;
s134195268
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; for(int i=19;i>=0;i--){ cout<<"change[i]; } return 0; }
a.cc:10:15: warning: missing terminating " character 10 | cout<<"change[i]; | ^ a.cc:10:15: error: missing terminating " character 10 | cout<<"change[i]; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:11:9: error: expected primary-expression before '}' t...
s934214281
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<"change[i]; } return 0; }
a.cc:12:15: warning: missing terminating " character 12 | cout<<"change[i]; | ^ a.cc:12:15: error: missing terminating " character 12 | cout<<"change[i]; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope ...
s641716889
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<"change[i]; } return 0; }
a.cc:12:15: warning: missing terminating " character 12 | cout<<"change[i]; | ^ a.cc:12:15: error: missing terminating " character 12 | cout<<"change[i]; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope ...
s447056565
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<change[i]; } return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | int j=strlen(change); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cst...
s992381449
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<change[i]; } return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | int j=strlen(change); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cst...
s983253824
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; if(s.size()<=20){ for(int i=s.size();i>=0;i--){ cout << s[i-1]; } cout << endl; } } return 0; }
a.cc:14:9: error: expected unqualified-id before 'return' 14 | return 0; | ^~~~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s552106281
p00006
C++
#include <bits/stdc++.h> #include <vector> using namespace std; string ilham, bojos; int ndaru; int main(){ cin >> ilham; ndaru = ilham.length(); for(int i = ndaru-1; i >= 0; i-){ bojos = bojos + ilham[i]; } cout << bojos << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:40: error: expected primary-expression before ')' token 10 | for(int i = ndaru-1; i >= 0; i-){ | ^
s134518485
p00006
C++
#include<iostream> using namespace std; void solver() { string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; } int main() { solver(); return 0; }
a.cc: In function 'void solver()': a.cc:6:5: error: 'reverse' was not declared in this scope 6 | reverse(str.begin(),str.end()); | ^~~~~~~
s070387060
p00006
C++
#include <iostream> #include <cstdio> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: 'strlen' was not declared in this scope 9 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#inc...
s531587826
p00006
C++
#include <iostream> #include <cstdio> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: 'strlen' was not declared in this scope 10 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#in...
s525736322
p00006
C++
#include <iostream> #include <cstdio> #include <cstring> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'reverse' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~~
s448906099
p00006
C++
#include <iostream> #include <cstdio> #include <algorithm> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: 'strlen' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+...
s013576772
p00006
C++
#include <iostream> #include <cstdio> #include <string> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: 'strlen' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#in...
s331621263
p00006
C++
#include <iostream> #include <cstdio> #include <cstring> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(str,str+strlen(str)); | ^~~~~~~
s283951232
p00006
C++
#include <iostream> using namaspace std; int main(){ char str[20]; for (int A=0;A<20;A++)cin>>str[A]; for (int A=19;A>=0;A--)cout<<str[A]; cout<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namaspace' 2 | using namaspace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:31: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | for (int A=0;A<20;A++)cin>>str[A]; | ...
s731439589
p00006
C++
#include <iostream> using namaspace std; int main(){ char str[20],i=-1; for (;;){ i++; while(cin>>str[i]==EOF) break; } for (int A=i;A>=0;A--)cout<<str[i]; cout<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namaspace' 2 | using namaspace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:23: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | while(cin>>str[i]==EOF) break; | ^~...
s100299495
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0;; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(str.begin(),str.end()); | ^~~~~~~
s823379357
p00006
C++
#include<stdio.h> #include<string.h> #include<iostream> #include<vector> #include<set> #include<queue> #include<ctype.h> #include<math.h> #include<map> using namespace std; int main() { char a[21]; gets(a); int len=strlen(a); for(int i=len-1;i>=0;i--) putchar(a[i]); return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 14 | gets(a); | ^~~~ | getw
s111025009
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main() { char str[30]; gets(str); for(int i=strlen(str)-1;i>=0;i--) cout<<str[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(str); | ^~~~ | getw
s716698305
p00006
C++
// // Created by Undefined on 2018/2/2. // #include <iostream> #include <cstring> using namespace std; int main () { char s[21], tmp; gets(s); for (int i = 0, j = strlen(s) - 1; i < j; i++, j--) { tmp = s[i]; s[i] = s[j]; s[j] = tmp; } printf("%s\n", s); }
a.cc: In function 'int main()': a.cc:12:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(s); | ^~~~ | getw
s531854299
p00006
C++
// In the name of Allah #include <stdio.h> #include <string.h> int main(){ char st[21]; scanf("%s",&st); strrev(st); printf("%s",st); return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(st); | ^~~~~~ | strsep
s535735807
p00006
C++
string = input("input data") size = len(string) st = [] for i in range(size): st.append(string[size-i-1]) print(''.join(st), end='')
a.cc:6:7: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:6:24: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:1:1: error: 'string' does not name a type 1 | string = input("input data") | ^~~~~~
s243975520
p00006
C++
string = input("input data") size = len(string) st = [] for i in range(size): st.append(string[size-i-1]) print(''.join(st), end='') print('')
a.cc:6:7: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:6:24: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:7:7: error: empty character constant 7 | print('') | ^~ a.cc:1:1: error: 'string' does not na...
s345109585
p00006
C++
#include<iostream> #include<string> int main(void){ std::string str; std::getline(std::cin,str); str.reverse(str.begin(),sr.end()); std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 8 | str.reverse(str.begin(),sr.end()); | ^~~~~~~ | reserve a.cc:8:29: error: 'sr' was not declared in this scope; did y...
s655992409
p00006
C++
#include<iostream> #include<string> int main(void){ std::string str; std::getline(std::cin,str); str.reverse(str.begin(),str.end()); std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 8 | str.reverse(str.begin(),str.end()); | ^~~~~~~ | reserve
s965185026
p00006
C++
#include<iostream> #include<algorithm> #include<string> int main(void){ std::string str; std::getline(std::cin,str); str.reverse(str.begin(),str.end()); std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 9 | str.reverse(str.begin(),str.end()); | ^~~~~~~ | reserve
s880278727
p00006
C++
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System. in); String line = sc.nextLine(); char[] str = line.toCharArray(); char[] rts = new char[20]; for(int i=0;i<20;i++){ str[20-i]=rts[i]; } for(int i=0;i<20;i++){ System.out.pri...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s054790300
p00006
C++
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System. in); String line = sc.nextLine(); char[] str = line.toCharArray(); int n = line.length(); char[] rts = new char[20]; for(int i=0;i<n;i++){ rts[i]=str[n-i-1]; } for(int i=0;...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s922549863
p00006
C++
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<iostream> using namespace std; int main() { char c[20]; int size = 0; for (;;) { scanf_s("%c", &c[size]); if (c[size] == '\n')break; size++; } for (int i = size; i >= 0; i--) { printf("%c", c[i]); } printf("\n"); //system("pause"); ...
a.cc: In function 'int main()': a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | scanf_s("%c", &c[size]); | ^~~~~~~ | scanf
s962505390
p00006
C++
#include <stdio.h> int main(void){ // Your code here! int main(void){ char str[100]; int i; int count=0; scanf("%s",str); for(i=0;str[i]!='\0';i++){ count++; } for(i=count-1;i>=0;i--){ printf("%c",str[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:4:19: error: a function-definition is not allowed here before '{' token 4 | int main(void){ | ^ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:2:15: note: to match this '{' 2 | int main(void){ | ^
s122439197
p00006
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; cout << reverse(s.begin(), s.end()) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void') 7 | cout << reverse(s.begin(), s.end()) << endl; | ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | ...
s500522819
p00006
C++
main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);} | ^
s411753207
p00006
C++
main(i){char a[21];for(scanf("%s",a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){char a[21];for(scanf("%s",a),i=strlen(a)+1;i;i--)putchar(a[i-1]);} | ^
s947243292
p00006
C++
#include<stdio,h> #include<string.h> int main(){ char a[20]; int l,i; scanf("%s",a); l=strlen(a); for(i=l-1;i>=0;i--) printf("%c",a[i]); return 0; }
a.cc:1:9: fatal error: stdio,h: No such file or directory 1 | #include<stdio,h> | ^~~~~~~~~ compilation terminated.
s687642933
p00006
C++
main(a,b){ for(;scanf("%d%d",&a,&b);puts(&a)) a=log10(a+b)+49; }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b){ | ^
s542760005
p00006
C++
#include <stdio.h> int main (void) { char str[21], new_str[21]; gets(str); int i; for(i=0; i<21; i++){ new_str[i]='\0'; } for(i=0; i<20; i++){ if(str[i]=='\0' || str[i]=='\n'){break;} new_str[20-i]=str[i]; } for(i=0; i<21; i++){ if(new_str[i]!='\0'){printf("%c", new_str[i]);} } printf("\n"); ...
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(str); | ^~~~ | getw
s953832802
p00006
C++
#include<iostream> int main(){char c[21];std::cin>>c;std::string d(c);std::reverse(d.begin(),d.end());std::cout<<d.c_str()<<'\n';}
a.cc: In function 'int main()': a.cc:2:57: error: 'reverse' is not a member of 'std' 2 | int main(){char c[21];std::cin>>c;std::string d(c);std::reverse(d.begin(),d.end());std::cout<<d.c_str()<<'\n';} | ^~~~~~~
s877318547
p00006
C++
main(n){n-10&&main((getchar()),putchar(n));exit(!puts(""));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(n){n-10&&main((getchar()),putchar(n));exit(!puts(""));} | ^
s608364446
p00006
C++
int main(){ char buff[100]; int n; scanf("%s",buff); for(n = strlen(buff); n;) putchar(buff[--n]); return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'scanf' was not declared in this scope 4 | scanf("%s",buff); | ^~~~~ a.cc:5:11: error: 'strlen' was not declared in this scope 5 | for(n = strlen(buff); n;) putchar(buff[--n]); | ^~~~~~ a.cc:1:1: note: 'strlen' is defined in header '<c...
s083687076
p00006
C++
int main(){ char buff[100]; int n; scanf("%s",buff); for(n = strlen(buff); n;) putchar(buff[--n]); puts(""); return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'scanf' was not declared in this scope 4 | scanf("%s",buff); | ^~~~~ a.cc:5:11: error: 'strlen' was not declared in this scope 5 | for(n = strlen(buff); n;) putchar(buff[--n]); | ^~~~~~ a.cc:1:1: note: 'strlen' is defined in header '<c...
s928645276
p00006
C++
main(n){~n&&main(getchar())+(putchar(n-1?n:10));return 0;}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(n){~n&&main(getchar())+(putchar(n-1?n:10));return 0;} | ^
s079938055
p00006
C++
main(c){c=getchar();c^10&&main(c)*putchar(c);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(c){c=getchar();c^10&&main(c)*putchar(c);} | ^
s055337813
p00006
C++
main(c){scanf("%c",&c)&&c^10&&main(c)*printf(&c);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(c){scanf("%c",&c)&&c^10&&main(c)*printf(&c);} | ^
s871601112
p00006
C++
main(i){i*=i-10&&main(getchar())*putchar(i-1?i:10);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){i*=i-10&&main(getchar())*putchar(i-1?i:10);} | ^
s051927198
p00006
C++
char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}
a.cc:1:15: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));} | ^~~~ a.cc: In function 'int main()': a.cc:1:22: error: 'gets' was not declared in this scope 1 | char b[99],*p;main(){gets(b);for(p=...
s448927976
p00006
C++
main(i,s){ char*p=s+20; while(~(*p--=getchar()));puts(s); }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i,s){ | ^
s881580010
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; cin >> str; for(int i = str.length(); i > -1; i--){ cout << str[i-1s] << flush; } cout << endl; }
a.cc: In function 'int main()': a.cc:13:31: error: unable to find numeric literal operator 'operator""s' 13 | cout << str[i-1s] << flush; | ^~
s661094662
p00006
C++
#include <cstdio> int main( int argc, char *argv[] ) { using namespace std; char str[20]; fscanf(stdin, "%s", str); for (int i=0; i<20; i++) { if (str[i] == '\0') { int last = i-1; for (int j=0; j<i/2; j++) { swap(str[j], str[last-j]); } break; } } printf("%s\n", str); return 0; }
a.cc: In function 'int main(int, char**)': a.cc:10:33: error: 'swap' was not declared in this scope 10 | swap(str[j], str[last-j]); | ^~~~
s057559949
p00006
C++
#include <iostream> #include <sstream> #include <string> using namespace std; int main(void) { string str; getline(cin, str); reverse(str.begin(), str.end()); cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'reverse' was not declared in this scope 13 | reverse(str.begin(), str.end()); | ^~~~~~~
s101921263
p00006
C++
#include <stdio.h> #include<string.h> int main(void){ int i,j,n; i=0; j=0; char a[20],b[20]; gets(a); n = strlen(a); for(i=n-1;i>=0;i--) { b[n-1-i]=a[i]; } b[n]='\0'; printf("%s\n",b); return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s437764497
p00006
C++
#include <cstdio> #include <stack> using namespace std; int main() { char str[22]; fgets( str, sizeof( str ) - 1, stdin ); for ( int i = strlen( str ) - 1; 0 <= i; i-- ) { putchar( str[i] ); } return 0; }
a.cc: In function 'int main()': a.cc:12:23: error: 'strlen' was not declared in this scope 12 | for ( int i = strlen( str ) - 1; 0 <= i; i-- ) | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #inclu...
s872360859
p00006
C++
import java.util.Scanner; public class Main{ Main(){ Scanner sc= new Scanner(System.in); while(sc.hasNext()){ String str = sc.next(); char[] ch = str.toCharArray(); for(int i = str.length()-1; i >= 0; i--) System.out.print(Character.toString(ch[i])); System.out.println(); } } pu...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s755578814
p00006
C++
#include <stdio.h> #include <string.h> int main(void) { char str[256]; char rev[256]; for (int i = 0; str[i] != '\0'; i++){ rev[i] = str[strlen(str) - 1 - i; } rev[strlen(str)] = '\0'; printf("%s", rev); return (0); }
a.cc: In function 'int main()': a.cc:10:33: error: expected ']' before ';' token 10 | rev[i] = str[strlen(str) - 1 - i; | ^ | ]
s739158543
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ char str[30], *end_p; int end;; cin >>str; end_p = strrchr(str, '\0'); end = end_p - str; for(int i = (end - 1); i >= 0; i--){ cout <<str[i]; } cout <<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:17: error: 'strrchr' was not declared in this scope 10 | end_p = strrchr(str, '\0'); | ^~~~~~~ a.cc:2:1: note: 'strrchr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#...
s551299271
p00006
C++
main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^
s741539937
p00006
C++
main(a){~scanf("%c",&a)&&(main(),printf("%c",a));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a){~scanf("%c",&a)&&(main(),printf("%c",a));} | ^
s866943484
p00006
C++
#include <iostream> #include <string> #include <algorithm> int main(){ string str; while(cin >> str){ reverse(str.begin(), str.end()); cout << str << endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'string' was not declared in this scope 6 | string str; | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream...
s068253417
p00006
C++
#include <stdio.h> #include <string> int main(void){ char c[21]; scanf("%s", c); for(int i=strlen(c)-1; i>=0; --i){ printf("%c", *(c+i)); } return 0; }
a.cc: In function 'int main()': a.cc:7:19: error: 'strlen' was not declared in this scope 7 | for(int i=strlen(c)-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> +++...
s681553100
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main(){ string str; int len; while(1){ cin >> str; if(str == EOF)break; len = str.length(); for(int i=len;i>=0;i--){ cout << str[i]; } } return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 10 | if(str == EOF)break; | ~~~ ^~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c+...
s583692353
p00006
C++
using namespace std; main(){ char str[21]; int i=0; while(cin >> str[i]){i++;} i--; int j=i; for(j=i;j>=0;j--){ cout << str[j] ; } cout << endl; return 0; }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | while(cin >> str[i]){i++;} | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; ...
s441016501
p00006
C++
#include <string.h> #include <ctype.h> main(i){char s[21];scanf("%s",s);if(s[16]=='9')return 1;return 0;}
a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token 3 | main(i){char s[21];scanf("%s",s);if(s[16]=='9')return 1;return 0;} | ^
s936000191
p00006
C++
#include<stdio.h> #include<stdlib.h> int main(void){ char a,b,i,j; char rarara[1000]; char papapa[1000]; gets(rarara); for(i=0;rarara[i]!=NULL;i++){}; a=i; for(i=0;i<a;i++) papapa[i]=rarara[a-i-1]; papapa[a]=NULL; printf("%s\n",papapa); return; }
a.cc: In function 'int main()': a.cc:7:2: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(rarara); | ^~~~ | getw a.cc:8:21: warning: NULL used in arithmetic [-Wpointer-arith] 8 | for(i=0;rarara[i]!=NULL;i++){}; | ^~~~ a.cc:12:13: warning: con...
s078025849
p00006
C++
#include<stdio.h> #include<stdlib.h> int main(void){ char a,b,i,j; char rarara[1000]; char papapa[1000]; fgets(rarara,sizeof(rarara),stdin); for(i=0;rarara[i]!=NULL;i++){}; a=i; for(i=0;i<a;i++) papapa[i]=rarara[a-i-1]; papapa[a]=NULL; printf("%s\n",papapa); return; }
a.cc: In function 'int main()': a.cc:8:21: warning: NULL used in arithmetic [-Wpointer-arith] 8 | for(i=0;rarara[i]!=NULL;i++){}; | ^~~~ a.cc:12:13: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] 12 | papapa[a]=NULL; | ^~~~ a.cc:14:3: e...