submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s093512868
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:8:1: error: 'reverse' was not declared in this scope 8 | reverse(s.begin(),s.end()); | ^~~~~~~
s230010864
p00006
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #pragma warning(disable:4996) int main() { char str[21] = "\0"; int X; scanf("%s", str); for (X = strlen(str)-1; X > 0; X--) { if (X <= (strlen(str) - 1) - X) break; str[(strlen(str)-1) - X] ^= str[X]; str[X] ^= str[(strlen(str)-1) - X]; str[(strlen(str)-1) - X] ^= str[X]; } printf("%s\n", str); return 0; } int main() { char str[21] = "\0"; int X; scanf("%s", str); for (X = strlen(str)-1; X > 0; X--) { if (X <= (strlen(str) - 1) - X) break; str[(strlen(str)-1) - X] ^= str[X]; str[X] ^= str[(strlen(str)-1) - X]; str[(strlen(str)-1) - X] ^= str[X]; } printf("%s\n", str); return 0; }
a.cc:31:5: error: redefinition of 'int main()' 31 | int main() | ^~~~ a.cc:11:5: note: 'int main()' previously defined here 11 | int main() | ^~~~
s746017951
p00006
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char str[21] = "\0"; int X; scanf("%s", str); for (X = strlen(str)-1; X > 0; X--) { if (X <= (strlen(str) - 1) - X) break; str[(strlen(str)-1) - X] ^= str[X]; str[X] ^= str[(strlen(str)-1) - X]; str[(strlen(str)-1) - X] ^= str[X]; } printf("%s\n", str); return 0; } int main() { char str[21] = "\0"; int X; scanf("%s", str); for (X = strlen(str)-1; X > 0; X--) { if (X <= (strlen(str) - 1) - X) break; str[(strlen(str)-1) - X] ^= str[X]; str[X] ^= str[(strlen(str)-1) - X]; str[(strlen(str)-1) - X] ^= str[X]; } printf("%s\n", str); return 0; }
a.cc:30:5: error: redefinition of 'int main()' 30 | int main() | ^~~~ a.cc:10:5: note: 'int main()' previously defined here 10 | int main() | ^~~~
s516076576
p00006
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class ReverseSequence { static void Main(string[] args) { char[] charArray = System.Console.ReadLine().ToCharArray(); for (int i = charArray.Length - 1; i >= 0; i--) { System.Console.Write(charArray[i]); } } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | static void Main(string[] args) | ^~~~ a.cc:18:6: error: expected ';' after class definition 18 | } | ^ | ; a.cc: In static member function 'static void ConsoleApplication1::ReverseSequence::Main(int*)': a.cc:12:17: error: structured binding declaration cannot have type 'char' 12 | char[] charArray = System.Console.ReadLine().ToCharArray(); | ^~ a.cc:12:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:12:17: error: empty structured binding declaration a.cc:12:20: error: expected initializer before 'charArray' 12 | char[] charArray = System.Console.ReadLine().ToCharArray(); | ^~~~~~~~~ a.cc:13:26: error: 'charArray' was not declared in this scope 13 | for (int i = charArray.Length - 1; i >= 0; i--) | ^~~~~~~~~ a.cc:15:17: error: 'System' was not declared in this scope 15 | System.Console.Write(charArray[i]); | ^~~~~~
s451922936
p00006
C++
#include <iostream> using namespace std; int main() { // your code goes here char str[25]; char ans[25]; int x; for (int i = 0;i<25;i++) { str[i]='$'; } cin >> str; for (int i = 0;i<25;i++) { if (str[i]='$') { x=i; break; } } for (int i = 0;i<(x+1)) { cout << str[x-i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:31: error: expected ';' before ')' token 19 | for (int i = 0;i<(x+1)) { | ^ | ;
s727749173
p00006
C++
#include <iostream> using namespace std; #include <conio.h> #include <stdio.h> void reverse(char *); int main() { char str[20]; gets(str); reverse(str); getch(); } void reverse(char *str) { char *p=str; *p++; if(*p) reverse(p); cout << *str; }
a.cc:3:10: fatal error: conio.h: No such file or directory 3 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s304269434
p00006
C++
#include <conio.h> #include <stdio.h> #include <iostream> using namespace std; void reverse(char *); int main() { char str[20]; gets(str); reverse(str); } void reverse(char *str) { char *p=str; *p++; if(*p) reverse(p); cout << *str; }
a.cc:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s216983684
p00006
C++
#include "conio.h" #include "stdio.h" #include "string.h" #include "iostream" using namespace std; int main(){ int z=0; char a[255],b[255]; cin.get(a,255); z=strlen(a)-1; for(int i=0;i<255;i++) b[z-i]=a[i]; puts(b); getch(); return 0; }
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include "conio.h" | ^~~~~~~~~ compilation terminated.
s042414939
p00006
C++
#include <cstdlib> #include <cstdio> #include <iostream> #include <string> #include <algorithm> using namespace std; int a; char test[20]; char temp; int main() { scanf("%s",test); for(a=strlen(test)-1;a>=0;a--) printf("%c",test[a]); return 0; }
a.cc: In function 'int main()': a.cc:15:15: error: 'strlen' was not declared in this scope 15 | for(a=strlen(test)-1;a>=0;a--) | ^~~~~~ a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <algorithm> +++ |+#include <cstring> 6 |
s270888745
p00006
C++
#include <cstdlib> #include <cstdio> #include <iostream> #include <string> #include <algorithm> using namespace std; int a; char test[20]; char temp; int main() { scanf("%s",test); for(a=strlen(test)-1;a>=0;a--) { printf("%c",test[a]); } return 0; }
a.cc: In function 'int main()': a.cc:15:15: error: 'strlen' was not declared in this scope 15 | for(a=strlen(test)-1;a>=0;a--) | ^~~~~~ a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <algorithm> +++ |+#include <cstring> 6 |
s917105903
p00006
C++
#include <stdio.h> #include <string> #include <algorithm> using namespace std; int a; char test[20]; char temp; int main() { scanf("%s",test); for(a=strlen(test)-1;a>=0;a--) { printf("%c",test[a]); } return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | for(a=strlen(test)-1;a>=0;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 |
s662562683
p00006
C++
#include <stdio.h> #include <string> #include <algorithm> using namespace std; int a; char test[21]; char temp; int main() { scanf("%s",test); for(a=strlen(test)-1;a>=0;a--) { printf("%c",test[a]); } return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | for(a=strlen(test)-1;a>=0;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 |
s751825461
p00006
C++
#include<iostream> #include<cstring> #include<string> int main(){ std::string str; cin >> str; for(int i = str.length()-1; i >= 0 ; --i) std::cout << str.at(i); std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> str; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s621302889
p00006
C++
#include<iostream> #include<string> int main(){ std::bacic_string st; std::cin >> st; while(!(st.empty())){ std::cout << st.back(); st.pop_back(); } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:14: error: 'bacic_string' is not a member of 'std' 5 | std::bacic_string st; | ^~~~~~~~~~~~ a.cc:6:21: error: 'st' was not declared in this scope; did you mean 'std'? 6 | std::cin >> st; | ^~ | std
s886529685
p00006
C++
#include<iostream> #include<string> int main(){ std::string st; std::cin >> st; while(!(st.empty())){ std::cout << st.back(); std::st.pop_back(); } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:10:22: error: 'st' is not a member of 'std' 10 | std::st.pop_back(); | ^~
s183830712
p00006
C++
#include <iostream> int main() { char str[21]; std::cin >> str; for (int i = strlen(str) - 1; i >= 0; i--) std::cout << str[i]; }
a.cc: In function 'int main()': a.cc:7:22: error: 'strlen' was not declared in this scope 7 | 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 |
s122073915
p00006
C++
#include <iostream> #include <cstring> using namespace std; int main() { char str[20]; int i; gets(str); for(i=strlen(str)-1; i>=0; i--) cout << 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
s374547239
p00006
C++
#include<stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int main() { string str; cin >> str; for (int i = str.size() - 1; i >= 0; i--) { cout << str[i]???<<endl; } return 0; }
a.cc:12:32: warning: trigraph ??< ignored, use -trigraphs to enable [-Wtrigraphs] 12 | cout << str[i]???<<endl; a.cc: In function 'int main()': a.cc:12:32: error: expected primary-expression before '?' token 12 | cout << str[i]???<<endl; | ^ a.cc:12:33: error: expected primary-expression before '?' token 12 | cout << str[i]???<<endl; | ^ a.cc:12:34: error: expected primary-expression before '<<' token 12 | cout << str[i]???<<endl; | ^~ a.cc:12:40: error: expected ':' before ';' token 12 | cout << str[i]???<<endl; | ^ | : a.cc:12:40: error: expected primary-expression before ';' token a.cc:12:40: error: expected ':' before ';' token 12 | cout << str[i]???<<endl; | ^ | : a.cc:12:40: error: expected primary-expression before ';' token a.cc:12:40: error: expected ':' before ';' token 12 | cout << str[i]???<<endl; | ^ | : a.cc:12:40: error: expected primary-expression before ';' token
s907706405
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:12:9: error: 'reverse' was not declared in this scope 12 | reverse(str.begin(),str.end()); | ^~~~~~~
s764404948
p00006
C++
#include <iostream> #include <string> int main(){ std::string str; std::cin >> str; // input str.reverse(); //use reverse function std::cout << str << std::endl; // output return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 8 | str.reverse(); //use reverse function | ^~~~~~~ | reserve
s975162542
p00006
C++
#include<iostream> using namespace std; int main(){ vector<char> s; char c[256]; cin >> c; for (int i = 0; c[i] != NULL; i++) { s.push_back(c[i]); } if (s.size() <= 20){ for (int i = 1; i < s.size(); i++) { int a = s.size(); cout << s[a - i]; } } return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'vector' was not declared in this scope 4 | vector<char> s; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vector> 2 | using namespace std; a.cc:4:16: error: expected primary-expression before 'char' 4 | vector<char> s; | ^~~~ a.cc:7:33: warning: NULL used in arithmetic [-Wpointer-arith] 7 | for (int i = 0; c[i] != NULL; i++) | ^~~~ a.cc:9:17: error: 's' was not declared in this scope 9 | s.push_back(c[i]); | ^ a.cc:11:13: error: 's' was not declared in this scope 11 | if (s.size() <= 20){ | ^
s096054281
p00006
C++
#include<stdio.h> int main(void){ char n[100]={0}; int i=20; scanf("%s",n); for(i;i<n;i--){ if(n[i]!=0)printf("%c",n[i]); } return 0; }
a.cc: In function 'int main()': a.cc:6:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | for(i;i<n;i--){ | ~^~
s551285605
p00006
C++
#include <stdio.h> #include <string> #include <iostream> using namespace std; int main() { string input; cin >> input; reverse(input.begin(), input.end()); cout << input << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'reverse' was not declared in this scope 9 | reverse(input.begin(), input.end()); | ^~~~~~~
s603099778
p00006
C++
#include <iostream> #include <string> 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:8:1: error: 'reverse' was not declared in this scope 8 | reverse(str.begin(),str.end()); | ^~~~~~~
s116546969
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char s[21]; cin >> s; int len = strlen(s); for(int i = len;i >= 0;i--){ cout << s[i] << endl; } }
a.cc: In function 'int main()': a.cc:8:13: error: 'strlen' was not declared in this scope 8 | int len = 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>
s214348052
p00006
C++
include<iostream> #include<string> using namespace std; int main() { char s[21]; cin >> s; int len = strlen(s); for(int i = len;i >= 0;i--){ cout << s[i]; } cout << endl; }
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 |
s673228448
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char s[21]; cin >> s; int len = strlen(s); for(int i = len;i >= 0;i--){ cout << s[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:8:13: error: 'strlen' was not declared in this scope 8 | int len = 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>
s293797142
p00006
C++
#include<iostream> #include<algorithm> using namespace std; int main() { char s[21]; cin >> s; reverse(s.begin(),s.end()); cout << endl; }
a.cc: In function 'int main()': a.cc:9:13: error: request for member 'begin' in 's', which is of non-class type 'char [21]' 9 | reverse(s.begin(),s.end()); | ^~~~~ a.cc:9:23: error: request for member 'end' in 's', which is of non-class type 'char [21]' 9 | reverse(s.begin(),s.end()); | ^~~
s582321954
p00006
C++
#include<stdio.h> #include<string.h> int main(){ int i; char s[50]; scnaf("%s",s); for(i=strlen(s)-1;i>-1;i--)printf("%c",s[i]); printf("\n"); return 0;}
a.cc: In function 'int main()': a.cc:6:1: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 6 | scnaf("%s",s); | ^~~~~ | scanf
s095700885
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ char str[21]; cin >> str; for(int i = strlen(str);i>=0;i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:7:15: error: 'strlen' was not declared in this scope 7 | for(int i = strlen(str);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 | #include<string>
s964970341
p00006
C++
#include<stdio.h> #include<string.h> int main() { char a[100]; gets(a); printf("%s",strrev(a)); }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw a.cc:8:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | printf("%s",strrev(a)); | ^~~~~~ | strsep
s561814512
p00006
C++
#include <iostream> #include <string> 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:10:5: error: 'reverse' was not declared in this scope 10 | reverse(str.begin(), str.end()); | ^~~~~~~
s578852314
p00006
C++
#include <iostream> #include <algorithm> #include <string> #include "mathematical.h" int main(void) { std::string str; std::cin >> str; std::string rev; for (int i = str.size() - 1; i >= 0; i--) { rev.push_back(str[i]); } std::cout << rev << std::endl; return 0; }
a.cc:5:10: fatal error: mathematical.h: No such file or directory 5 | #include "mathematical.h" | ^~~~~~~~~~~~~~~~ compilation terminated.
s660582343
p00006
C++
#include<stdio.h> int main(){ char str[21],i; scanf("%s"str); for(i=0;;i++){ if(str[i]==/0) break; } for(;i>0;i--){ printf("%s",str[i]); } printf("\n"); }
a.cc: In function 'int main()': a.cc:5:7: error: unable to find string literal operator 'operator""str' with 'const char [3]', 'long unsigned int' arguments 5 | scanf("%s"str); | ^~~~~~~ a.cc:7:12: error: expected primary-expression before '/' token 7 | if(str[i]==/0) | ^
s077869831
p00006
C++
#include<stdio.h> int main(){ char str[21],i; scanf("%s",str); for(i=0;;i++){ if(str[i]==/0) break; } for(;i>0;i--){ printf("%s",str[i]); } printf("\n"); }
a.cc: In function 'int main()': a.cc:7:12: error: expected primary-expression before '/' token 7 | if(str[i]==/0) | ^
s763875890
p00006
C++
#include<stdio.h> int main(){ char str[21]; int i; scanf("%s",str); for(i=0;;i++){ if(str[i]==/0) break; } for(;i>0;i--){ printf("%s",str[i]); } printf("\n"); }
a.cc: In function 'int main()': a.cc:7:12: error: expected primary-expression before '/' token 7 | if(str[i]==/0) | ^
s884704912
p00006
C++
#include<stdio.h> int main(){ char str[21]; int i; scanf("%s",str); for(i=0;i=100;i++){ if(str[i]==/0) i=100 } for(;i>0;i--){ printf("%s",str[i]); } printf("\n"); }
a.cc: In function 'int main()': a.cc:7:12: error: expected primary-expression before '/' token 7 | if(str[i]==/0) | ^ a.cc:8:6: error: expected ';' before '}' token 8 | i=100 | ^ | ; 9 | } | ~
s348838603
p00006
C++
#include <string> #include <iostream> using namespace std; int main(){ string x; cin >> x; vector<char> c; for(int i = 0;i < x.size(); ++i) { c.push_back(x[i]); } for(int i = c.size()-1; i > 0; --i) { cout << c[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: 'vector' was not declared in this scope 9 | vector<char> c; | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include <iostream> +++ |+#include <vector> 3 | using namespace std; a.cc:9:8: error: expected primary-expression before 'char' 9 | vector<char> c; | ^~~~ a.cc:12:2: error: 'c' was not declared in this scope 12 | c.push_back(x[i]); | ^ a.cc:14:13: error: 'c' was not declared in this scope 14 | for(int i = c.size()-1; i > 0; --i) | ^
s944554274
p00006
C++
#include <stdio.h> #include <string.h> int main() { char a[20]; gets(a); strrev(a); printf("%s\n",a); return 0; }
a.cc: In function 'int main()': a.cc:6:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(a); | ^~~~ | getw a.cc:7:4: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev(a); | ^~~~~~ | strsep
s844910240
p00006
C++
#include <stdio.h> #include <string.h> int main() { char a[20]; gets(a); strrev(a); printf("%s\n",a); return 0; }
a.cc: In function 'int main()': a.cc:6:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(a); | ^~~~ | getw a.cc:7:4: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev(a); | ^~~~~~ | strsep
s251907626
p00006
C++
#include<stdio.h> #include<conio.h> int main() { int i,count=0; char ch[20]; gets(ch); for(i=0;ch[i]!='\0';i++) { count++; } for(i=count-1;i>=0;i--) { printf("%c",ch[i]); } return 0; }
a.cc:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s285839916
p00006
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MAX 12345 #define rep(i,a,b) for(int i=a;i<=b;i++) #define rev(i,a,b) for(int i=a;i>=b;i--) int main() { string str; while(cin>>str){ ll l=str.size(); while(l--){ cout << str[len]; } cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:25: error: 'len' was not declared in this scope 16 | cout << str[len]; | ^~~
s949482832
p00006
C++
p gets.chomp.reverse
a.cc:1:1: error: 'p' does not name a type 1 | p gets.chomp.reverse | ^
s446639523
p00006
C++
#include<iostream> #include<vector> using namespace std; int main(){ string str; cin>>str; for(int i=str.size()-1;i=>0;i--){ cout<<str[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:26: error: expected primary-expression before '>' token 7 | for(int i=str.size()-1;i=>0;i--){ | ^
s898557604
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string str; while (cin >> str) { cout << str.reverse() << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 7 | cout << str.reverse() << endl; | ^~~~~~~ | reserve
s318577761
p00006
C++
import std.stdio, std.array, std.conv, std.string; void main(){ string s; for(;;){ s=readln(); if(stdin.eof()) break; for(int i = s.length; i > 0; --i ){ write(s[i-1]); } write("\n"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio, | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: '::main' must return 'int' 6 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:7:3: error: 'string' was not declared in this scope 7 | string s; | ^~~~~~ a.cc:9:5: error: 's' was not declared in this scope 9 | s=readln(); | ^ a.cc:9:7: error: 'readln' was not declared in this scope 9 | s=readln(); | ^~~~~~ a.cc:10:8: error: 'stdin' was not declared in this scope 10 | if(stdin.eof()) break; | ^~~~~ a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | import std.stdio, a.cc:12:7: error: 'write' was not declared in this scope 12 | write(s[i-1]); | ^~~~~ a.cc:14:5: error: 'write' was not declared in this scope 14 | write("\n"); | ^~~~~
s806614785
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; char str121]; int l=0; cin>>Str; for(int i=0;str[i]!='\0';) i++; for(int k=i-l;k>=0;k--,l++) { cout<<str[k]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: expected initializer before ']' token 7 | char str121]; | ^ a.cc:9:10: error: 'Str' was not declared in this scope; did you mean 'str'? 9 | cin>>Str; | ^~~ | str a.cc:12:15: error: 'i' was not declared in this scope 12 | for(int k=i-l;k>=0;k--,l++) | ^
s127432221
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; int l=0; cin>>Str; for(int i=0;str[i]!='\0';) i++; for(int k=i-l;k>=0;k--,l++) { cout<<str[k]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: 'Str' was not declared in this scope; did you mean 'str'? 8 | cin>>Str; | ^~~ | str a.cc:11:15: error: 'i' was not declared in this scope 11 | for(int k=i-l;k>=0;k--,l++) | ^
s423150974
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; int l=0; cin>>str; for(int i=0;str[i]!='\0';) i++; for(int k=i-l;k>=0;k--,l++) { cout<<str[k]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: 'i' was not declared in this scope 11 | for(int k=i-l;k>=0;k--,l++) | ^
s322703657
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; int l=0; cin>>str; for(int i=0;str[i]!='\0';) i++; for(int k=i-1;k>=0;k--) { cout<<str[k]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: 'i' was not declared in this scope 11 | for(int k=i-1;k>=0;k--) | ^
s981706214
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; cin>>str; for(int i=0;str[i]!='\0';) i++; for(int k=i-1;k>=0;k--) { cout<<str[k]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'i' was not declared in this scope 10 | for(int k=i-1;k>=0;k--) | ^
s113776709
p00006
C++
#include <iostream> #include <string> int main() { string s; while(getline(cin, s)) { reverse(s.begin(), s.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | string s; | ^~~~~~ a.cc:4: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:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | while(getline(cin, s)) { | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:22: error: 's' was not declared in this scope 5 | while(getline(cin, s)) { | ^ a.cc:6:5: error: 'reverse' was not declared in this scope 6 | reverse(s.begin(), s.end()); | ^~~~~~~ a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout << s << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout << s << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s035536842
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; while(getline(cin, s)) { reverse(s.begin(), s.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'reverse' was not declared in this scope 7 | reverse(s.begin(), s.end()); | ^~~~~~~
s424606454
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; while(getline(cin, s)) { reverse(s.begin(), s.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'reverse' was not declared in this scope 7 | reverse(s.begin(), s.end()); | ^~~~~~~
s829075433
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; while(getline(cin, s)) { reverse(s.begin(), s.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'reverse' was not declared in this scope 7 | reverse(s.begin(), s.end()); | ^~~~~~~
s694077325
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; while(getline(cin, s)) { // reverse(s.begin(), s.end()); vector<int> v; v.push_back(3); reverse(v.begin(), v.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'vector' was not declared in this scope 8 | vector<int> v; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | #include <string> a.cc:8:12: error: expected primary-expression before 'int' 8 | vector<int> v; | ^~~ a.cc:9:5: error: 'v' was not declared in this scope 9 | v.push_back(3); | ^ a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(v.begin(), v.end()); | ^~~~~~~
s474442602
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; while(getline(cin, s)) { // reverse(s.begin(), s.end()); vector<int> v; v.push_back(3); std::reverse(v.begin(), v.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'vector' was not declared in this scope 8 | vector<int> v; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | #include <string> a.cc:8:12: error: expected primary-expression before 'int' 8 | vector<int> v; | ^~~ a.cc:9:5: error: 'v' was not declared in this scope 9 | v.push_back(3); | ^ a.cc:10:10: error: 'reverse' is not a member of 'std' 10 | std::reverse(v.begin(), v.end()); | ^~~~~~~
s826731853
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { string s; while(getline(cin, s)) { // reverse(s.begin(), s.end()); vector<int> v; v.push_back(3); std::reverse(v.begin(), v.end()); cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'vector' was not declared in this scope 8 | vector<int> v; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | #include <string> a.cc:8:12: error: expected primary-expression before 'int' 8 | vector<int> v; | ^~~ a.cc:9:5: error: 'v' was not declared in this scope 9 | v.push_back(3); | ^ a.cc:10:10: error: 'reverse' is not a member of 'std' 10 | std::reverse(v.begin(), v.end()); | ^~~~~~~
s146720184
p00006
C++
#include <iostream> #include <string> 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:8:5: error: 'reverse' was not declared in this scope 8 | reverse(str.begin(), str.end()); | ^~~~~~~
s089065608
p00006
C++
#include <iostream> #include <string> 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:5: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(),s.end()); | ^~~~~~~
s135273188
p00006
C++
#include <iostream> #include <string> 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:5: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(),s.end()); | ^~~~~~~
s279190670
p00006
C++
#include <iostream> #include <string> 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:10:32: error: expected ';' before ')' token 10 | for(int i=s.size(); i--){ | ^ | ;
s298661697
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:10:5: error: 'reverse' was not declared in this scope 10 | reverse(str.begin(), str.end()); | ^~~~~~~
s259670301
p00006
C++
#include <stdio.h> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { long long n; scanf("%lld",&n); printf("%lld",n%10); for (int i=10;i<n;) { i=10*i; printf("%lld",((n%i)-(n%(i/10)))/(i/10)); } return 0; }
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include <stdio.h> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { long long n; scanf("%lld",&n); printf("%lld",n%10); for (int i=10;i<n;) { i=10*i; printf("%lld",((n%i)-(n%(i/10)))/(i/10)); } return 0; } | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s089163820
p00006
C++
#include <bits/stdc++.h> using namespace std; int main() { char name[25]; gets(name); int len = strlen(name); for(int i= len-1; i>=0; i--) cout << name[i] ; cout << endl; 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(name); | ^~~~ | getw
s144382963
p00006
C++
#include <stdio.h> #include <string.h> int main () { char x [10000]; gets (x); strrev (x); puts(x); 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 (x); | ^~~~ | getw a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev (x); | ^~~~~~ | strsep
s879915134
p00006
C++
#include <iostream> #include <string> #include <utility> 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:12:9: error: 'reverse' was not declared in this scope 12 | reverse(s.begin(), s.end()); | ^~~~~~~
s039533383
p00006
C++
#include<iostream> using namespace std; int main(){ char str[20]; int i; cin>>str; for(i=strlen(str)-1;i>=0;i--){ cout<<str[i]; } cout<<endl; }
a.cc: In function 'int main()': a.cc:8:8: error: 'strlen' was not declared in this scope 8 | for(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;
s279361211
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<20;i++){ cout<<s[20-1-i]<; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:33: error: expected primary-expression before ';' token 8 | cout<<s[20-1-i]<; | ^
s542315393
p00006
C++
#include <stdio.h> int main(void){ char buff[128]; char *p; scanf("%s",buff); p=buff; p=p+strlen(buff); while(p!=buff){ putchar(*(--p)); } putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'strlen' was not declared in this scope 8 | p=p+strlen(buff); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 |
s327202231
p00006
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string a = Console.ReadLine(); int b = a.Length; for (; b > 0; b--) { Console.Write(a[b]); } Console.WriteLine(); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | static void Main(string[] args) | ^~~~ a.cc:16:6: error: expected ';' after class definition 16 | } | ^ | ; a.cc: In static member function 'static void ConsoleApplication1::Program::Main(int*)': a.cc:11:12: error: 'string' was not declared in this scope 11 | { string a = Console.ReadLine(); int b = a.Length; | ^~~~~~ a.cc:11:51: error: 'a' was not declared in this scope 11 | { string a = Console.ReadLine(); int b = a.Length; | ^ a.cc:13:15: error: 'Console' was not declared in this scope 13 | { Console.Write(a[b]); } | ^~~~~~~ a.cc:14:13: error: 'Console' was not declared in this scope 14 | Console.WriteLine(); | ^~~~~~~
s056812527
p00006
C++
#include <stdio.h> #include <string.h> int main(){ char str[21]; scanf("%s",str); for(i = strlen(str) - 1;i >= 0;i--){ printf("%c",str[i]); } printf("\n"); return(0); }
a.cc: In function 'int main()': a.cc:6:5: error: 'i' was not declared in this scope 6 | for(i = strlen(str) - 1;i >= 0;i--){ | ^
s442611396
p00006
C++
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <string> using namespace std; int main() { char str[21]; int tmp; cin >> str; tmp=strlen(str); for (int i = tmp-1; i >=0; i--) { cout << str[i]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:14:13: error: 'strlen' was not declared in this scope 14 | tmp=strlen(str); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include <cstring> 5 | #include <string>
s438745407
p00006
C++
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <string> using namespace std; int main() { char str[21]; int tmp; cin >> str; tmp=strlen(str); for (int i = tmp-1; i >=0; i--) { cout << str[i]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:14:13: error: 'strlen' was not declared in this scope 14 | tmp=strlen(str); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include <cstring> 5 | #include <string>
s473306162
p00006
C++
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); string s; cin >> s; reverse(s.begin(), s.end()); cout << s; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(), s.end()); | ^~~~~~~
s406934799
p00006
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] a) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); char[] data = str.toCharArray(); StringBuffer sb = new StringBuffer(str); str = sb.reverse().toString(); System.out.println(str); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStreamReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 | public class Main { | ^~~~~~
s850608789
p00006
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:10:11: error: 'strlen' was not declared in this scope 10 | int l = strlen(str); | ^~~~~~ 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 | #include<string>
s744746083
p00006
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:10:11: error: 'strlen' was not declared in this scope 10 | int l = strlen(str); | ^~~~~~ 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 | #include<string>
s306417374
p00006
C++
#include<iostream> #include<stdio.h> #include<algorithm> #include<string.h> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:10:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 10 | int l = strlen(str); | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from a.cc:4: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s304696475
p00006
C++
#include<iostream> #include<stdio.h> #include<algorithm> #include<string> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:10:11: error: 'strlen' was not declared in this scope 10 | int l = strlen(str); | ^~~~~~ 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 | #include<string>
s726298498
p00006
C++
#include<iostream> #include<cstdio> #include<stdio.h> #include<algorithm> #include<string> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:11:11: error: 'strlen' was not declared in this scope 11 | int l = strlen(str); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<algorithm> +++ |+#include <cstring> 5 | #include<string>
s860625975
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:8:11: error: 'strlen' was not declared in this scope 8 | int 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 | #include<string>
s163279073
p00006
C++
#include<iostream> #include<cstring> #include<cstdio> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 9 | int l = strlen(str); | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/cstring:43, from a.cc:2: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s898555096
p00006
C++
#include<iostream> #include<string.h> #include<cstdio> using namespace std; int main(){ string str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 9 | int l = strlen(str); | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from a.cc:2: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s644646572
p00006
C++
#include<iostream> #include<string.h> #include<cstdio> using namespace std; int main(){ string str; cin >> str; int l = (int)strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:9:23: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 9 | int l = (int)strlen(str); | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from a.cc:2: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s310555945
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main(){ char str; cin >> str; int l = strlen(str); for(int i = l - 1; i >= 0; i--){ cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 8 | int l = strlen(str); | ^~~ | | | char In file included from /usr/include/c++/14/cstring:43, from a.cc:2: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~ a.cc:10:16: error: invalid types 'char[int]' for array subscript 10 | cout << str[i]; | ^
s234969049
p00006
C++
#include<iostream> #include<string> 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:8:1: error: 'reverse' was not declared in this scope 8 | reverse(str.begin(),str.end()); | ^~~~~~~
s242018790
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i] << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | len = strlen(str); | ^~~~~~ 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 |
s782246238
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i] << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | len = strlen(str); | ^~~~~~ 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 |
s041943806
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i]; return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | len = strlen(str); | ^~~~~~ 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 |
s256699141
p00006
C++
#include<iostream> #include <algorithm> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i]; putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: 'strlen' was not declared in this scope 12 | len = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <cstring> 3 |
s156130027
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i]; putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | len = strlen(str); | ^~~~~~ 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 |
s241897902
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i]; putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | len = strlen(str); | ^~~~~~ 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 |
s067760286
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> #include <string> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i]; putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:14:15: error: 'strlen' was not declared in this scope 14 | len = strlen(str); | ^~~~~~ 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 | #include <string>
s434649218
p00006
C++
#include<iostream> #include <cstdio> #include <algorithm> #include <string> using namespace std; int main() { char str[20]; int i, len; cin >> str; len = strlen(str); for (i = len - 1; i >= 0; i--) cout << str[i]; putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:14:15: error: 'strlen' was not declared in this scope 14 | len = strlen(str); | ^~~~~~ 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 | #include <string>
s191763448
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ char str[25]; int i, num; cin >> str; num = strlen(str); for(i = num - 1; i >= 0; i --){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:12:15: error: 'strlen' was not declared in this scope 12 | num = 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>
s212744410
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ char str[25]; int i, num; cin >> str; num = strlen(str); for(i = num-1; i >= 0; i--){ cout << str[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:12:15: error: 'strlen' was not declared in this scope 12 | num = 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>
s438700970
p00006
C++
#include<iostream> #include<stdio.h> #include<string> using namespace std; int main(){ char str[25]; cin>>str; for(int i=strlen(str); i>=0; i--){ cout<<str[i];} return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | for(int i=strlen(str); 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 | #include<stdio.h>
s901086878
p00006
C++
#include<iostream> #include<stdio.h> #include<string> using namespace std; int main(){ char str[25]; cin>>str; for(long i=strlen(str); i>=0; i--){ cout<<str[i];} return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: 'strlen' was not declared in this scope 9 | for(long i=strlen(str); 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 | #include<stdio.h>
s101196885
p00006
C++
#include <iostream> #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:11:19: error: 'strlen' was not declared in this scope 11 | 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> +++ |+#include <cstring> 2 |