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 ...
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_os...
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 ...
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 ; ...
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/inc...
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 ; ...
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/inc...
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('#...
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...
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...
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 ...
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...
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 ...
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++)...
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' 1...
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<...
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+...
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]...
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<...
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); ...
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 ...
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 ++){ ...
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 {ak...
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]; } ...
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 <...
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: er...
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...
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 fu...
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 (i...
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 fu...
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...
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 ...
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; ...
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<...
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; } fo...
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++){ | ...
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"); ...
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 << en...
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_stri...
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(...
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(...
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> >()' ...
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: er...
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(...
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:...
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_o...
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_ost...
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: ...
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 | ...
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...
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:...
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...
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...
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...
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;...
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;...
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.c...
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 << "#"; cou...
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...
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...
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' wa...
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...
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::ba...
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>...
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>...
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/...
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, '#'); cou...
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)' ...
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...
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...
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, '#'); | ^~~ | ...
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 namesp...
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...
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 namesp...
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::...
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<...
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 ...
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) +'#'...
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; } ...
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...
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...
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.a...
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...
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); } ...
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+...
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; ...
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> v...
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; ...
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> v...
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; ...
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+...
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; } ...
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::vect...
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...
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; | ^ ...
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]; } ...
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...
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 | ...
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<...
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...
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<<"#"<<en...
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 '...
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 ...
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 << "#"; } e...
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...
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 << "#"; } els...
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 ...
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) = '#'; ...
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: expect...
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) = '#'; } ...
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 ...
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...
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, ...
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...
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 |...
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("#"); }...
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 sym...
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("#"); }...
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 sym...
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_ostre...
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_ostre...
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: te...
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;...
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++){ ...
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)="#"; | ^~~ | | | cons...
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...
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; }...
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) << ...
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; }...
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) << ...
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 << "...
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 c...
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 c...
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.c...
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 =...
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); } ...
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<<'...
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;...
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...
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 << '#' << en...
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 << '#' << en...
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;...
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 '(s...
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 << '#' << e...
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 ...