submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s291472161
p00017
C++
char*c;a[99];main(){for(scanf("%[^\n]",a);!(strstr(a,"this")||strstr(a,"that")||strstr(a,"the"));)for(c=a;*c;c++)*c<97||(*c=(*c+8)%26+97);puts(a);}
a.cc:1:8: error: 'a' does not name a type 1 | char*c;a[99];main(){for(scanf("%[^\n]",a);!(strstr(a,"this")||strstr(a,"that")||strstr(a,"the"));)for(c=a;*c;c++)*c<97||(*c=(*c+8)%26+97);puts(a);} | ^ a.cc:1:14: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | char*c;a[9...
s528541328
p00017
C++
char*p;c[99]; main(){ for(;~scanf("%[^\n] ",p=c);puts(c)) for(;(*p++=*p>96?*p%96%26+97:*p)||!strstr(p=c,"th");); }
a.cc:1:8: error: 'c' does not name a type 1 | char*p;c[99]; | ^ a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:29: error: 'c' was not declared in this scope 3 | for(;~scanf("%[^\n] ",p=c);...
s514968734
p00017
C++
#include<iostream> #include<cstring> #include<stdio.h> using namespace std; int main(){ char a[100],b[100]; for(int i;i<100;i++){ a[i]='\0'; b[i]='\0'; } gets(a); int i=0; while(i<26){ for(int j=0;!(a[j]=='\0');j++){ if(0x61<=a[j]+i&&a[j]+i<=0x7A) b[j]+=i; else if(0x61<=a[j]&&a[j]<...
a.cc: In function 'int main()': a.cc:12:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(a); | ^~~~ | getw
s258229586
p00017
C++
#include<iostream> #include<cstring> #include<stdio.h> using namespace std; int main(){ char a[100],b[100]; for(int i;i<100;i++){ a[i]='\0'; b[i]='\0'; } gets(a); int i=0; while(i<26){ for(int j=0;!(a[j]=='\0');j++){ if(0x61<=a[j]+i&&a[j]+i<=0x7A) b[j]+=i; else if(0x61<=a[j]&&a[j]<...
a.cc: In function 'int main()': a.cc:12:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(a); | ^~~~ | getw
s450633658
p00017
C++
#include<iostream> #include<cstring> #include<stdio.h> using namespace std; int main(){ char a[100],b[100]; for(int i;i<100;i++){ a[i]='\0'; b[i]='\0'; } gets(a); int i=0; while(i<26){ for(int j=0;!(a[j]=='\0');j++){ if(0x61<=a[j]+i&&a[j]+i<=0x7A) b[j]+=i; else if(0x61<=a[j]&&a[j]<...
a.cc: In function 'int main()': a.cc:12:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(a); | ^~~~ | getw
s497141967
p00017
C++
#include<string.h> #include<stdio.h> using namespace std; int main(){ char a[100],b[100]; for(int i;i<100;i++){ a[i]='\0'; b[i]='\0'; } gets(a); int i=0; while(i<26){ for(int j=0;!(a[j]=='\0');j++){ if(0x61<=a[j]+i&&a[j]+i<=0x7A) b[j]+=i; else if(0x61<=a[j]&&a[j]<=0x7A){ b[j]=a[j]...
a.cc: In function 'int main()': a.cc:11:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s160956151
p00017
C++
#include<string> using namespace std; int main(){ string s, strc; while(getline(cin,s)){ for(int j=0;j<26;j++){ if(s.find("the")!=string::npos ||s.find("this")!=string::npos||s.find("that")!=string::npos ){ cout << s << endl; } for(int i=0;i<s.size();i++){//size()ツづ債閉カツ篠堋療アツづ個陳...
a.cc: In function 'int main()': a.cc:11:17: error: 'cin' was not declared in this scope 11 | while(getline(cin,s)){ | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<string> +++ |+#include <iostream>...
s212056434
p00017
C++
#include <string> #include <iostream> #include <algorithm> using namespace std; string dict = "abcdefghijklmnopqrstuvxwyz"; string decode(string s, int v) { string ans = s; for(int i = 0; i < (int) s.size(); i++) { if(s[i] >= 'a' && s[i] <= 'z') { ans[i] = dict[((s[i] + v) % 26)]; ...
a.cc: In function 'int main()': a.cc:23:14: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s484264167
p00017
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char str[81]; while(gets(str) != NULL) { int i,j; int len = strlen(str); for(i = 0;i < 26;i++) { for(j = 0;j < len;j++) { if(str[j] >= 'a' && str[j] <= 'z') { str[j] = (str[j] - 'a' + 1) % 26 + 'a'; } } ...
a.cc: In function 'int main()': a.cc:8:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | while(gets(str) != NULL) | ^~~~ | getw
s810491281
p00017
C++
#include <stdio.h> #include <conio.h> char* Rest(char *before, char lag); int main(void) { char before[1000]; scanf("%[^\n]", before); if (before[0] == 't'){ printf("%s\n", before); } else if (before[0] < 't'){ printf("%s\n", Rest(before, 't' - before[0])); } else if (before[0] > 't'){ printf("%s\n",...
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s373855974
p00017
C++
#include <stdio.h> #include <conio.h> void Rest(char *before, char lag); char ans[81]; int main(void) { char before[81]; scanf("%[^\n]", before); if (before[0] == 't'){ printf("%s\n", before); } else if (before[0] < 't'){ Rest(before, 't' - before[0]); printf("%s\n", ans); } else if (before[0] > 't'...
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s405017187
p00017
C++
#include <cctype> #include <cstdio> using namespace std; int k = 0; char enc(char c) { return (c-'a'+k)%26+'a'; } char dec(char c) { if (!islower(c)) return c; return (c-'a'+26-k)%26+'a'; } int main() { char s[128]; while (gets(s)) { char *c = s; state_delim: switch (*c) { case '.': c...
a.cc: In function 'int main()': a.cc:20:10: error: 'gets' was not declared in this scope; did you mean 'getw'? 20 | while (gets(s)) { | ^~~~ | getw
s878078905
p00017
C++
#include <iostream> #include <cstdio> #include <stdio.h> #include <string> using namespace std; static const int MAXV = 81; bool hantei(char data[]); void irekae(char data[]); int main() { while(!feof(stdin)) { char data[MAXV]; if(fgets(data, sizeof(data), stdin)==NULL) break; while(!hantei(data)) ...
a.cc: In function 'bool hantei(char*)': a.cc:23:6: error: 'strstr' was not declared in this scope 23 | if(strstr(data, "the")) return 1; | ^~~~~~ a.cc:3:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include ...
s606427469
p00017
C++
#include <iostream> #include <cstdio> #include <stdio.h> #include <string> using namespace std; static const int MAXV = 81; bool hantei(char* data); void irekae(char* data); int main() { while(!feof(stdin)) { char data[MAXV]; if(fgets(data, sizeof(data), stdin)==NULL) break; while(!hantei(data)) ...
a.cc: In function 'bool hantei(char*)': a.cc:23:6: error: 'strstr' was not declared in this scope 23 | if(strstr(data, "the")) return 1; | ^~~~~~ a.cc:3:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include ...
s347040575
p00017
C++
while line = STDIN.gets len = line.length while !(line =~ /(the|this|that)/) for i in 0..len-1 do if( line[i,1] =~ /[a-z]/) if(line[i,1] =~ /z/) line[i] = "a" else line[i] = line[i].succ end end end end puts line end
a.cc:7:26: error: too many decimal points in number 7 | for i in 0..len-1 do | ^~~~~~ a.cc:1:1: error: expected unqualified-id before 'while' 1 | while line = STDIN.gets | ^~~~~
s743482262
p00017
C++
using namespace std; char shiftch(char p, int n){ int t; if('A'<= p && p <='Z'){ p-='A'; if(n<0) n+=26; p+=n; p%=26; p+='A'; return p; } else if('a'<= p && p <='z'){ p-='a'; if(n<0) n+=26; p+=n; p%=26; p+='a'; return p; } else return p; } int checkch(char p){ if('A'<= p && p <='Z') ...
a.cc: In function 'int main()': a.cc:41:9: error: 'scanf' was not declared in this scope 41 | scanf("%[^\n]", in); | ^~~~~ a.cc:42:12: error: 'strlen' was not declared in this scope 42 | n= strlen(in); | ^~~~~~ a.cc:1:1: note: 'strlen' is defined in header '<cstring>...
s987607090
p00017
C++
if('A'<= p && p <='Z'){ p-='A'; if(n<0) n+=26; p+=n; p%=26; p+='A'; return p; } else if('a'<= p && p <='z'){ p-='a'; if(n<0) n+=26; p+=n; p%=26; p+='a'; return p; } else return p; } /* int checkch(char p){ if('A'<= p && p <='Z') return 2; else if('a'<= p && p <='z') return 1; else return...
a.cc:1:9: error: expected unqualified-id before 'if' 1 | if('A'<= p && p <='Z'){ | ^~ a.cc:9:9: error: expected unqualified-id before 'else' 9 | else if('a'<= p && p <='z'){ | ^~~~ a.cc:17:9: error: expected unqualified-id before 'else' 17 | else return p; ...
s811620026
p00017
C++
#include<iostream> #include<ctype> #include<string> using namespace std; bool find(string s){ return s.find("the",0)!=string::npos || s.find("this",0)!=string::npos || s.find("that",0)!=string::npos; } string rotate(string s,int n){ for(int i=0;i<s.size();i++){ if(isalpha(s[i]))s[i] = (s[i]-'a'+n)%26+'a'; } r...
a.cc:2:9: fatal error: ctype: No such file or directory 2 | #include<ctype> | ^~~~~~~ compilation terminated.
s047679940
p00017
C++
#include <iostream> #include <complex> #include <cmath> #include <cstdio> #include <string> #include <sstream> using namespace std; string rotate(string str) { for (int i = 0; i < str.size(); i++) { if ('a' <= str[i] && str[i] < 'z')str[i]++; else if (str[i] == 'z')str[i] = 'a'; } return s...
a.cc:51:8: error: redefinition of 'std::string rotate(std::string)' 51 | string rotate(string str) { | ^~~~~~ a.cc:10:8: note: 'std::string rotate(std::string)' previously defined here 10 | string rotate(string str) { | ^~~~~~ a.cc:59:5: error: redefinition of 'int main()' 59 | int ma...
s249598642
p00017
C++
#include <stdio.h> int main(void) { char str[100]; int num; int i; while (fgets(str, 99, stdin) != EOF){ num = 't' - str[0]; i = 0; while (str[i] != '\0'){ if ((str[i] >= 'A' && str[i] <= 'Z') || (str[i] >= 'a' && str[i] <= 'z')){ str[i] += num; } i++; } printf("%s", str); } printf("\n...
a.cc: In function 'int main()': a.cc:9:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | while (fgets(str, 99, stdin) != EOF){ | ^
s050190031
p00017
C++
import sys def ceaser_decode(text): d={} line="" for n in range(26): for c in (65,97): for i in range(26): d[chr(i+c)] = chr((i+n)%26+c) line = "".join([d.get(c,c) for c in text]) if line.find("the")!=-1 or line.find("this")!=-1 or line.find("that")!=-1:...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:5: error: 'line' does not name a type 5 | line="" | ^~~~
s372898980
p00017
C++
#include<cstdio> #include<cstring> #include<iostream> #include<windows.h> using namespace std; int main(){ char a[100]; while(scanf("%[^\n]",a) != EOF){ bool flg = 0; for(int i = 1; i < 26; i++){ unsigned char ans[100] = {0}; for(int j = 0; j < strlen(a); j++){ ...
a.cc:4:9: fatal error: windows.h: No such file or directory 4 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s153902959
p00017
C++
#include <iostream> #include <string> #include <stdio.h> using namespace std; int main() { string st; string w[3]={"the","this","that"}; int wn[3]={3,4,4},k,i,j,s,f; while(getline(cin,st)) { cout << st.size() << endl; k=0; while(k<st.size()) { for (i=0;i<3;i++) { s=0; f=0; if (st.size()<k+wn[i]) b...
a.cc: In function 'int main()': a.cc:27:10: error: expected '}' at end of input 27 | } | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s608692591
p00017
C++
#include <stdio.h> using namespace std; int main() { string st; string w[3]={"the","this","that"}; int wn[3]={3,4,4},k,i,j,s,f; while(getline(cin,st)) { k=0; while(k<st.size()) { for (i=0;i<3;i++) { s=0; f=0; if (st.size()<k+wn[i]) break; for (j=0;j<wn[i]-1;j++) if ((w[i][j]-w[i][j+1])==(st[k+j]-st...
a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string st; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#include <string> 2 | us...
s857633873
p00017
C++
#include <iostream> #include <string> #include <stdio.h> using namespace std; int main() { char st[80]; string w[3]={"the","this","that"}; int wn[3]={3,4,4},k,i,j,s,f,z; while(true) { k=0; z=0; scanf("%[^\0]",st); z=strlen(st); while(k<z) { for (i=0;i<3;i++) { s=0; f=0; if (z<k+wn[i]) break; for (...
a.cc: In function 'int main()': a.cc:12:11: error: 'strlen' was not declared in this scope 12 | z=strlen(st); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s730079751
p00017
C++
#include <stdio.h> using namespace std; int main() { char st[80]; string w[3]={"the","this","that"}; int wn[3]={3,4,4},k,i,j,s,f,z; while(true) { k=0; z=0; scanf("%[^0]",st); z=strlen(st); cout << z << endl; while(k<z) { for (i=0;i<3;i++) { s=0; f=0; if (z<k+wn[i]) break; for (j=0;j<wn[i]-1;j++) ...
a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string w[3]={"the","this","that"}; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#inc...
s962145077
p00017
C++
#include <string.h> #include <string> #include <stdio.h> using namespace std; int main() { string w[3]={"the","this","that"},st; int wn[3]={3,4,4},k,i,j,s,f; while(true) { k=0; getline(cin,st); while(k<st.size()) { for (i=0;i<3;i++) { s=0; f=0; if (st.size()<k+wn[i]) break; for (j=0;j<wn[i]-1;j++) ...
a.cc: In function 'int main()': a.cc:10:17: error: 'cin' was not declared in this scope 10 | getline(cin,st); | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <string> +++ |+#include <iostream...
s017143082
p00017
C++
#include <stdio.h> using namespace std; int main() { string w[3]={"the","this","that"},st; int wn[3]={3,4,4},k,i,j,s,f; while(true) { k=0; getline(cin,st); while(k<st.size()) { for (i=0;i<3;i++) { s=0; f=0; if (st.size()<k+wn[i]) break; for (j=0;j<wn[i]-1;j++) if ((w[i][j]-w[i][j+1])==(st[k+j]-st[k...
a.cc: In function 'int main()': a.cc:4:9: error: 'string' was not declared in this scope 4 | string w[3]={"the","this","that"},st; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#...
s906529718
p00017
C++
#include <stdio.h> using namespace std; int main() { string w[3]={"the","this","that"},st; int wn[3]={3,4,4},k,i,j,s,f; while(getline(cin,st)) { k=0; while(k<st.size()) { for (i=0;i<3;i++) { s=0; f=0; if (st.size()<k+wn[i]) break; for (j=0;j<wn[i]-1;j++) if (((w[i][j]-w[i][j+1]+26) % 26)==((st[k+j]-...
a.cc: In function 'int main()': a.cc:4:9: error: 'string' was not declared in this scope 4 | string w[3]={"the","this","that"},st; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#...
s900478870
p00017
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdio> using namespace std; int main(){ string str; char s[256]; getline(cin , str); int n = str.size(); int w = 1; for(int i=0;i<=n;i++){ s[i] = str[i]; } while(1){ for(int i=0;i<n;i++){ if(s[i] != ' ' && s[i] != '.'){...
a.cc: In function 'int main()': a.cc:23:8: error: 'strstr' was not declared in this scope 23 | if(strstr(s,"the") != NULL)break; | ^~~~~~ a.cc:5:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<cstdio> +++ |+#include <cstr...
s620381564
p00017
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdio> #include<cstring> using namespace std; int main(){ string str; char s[256]; int w = 0; while(scanf(" %c",&s[0]) != EOF{ do { w++; scanf("%c",&s[w]); }while(s[w] != '\n'); while(1){ s[w+1] = '\0'; fo...
a.cc: In function 'int main()': a.cc:11:34: error: expected ')' before '{' token 11 | while(scanf(" %c",&s[0]) != EOF{ | ~ ^
s651477975
p00017
C++
#include <stdio.h> #include <stdlib.h> #include <string> int caesar(char s[]); bool search(char s[]); int main(){ char s[256]; int i,j=0,n=10; scanf("%[^\n]",&s); while(!search(s)){ for(i=0;s[i]!='.';i++){ if(s[i]!=' ') s[i]++; if(s[i]>122) s[i]=97; } } printf("%s\n",s); return 0; } bool search(char ...
a.cc: In function 'bool search(char*)': a.cc:24:12: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 24 | is="this";e="the";at="that"; | ^~~~~~ a.cc:24:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 24 | is=...
s914978560
p00017
C++
#include <iostream> #include <string> using namespace std; bool decision(string input){ for(int i = 0; i < input.size()-3; i++){ if((input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'e') || (input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'i' && input[i+3] == 's') || (input[i] == 't' && input[i+1] ...
a.cc: In function 'int main()': a.cc:21:34: error: expected ')' before ';' token 21 | while(getline(cin, input);){ | ~ ^ | ) a.cc:21:35: error: expected primary-expression before ')' token 21 | while(getline(cin, input);){...
s411728079
p00017
C++
#include <iostream> #include <string> using namespace std; bool decision(string input){ for(int i = 0; i < input.size()-3; i++){ if((input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'e') || (input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'i' && input[i+3] == 's') || (input[i] == 't' && input[i+1] ...
a.cc: In function 'int main()': a.cc:21:34: error: expected ')' before ';' token 21 | while(getline(cin, input);){ | ~ ^ | ) a.cc:21:35: error: expected primary-expression before ')' token 21 | while(getline(cin, input);){...
s915628101
p00017
C++
#include <iostream> #include <string> #include <string.h> using namespace std; int main(){ string alpha = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; string str; while( cin >> str, str ){ getline( cin, str ); for( int a = 0; a < 26; a++ ){ for( int i = 0; i < str.length(); i++ ){ for( int j = ...
a.cc: In function 'int main()': a.cc:8:26: error: could not convert '(((void)std::operator>><char, char_traits<char>, allocator<char> >(std::cin, str)), str)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 8 | while( cin >> str, str ){ | ~~~~~~~~~~^~~~~ | ...
s447265205
p00017
C++
/*0017 written by iPhone*/ #include <iostream> #include <string> #include <cstring> using namespace std; int main(){ string s; while(getline(cin, s), s){ for(int i = 0; i < s.size(); i++) s[i]++; if(strstr(s.c_str(), "the") || strstr(s.c_str(), "this") || strstr(s.c_str(), "that") ) cout << s,...
a.cc: In function 'int main()': a.cc:10:26: error: could not convert '(((void)std::getline<char, char_traits<char>, allocator<char> >(std::cin, s)), s)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 10 | while(getline(cin, s), s){ | ~~~~~~~~~~~~~~~^~~ | ...
s160183139
p00017
C++
/*0017 written by iPhone*/ #include <iostream> #include <string> #include <cstring> using namespace std; int main(){ string s; while(getline(cin, s)){ for(int i = 0; i < s.size(); i++) s[i]++; if(strstr(s.c_str(), "the") || strstr(s.c_str(), "this") || strstr(s.c_str(), "that") ) cout << s, re...
a.cc: In function 'int main()': a.cc:12:108: error: expected primary-expression before 'return' 12 | if(strstr(s.c_str(), "the") || strstr(s.c_str(), "this") || strstr(s.c_str(), "that") ) cout << s, return 0; | ...
s497426722
p00017
C++
/*0017 written by iPhone*/ #include <iostream> #include <string> #include <cstring> using namespace std; int main(){ string s; while(getline(cin, s) && s){ for(int i = 0; i < s.size(); i++) s[i]++; if(strstr(s.c_str(), "the") || strstr(s.c_str(), "this") || strstr(s.c_str(), "that") ){ ...
a.cc: In function 'int main()': a.cc:10:27: error: no match for 'operator&&' (operand types are 'std::basic_istream<char>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | while(getline(cin, s) && s){ | ~~~~~~~~~~~~~~~ ^~ ~ | | | | ...
s041246417
p00017
C++
/*0017 written by iPhone*/ #include <iostream> #include <string> #include <cstring> using namespace std; int main(){ string s; while(getline(cin, s) && s != "\0"){ for(int i = 0; i < s.size(); i++) s[i]++; if(strstr(s.c_str(), "the") != NULL || strstr(s.c_str(), "this") = NULL || strstr(s.c_st...
a.cc: In function 'int main()': a.cc:12:45: error: lvalue required as left operand of assignment 12 | if(strstr(s.c_str(), "the") != NULL || strstr(s.c_str(), "this") = NULL || strstr(s.c_str(), "that") != NULL ){ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
s329472755
p00017
C++
/*0017 written by iPhone*/ #include <iostream> #include <string> using namespace std; int main(){ string s; while(getline(cin, s) && s != "\0"){ for(int i = 0; i < s.size(); i++) { if(s[i] != " ") s[i]++; if(s[i] > 'z' && s[i] != " ") s[i] -= 'z' - 'a'; } if(s.f...
a.cc: In function 'int main()': a.cc:11:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(s[i] != " ") s[i]++; a.cc:12:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(s[i] > 'z' && s[i] != " ") s[i] -= 'z' - 'a...
s620618716
p00017
C++
using namespace std; int main(){ char str; while(1){ str = getchar(); if(str=='.'){ cout<<str; break; } if(str!=' '){ str=str-4; cout<<str; }else{ cout<<" "; } } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:11: error: 'getchar' was not declared in this scope 6 | str = getchar(); | ^~~~~~~ a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | a.cc:8:7: error: 'cout' w...
s871409744
p00017
C++
#include<iostream> #include<string> int main(){ std::string str; while(std::getline(std::cin,str)){ for(int i=0;i<str.size();i++){ if(str[i]!=' ')str[i]+=1; } std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s963370908
p00017
C++
#include <iostream> #include <stdio.h> #include <string> #include <queue> #include <cmath> #include <stack> #define int64 long long int using namespace std; char * caesar(char *); int main() { int i, c; char str[128]; while(1){ for(i=0; ; i++){ c = getchar(); if(c == '\n' || c == EOF) break; str[i] ...
a.cc: In function 'char* caesar(char*)': a.cc:36:15: error: 'strlen' was not declared in this scope 36 | len = strlen(str); | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <stack> +++ |+#include...
s707869437
p00017
C++
#include <iostream> #include <string> using namespace std; int main() { string str; string in; vector<string> s; while (cin >> in) s.push_back(in); for (int i=0; i<(int)s.size(); i++) { str += s[i]; if (i<(int)s.size()-1) str += " "; } for (int i=1; i<=26; i++) { for (int j=0; j<n; j++) { if (str[j]...
a.cc: In function 'int main()': a.cc:9:9: error: 'vector' was not declared in this scope 9 | vector<string> 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> ...
s540982922
p00017
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
a.cc:28:17: error: 'string' is not a namespace-name 28 | using namespace string; | ^~~~~~ a.cc: In function 'int gcd(int, int)': a.cc:82:1: warning: no return statement in function returning non-void [-Wreturn-type] 82 | } | ^ a.cc: In function 'int main()': a.cc:108:28: error: 'npos' ...
s075285358
p00017
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
a.cc:28:17: error: 'string' is not a namespace-name 28 | using namespace string; | ^~~~~~ a.cc: In function 'int gcd(int, int)': a.cc:82:1: warning: no return statement in function returning non-void [-Wreturn-type] 82 | } | ^ a.cc: In function 'int main()': a.cc:108:28: error: 'npos' ...
s392210541
p00018
Java
import java.io.*; import java.util.*; class Main{ public static void main(String[] args){ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String str; int[] n=new int[5]; while((str=br.readLine())!=null){ String[] s=str.split(" "); for(int i=0;i<5;i++){ n[i]=Integer.parseInt(s[i]); } Arrays.sort...
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown while((str=br.readLine())!=null){ ^ 1 error
s525090996
p00018
Java
rt java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a[] =new int[5]; for (int i =0;i<a.length;i++){ a[i] = sc.nextInt(); } Arrays.sort(a); System.out.println(a[4]+" "+a[3]+" "+a[2]+" "+a[1]+...
Main.java:1: error: class, interface, enum, or record expected rt java.util.*; ^ 1 error
s170758699
p00018
Java
import java.util.Arrays; import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] n = new int[5]; for(int i = 0; i < 5; i++){ n[i]= sc.nextInt(); } Arrays.sort(n); System.out.println(n[4]+" "+n[3]+" "+n[2]+" "+n[1]+" "+n[0]);
Main.java:12: error: reached end of file while parsing System.out.println(n[4]+" "+n[3]+" "+n[2]+" "+n[1]+" "+n[0]); ^ 1 error
s640102331
p00018
Java
import java.util.*; public class Sort { /** * @param args */ public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int a[] = new int[5]; for(int i = 0; i<5; i++){ a[i]=sc.nextInt(); } Arrays.sort(a); for(int i = 4; i>-...
Main.java:2: error: class Sort is public, should be declared in a file named Sort.java public class Sort { ^ 1 error
s578194806
p00018
Java
import java.util.*; public class Sort { /** * @param args */ public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int a[] = new int[5]; for(int i = 0; i<5; i++){ a[i]=sc.nextInt(); } Arrays.sort(a); for(int i = 4; i>0...
Main.java:2: error: class Sort is public, should be declared in a file named Sort.java public class Sort { ^ 1 error
s514420877
p00018
Java
import java.util.*; public class Sort { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a[] = new int[5]; for(int i = 0; i<5; i++){ a[i]=sc.nextInt(); } Arrays.sort(a); System.out.print(a[4]+" "+a[3]+" "+a[2]+" "+a[1]+" "+a[0]); } }
Main.java:2: error: class Sort is public, should be declared in a file named Sort.java public class Sort { ^ 1 error
s866577866
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class Main { public static void main(String[] args) throws IOException { List<Integer> values = new ArrayLi...
Main.java:24: error: no suitable method found for join(String,List<Integer>) System.out.println(String.join(" ",values)); ^ method String.join(CharSequence,CharSequence...) is not applicable (varargs mismatch; List<Integer> cannot be converted to CharSequence) method String.jo...
s412437748
p00018
Java
import java.util.Scanner; public static void main(String[] args) { Scanner scan = new Scanner(System.in); int oldArray[] = new int[5]; int t; for (int i=0; i<5; i++) { int a = scan.nextInt(); oldArray[i] = a; } for (int j=0; j<4; j++){ ...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) ^ (use --enable-preview to enable unnamed classes) 1 error
s188171234
p00018
Java
import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class SortingFiveNumbers { public static void main(String[] a){ int inputCount = 5; Scanner in = new Scanner(System.in); String input = in.nextLine(); String[] numArray = input.split(" "); if (numArray.leng...
Main.java:6: error: class SortingFiveNumbers is public, should be declared in a file named SortingFiveNumbers.java public class SortingFiveNumbers { ^ 1 error
s635999571
p00018
Java
import java.util.Arrays; import java.util.Scanner; public class SortingFiveNumbers { public static void main(String[] a){ int inputCount = 5; Scanner in = new Scanner(System.in); String input = in.nextLine(); String[] numArray = input.split(" "); int[] temp = new int [inputCount]; for (int i...
Main.java:5: error: class SortingFiveNumbers is public, should be declared in a file named SortingFiveNumbers.java public class SortingFiveNumbers { ^ 1 error
s838267589
p00018
Java
import java.io.*; import java.util.*; public class InsertionSort { public static void main(String args[]) { int[] arr=new int[1000]; Scanner inp=new Scanner(System.in); int n=5; int i; for(i=0; i<n; i++) { arr[i]=inp.nextInt(); } Sortthis sorted=new Sortthis(); sorted.sorting(arr, n); for(i=0;...
Main.java:4: error: class InsertionSort is public, should be declared in a file named InsertionSort.java public class InsertionSort ^ 1 error
s605968996
p00018
Java
import java.util.Scanner; class ?????????{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); long a; long b; long c; long d; long e; int median; long num[]=new long[6]; a=sc.nextInt(); b=sc.nextInt(); c=sc.nextInt(); d=sc.nextInt(); e=sc.nextInt(); num[0]=a; num[1]=b; num[2]=c; num[3]=d; ...
Main.java:2: error: <identifier> expected class ?????????{ ^ 1 error
s849953408
p00018
Java
import static java.lang.Integer.parseInt; import static java.lang.System.out; import static java.util.Collections.reverse; import static java.util.Collections.sort; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import junit.framework.TestCase; public class Main exten...
Main.java:9: error: package junit.framework does not exist import junit.framework.TestCase; ^ Main.java:47: error: cannot find symbol abstract class BaseExe extends TestCase { ^ symbol: class TestCase Main.java:60: error: cannot find symbol fail(e.getMe...
s981640119
p00018
Java
import static java.lang.Integer.parseInt; import static java.lang.System.out; import static java.util.Collections.reverse; import static java.util.Collections.sort; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import junit.framework.TestCase; public class Main exten...
Main.java:9: error: package junit.framework does not exist import junit.framework.TestCase; ^ Main.java:47: error: cannot find symbol abstract class BaseExe extends TestCase { ^ symbol: class TestCase Main.java:60: error: cannot find symbol fail(e.getMe...
s227714356
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Comparator; public class SortingFiveNumbers { public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int array[] = new int [5]...
Main.java:7: error: class SortingFiveNumbers is public, should be declared in a file named SortingFiveNumbers.java public class SortingFiveNumbers { ^ 1 error
s498420519
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...
Main.java:15: error: cannot find symbol List<Integer> converted = SortingFiveNumbers.convertToNumbers(input); ^ symbol: variable SortingFiveNumbers location: class Main 1 error
s510751860
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...
Main.java:15: error: cannot find symbol List<Integer> converted = SortingFiveNumbers.convertToNumbers(input); ^ symbol: variable SortingFiveNumbers location: class Main 1 error
s202348381
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...
Main.java:15: error: cannot find symbol List<Integer> converted = SortingFiveNumbers.convertToNumbers(input); ^ symbol: variable SortingFiveNumbers location: class Main 1 error
s988664613
p00018
Java
Main class for AOJ where there is no input. */ public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String[] arr = str.split(" "); int[] list = new int[arr.length]; for(int i = 0; i < arr.length; i ++){ ...
Main.java:1: error: class, interface, enum, or record expected Main class for AOJ where there is no input. ^ Main.java:1: error: <identifier> expected Main class for AOJ where there is no input. ^ 2 errors
s423977441
p00018
Java
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; public class Main { public static void main(String[] args) throws IOException { BufferedReader input = ...
Main.java:1: error: class, interface, enum, or record expected 3 ^ Main.java:22: error: class, interface, enum, or record expected import java.io.IOException; ^ Main.java:23: error: class, interface, enum, or record expected import java.io.InputStreamReader; ^ Main.java:24: error: class, interface, enum, or record expe...
s440864033
p00018
Java
import java.util.*; public class Main{ Main(){ Scanner sc = new Scanner(System.in); int[] ary = new int[5]; while(sc.hasNext()){ for(int i = 0; i < 5; i++) ary[i] = sc.nextInt(); Arrays.sort(ary); System.out.print(Integer.toString(ary[4])); for(int i = 3; i >= 0; i--) System.out.print("...
Main.java:20: error: cannot find symbol new p0018(); ^ symbol: class p0018 location: class Main 1 error
s158792683
p00018
Java
public class Main { public static void main(String[] args) { try { // Problem0018_SortingFiveNumbers test = new Problem0018_SortingFiveNumbers(); Main test = new Main(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String line; while((line = reader.readLine()) != nu...
Main.java:6: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:6: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ...
s246347933
p00018
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws java.io.IOException{ Scanner scan = new Scanner(System.in); int[] delta=new int[5]; for(int j=0;j<5;j++){ delta[j] = scan.nextInt(); } Arrays.sort(delta); System.out.print(delta[4]+" ");...
Main.java:16: error: incompatible types: String cannot be converted to int System.out.print(delta[3+" "]); ^ Main.java:17: error: incompatible types: String cannot be converted to int System.out.print(delta[2+ " "]); ^ 2 errors
s696258304
p00018
Java
import java.util.*; public class Main { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner stdIn = new Scanner(System.in); int[] a = new int[5]; for(int i=0; i<5; i++){ a[i] = stdIn.nextInt(); } boolean jdg; do{ jdg = true; for(int i=0; i<4; i++){...
Main.java:31: error: reached end of file while parsing } ^ 1 error
s219171807
p00018
Java
import java.util.Arrays; import java.util.Scanner; public class Test { public static void main(String args[]){ Scanner stdIn = new Scanner(System.in); int[] intArray = new int[5]; for(int i = 0;i < intArray.length; i++){ intArray[i] = stdIn.nextInt(); } Arrays.sort(intArray); for(int i = intArray.le...
Main.java:5: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s339770378
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; public class Id0018 { public static void main(String[] args){ ArrayList<String> list; String[] str; BufferedReader br = new BufferedReader(new InputStreamReader(...
Main.java:7: error: class Id0018 is public, should be declared in a file named Id0018.java public class Id0018 { ^ 1 error
s383959170
p00018
Java
import java.util.Scanner; import java.util.ArrayList; import java.util.Arrays; class Main{ public static void main(String[] a){ Scanner sc = new Scanner(System.in).useDelimiter("\n"); ArrayList<String> alstr = new ArrayList<String>(); while(sc.hasNext()){ alstr.add(sc.next()); } int[] foo ...
Main.java:15: error: incompatible types: <null> cannot be converted to int int strlen = null; ^ 1 error
s034369039
p00018
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; public class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = null; try...
Main.java:8: error: illegal character: '\u3000' public class?Main { ^ 1 error
s712167117
p00018
Java
import java.util.Arrays; import java.util.Scanner; public class Sort1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { String line = sc.nextLine(); Scanner s = new Scanner(line); int[] a = new int[5]; for (int i=0 ; i<5 ; i++){ a[i] = s.nextInt(...
Main.java:4: error: class Sort1 is public, should be declared in a file named Sort1.java public class Sort1 { ^ 1 error
s505982681
p00018
C
nclude<stdio.h> int main(){ int a,i,j,s[5]; scanf("%d %d %d %d %d",&s[0],&s[1],&s[2],&s[3],&s[4]); for(i=0;i<5;i++){ for(j=0;j<5;j++){ if(s[j]<s[j+1]){ a=s[j]; s[j]=s[j+1]; s[j+1]=a; } } } printf("%d %d %d %d %d\n",s[0],s[1],s[2],s[3],s[4]); return 0; }
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | nclude<stdio.h> | ^
s758578742
p00018
C
#include<stdio.h> int main(){ int a[5],buf,i,j; scanf_s("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]); for(i=0;i<5;i++){ for(j=5-1;j>0;j--){ if(a[j-1]>a[j]){ buf=a[j-1]; a[j-1]=a[j]; a[j]=buf; } } } printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); return 0; }
main.c: In function 'main': main.c:4:1: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 4 | scanf_s("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]); | ^~~~~~~ | scanf
s448672373
p00018
C
#include<stdio.h> int main (void){ int i,j,t,max,maxj; int array[5]={0}; for(i=0;i<5;i++){ scanf("%d",&array[i]) } for(i=0;i<5;i++){ max=0; maxj=i; for(j=i;j<5;j++){ if(max<array[j]){ max = array[j]; maxj = j; } } t = array[i]; array[i] = array[maxj]; ...
main.c: In function 'main': main.c:9:26: error: expected ';' before '}' token 9 | scanf("%d",&array[i]) | ^ | ; 10 | } | ~
s809740618
p00018
C
#include<stdio.h> int main(void){ int a[5],i,j; scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4],); for(i=0;i<5;i++){ for(j=0;j<4;j++){ int t; if(a[j]<a[j+1]){ t=a[j]; a[j]=a[j+1]; a[j+1]=t; } } } printf("%d %d %d %d %d",a[0],a[1],a[2],a[3],a[4],); return 0; }
main.c: In function 'main': main.c:5:62: error: expected expression before ')' token 5 | scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4],); | ^ main.c:17:58: error: expected expression before ')' token 17 | printf("%d %d %d %...
s014038294
p00018
C
#include <stdio.h> int main() { int array[100], n, c, d, position, swap; n=5; scanf ("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4]); for ( c = 0 ; c < ( n - 1 ) ; c++ ) { position = c; for ( d = c + 1 ; d < n ; d++ ) { if ( array[position] > array[d] ) posi...
main.c: In function 'main': main.c:10:25: error: 'a' undeclared (first use in this function) 10 | scanf ("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4]); | ^ main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
s690846815
p00018
C
#include<stdio.h> int main(void){ int a[10], b[10], c[10], n, i; scanf("%d %d %d %d %d", &a[1], &a[2], &a[3], &a[4], &a[5]); a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; a[4] = b[4]; a[5] = b[5]; for ( i = 1; 1 <= 5; i++ ) { for ( n = 1; 1 <= 5; n++ ) { if ( a[i] > b[n]) { c...
main.c: In function 'main': main.c:13:15: error: assignment to expression with array type 13 | c = b[i]; | ^ main.c:15:18: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion] 15 | b[i] = c; | ^
s881008477
p00018
C
#include<stdio.h> int main(){ int n[6],i,j,t; for(i=0;i<5;i++)scanf("%d",&n[i]); for(i=0;i<5;i++){ for(j=i;j<5;j++){ if(n[i]<n[j]){ t=n[i];n[i]=n[j];n[j]=t; } } } for(printf("%d",n[0]),i=1;i<5;i++)printf(" %d",n[i]); printf("\n"); eixt(0); }
main.c: In function 'main': main.c:14:9: error: implicit declaration of function 'eixt' [-Wimplicit-function-declaration] 14 | eixt(0); | ^~~~
s794957225
p00018
C
int s[];M(int*a){return*1[&a]-*a;} main(){ scanf("%d%d%d%d%d",&s[0],&s[1],&s[2],&s[3],$s[4]); qsort(s,4,4,M); printf("%d %d %d %d %d\n",s[0],s[1],s[2],s[3],s[4]); return 0; }
main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int] 1 | int s[];M(int*a){return*1[&a]-*a;} | ^ main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplici...
s999980909
p00018
C
null
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | null | ^~~~
s289209326
p00018
C
null
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | null | ^~~~
s807593077
p00018
C
a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
main.c:1:1: warning: data definition has no type or storage class 1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10)); | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:6: error: type defaults to 'in...
s236848281
p00018
C
a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
main.c:1:1: warning: data definition has no type or storage class 1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:6: error: type defaults to 'int' in declaration of 'm...
s305299772
p00018
C
*a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
main.c:1:1: warning: data definition has no type or storage class 1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");% | ^ main.c:1:2: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*-...
s893399853
p00018
C
#include<stdio.h> #include<stdlib.h> int a[6],i; int comp(const void *p,const void *q){ return *(int *)q-*(int *)p; } int main(){ scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]); qsort(a,5,sizeof(int),comp); for(i=0;i<5;i++)printf("%d%c",a[i],i==4?'':' '); return 0; }
main.c: In function 'main': main.c:13:49: error: empty character constant 13 | for(i=0;i<5;i++)printf("%d%c",a[i],i==4?'':' '); | ^~
s626941776
p00018
C
#include<stdio.h> #include<stdlib.h> int a[6],i; int comp(const void *p,const void *q){ return *(int *)q-*(int *)p; } int main(){ scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]); qsort(a,5,sizeof(int),comp); for(i=0;i<5;i++)printf("%d%c",a[i],(i==4)?(''):(' ')); return 0; }
main.c: In function 'main': main.c:13:52: error: empty character constant 13 | for(i=0;i<5;i++)printf("%d%c",a[i],(i==4)?(''):(' ')); | ^~
s071965668
p00018
C
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] data = new int[5]; for ( int i = 0; i < 5; i++ ) data[i] = sc.nextInt(); Arrays.sort(data); System.out.println(data[4]+" "+data[3]+" "+data[2]+" "+data[1]+" "+data[0]); } }
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:3:1: error: unknown type name 'public' 3 | public class Main { | ^~~~~~ main.c:...
s509469837
p00018
C
main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();} | ^~~~ main.c: In function 'main': main.c:1:20: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){int a;for(;~scanf("%d",&a)...
s340094515
p00018
C
#include <stdio.h> void swap(int *x, int *y){ int temp; temp = *x; *x = *y; *y = temp; } int main(void){ int i; int lbflag; int num[5]; for(i = 0; i < 5; i++){ scanf("%d",num+i); } while(1){ lbflag = 1; for(i = 0; i < 4; i++){ if(num[i] < num[i+1]){ swap(num+i, num+i+1); } } for(i = 0; i...
main.c: In function 'main': main.c:37:9: error: expected declaration or statement at end of input 37 | return 0; | ^~~~~~
s564034915
p00018
C
#include <stdio.h> void qsort(int *data,int size); void swap(int *a,int *b); int main(void){ int i; int data[5]; for(i=0;i<5;i++) scanf("%d",&a[i]); qsort(data,5); for(i=0;i<5;i++) printf("%d ",a[i]); return 0; } vod qsort(int *data,int size){ int i,last=1; if(size<2)return; for(i=1;i<size;i++){ if(data[0]<data[i]){ s...
main.c: In function 'main': main.c:7:30: error: 'a' undeclared (first use in this function) 7 | for(i=0;i<5;i++) scanf("%d",&a[i]); | ^ main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in main.c: At top level: main.c:12:1: error: unk...
s645129508
p00018
C
#include <stdio.h> void qsort(int *data,int size); void swap(int *a,int *b); int main(void){ int i; int data[5]; for(i=0;i<5;i++) scanf("%d",&data[i]); qsort(data,5); for(i=0;i<5;i++) printf("%d ",data[i]); return o; } void qsort(int *data,int size){ int i,last=1; if(size<2)return; for(i=1;i<size;i++){ if(data[0]<data...
main.c: In function 'main': main.c:10:8: error: 'o' undeclared (first use in this function) 10 | return o; | ^ main.c:10:8: note: each undeclared identifier is reported only once for each function it appears in
s572044159
p00018
C
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int i; vector<int> vec(5.0); for(i = 0 ; i<5 ; i++){ cin >> vec[i]; } sort(vec.begin() , vec.end() ); for(i = 4; i>=0 ; i--){ if(i == 0) cout << vec[i] << endl; else cout << vec[i] <<" "; ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s535217463
p00018
C
include <stdio.h> int main(void) { int p[5]; int n=5; int i,j,temp; for(i=0;i<5;i++){ scanf("%d",&p[i]); } for(i=0;i<n-1;i++){ for(j=n-1;j>i;j--){ if(p[j-1]>p[j]){ temp=p[j]; p[j]=p[j-1]; p[j-1]=temp; } } } for(i=0;i<5;i++){ printf("%d",p[i]); if(i<4){ printf(" "); } else{ p...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s353515884
p00018
C
include <stdio.h> int main(void) { int p[5]; int n=5; int i,j,temp; for(i=0;i<5;i++){ scanf("%d",&p[i]); } for(i=0;i<n-1;i++){ for(j=n-1;j>i;j--){ if(p[j-1]>p[j]){ temp=p[j]; p[j]=p[j-1]; p[j-1]=temp; } } } for(i=0;i<5;i++){ printf("%d",p[i]); if(i<4){ printf(" "); } } return 0...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s402722670
p00018
C
#include <stdio.h> int main() { int i,j,a[5]; scanf("%d %d %d %d %d",a,a+1,a+2,a+3,a+4); for(i=0;i<5;i++){ for(j=i+1;j<5;j++){ if(a[i]<a[j]){ t=a[i];a[i]=a[j];a[j]=t; } } } printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); return 0; }
main.c: In function 'main': main.c:11:33: error: 't' undeclared (first use in this function) 11 | t=a[i];a[i]=a[j];a[j]=t; | ^ main.c:11:33: note: each undeclared identifier is reported only once for each function it appears in
s966314079
p00018
C++
#include <iostream> #include <memory> using namespace std; namespace sorting_five_numbers { class SortingFiveNumbers { private: //! データサイズ static const int Size = 5; //! 入力値 int dataList[Size]; public: /** * @brief コンストラクタ */ SortingFiv...
a.cc: In constructor 'sorting_five_numbers::SortingFiveNumbers::SortingFiveNumbers(int*)': a.cc:22:13: error: 'memset' was not declared in this scope 22 | memset(dataList, 0, Size); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#...