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] = ' '; } } cout << s << endl; }
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 | ^~~~~~~ a.cc:15:38: error: 'enjoy' 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(), (obj).end() #define bit(n) (1LL << (n)) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; s[5]=' ' s[13]=' '; cout << s << endl; }
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 from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s.at(13)=" "; | ^~~ | | | const char*
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: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s.at(13) = " "; | ^~~ | | | const char*
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 char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | S[13]=" "; | ^~~ | | | const char*
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++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> S; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:10: error: 'S' was not declared in this scope 6 | cin >> S; | ^ a.cc:9:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << " " ; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << S.at(i) ; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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>>> #define PL pair<ll,ll> #define ALL(v) (v).begin(), (v).end() int main(){ string s; cin>>c; s[5]=' '; s[13]=' '; cout<<s<<endl; return 0; }
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/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:8:11: note: couldn't deduce template parameter '_IntegerType' 8 | cout<s<<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:8:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cout<s<<endl; | ^~~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) |
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); } System.out.println(ans); } }
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.substring(i,i+1); } System.out.println(ans); } }
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 conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | h.at(13) = " "; | ^~~ | | | const char*
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; a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout<<data<<' '; | ^~~~ a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
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, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 907 | getline(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:54: /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4117 | getline(basic_istream<_CharT, _Traits>& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate expects 2 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 4125 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4125:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4132 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate expects 2 arguments, 3 provided In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154: /usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ^~~~~~~ /usr/include/stdio.h:697:45: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char**' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~ a.cc:11:10: error: no matching function for call to 'getline(std::string&, std::string&, char)' 11 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 907 | getline(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: template argument deduction/substitution failed: a.cc:11:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4117 | getline(basic_istream<_CharT, _Traits>& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate expects 2 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 4125 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4125:5: note: template argument deduction/substitution failed: a.cc:11:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4132 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate expects 2 arguments, 3 provided /usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ^~~~~~~ /usr/include/stdio.h:697:45: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char**' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~ a.cc:13:10: error: no matching function for call to 'getline(std::string&, std::string&, char)' 13 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 907 | getline(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: template argument deduction/substitution failed: a.cc:13:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 13 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4117 | getline(basic_istream<_CharT, _Traits>& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate expects 2 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 4125 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4125:5: note: template argument deduction/substitution failed: a.cc:13:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 13 | getline(ss,data,','); | ~~~~~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4132 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate expects 2 arguments, 3 provided /usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ^~~~~~~ /usr/include/stdio.h:697:45: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char**' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~
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_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 907 | getline(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | while(getline(s,data,",")){ | ~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:54: /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4117 | getline(basic_istream<_CharT, _Traits>& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate expects 2 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 4125 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4125:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | while(getline(s,data,",")){ | ~~~~~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4132 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate expects 2 arguments, 3 provided In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154: /usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ^~~~~~~ /usr/include/stdio.h:697:45: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char**' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~
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, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 907 | getline(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:907:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | while(getline(s,data,',')){ | ~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:54: /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4117 | getline(basic_istream<_CharT, _Traits>& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate expects 2 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 4125 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4125:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | while(getline(s,data,',')){ | ~~~~~~~^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4132 | getline(basic_istream<_CharT, _Traits>&& __is, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate expects 2 arguments, 3 provided In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154: /usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ^~~~~~~ /usr/include/stdio.h:697:45: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char**' 697 | extern __ssize_t getline (char **__restrict __lineptr, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~
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(i,s.size()){ | ^~~
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> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #include <regex> #define REP(i,n) for(int i = 0; i < n; i++) #define FOR(i,j,n) for(int i = j; i < n; i++) #define RFOR(i,j,n) for(int i = j-1; i >= n; i--) #define PREC(n) fixed << setprecision(n) #define print_array(v) REP(__k, v.size()) { cout << v[__k]; if(__k != v.size()-1) cout << " "; else cout << endl; } #define YesorNo(a) printf(a?"Yes\n":"No\n") #define _LIBCPP_DEBUG 0 using namespace std; int64_t MOD = 1000000007; int main() { cin.tie(0); ios::sync_with_stdio(false); REP(i,19) { char c; cin >> c; if(c == ',') cout << " "; else rcout << c; } cout << endl; return 0; } //templete by private_yusuke
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 | s[i] = " "; | ^~~ | | | const char*
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 ++; } } } System.out.println(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; | ^~~~ a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
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 ';' 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; | ^~~~ a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
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 | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:6:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:6:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:6:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 6 | if(s==','){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 6 | if(s==','){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | if(s==','){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 6 | if(s==','){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 6 | if(s==','){ | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | if(s==','){ | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_v
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 15 | } | ^
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 ';' before ')' token 11 |  for(int z=0;z<=k;z++){ | ^ | ;
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:12: error: 's' was not declared in this scope 7 | cin >> s; | ^ a.cc:11:5: error: 'cout' was not declared in this scope 11 | cout << s << endl; | ^~~~ a.cc:11:18: error: 'endl' was not declared in this scope 11 | cout << s << endl; | ^~~~
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; | ^~~~ a.cc:7:13: error: expected primary-expression before '<<' token 7 | cout << << endl; | ^~ a.cc:7:16: error: 'endl' was not declared in this scope 7 | cout << << endl; | ^~~~ a.cc:8:5: error: 'cin' was not declared in this scope 8 | cin >> s; | ^~~ a.cc:8:12: error: 's' was not declared in this scope 8 | cin >> s; | ^
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 conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s[13] = " "; | ^~~ | | | const char*
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:12: error: expected constructor, destructor, or type conversion before '(' token 3 | getline(cin, sen1); | ^ a.cc:6:5: error: 'sen1' does not name a type 6 | sen1.at(5) = ' '; | ^~~~ a.cc:7:5: error: 'sen1' does not name a type 7 | sen1.at(13) = ' '; | ^~~~ a.cc:8:5: error: 'cout' does not name a type 8 | cout << sen1; | ^~~~
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:12: error: expected constructor, destructor, or type conversion before '(' token 3 | getline(cin, sen1); | ^ a.cc:6:5: error: 'sen1' does not name a type 6 | sen1.at(5) = ' '; | ^~~~ a.cc:7:5: error: 'sen1' does not name a type 7 | sen1.at(13) = ' '; | ^~~~ a.cc:8:5: error: 'cout' does not name a type 8 | cout << sen1; | ^~~~
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 char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 11 | s[13]=" "; | ^~~ | | | const char*
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 from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | x.at(14)=" "; | ^~~ | | | const char*
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::__cxx11::basic_string<char> [17]} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} 5 | cin >> S; | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(short int)((std::string*)(& S))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(short unsigned int)((std::string*)(& S))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(int)((std::string*)(& S))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(unsigned int)((std::string*)(& S))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(long int)((std::string*)(& S))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(long unsigned int)((std::string*)(& S))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(long long int)((std::string*)(& S))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive] 5 | cin >> S; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:5:10: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& S))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:5:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 5 | cin >> S; | ^ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::string [17]' {aka 'std::__cxx11::basic_string<char> [17]'} to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::string [17]' {aka 'std::__cxx11::basic_string<char> [17]'} to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::string [17]' {aka 'std::__cxx11::basic_string<char> [17]'} to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::strin
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/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 149 | using _If_sv = enable_if_t< | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:797:30: required from here 797 | template<typename _Tp, typename = _If_sv<_Tp, void>> | ^~~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 788 | basic_string(const _Tp& __t, size_type __pos, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 765 | basic_string(_InputIterator __beg, _InputIterator __end, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed: a.cc:4:12: note: cannot convert '17' (type 'int') to type 'const char*' 4 | string S(17); | ^~ /usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 721 | basic_string(basic_string&& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 716 | basic_string(const basic_string& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<char>' 711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 682 | basic_string(basic_string&& __str) noexcept | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>&&' 682 | basic_string(basic_string&& __str) noexcept | ~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 624 | basic_string(const _CharT* __s, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 604 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 586 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 569 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 552 | basic_string(const basic_string& __str) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&' 552 | basic_string(const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char>&' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std
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 se second #define pb push_back #define ALL(x) x.begin(), x.end() #define V(T) vector<T> typedef pair<int, int> P; typedef pair<P, P> PP; typedef vector<int> vi; typedef vector<vi> vvi; int max(int a, int b) {if(b>a) return b; else return a;} int min(int a, int b) {if(b<a) return b; else return a;} signed 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: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] = " "; | ^~~ | | | const char*
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 unsigned int]' (did you forget the '()' ?) 10 | for(i=0 ; i<s.length ;i++) | ~~^~~~~~ | () a.cc:12:10: error: expected unqualified-id before '[' token 12 | if(s.[i] ==",") | ^ a.cc:14:9: error: expected unqualified-id before '[' token 14 | s.[i] = " " | ^ a.cc:18:12: error: expected ';' before ':' token 18 | cout << s : | ^~ | ; a.cc:18:14: error: expected '}' at end of input 18 | cout << s : | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
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 CWriteOut () { cout << endl; } int main () { CParseIn(); Core(); CWriteOut(); return 0; }
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 CWriteOut () { cout << endl; } int main () { CParseIn(); Core(); CWriteOut(); return 0; }
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) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} //繰り返し自乗法による累乗計算 //a**n ll pow(ll a, ll n){ if(n == 0) return 1; if(n%2 == 0){ ll res = pow(a, n/2); return res * res; } return a * pow(a, n-1); } //繰り返し自乗法によるmod累乗計算 //a**n (mod) ll modpow(ll a, ll n){ if(n == 0) return 1; if(n%2 == 0){ ll res = modpow(a, n/2); return res * res % mod; } return a * modpow(a, n-1) % mod; } //組み合わせ //nCa ll com(ll n, ll a){ ll x = 1, y = 1; rep(i,a){ x *= n-i; y *= i+1; } ll res = x / y; return res; } //組み合わせ(mod) //nCa (mod) ll modcom(ll n, ll a){ ll x = 1, y = 1; rep(i, a){ x = x * (n-i) % mod; y = y * (i+1) % mod; } ll ans = x * modpow(y, mod-2) % mod; return ans; } //gcd 最大公約数 ll gcd(ll x, ll y){ if(x % y == 0) return y; return gcd(y, x%y); } //lcm 最小公倍数 ll lcm(ll x, ll y){ return x * y / gcd(x, y); } //ngcd n個の最大公約数 ll ngcd(vector<ll> a){ ll res; res = a[0]; for(ll i = 1; i < a.size() && res != 1; i++) { res = gcd(a[i], res); } return res; } //nlcm n個の最小公倍数 ll nlcm(vector<ll> a) { ll res; res = a[0]; for (ll i = 1; i < a.size(); i++) { res = lcm(res, a[i]); } return res; } // 素数判定 bool isprime(ll x){ ll i; if(x < 2) return false; else if(x == 2) return true; if(x % 2 == 0) return false; for(i = 3; i*i <= x; i += 2){ if(x % i == 0) return false; } return true; } // 桁和 ll digsum(ll x){ ll res = 0; while(x > 0){ res += x % 10; x /= 10; } return res; } int main(){ string s; cin >> s; rep(i,s.size()-1){ if(s[i] == ',') s[i] = " "; } cout << string << endl; }
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] = " "; | ^~~ | | | const char* a.cc:111:18: error: expected primary-expression before '<<' token 111 | cout << string << endl; | ^~
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) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} //繰り返し自乗法による累乗計算 //a**n ll pow(ll a, ll n){ if(n == 0) return 1; if(n%2 == 0){ ll res = pow(a, n/2); return res * res; } return a * pow(a, n-1); } //繰り返し自乗法によるmod累乗計算 //a**n (mod) ll modpow(ll a, ll n){ if(n == 0) return 1; if(n%2 == 0){ ll res = modpow(a, n/2); return res * res % mod; } return a * modpow(a, n-1) % mod; } //組み合わせ //nCa ll com(ll n, ll a){ ll x = 1, y = 1; rep(i,a){ x *= n-i; y *= i+1; } ll res = x / y; return res; } //組み合わせ(mod) //nCa (mod) ll modcom(ll n, ll a){ ll x = 1, y = 1; rep(i, a){ x = x * (n-i) % mod; y = y * (i+1) % mod; } ll ans = x * modpow(y, mod-2) % mod; return ans; } //gcd 最大公約数 ll gcd(ll x, ll y){ if(x % y == 0) return y; return gcd(y, x%y); } //lcm 最小公倍数 ll lcm(ll x, ll y){ return x * y / gcd(x, y); } //ngcd n個の最大公約数 ll ngcd(vector<ll> a){ ll res; res = a[0]; for(ll i = 1; i < a.size() && res != 1; i++) { res = gcd(a[i], res); } return res; } //nlcm n個の最小公倍数 ll nlcm(vector<ll> a) { ll res; res = a[0]; for (ll i = 1; i < a.size(); i++) { res = lcm(res, a[i]); } return res; } // 素数判定 bool isprime(ll x){ ll i; if(x < 2) return false; else if(x == 2) return true; if(x % 2 == 0) return false; for(i = 3; i*i <= x; i += 2){ if(x % i == 0) return false; } return true; } // 桁和 ll digsum(ll x){ ll res = 0; while(x > 0){ res += x % 10; x /= 10; } return res; } int main(){ string s; cin >> s; rep(i,s.size()){ if(s[i] == ',') s[i] = " "; } cout << string << endl; }
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] = " "; | ^~~ | | | const char* a.cc:111:18: error: expected primary-expression before '<<' token 111 | cout << string << endl; | ^~
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() { scanf("%s",ch); l=strlen(ch); for(int i=0;i<l;i++) printf("%c",ch[i]==','?' ':ch[i]); puts(""); return 0; }
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 namespace std;
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.substring(6,13)+ " " +s.substring(14,19);) ^ 2 errors
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 not declared in this scope 9 | cout<< s; | ^~~~
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:5: error: 'cout' does not name a type 5 | cout<<s;*/ | ^~~~ a.cc:5:14: error: expected unqualified-id before '/' token 5 | cout<<s;*/ | ^
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: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 15 | s[12] = " "; | ^~~ | | | const char*
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 = 0 , i<s.size(),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, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:48: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>&' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:12:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_Bi_iter>' 12 | count << s << endl; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:12:14: note: cannot convert 'std::count' (type '<unresolved overloaded function type>') to type 'std::byte' 12 | count << s << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:12:14: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | count << s << endl; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:12:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::bitset<_Nb>' 12 | count << s << endl; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_CharT' 12 | count << s << endl; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:12:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__shared_ptr<_Tp, _Lp>' 12 | count << s << endl; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_Traits' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_CharT' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_Traits' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_Traits' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_Traits' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:12:14: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 12 | count << s << endl; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_CharT' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_Traits' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:12:14: note: couldn't deduce template parameter '_Traits' 12 | count << s << endl; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned
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, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>s; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:6: error: 's' was not declared in this scope 6 | cin>>s; | ^ a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<s; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
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]=" "; | ^~~ | | | const char*
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++){ 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: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]=" "; | ^~~ | | | const char* a.cc:24:2: error: expected '}' at end of input 24 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
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_string<char>'}) 16 | cout>>str; | ~~~~^~~~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout>>str; | ^~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:16:4: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 16 | cout>>str; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:16:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]': a.cc:16:10: required from here 16 | cout>>str; | ^~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~
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 = "" ; | ^~ | | | const char* a.cc:7:16: error: 's' was not declared in this scope 7 | cin >> s; | ^ a.cc:8:9: error: 'm' was not declared in this scope 8 | m=s.length(); | ^ a.cc:12:25: error: 'new_string' was not declared in this scope 12 | new_string +=""; | ^~~~~~~~~~ a.cc:14:25: error: 'new_string' was not declared in this scope 14 | new_string -=s[i] | ^~~~~~~~~~ a.cc:18:16: error: 'new_string' was not declared in this scope 18 | cout <<new_string<<"\n"; | ^~~~~~~~~~
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 = "" ; | ^~ | | | const char* a.cc:7:16: error: 's' was not declared in this scope 7 | cin >> s; | ^ a.cc:8:9: error: 'm' was not declared in this scope 8 | m=s.length(); | ^ a.cc:12:25: error: 'new_string' was not declared in this scope 12 | new_string +=""; | ^~~~~~~~~~ a.cc:14:25: error: 'new_string' was not declared in this scope 14 | new_string -=s[i] | ^~~~~~~~~~ a.cc:18:16: error: 'new_string' was not declared in this scope 18 | cout <<new_string<<"\n"; | ^~~~~~~~~~
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; | ^~~ | | | const char* a.cc:8:17: error: request for member 'length' in 's', which is of non-class type 'char' 8 | int m=s.length(); | ^~~~~~ a.cc:11:21: error: invalid types 'char[int]' for array subscript 11 | if(s[i]==a) | ^ a.cc:12:25: error: 'b' was not declared in this scope 12 | b = b + ""; | ^ a.cc:14:25: error: 'b' was not declared in this scope 14 | b = b - s[i] | ^ a.cc:14:34: error: invalid types 'char[int]' for array subscript 14 | b = b - s[i] | ^ a.cc:18:16: error: 'b' was not declared in this scope 18 | cout <<b; | ^
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 char* a.cc:10:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s[13]=" " ; | ^~~ | | | const char*
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]=" " ; | ^~~ | | | const char* a.cc:11:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 11 | s[13]=" " ; | ^~~ | | | const char*
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 'return' 13 | cout<<s | ^ | ; 14 | return 0 ; | ~~~~~~
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 'return' 12 | cout<<s | ^ | ; ...... 20 | return 0 ; | ~~~~~~
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() ; | ^