submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s147683591
p03834
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define vi vector<int> #define inf 1000000100 int main() { string s; cin >> s; for(int i = 0; s[i]; i++) { if(s[i] == ',')happy,newyear,enjoy { s[i] = ' '; } } c...
a.cc: In function 'int main()': a.cc:15:24: error: 'happy' was not declared in this scope 15 | if(s[i] == ',')happy,newyear,enjoy | ^~~~~ a.cc:15:30: error: 'newyear' was not declared in this scope 15 | if(s[i] == ',')happy,newyear,enjoy | ...
s268153644
p03834
C++
#include <algorithm> #include <cmath> #include <cstdio> #include <iterator> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <set> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(obj) (obj).begin(),...
a.cc: In function 'int main()': a.cc:29:11: error: expected ';' before 's' 29 | s[5]=' ' | ^ | ; 30 | s[13]=' '; | ~
s529755591
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; s.at(5)=" "; s.at(13)=" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 6 | s.at(5)=" "; | ^~~ | | | const char* a.cc:7:12: error: invalid conversion f...
s290578519
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s.at(5) = " "; s.at(13) = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:9:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | s.at(5) = " "; | ^~~ | | | const char* a.cc:10:16: error: inv...
s865813699
p03834
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { string S;cin>>S; S[5]= " "; S[13]=" "; cout << S << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | S[5]= " "; | ^~~ | | | const char* a.cc:9:9: error: invalid conversion from 'const...
s101023997
p03834
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ string s; cin >> s; int n = s.size(); rep(i,n){ if(s[i] == ',') cout << " "; else cout << s[i]; } cout << endl; return 0;
a.cc: In function 'int main()': a.cc:14:12: error: expected '}' at end of input 14 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s711785049
p03834
C++
abcde,fghihgf,edcba
a.cc:1:1: error: 'abcde' does not name a type 1 | abcde,fghihgf,edcba | ^~~~~
s005124192
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; replace(s.begin(), s.end(), ',', ' ' ); cout << s << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'replace' was not declared in this scope 12 | replace(s.begin(), s.end(), ',', ' ' ); | ^~~~~~~
s870411936
p03834
C++
#include <bits/stdc++.h> using namespae std; int main(){ string S; cin >> S; for(int i=0; i<S.size(); i++){ if(i==5 || i==13){ cout << " " ; } else{ cout << S.at(i) ; } } cout << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'namespae' 2 | using namespae std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string S; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c+...
s877602768
p03834
C++
#include<iostream> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<string.length();i++){ if(s[i]==',')s[i]=' '; } }
a.cc: In function 'int main()': a.cc:7:23: error: expected primary-expression before '.' token 7 | for(int i=0;i<string.length();i++){ | ^
s544050956
p03834
C++
#include<iostream> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<string.length;i++){ if(s[i]==',')s[i]=' '; } }
a.cc: In function 'int main()': a.cc:7:23: error: expected primary-expression before '.' token 7 | for(int i=0;i<string.length;i++){ | ^
s652421804
p03834
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) #define VL vector<ll> #define VS vector<string> #define VB vector<bool> #define VP vector<pair<ll,ll>> #define VVL vector<vector<ll>> #define VVP vector<vector<pair<ll,ll>>> ...
a.cc: In function 'int main()': a.cc:16:10: error: 'c' was not declared in this scope 16 | cin>>c; | ^
s987088039
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(void){ string s; cin>>s; s[5]=' '; s[13]=' '; cout<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 8 | cout<s<<endl; | ~^~~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/...
s343156373
p03834
C++
#include<bis/stdc++.h> using namespace std; int main(void){ string s; cin>>s; s[5]=' '; s[13]=' '; cout<s<<endl; return 0; }
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory 1 | #include<bis/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s692509024
p03834
C
#include <iostream> using namespace std; int main() { string s; cin>>s; for(int i=0;i<19;i++){ if(s[i]=',') { cout<<" "; } else { cout<<s[i]; } } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s695665867
p03834
Java
ort java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); String x = input.next(); String ans = ""; for (int i = 0; i < x.length(); i++){ if (x.charAt(i)==',') ans+=" "; else ans+=x.substring(i,i+1); } ...
Main.java:1: error: class, interface, enum, or record expected ort java.util.Scanner; ^ 1 error
s888923810
p03834
Java
import java.util.Scanner; public class SumOfThreeIntegersBC51Q2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); String x = input.next(); String ans = ""; for (int i = 0; i < x.length(); i++){ if (x.charAt(i)==',') ans+=" "; else ans+=x.substrin...
Main.java:3: error: class SumOfThreeIntegersBC51Q2 is public, should be declared in a file named SumOfThreeIntegersBC51Q2.java public class SumOfThreeIntegersBC51Q2 { ^ 1 error
s916553926
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string h; cin >> h; h.at(5) = " "; h.at(13) = " "; cout << h << endl; }
a.cc: In function 'int main()': a.cc:7:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | h.at(5) = " "; | ^~~ | | | const char* a.cc:8:14: error: invalid conv...
s440946789
p03834
C++
#include <string> #include <fstream> #include <sstream> using namespace std; int main(){ string data; string ss; cin>>ss; istringstream s(ss); while(getline(s,data,',')){ cout<<data<<' '; } }
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope 9 | cin>>ss; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <sstream> +++ |+#include <iostream> 4 | using namespace std...
s549935909
p03834
C++
#include<iostream> #include <string> using namespace std; int main(){ string data; string ss; cin>>ss; getline(ss,data,','); cout<<data<<' '; getline(ss,data,','); cout<<data<<' '; getline(ss,data,','); cout<<data<<' '; }
a.cc: In function 'int main()': a.cc:9:10: error: no matching function for call to 'getline(std::string&, std::string&, char)' 9 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s884376048
p03834
C++
#include<iostream> #include <string> using namespace std; int main(){ string data; string s; cin>>s; stringstream ss(s); while( getline(ss,data,',') ){ cout<<data<<' '; } }
a.cc: In function 'int main()': a.cc:9:20: error: variable 'std::stringstream ss' has initializer but incomplete type 9 | stringstream ss(s); | ^
s706247868
p03834
C++
#include<iostream> #include <string> using namespace std; int main(){ string data; string s; cin>>s; while(getline(s,data,",")){ cout<<data<<' '; } }
a.cc: In function 'int main()': a.cc:9:16: error: no matching function for call to 'getline(std::string&, std::string&, const char [2])' 9 | while(getline(s,data,",")){ | ~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_cl...
s470779843
p03834
C++
#include<iostream> #include <string> using namespace std; int main(){ string data; string s; cin>>s; while(getline(s,data,',')){ cout<<data<<' '; } }
a.cc: In function 'int main()': a.cc:9:16: error: no matching function for call to 'getline(std::string&, std::string&, char)' 9 | while(getline(s,data,',')){ | ~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40...
s977519483
p03834
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; const int mod = 1e9+7; int main(){ string s; cin >> s; int n = s.szie(); for(int i = 0; i < n; i++){ if(s[i] == ',') cout << " "; else cout << s[i]; } }
a.cc: In function 'int main()': a.cc:9:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'szie'; did you mean 'size'? 9 | int n = s.szie(); | ^~~~ | size
s074273284
p03834
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> using namespace std; typedef long long ll; #define rep(i, n) for (int i=0;i < (int)(n);i++ int main(){ string s; cin >> s; rep(i,s.size()){ if(s[i] == ',' ) s[i] = ' '; } cout << s << endl; return 0; ...
a.cc: In function 'int main()': a.cc:12:19: error: expected ')' before '{' token 12 | rep(i,s.size()){ | ^ a.cc:8:23: note: to match this '(' 8 | #define rep(i, n) for (int i=0;i < (int)(n);i++ | ^ a.cc:12:4: note: in expansion of macro 'rep' 12 | rep(...
s417867436
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; int N=S.size(); for(int i=0;i<N;i++){ if(S.at(i)==","){ cout<<" "; } else{ cout<<S.at(i); } } }
a.cc: In function 'int main()': a.cc:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(S.at(i)==","){ | ~~~~~~~^~~~~
s388658431
p03834
C++
#include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <algorithm> #include <bitset> #in...
a.cc: In function 'int main()': a.cc:67:10: error: 'rcout' was not declared in this scope 67 | else rcout << c; | ^~~~~
s571929876
p03834
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String line = sc.nextLine().split(","); System.out.println(line); } }
Main.java:6: error: incompatible types: String[] cannot be converted to String String line = sc.nextLine().split(","); ^ 1 error
s015007480
p03834
C++
int main(void){ int K,S; cin >> K >> S; int ans = 0; for(int x = 0; x <= K; ++x){ for(int y = 0; y <= K; ++y){ int z = S - x - y; if(0 <= z and z <= K){ ans = ans + 1; } } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:3:1: error: 'cin' was not declared in this scope 3 | cin >> K >> S; | ^~~ a.cc:15:1: error: 'cout' was not declared in this scope 15 | cout << ans << endl; | ^~~~ a.cc:15:16: error: 'endl' was not declared in this scope 15 | cout << ans << endl; | ...
s407956314
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; s.size() == 19 s.at(6) == ' '; s.at(14) == ' '; cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:17: error: expected ';' before 's' 6 | s.size() == 19 | ^ | ; 7 | s.at(6) == ' '; | ~
s814482842
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; s.size() = 19 s.at(6) == " "; s.at(14) == " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:9: error: lvalue required as left operand of assignment 6 | s.size() = 19 | ~~~~~~^~ a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | s.at(14) == " "; | ~~~~~~~~~^~~~~~
s930493871
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < s.size(); i++) { if (s[i] == ",") { s[i] = " "; } } cout << s << endl; }
a.cc: In function 'int main()': a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if (s[i] == ",") { a.cc:9:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | ...
s701079197
p03834
Java
import java.util.*; class Main{ public static void main(Stinrg[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int s = sc.nextInt(); int count = 0; for(int x = 0;x<=k;x++){ for(int y=0;y<=k;y++){ int z = s-x-y; if((z<=k)&&(z>=0)){ count ++...
Main.java:4: error: cannot find symbol public static void main(Stinrg[] args){ ^ symbol: class Stinrg location: class Main 1 error
s462593008
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ if(s.at(i)==','; s.at(i)=' '; } } cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:8:14: error: expected ')' before ';' token 8 | s.at(i)=' '; | ^ | ) a.cc:7:5: note: to match this '(' 7 | if(s.at(i)==','; | ^ a.cc: At global scope: a.cc:11:3: error: 'cout' does not name a type 11 | cout<<s<<endl; ...
s577773671
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ if(s.at(i)==','; s.at(i)=" "; } } cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:8:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s.at(i)=" "; | ^~~ | | | const char* a.cc:8:14: error: expected ')' before ...
s911788192
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ if(s.at(i)==','){ s.at(i)=""; } } cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:8:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s.at(i)=""; | ^~ | | | const char*
s451340632
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ if(s.at(i)==','){ s.at(i)=''; } } cout<<s<<endl; }
a.cc:8:11: error: empty character constant 8 | s.at(i)=''; | ^~
s468766255
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; if(s==','){ ','==''; cout<<s<<endl; } }
a.cc:7:8: error: empty character constant 7 | ','==''; | ^~ a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if(s==','){ | ~^~~~~ | | | | | char...
s304124032
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s[5] = ' '; s[13] = ' '; for (int i = 0; i < s.size(); i++){ continue; } cout << s[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:12:19: error: 'i' was not declared in this scope 12 | cout << s[i]; | ^ a.cc: At global scope: a.cc:14:5: error: 'cout' does not name a type 14 | cout << endl; | ^~~~ a.cc:15:1: error: expected declaration before '}' token 15 | ...
s597556806
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s[5] = ' '; s[13] = ' '; for (int i = 0; i < s.size(); i++){ continue; } cout << s[i] << endl; } cout << endl; }
a.cc: In function 'int main()': a.cc:12:19: error: 'i' was not declared in this scope 12 | cout << s[i] << endl; | ^ a.cc: At global scope: a.cc:14:5: error: 'cout' does not name a type 14 | cout << endl; | ^~~~ a.cc:15:1: error: expected declaration before '}' token ...
s278563215
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; for (int i = 0; i < s.size(); i++){ if (s[i] == ","){ cout << " "; continue; } cout << s[i] << endl; } cout << endl; }
a.cc: In function 'int main()': a.cc:8:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if (s[i] == ","){
s285600243
p03834
C++
#include<iostream> using namespace std; int main(){ int k,s; cin >> k >> s; int z=0; int count=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)count++; } } } cout << count; return 0; }
a.cc:11:9: error: extended character   is not valid in an identifier 11 |  for(int z=0;z<=k;z++){ | ^ a.cc: In function 'int main()': a.cc:11:15: error: expected primary-expression before 'int' 11 |  for(int z=0;z<=k;z++){ | ^~~ a.cc:11:31: error: expected ';' bef...
s250254435
p03834
C++
include <iostream> using namespace std; int main() { string s; cin >> s; s[5] = " "; s[13] = " "; cout << s << endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'string' was not declared in this scope 6 | string s; | ^~~~~~ a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin >> s; | ^~~ a.cc:7:...
s506403016
p03834
C++
include <iostream> using namespace std; int main() { string s; cout << << endl; cin >> s; s[5] = ' '; s[13] = ' '; cout << s << endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'string' was not declared in this scope 6 | string s; | ^~~~~~ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << << endl; | ^~~...
s215441619
p03834
C++
#include <iostream> 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:12: 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:13: error: invalid convers...
s799607036
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<19;i++){ if(s.at(i)==","){ cout<<" "; } else{ cout<<s.at(i); } } }
a.cc: In function 'int main()': a.cc:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(s.at(i)==","){ | ~~~~~~~^~~~~
s992756792
p03834
C++
string sen1; cout << "Enter the sentence is this format [five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]." << endl; getline(cin, sen1); sen1.at(5) = ' '; sen1.at(13) = ' '; cout << sen1;
a.cc:1:2: error: 'string' does not name a type 1 | string sen1; | ^~~~~~ a.cc:2:5: error: 'cout' does not name a type 2 | cout << "Enter the sentence is this format [five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]." << endl; | ^~~~ a.cc:3:...
s757020769
p03834
C++
string sen1; cout << "Enter the sentence is this format [five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]." << endl; getline(cin, sen1); sen1.at(5) = ' '; sen1.at(13) = ' '; cout << sen1;
a.cc:1:2: error: 'string' does not name a type 1 | string sen1; | ^~~~~~ a.cc:2:5: error: 'cout' does not name a type 2 | cout << "Enter the sentence is this format [five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]." << endl; | ^~~~ a.cc:3:...
s286040119
p03834
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll MOD=1000000007; int main() { string s; cin >> s; s[5]=" "; s[13]=" "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s[5]=" "; | ^~~ | | | const char* a.cc:11:9: error: invalid conversion from 'const c...
s772818717
p03834
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll MOD=1000000007; int main() { string s; cin >> s; s[5]==" "; s[13]==" "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | s[5]==" "; a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | s[13]==" ";
s896360320
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (i=0; i<19; i++){ if (s.at(i)==',') cout << ' '; else cout << s.at(i); } cout << endl; }
a.cc: In function 'int main()': a.cc:7:8: error: 'i' was not declared in this scope 7 | for (i=0; i<19; i++){ | ^
s418056283
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string x; cin >> x; x.at(5)=" "; x.at(14)=" "; cout << x << endl; }
a.cc: In function 'int main()': a.cc:7:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | x.at(5)=" "; | ^~~ | | | const char* a.cc:8:12: error: invalid conversion f...
s353499080
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S[17]; cin >> S; S[5] = ' '; S[13] = ' '; cout << S << endl; }
a.cc: In function 'int main()': a.cc:5:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [17]' {aka 'std::__cxx11::basic_string<char> [17]'}) 5 | cin >> S; | ~~~ ^~ ~ | | | | | std::string [17] {aka std::__cxx1...
s608741560
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S(17); cin >> S; S[5] = ' '; S[13] = ' '; cout << S << endl; }
a.cc: In function 'int main()': a.cc:4:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 4 | string S(17); | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/inc...
s380900370
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { char s[19]; gets(s); s[5] =' '; s[13] =' '; for(int i=0;i<19;i++) cout<<s[i]; 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
s267162631
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { char s[19]; gets(s); s[5] =' '; s[13] =' '; for(int i=0;i<19;i++) cout<<s[i]; 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
s286533910
p03834
Java
import java.util.Scanner; public static void main(String[] args) { Scanner scan=new Scanner(System.in); StringBuilder s=new StringBuilder(scan.nextLine()); s.setCharAt(5,' '); s.setCharAt(13,' '); System.out.println(s); }
Main.java:4: 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
s002558968
p03834
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner scan=new Scanner(System.in); StringBuilder s=new StringBuilder(scan.nextLine()); s.setCharAt(5,' '); s.setCharAt(13,' '); System.out.println(s); } }
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s772078857
p03834
C++
#include <bits/stdc++.h> using namespace std; using int64 = long long; #define int int64 #define rep(i, n) for(int i=0; i<n; i++) #define FOR(i, a, b) for(int i=a; i<b; i++) #define SORT(x) sort(x.begin(), x.end()) #define GSORT(x) sort(x.begin(), x.end(), greater<int>()) #define mk make_pair #define fi first #define s...
a.cc: In function 'int main()': a.cc:27:30: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 27 | if(s[i]==',') s[i] = " "; | ^~~ | | | ...
s615096564
p03834
C++
#include <bits/stdc++.h> using namespace std ; int main() { string s; cin >> s ; int i ; for(i=0 ; i<s.length() ;i++) { if(s.[i] ==",") { s.[i] = " " } } cout << s ; }
a.cc: In function 'int main()': a.cc:12:14: error: expected unqualified-id before '[' token 12 | if(s.[i] ==",") | ^ a.cc:14:13: error: expected unqualified-id before '[' token 14 | s.[i] = " " | ^
s655695024
p03834
C++
#include <bits/stdc++.h> using namespace std ; int main() { string s; cin >> s ; int i ; for(i=0 ; i<s.length ;i++) { if(s.[i] ==",") { s.[i] = " " } } cout << s :
a.cc: In function 'int main()': a.cc:10:17: 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...
s460492500
p03834
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX(a,b) (a > b) ? a : b #define MIN(a,b) (a < b) ? a : b const int inf = 1000000000; // 10^9 int main(){ char s[20];scanf("%s",s); for(int i = 0;i < 19;i++){ if(s[i+1] == ',') printf(" "); else printf("%c",a[i]); ...
main.c: In function 'main': main.c:15:22: error: 'a' undeclared (first use in this function) 15 | printf("%c",a[i]); | ^ main.c:15:22: note: each undeclared identifier is reported only once for each function it appears in
s700110006
p03834
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX(a,b) (a > b) ? a : b #define MIN(a,b) (a < b) ? a : b const int inf = 1000000000; // 10^9 int main(){ char s[20];scanf("%s",s); for(int i = 0;i < 19;i++){ if(a[i+1] == ',') printf(" "); else printf("%c",a[i]); ...
main.c: In function 'main': main.c:12:10: error: 'a' undeclared (first use in this function) 12 | if(a[i+1] == ',') | ^ main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
s401935187
p03834
C++
#include <iostream> #include <fstream> using namespace std; string _myStr = ""; void CParseIn () { cin >> _myStr; } void Core () { for (int i = 0; i < _myStr.length(); i++) { if (_myStr[i] == ",") { cout << " "; } else cout << _myStr[i]; } } void CWriteOu...
a.cc: In function 'void Core()': a.cc:16:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 16 | if (_myStr[i] == ",") {
s723257897
p03834
C++
#include <iostream> #include <fstream> using namespace std; string _myStr = ""; void CParseIn () { cin >> _myStr; } void Core () { for (int i = 0; i < _myStr.length(); i++) { if (_myStr[i] == ",") { cout << " "; } else cout << _myStr[i]; } } void CWriteOu...
a.cc: In function 'void Core()': a.cc:16:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 16 | if (_myStr[i] == ",") {
s946032319
p03834
C++
#include <bits/stdc++.h> using namespace std; string n; int a,i; int main() { cin>>n; a=n.length(); for(i=0;i<a;i++) { if(n[i]==',') cout<<" "; else cout<<n[i]; } cout<<endl;! return 0; }
a.cc: In function 'int main()': a.cc:16:15: error: '\U0000ff01' was not declared in this scope 16 | cout<<endl;! | ^~
s811220627
p03834
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define REP(i, n) for(int i = 1; i < n; i++) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(), v.rend() #define P pair<int, int> typedef long long ll; const ll mod = 1e9+7; template<class T> inline bool chmin(T& a, T b...
a.cc: In function 'int main()': a.cc:109:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 109 | if(s[i] == ',') s[i] = " "; | ^~~ | | | ...
s858246991
p03834
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define REP(i, n) for(int i = 1; i < n; i++) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(), v.rend() #define P pair<int, int> typedef long long ll; const ll mod = 1e9+7; template<class T> inline bool chmin(T& a, T b...
a.cc: In function 'int main()': a.cc:109:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 109 | if(s[i] == ',') s[i] = " "; | ^~~ | | | ...
s283709485
p03834
C++
#include<stdio.h> main() { char c[19]; fgets(c,19,stdin); c[4]=' '; c[11]=' '; cout<<c; }
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:8:3: error: 'cout' was not declared in this scope 8 | cout<<c; | ^~~~
s518144638
p03834
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<vector> using namespace std; inline int read() { int x=0,k=1;char c=getchar(); while(c<'0' || c>'9'){if(c=='-') k=0;c=getchar();} while(c>='0' && c<='9') x=(x<<3)+(x<<1)+(c^48),c=getchar(); return k?x:-x; } int l; char ch[20]; int main() {...
a.cc: In function 'int main()': a.cc:18:7: error: 'strlen' was not declared in this scope 18 | l=strlen(ch); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<vector> +++ |+#include <cstring> 5 | using na...
s647512201
p03834
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.next(); System.out.println(s.substring(0,5) + " " + s.substring(6,13)+ " " +s.substring(14,19);) } }
Main.java:6: error: ')' or ',' expected System.out.println(s.substring(0,5) + " " + s.substring(6,13)+ " " +s.substring(14,19);) ^ Main.java:6: error: illegal start of expression System.out.println(s.substring(0,5) + " " + s.sub...
s179858675
p03834
C++
#include <iostream> #include <string> using namespace std; string arr[20]; int main() { sring s; cin>>s; s.replace(5, 1, " "); s.replace(13, 1, " "); return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'sring' was not declared in this scope 7 | sring s; | ^~~~~ a.cc:8:6: error: 's' was not declared in this scope 8 | cin>>s; | ^
s938141493
p03834
C++
#include <iostream> #include <string> using namespace std; string arr[20] int main() { sring s; cin>>s; s.replace(5, 1, " "); s.replace(13, 1, " "); return 0; }
a.cc:5:2: error: expected initializer before 'int' 5 | int main() | ^~~
s234778620
p03834
C++
{ string s; cin>>s; for(int i=0;i,s.size()-1;i++){ if(s[i] == ',') s[i] = ' '; } cout<<s; }
a.cc:1:1: error: expected unqualified-id before '{' token 1 | { | ^
s258058117
p03834
C++
#include <iostream> using namespace std; int main() { string s ; int i; cin >> s; for(i=0 ; i< s.length() ; i++ ){ if (s[i]==','){ s[i] = '' ; } cout<< s[i] ; } return 0; }
a.cc:10:23: error: empty character constant 10 | s[i] = '' ; | ^~
s462741673
p03834
C++
int main() { string s; cin>> s; s[5] = ' '; s[13] = ' '; cout<< s; return 0; }
a.cc: In function 'int main()': a.cc:3:1: error: 'string' was not declared in this scope 3 | string s; | ^~~~~~ a.cc:4:1: error: 'cin' was not declared in this scope 4 | cin>> s; | ^~~ a.cc:4:7: error: 's' was not declared in this scope 4 | cin>> s; | ^ a.cc:9:1: error: 'cout' was no...
s130340650
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin>>s; for ( int i=0; i<19; i++){ if( i==5 || i==13){ s[i]=" "; } } cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 11 | s[i]=" "; | ^~~ | | | const char*
s509866721
p03834
C++
string s; cin>>s; s[5]=' '; s[13]=' '; cout<<s;*/
a.cc:1:2: error: 'string' does not name a type 1 | string s; | ^~~~~~ a.cc:2:4: error: 'cin' does not name a type 2 | cin>>s; | ^~~ a.cc:3:4: error: 's' does not name a type 3 | s[5]=' '; | ^ a.cc:4:4: error: 's' does not name a type 4 | s[13]=' '; | ^ a.cc:5:...
s072296729
p03834
C++
/* * wafuIroha.cpp * * Created on: 2020/02/23 * Author: black */ #include <iostream> using namespace std; int main(){ string s; cin >> s; s[5] = " "; s[12] = " "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 14 | s[5] = " "; | ^~~ | | | const char* a.cc:15:17: error...
s340614797
p03834
C++
#include <iostream> using namespace std; int main () { int K, S; cin >> K >> S; int ans = 0; for (int x = 0; x <= K; x++) { for (int y = 0; y <= K; y++) { z = S - x - y; if (x + y + x == S) ans++; } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:13:7: error: 'z' was not declared in this scope 13 | z = S - x - y; | ^
s093921244
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin>>s; for(int i = 0 , i<s.size(),i++){ if(s[i]==','){ s[i]=' '; } } cout<<s; return 0; }
a.cc: In function 'int main()': a.cc:9:22: error: expected ';' before '<' token 9 | for(int i = 0 , i<s.size(),i++){ | ^ | ; a.cc:9:22: error: expected primary-expression before '<' token a.cc:9:35: error: expected ';' before ')' token 9 | for(int i ...
s042932334
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin>>s; for(int i = 0 ; i<s.size(),i++){ if(s[i]==','){ s[i]=' '; } } cout<<s; return 0; }
a.cc: In function 'int main()': a.cc:9:35: error: expected ';' before ')' token 9 | for(int i = 0 ; i<s.size(),i++){ | ^ | ;
s992908805
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for(int i=0;i<s.size();i++){ if(s.at(i) == ','){ s.at(i) = ' '; } } count << s << endl; }
a.cc: In function 'int main()': a.cc:12:11: error: no match for 'operator<<' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 12 | count << s << endl; | ~~~~~~^~~~ In file included from /usr/include/c++/14/string:54, ...
s742282137
p03834
C++
#include<iostream> sing namespace std; int main (){ string s ; cin>>s; s[5]=' ' ; s[13]=' '; cout<<s; }
a.cc:2:1: error: 'sing' does not name a type 2 | sing namespace std; | ^~~~ 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, f...
s066686604
p03834
C++
#include <iostream> #include <cstring> using namespace std; int main() { int x=0; string s; cin>>s; for(int i=0;i<s.size();i++){ if((int)s[i]==44) s[i]=" "; } for(int i=0;i<s.size();i++){ cout<<s[i]; } return 0; }
a.cc: In function 'int main()': a.cc:14:36: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 14 | if((int)s[i]==44) s[i]=" "; | ^~~ | ...
s503977767
p03834
C++
#include <iostream> #include <cstring> using namespace std; int main() { int x=0; string s; cin>>s; for(int i=0;i<s.size();i++){ if((((int)s[i]<97)&&((int)s[i]!=44))||((int)s[i]>122) ||((int)s[5]!=44) &&((int)s[13]!=44 ) ) x++ ; } for(int i=0;i<s.size();i++){ i...
a.cc: In function 'int main()': a.cc:17:36: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 17 | if((int)s[i]==44) s[i]=" "; | ^~~ | ...
s937746690
p03834
C++
#include<iostream> 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:8:9: error: expected ';' before 's' 8 | s[5]=' ' | ^ | ; 9 | s[13]=' ' | ~
s992238443
p03834
C
#include<stdio.h> int main(void){ char hakiku[100]; scanf("%s",haiku); int i; for(i=0;i<19;i++){ if(i==5||i==13){ printf(" "); } else{ printf("%c",haiku[i]); } } return 0; }
main.c: In function 'main': main.c:4:14: error: 'haiku' undeclared (first use in this function); did you mean 'hakiku'? 4 | scanf("%s",haiku); | ^~~~~ | hakiku main.c:4:14: note: each undeclared identifier is reported only once for each function it appears in
s600469627
p03834
C++
#include <iostream> #include <cstring> using namespace std; int main() { string str ; cin>>str; int i=0; while(i<(str.size())){ if(str[i] == ','){ str[i] = ' '; } i++ } cout>>str; return 0; }
a.cc: In function 'int main()': a.cc:14:8: error: expected ';' before '}' token 14 | i++ | ^ | ; 15 | } | ~ a.cc:16:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_strin...
s126953859
p03834
C++
#include <iostream> ; using namespace std ; int main () { char a = "" ; cin >> s; m=s.length(); for (int i = 0;i<m; i++) { if(s[i]==a) new_string +=""; else new_string -=s[i] } cout <<new_string<<"\n"; }
a.cc:1:21: warning: extra tokens at end of #include directive 1 | #include <iostream> ; | ^ a.cc: In function 'int main()': a.cc:6:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 6 | char a = "" ; | ^~ | | ...
s434086807
p03834
C++
#include <iostream> ; using namespace std ; int main () { char a = "" ; cin >> s; m=s.length(); for (int i = 0;i<m; i++) { if(s[i]==a) new_string +=""; else new_string -=s[i] } cout <<new_string<<"\n"; }
a.cc:1:21: warning: extra tokens at end of #include directive 1 | #include <iostream> ; | ^ a.cc: In function 'int main()': a.cc:6:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 6 | char a = "" ; | ^~ | | ...
s128991833
p03834
C++
#include <iostream> ; using namespace std ; int main () { char a = "," , s; cin >> s; int m=s.length(); for (int i = 0;i<m; i++) { if(s[i]==a) b = b + ""; else b = b - s[i] } cout <<b; }
a.cc:1:21: warning: extra tokens at end of #include directive 1 | #include <iostream> ; | ^ a.cc: In function 'int main()': a.cc:6:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 6 | char a = "," , s; | ^~~ | ...
s600310167
p03834
C++
#include <iostream> using namespace std; int main() { string s ; cin>>s ; for (int i=0 ; i<s.length(); i++) { if(s[i]!=',') { cout<<s[i] ; } else { cout<<" " ; } } } return 0 ; }
a.cc:17:1: error: expected unqualified-id before 'return' 17 | return 0 ; | ^~~~~~ a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s957536704
p03834
C++
#include <iostream> using namespace std; int main() { string s ; cin>>s ; for (int i=0 ; i<s.length(); i++) { if(s[i]!=',') { cout<<s[i] ; else { cout<<" " ; } } return 0 ; }
a.cc: In function 'int main()': a.cc:12:17: error: expected '}' before 'else' 12 | else | ^~~~ a.cc:10:17: note: to match this '{' 10 | { | ^
s223894754
p03834
C++
#include <iostream> using namespace std; int main() { string s ; cin>>s ; int n=s.length() ; for (int i=0; i<n; i++) { s[5]=" " ; s[13]=" " ; } cout<<s ; return 0; }
a.cc: In function 'int main()': a.cc:9:22: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | s[5]=" " ; | ^~~ | | | const...
s095542521
p03834
C++
#include <iostream> using namespace std; int main() { string s ; cin>>s ; int n=s.length() ; for (int i=0; i<n; i++) { s[5]=" " ; s[13]=" " ; } cout<<s ; return 0 ; }
a.cc: In function 'int main()': a.cc:10:22: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s[5]=" " ; | ^~~ | | | cons...
s331609503
p03834
C++
#include <iostream> using namespace std; int main() { string s ; int n=s.length() ; cin>>s ; for (int i=0; i<n; ++i) { s[5]==" " ; s[13]==" " ; } cout<<s ; return 0 ; }
a.cc: In function 'int main()': a.cc:10:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | s[5]==" " ; a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | s[13]==" " ;
s320417141
p03834
C++
#include <iostream> using namespace std; int main() { string s ; int n=s.length() ; cin>>s ; for (int i=0; i<n; ++i) { s[5]==" " ; s[13]==" " ; } cout<<s return 0 ; }
a.cc: In function 'int main()': a.cc:10:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | s[5]==" " ; a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | s[13]==" " ; a.cc:13:16: error: expected ';' before 'retur...
s967480617
p03834
C++
#include <iostream> using namespace std; int main() { string s ; int n=s.length() ; cin>>s ; for (int i=0; i<n; ++i) s[5]==" " ; s[13]==" " ; cout<<s return 0 ; }
a.cc: In function 'int main()': a.cc:10:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | s[5]==" " ; a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | s[13]==" " ; a.cc:12:16: error: expected ';' before 'retur...
s409239199
p03834
C++
#include <iostream> using namespace std; int main() { int n=s.length() ; string s ; cin>>s ; for (int i=0; i<n; ++i) s[5]==" " ; s[13]==" " ; cout<<s return 0 ; }
a.cc: In function 'int main()': a.cc:5:15: error: 's' was not declared in this scope 5 | int n=s.length() ; | ^