submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s772153182
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { string S; cin>>S; S.replace(',',' ') cout<<S; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(char, char)' 8 | S.replace(',',' ') | ~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:54, 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.h:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2413 | replace(const_iterator __i1, const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2522 | replace(size_type __pos, size_type __n, const _Tp& __svt) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2200 | replace(size_type __pos, size_type __n, const basic_string& __str) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, 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]' 2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2249 | replace(size_type __pos, size_type __n1, const _CharT* __s, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2275 | replace(size_type __pos, size_type __n1, const _CharT* __s) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2319 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 2340 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2363 | replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 2385 | replace(__const_iterator __i1, __const_iterator __i2, size_type __n, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2444 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2456 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, iterator, iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; iterator = std::__cxx11::basic_string<char>::iterator]' 2468 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2480:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const_itera
s993831670
p03834
C++
#include <iostream> using namespace std; int main() { int i; string S; cin>>S; S.replace(',',' ') cout<<S; return 0; }
a.cc: In function 'int main()': a.cc:7:10: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(char, char)' 7 | S.replace(',',' ') | ~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:54, 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.h:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2413 | replace(const_iterator __i1, const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2522 | replace(size_type __pos, size_type __n, const _Tp& __svt) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2200 | replace(size_type __pos, size_type __n, const basic_string& __str) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, 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]' 2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2249 | replace(size_type __pos, size_type __n1, const _CharT* __s, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2275 | replace(size_type __pos, size_type __n1, const _CharT* __s) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2319 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 2340 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2363 | replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 2385 | replace(__const_iterator __i1, __const_iterator __i2, size_type __n, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2444 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2456 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, iterator, iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; iterator = std::__cxx11::basic_string<char>::iterator]' 2468 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2480:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const_itera
s753036722
p03834
C++
#include <iostream> using namespace std; int main() { int S[19]; for(i=1;i<=19;i++){ if(i=6 || i=14) {S[i]=" "} } return 0; }
a.cc: In function 'int main()': a.cc:6:8: error: 'i' was not declared in this scope 6 | for(i=1;i<=19;i++){ | ^
s164476464
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a[20]; cin >> a; a[5]=' '; a[13]=' '; cout << a; return 0; if(a==1){ cout << 1; } else if(a==1){ cout << 2; } else{ cout << 4; } }
a.cc: In function 'int main()': a.cc:10:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a==1){ | ~^~~ a.cc:13:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if(a==1){ | ~^~~
s378141706
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a[20]; cin >> a; a[5]=' '; a[13]=' '; cout << a; return 0; if(a==b==c){ cout << 1; } else if(a==b||b==c||c==a){ cout << 2; } else{ cout << 4; } }
a.cc: In function 'int main()': a.cc:10:9: error: 'b' was not declared in this scope 10 | if(a==b==c){ | ^ a.cc:10:12: error: 'c' was not declared in this scope 10 | if(a==b==c){ | ^
s267449616
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a[20]; cin >> a; a[5]=' '; a[13]=' '; cout << a; return 0; if(a==b==c){ cout << 1; } else if(a==b||b==c||c==a){ cout << 2; } else{ cout << e; } }
a.cc: In function 'int main()': a.cc:10:9: error: 'b' was not declared in this scope 10 | if(a==b==c){ | ^ a.cc:10:12: error: 'c' was not declared in this scope 10 | if(a==b==c){ | ^ a.cc:17:13: error: 'e' was not declared in this scope 17 | cout << e; | ^
s706313469
p03834
C++
#include <iostream> #include<string> using namespace std; int main(){ string s; cin s; s.erase(5,1); s.insert(5," "); s.erase(13,1); s.insert(13," "); cout<<s; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected ';' before 's' 8 | cin s; | ^~ | ;
s712702324
p03834
C++
#include <stdio.h> int main() { int i; for (i = 0; i < 5+7+5+2; i++) { char c; scanf(&c, %c); if (c==',') putchar(' '); else putchar(c); } return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: expected primary-expression before '%' token 7 | scanf(&c, %c); | ^
s995209271
p03834
C++
#include <stdio.h> int main() { int i; for (i = 0; i < 5+7+5+2, i++) { char c; scanf(&c, %c); if (c==',') putchar(' '); else putchar(c); } return 0; }
a.cc: In function 'int main()': a.cc:5:31: error: expected ';' before ')' token 5 | for (i = 0; i < 5+7+5+2, i++) { | ^ | ; a.cc:7:15: error: expected primary-expression before '%' token 7 | scanf(&c, %c); | ^
s586030844
p03834
C++
#include <iostream> #include<string> using namespace std; int main() { string s; cin>>s; cout<<s.size()<<endl; for(int i=0 ; i<s.size();i++) { if(s[i]==',') s[i]='' ; } cout<<s; return 0; }
a.cc:13:28: error: empty character constant 13 | if(s[i]==',') s[i]='' ; | ^~
s044123531
p03834
C++
char arr[19]; cin>>arr; for(int i=0;i<5;i++){ cout<<arr[i]; } cout<<" "; for(int i=6;i<13;i++){ cout<<arr[i]; } cout<<" "; for(int i=14;i<19;i++){ cout<<arr[i]; }
a.cc:2:3: error: 'cin' does not name a type 2 | cin>>arr; | ^~~ a.cc:3:2: error: expected unqualified-id before 'for' 3 | for(int i=0;i<5;i++){ | ^~~ a.cc:3:14: error: 'i' does not name a type 3 | for(int i=0;i<5;i++){ | ^ a.cc:3:18: error: 'i' does not name a type 3 | for(int i=0;i<5;i++){ | ^ a.cc:6:2: error: 'cout' does not name a type 6 | cout<<" "; | ^~~~ a.cc:7:2: error: expected unqualified-id before 'for' 7 | for(int i=6;i<13;i++){ | ^~~ a.cc:7:14: error: 'i' does not name a type 7 | for(int i=6;i<13;i++){ | ^ a.cc:7:19: error: 'i' does not name a type 7 | for(int i=6;i<13;i++){ | ^ a.cc:10:2: error: 'cout' does not name a type 10 | cout<<" "; | ^~~~ a.cc:11:3: error: expected unqualified-id before 'for' 11 | for(int i=14;i<19;i++){ | ^~~ a.cc:11:16: error: 'i' does not name a type 11 | for(int i=14;i<19;i++){ | ^ a.cc:11:21: error: 'i' does not name a type 11 | for(int i=14;i<19;i++){ | ^
s152033792
p03834
C++
#include <vector> #include <bits/stdc++.h> #include <iomanip> using namespace std; int main(){ string a; cin >> a; a[5] = " "; a[13] = " "; cout << a << endl; }
a.cc: In function 'int main()': 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 | a[5] = " "; a[13] = " "; | ^~~ | | | const char* a.cc:8:25: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | a[5] = " "; a[13] = " "; | ^~~ | | | const char*
s215976452
p03834
C++
#include <vector> #include <bits/stdc++.h> #include <iomanip> using namespace std; int main(){ string a; cin >> a; for(int i = 0; 1 ; i++){ if(i == 5){ a[i] = " "; } if(i == 13){ a[i] = " "; break; } cout << a << endl; } }
a.cc: In function 'int main()': a.cc:10:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | a[i] = " "; | ^~~ | | | const char* a.cc:13:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 13 | a[i] = " "; | ^~~ | | | const char*
s265885550
p03834
C
#include<stdio.h> int main(){ char S[19]; scanf("%1s",&S[]); S[5] = " "; S[13] = " "; printf("%c",S); return 0 ; }
main.c: In function 'main': main.c:4:18: error: expected expression before ']' token 4 | scanf("%1s",&S[]); | ^ main.c:5:8: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 5 | S[5] = " "; | ^ main.c:6:9: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 6 | S[13] = " "; | ^
s660364444
p03834
C++
#include <vector> #include <bits/stdc++.h> #include <iomanip> using namespace std; int main(){ string a; cin >> a; for(int i = 0; 1 ; i++){ if(i == 5){ a[i] = " " } if(i == 13){ a[i] = " " } cout << a << endl; } }
a.cc: In function 'int main()': a.cc:10:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | a[i] = " " | ^~~ | | | const char* a.cc:10:23: error: expected ';' before '}' token 10 | a[i] = " " | ^ | ; 11 | } | ~ a.cc:13:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 13 | a[i] = " " | ^~~ | | | const char* a.cc:13:23: error: expected ';' before '}' token 13 | a[i] = " " | ^ | ; 14 | } | ~
s459402811
p03834
C++
#include <bits/stdc++.h> 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:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s[5]=" ",s[13]=" "; | ^~~ | | | const char* a.cc:8:24: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s[5]=" ",s[13]=" "; | ^~~ | | | const char*
s523284791
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s[5]=’ ’,s[13]=’ ’; cout << s << endl; return 0; }
a.cc:8:14: error: extended character ’ is not valid in an identifier 8 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:8:16: error: extended character ’ is not valid in an identifier 8 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:8:24: error: extended character ’ is not valid in an identifier 8 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:8:26: error: extended character ’ is not valid in an identifier 8 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc: In function 'int main()': a.cc:8:14: error: '\U00002019' was not declared in this scope 8 | s[5]=’ ’,s[13]=’ ’; | ^
s154189817
p03834
C++
# include <bits/stdc++.h> using namespace std; string s; int main (){ cin >> s; for(int i=0;i<s.size()){ if(s[i]!=',') cout<<s[i]; else cout<<' '; } }
a.cc: In function 'int main()': a.cc:6:27: error: expected ';' before ')' token 6 | for(int i=0;i<s.size()){ | ^ | ;
s237932510
p03834
C++
#include <iostream> using namespace std; int main(){ string S; cin >> S; S[5] = ' '; S[13] = ' '; cout << ß<< endl; }
a.cc: In function 'int main()': a.cc:8:11: error: '\U000000df' was not declared in this scope 8 | cout << ß<< endl; | ^
s632260553
p03834
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i=0;i<n;i++) using namespace std; int main() { string a;cin>>a; rep(i,s.size()) { if (s[i]==',') s[i]==' '; } cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 's' was not declared in this scope 7 | rep(i,s.size()) { | ^ a.cc:2:33: note: in definition of macro 'rep' 2 | #define rep(i,n) for (int i=0;i<n;i++) | ^ a.cc:10:9: error: 's' was not declared in this scope 10 | cout<<s<<endl; | ^
s633236648
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b,c;cin<<a<<","<<b<<","<<c; cout<<a<<" "<<b<<" "<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:19: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ~~~^~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<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: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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ 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:5:16: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^~~ 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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ 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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ 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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ 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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ 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:5:21: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | string a,b,c;cin<<a<<","<<b<<","<<c; | ^ /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, _Trai
s557594665
p03834
C++
#include <iostream> #include <string> int main() { std::string a; std::cin >>a; std::string ss[19]; for(int i==0;i == 18;1++){ ss[i] = a.substr(i,1); if(ss[i] ==","){ ss[i] =" "; } cout << ss[i]; } }
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before '==' token 9 | for(int i==0;i == 18;1++){ | ^~ | ; a.cc:9:12: error: expected primary-expression before '==' token 9 | for(int i==0;i == 18;1++){ | ^~ a.cc:9:23: error: expected ')' before ';' token 9 | for(int i==0;i == 18;1++){ | ~ ^ | ) a.cc:9:24: error: lvalue required as increment operand 9 | for(int i==0;i == 18;1++){ | ^
s863991161
p03834
Java
import java.util.Scanner; public class test { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); str = str.replace(',', ' '); System.out.println(str); scan.close(); } }
Main.java:3: error: class test is public, should be declared in a file named test.java public class test { ^ 1 error
s569296932
p03834
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); str = str.replace(',', ' '); System.out.println(str); scan.close(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s284709611
p03834
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #include <functional> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; typedef pair<ll, ll> P; typedef vector<vector<P>> vvP; #define rep(i, n) for(ll i = 0; i < n; i++) #define exrep(i, a, b) for(ll i = a; i <= b; i++) #define out(x) cout << x << endl #define exout(x) printf("%.10f\n", x) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define re0 return 0 const ll mod = 1000000007; const ll INF = 1e16; const ll MAX_N = 100010; int main() { string s; cin >> s; s[5] = " "; s[13] = " "; out(s); re0; }
a.cc: In function 'int main()': a.cc:36:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 36 | s[5] = " "; | ^~~ | | | const char* a.cc:37:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 37 | s[13] = " "; | ^~~ | | | const char*
s603228189
p03834
C++
#include <bits/stdc++.h> #include <string> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <numeric> using namespace std; int abs(int num){ if (num > 0) return num; else return -num; } int main(){ string S; cin >> S; S.at(5) = " "; S.at(13) = " "; cout << S << endl; }
a.cc: In function 'int main()': a.cc:19:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 19 | S.at(5) = " "; | ^~~ | | | const char* a.cc:20:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 20 | S.at(13) = " "; | ^~~ | | | const char*
s844615872
p03834
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ string s; cin >> s; s[5] = " "; s[13] = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:11:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 11 | s[5] = " "; | ^~~ | | | const char* a.cc:12:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 12 | s[13] = " "; | ^~~ | | | const char*
s514903019
p03834
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ string s; cin >> s; s[5] = " "; s[13] " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:11:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 11 | s[5] = " "; | ^~~ | | | const char* a.cc:12:8: error: expected ';' before string constant 12 | s[13] " "; | ^~~~ | ; a.cc:12:7: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result] 12 | s[13] " "; | ^ 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:1265:7: note: declared here 1265 | operator[](size_type __pos) | ^~~~~~~~
s312270927
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for(int i=0; i<str.size(); i++){ if(str.at(i)== ","){ cout << " "; }else{ cout << str.at(i); } } cout << endl; }
a.cc: In function 'int main()': a.cc:10:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(str.at(i)== ","){ | ~~~~~~~~~^~~~~~
s604686800
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:8:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s.at(5) = " "; | ^~~ | | | const char* a.cc:9:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | s.at(13) = " "; | ^~~ | | | const char*
s763652972
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:8:30: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s.at(5) = s.at(13) = " "; | ^~~ | | | const char*
s852833092
p03834
C++
#include <queue> #include <iostream> #include <map> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <iomanip> #include <cstdio> #define rep(i, n) for(long long i = 0;(i) < (n);(i)++) using namespace std; using ll = long long; const ll mod = 1000000007; int main() { string str; cin >> str; str[6] = ' '; str[12] = ' ': cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:21:22: error: expected ';' before ':' token 21 | str[12] = ' ': | ^ | ;
s152837570
p03834
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define co(a) cout<<a<<endl #define sz size() #define bgn begin() #define en end() #define pb push_back #define pp() pop_back() #define V vector #define P pair #define V2(a,b,c) V<V<int>> a(b,V<int>(c)) #define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d)) #define incin(a) int a; cin>>a #define yuko(a) setprecision(a) #define uni(a) a.erase(unique(a.begin(),a.end()),a.end()) #define Q queue #define pri priority_queue #define Pri priority_queue<int,vector<int>,greater<int>> #define PriP priority_queue<P<int,int>,vector<P<int,int>>,greater<P<int,int>>> #define ff first.first #define fs first.second #define sf second.first #define ss second.second #define all(a) (a).begin(),(a).end() #define Pi P<int,int> #define elif else if int low(V<int> a,int b){ decltype(a)::iterator c=lower_bound(a.begin(),a.end(),b); int d=c-a.bgn; return d; } int upp(V<int> a,int b){ decltype(a)::iterator c=upper_bound(a.begin(),a.end(),b); int d=c-a.bgn; return d; } template<class T> void cou(vector<vector<T>> a){ int b=a.size(); int c=a[0].size(); fo(i,b){ fo(j,c){ cout<<a[i][j]; if(j==c-1) cout<<endl; else cout<<' '; } } } int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a){ return a*(a+1)/2; } int gcm(int a,int b){ if(a%b==0) return b; return gcm(b,a%b); } bool prime(int a){ if(a<2) return false; else if(a==2) return true; else if(a%2==0) return false; double b=sqrt(a); for(int i=3;i<=b;i+=2){ if(a%i==0){ return false; } } return true; } struct Union{ vector<int> par; Union(int a){ par=vector<int>(a,-1); } int find(int a){ if(par[a]<0) return a; else return par[a]=find(par[a]); } bool same(int a,int b){ return find(a)==find(b); } int Size(int a){ return -par[find(a)]; } void unite(int a,int b){ a=find(a); b=find(b); if(a==b) return; if(Size(b)>Size(a)) swap<int>(a,b); par[a]+=par[b]; par[b]=a; } }; int ketas(int a){ string b=to_string(a); int c=0; fo(i,keta(a)){ c+=b[i]-'0'; } return c; } int lcm(int a,int b){ return a/gcm(a,b)*b; } bool fe(int a,int b){ a%=10; b%=10; if(a==0) a=10; if(b==0) b=10; if(a>b) return true; else return false; } int INF=1000000007; struct edge{int s,t,d; }; V<int> mojisyu(string a){ V<int> b(26,0); fo(i,a.sz){ b[a[i]-'a']++; } return b; } int wa2(int a){ if(a%2==1) return a/2; return a/2-1; } /*signed main(){ int a,b,c; cin>>a>>b>>c; V<V<edge>> d(a); fo(i,b){ edge e; cin>>e.s>>e.t>>e.d; d[e.s].pb(e); } V<int> e(a,INF); e[c]=0; priority_queue<P<int,int>,V<P<int,int>>,greater<P<int,int>>> f; f.push({0,c}); int h=INF; while(!f.empty()){ P<int,int> g; g=f.top(); f.pop(); int v = g.second, i = g.first; for(edge l : d[v]){ if(e[l.t] > i + l.d){ e[l.t] = i + l.d; f.push({i+l.d , l.t}); } } } fo(i,a){ if(e[i]==INF) cout<<"INF"<<endl; else cout<<e[i]<<endl; } } ?*/ int nCr(int n,int r){ int a=1; r=min(r,n-r); for(int i=n;i>n-r;i--){ a*=i; a/=n-i+1; } return a; } /*void sea(int x,int y){ if(x<0||a<=x||y<0||b<=y||c[x][y]=='#') return; if(d[x][y]) return; d[x][y]++; sea(x+1,y); sea(x-1,y); sea(x,y+1); sea(x,y-1); }*/ int kaijou(int a){ int b=1; fo(i,a) b*=i+1; return b; } int nPr(int a,int b){ int c=1; for(int i=a;i>=b;i--) c*=i; return c; } int MOD=INF; int fac[1000010], finv[1000010], inv[1000010]; // テーブルを作る前処理 //先にCOMinit()で前処理をする //ABC145D void COMinit() { fac[0]=fac[1]=1; finv[0]=finv[1]=1; inv[1]=1; for(int i=2;i<1000010;i++){ fac[i]=fac[i-1]*i%MOD; inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD; finv[i]=finv[i-1]*inv[i]%MOD; } } // 二項係数計算 int COM(int n,int k){ if(n<k) return 0; if(n<0||k<0) return 0; return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD; } bool naka(int a,int b,V<V<char>> c){ return (a>=0&&b>=0&&a<c.sz&&b<c[0].sz); } V<P<int,int>> mawari4={{0,-1},{0,1},{1,0},{-1,0}}; V<P<int,int>> mawari8={{0,-1},{0,1},{1,0},{-1,0},{-1,-1},{1,1},{1,-1},{-1,-1}}; // 最短距離の表:c // スタート:sx,sy // ゴール:gx,gy /*int bfs(V<V<char>> a){ Q<P<int,int>> b; fo(i,a.sz){ fo(j,a[0].sz){ c[i][j]==INF; } } b.push({sx,sy}); c[sx][sy]=0; while(b.sz){ P d=b.front(); b.pop(); if(d=={gx,gy}) break; fo(i,4){ int e=d.fi+mawari4[i],f=d.se+mawari4[i]; if(naka(e,f,a)&&a[e][f]=='.'&&c[e][f]==INF){ b.push({e,f}); c[e][f]==c[d.fi][d.se]+1; } } } return c[gx][gy]; }*/ int inf=1000000000000000007; signed main(){ string s; cin>>s; s[5]==" "; s[13]==" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:284:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 284 | s[5]==" "; a.cc:285:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 285 | s[13]==" ";
s404306526
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >>s; for(int i= 0;i<s.size();i++) { if (i==5 || i==13) { cout<<" "; } else cout << s[i]; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s432077046
p03834
C
#include <stdio.h> int main(void){ char a[10],b[10],c[10],haiku[20],space=" "; scanf("%s,%s,&s",a,b,c); sprintf(haiku,"%s%c%s%c%s",a,space,b,space,c); printf("%s",haiku) return 0; }
main.c: In function 'main': main.c:3:48: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 3 | char a[10],b[10],c[10],haiku[20],space=" "; | ^~~ main.c:6:27: error: expected ';' before 'return' 6 | printf("%s",haiku) | ^ | ; 7 | return 0; | ~~~~~~
s704493175
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ getline S; for (int i=0; i<S.size(); i++){ if (S.at(i)==','){ cout << ' '; } else { cout << S.at(i); } } }
a.cc: In function 'int main()': a.cc:6:10: error: expected ';' before 'S' 6 | getline S; | ^~ | ; a.cc:6:12: error: statement cannot resolve address of overloaded function 6 | getline S; | ^ a.cc:8:19: error: 'S' was not declared in this scope 8 | for (int i=0; i<S.size(); i++){ | ^
s421704430
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >>S; S.at(6)=' '; S.at(14)=' '; cout <S; }
a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | cout <S; | ~~~~ ^~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::ostream {aka std::basic_ostream<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:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout <S; | ^ /usr/include/c++/14/bits/regex.h:1224: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>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 9 | cout <S; | ^ /usr/include/c++/14/bits/regex.h:1317: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>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout <S; | ^ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout <S; | ^ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout <S; | ^ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout <S; | ^ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout <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:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 9 | cout <S; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout <S; | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout <S; | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout <S; | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout <S; | ^ 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:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout <S; | ^ /usr/include/c++/14/string_view:680: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> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout <S; | ^ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout <S; | ^ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:9:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 9 | cout <S; | ^ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _A
s656101282
p03834
C++
print(input().replace(","," "))
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input().replace(","," ")) | ^
s882673986
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string s; cin >> x; s[5] = ' '; s[13] = ' ';a cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'x' was not declared in this scope 9 | cin >> x; | ^ a.cc:12:15: error: 'a' was not declared in this scope 12 | s[13] = ' ';a | ^
s775540322
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string s; cin >> x; s[5] = ' '; s[13] = ' '; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'x' was not declared in this scope 9 | cin >> x; | ^
s803488860
p03834
C
#include <stdio.h> int main() { char s[18]; scanf_s("%c",&s[18]); s[5] = ' '; s[13] = ' '; printf("%c", s); return 0; }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%c",&s[18]); | ^~~~~~~ | scanf
s457256579
p03834
C++
#include <iostream> using namespace std; int main() { cin >> word5_1; cin >> word7; cin >> word5_2; cout << word5_1 << word7 << word5_2 << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:11: error: 'word5_1' was not declared in this scope 5 | cin >> word5_1; | ^~~~~~~ a.cc:6:11: error: 'word7' was not declared in this scope 6 | cin >> word7; | ^~~~~ a.cc:7:11: error: 'word5_2' was not declared in this scope 7 | cin >> word5_2; | ^~~~~~~
s281240786
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(auto x : s){ cout<<x; if(c==',') cout<<" "; } return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: 'c' was not declared in this scope 10 | if(c==',') cout<<" "; | ^
s988911011
p03834
C++
clude<iostream> #include<string> int main(){ std::string s; std::cin >> s; int n = s.size(); std::string ans = ""; for(int i = 0; i < n; i++){ if(i == 5 || i == 13) continue; else ans += s[i]; } std::cout << ans << std::endl; return 0; }
a.cc:1:1: error: 'clude' does not name a type 1 | clude<iostream> | ^~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s521869347
p03834
C++
#include<iostrem> #include<string> int main(){ std::string s; std::cin >> s; int n = s.size(); std::string ans = ""; for(int i = 0; i < n; i++){ if(i == 5 || i == 13) continue; else ans += s[i]; } std::cout << ans << std::endl; return 0; }
a.cc:1:9: fatal error: iostrem: No such file or directory 1 | #include<iostrem> | ^~~~~~~~~ compilation terminated.
s446279971
p03834
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long (i)=0;(i)<(n);(i)++) #define ll long long #define pr_qu priority_queue #define vec(name,size,common) vector<ll> (name)((size),(common)) int main(){ string s; cin>>s; for(int i=0;i<n;i++){ if(s.at(i)==','){ s.at(i) = ' '; } } cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:17:17: error: 'n' was not declared in this scope 17 | for(int i=0;i<n;i++){ | ^
s988896396
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { char s[20]; gets(s); for(int i=0;i<=4;i++)cout<<s[i]; cout<<" "; for(int i=6;i<=12;i++)cout<<s[i]; cout<<" "; for(int i=14;i<=18;i++)cout<<s[i]; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s164293770
p03834
C++
#include<bits/stdc++> using namespace std; int main() { string s; cin>>s; for(int i=0;i<s.size();i++) if(s[i]==',') s[i]=' '; cout<<s; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s101012000
p03834
C++
#include <bits/stdc++.h> #define rep(i,m,n) for(int i=m; i<n; i++) #define co(n) cout << n << endl using namespace std; int main(){ int a, b; string s; cin >> s; s.at(5)=" "; s.at(13)=" "; co(s); return 0; }
a.cc: In function 'int main()': a.cc:9:11: 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:12: 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*
s449443165
p03834
C++
# -*- Coding: utf-8 -*- a = list(input().split(',')) for i in a: print(i, end=" ")
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- Coding: utf-8 -*- | ^ a.cc:2:1: error: 'a' does not name a type 2 | a = list(input().split(',')) | ^
s544237579
p03834
C++
#include"bits/stdc++.h" #include<boost/multi_array.hpp> #include<boost/optional.hpp> #include<boost/range/irange.hpp> #include<boost/range/algorithm.hpp> #include<boost/range/adaptors.hpp> using namespace std; namespace adaptor = boost::adaptors; #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++) #define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--) typedef long long ll; void Main(){ string s; cin >> s; rep(i,s.size()){ if(s[i] = ','){ s[i] = ' '; } } cout << s << endl; else return; } int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << fixed << setprecision(15); Main(); return 0; }
a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory 2 | #include<boost/multi_array.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s692518784
p03834
C++
#include<bits/stdc++.h> using namespace std; #define debug(n) cerr << #n << ':' << n << endl; #define dline cerr << __LINE__ << endl; using ll = long long; template<class T, class U> using P = pair<T,U>; template<class T> using Heap = priority_queue<T>; template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>; template<class T,class U> using umap = unordered_map<T,U>; template<class T> using uset = unordered_set<T>; template<class T> bool ChangeMax(T&a,const T&b){ if(a >= b) return false; a = b; return true; } template<class T> bool ChangeMin(T&a,const T&b){ if(a <= b) return false; a = b; return true; } template<class T, size_t N, class U> void Fill(T (&a)[N], const U&v){ fill((U*)a,(U*)(a+N),v); } template<class T> istream& operator >> (istream&is, vector<T>&v){ for(auto&e:v)is >> e; return is; } int main(){ string a,b,c; getline(cin,a,','); getline(cin,b,','); getline(cin,c,); cout << a << ' ' << b << ' ' << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:43:17: error: expected primary-expression before ')' token 43 | getline(cin,c,); | ^
s121415951
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string a; cin>>a; for(int i=0;i<a.length();i++) { if(a[i]==',') { a[i]=' '; }#include<bits/stdc++.h> using namespace std; int main() { string a; cin>>a; for(int i=0;i<a.length();i++) { if(a[i]==',') { a[i]=' '; } } cout<<a; return 0; } } cout<<a; return 0; }
a.cc:12:14: error: stray '#' in program 12 | }#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:12:15: error: 'include' was not declared in this scope 12 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:12:23: error: 'bits' was not declared in this scope 12 | }#include<bits/stdc++.h> | ^~~~ a.cc:12:28: error: 'stdc' was not declared in this scope; did you mean 'std'? 12 | }#include<bits/stdc++.h> | ^~~~ | std a.cc:13:1: error: expected primary-expression before 'using' 13 | using namespace std; | ^~~~~ a.cc:14:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 14 | int main() | ^~ a.cc:14:9: note: remove parentheses to default-initialize a variable 14 | int main() | ^~ | -- a.cc:14:9: note: or replace parentheses with braces to value-initialize a variable a.cc:15:1: error: a function-definition is not allowed here before '{' token 15 | { | ^
s742882467
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string a; cin>>a; for(int i=0;i<a.length();i++) { if(a[i]==',') { a[i]=' '; }#include<bits/stdc++.h> using namespace std; int main() { string a; cin>>a; for(int i=0;i<a.length();i++) { if(a[i]==',') { a[i]=' '; } } cout<<a; return 0; } } cout<<a; return 0; }
a.cc:12:14: error: stray '#' in program 12 | }#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:12:15: error: 'include' was not declared in this scope 12 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:12:23: error: 'bits' was not declared in this scope 12 | }#include<bits/stdc++.h> | ^~~~ a.cc:12:28: error: 'stdc' was not declared in this scope; did you mean 'std'? 12 | }#include<bits/stdc++.h> | ^~~~ | std a.cc:13:1: error: expected primary-expression before 'using' 13 | using namespace std; | ^~~~~ a.cc:14:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 14 | int main() | ^~ a.cc:14:9: note: remove parentheses to default-initialize a variable 14 | int main() | ^~ | -- a.cc:14:9: note: or replace parentheses with braces to value-initialize a variable a.cc:15:1: error: a function-definition is not allowed here before '{' token 15 | { | ^
s313473874
p03834
C++
a,b,c = input().split(',') print(a,b,c,sep=' ')
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c = input().split(',') | ^
s018180519
p03834
Java
public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String a = sc.next(); // 置き換え処理 a = a.replace(",", " "); System.out.print(a); } }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s533326421
p03834
Java
public static void main(String args[]) { String a = args[0]; // 置き換え処理 a = a.replace(",", " "); // ","→" "(ブランク)に置き換える System.out.print(a); }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String args[]) { ^ (use --enable-preview to enable unnamed classes) 1 error
s108610344
p03834
Java
import java.util.Scanner; public class ABC051A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] s = sc.next().split(","); sc.close(); StringBuilder sb = new StringBuilder(); sb.append(s[0] + " "); sb.append(s[1] + " "); sb.append(s[2]); System.out.println(sb.toString()); } }
Main.java:3: error: class ABC051A is public, should be declared in a file named ABC051A.java public class ABC051A { ^ 1 error
s793879820
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s(7)=' '; s(15)=' '; cout << s << endl; }
a.cc: In function 'int main()': a.cc:7:4: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)' 7 | s(7)=' '; | ~^~~ a.cc:8:4: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)' 8 | s(15)=' '; | ~^~~~
s026171543
p03834
C++
#include <stdio.h> #include <string.h> int main () { int i; char a[1000]; gets (a); for (i=0;a[i]!='\0';i++) { if (a[i]==',') { a[i]=' '; } } printf ("%s", a); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets (a); | ^~~~ | getw
s474369896
p03834
C++
#include <stdio.h> int main () { int i; char a[1000]; gets (a); for (i=0;a[i]!='\0';i++) { if (a[i]==',') { a[i]=' '; } } printf ("%s", a); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets (a); | ^~~~ | getw
s690757567
p03834
C++
#include<iostream> using namespace std; int main(void){ int k,s; cin >> k>>s; int cnt = 0; for (int i = 0; i <= K; i++) { for (int j = 0; j <= K;j++){ if(0<=s-i-j&&s-i-j<=k){ cnt++; } } } cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:7:24: error: 'K' was not declared in this scope 7 | for (int i = 0; i <= K; i++) | ^
s417904264
p03834
C++
#include <stdio.h> #include <iostream> #include <string> using namespace std; int main(void){ string N[20]; cin >> N; N[5]=' '; N[13]=' '; printf("%s", N); return 0; }
a.cc: In function 'int main()': a.cc:10:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'}) 10 | cin >> N; | ~~~ ^~ ~ | | | | | std::string [20] {aka std::__cxx11::basic_string<char> [20]} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:2: /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:10:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} 10 | cin >> N; | ^ /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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(short int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(short unsigned int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(unsigned int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long unsigned int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long long int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& N))' 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:10:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 10 | cin >> N; | ^ /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 [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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 [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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 [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_is
s350097526
p03834
C++
#include <stdio.h> #include <iostream> #include <string> using namespace std; int main(void){ string N[20]; cin >> N; N[5]=" "; N[13]=" "; printf("%s", N); return 0; }
a.cc: In function 'int main()': a.cc:10:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'}) 10 | cin >> N; | ~~~ ^~ ~ | | | | | std::string [20] {aka std::__cxx11::basic_string<char> [20]} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:2: /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:10:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} 10 | cin >> N; | ^ /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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(short int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(short unsigned int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(unsigned int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long unsigned int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long long int)((std::string*)(& N))' 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:10:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive] 10 | cin >> N; | ^ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:10:10: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& N))' 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:10:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 10 | cin >> N; | ^ /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 [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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 [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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 [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_is
s768804141
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { char str[21]; gets(str); for(int i=0;str[i]!='\0';i++) { if(str[i]==',')printf(" "); else printf("%c",str[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(str); | ^~~~ | getw
s347574593
p03834
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ char s[18]; cin>>s; s[5]=" "; s[13]=" "; cout<<s; return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | s[5]=" "; | ^~~ | | | const char* a.cc:11:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 11 | s[13]=" "; | ^~~ | | | const char*
s276514964
p03834
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string s; cin>>s; s[5]=" "; s[13]=" "; cout<<s; return 0; }
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*
s816189034
p03834
C++
s=input().split(",") print(*s)
a.cc:1:1: error: 's' does not name a type 1 | s=input().split(",") | ^
s461529132
p03834
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { string s; cin >> s; s[5]=" "; s[13]=" "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:8: 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:9: 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*
s013001735
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; a.at(5)=' '; a.at(13)=' '; cout >> a >> endl; }
a.cc: In function 'int main()': a.cc:9: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>'}) 9 | cout >> a >> endl; | ~~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /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:9:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 9 | cout >> a >> endl; | ^~~~ In file included from /usr/include/c++/14/string:55, 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/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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ In file included from /usr/include/c++/14/istream:1109, 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/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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> a >> endl; | ^ /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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> a >> endl; | ^ /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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> a >> endl; | ^ /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:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> a >> endl; | ^ /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:9:11: required from here 9 | cout >> a >> endl; | ^ /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) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:9:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> a >> endl; | ^ /usr/include/c++/14/iomanip:237:5: note: candidate: 'template<clas
s058546786
p03834
Java
import java.io.*; import java.util.*; public class CF { FastScanner in; PrintWriter out; void solve() { String s = in.next(); String[] arr = s.split(",",3); out.println(arr[0]+' '+arr[1]+' '+arr[2]); } void run() { try { in = new FastScanner(new File("test.in")); out = new PrintWriter(new File("test2.out")); solve(); out.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } } void runIO() { in = new FastScanner(System.in); out = new PrintWriter(System.out); solve(); out.close(); } class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(File f) { try { br = new BufferedReader(new FileReader(f)); } catch (FileNotFoundException e) { e.printStackTrace(); } } public FastScanner(InputStream f) { br = new BufferedReader(new InputStreamReader(f)); } String next() { while (st == null || !st.hasMoreTokens()) { String s = null; try { s = br.readLine(); } catch (IOException e) { e.printStackTrace(); } if (s == null) return null; st = new StringTokenizer(s); } return st.nextToken(); } boolean hasMoreTokens() { while (st == null || !st.hasMoreTokens()) { String s = null; try { s = br.readLine(); } catch (IOException e) { e.printStackTrace(); } if (s == null) return false; st = new StringTokenizer(s); } return true; } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } } public static void main(String[] args) { new CF().runIO(); } }
Main.java:4: error: class CF is public, should be declared in a file named CF.java public class CF { ^ 1 error
s730161707
p03834
C++
#include<iostream> #incllude<string.h> using namespace std; int main(){ string s; cin>>s; s[5]=' '; s[13]=' '; cout<<s; return 0; }
a.cc:2:2: error: invalid preprocessing directive #incllude; did you mean #include? 2 | #incllude<string.h> | ^~~~~~~~ | include
s057926403
p03834
C++
using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; int main() { int K, S; cin >> K >> S; int cnt; for (int x = K; x >= 0; x--){ if (x + 2 * K < S) { break; } for (int y = K; y >= 0; y--){ if (x + y + K < S || x + y > S){ break; } else { cnt++; } } } cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:8:5: error: 'cin' was not declared in this scope 8 | cin >> K >> S; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:23:5: error: 'cout' was not declared in this scope 23 | cout << cnt << endl; | ^~~~ a.cc:23:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:23:20: error: 'endl' was not declared in this scope 23 | cout << cnt << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s649254070
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<char> S(19); for(int i=0; i<19; i++){ cin>>S.at(i); } S.at(5)=' '; S.at(13)=' '; cout<<S<<endl; }
a.cc: In function 'int main()': a.cc:12:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>') 12 | cout<<S<<endl; | ~~~~^~~ | | | | | std::vector<char> | std::ostream {aka std::basic_ostream<char>} 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, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::vector<char>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::vector<char>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::vector<char>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::vector<char>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::nullptr_t' 306 | operator<<(nullptr_t) | ^~
s786387364
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<char> S(19); for(int i=0; i<19; i++){ cin>>S.at(i); if(S.at(i)==',') S.at(i)=' '; else continue; } cout<<S<<endl; }
a.cc: In function 'int main()': a.cc:11:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>') 11 | cout<<S<<endl; | ~~~~^~~ | | | | | std::vector<char> | std::ostream {aka std::basic_ostream<char>} 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, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::vector<char>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::vector<char>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::vector<char>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::vector<char>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::nullptr_t' 306 | operator<<(nullptr_t) | ^~
s709250767
p03834
C++
//新幹線からAC #include <bits/stdc++.h> #include <numeric> #include <iomanip> using namespace std; #define int long long #define pb push_back #define ub upper_bound #define lb upper_bound #define mp make_pair #define F first #define S second #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define rep(i,n) FOR(i,0,n) #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(),(a).rend() #define SORT(c) sort((c).begin(),(c).end()) #define ve vector #define vi vector<int> #define vp vector<pair<int,int>> #define vvi vector<vector<int>> using ll = long long; const ll INF = LLONG_MAX - 100; ll mod = 1e9 + 7; int dx[] = {-1,0,1,0}, dy[] = {0,1,0,-1}; vector<ll> prime; class fact { public: int fmod = 1e9+7; vector<int> fac, inv; fact (int n, int Mod = 1e9+7) { fmod = Mod; fac = vector<int>(n,0); inv = vector<int>(n,0); fac[0] = 1; for (int i = 1; i < n; i++) fac[i] = fac[i-1] * i % fmod; for (int i = 0;i < n;i++) inv[i] = fact::POW(fac[i],fmod-2); } ll nCr(ll n, ll r) {return (fac[n] * inv[r] % fmod) * inv[n-r] % fmod;} ll POW(ll a, ll b) {ll c = 1; while (b > 0) {if (b & 1) {c = a * c%fmod;}a = a * a%fmod; b >>= 1;}return c;} }; template <class T = ll> T in() {T x; cin >> x; return (x);} void DEBUG(vector<int> a) {for(int i=0;i<a.size();i++)cout<<a[i]<<" ";cout<<endl;} void EMP(int x) {cout<<"!!!"<<x<<"!!!"<<endl;} ll GCD(ll a, ll b) {ll c; while (b != 0) {c = a % b; a = b; b = c;}return a;} ll LCM(ll a, ll b) {return (a / GCD(a,b)) * b;} ll POW(ll a, ll b) {ll c = 1; while (b > 0) {if (b & 1) {c = a * c%mod;}a = a * a%mod; b >>= 1;}return c;} void PRI(ll n) {bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) {a[i] = 1LL;}for (int i = 2; i < n + 1LL; i++) {if (a[i]) {prime.pb(i); ll b = i; while (b <= n) {a[b] = 0; b += i;}}}} template <typename T> T chmin(T& a, T b) {if(a>b)a=b;return a;} template <typename T> T chmax(T& a, T b) {if(a<b)a=b;return b;} bool isSqrt(ll a) {return pow(sqrt(a),2) == a ? 1 : 0;} void YesNo(bool a) {if (a) cout << "Yes"; else cout << "No"; cout << endl;} void yesno(bool a) {if (a) cout << "yes"; else cout << "no"; cout << endl;} void YESNO(bool a) {if (a) cout << "YES"; else cout << "NO"; cout << endl;} bool solve() { string s; cin >> s; rep (i, 19) { cout << ((s[i] == ',')?" ":s[i]) } } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
a.cc: In function 'bool solve()': a.cc:63:39: error: operands to '?:' have different types 'const char*' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 63 | cout << ((s[i] == ',')?" ":s[i]) a.cc:65:1: warning: no return statement in function returning non-void [-Wreturn-type] 65 | } | ^
s864942420
p03834
C++
#include <iostream> #include <iomanip> #include <vector> #include <cmath> #include <algorithm> #include <iomanip> #include <cstring> #define rep(i, N) for (int i = 0; i < (int)N; i++) using namespace std; typedef long long ll; const ll LLINF = 9223372036854775807; const int MOD = 1000000007; int main() { string s; cin >> s; string s1 = substr(s,0,5), s2 = substr(s,6,7), s3 = substr(s,14,5); cout << s1 << " " << s2 << " " << s3 << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:15: error: 'substr' was not declared in this scope; did you mean 'strstr'? 16 | string s1 = substr(s,0,5), s2 = substr(s,6,7), s3 = substr(s,14,5); | ^~~~~~ | strstr a.cc:17:24: error: 's2' was not declared in this scope; did you mean 's1'? 17 | cout << s1 << " " << s2 << " " << s3 << endl; | ^~ | s1 a.cc:17:37: error: 's3' was not declared in this scope; did you mean 's1'? 17 | cout << s1 << " " << s2 << " " << s3 << endl; | ^~ | s1
s111582740
p03834
C++
#include <iostream> #include <iomanip> #include <vector> #include <cmath> #include <algorithm> #include <iomanip> #include <cstring> #define rep(i, N) for (int i = 0; i < (int)N; i++) using namespace std; typedef long long ll; const ll LLINF = 9223372036854775807; const int MOD = 1000000007; int main() { string s; cin >> s; cout << substr(s,0,5) << " " << substr(s,6,7) << " " << substr(s,14,5) << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:11: error: 'substr' was not declared in this scope; did you mean 'strstr'? 16 | cout << substr(s,0,5) << " " << substr(s,6,7) << " " << substr(s,14,5) << endl; | ^~~~~~ | strstr
s559603250
p03834
C++
#include <iostream> #include <iomanip> #include <vector> #include <cmath> #include <algorithm> #include <iomanip> #include <cstring> #define rep(i, N) for (int i = 0; i < (int)N; i++) using namespace std; typedef long long ll; const ll LLINF = 9223372036854775807; const int MOD = 1000000007; int main() { string s; cin >> s; cout << substr(0,5) << " " << substr(6,7) << " " << substr(14,5) << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:11: error: 'substr' was not declared in this scope; did you mean 'strstr'? 16 | cout << substr(0,5) << " " << substr(6,7) << " " << substr(14,5) << endl; | ^~~~~~ | strstr
s273485959
p03834
C
#include int main(void){ char str1[] = "abcde"; char str2[] = "abcdefg"; char str3[] = "abcde"; scanf("%s %s %s",&str1,&str2,&str3); printf("%s %s %s",str1, str2, str3); return 0; }
main.c:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ main.c: In function 'main': main.c:9:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 9 | scanf("%s %s %s",&str1,&str2,&str3); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #include main.c:9:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 9 | scanf("%s %s %s",&str1,&str2,&str3); | ^~~~~ main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:11:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 11 | printf("%s %s %s",str1, str2, str3); | ^~~~~~ main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
s985994379
p03834
C
#include int main(void){ char str1[] = "abcde"; char str2[] = "abcdefg"; char str3[] = "abcde"; scanf("%s %s %s",&str1,&str2,&str3); printf("%s %s %s",&str1, &str2, &str3); return 0; }
main.c:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ main.c: In function 'main': main.c:9:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 9 | scanf("%s %s %s",&str1,&str2,&str3); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #include main.c:9:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 9 | scanf("%s %s %s",&str1,&str2,&str3); | ^~~~~ main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:11:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 11 | printf("%s %s %s",&str1, &str2, &str3); | ^~~~~~ main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
s061792981
p03834
C++
// --------------------<optimizations>-------------------- #pragma GCC optimize("O3") //(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)\ #pragma comment(linker, "/stack:200000000") //(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)\ #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; #define ll long long #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair<ll,ll> #define vpii vector<pair<ll,ll> > #define F first #define S second #define ld long double #define built __builtin_popcountll #define mst(a,i) memset(a,i,sizeof(a)) #define all(x) x.begin(),x.end() #define itit(it,a) for(auto it=(a).begin(); it!=(a).end(); it++) #define rep(i,a,b) for(ll i=a; i<b; i++) #define repr(i,a,b) for(ll i=a; i>b; i--) #define reprr(i,a,b) for(ll i=a; i>=b; i--) #define pi 3.14159265358979323846264338327950288419716939937510582097494459230 ll max3(ll x,ll y,ll z) {return max(max(x,y),z);} ll min3(ll x,ll y,ll z) {return min(min(x,y),z);} const ll M=2e5+10,M2=1e6+10,mod=1e9+7,inf=1e17+10; void add(int& a, int b) {a+=b;if(a>=mod){a-=mod;}} #define trace1(x) cerr<<#x<<": "<<x<<endl #define trace2(x, y) cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl #define trace3(x, y, z) cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl #define trace4(a, b, c, d) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl #define trace5(a, b, c, d, e) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl #define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl int X[] = {0, 1, 0, -1}; int Y[] = {-1, 0, 1, 0}; ll power(ll x,ll n){ll result=1;while(n>0){if(n%2==1)result=(result*x)%mod; x=((x%mod)*(x%mod))%mod;n=n/2;}return result;} string s; int main() { #ifndef ONLINE_JUDGE //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); #endif ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> s; ll n=s.size(); for(ll i=0; i<n; i++){ if(s[i]==',') s[i]=" "; } cout << s; return 0; } /* The judge is never wrong! Your code is buggy Look for: * * Read the problem carefully. * * Don't forget to sort(), mod, ll!!!! * * Initial value = +/- infinity instead of zero!!! * * an easier and alternate approach * * read the problem statement carefully * * if concept is correct and still WA, try with a different implementation * * special cases (n=1?) * * if you have no idea just guess the appropriate well-known algorithm instead of doing nothing :/ */
a.cc: In function 'int main()': a.cc:57:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 57 | if(s[i]==',') s[i]=" "; | ^~~ | | | const char*
s888176576
p03834
C++
#include<bits/stdc++.h> using namespace std; signed main() { string s,a; cin>>s; for(int i=0;i<s.size();i++){ if(s[i]!=','){ a[i]=s[i]; }else{ a[i]=' '; } for(int i=0;i<s.size();i++){ cout<<a[i]; } cout<<"\n"; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s496002877
p03834
C++
#include<stdio.h> int main() { char s[19]; int i,count; gets(s); for(i=0;i<19;i++){ if(i==5||i==13){ printf(" "); i++; } printf("%c",s[i]); } }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s318498135
p03834
C++
#include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int i; char input[19]; gets(input); for(i=0;i<19;i++) { if(input[i]==','||input[i]=='.') { input[i]=' '; } } printf("%s\n",input); }
a.cc: In function 'int main()': a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(input); | ^~~~ | getw
s503921065
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin >> s; s.replace(5, 1, ' '); s.replace(13, 1, ' '); cout << s << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(int, int, char)' 9 | s.replace(5, 1, ' '); | ~~~~~~~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/string:54, 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.h:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (near match) 2275 | replace(size_type __pos, size_type __n1, const _CharT* __s) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2275:7: note: conversion of argument 3 would be ill-formed: a.cc:9:25: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 9 | s.replace(5, 1, ' '); | ^~~ | | | char /usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2413 | replace(const_iterator __i1, const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2522 | replace(size_type __pos, size_type __n, const _Tp& __svt) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2522:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /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 = std::__cxx11::basic_string<char>&]': /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 = char; _Res = std::__cxx11::basic_string<char>&; _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:2522:2: required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::replace(size_type, size_type, const _Tp&) [with _Tp = char]' 2522 | replace(size_type __pos, size_type __n, const _Tp& __svt) | ^~~~~~~ a.cc:9:11: required from here 9 | s.replace(5, 1, ' '); | ~~~~~~~~~^~~~~~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string<char>&>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2562:9: note: template argument deduction/substitution failed: a.cc:9:19: note: cannot convert '5' (type 'int') to type 'std::__cxx11::basic_string<char>::const_iterator' 9 | s.replace(5, 1, ' '); | ^ /usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2200 | replace(size_type __pos, size_type __n, const basic_string& __str) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2200:67: note: no known conversion for argument 3 from 'char' to 'const std::__cxx11::basic_string<char>&' 2200 | replace(size_type __pos, size_type __n, const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, 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]' 2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2249 | replace(size_type __pos, size_type __n1, const _CharT* __s, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2319 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2319:32: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::__const_iterator' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 2319 | replace(__const_iterator __i1, __const_iterator __i2, | ~~~~~~~~~~~~~~~~~^~~~ /usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 2340 | replace(__const_iterator __i1, __const_iterator __i2, | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 3 provided /usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2363 | replace(__const_iterator __i1, __const_iterator _
s390986592
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) == ','){ s.at(i) = " "; } } cout << s <<endl; }
a.cc: In function 'int main()': a.cc:9:17: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | s.at(i) = " "; | ^~~ | | | const char*
s655466959
p03834
C++
#include <bits/stdc++.h> using namespace std; using lint = long long; template<class T = int> using V = vector<T>; template<class T = int> using VV = V< V<T> >; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); char c; while (cin >> c) { cout << (c == ',' ? ' ' : c) } }
a.cc: In function 'int main()': a.cc:11:33: error: expected ';' before '}' token 11 | cout << (c == ',' ? ' ' : c) | ^ | ; 12 | } | ~
s924397268
p03834
C++
#include<iostream> using namespace std; int main() { string str; cin >> str; cout << str[0;4] << ' ' << str[6;12] << ' ' << str[14;] << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: expected ']' before ';' token 8 | cout << str[0;4] << ' ' << str[6;12] << ' ' << str[14;] << endl; | ^ | ] a.cc:8:18: error: expected ';' before ']' token 8 | cout << str[0;4] << ' ' << str[6;12] << ' ' << str[14;] << endl; | ^ | ; a.cc:8:38: error: expected ';' before ']' token 8 | cout << str[0;4] << ' ' << str[6;12] << ' ' << str[14;] << endl; | ^ | ; a.cc:8:57: error: expected primary-expression before ']' token 8 | cout << str[0;4] << ' ' << str[6;12] << ' ' << str[14;] << endl; | ^
s077175293
p03834
C++
#include<iostream> using namespace std; int main() { string str; cin >> str; cout << str[0:4] << ' ' << str[6:12] << ' ' << str[14:] << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: expected ']' before ':' token 8 | cout << str[0:4] << ' ' << str[6:12] << ' ' << str[14:] << endl; | ^ | ] a.cc:8:16: error: expected ';' before ':' token 8 | cout << str[0:4] << ' ' << str[6:12] << ' ' << str[14:] << endl; | ^ | ;
s331004437
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s.at(6)=' ' s.at(14)=' ' cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:14: error: expected ';' before 's' 6 | s.at(6)=' ' | ^ | ; 7 | s.at(14)=' ' | ~
s778074225
p03834
C++
#include <iostream> using namespace std; int main(){ int x,y,z; int K,S; int pattern=0; cin >> K >> S; for(x=0;x<=K;x++){ for(y=0;y<=K;y++){ z = S - x - z if(x+y+z == S) pattern++; } } cout << pattern << endl; }
a.cc: In function 'int main()': a.cc:14:22: error: expected ';' before 'if' 14 | z = S - x - z | ^ | ; 15 | if(x+y+z == S) | ~~
s352618717
p03834
C++
#include <iostream> using namespace std; int main(){ int x,y,z; int K,S; int pattern=0; cin >> K >> S; for(x=0;x<=K;x++){ for(y=0;y<=K;y++){ z = S - x - z; if(x+y+z == S) pattern++; } } } cout << pattern << endl; }
a.cc:21:3: error: 'cout' does not name a type 21 | cout << pattern << endl; | ^~~~ a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s368305424
p03834
C++
#include <iostream> using namespace std; int main(){ int x,y,z; int K,S; int pattern=0; cin >> K >> S; for(x=0;x<=K;x++){ for(y=0;y<=K;y++){ z = S - x - z if(x+y+z == S) pattern++; } } } cout << pattern << endl; }
a.cc: In function 'int main()': a.cc:14:22: error: expected ';' before 'if' 14 | z = S - x - z | ^ | ; 15 | if(x+y+z == S) | ~~ a.cc: At global scope: a.cc:21:3: error: 'cout' does not name a type 21 | cout << pattern << endl; | ^~~~ a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s450781364
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; for (int i : {5, 13}) { s[i] = " "; } cout << s; }
a.cc: In function 'int main()': 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 | s[i] = " "; | ^~~ | | | const char*
s604332410
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; for (int i : {5, 13}){ s[i]=" "; } cout << s; }
a.cc: In function 'int main()': a.cc:7:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s[i]=" "; | ^~~ | | | const char*
s495705607
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str str.at(5) = ' '; str.at(13) = ' '; cout << str << endl; }
a.cc: In function 'int main()': a.cc:6:13: error: expected ';' before 'str' 6 | cin >> str | ^ | ; 7 | 8 | str.at(5) = ' '; | ~~~
s983843015
p03834
C++
int main() { int k, s; std::cin >> k; std::cin >> s; int cnt = 0; for (int ix = 0; ix < k+1; ++ix) { const int sx = s - ix; if (sx > 2 * k) continue; // simple case if (k >= sx) { cnt += s - ix + 1; continue; } // off-diagonal for (int iy = 0; iy < k+1; ++iy) { const int z = s - ix - iy; if (z < 0) break; if (z <= k) ++cnt; } } std::cout << cnt << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:4:10: error: 'cin' is not a member of 'std' 4 | std::cin >> k; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | int main() a.cc:5:10: error: 'cin' is not a member of 'std' 5 | std::cin >> s; | ^~~ a.cc:5:10: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:29:10: error: 'cout' is not a member of 'std' 29 | std::cout << cnt << "\n"; | ^~~~ a.cc:29:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s754043002
p03834
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) int main(){ int S; cin >> S; rep(i, 19){ if(i != 6 && i != 14){ cout << S.at(i); } else { cout << " "; } } cout << endl; }
a.cc: In function 'int main()': a.cc:10:35: error: request for member 'at' in 'S', which is of non-class type 'int' 10 | cout << S.at(i); | ^~
s293393216
p03834
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) int main(){ int S; cin >> S; rep(i, 19){ if(i != 6 && i != 14){ cout << S.at(i); } else { cout << " "; } } cout << endl; }
a.cc: In function 'int main()': a.cc:10:35: error: request for member 'at' in 'S', which is of non-class type 'int' 10 | cout << S.at(i); | ^~