submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s389344878
p03834
C++
#include<iostream> #include<string> using namespace std; using string = std::string; int main() { string s; std::cin >> s; for each (char var in s) { if (var == ',') std::cout << " "; else std::cout << var; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: expected '(' before 'each' 10 | for each (char var in s) | ^~~~ | ( a.cc:10:19: error: expected primary-expression before 'char' 10 | for each (char var in s) | ^~~~ a.cc:10:13: error: 'e...
s344687342
p03834
Java
import java.util.Scanner; public class A_Haiku { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); System.out.println(s.replace(',', ' ')); sc.close(); } }
Main.java:3: error: class A_Haiku is public, should be declared in a file named A_Haiku.java public class A_Haiku { ^ 1 error
s599106625
p03834
Java
import java.util.Scanner; public class Main051A { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); String s = sc.next(); System.out.println(s.replace(',', ' ')); sc.close(); } }
Main.java:2: error: class Main051A is public, should be declared in a file named Main051A.java public class Main051A { ^ 1 error
s427413204
p03834
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = scanner.next(); String a = s.substring(0,5); String b = s.substring(6,13); String c = s.substring(14,19); System.out.println(a + " " + b + " " + c); } }
Main.java:5: error: cannot find symbol String s = scanner.next(); ^ symbol: variable scanner location: class Main 1 error
s150602176
p03834
C++
#include <iostream> #include <string> using namespace std; int main(){ string s;cin>>s; string::size_type pos = s.find(','); while(pos != string::npos){ s.replace(pos, 1, ' '); pos = s.find(',', pos + 1); } cout << s << endl; }
a.cc: In function 'int main()': a.cc:8:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(std::__cxx11::basic_string<char>::size_type&, int, char)' 8 | s.replace(pos, 1, ' '); | ~~~~~~~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:54, ...
s883787975
p03834
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin>>s; replace(s.begin(), s.end(), ',', ' '); cout << s << endl; }
a.cc: In function 'int main()': a.cc:7:5: error: 'replace' was not declared in this scope 7 | replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s524546476
p03834
C++
S = input() ans = S[:5]+' '+S[6:13]+' '+S[14:] print(ans)
a.cc:1:1: error: 'S' does not name a type 1 | S = input() | ^
s196136075
p03834
C++
#include <iostream> #include <cstdio> using namespace std; int main() { char str[21]; int i; gets(str); for(i=0;str[i]!='\0';i++) { if(str[i]==',') { str[i]=' '; } } puts(str); return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(str); | ^~~~ | getw
s406788542
p03834
C++
#include <bits/stdc++.h> #include <cstdio> #include <cstdlib> using namespace std; int main() { char s[100]; gets(s); for(int i=0 ; s[i] ; i++){ if(s[i]==',') printf(" "); else printf("%c",s[i]); } putchar('\n'); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s520348265
p03834
C++
#include <bits/stdc++.h> #include <cstdio> #include <cstdlib> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); #endif // ONLINE_JUDGE char s[100]; gets(s); for(int i=0 ; s[i] ; i++){ if(s[i]==',') purchar(' '); else ...
a.cc: In function 'int main()': a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(s); | ^~~~ | getw a.cc:13:23: error: 'purchar' was not declared in this scope; did you mean 'putchar'? 13 | if(s[i]==',') purchar(' '); | ...
s975551401
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { //freopen("in.txt","r",stdin); char s[20]; gets(s); for(int i=0; i<20; ++i) { if(s[i]==',') s[i]=' '; } puts(s); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s957871736
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { freopen("in.txt","r",stdin); char s[20]; gets(s); for(int i=0; i<20; ++i) { if(s[i]==',') s[i]=' '; } puts(s); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s787418951
p03834
C++
#include<cstdio> #define rep(i,a,b) for (int i = a ; i < b ; i ++) using namespace std; char a[100]; int main() { gets(a); a[5] = ' '; a[13] = ' '; puts(a); }
a.cc: In function 'int main()': a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s379512200
p03834
C++
#include<bits/stdc++.h> #define rep(i,a,b) for (int i = a ; i < b ; i ++) using namespace std; char a[100]; int main() { gets(a); a[5] = ' '; a[13] = ' '; puts(a); }
a.cc: In function 'int main()': a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s733732698
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { char s[25]; gets(s); s[5] = ' '; s[12] = ' '; puts(s); 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(s); | ^~~~ | getw
s381546502
p03834
C++
#include <iostream> #include <cstdio> #include <string> #include <cstring> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <queue> #include <map> #include <set> #include<string.h> #include <algorithm> using namespace std; int main() { char s[25]; gets(s); for(int i=0;s[i]!='\0';++i) {...
a.cc: In function 'int main()': a.cc:18:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(s); | ^~~~ | getw
s259824225
p03834
C++
#include <iostream> #include <cstdio> #include <string> #include <cstring> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <queue> #include <map> #include <set> #include <algorithm> using namespace std; int main() { char s[25]; gets(s); for(int i=0;s[i]!='\0';++i) { if(s[i]=='...
a.cc: In function 'int main()': a.cc:17:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 17 | gets(s); | ^~~~ | getw
s315425615
p03834
C++
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <cmath> #include <string> #include <map> #include <stack> #include <queue> #include <vector> #define inf 0x3f3f3f3f #define met(a,b) memset(a,b,sizeof a) #define pb push_back typedef long long ll; using namespace std; const int N = 5...
a.cc: In function 'int main()': a.cc:22:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 22 | gets(str); | ^~~~ | getw
s504128843
p03834
C++
#include <bits/stdc++.h> int main() { string str; std::cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == ',') { str[i] = ' '; } } std::cout << str << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | string str; | ^~~~~~ a.cc:4:3: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linu...
s982232686
p03834
C++
#include <bits/stdc++.h> int main() { string str; std::cin >> str; for (int i = 0: i < str.length(); i++) { if (str[i] == ',') { str[i] = ' '; } } std::cout << str << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | string str; | ^~~~~~ a.cc:4:3: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linu...
s733490490
p03834
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String[] split = s.split(','); System.out.println(split[0] + " " + split[1] + " " + split[2]); } }
Main.java:7: error: incompatible types: char cannot be converted to String String[] split = s.split(','); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s000317869
p03834
C++
#include<iostream> #include<string> using namespace std; void main() { string str; cin >> str; for (int i = 0; i < 19; i++) { if (i == 5 || i == 13) { cout << " "; } else { cout << str[i]; } } cout << endl; }
a.cc:6:1: error: '::main' must return 'int' 6 | void main() { | ^~~~
s797434370
p03834
Java
public class Beg54A { public static void main(String[] args) { final String input = args[0]; for (int i = 0; i < input.length(); i++) System.out.print(input.charAt(i) == ',' ? ' ' : input.charAt(i)); } }
Main.java:1: error: class Beg54A is public, should be declared in a file named Beg54A.java public class Beg54A { ^ 1 error
s968606279
p03834
C++
#include <stdio.h> int main(){ char s; s = "happy,newyear,enjoy"; return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 6 | s = "happy,newyear,enjoy"; | ^~~~~~~~~~~~~~~~~~~~~ | | | const char*
s184256795
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; std::replace(s.begin(), s.end(), ',', ' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: 'replace' is not a member of 'std' 11 | std::replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s700109441
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; replace(s.begin(), s.end(), ',', ' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'replace' was not declared in this scope 11 | replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s823617543
p03834
C
s = input() print(s.replace(',',' '))
main.c:1:1: warning: data definition has no type or storage class 1 | s = input() | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration] 1 | s = input() | ^~~~~ main.c:1:5:...
s864255098
p03834
C++
int main(void){ string s; cin >> s; s[5]=' ',s[13]=' '; cout << s << endl; return 0;
a.cc: In function 'int main()': a.cc:2:5: error: 'string' was not declared in this scope 2 | string s; | ^~~~~~ a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> s; | ^~~ a.cc:3:12: error: 's' was not declared in this scope 3 | cin >> s; | ^ a....
s060476637
p03834
C++
int main(void){ string s; cin >> s; s[5]=' ',s[13]=' '; cout << s << end1; return 0;
a.cc: In function 'int main()': a.cc:2:5: error: 'string' was not declared in this scope 2 | string s; | ^~~~~~ a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> s; | ^~~ a.cc:3:12: error: 's' was not declared in this scope 3 | cin >> s; | ^ a....
s969430921
p03834
C++
int main(void){ string s; cin >> s; s[5]=' ',s[13]=' '; cout << s << end1; return 0;
a.cc: In function 'int main()': a.cc:2:5: error: 'string' was not declared in this scope 2 | string s; | ^~~~~~ a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> s; | ^~~ a.cc:3:12: error: 's' was not declared in this scope 3 | cin >> s; | ^ a....
s303202238
p03834
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<string> #include<cstring> #include<vector> #include<map> #include<list> #include<stack> #include<queue> #include<climits> //INT_MIN/MAX using namespace std; #define FOR(i,s,e) for(ll (i)=(s);(i)<(e);(i)++) #define FORR(i,s,e) for(ll (i)=(...
a.cc: In function 'int main()': a.cc:48:24: error: expected primary-expression before ';' token 48 | cout << S[i] <<; | ^
s227343729
p03834
C++
def slv(string): ret = '' for i in range(len(string)): if string[i] == ',': ret += ' ' else: ret += string[i] if __name__ == '__main__': s = input() print(slv(s))
a.cc:2:11: error: empty character constant 2 | ret = '' | ^~ a.cc:9:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 9 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:1:1: error: 'def' does not name a type 1 | def slv(string): ...
s879623181
p03834
C++
#include <iostream>#include<string>using namespace std;string a,b,c;int main() {cin>>a>>b>>c;cout<<a<<" "<<b<<" "<<c;return 0;}
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include <iostream>#include<string>using namespace std;string a,b,c;int main() {cin>>a>>b>>c;cout<<a<<" "<<b<<" "<<c;return 0;} | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function ...
s176489699
p03834
C++
#include <iostream> #include<string> using namespace std; int main(){ string s; cin>>s; s[5]=[13]=' '; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:7:7: error: expected identifier before numeric constant 7 | s[5]=[13]=' '; | ^~ a.cc: In lambda function: a.cc:7:10: error: expected '{' before '=' token 7 | s[5]=[13]=' '; | ^ a.cc: In function 'int main()': a.cc:7:11: error: no match for 'operato...
s255935401
p03834
C++
#include <iostream> int main() { char str[20]; cin >> str; str[5] = str[13] = ' '; cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin >> str; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to stan...
s300352866
p03834
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ cout<<(s[i]==','?" ":s[i]); } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:33: error: operands to '?:' have different types 'const char*' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 7 | cout<<(s[i]==','?" ":s[i]);
s267796024
p03834
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ cout<<(s[i]==','?" ",s[i]); } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:42: error: expected ':' before ')' token 7 | cout<<(s[i]==','?" ",s[i]); | ^ | : a.cc:7:42: error: expected primary-expression before ')' token
s749340563
p03834
Java
public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int c=0,x,y,z,k,s; k=sc.nextInt(); s=sc.nextInt(); for(x=0;x<=s;i++) { for(y=0;y<=s;y++) { for(z=0;z<=s;z++) { if((x+y+z)==s) c++; } } } System.out.println(c...
Main.java:5: error: cannot find symbol Scanner sc=new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc=new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:9: error: cannot find symbol for(x=0;x<=s;i++...
s790744018
p03834
C++
#include <iostream> #include <string> int main() { string s; std::cin >> s; for (int i=0;i<s.size();i++){ if(i==5||i==13) std::cout << ' '; else std::cout << s[i]; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:5:1: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, ...
s997849519
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { char S[19]; cin >> S; S[5] == ' '; S[13] == ' '; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: 's' was not declared in this scope 10 | cout << s << endl; | ^
s700641316
p03834
C++
qweqweqweqw
a.cc:1:1: error: 'qweqweqweqw' does not name a type 1 | qweqweqweqw | ^~~~~~~~~~~
s759918405
p03834
C++
#define _USE_MATH_DEFINES #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include<iomanip> //#include<bits/stdc++.h> using namespace std; int main() { strin...
a.cc: In function 'int main()': a.cc:27:46: error: 'edndl' was not declared in this scope 27 | cout << b << " " << c << " " << d << edndl; | ^~~~~
s249757523
p03834
C++
#include <stdio.h> char s1[1024]; int main() { scanf("%s", s1); for(int i = 0; i < strlen(s1); i++) { if(s1[i] == ',') s1[i] = ' '; } printf("%s\n", s1); return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: 'strlen' was not declared in this scope 7 | for(int i = 0; i < strlen(s1); i++) { | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> ++...
s053791839
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin>>s; s[5]="_"; s[13]=" _"; cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:6: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | s[5]="_"; | ^~~ | | | const char* a.cc:10:7: error: invalid conversion from 'const char*' to ...
s485263647
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin>>s; s[5]=" "; s[13]=" "; cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:6: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | s[5]=" "; | ^~~ | | | const char* a.cc:10:7: error: invalid conversion from 'const char*' to ...
s088393506
p03834
C
#include<stdio.h> #include<stdlib.h> int main() { char string[20]; int i = -1; fscanf(stdin,"%19[^\n]",string); while(string[++i]!=EOF){ if(string[i]==','){ string[i] = ' '; } printf("%s",string); return 0; }
main.c: In function 'main': main.c:18:1: error: expected declaration or statement at end of input 18 | } | ^
s199886720
p03834
C++
# -*- utf8 -*- arg = gets.chomp # arg = arg.split(" ") puts arg.gsub(/,/, " ")
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- utf8 -*- | ^ a.cc:5:3: error: invalid preprocessing directive #arg 5 | # arg = arg.split(" ") | ^~~ a.cc:3:1: error: 'arg' does not name a type 3 | arg = gets.chomp | ^~~
s483775164
p03834
C++
test submit totototo
a.cc:1:1: error: 'test' does not name a type 1 | test submit totototo | ^~~~
s768358313
p03834
C++
Test submit.Tptptp
a.cc:1:1: error: 'Test' does not name a type 1 | Test submit.Tptptp | ^~~~
s439699899
p03834
C++
てst
a.cc:1:1: error: '\U00003066\U0000ff53\U0000ff54' does not name a type 1 | てst | ^~~~~~
s243763706
p03834
C++
てst
a.cc:1:1: error: '\U00003066\U0000ff53\U0000ff54' does not name a type 1 | てst | ^~~~~~
s246782259
p03834
Java
import java.util.Scanner; public class TaskA { public static void main(String[] args) { Scanner s = new Scanner(System.in); String line = s.nextLine(); String result = ""; for(int i = 0; i < line.length(); i ++){ if(line.charAt(i)==','){ result += ' '; }else{ result += line.charAt(i); } } ...
Main.java:3: error: class TaskA is public, should be declared in a file named TaskA.java public class TaskA { ^ 1 error
s078429742
p03834
Java
public static void main(String[] args) { Scanner s = new Scanner(System.in); String line = s.nextLine(); String result = ""; for(int i = 0; i < line.length(); i ++){ if(line.charAt(i)==','){ result += ' '; }else{ result += line.charAt(i); } } System.out.println(result); }
Main.java:1: 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
s625311208
p03834
C++
#include<bits/stdc++.h> #define int long long int #define rep(a,b,c) for(int a=b;a<c;a++) #define repm(a,b,c) for(int a=(b-1);a>=c;a--) #define pb push_back #define str string #define sf(a) scanfs("%d",&a) #define pb push_back #define mp make_pair #define Fi first #define Se second #define ALL(v) (v).begin(), (v).end(...
a.cc: In function 'void ans3()': a.cc:93:13: error: 'ss' was not declared in this scope; did you mean 's'? 93 | cout << ss.size() << endl; | ^~ | s
s880425368
p03834
C++
#include <iostream> #include <string> #include <cstdio> #define ULL unsigned long long using namespace std; int main() { string str; cin.getline(str, EOF); for (int i=0; i<str.size(); i++){ if (str[i] != ' ' && str[i] != ',') cout << str[i]; if (str[i] == ',') c...
a.cc: In function 'int main()': a.cc:9:16: error: no matching function for call to 'std::basic_istream<char>::getline(std::string&, int)' 9 | cin.getline(str, EOF); | ~~~~~~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:...
s059300835
p03834
C++
#include <iostream> #include <string> #include <cstdio> #define ULL unsigned long long using namespace std; int main() { string str; getline(stdin, str, '\n'); for (int i=0; i<str.size(); i++){ if (str[i] != ' ' && str[i] != ',') cout << str[i]; if (str[i] == ',') ...
a.cc: In function 'int main()': a.cc:9:12: error: no matching function for call to 'getline(FILE*&, std::string&, char)' 9 | getline(stdin, str, '\n'); | ~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s321165884
p03834
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; //頂点fromkら頂点へのtoへのコストcostの辺 struct edge { int from, to, cost;}; const int MAX_V = 100; const int MAX_E = 10000; const int INF = 9999; edge es[MAX_E]; int prev[10000]; int d[MAX_V]; //最短距離 int V, E; //Vは頂点数、Eは辺の数 int used[MAX_V][M...
a.cc: In function 'void shortest_path(int)': a.cc:24:30: error: reference to 'prev' is ambiguous 24 | for(int i = 0; i < V; i++) prev[i] = -1; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s197807218
p03834
C++
#include <iostream> #include <string> int main() { string s; std::cin >> s ; while (true) { std::string::size_type pos = s.find(","); if (pos != std::string::npos) { s.replace(pos, 1, " "); } else { break; } } std::cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'string' was not declared in this scope 7 | string s; | ^~~~~~ a.cc:7:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/...
s842939912
p03834
C++
#include <iostream> #include <string> #include <cstdio> #define ULL unsigned long long using namespace std; int main() { string str; getline(con, str, EOF); for (int i=0; i<str.size(); i++){ if (str[i] != ' ' && str[i] != ',') cout << str[i]; if (str[i] == ',') ...
a.cc: In function 'int main()': a.cc:9:13: error: 'con' was not declared in this scope 9 | getline(con, str, EOF); | ^~~
s803741121
p03834
C++
#include <iostream> #include <string> #include <cstdio> using namespace std; int main() { string str; getline(cin, str, EOF); for (int i=0; i<str.size(); i++){ if (str[i] != ' ' && str[i] != ',') cout << str[i]; if (str[i] == ',') cout << ' '; } cout << e...
a.cc: In function 'int main()': a.cc:8:12: error: no matching function for call to 'getline(std::istream&, std::string&, int)' 8 | getline(cin, str, EOF); | ~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s824851250
p03834
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; //頂点fromkら頂点へのtoへのコストcostの辺 struct edge { int from, to, cost;}; const int MAX_V = 100; const int MAX_E = 10000; const int INF = 9999; edge es[MAX_E]; int prev[MAX_V]; int d[MAX_V]; //最短距離 int V, E; //Vは頂点数、Eは辺の数 int used[MAX_V][M...
a.cc: In function 'void shortest_path(int)': a.cc:24:30: error: reference to 'prev' is ambiguous 24 | for(int i = 0; i < V; i++) prev[i] = -1; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s168656997
p03834
C
#include <stdio.h> #include<string.h> int main(){ char s[16]; int k; int s; int x; int y; int z; int g=0; int q; scanf("%d%d",&k,&s); for(x=0;x<=k;x++){ for(y=0;y<=k;y++){ for(z=0;z<=k;z++){ if(x+y+z==s){ g++; } } } } ...
main.c: In function 'main': main.c:8:13: error: conflicting types for 's'; have 'int' 8 | int s; | ^ main.c:6:14: note: previous declaration of 's' with type 'char[16]' 6 | char s[16]; | ^
s670288193
p03834
Java
import java.io.*; public class test1 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str1=br.readLine(); String str2=str1.replace(',', ' '); System.out.println(str2); } }
Main.java:2: error: class test1 is public, should be declared in a file named test1.java public class test1 { ^ 1 error
s566558601
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin >> s; s[5] = s[13] = ’ ’; cout << s << endl; return 0; }
a.cc:9:20: error: extended character ’ is not valid in an identifier 9 | s[5] = s[13] = ’ ’; | ^ a.cc:9:22: error: extended character ’ is not valid in an identifier 9 | s[5] = s[13] = ’ ’; | ^ a.cc: In function 'int main()': a.cc:9:20: error: '\U00002...
s763038764
p03834
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int main(void){ char h[20]; scanf("%s",h); for(i=0;i<strlen(h);i++) if(h[i]==',') h[i]=' '; printf("%s\n",h); return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'i' was not declared in this scope 8 | for(i=0;i<strlen(h);i++) | ^
s738014771
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin >> s; s[5] = s[13] = ′ ′; cout << s << endl; return 0; }
a.cc:9:20: error: extended character ′ is not valid in an identifier 9 | s[5] = s[13] = ′ ′; | ^ a.cc:9:22: error: extended character ′ is not valid in an identifier 9 | s[5] = s[13] = ′ ′; | ^ a.cc: In function 'int main()': a.cc:9:20: error: '\U00002...
s672039787
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin >> s; s[5] = s[13] = ‘ ‘; cout << s << endl; return 0; }
a.cc:9:20: error: extended character ‘ is not valid in an identifier 9 | s[5] = s[13] = ‘ ‘; | ^ a.cc:9:22: error: extended character ‘ is not valid in an identifier 9 | s[5] = s[13] = ‘ ‘; | ^ a.cc: In function 'int main()': a.cc:9:20: error: '\U00002...
s351770735
p03834
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ char s[22]; while(gets(s)){ int len = strlen(s); for(int i = 0;i < len;++i){ if(s[i] == ',') printf(" "); else printf("%c",s[i]); } printf("\n"); } return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | while(gets(s)){ | ^~~~ | getw
s317639873
p03834
C++
#include <iostream> int main() { std::string s; std::cin >> s; for (int i = 0; i < s.size(); ++i) { if (s[i] == ',') std::cout << " "; else std::cout << s[i]; } std::cout << std::endl;
a.cc: In function 'int main()': a.cc:11:28: error: expected '}' at end of input 11 | std::cout << std::endl; | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s569304369
p03834
C
#include<stdio.h> int main() { char a; for(;;){ scanf("%c",&a); printf("%c",a); if(a == ,){ printf(" "); } } return 0; }
main.c: In function 'main': main.c:8:13: error: expected expression before ',' token 8 | if(a == ,){ | ^
s057880878
p03834
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ char s[22]; while(gets(s)){ int len = strlen(s); for(int i = 0;i < len;++i){ if(s[i] == ',') printf(" "); else printf("%c",s[i]); } printf("\n"); } return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | while(gets(s)){ | ^~~~ | getw
s058240556
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string s; cin >>s; s[5] = " "; s[13] = " "; s[19] = " "; cout << s <<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s[5] = " "; | ^~~ | | | const char* a.cc:8:9: error: invalid conversion from 'const cha...
s946498093
p03834
C
#include <stdio.h> int main() { char c; while((c = getchar()) != EOF){ if(c == ',') c=' '; putchar(c); } retrurn(0); }
main.c: In function 'main': main.c:10:2: error: implicit declaration of function 'retrurn' [-Wimplicit-function-declaration] 10 | retrurn(0); | ^~~~~~~
s192366294
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string st=""; char s[100]; gets(s); for(int i=0;s[i];i++){ if(isalpha(s[i])) st+=s[i]; else st+=" "; } cout<<st<<endl; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s213841953
p03834
Java
import java.util.Scanner; /** * Created by sonetsuyoshi on 2016/07/31. */ public class Main { static public void main(String[] args) { Scanner sc = new Scanner(System.in); char[] chs = sc.nextLine().toCharArray(); chs[5] = ' '; chs[13] = ' '; for(char ch: chs) System.out...
Main.java:18: error: cannot find symbol @Test ^ symbol: class Test location: class Main 1 error
s186995369
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { string input; cin << input; input[5] = input[13] = ' '; cout << input << endl; }
a.cc: In function 'int main()': a.cc:9:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | cin << input; | ~~~ ^~ ~~~~~ | | | | | std::string {aka std::__cxx...
s064072074
p03834
C++
s = gets.split(",") puts s .gsub(/,/," ")
a.cc:1:1: error: 's' does not name a type 1 | s = gets.split(",") | ^
s531300784
p03834
C++
main = do s <- getLine putStrLn $ map (\c -> if c == ',' then ' ' else c) s
a.cc:3:19: error: stray '\' in program 3 | putStrLn $ map (\c -> if c == ',' then ' ' else c) s | ^ a.cc:1:1: error: 'main' does not name a type 1 | main = do | ^~~~
s220329605
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string st=""; char s[100]; gets(s); for(int i=0;s[i];i++){ if(isalpha(s[i])) st+=s[i]; else st+=" "; } cout<<st<<endl; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s311654193
p03834
C++
//========================================================================== // // Bismillahir-Rahmanir-Rahim // // ========================================================================== #include <bits/stdc++.h> #define ll long long int #define f(x,y,z) ...
a.cc: In function 'int main()': a.cc:66:20: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'length' 66 | for(int i=0;i<v.length();i++){ | ^~~~~~
s441976102
p03834
C++
#define SORT(v) sort(v.begin(), v.end()) #include "iostream" #include "map" #include "vector" #include <stack> #include "cstdlib" #include <algorithm> #include <cstdarg> #include "ane.cpp" #define INF (int)1e9 #define NMAX 200 #define MMAX 200 #define MOD 100000 using namespace std; // コメントアウトするとdb_printf()を実行しない #de...
a.cc:9:10: fatal error: ane.cpp: No such file or directory 9 | #include "ane.cpp" | ^~~~~~~~~ compilation terminated.
s280160413
p03834
C++
#include <iostream> #include <iomanip> #include <ios> #include <sstream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cmath> #include <numeric> #include <regex> #include <utility> #include <random> #include <cstddef> #include <cstdint> #include <cfloat> #include <limits> #include <array> #inc...
a.cc: In function 'int main()': a.cc:47:11: error: 'ALL' was not declared in this scope 47 | replace(ALL(s), ',', ' '); | ^~~
s825382075
p03834
Java
import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st=new StringTokenizer(br.readLine(),","); System.out.print(st.nextToken()+" "+st.nextToken()+" "+st.nextToken()...
Main.java:6: error: cannot find symbol StringTokenizer st=new StringTokenizer(br.readLine(),","); ^ symbol: class StringTokenizer location: class Main Main.java:6: error: cannot find symbol StringTokenizer st=new StringTokenizer(br.readLine(),","); ^ symbol...
s785712367
p03834
Java
import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st=new StringTokenizer(br.readLine(),","); System.out.print(st.nextToken()+" "+st.nextToken()+" "+st.nextToken()...
Main.java:6: error: cannot find symbol StringTokenizer st=new StringTokenizer(br.readLine(),","); ^ symbol: class StringTokenizer location: class Main Main.java:6: error: cannot find symbol StringTokenizer st=new StringTokenizer(br.readLine(),","); ^ symbol...
s086581614
p03834
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<math.h> #include<map> #define rep(i,n,m) for(int i=n;i<(int)(m);i++) using namespace std; int main() { string str; cin >> str; rep(i, 0, str.length) { if (str[i] == ',') { str[i] = ' ' ; } } cout << str << endl; ret...
a.cc: In function 'int main()': a.cc:19:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s882527352
p03834
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt = 0; String str = ""; String s1 = sc.next(); String str = s1.replaceAll(",", " "); System.out.print(str); System.out.println()...
Main.java:13: error: variable str is already defined in method main(String[]) String str = s1.replaceAll(",", " "); ^ 1 error
s202481685
p03834
Java
import java.io.*; class Main { static Random random = new Random(); public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st=new StringTokenizer(br.readLine(),","); System.out.print(st.nextTok...
Main.java:4: error: cannot find symbol static Random random = new Random(); ^ symbol: class Random location: class Main Main.java:4: error: cannot find symbol static Random random = new Random(); ^ symbol: class Random location: class Main Main.java:8: error...
s092491015
p03834
C++
#include "string/replace_all.hpp" int main() { string s; cin >> s; replaceAll(s, ",", " "); cout << s << endl; }
a.cc:1:10: fatal error: string/replace_all.hpp: No such file or directory 1 | #include "string/replace_all.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s907375773
p03834
C++
package abc051; import java.util.*; class A{ static Scanner s = new Scanner(System.in); public static void main(String[] args) { System.out.println(s.next().replaceAll(",", " ")); } }
a.cc:1:1: error: 'package' does not name a type 1 | package abc051; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:16: error: 'Scanner' does not name a type 5 | static Scan...
s301524536
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < n; i++) { if (s[i] == ',') s[i] = ' '; } cout << s << endl; }
a.cc: In function 'int main()': a.cc:7:29: error: 'n' was not declared in this scope 7 | for (int i = 0; i < n; i++) { | ^
s493756203
p03835
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = 1; i < (int)(n+1); i++) const int MAX = 510000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMin...
a.cc: In function 'int main()': a.cc:40:16: error: 'S' was not declared in this scope 40 | if(S-i-j<=s&&0<=S-i-j){ | ^
s118915026
p03835
C++
#include<bits/stdc.h> using namespace std; int main(){ int k,s; cin>>k>>s; int count=0; for(int i=0;i<=k;i++){ for(int j=0;i<=k;i++){ for(int l=0;i<=k;i++){ if(i+j+l==s) count++; } } } cout<<count<<endl; return 0; }
a.cc:1:9: fatal error: bits/stdc.h: No such file or directory 1 | #include<bits/stdc.h> | ^~~~~~~~~~~~~ compilation terminated.
s299464439
p03835
C++
#include<bits/stdc++.h> #define ll long long using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int k , s; int ans = 0; cin >> k >> s; for(int i = 0; i <= k; i++){ for(int j = 0; j <= k; j++){ for(int z = 0; z <= k; z++){ if(i + j + z == s) ans++; } } ...
a.cc: In function 'int main()': a.cc:19:2: error: 're' was not declared in this scope 19 | re | ^~ a.cc:19:4: error: expected '}' at end of input 19 | re | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s154348642
p03835
C++
#include<algorithm> #include<bitset> #include<cmath> #include<complex> #include<deque> #include<functional> #include<iomanip> #include<iostream> #include<iterator> #include<map> #include<numeric> #include<queue> #include<set> #include<stack> #include<string> #include<unordered_map> #include<unordered_set> #include<util...
a.cc: In function 'int main()': a.cc:44:16: error: expected ',' or ';' before ':' token 44 | int ans = 0: | ^ a.cc:45:9: error: 'x' was not declared in this scope 45 | rep(x, k){ | ^ a.cc:21:31: note: in definition of macro 'rep' 21 | #define rep(i,n) for(int i=0; i<(...
s168105881
p03835
C++
int main() { long long k,s;cin>>k>>s; long long cnt =0; for (size_t x = 0; x <= k; x++) { for (size_t y = 0; y <= k; y++) { long long z = s - (x+y); if (0 <= z && z <= k) { cnt++; } } } cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:3:17: error: 'cin' was not declared in this scope 3 | long long k,s;cin>>k>>s; | ^~~ a.cc:5:8: error: 'size_t' was not declared in this scope 5 | for (size_t x = 0; x <= k; x++) | ^~~~~~ a.cc:1:1: note: 'size_t' is defined in header '<c...
s916983729
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int K, S; cin >> K >> S; int count = 0; for (int x = 0; x <= K; i++){ for (int y = 0; y <= K; j++){ if (S - x - y >= 0 && S - x - y <= K) count++; } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:10:27: error: 'i' was not declared in this scope 10 | for (int x = 0; x <= K; i++){ | ^ a.cc:11:29: error: 'j' was not declared in this scope 11 | for (int y = 0; y <= K; j++){ | ^
s593868420
p03835
C++
#include <iostream> using namespace std; int main(){ int k,s; int t=0; cin>>k>>s; if(s>3*k){ cout<<0; return<<0; } for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ for(int z=0;z<=k;z++){ if(x+y+z==s){ t++; } } } } cout<<t; }
a.cc: In function 'int main()': a.cc:10:23: error: expected primary-expression before '<<' token 10 | return<<0; | ^~
s944678809
p03835
C++
#include <iostream> using namespace std; int main(){ int k,s; int t=0; cin>>k>>s; for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ for(int y=0;y<=k;y++){ if(x+y+z==s){ t++; } } } } cout<<t; }
a.cc: In function 'int main()': a.cc:11:40: error: 'z' was not declared in this scope 11 | if(x+y+z==s){ | ^
s175327121
p03835
C++
#include <iostream> using namespace std; int main(){ int k,s; int t=0; cin>>k>>s; for(intx=0;x<k;x++){ for(inty=0;y<k;y++){ for(inty=0;y<k;y++){ if(x+y+z==s){ t++; } } } } cout<<t; }
a.cc: In function 'int main()': a.cc:8:13: error: 'intx' was not declared in this scope; did you mean 'int'? 8 | for(intx=0;x<k;x++){ | ^~~~ | int a.cc:8:20: error: 'x' was not declared in this scope 8 | for(intx=0;x<k;x++){ | ^ a.cc:9...
s251880648
p03835
C++
#include <iostream> using namespace std; int main(){ int k,s; int t=0; cin<<k<<s; for(intx=0;x<k;x++){ for(inty=0;y<k;y++){ for(inty=0;y<k;y++){ if(x+y+z==s){ t++; } } } } cout<<t; }
a.cc: In function 'int main()': a.cc:7:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 7 | cin<<k<<s; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:7:1...