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)-... | 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] ^=... | 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; ... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
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;
ret... | 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>
+++ |+#... |
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>
+++ |+#... |
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>
+++ |+#... |
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>
+++ |+#... |
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; ... |
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;
| ^~
| ... |
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 <io... |
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.c... |
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... |
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>
... |
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... |
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>
... |
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>
+++ |+#inclu... |
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));
| ^~~~~~
|... |
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 namesp... |
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 <... | 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... |
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 i... |
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:4... |
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 | #incl... |
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 | #incl... |
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 | #incl... |
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; }
| ... |
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>
... |
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>
... |
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]); }
... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
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... |
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... |
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();
Stri... | 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 '-fm... |
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>
... |
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>
... |
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 fr... |
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>
... |
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>
... |
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... |
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 fro... |
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 fro... |
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>}
... |
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/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 <cst... |
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 <cst... |
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 <cst... |
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 <cst... |
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 <cst... |
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 <cst... |
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 <cst... |
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 <cst... |
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 <cstri... |
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 <cstri... |
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>
+++ |+#inc... |
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>
+++ |+#i... |
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>
+++ |+#inclu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.