submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s482289970 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b;
vector<int> vec(0);
for (int i = 0; i < a; i++) {
for (int i = 0; i < b; i++) {
cin >> c;
vec.push_back(c);
}
}
for (int i = 0; i < b+1; i++) {
cout << "#" ;
}
cout << "#" << endl;
for (int i = 0; i < a; i++) {
cout << "#";
cout << vec ;
cout << "#"<< endl;
}
for (int i = 0; i < b+1; i++) {
cout << "#" << endl;
}
cout << "#" ;
} | a.cc: In function 'int main()':
a.cc:20:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
20 | cout << vec ;
| ~~~~ ^~ ~~~
| | |
| | std::vector<int>
| 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' to 'std::nullptr_t'
306 | operator<<(nullptr_t)
| ^~~ |
s594415049 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b;
vector<int> vec(0);
for (int i = 0; i < a; i++) {
for (int i = 0; i < b; i++) {
cin >> c;
vec.push_back(c);
}
}
for (int i = 0; i < b+1; i++) {
cout << "#" ;
}
cout << "#" << endl;
for (int i = 0; i < a; i++) {
| a.cc: In function 'int main()':
a.cc:18:32: error: expected '}' at end of input
18 | for (int i = 0; i < a; i++) {
| ~^
a.cc:18:32: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s475401858 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
string s(H) ;
for ( int i=0 ; i<H ; i++){
cin >> s(i) ;
}
for ( int i=0 ; i< W+2 ; i++ ) {
cout << '#' ;
}
cout << endl ;
for ( int i=0 ; i<H ; i++){
cout << '#' << s(i) << '#' << endl;
}
for ( int i=0 ; i< W+2 ; i++ ) {
cout << '#' ;
}
cout << endl ;
} | a.cc: In function 'int main()':
a.cc:7:13: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
7 | string s(H) ;
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:797:30: required from here
797 | template<typename _Tp, typename = _If_sv<_Tp, void>>
| ^~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
788 | basic_string(const _Tp& __t, size_type __pos, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed:
a.cc:7:12: note: cannot convert 'H' (type 'int') to type 'const char*'
7 | string s(H) ;
| ^
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>&&'
682 | basic_string(basic_string&& __str) noexcept
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&'
552 | basic_string(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char>&'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std:: |
s060614305 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
string s(H) ;
for ( int i=0 ; i<H ; i++){
cin >> s(i) ;
}
for ( int i=0 ; i< W+2 ; i++ ) {
cout << '#' ;
}
cout << endl ;
for ( int i=0 ; i<H ; i++){
cout << '#' << s(i) << '#' << endl;
}
for ( int i=0 ; i< W+2 ; i++ ) {
cout << '#' ;
}
cout << endl ;
} | a.cc: In function 'int main()':
a.cc:7:13: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
7 | string s(H) ;
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:797:30: required from here
797 | template<typename _Tp, typename = _If_sv<_Tp, void>>
| ^~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
788 | basic_string(const _Tp& __t, size_type __pos, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed:
a.cc:7:12: note: cannot convert 'H' (type 'int') to type 'const char*'
7 | string s(H) ;
| ^
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>&&'
682 | basic_string(basic_string&& __str) noexcept
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&'
552 | basic_string(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char>&'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std:: |
s971069769 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> a(H);
vector<string> b(H + 2);
for(int i = 0; i < H; i++){
cin >> a.at(i);
}
for(int i = 0; i < H + 2; i++){
for(int j = 0; j < W + 2; j++){
((b.at(i)).push_back('#');
}
}
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
(b.at(i + 1)).at(j + 1) = (a.at(i)).at(j);
}
}
for(int i = 0; i < H + 2; i++){
for(int j = 0; j < W; j++){
cout << (b.at(i)).at(j);
}
cout << endl;
}
/*for(int i = 0; i < H + 2; i++){
if(i == 0 || i == H + 1){
for(int j = 0; j < W + 2; j++){
cout << "#";
}
}else{
for(int j = 0; j < W + 2; j++){
if(j == 0 || j == W + 1){
cout << "#";
}else{
cout << (a.at(i - 1)).at(j - 1);
}
}
}
cout << endl;
}*/
}
/*
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
*/ | a.cc: In function 'int main()':
a.cc:14:38: error: expected ')' before ';' token
14 | ((b.at(i)).push_back('#');
| ~ ^
| )
|
s634777954 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
vector <string> A (H*W) ;
for (int i=0 ; i<H*W ; i++){
cin >> A.at(i) ;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int j=0; j<H*W ; j+=W){
cout << '#';
for( ; (j+1)%W=0 ; j++){
cout << A.at(j) ;
}
cout << '#' << endl;
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:18:19: error: lvalue required as left operand of assignment
18 | for( ; (j+1)%W=0 ; j++){
| ~~~~~^~
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s343493099 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
vector <string> A <H*W> ;
for (int i=0 ; i<H*W ; i++){
cin >> A.at(i) ;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int j=0; j<H*W ; j+=W){
cout << '#';
for( ; (j+1)%W=0 ; j++){
cout << A.at(j) ;
}
cout << '#' << endl;
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before '<' token
7 | vector <string> A <H*W> ;
| ^
a.cc:9:11: error: 'A' was not declared in this scope
9 | cin >> A.at(i) ;
| ^
a.cc:18:19: error: lvalue required as left operand of assignment
18 | for( ; (j+1)%W=0 ; j++){
| ~~~~~^~
a.cc:19:12: error: 'A' was not declared in this scope
19 | cout << A.at(j) ;
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s529302673 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
vector < string> A<H*W> ;
for (int i=0 ; i<H*W ; i++){
cin >> A.at(i) ;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int j=0; j<H*W ; j+=W){
cout << '#';
for( ; (j+1)%W=0 ; j++){
cout << A.at(j) ;
}
cout << '#' << endl;
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before '<' token
7 | vector < string> A<H*W> ;
| ^
a.cc:9:11: error: 'A' was not declared in this scope
9 | cin >> A.at(i) ;
| ^
a.cc:18:19: error: lvalue required as left operand of assignment
18 | for( ; (j+1)%W=0 ; j++){
| ~~~~~^~
a.cc:19:12: error: 'A' was not declared in this scope
19 | cout << A.at(j) ;
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s749721603 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
vector < string> A<H*W>
for (int i=0 ; i<H*W ; i++){
cin >> A.at(i) ;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int j=0; j<H*W ; j+=W){
cout << '#'
for( ; (j+1)%W=0 ; j++){
cout << A.at(j)
}
cout << '#' << endl;
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before '<' token
7 | vector < string> A<H*W>
| ^
a.cc:8:18: error: 'i' was not declared in this scope
8 | for (int i=0 ; i<H*W ; i++){
| ^
a.cc:17:18: error: expected ';' before 'for'
17 | cout << '#'
| ^
| ;
18 | for( ; (j+1)%W=0 ; j++){
| ~~~
a.cc:18:19: error: lvalue required as left operand of assignment
18 | for( ; (j+1)%W=0 ; j++){
| ~~~~~^~
a.cc:18:29: error: expected ';' before ')' token
18 | for( ; (j+1)%W=0 ; j++){
| ^
| ;
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s511749437 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
for (int i=0 ; i<H ; i++){
string l[i];
getline(cin, l[i]);
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int i=0 ; i<H ; i++){
cout << '#' << l[i] <<'#' <<endl;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:17:18: error: 'l' was not declared in this scope
17 | cout << '#' << l[i] <<'#' <<endl;
| ^
|
s720212460 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
string l[i];
for (int i=0 ; i<H ; i++){
getline(cin, l[i]);
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int i=0 ; i<H ; i++){
cout << '#' << l[i] <<'#' <<endl;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:12: error: 'i' was not declared in this scope
7 | string l[i];
| ^
a.cc:9:16: error: 'l' was not declared in this scope
9 | getline(cin, l[i]);
| ^
a.cc:17:18: error: 'l' was not declared in this scope
17 | cout << '#' << l[i] <<'#' <<endl;
| ^
|
s594539689 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W ;
for (int i=0 ; i<H ; i++){
string l[i];
getline(cin, l[i]);
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
for (int i=0 ; i<H ; i++){
cout << '#' << l[i] <<'#' <<endl;
}
for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:17:18: error: 'l' was not declared in this scope
17 | cout << '#' << l[i] <<'#' <<endl;
| ^
|
s570661092 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B;
cin >> A >> B;
vector<char> S(A*B);
for(int i=0; i<A*B; i++)
{
cin >> S.at(i);
}
int count=0;
for(int i=0; i<A+2; i++)
{
for(int j=0; j<B+2; j++)
{
if(!(i==0||i==A+1)&&!(j==0||j==B+1))
{
cout << S.at(count);
count++;
}
else
{
cout << "#";
}
if(j==B+1) cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
29 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s456073709 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> image(H);
for (int w = 0; w < W + 2; w++) {
cout << '#';
}
cout << endl;
for (int h = 0; h < H; h++;) {
for (int i = 0; i < 3; i++) {
if (i == 0) {
cout << '#';
} else if (i == 1) {
string pixels;
cin >> pixels;
cout << pixels;
} else {
cout << '#' << endl;
}
}
}
for (int w = 0; w < W + 2; w++) {
cout << '#';
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:15:29: error: expected ')' before ';' token
15 | for (int h = 0; h < H; h++;) {
| ~ ^
| )
a.cc:15:30: error: expected primary-expression before ')' token
15 | for (int h = 0; h < H; h++;) {
| ^
|
s503863177 | p03712 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int h, w;
cin >> h >> w;
string S[100];
for(int i = 0; i < h; i ++){
cin >> S[i];
}
for(int i = 0; i < w + 2; i ++){
cout >> "#";
} cout << endl;
for(int i = 0; i < h; i ++){
cout << "#" << S[i] << "#" << endl;
}
for(int i = 0; i < w + 2; i ++){
cout >> "#";
} cout << endl;
} | a.cc: In function 'int main()':
a.cc:14:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
14 | cout >> "#";
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "#";
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | cout >> "#";
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "#";
| ^~~
/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:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "#";
| ^~~
/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:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "#";
| ^~~
/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:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "#";
| ^~~
/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:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "#";
| ^~~
/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:14:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "#";
| ^~~
/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 = const char (&)[2]]':
a.cc:14:17: required from here
14 | cout >> "#";
| ^~~
/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)
| ^~~~~~~~
a.cc:22:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
22 | cout >> "#";
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
/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:22:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
22 | cout >> "#";
| ^~~
/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:22:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
22 | cout >> "#";
| ^~~~
/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:22:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
22 | cout >> "#";
| ^~~
/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:22:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
22 | cout >> "#";
| ^~~
/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:22:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
22 | cout >> "#";
| ^~~
/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:22:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
22 | cout >> "#";
| ^~~
/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:22:17: |
s733910236 | p03712 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int H,W;
cin>>H>>W;
char a[H+2][W+2];
for(int i=0;i<=H;i++){
for(int j=0;j<=W;j++){
cin>>a[i][j];
}
}
string x[i-1];
for(int z = 1; z < H; z++){
cin >> x[z];
}
for(int z = 0; z < H; z++){
cout << x[z] << endl;
}
char y;
y='#';
for(b=0;b<i;b++){
cout<<y[i];
}
for(c=0;c<j;c++){
cout<<y[j];
}
}
| a.cc: In function 'int main()':
a.cc:13:14: error: 'i' was not declared in this scope
13 | string x[i-1];
| ^
a.cc:16:16: error: 'x' was not declared in this scope
16 | cin >> x[z];
| ^
a.cc:20:17: error: 'x' was not declared in this scope
20 | cout << x[z] << endl;
| ^
a.cc:24:9: error: 'b' was not declared in this scope
24 | for(b=0;b<i;b++){
| ^
a.cc:27:9: error: 'c' was not declared in this scope
27 | for(c=0;c<j;c++){
| ^
a.cc:27:15: error: 'j' was not declared in this scope
27 | for(c=0;c<j;c++){
| ^
|
s899693158 | p03712 | C++ | string a[2];
for(int i = 0; i < 2; i++){
cin >> a[i];
}
for(int i = 0; i < 2; i++){
cout << a[i] << endl;
} | a.cc:1:2: error: 'string' does not name a type
1 | string a[2];
| ^~~~~~
a.cc:3:5: error: expected unqualified-id before 'for'
3 | for(int i = 0; i < 2; i++){
| ^~~
a.cc:3:20: error: 'i' does not name a type
3 | for(int i = 0; i < 2; i++){
| ^
a.cc:3:27: error: 'i' does not name a type
3 | for(int i = 0; i < 2; i++){
| ^
a.cc:7:5: error: expected unqualified-id before 'for'
7 | for(int i = 0; i < 2; i++){
| ^~~
a.cc:7:20: error: 'i' does not name a type
7 | for(int i = 0; i < 2; i++){
| ^
a.cc:7:27: error: 'i' does not name a type
7 | for(int i = 0; i < 2; i++){
| ^
|
s109749657 | p03712 | C++ | char a[100][101], b[102][102];
int main() {
int H, W; cin >> H >> W;
for (int i = 0; i < H; i++)
scanf("%s", a[i]);
for (int i = 0; i < H + 2; i++)
for (int j = 0; j < W + 2; j++)
b[i][j] = ’#’;
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
b[i + 1][j + 1] = a[i][j];
for (int i = 0; i < H + 2; i++) {
for (int j = 0; j < W + 2; j++)
cout << b[i][j];
cout << endl;
}
} | a.cc:8:11: error: extended character ’ is not valid in an identifier
8 | b[i][j] = ’#’;
| ^
a.cc:8:12: error: stray '#' in program
8 | b[i][j] = ’#’;
| ^
a.cc:8:13: error: extended character ’ is not valid in an identifier
8 | b[i][j] = ’#’;
| ^
a.cc: In function 'int main()':
a.cc:3:11: error: 'cin' was not declared in this scope
3 | int H, W; cin >> H >> W;
| ^~~
a.cc:5:1: error: 'scanf' was not declared in this scope
5 | scanf("%s", a[i]);
| ^~~~~
a.cc:8:11: error: '\U00002019' was not declared in this scope
8 | b[i][j] = ’#’;
| ^
a.cc:14:1: error: 'cout' was not declared in this scope
14 | cout << b[i][j];
| ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope
15 | cout << endl;
| ^~~~
a.cc:15:9: error: 'endl' was not declared in this scope
15 | cout << endl;
| ^~~~
|
s592549379 | p03712 | C++ | char a[100][101], b[102][102];
int main() {
int H, W; cin >> H >> W;
for (int i = 0; i < H; i++)
scanf("%s", a[i]);
1
for (int i = 0; i < H + 2; i++)
for (int j = 0; j < W + 2; j++)
b[i][j] = ’#’;
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
b[i + 1][j + 1] = a[i][j];
for (int i = 0; i < H + 2; i++) {
for (int j = 0; j < W + 2; j++)
cout << b[i][j];
cout << endl;
}
} | a.cc:9:11: error: extended character ’ is not valid in an identifier
9 | b[i][j] = ’#’;
| ^
a.cc:9:12: error: stray '#' in program
9 | b[i][j] = ’#’;
| ^
a.cc:9:13: error: extended character ’ is not valid in an identifier
9 | b[i][j] = ’#’;
| ^
a.cc: In function 'int main()':
a.cc:3:11: error: 'cin' was not declared in this scope
3 | int H, W; cin >> H >> W;
| ^~~
a.cc:5:1: error: 'scanf' was not declared in this scope
5 | scanf("%s", a[i]);
| ^~~~~
a.cc:6:2: error: expected ';' before 'for'
6 | 1
| ^
| ;
7 | for (int i = 0; i < H + 2; i++)
| ~~~
a.cc:7:17: error: 'i' was not declared in this scope
7 | for (int i = 0; i < H + 2; i++)
| ^
a.cc:8:17: error: 'j' was not declared in this scope
8 | for (int j = 0; j < W + 2; j++)
| ^
a.cc:15:1: error: 'cout' was not declared in this scope
15 | cout << b[i][j];
| ^~~~
a.cc:16:1: error: 'cout' was not declared in this scope
16 | cout << endl;
| ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope
16 | cout << endl;
| ^~~~
|
s025371618 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector<string> vec(H);
for(int i=0;i<H;i++){
cin>>vec.at(i)
}
for(int i=0;i<W+2;i++){
cout<<"#";
}
cout<<endl;
for(int i=0;i<H;i++){
cout<<"#"<<vec.at(i)<<"#"<<endl;
}
for(int i=0;i<W+2;i++){
cout<<"#";
}
} | a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before '}' token
9 | cin>>vec.at(i)
| ^
| ;
10 | }
| ~
|
s592274003 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
int i,j;
// 変数aで入力を受け取る
cout << endl;
cin >> a >> b;
for(i=0;i<b+2;i++){
cout << "#";
}
vector <char> vec(b);
for(j=0;j<a;j++){
for (i=0;i<b;i++){
cin >> vec.at(i);
}
cout<<"#";
for(i=0;i<b;i++){
cout << vec.at(i)
}
cout<< "#"<< endl;
}
for(i=0;i<b+2;i++){
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:24:20: error: expected ';' before '}' token
24 | cout << vec.at(i)
| ^
| ;
25 | }
| ~
|
s675949580 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
int i,j;
// 変数aで入力を受け取る
cout << endl;
cin >> a >> b;
for(i=0;i<b+2;i++){
cout << "#";
}
vector <char> vec(b);
for(j=0;j<a;j++){
for (i=0;i<b;i++){
cin >> vec.at(i);
}
cout<<"#"
for(i=0;i<b;i++){
cout << vec.at(i)
}
cout<< "#"<< endl;
}
for(i=0;i<b+2;i++){
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:22:12: error: expected ';' before 'for'
22 | cout<<"#"
| ^
| ;
23 | for(i=0;i<b;i++){
| ~~~
a.cc:23:18: error: expected ';' before ')' token
23 | for(i=0;i<b;i++){
| ^
| ;
|
s362629721 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
int i,j;
// 変数aで入力を受け取る
for(i=0;i<b;i++){
cout << "#";
}
cout << endl;
cin >> a >> b;
vector <char> vec(b);
for(j=0;j<a;j++){
for (i=0;i<b;i++){
cin >> vec.at(i);
}
cout<< "#" << vec << "#"<< endl;
}
for(i=0;i<b;i++){
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:21:14: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<char>')
21 | cout<< "#" << vec << "#"<< endl;
| ~~~~~~~~~~ ^~ ~~~
| | |
| | std::vector<char>
| 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)
| |
s048243929 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
// 変数aで入力を受け取る
for(i=0;i<b;i++){
cout << "#";
}
cout << endl;
cin >> a >> b;
vector <char> vec(b);
for(j=0;j<a;j++){
for (i=0;i<b;i++){
cin >> vec.at(i);
}
cout<< "#" << vec << "#"<< endl;
}
for(i=0;i<b;i++){
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
11 | for(i=0;i<b;i++){
| ^
a.cc:17:7: error: 'j' was not declared in this scope
17 | for(j=0;j<a;j++){
| ^
a.cc:18:8: error: 'i' was not declared in this scope
18 | for (i=0;i<b;i++){
| ^
a.cc:21:14: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<char>')
21 | cout<< "#" << vec << "#"<< endl;
| ~~~~~~~~~~ ^~ ~~~
| | |
| | std::vector<char>
| 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 = |
s709676904 | p03712 | C | #include <stdio.h>
#include <string.h>
int main(void) {
int h, w;
scanf("%d %d", &h, &w);
char s[101];
char a[h][101];
for (int i = 0; i < h; i++) {
scanf("%s", s);
strcpy(arr[i], s);
}
for (int i = 0; i < w + 2; i++) {
printf("%c", '#');
}
printf("\n");
for (int j = 0; j < h; j++) {
printf("#%s#\n", arr[j]);
}
for (int i = 0; i < w + 2; i++) {
printf("%c", '#');
}
return 0;
}
| main.c: In function 'main':
main.c:13:16: error: 'arr' undeclared (first use in this function)
13 | strcpy(arr[i], s);
| ^~~
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
|
s426836400 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int H, W;
cin >> H >> W;
vector<string> vec;
for(int i = 0; i < W; i++) cout << "#";
cout << endl;
for(int i = 0; i < H; i++){
cin >> vec;
cout << vec.at(i); << endl;
}
for(int i = 0; i < W; i++) cout << "#";
cout << endl;
} | a.cc: In function 'int main()':
a.cc:12:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
12 | cin >> vec;
| ~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool&'
170 | operator>>(bool& __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>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/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>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/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>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/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>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/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>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/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>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/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>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/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>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __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::vector<std::__cxx11::basic_string<char> >' 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::vector<std::__cxx11::basic_string<char> >' 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::vector<std::__cxx11::basic_string<char> >' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/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>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/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::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream |
s893979718 | p03712 | C++ | #include<bits/stdc++.h>
#define ll long long
#define dl long double
#define pb push_back
#define F first
#define S second
#define endl "\n"
#define rep(i,a,b) for(i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define mod 1000000007LL
#define CIN(V,s,n) for(int i=s;i<n;i++){cin >> V[i];}
#define COUT(V,s,n) {for(int i=s;i<n;i++){cout << V[i] << " " ;} cout << endl;}
#define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define CLEAR(V); for(ll i=0;i<V.size();i++) V[i] = 0;
#define N 101LL
#define tmod 998244353LL
using namespace std;
bool sBs(const pair<int,int> &a,const pair<int,int> &b)
{ return (a.second < b.second); }
ll Powb(ll b,ll n,ll m);
ll BS(vector<pair< ll ,ll > > &PS,ll s,ll e,ll ser);
ll MI(ll a, ll m);
ll P[N+1];
void Sieve(int n=N);
int main()
{
fast;
ll q=1,t;
//cin >> q; t = q;
while(q--)
{
ll i,j,n,m,k,l=0,r=0,a=1,b=0,c=0,d=0,e,g=1,p,u,v,w,x,y,flag=1;
//n=m=k=i=j=l=r=a=b=c=d=u=v=w=p=x=y=0;
cin >> n >> m;
vector<vector<char> > A(n+2,vector<char>(m+2,'#'));
for(i=1;i<=n;i++)
for(j=1;j<=m;j++) cin >> A[i][j];
}
for(i=0;i<=n+1;i++)
{
for(j=0;j<=m+1;j++)
cout << A[i][j];
cout << endl;
}
return 0;
}
//*****************************************************************************************************************************************
ll Powb(ll b,ll n,ll m)
{
if(n==0) return 1LL;
if(n==1) return b;
ll temp = Powb(b,n/2,m);
if(n%2==0){return (temp*temp)%m;}
else{return (b*((temp*temp)%m))%m;}
}
ll BS(vector<pair<ll,ll> > &PS,ll s,ll e,ll ser)
{
if(s>e)
return s;
ll mid = (s+e)/2;
if(PS[mid].F==ser)
{
return mid;
}
else if(PS[mid].F > ser)
{
return BS(PS,s,mid-1,ser);
}
else
return BS(PS,mid+1,e,ser);
}
ll MI(ll a, ll m)
{
ll m0 = m;
ll y = 0, x = 1;
if (m == 1)
return 0;
while (a > 1)
{
ll q = a / m;
ll t = m;
m = a % m, a = t;
t = y;
y = x - q * y;
x = t;
}
if (x < 0)
x += m0;
return x;
}
void Sieve(int n)
{
//memset(P,true,sizeof(P));
//P[0] = false;
//P[1]= false;
for(int i=1;i<=n;i++) P[i] = i;
for(ll i=2;i*i<=n;i++)
{
if(P[i]==i)
{
for(ll j=i*i;j<=n;j+=i)
{
if(P[j]==j)
P[j]=i;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:43:9: error: 'i' was not declared in this scope
43 | for(i=0;i<=n+1;i++)
| ^
a.cc:43:16: error: 'n' was not declared in this scope
43 | for(i=0;i<=n+1;i++)
| ^
a.cc:45:13: error: 'j' was not declared in this scope
45 | for(j=0;j<=m+1;j++)
| ^
a.cc:45:20: error: 'm' was not declared in this scope
45 | for(j=0;j<=m+1;j++)
| ^
a.cc:46:21: error: 'A' was not declared in this scope
46 | cout << A[i][j];
| ^
|
s800774754 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int W,H;
cin >> W >> H;
vector<vector<char>> p();
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
cin >> p.at(i).at(j);
}
}
//cout << p << endl;
} | a.cc: In function 'int main()':
a.cc:9:25: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
9 | vector<vector<char>> p();
| ^~
a.cc:12:16: error: request for member 'at' in 'p', which is of non-class type 'std::vector<std::vector<char> >()'
12 | cin >> p.at(i).at(j);
| ^~
|
s361767317 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int W,H;
cin >> W >> H;
vector<vector<int> p();
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
cin >> p.at(i)(j);
}
} | a.cc: In function 'int main()':
a.cc:9:24: error: template argument 1 is invalid
9 | vector<vector<int> p();
| ^
a.cc:9:24: error: template argument 2 is invalid
a.cc:12:14: error: 'p' was not declared in this scope
12 | cin >> p.at(i)(j);
| ^
a.cc:14:4: error: expected '}' at end of input
14 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s977247815 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W,;
cin >> H >> W ;
vector<string> picture(H);
for(int i=0; i<H; i++){
cin >> picture.at(i);
}
for(int i=0; i<W+2; i++){
cout<<"#";
}
cout<<endl;
for(int i=0; i<H; i++){
cout<<"#"<<picture.at(i)<<"#"<<endl;
}
for(int i=0; i<W+2; i++){
cout<<"#";
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:5:12: error: expected unqualified-id before ';' token
5 | int H, W,;
| ^
|
s844112818 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
for(int i=0;i<a;i++){
vector<string> x(b);
cout << "###" << endl;
cout << "#" << x << "#" << endl;
cout << "###" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:12:16: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<std::__cxx11::basic_string<char> >')
12 | cout << "#" << x << "#" << endl;
| ~~~~~~~~~~~~ ^~ ~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<char> >' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/inclu |
s386027570 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
for(int i=0;i<a;i++){
vector<char> x(b);
cout << "###" << endl;
cout << "#" << x << "#" << endl;
cout << "###" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:12:16: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<char>')
12 | cout << "#" << x << "#" << endl;
| ~~~~~~~~~~~~ ^~ ~
| | |
| | std::vector<char>
| 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)
| |
s957598884 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
for(int i=0;i<a;i++){
vector<int> x(b);
cout << "###" << endl;
cout << "#" << x << "#" << endl;
cout << "###" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:12:16: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<int>')
12 | cout << "#" << x << "#" << endl;
| ~~~~~~~~~~~~ ^~ ~
| | |
| | std::vector<int>
| 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' 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<int>' to 'std::nullptr_t'
306 | operator<<(nullptr_t)
| ^~~~~ |
s590535175 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
for(int i=0;i<a;i++){
vector<int> x(b);
}
cout << "###" << endl;
cout << "#" << x << "#" << endl;
cout << "###" << endl;
}
| a.cc: In function 'int main()':
a.cc:13:19: error: 'x' was not declared in this scope
13 | cout << "#" << x << "#" << endl;
| ^
|
s902322550 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
for(int i=0;i<a;i++){
vector<int> x(b);
}
cout << ### << endl;
#x# << endl;
### << endl;
}
| a.cc:12:12: error: stray '##' in program
12 | cout << ### << endl;
| ^~
a.cc:12:14: error: stray '#' in program
12 | cout << ### << endl;
| ^
a.cc:13:13: error: invalid preprocessing directive #x
13 | #x# << endl;
| ^
a.cc:14:12: error: stray '##' in program
14 | ### << endl;
| ^~
a.cc:14:14: error: stray '#' in program
14 | ### << endl;
| ^
a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression before '<<' token
12 | cout << ### << endl;
| ^~
a.cc:14:17: error: expected primary-expression before '<<' token
14 | ### << endl;
| ^~
|
s357025606 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
for(int i=0;i<a;i++){
vector<int> x(b);
}
cout << ###
#x#
### << endl;
} | a.cc:12:12: error: stray '##' in program
12 | cout << ###
| ^~
a.cc:12:14: error: stray '#' in program
12 | cout << ###
| ^
a.cc:13:13: error: invalid preprocessing directive #x
13 | #x#
| ^
a.cc:14:12: error: stray '##' in program
14 | ### << endl;
| ^~
a.cc:14:14: error: stray '#' in program
14 | ### << endl;
| ^
a.cc: In function 'int main()':
a.cc:14:17: error: expected primary-expression before '<<' token
14 | ### << endl;
| ^~
|
s937128882 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin >> h >> w;
vector<string> line(h);
for(int i = 0; i < h; i++){
cin >> line.at(i);
}
for(int i = 0; i < w+2; i++){
cout << #;
}
cout << endl;
for(int i = 0; i < h; i++){
cout << "#" + line.at(i) + "#";
}
cout << endl;
for(int i = 0; i < w+2; i++){
cout << #;
}
} | a.cc:12:13: error: stray '#' in program
12 | cout << #;
| ^
a.cc:20:13: error: stray '#' in program
20 | cout << #;
| ^
a.cc: In function 'int main()':
a.cc:12:14: error: expected primary-expression before ';' token
12 | cout << #;
| ^
a.cc:20:14: error: expected primary-expression before ';' token
20 | cout << #;
| ^
|
s859958771 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char a[100][101], b[102][102];
int main() {
int H, W; cin >> H >> W;
for (int i = 0; i < H; i++) scanf("%s", a[i]);
for (int i = 0; i < H + 2; i++)
for (int j = 0; j < W + 2; j++)
b[i][j] = ’#’;
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
b[i + 1][j + 1]
for (int i = 0; i < H + 2; i++) for (int j = 0; j < W +
cout << b[i][j]; cout << endl;
} | a.cc:11:11: error: extended character ’ is not valid in an identifier
11 | b[i][j] = ’#’;
| ^
a.cc:11:12: error: stray '#' in program
11 | b[i][j] = ’#’;
| ^
a.cc:11:13: error: extended character ’ is not valid in an identifier
11 | b[i][j] = ’#’;
| ^
a.cc: In function 'int main()':
a.cc:6:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
6 | int main() {
| ^~
a.cc:6:9: note: remove parentheses to default-initialize a variable
6 | int main() {
| ^~
| --
a.cc:6:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:6:12: error: a function-definition is not allowed here before '{' token
6 | int main() {
| ^
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s355489093 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
int a[i][j],b[i][j];
for(int i=0;i<H;i++)
for(int j=0;j<W;j++) cin >> a[i][j];
for(int i=0;i<H+2;i++)
for(int j=0;j<W+2;j++) b[i][j] = '#';
for(int i=0;j<H;i++)
for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++)
cout << b[i][j];
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
8 | int a[i][j],b[i][j];
| ^
a.cc:8:12: error: 'j' was not declared in this scope
8 | int a[i][j],b[i][j];
| ^
a.cc:11:33: error: 'a' was not declared in this scope
11 | for(int j=0;j<W;j++) cin >> a[i][j];
| ^
a.cc:14:28: error: 'b' was not declared in this scope
14 | for(int j=0;j<W+2;j++) b[i][j] = '#';
| ^
a.cc:17:26: error: 'b' was not declared in this scope
17 | for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
| ^
a.cc:17:40: error: 'a' was not declared in this scope
17 | for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
| ^
a.cc:22:15: error: 'b' was not declared in this scope
22 | cout << b[i][j];
| ^
|
s180466715 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
for(int i=0;i<H;i++)
for(int j=0;j<W;j++) cin >> a[i][j];
for(int i=0;i<H+2;i++)
for(int j=0;j<W+2;j++) b[i][j] = '#';
for(int i=0;j<H;i++)
for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++)
cout << b[i][j];
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:33: error: 'a' was not declared in this scope
9 | for(int j=0;j<W;j++) cin >> a[i][j];
| ^
a.cc:12:28: error: 'b' was not declared in this scope
12 | for(int j=0;j<W+2;j++) b[i][j] = '#';
| ^
a.cc:14:15: error: 'j' was not declared in this scope
14 | for(int i=0;j<H;i++)
| ^
a.cc:15:26: error: 'b' was not declared in this scope
15 | for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
| ^
a.cc:15:40: error: 'a' was not declared in this scope
15 | for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
| ^
a.cc:20:15: error: 'b' was not declared in this scope
20 | cout << b[i][j];
| ^
|
s983008502 | p03712 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int h, w;
int string a, b;
cin >> h >> w >> a >> b;
rep(i, w + 2)
cout << "#";
cout << endl << "#" << a << "#" << endl << "#" << b << "#" << endl;
rep(i, w + 2)
cout << "#";
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:14: error: expected initializer before 'a'
7 | int string a, b;
| ^
a.cc:9:20: error: 'a' was not declared in this scope
9 | cin >> h >> w >> a >> b;
| ^
a.cc:9:25: error: 'b' was not declared in this scope
9 | cin >> h >> w >> a >> b;
| ^
|
s545752021 | p03712 | C++ | v#include <bits/stdc++.h>
using namespace std;
int main() {
//
int H, W;
cin >> H >> W;
for(int i=0; i<W+2; i++)
cout << "#";
cout << endl;
for(int i=0; i<H; i++){
cout << "#";
vector<char> pic(W);
for(int i=0; i<W; i++){
cin >> pic. at(i);
cout << pic. at(i);
}
cout << "#" << endl;
}
for(int i=0; i<W+2; i++)
cout << "#";
cout << endl;
} | a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >> H >> W;
| ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
9 | cout << "#";
| ^~~~
a.cc:10:3: error: 'cout' was not declared in this scope
10 | cout << endl;
| ^~~~
a.cc:10:11: error: 'endl' was not declared in this scope
10 | cout << endl;
| ^~~~
a.cc:14:5: error: 'vector' was not declared in this scope
14 | vector<char> pic(W);
| ^~~~~~
a.cc:14:12: error: expected primary-expression before 'char'
14 | vector<char> pic(W);
| ^~~~
a.cc:16:14: error: 'pic' was not declared in this scope
16 | cin >> pic. at(i);
| ^~~
|
s637787246 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<char> v;
cin >> H >> W;
for(int i=0;i < W+2;i++)
cout << '#';
cout << endl;
for(int i=0;i < H;i++){
for(int j=0;j < W;j++){
cin >> v.at(j);
}
cout << '#' << v << '#' << endl;
}
for(int i=0;i < W+2;i++)
cout << '#';
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:17:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<char>')
17 | cout << '#' << v << '#' << endl;
| ~~~~~~~~~~~ ^~ ~
| | |
| | std::vector<char>
| 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)
|
s115363149 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int i, j;
int h, w;
cin >> h >> w;
vector<vector<char>> a(h, vector<char>(w));
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
cin >> a[i][j];
}
}
vector<vector<char>> b(h + 2, vector<char>(w + 2, '#');
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
b[i + 1][j + 1] = a[i][j];
}
}
for (i = 0; i < h + 2; i++) {
for (j = 0; j < w + 2; j++) {
cout << b[i][j];
}
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:17:59: error: expected ')' before ';' token
17 | vector<vector<char>> b(h + 2, vector<char>(w + 2, '#');
| ~ ^
| )
|
s873632947 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int i, j;
int h, w;
cin >> h >> w;
vector<vector<char>> a(h, vector<char>(w));
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
cin >> a[i][j];
}
}
vector<vector<char>> b(h + 2, vector<char>(w + 2), '#');
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
b[i + 1][j + 1] = a[i][j];
}
}
for (i = 0; i < h + 2; i++) {
for (j = 0; j < w + 2; j++) {
cout << b[i][j];
}
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:17:59: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int, std::vector<char>, char)'
17 | vector<vector<char>> b(h + 2, vector<char>(w + 2), '#');
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:17:59: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<char>')
17 | vector<vector<char>> b(h + 2, vector<char>(w + 2), '#');
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate expects 2 arguments, 3 provided
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 3 provided
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >&&'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >&&'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 3 provided
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 3 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 3 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; value_type = std::vector<char>; allocator_type = std::allocator<std::vector<char> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:570:36: note: no known conversion for argument 3 from 'char' to 'const std::vector<std::vector<char> >::allocator_type&' {aka 'const std::allocator<std::vector<char> >&'}
570 | const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<char> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate expects 2 arguments, 3 provided
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 3 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 3 provided
|
s798499281 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
string s(w + 2, '#'); cout << s << endl;
for (int i = 0; i < h; i++) {
s = "";
for (int j = 0; j < w; j++) cin >> s;
cout << '#' << s << '#' << endl;
}
string s(w + 2, '#'); cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:16:10: error: redeclaration of 'std::string s'
16 | string s(w + 2, '#'); cout << s << endl;
| ^
a.cc:8:10: note: 'std::string s' previously declared here
8 | string s(w + 2, '#'); cout << s << endl;
| ^
|
s258053693 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
string s;
s = s(w + 2, '#'); cout << s << endl;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
s = "";
cin >> s;
cout << '#' << s << '#' << endl;
}
}
s = s(w + 2, '#'); cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:9:8: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int, char)'
9 | s = s(w + 2, '#'); cout << s << endl;
| ~^~~~~~~~~~~~
a.cc:19:8: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int, char)'
19 | s = s(w + 2, '#'); cout << s << endl;
| ~^~~~~~~~~~~~
|
s138517080 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
vector<string> i_str;
string top_last_str = str(w, '#');
i_str.at(0) = top_last_str;
for (int i = 0; i < h; ++i){
string temp;
cin >> temp;
temp = "#" + temp + "#";
i_str.at(i+1) = temp;
}
i_str.at(h + 1) = top_last_str;
}
| a.cc: In function 'int main()':
a.cc:8:25: error: 'str' was not declared in this scope; did you mean 'std'?
8 | string top_last_str = str(w, '#');
| ^~~
| std
|
s997039204 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
vector<string> i_str;
top_last_str = str(w, '#');
i_str.at(0) = top_last_str;
for (int i = 0; i < h; ++i){
string temp;
cin >> temp;
temp = "#" + temp + "#";
i_str.at(i+1) = temp;
}
i_str.at(h + 1) = top_last_str;
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'top_last_str' was not declared in this scope
8 | top_last_str = str(w, '#');
| ^~~~~~~~~~~~
a.cc:8:18: error: 'str' was not declared in this scope; did you mean 'std'?
8 | top_last_str = str(w, '#');
| ^~~
| std
|
s034902557 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
for(int i=0;i<H;i++){
cout << "#":
for(int j=0;j<W;j++){
vector<int> a(i);
cin >> a.at(i);
cout << a.at(i);
}
cout << "#" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before ':' token
8 | cout << "#":
| ^
| ;
a.cc:9:17: error: 'j' was not declared in this scope
9 | for(int j=0;j<W;j++){
| ^
|
s809964040 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i=0; i < W+2; i++){
cout << "#" ;
}
cout << endl;
for(int j=o; j<H; j++){
cout << "#";
string S;
cin >> S;
cout << S << "#" <<endl;
}
for (int i=0; i < W+2; i++){
cout << "#" ;
}
} | a.cc: In function 'int main()':
a.cc:14:12: error: 'o' was not declared in this scope
14 | for(int j=o; j<H; j++){
| ^
|
s924865737 | p03712 | C++ | //vector<型> 配列名(要素数, 初期値);
//vector<int> data(3); // vectorによる配列
//int data[3]; // Cの配列
//array<int, 3> data; // arrayによる配列
//cout << vec.at(0) << endl;
//cout << vec[0] << endl; // .at(0)と同じ
//vec.pop_back(); // 末尾の要素を削除
//範囲for文
//for (配列の要素の型 変数名 : 配列変数) {
// 各要素に対する処理
//}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int H,W;
cin>>H>>W;
vector<char> a[100][101];
vector<char> b[102][102];
for (int i= 0; i < H; i++) {
scanf("%s",a[i]);
for(int i=0;i<H+2;i++){
for (int j = 0; j < W+2; j++) {
b[i][j]='#';
}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
b[i+1][j+1]=a[i][j];
}
}
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
cout<<b[i][j]<<endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:35:17: error: no match for 'operator=' (operand types are 'std::vector<char>' and 'char')
35 | b[i][j]='#';
| ^~~
In file included from /usr/include/c++/14/vector:72,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:18:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'char' to 'const std::vector<char>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'char' to 'std::vector<char>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'char' to 'std::initializer_list<char>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:48:13: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
48 | cout<<b[i][j]<<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:
/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, _Tr |
s318444172 | p03712 | C++ | //vector<型> 配列名(要素数, 初期値);
//vector<int> data(3); // vectorによる配列
//int data[3]; // Cの配列
//array<int, 3> data; // arrayによる配列
//cout << vec.at(0) << endl;
//cout << vec[0] << endl; // .at(0)と同じ
//vec.pop_back(); // 末尾の要素を削除
//範囲for文
//for (配列の要素の型 変数名 : 配列変数) {
// 各要素に対する処理
//}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int H,W;
cin>>H>>W;
vector<char> a[100][101];
vector<char> b[102][102];
for (int i= 0; i < H; i++) {
cin>>a[i];
for(int i=0;i<H+2;i++){
for (int j = 0; j < W+2; j++) {
b[i][j]='#';
}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
b[i+1][j+1]=a[i][j];
}
}
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
cout<<b[i][j]<<endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:30:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char> [101]')
30 | cin>>a[i];
| ~~~^~~~~~
| | |
| | std::vector<char> [101]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:18:
/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:30:13: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::vector<char>*'
30 | cin>>a[i];
| ~~~^
/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:30:13: error: invalid conversion from 'std::vector<char>*' to 'short int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(short int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'short unsigned int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(short unsigned int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'unsigned int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(unsigned int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'long int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(long int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'long unsigned int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(long unsigned int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'long long int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(long long int)((std::vector<char>*)(& a[i]))' 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:30:13: error: invalid conversion from 'std::vector<char>*' to 'long long unsigned int' [-fpermissive]
30 | cin>>a[i];
| ~~~^
| |
| std::vector<char>*
a.cc:30:13: error: cannot bind rvalue '(long long unsigned int)((std::vector<char>*)(& a[i]))' 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:30:13: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
30 | cin>>a[i];
| ~~~^
/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::vector<char> [101]' 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::vector<char> [101]' 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::vector<char> [101]' 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::vector<char> [101]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_i |
s180538023 | p03712 | C++ | //vector<型> 配列名(要素数, 初期値);
//vector<int> data(3); // vectorによる配列
//int data[3]; // Cの配列
//array<int, 3> data; // arrayによる配列
//cout << vec.at(0) << endl;
//cout << vec[0] << endl; // .at(0)と同じ
//vec.pop_back(); // 末尾の要素を削除
#include <bits/stdc++.h>
using namespace std;
int main()
{
int H,W;
cin>>H>>W;
vector<char> a;
vector<char> b;
for (int i= 0; i < H; i++) {
cin>>a[i];
for(int i=0;i<H+2;i++){
for (int j = 0; j < W+2; j++) {
b[i][j]='#';
}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
b[i+1][j+1]=a[i][j];
}
}
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
cout<<b[i][j]<<endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:30:13: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
30 | b[i][j]='#';
| ^
a.cc:36:15: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
36 | b[i+1][j+1]=a[i][j];
| ^
a.cc:36:25: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
36 | b[i+1][j+1]=a[i][j];
| ^
a.cc:43:19: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
43 | cout<<b[i][j]<<endl;
| ^
a.cc:49:2: error: expected '}' at end of input
49 | }
| ^
a.cc:17:1: note: to match this '{'
17 | {
| ^
|
s839359828 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<string> ans_vec(N+2);
for (int i=0;i<M;i++){
ans_vec.at(0) += '#';
ans_vec.at(N+1) += '#';
}
ans_vec[]
for(int i = 0;i<N;i++){
cin >> ans_vec.at(i+1);
ans_vec.at(i+1) = '#' + ans_vec.at(i+1) +'#';
}
for (int i = 0; i < ans_vec.size(); i ++){
cout << ans_vec.at(i) << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before ']' token
12 | ans_vec[]
| ^
a.cc:13:17: error: 'i' was not declared in this scope
13 | for(int i = 0;i<N;i++){
| ^
|
s195471218 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H ,N;
cin >> H >> N;
vector<int> pic(H);
for(int i=0; i<H; i++){
cin >> pic.at(i) ;
}
for(int i=0; i<(N+2); i++){
cout << "#"
}
cout << endl;
for(int i=0; i<H; i++){
cout << "#" << pic.at(i) << "#" <<endl;
}
for(int i=0; i<(N+2); i++){
cout << "#"
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
14 | cout << "#"
| ^
| ;
15 | }
| ~
a.cc:23:16: error: expected ';' before '}' token
23 | cout << "#"
| ^
| ;
24 | }
| ~
|
s567723973 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H ,N;
cin >> H >> N;
vector<int> pic(H);
for(int i=0; i<H; i++){
cin >> pic.at(i) ;
}
for(i=0; i<(N+2); i++){
cout << "#"
}
cout << endl;
for(i=0; i<H; i++){
cout << "#" << pic.at(i) << "#" <<endl;
}
for(i=0; i<(N+2); i++){
cout << "#"
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
13 | for(i=0; i<(N+2); i++){
| ^
a.cc:14:16: error: expected ';' before '}' token
14 | cout << "#"
| ^
| ;
15 | }
| ~
a.cc:18:7: error: 'i' was not declared in this scope
18 | for(i=0; i<H; i++){
| ^
a.cc:22:7: error: 'i' was not declared in this scope
22 | for(i=0; i<(N+2); i++){
| ^
a.cc:23:16: error: expected ';' before '}' token
23 | cout << "#"
| ^
| ;
24 | }
| ~
|
s547239331 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string S = "";
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++) {
S += vec.at(i);
}
cout << S << endl;
S = "";
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> vec.at(j+1);
}
for (int k = 0; k < W+2; k++) {
S += vec.at(i);
}
cout << S << endl;
S = "";
}
for (int i = 0; i < W+2; i++) {
vec.at(i) = '#';
}
S += vec.at(i);
cout << S << endl;
}
| a.cc: In function 'int main()':
a.cc:31:17: error: 'i' was not declared in this scope
31 | S += vec.at(i);
| ^
|
s237562474 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string S = "";
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++) {
S += vec.at(i);
}
cout << S << endl;
S = ""
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> vec.at(j+1);
}
for (int k = 0; k < W+2; k++) {
S += vec.at(i);
}
cout << S << endl;
S = "";
}
for (int i = 0; i < W+2; i++) {
vec.at(i) = '#';
S += vec.at(i);
}
cout << S << endl;
}
| a.cc: In function 'int main()':
a.cc:15:9: error: expected ';' before 'for'
15 | S = ""
| ^
| ;
16 |
17 | for (int i = 0; i < H; i++) {
| ~~~
a.cc:17:19: error: 'i' was not declared in this scope
17 | for (int i = 0; i < H; i++) {
| ^
|
s501247829 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string S;
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++) {
S += vec.at(i);
}
cout << S << endl;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> vec.at(j+1);
}
for (int k = 0; k < W+2; k++) {
S += vec.at(i);
}
cout << S << endl;
S = "";
}
for (int i = 0; i < W+2; i++) {
vec.at(i) = '#'
S += vec.at(i);
}
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:28:20: error: expected ';' before 'S'
28 | vec.at(i) = '#'
| ^
| ;
29 | S += vec.at(i);
| ~
|
s764313822 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> vec.at(j+1);
}
for (int k = 0; k < W+2; k++)
cout << vec.at(k) << endl;
}
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
}
| a.cc: In function 'int main()':
a.cc:21:18: error: redeclaration of 'std::vector<char> vec'
21 | vector<char> vec(W+2, '#');
| ^~~
a.cc:8:16: note: 'std::vector<char> vec' previously declared here
8 | vector<char> vec(W+2, '#');
| ^~~
|
s267454797 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> vec.at(j+1);
}
cout << vec.at(j) << endl;
}
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
}
| a.cc: In function 'int main()':
a.cc:17:20: error: 'j' was not declared in this scope
17 | cout << vec.at(j) << endl;
| ^
a.cc:20:18: error: redeclaration of 'std::vector<char> vec'
20 | vector<char> vec(W+2, '#');
| ^~~
a.cc:8:16: note: 'std::vector<char> vec' previously declared here
8 | vector<char> vec(W+2, '#');
| ^~~
|
s418196665 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
for (int i = 0; i < H; i++) {
for (int j = 0; i < W; i++) {
cin >> vec.at(j+1);
}
cout << vec.at(j) << endl;
}
vector<char> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
}
| a.cc: In function 'int main()':
a.cc:17:20: error: 'j' was not declared in this scope
17 | cout << vec.at(j) << endl;
| ^
a.cc:20:18: error: redeclaration of 'std::vector<char> vec'
20 | vector<char> vec(W+2, '#');
| ^~~
a.cc:8:16: note: 'std::vector<char> vec' previously declared here
8 | vector<char> vec(W+2, '#');
| ^~~
|
s844706967 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
for (int i = 0; i < H; i++) {
for (int j = 0; i < W; i++) {
cin >> vec.at(j+1);
}
cout << vec.at(j) << endl;
}
vector<string> vec(W+2, '#');
for (int i = 0; i < W+2; i++)
cout << vec.at(i) << endl;
}
| a.cc: In function 'int main()':
a.cc:8:30: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int, char)'
8 | vector<string> vec(W+2, '#');
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:8:30: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'char')
8 | vector<string> vec(W+2, '#');
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::__cxx11::basic_string<char> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::__cxx11::basic_string<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::__cxx11::basic_string<char> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:28: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::__cxx11::basic_string<char> >&'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int; value_type = std::__cxx11::basic_string<char>; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:47: note: no known conversion for argument 2 from 'char' to 'const std::vector<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
569 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:51: note: no known conversion for argument 2 from 'char' to 'const std::vector<std::__cxx11::basic_string<char> >::allocator_type&' {aka 'const std::allocator<std::__cxx11::basic_string<char> >&'}
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 2 provided
a.cc:17:20: error: 'j' was not declared in this scope
17 | cout << vec.at(j) << endl;
| ^
a.cc:20:20: error: redeclaration of 'std::vector<std::__cxx11::basic_string<char> > vec'
20 | vector<string> vec(W+2, '#');
| ^~~
a.cc:8:18: note: 'std::vector<std::__cxx11::basic_string<char> > vec' previously declared here
8 | vector<string> vec(W+2, '#');
| ^~~
|
s174778494 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
for (int i=0; i<w+2; i++) {
cout << "#";
}
cout << endl;
for (int i=0; i<h; i++) {
vector<string> row(w);
for (int j=0; j<h; j++) {
cin >> row.at(j);
}
cout << "#" << row << "#" << endl;
}
for (int i=0; i<w+2; i++) {
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:18:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<std::__cxx11::basic_string<char> >')
18 | cout << "#" << row << "#" << endl;
| ~~~~~~~~~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<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<std::__cxx11::basic_string<char> >' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/ |
s779760236 | p03712 | C++ | #include<bits/stdc++.h>
#include<cstring>
using namespace std;
#define ll long long
int main()
{
ll h,w;
cin>>h>>w;
char l1[h+1][w+1];
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
cin>>l1[i][j];
}
}
for{int i=1;i<=w+2;i++}cout<<'#';
cout<<endl;
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
if(j==1||j==w)cout<<'#';
cout<<l1[i][j];
}
cout<<endl;
}
for{int i=1;i<=w+2;i++}cout<<'#';
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:18:8: error: expected '(' before '{' token
18 | for{int i=1;i<=w+2;i++}cout<<'#';
| ^
| (
a.cc:18:8: error: expected primary-expression before '{' token
a.cc:19:15: error: expected ')' before ';' token
19 | cout<<endl;
| ^
| )
a.cc:18:8: note: to match this '('
18 | for{int i=1;i<=w+2;i++}cout<<'#';
| ^
a.cc:27:8: error: expected '(' before '{' token
27 | for{int i=1;i<=w+2;i++}cout<<'#';
| ^
| (
a.cc:27:8: error: expected primary-expression before '{' token
a.cc:28:15: error: expected ')' before ';' token
28 | cout<<endl;
| ^
| )
a.cc:27:8: note: to match this '('
27 | for{int i=1;i<=w+2;i++}cout<<'#';
| ^
|
s044570633 | p03712 | C++ | #include <iostream>
#include <vector>
#include <climits>
using namespace std;
string makeflame(int n){
string s = "";
for(int i = 0;i < n;i++){
s += "#";
}
retrun s;
}
int main(void){
int h,w;
cin >> h >> w;
vector<string> s(h);
for(int i = 0;i < h;i++){
cin >> s[i];
}
vector<string> ans(h + 2);
for(int i = 0;i < ans.size();i++){
if(i == 0 || i == ans.size() - 1){
ans[i] = makeflame(w);
}else{
ans[i] = "#" + s[i - 1] + "#";
}
}
for(int i = 0;i < ans.size();i++){
cout << ans[i] << endl;
}
}
| a.cc: In function 'std::string makeflame(int)':
a.cc:11:5: error: 'retrun' was not declared in this scope
11 | retrun s;
| ^~~~~~
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
12 | }
| ^
|
s963081629 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
string S;
cin>>H>>W;
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
if(i==0||i==H+1){cout<<"#";}
else{cin>>S;
if(j==0){cout<<"#";}
else if(j==W+1){cout<<"#"<<endl;}
else{cout<<S.at(i-1);}
}
| a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:10:27: note: to match this '{'
10 | for(int j=0;j<W+2;j++){
| ^
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:9:25: note: to match this '{'
9 | for(int i=0;i<H+2;i++){
| ^
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s580174056 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
string S;
cin>>H>>W
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
if(i==0||i==H+1){cout<<"#";}
else{cin>>S;
if(j==0){cout<<"#";}
else if(j==W+1){cout<<"#"<<endl;}
else{cout<<S.at(i-1);}
}
| a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'for'
8 | cin>>H>>W
| ^
| ;
9 | for(int i=0;i<H+2;i++){
| ~~~
a.cc:9:15: error: 'i' was not declared in this scope
9 | for(int i=0;i<H+2;i++){
| ^
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s859102300 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
string S;
cin>>H>>W
for(i=0;i<H+2;i++){
for(j=0;j<W+2;j++){
if(i==0||i==H+1){cout<<"#";}
else{cin>>S;
if(j==0){cout<<"#";}
else if(j==W+1){cout<<"#"<<endl;}
else{cout<<S.at(i-1);}
} | a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'for'
8 | cin>>H>>W
| ^
| ;
9 | for(i=0;i<H+2;i++){
| ~~~
a.cc:9:11: error: 'i' was not declared in this scope
9 | for(i=0;i<H+2;i++){
| ^
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s236331453 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<vector<char>> b (102, vector<char>(102));
vector<vector<char>> a (101, vector<char>(102));
int H, W;
cin >> H >> W;
for (int i = 0; i < H + 2; i++){
for (int j = 0; j < W + 2; j++){
b.at(i).at(j) = '#';
}
}
for (int i = 1; i < H + 1; i++){
for (int j = 1; j < W + 1; j++){
cin >> a.at(i).at(j);
}
}
for (int i = 1; i < H + 1; i++){
for (int j = 1; j < W + 1; j++){
b.at(i).at(j) = a.at(i).at(j);
}
}
for (int i = 0; i < H + 2; i++){
for (int j = 0; j < W + 2; j++){
cout << b.at(i).at(j);
}
} | a.cc: In function 'int main()':
a.cc:33:4: error: expected '}' at end of input
33 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s195504927 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
for(int i = 0; i<W+2; i++){
cout << "#";
}
cout << endl;
for(int j = 0; j < H; j++){
vecter<char> date(W);
for(int i = 0; i < W+2; i++){
if(i == 0 || i == W+1){
cout << "#";
}
else{
cin >> date.at(i-1);
cout << date.at(i-1);
}
}
cout << endl;
}
for(int i = 0; i<W+2; i++){
cout << "#";
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'vecter' was not declared in this scope
14 | vecter<char> date(W);
| ^~~~~~
a.cc:14:16: error: expected primary-expression before 'char'
14 | vecter<char> date(W);
| ^~~~
a.cc:21:16: error: 'date' was not declared in this scope
21 | cin >> date.at(i-1);
| ^~~~
|
s658903018 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
for(int i = 0; i<W+2; i++){
cout << "#";
}
cout << endl;
for(int j = 0; j < H; j++){
vecter<int> date(W);
for(int i = 0; i < W+2; i++){
if(i == 0 || i == W+1){
cout << "#";
}
else{
cin >> date.at(i-1);
cout << date.at(i-1);
}
}
cout << endl;
}
for(int i = 0; i<W+2; i++){
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:14:9: error: 'vecter' was not declared in this scope
14 | vecter<int> date(W);
| ^~~~~~
a.cc:14:16: error: expected primary-expression before 'int'
14 | vecter<int> date(W);
| ^~~
a.cc:21:16: error: 'date' was not declared in this scope
21 | cin >> date.at(i-1);
| ^~~~
|
s311018474 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W,H ;
cin >> H >> W;
vector<vector<char>> vec(H + w)(W + 2);
for(int i = 0; i < W + 2; i++) {
vec.at(0)(i) = '#';
vec.at(H + 2)(i) = '#';
}
for(int i = 0; i < H; i++) {
vec.at(i + 1)(0) = '#';
vec.at(i + 1)(W + 2) = '#';
}
for(int i = 0; i < H + 2; i++){
for(int j = 0; j < W + 2; j++)
cout << vec.at(i)(j);
cout << endl;
}
}
| a.cc:8:2: error: extended character is not valid in an identifier
8 | vector<vector<char>> vec(H + w)(W + 2);
| ^
a.cc: In function 'int main()':
a.cc:8:2: error: '\U00003000vector' was not declared in this scope
8 | vector<vector<char>> vec(H + w)(W + 2);
| ^~~~~~~~
a.cc:8:22: error: expected primary-expression before '>' token
8 | vector<vector<char>> vec(H + w)(W + 2);
| ^~
a.cc:8:33: error: 'w' was not declared in this scope
8 | vector<vector<char>> vec(H + w)(W + 2);
| ^
a.cc:8:25: error: 'vec' was not declared in this scope
8 | vector<vector<char>> vec(H + w)(W + 2);
| ^~~
|
s254599759 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> vec(H + 2)(W + 2);
for(int i = 0; i < W + 2; i++) {
vec.at(0)(i) = '#';
vec.at(H + 2)(i) = '#';
}
for(int i = 0; i < H; i++) {
vec.at(i + 1)(0) = '#';
vec.at(i + 1)(W + 2) = '#';
}
for(int i = 0; i < H + 2; i++){
for(int j = 0; j < W + 2; j++)
cout << vec.at(i)(j);
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:26: error: expected ',' or ';' before '(' token
8 | vector<char> vec(H + 2)(W + 2);
| ^
a.cc:11:14: error: expression cannot be used as a function
11 | vec.at(0)(i) = '#';
| ~~~~~~~~~^~~
a.cc:12:18: error: expression cannot be used as a function
12 | vec.at(H + 2)(i) = '#';
| ~~~~~~~~~~~~~^~~
a.cc:15:18: error: expression cannot be used as a function
15 | vec.at(i + 1)(0) = '#';
| ~~~~~~~~~~~~~^~~
a.cc:16:18: error: expression cannot be used as a function
16 | vec.at(i + 1)(W + 2) = '#';
| ~~~~~~~~~~~~~^~~~~~~
a.cc:21:24: error: expression cannot be used as a function
21 | cout << vec.at(i)(j);
| ~~~~~~~~~^~~
|
s866265722 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int h,w;
cin>>h>>w;
vector <vector<string>> a(h+2,vector<string>(w+2));
for (int i=0;i<h+2;i++){
for(int j=0;j<w+2;j++){
a.at(i).at(j)="#";}
}
for (int i=0;i<h;i++){
for (int j=0;j<w;j++){
cin>>a.at(i+1).at(j+1);}
}
for(int i=0;i<h+2;i++){
for(int j=0;j<w+2;j++){
cout<<a.at(i).at(j);}
}
cout>>endl;
} | a.cc: In function 'int main()':
a.cc:19:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
19 | cout>>endl;
| ~~~~^~~~~~
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:19:9: note: couldn't deduce template parameter '_IntegerType'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>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:
a.cc:19:9: note: couldn't deduce template parameter '_Tp'
19 | cout>>endl;
| ^~~~
/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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>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:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:19:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_mo |
s795306249 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int h,w;
cin>>h>>w;
vector <vector<string>> a(h,vector<string>(w));
for (int i=o;i<h+2;i++){
for(int j=0;j<w+2;j++){
a.at(i).at(j)="#";}
}
for (int i=0;i<h;i++){
for (int j=0;j<w;j++){
cin>>a.at(i+1).at(j+1);}
}
for(int i=0;i<h+2;i++){
for(int j=0;j<w+2;j++){
cout<<a.at(i).at(j)<<endl;}} | a.cc: In function 'int main()':
a.cc:7:14: error: 'o' was not declared in this scope
7 | for (int i=o;i<h+2;i++){
| ^
a.cc:17:35: error: expected '}' at end of input
17 | cout<<a.at(i).at(j)<<endl;}}
| ^
a.cc:3:12: note: to match this '{'
3 | int main (){
| ^
|
s108227332 | p03712 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h=sc.nextInt(),w=sc.nextInt();
char[][] c=new char[h][w];
for(int i=0;i<h+2;i++){
if(i==0||i==h+1){
for(int j=0;j<m+2;j++){
System.out.print("#");
}
}else{
c[i]=sc.next().toCharArray();
for(int j=0;j<m+2;j++){
if(j==0||j==m+1){
System.out.print("#");
}else{
System.out.print(c[i][j-1]);
}
}
}
System.out.print("\n");
}
}
}
| Main.java:11: error: cannot find symbol
for(int j=0;j<m+2;j++){
^
symbol: variable m
location: class Main
Main.java:16: error: cannot find symbol
for(int j=0;j<m+2;j++){
^
symbol: variable m
location: class Main
Main.java:17: error: cannot find symbol
if(j==0||j==m+1){
^
symbol: variable m
location: class Main
3 errors
|
s377713920 | p03712 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h=sc.nextInt(),w=sc.nextInt();
char[][] c=new char[h][w];
for(int i=0;i<h+2;i++){
if(i==0||i==h+1){
for(int j=0;j<m+2;j++){
System.out.print("#");
}
}else{
c[i]=sc.next().toCharArray();
for(int j=0;j<m+2;j++){
if(j==0||j==m+1){
System.out.print("#");
}else{
System.out.print(c[i][j]);
}
}
}
System.out.print("\n");
}
}
}
| Main.java:11: error: cannot find symbol
for(int j=0;j<m+2;j++){
^
symbol: variable m
location: class Main
Main.java:16: error: cannot find symbol
for(int j=0;j<m+2;j++){
^
symbol: variable m
location: class Main
Main.java:17: error: cannot find symbol
if(j==0||j==m+1){
^
symbol: variable m
location: class Main
3 errors
|
s718013994 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector <char> top(W+2,'#');
cout << top << endl;
for(int j; j<H; j++){
vector <char> middle(W);
for(int i; i<W; i++){
cin >> middle.at(i);
}
cout << '#' << middle << '#' << endl;
}
cout << top << endl;
}
| a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
8 | cout << top << 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)
| |
s708204001 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector <char> top(W+2,'#');
cout << top << endl;
for(int j; j<H; j++){
vector <char> middle(W);
for(int i; i<W; i++){
cin >> middle.at(i);
}
cout << '#' << middle << '#' << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
8 | cout << top << 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)
| |
s806632549 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector <cha> top(W+2,'#');
cout << top << endl;
for(int j; j<H; j++){
vector <cha> middle(W);
for(int i; i<W; i++){
cin >> middle.at(i);
}
cout << '#' << middle << '#' << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:11: error: 'cha' was not declared in this scope; did you mean 'char'?
7 | vector <cha> top(W+2,'#');
| ^~~
| char
a.cc:7:14: error: template argument 1 is invalid
7 | vector <cha> top(W+2,'#');
| ^
a.cc:7:14: error: template argument 2 is invalid
a.cc:7:27: error: expression list treated as compound expression in initializer [-fpermissive]
7 | vector <cha> top(W+2,'#');
| ^
a.cc:10:14: error: template argument 2 is invalid
10 | vector <cha> middle(W);
| ^
a.cc:12:19: error: request for member 'at' in 'middle', which is of non-class type 'int'
12 | cin >> middle.at(i);
| ^~
|
s190798869 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
char a[1000][1000],b[1000][1000];
for(int i=1;i<=h+2;i++){
for(int j=1;j<=w+2;j++){
b[i][j]='#';
}
}
for(i=1;i<=h;i++){
for(int j=1;j<=w;j++){
cin>>a[i][j];
}
}
for(i=2;i<=h+1;i++){
for(int j=2;j<=w+1;j++){
b[i][j]=a[i-1][j-1];
}
}
for(int i=1;i<=h+2;i++){
for(int j=1;j<=w+2;j++){
cout<<b[i][j];
}
cout<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
13 | for(i=1;i<=h;i++){
| ^
a.cc:18:7: error: 'i' was not declared in this scope
18 | for(i=2;i<=h+1;i++){
| ^
|
s629857329 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H, W;
cin >> H >> W;
vector <vector<int>> data (H, vector<int> (W));
for (int i=0; i<H; i++){
for (int j=0; j<W; j++){
cin >> data.at(i).at(j);
}
}
vector <vector<int>> ans (H+1, vector<int>(W+1));
for (int i=0; i<H+2; i++){
for (int j=0; j<W+2; j++){
ans.at(i).at(j)="#";
}
}
for (int i=0; i<H+2; i++){
for (int j=0; j<W+2; j++){
ans.at(i+1).at(j+1)=data.at(i).at(j);
}
}
for (int i=0; i<H+2; i++){
for (int j=0; j<W+2; j++){
cout << ans.at(i).at(j) << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:16:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive]
16 | ans.at(i).at(j)="#";
| ^~~
| |
| const char*
|
s005164136 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H, W; // H=高さ, W=幅
cin >> H >> W;
char Pic;
vector <char> Frame1(W+1,'#');
vector <char> Frame2(W+1,'#');
for ( int i=0; i<=W+1; i++){
cout << '#' <<;
}
cout << endl;
for (int j=0; j<H; j++){
cout << '#' ;
for (int i=0; i<W; i++){
cin >> Pic;
cout << Pic;
}
cout << '#' << endl;
}
for ( int i=0; i<=W+1; i++){
cout << '#' <<;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:13:19: error: expected primary-expression before ';' token
13 | cout << '#' <<;
| ^
a.cc:27:19: error: expected primary-expression before ';' token
27 | cout << '#' <<;
| ^
|
s877241103 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int H,W;
string a;
cin>>H>>W;
for(int i=0;i<W+2;i++)
{
cout<<'#';
}
cout<<endl;
for(int j=0;j<H;j++)
{
cin>>a;
cout<<'#'<<a<<'#'<<endl;
}
for(int k=0;i<W+2;k++)
{
cout<<'#';
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:18:15: error: 'i' was not declared in this scope
18 | for(int k=0;i<W+2;k++)
| ^
|
s565414973 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<string> str(H);
for(int i=0;i<H;i++){
cin >> str(i);
}
for(int i=-1;i<H+1;i++){
if(i==-1||i==W){
for(int j =0;j<W+2;j++){
cout << "#";
if(j==W+1){
cout << endl;
}
}
}else{
cout << "#" << str(i) << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:10:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
10 | cin >> str(i);
| ~~~^~~
a.cc:22:25: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
22 | cout << "#" << str(i) << endl;
| ~~~^~~
|
s971090886 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<string> str(H);
for(int i=0;i<H;i++){
cin >> str(H);
}
for(int i=-1;i<H+1;i++){
if(i==-1||i==W){
for(int j =0;j<W+2;j++){
cout << "#";
if(j==W+1){
cout << endl;
}
}
}else{
cout << "#" << str(i) << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:10:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
10 | cin >> str(H);
| ~~~^~~
a.cc:22:25: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
22 | cout << "#" << str(i) << endl;
| ~~~^~~
|
s119321002 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W,all;
cin >> H >> W;
all = H*W;
vector<char> ch(all);
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin >> all.at(i*W+j);
}
}
for(int i = -1;i<H+1;i++){
for(j=-1;j<W+1;j++){
if(i==-1 || i==H){
cout << "#";
}else if(j==-1){
cout << "#";
}else if(j==W){
cout << "#" << endl;
}else{
int place;
place = (i-1)*W + j-1;
cout << ch.at(place);
}
}
}
}
| a.cc: In function 'int main()':
a.cc:12:18: error: request for member 'at' in 'all', which is of non-class type 'int'
12 | cin >> all.at(i*W+j);
| ^~
a.cc:17:9: error: 'j' was not declared in this scope
17 | for(j=-1;j<W+1;j++){
| ^
|
s708002941 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H, W;
cin >> H >>W;
vector<vector <char>> pic(H+2, vector<char>(W+2));
for(int i=0; i<H+2; i++){
for(int j=0; j<W+2; j++){
if(i = 0 || i = H+1) pic.at(i).at(j) = '#';
else if(j = 0 || j = W+1) pic.at(i).at(j) = '#';
else cin >> pic.at(i).at(j);
}
}
for(int i=0;i<H+2; i++){
for(int j=0; j<W+2; j++){
cout << pic.at(i).at(j);
}
cout << endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:16: error: lvalue required as left operand of assignment
11 | if(i = 0 || i = H+1) pic.at(i).at(j) = '#';
| ~~^~~~
a.cc:12:21: error: lvalue required as left operand of assignment
12 | else if(j = 0 || j = W+1) pic.at(i).at(j) = '#';
| ~~^~~~
|
s045628038 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H, W;
cin >> H >>W;
vector<voctor <char>> pic(H+2, vector<char>(W+2));
for(int i=0; i<H+2; i++){
for(int j=0; j<W+2; j++){
if(i = 0 || i = H+1) pic.at(i).at(j) = '#';
else if(j = 0 || j = W+1) pic.at(i).at(j) = '#';
else cin >> pic.at(i).at(j);
}
}
for(int i=0;i<H+2; i++){
for(int j=0; j<W+2; j++){
cout << pic.at(i).at(j);
}
cout << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:10: error: 'voctor' was not declared in this scope
7 | vector<voctor <char>> pic(H+2, vector<char>(W+2));
| ^~~~~~
a.cc:7:22: error: template argument 1 is invalid
7 | vector<voctor <char>> pic(H+2, vector<char>(W+2));
| ^~
a.cc:7:22: error: template argument 2 is invalid
a.cc:7:51: error: expression list treated as compound expression in initializer [-fpermissive]
7 | vector<voctor <char>> pic(H+2, vector<char>(W+2));
| ^
a.cc:7:34: error: cannot convert 'std::vector<char>' to 'int' in initialization
7 | vector<voctor <char>> pic(H+2, vector<char>(W+2));
| ^~~~~~~~~~~~~~~~~
| |
| std::vector<char>
a.cc:11:16: error: lvalue required as left operand of assignment
11 | if(i = 0 || i = H+1) pic.at(i).at(j) = '#';
| ~~^~~~
a.cc:11:32: error: request for member 'at' in 'pic', which is of non-class type 'int'
11 | if(i = 0 || i = H+1) pic.at(i).at(j) = '#';
| ^~
a.cc:12:21: error: lvalue required as left operand of assignment
12 | else if(j = 0 || j = W+1) pic.at(i).at(j) = '#';
| ~~^~~~
a.cc:12:37: error: request for member 'at' in 'pic', which is of non-class type 'int'
12 | else if(j = 0 || j = W+1) pic.at(i).at(j) = '#';
| ^~
a.cc:13:23: error: request for member 'at' in 'pic', which is of non-class type 'int'
13 | else cin >> pic.at(i).at(j);
| ^~
a.cc:19:19: error: request for member 'at' in 'pic', which is of non-class type 'int'
19 | cout << pic.at(i).at(j);
| ^~
|
s454971426 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n , m;
cin >> n >> m;
vector <string> a(n);
for(int i = 0; i < n; i++)
cin >> a.at(i);
for(int i = 0; i < m + 2; i++)
cout << "#";
cout << endl;
for(int i = 0; i < m)
cout << "#" << a.at(i) << "#" << endl;
for(int i = 0; i < m + 2; i++)
cout << "#";
cout << endl;
} | a.cc: In function 'int main()':
a.cc:16:23: error: expected ';' before ')' token
16 | for(int i = 0; i < m)
| ^
| ;
|
s168365356 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H;
int W;
cin >> H >> W;
vector<string> px(H);
//一行目
for(int i=0; i<W+2; i++){
cout << "#";
}
cout << endl;
//真ん中
for(int i=0; i<H; i++){
cout << "#";
for(int j=0; j<W; j++){
cin >> px.at(0);
}
cout << "#" << endl;
}
//最終行
for(int i=0; i<W+2; i++){
cout << "#";
}
cout << endl;
| a.cc: In function 'int main()':
a.cc:33:16: error: expected '}' at end of input
33 | cout << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s099065521 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
for(int i=0;i<h+1;i++){
if(i== || i==h){
for(int j=0;j<w+1;j++){
cout<<'#';
if(j==w) cout<<endl;
}
}
else{
for(int j=0;j<w+1;j++){
if(j==0) cout<<'#';
else if(j==w) cout<<'#'<<endl;
else{
char s;
cin>>s;
cout<<s;
}
}
}
}
}
| a.cc: In function 'int main()':
a.cc:8:12: error: expected primary-expression before '||' token
8 | if(i== || i==h){
| ^~
|
s091817936 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<string> mean(H);
for(int i = 0;i < H;i++){
cin >> mean(i)
}
for(int j = 0;j < W + 2;j++){
cout << "#" << endl;
}
for(int k = 0;k < H;k++){
cout << "#" << mean[k] << "#" << endl;
}
for(int l = 0;l < W + 2 ;l++){
cout << "#" << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:16: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
10 | cin >> mean(i)
| ~~~~^~~
|
s532596246 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin H>>W;
vector<string> A(W);
for (int i=0;i<H;i++) {
for(int j=0;j<W;j++) {
cin >> A.at(j);
}
}
for (int i=0;i<H+2;i++) {
for (int j=0;j<W+2;j++) {
if (i==0||i==H+1) {
cout << '#' << endl;
}
else {
if(j==0||j==W+1) {
cout << '#' << endl;
}
else {
cout << A.at(j-1) << endl;
}
}
}
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'H'
6 | cin H>>W;
| ^~
| ;
|
s925108154 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin H >> W;
vector<string> A(W);
for (int i=0;i<H;i++) {
for(int j=0;j<W;j++) {
cin >> A.at(j);
}
}
for (int i=0;i<H+2;i++) {
for (int j=0;j<W+2;j++) {
if (i==0||i==H+1) {
cout << '#' << endl;
}
else {
if(j==0||j==W+1) {
cout << '#' << endl;
}
else {
cout << A.at(j-1) << endl;
}
}
}
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'H'
6 | cin H >> W;
| ^~
| ;
|
s900394082 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin H >> W;
vector<string> A(W);
for (int i=0;i<H;i++) {
for(int j=0;j<W;j++) {
cin >> A.at(j);
}
}
for (int i=0;i<H+2;i++) {
for (int j=0;j<W+2;j++) {
if (i==0||i==H+1) {
cout << '#' << endl;
}
else {
if(j==0||j==W+1) {
cout << '#' << endl;
}
else {
cout << A.at(j-1) << endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'H'
6 | cin H >> W;
| ^~
| ;
a.cc:29:6: error: expected '}' at end of input
29 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s594441520 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin H >> W;
vector<string> A(W);
for (int i=0;i<H;i++) {
for(int j=0;j<W;j++) {
cin >> A(j);
}
}
for (int i=0;i<H+2;i++) {
for (int j=0;j<W+2;j++) {
if (i==0||i==H+1) {
cout << '#' << endl;
}
else {
if(j==0||j==W+1) {
cout << '#' << endl;
}
else {
cout << A(j-1) << endl;
}
}
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'H'
6 | cin H >> W;
| ^~
| ;
a.cc:11:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
11 | cin >> A(j);
| ~^~~
a.cc:25:22: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int)'
25 | cout << A(j-1) << endl;
| ~^~~~~
a.cc:29:6: error: expected '}' at end of input
29 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s254317833 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin H >> W;
for (int i=0;i<H;i++) {
for(int j=0;j<W;j++) {
vector<string> A(W);
cin >> A(j);
}
}
for (int i=0;i<H+2;i++) {
for (int j=0;j<W+2;j++) {
if (i==0||i==H+1) {
cout << '#' << endl;
}
else {
if(j==0||j==W+1) {
cout << '#' << endl;
}
else {
cout << A(j-1) << endl;
}
}
}
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'H'
6 | cin H >> W;
| ^~
| ;
a.cc:11:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
11 | cin >> A(j);
| ~^~~
a.cc:25:21: error: 'A' was not declared in this scope
25 | cout << A(j-1) << endl;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.