submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s494659920 | 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));
vector<vector<string>> b(H+2, vector<string>(W+2));
for(int i=0;i < H;i++){
for(int j=0; j<W; j++){
cin >> a.at(i).at(j);
}
}
for(int i=0; i<H+2; i++){... | a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before '}' token
18 | b.at(i).at(j) = "#"
| ^
| ;
19 | }
| ~
a.cc:23:41: error: expected ';' before '}' token
23 | b.at(i+1).at(j+1) = a.... |
s712829939 | 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));
vector<vector<string>> b(H+2, vector<string>(W+2));
for(int i=0;i < H;i++){
for(int j=0; j<W; j++){
cin >> a.at(i).at(j);
}
}
for(int i=0; i<H+2; i++){
... | a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before '}' token
18 | b.at(i).at(j) = "#"
| ^
| ;
19 | }
| ~
a.cc:23:41: error: expected ';' before '}' token
23 | b.at(i+1).at(j+1) = a.... |
s056027581 | p03712 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(void){
int H,W;
cin >> H >> W;
vector<string> vec(H);
for(int i = 0;i < H;i++){
cin >> vec.at(i);
}
for(int i = 1;i <= H + 2;i++){
if(i == 1 || i == H + 2){
for(int j = 1;j <= W + 2;j++) cout << "#"... | a.cc:29:5: error: redefinition of 'int main()'
29 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined here
7 | int main(void){
| ^~~~
a.cc:54:5: error: redefinition of 'int main()'
54 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined he... |
s878676137 | p03712 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(void){
int H,W;
cin >> H >> W;
vector<string> vec(H);
for(int i = 0;i < H;i++){
cin >> vec.at(i);
}
for(int i = 1;i <= H + 2;i++){
if(i == 1 || i == H + 2){
for(int j = 1;j <= W + 2;j++) cout << "#"... | a.cc:29:5: error: redefinition of 'int main()'
29 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined here
7 | int main(void){
| ^~~~
a.cc:54:5: error: redefinition of 'int main()'
54 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined he... |
s089010636 | p03712 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(void){
int H,W;
cin >> H >> W;
vector<string> vec(H);
for(int i = 0;i < H;i++){
cin >> vec.at(i);
}
for(int i = 1;i <= H + 2;i++){
if(i == 1 || i == H + 2){
for(int j = 1;j <= W + 2;j++) cout << "#"... | a.cc:29:5: error: redefinition of 'int main()'
29 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined here
7 | int main(void){
| ^~~~
a.cc:54:5: error: redefinition of 'int main()'
54 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined he... |
s051846722 | p03712 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(void){
int H,W;
cin >> H >> W;
vector<string> vec(H);
for(int i = 0;i < H;i++){
cin >> vec.at(i);
}
for(int i = 1;i <= H + 2;i++){
if(i == 1 || i == H + 2){
for(int j = 1;j <= W + 2;j++) cout << "#";... | a.cc:29:5: error: redefinition of 'int main()'
29 | int main(void){
| ^~~~
a.cc:7:5: note: 'int main()' previously defined here
7 | int main(void){
| ^~~~
|
s644685926 | p03712 | C++ | #include<iostream>
#include<vector>
#include<string>
int main(void){
int H,W;
cin >> H >> W;
vector<string> vec(H);
for(int i = 0;i < H;i++){
cin >> vec.at(i);
}
for(int i = 1;i <= H + 2;i++){
if(i == 1 || i == H + 2){
for(int j = 1;j <= W + 2;j++) cout << "#";
cout << endl;
... | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> H >> W;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked t... |
s309333309 | p03712 | C++ | #include<iostream>
#include<vector>
int main(void){
int H,W;
cin >> H >> W;
vector<char> vec(H);
for(int i = 0;i < H;i++){
cin >> vec.at(i);
}
for(int i = 1;i <= H + 2;i++){
if(i == 1 || i == H + 2){
for(int j = 1;j <= W + 2;j++) cout << "#";
cout << endl;
}else{
cout... | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> H >> W;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked t... |
s470874243 | 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 (i = 0; i < H; i++) {
cout << "#";
cin >> a;
cout << a;
cout << "#" << endl;
}
for (i = 0; i < (W + 2); i++) {
cout << "#";
}
}
| a.cc: In function 'int main()':
a.cc:15:14: error: 'i' was not declared in this scope
15 | for (i = 0; i < H; i++) {
| ^
a.cc:22:14: error: 'i' was not declared in this scope
22 | for (i = 0; i < (W + 2); i++) {
| ^
|
s973430561 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for (int i = 0; i < (W + 2); i++) {
cout << "#";
}
cout << endl;
for (i = 0; i < H; i++) {
cout << "#";
cin >> a;
cout << a;
cout << "#" << endl;
}
for (i = 0; i < (W + 2); i++) {
cout << "#";
}
}
| a.cc: In function 'int main()':
a.cc:15:14: error: 'i' was not declared in this scope
15 | for (i = 0; i < H; i++) {
| ^
a.cc:22:14: error: 'i' was not declared in this scope
22 | for (i = 0; i < (W + 2); i++) {
| ^
|
s464833796 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for (int i = 0; i < (W + 2); i++)
cout << "#";
cout << endl;
for (i = 0; i < H; i++) {
cout << "#";
cin >> a;
cout << a;
cout << "#";
cout << endl;
}
for (i = 0; i < (W + 2); i++)
cout << "#";
cout << e... | a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
14 | for (i = 0; i < H; i++) {
| ^
a.cc:22:14: error: 'i' was not declared in this scope
22 | for (i = 0; i < (W + 2); i++)
| ^
|
s851935009 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for (int i = 0; i < (W + 2); i++)
cout << "#";
cout << endl;
for (i = 0; i < H; i++) {
cout << "#";
cin >> a;
cout << a;
cout << "#";
}
for (i = 0; i < (W + 2); i++)
cout << "#";
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
14 | for (i = 0; i < H; i++) {
| ^
a.cc:21:14: error: 'i' was not declared in this scope
21 | for (i = 0; i < (W + 2); i++)
| ^
|
s100854265 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for (int i = 0; i < W + 2; i++)
cout << "#";
cout << endl;
for (i = 0; i < H; i++) {
cout "#";
cin >> a;
cout << a;
cout "#";
}
for (i = 0; i < W + 2; i++)
cout << "#";
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
14 | for (i = 0; i < H; i++) {
| ^
a.cc:15:21: error: expected ';' before string constant
15 | cout "#";
| ^~~~
| ;
a.cc:18:21: error... |
s427197811 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for(int i=0;i<H;i++) {
string a;
cin >> a;
}
for (int i=0;i<H+2;i++) {
vector<string> b(N);
if (i==0 || i==H+1){
for (int j=0;j<W+2;j++) {
b.at(j)='#';
cout << b.at(j) << endl... | a.cc: In function 'int main()':
a.cc:13:22: error: 'N' was not declared in this scope
13 | vector<string> b(N);
| ^
a.cc:19:7: error: expected '}' before 'else'
19 | else {
| ^~~~
a.cc:14:24: note: to match this '{'
14 | if (i==0 || i==H+1){
| ... |
s215935447 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for(int i=0;i<H;1++) {
string a;
cin >> a;
}
for (int i=0;i<H+2;i++) {
vector<string> b(W+2);
if (i==0 || i==H+1){
for (int j=0;j<W+2;j++) {
b.at(j)='#';
cout << b << endl;
... | a.cc: In function 'int main()':
a.cc:8:19: error: lvalue required as increment operand
8 | for(int i=0;i<H;1++) {
| ^
a.cc:17:12: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
17 ... |
s171526582 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for(int i=0;i<H;1++) {
string a;
cin >> a;
}
for (int i=0;i<H+2;i++) {
vector<string> b(N);
if (i==0 || i==H+1){
for (int j=0;j<W+2;j++) {
b.at(j)='#';
cout << b << endl;
... | a.cc: In function 'int main()':
a.cc:8:19: error: lvalue required as increment operand
8 | for(int i=0;i<H;1++) {
| ^
a.cc:13:22: error: 'N' was not declared in this scope
13 | vector<string> b(N);
| ^
a.cc:17:12: error: no match for 'operator<<' (operand ... |
s032471695 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string a;
for(int i=0;i<H;1++) {
string a;
cin >> a;
}
for (int i=0;i<H+2;i++) {
vector<string> b(N);
if (i=0 || i=H+1){
for (int j=0;j<W+2;j++) {
b.at(j)=='#';
cout << b << endl;
}... | a.cc: In function 'int main()':
a.cc:8:19: error: lvalue required as increment operand
8 | for(int i=0;i<H;1++) {
| ^
a.cc:13:22: error: 'N' was not declared in this scope
13 | vector<string> b(N);
| ^
a.cc:14:13: error: lvalue required as left operand of ... |
s630958791 | 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++) {
vector<string> a(W);
for (int k = 0; k < W; k++) {
cin >> a.at(k);
}
cout << "#" << a << "#" << en... | 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 << "#" << a << "#" << endl;
| ~~~~~~~~~~~ ^~ ~
| | |
| | std::vector<s... |
s981145815 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < W; i++) {
cout << "#";
}
cout << endl;
for (int j = 0; j < H; j++) {
vector<string> pic(W);
for (int k = 0; k < W; k++) {
cin >> pic.at(k);
}
cout << "#" << pic(W) << "#" ... | a.cc: In function 'int main()':
a.cc:18:23: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
18 | cout << "#" << pic(W) << "#" << endl;
| ~~~^~~
|
s057791985 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < W; i++) {
cout << "#";
}
cout << endl;
for (int j = 0; j < H; j++) {
vector<string> pic(W);
for (int k = 0; k < W; k++) {
cin >> pic.at(k);
}
cout << "#" << pic << "#" << ... | 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 << "#" << pic << "#" << endl;
| ~~~~~~~~~~~ ^~ ~~~
| | |
| | std::vect... |
s085254523 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i = 0; i < W; i++) {
cout << "#";
}
cout << endl;
for (int j = 0; j < H; j++) {
vector<string> pic(W);
cin >> pic(W);
cout << "#" << pic(W) << "#" << endl;
}
for ( int k = 0; k < W... | a.cc: In function 'int main()':
a.cc:15:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
15 | cin >> pic(W);
| ~~~^~~
a.cc:17:23: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
17 | cout << "#" << pic(W) << "#... |
s583404928 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,W,i,j;
vector<vector<char>> a(100,vector<char>(100));
vector<vector<char>> b(102,vector<char>(102));
cin >> H >> W;
for(i=0;i<H;i++){
for(j=0;j<W;j++){
cin >> a.at(i).at(j);
}
}
for(i=0;i<H... | a.cc: In function 'int main()':
a.cc:34:6: error: expected '}' at end of input
34 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s000352021 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> a();
for (int i = 0; i < W; i++) {
cin >> a(i);
}
cout << '#' * (W + 2) << endl;
for (int i = 0; i < H; i++) {
cout << '#' << a(i) << '#' << endl;
}
cout << '#' * (W + 2) << endl;
}
| a.cc: In function 'int main()':
a.cc:8:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
8 | vector<string> a();
| ^~
a.cc:10:13: error: too many arguments to function 'std::vector<std::__cxx11::basic_string<char> > a()'
10 | cin >> a(i);
... |
s534032542 | 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<W ; i++){
cout << '#';
for(int j=0; j<H ; j++){
char a;
cin >> a ;
cout << a
}
cout << '#' << endl;
}
}
... | a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
16 | cout << a
| ^
| ;
17 | }
| ~
a.cc: At global scope:
a.cc:21:1: error: expected declaration before '}' token
21 | }
| ^
|
s656744273 | p03712 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
char a[h][w];
for(int i=0;i<h;i++){
scanf("%s",a[i]);
}
for(int i=0;i<w+2;i++){
print("#");
}
printf("\n");
for(int i=0;i<h;i++){
printf("#");
for(int j=0;j<w;j++){
printf("%s",a[i]);
}... | a.cc: In function 'int main()':
a.cc:12:5: error: 'print' was not declared in this scope; did you mean 'printf'?
12 | print("#");
| ^~~~~
| printf
|
s091154832 | p03712 | C++ | #include<iosream>
#include<cstdio>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
char a[h][w];
for(int i=0;i<h;i++){
scanf("%s",a[i]);
}
for(int i=0;i<w+2;i++){
print("#");
}
printf("\n");
for(int i=0;i<h;i++){
printf("#");
for(int j=0;j<w;j++){
printf("%s",a[i]);
}
... | a.cc:1:9: fatal error: iosream: No such file or directory
1 | #include<iosream>
| ^~~~~~~~~
compilation terminated.
|
s374628672 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;
vector<vector<char>> picture(h,vector<char>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++)
cin >> picture.at(i).at(j);
}
for(int i=0;i<w;i++)
cout << "#";
<< endl;
for(int i=0;i<h;i++){
cout << "#";
for(int j=0... | a.cc: In function 'int main()':
a.cc:14:3: error: expected primary-expression before '<<' token
14 | << endl;
| ^~
a.cc:25:3: error: expected primary-expression before '<<' token
25 | << endl;
| ^~
|
s767441435 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W; cin >> H >> W;
vector<char> cha((H+2)*(W+2));
for ( int i=0; i<(H+2); i++){
for ( int j=0; j<(W+2); j++){
cha[i][j]='#';
}
}
for ( int i=1; i<H+1; i++){
for ( int j=1; j<W+1; j++){
cin >> cha[i][j];
}
}
for ( ... | a.cc: In function 'int main()':
a.cc:9:13: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
9 | cha[i][j]='#';
| ^
a.cc:14:20: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {... |
s904451571 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
vector<string> disp(h);
for ( int i=0; i < h; i++){
cin >> disp[i];
}
for ( int i=0; i<(w+2); i++){
cout << '#';
}cout >> endl;
for ( int i=0; i < h; i++){
cout << '#'<< disp[i] << '#'<<endl;
}
for ( i... | a.cc: In function 'int main()':
a.cc:14:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
14 | }cout >> endl;
| ~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
... |
s777825858 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin >> h >> w;
vector<string> disp(h);
for ( int i=0; i < h; i++){
cin >> disp[i];
}
for ( int i=0; i<(w+2); i++){
cout >> '#';
}cout >> endl;
for ( int i=0; i < h; i++){
cout << '#'<< disp[i] << '#'<<endl;
}
for ( int i=0; ... | a.cc: In function 'int main()':
a.cc:6:10: error: 'h' was not declared in this scope
6 | cin >> h >> w;
| ^
a.cc:6:15: error: 'w' was not declared in this scope
6 | cin >> h >> w;
| ^
a.cc:13:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std:... |
s569890363 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i; i < W; i++){
cout << "#";
}
endl;
for (int i; i < H; i++){
for (int j; j < W; j++){
cout << "#";
vector<int> vec;
cin >> vec.at(j);
cout << vec.at(j);
}
cout << "#" << end... | a.cc: In function 'int main()':
a.cc:10:7: error: statement cannot resolve address of overloaded function
10 | endl;
| ^
a.cc:23:7: error: statement cannot resolve address of overloaded function
23 | endl;
| ^
|
s885618039 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i; i < W; i++){
cout << "#";
}
endl;
for (int i; i < H; i++){
for (int j; j < W; j++){
cout << "#";
vector<int> vec;
cin >> vec(j);
cout << vec(j);
}
cout << "#" << endl;
}... | a.cc: In function 'int main()':
a.cc:10:7: error: statement cannot resolve address of overloaded function
10 | endl;
| ^
a.cc:15:17: error: no match for call to '(std::vector<int>) (int&)'
15 | cin >> vec(j);
| ~~~^~~
a.cc:16:18: error: no match for call to '(std::vector<int... |
s210659714 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
for(int i = 0 ; i < W ; i++){
cout << '#';
}
cout << endl;
for(int i = 0 ; i < H ; i++){
cout << '#' << cin << '#' << endl;
}
for(int i = 0 ; i < W ; i++){
cout << '#';
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::istream' {aka 'std::basic_istream<char>'})
14 | cout << '#' << cin << '#' << endl;
| ~~~~~~~~~~~ ^~ ~~~
| | |
| | std::istre... |
s608800881 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
string a;
for(int i = 0; i < W + 2; i++){
cout << '#';
}
cout << endl;
for(int = 0; i < H; i++){
cout << '#';
cin >> a;
cout << '#' << endl;
}
for(int i = 0; i < W + 2; i++){
cout << '#';
}
cout <... | a.cc: In function 'int main()':
a.cc:12:11: error: expected unqualified-id before '=' token
12 | for(int = 0; i < H; i++){
| ^
a.cc:12:10: error: expected ';' before '=' token
12 | for(int = 0; i < H; i++){
| ^~
| ;
a.cc:12:11: error: expected primary-expression b... |
s854585557 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
for(int i = 0; i < W; i++){
string l = "##";
l += "#";
}
cout << l << endl;
vector<string> line(H);
for(int i = 0; i < H; i++){
cin >> line.at(i);
cout << "#" << line.at(i) << "#" << endl;
}
... | a.cc: In function 'int main()':
a.cc:13:11: error: 'l' was not declared in this scope
13 | cout << l << endl;
| ^
|
s364730810 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
for(int i = 0; i < W; i++){
string l = "##";
l += "#";
}
cout << l << endl;
vector<string> line(W);
for(int i = 0; i < W; i++){
cin >> line.at(i);
cout << "#" << line.at(i) << "#" << endl;
}
... | a.cc: In function 'int main()':
a.cc:13:11: error: 'l' was not declared in this scope
13 | cout << l << endl;
| ^
|
s696108957 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
scan("%d%d", &h, &w);
for(int i = 0; i < w + 2; i++)
printf("#");
printf("\n");
for(int i = 0; i < h; i++) {
for(int i = 0; i < w + 2; i++) {
int x;
if(i == 0 || i == w + 1) printf("#");
else {
scanf("%d", &x);
printf("%d", x... | a.cc: In function 'int main()':
a.cc:6:9: error: 'scan' was not declared in this scope; did you mean 'scanf'?
6 | scan("%d%d", &h, &w);
| ^~~~
| scanf
|
s835591457 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
char a[h][w], b[h+2][j+2];
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++) {
cin >> a[i][j];
b[i+... | a.cc: In function 'int main()':
a.cc:7:24: error: 'j' was not declared in this scope
7 | char a[h][w], b[h+2][j+2];
| ^
a.cc:11:7: error: 'b' was not declared in this scope
11 | b[i][j] = '#';
| ^
a.cc:17:7: error: 'b' was not declared in this scope
17 | ... |
s136629785 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
char a[i][j], b[i+2][j+2];
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++) {
cin >> a[i][j];
b[i+... | a.cc: In function 'int main()':
a.cc:7:10: error: 'i' was not declared in this scope
7 | char a[i][j], b[i+2][j+2];
| ^
a.cc:7:13: error: 'j' was not declared in this scope
7 | char a[i][j], b[i+2][j+2];
| ^
a.cc:11:7: error: 'b' was not declared in this scope
11 | ... |
s993327070 | 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) ... | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s258061734 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H ,W;
cin >> H >> W ;
for(int i = 0; i < W ; i++){
cout << "#" ;
}
for(int i = 1 ; i <= H; i++){
vector<int> vec;
cout << "#" << for(int r = 0; r < W; r++)
{cout << vec.at(i);
}
<< "#"<< endl;
}
for(int i = 0; i < W ; i... | a.cc: In function 'int main()':
a.cc:12:20: error: expected primary-expression before 'for'
12 | cout << "#" << for(int r = 0; r < W; r++)
| ^~~
a.cc:12:35: error: 'r' was not declared in this scope
12 | cout << "#" << for(int r = 0; r < W; r++)
| ... |
s989599979 | p03712 | C++ | include <bits/stdc++.h>
using namespace std;
int main(){
int H,W; cin >> H >> W;
string tmp;
for (int i = 0; i < H + 2; ++i) {
if (i == 0 || i == H + 1) {
for (int j = 0; j < W + 2; ++j) cout << "#";
cout << endl;
} else {
cin >> tmp;
cout << ... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:14: error: 'cin' was not declared in this scope
5 | int H,W; cin >> H >> W;
| ^~~
a.cc:6:5: error: 'string' was not declared in this scope
6 | string ... |
s961884184 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> pic(H);
for (int i=0; i<H; i++){
cin >> pic.at(i) >> endl;
}
W += 2;
for(int i=0; i<W; i++) {
cout << "#";
}
cout << endl;
for(int i=0; i<H; i++) {
cout << "#" << pic.at(i) << "#... | a.cc: In function 'int main()':
a.cc:10:22: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and '<unresolved overloaded function type>')
10 | cin >> pic.at(i) >> endl;
| ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/sstream:40,
from /... |
s751862940 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> pic(H);
for (i=0; i<H; i++){
cin >> pic.at(i) >> endl;
}
W += 2;
for(i=0; i<W; i++) {
cout << "#";
}
cout << endl;
for(i=0; i<H; i++) {
cout << "#" << pic.at(i) << "#" << endl;
... | a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
9 | for (i=0; i<H; i++){
| ^
a.cc:15:7: error: 'i' was not declared in this scope
15 | for(i=0; i<W; i++) {
| ^
a.cc:20:7: error: 'i' was not declared in this scope
20 | for(i=0; i<H; i++) {
... |
s506677434 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;(int)(n);i++)
int main() {
int H,W;
cin >> H >> W;
vector<char> vec((W+2)*(H+2));
int i=0;
rep(i,H+2){
rep(j,W+2){
if(i==0||(i==H+1){
vec.at(i*(W+2)+j) = '#';
}
else{
if(j==0||j==W+1)
... | a.cc: In function 'int main()':
a.cc:13:24: error: expected ')' before '{' token
13 | if(i==0||(i==H+1){
| ~ ^
| )
a.cc:22:5: error: expected primary-expression before '}' token
22 | }
| ^
|
s531675405 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;(int)(n);i++)
int main() {
int H,W;
cin >> H >> W;
vector<char> vec((W+2)*(H+2));
int i=0;
rep(i,H+2){
rep(j,W+2){
if(i=0||i=H+1){
vec.at(i*(W+2)+j) = '#';
}
else{
if(j=0||j=W+1)
vec.... | a.cc: In function 'int main()':
a.cc:13:13: error: lvalue required as left operand of assignment
13 | if(i=0||i=H+1){
| ~^~~
a.cc:17:15: error: lvalue required as left operand of assignment
17 | if(j=0||j=W+1)
| ~^~~
|
s568227509 | 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(i);
}
for(int i=0;i<W+2;i++){
cout << '#';
if(i==W-1){cout <<endl;}
}
for(int i=0;i<H;i++){
cout << '#'<<vec(i) << '#'<<endl;
}
for(int i=0;i<W+... | a.cc: In function 'int main()':
a.cc:9:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
9 | cin >> vec(i);
| ~~~^~~
a.cc:16:21: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
16 | cout << '#'<<vec(i) << '#'<<... |
s405548089 | 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(i);
}
for(int i=0;i<W;i++){
cout << '#';
if(i==W-1){cout <<endl;}
}
for(int i=0;i<H;i++){
cout << '#'<<vec(i) << '#'<<endl;
}
for(int i=0;i<W;i+... | a.cc: In function 'int main()':
a.cc:9:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
9 | cin >> vec(i);
| ~~~^~~
a.cc:16:21: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
16 | cout << '#'<<vec(i) << '#'<<... |
s117759543 | p03712 | C++ | #pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define int long long // 禁忌
using ll = long long;
using lld = long double;
#define P pair<ll,ll>
#define Vi vector<ll>
#define VVi vector<vector<ll>>
#define Vd vector<double>
#defin... | a.cc: In function 'int main()':
a.cc:69:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'emplace_back'
69 | #define pb(n) emplace_back(n)
| ^~~~~~~~~~~~
a.cc:465:21: note: in expansion of macro 'pb'
465 | REP(i,w+2) around.pb('#');
| ... |
s766003327 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
string line="";
for(int j=0;j<W+2;j++){
line += '#'
}
for(int i=0;i<H+2;i++){
if(i==0||i==H+1){
cout << line << endl;
}
else{
string tmp;
cin >> tmp;
cout << '#' << tmp << '#' ... | a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before '}' token
11 | line += '#'
| ^
| ;
12 | }
| ~
|
s354673325 | p03712 | C++ | #%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
#cythonを使うために実行
#%load_ext Cython
#%%code
def resolve():
H,W=map(int, input().split())
l="#"*(W+2)
print(l)
for i in range(H):
s=input()
print("#"+s+"#")
print(l)
#%%submit!
resolve()
| a.cc:1:2: error: invalid preprocessing directive #%
1 | #%% for atcoder uniittest use
| ^
a.cc:4:2: error: invalid preprocessing directive #cython\U00003092\U00004f7f\U00003046\U0000305f\U00003081\U0000306b\U00005b9f\U0000884c
4 | #cythonを使うために実行
| ^~~~~~~~~~~~~~~~~~~~~~
a.cc:5:2: error: invalid p... |
s259389107 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H=0;
int W=0;
vector<vector<char>> a(H, vector<char>(W));
vector<vector<char>> b(H, vector<char>(W));
for (int i = 0; i < H; i++){
for (int j = 0; j < W; j++){
cin >> a.at(i).at(j);
}
}
for (int i = 0; i < H+2; i++){
... | a.cc: In function 'int main()':
a.cc:16:25: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
16 | b.at(i).at(j) = "#";
| ^~~
| |
| ... |
s492813475 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H=0;
int W=0;
vector<vector<char>> a(H, vector<char>(W));
vector<vector<char>> b(H, vector<char>(W));
for (int i = 0; i < H; i++){
for (int j = 0; j < W; j++){
cin >> a.at(i).at(j);
}
}
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<char>, char>::value_type' {aka 'char'} [-fpermissive]
16 | b.at(i).at(j)="#";
| ^~~
| |
| c... |
s825161442 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> a(H);
for(int i=0; i<W+2; i++){
cout << "#";
if(i==W+1) cout << endl;
}
for(int i=0; i<H i++){
cout << "#" + a.at(i) + "#" << endl;
}
for(int i=0; i<W+2; i++){
cout << "#";
... | a.cc: In function 'int main()':
a.cc:15:19: error: expected ';' before 'i'
15 | for(int i=0; i<H i++){
| ^~
| ;
|
s611741506 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<string>> a(100, vector<string>(101));
vector<vector<string>> b(102, vector<string>(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]='#';
}
}
... | a.cc: In function 'int main()':
a.cc:12:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::__cxx11::basic_string<char> > >, std::vector<std::__cxx11::basic_string<char> > >::value_type' {aka 'std::vector<... |
s924800944 | p03712 | C++ | include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
string a[h];
for(int i; i<h; i++){
cin >> a[i];
}
string b[h+2][w+2];
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++)
... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> h >> w;
| ^~~
a.cc:7:3: error: 'string' was not declared in this scope
7 | string a[h];
| ^~~~~~
a.... |
s132296183 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector <string> a(h);
for(int i; i<h; i++){
cin >> a.at(i);
}
for(int i=0; i<h+2; i++){
for(int j=0; j<w+2; j++){
if(i==0||i==h+1||j==0||j==w+1){
cout << "#";
}
else if(j==1){
c... | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s787734689 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
string a[101][101];
string b[102][102];
int main() {
int h,w;
cin>>h>>w;
for(int i=1;i<h+1;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(in... | a.cc: In function 'int main()':
a.cc:14:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [101]' {aka 'std::__cxx11::basic_string<char> [101]'})
14 | cin>>a[i];
| ~~~^~~~~~
| | |
| | std::... |
s292575522 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
string a[100][101];
for(int i=1;i<h+1;i++)
cin>>a[i];
string b[102][102];
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 ... | a.cc: In function 'int main()':
a.cc:12:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [101]' {aka 'std::__cxx11::basic_string<char> [101]'})
12 | cin>>a[i];
| ~~~^~~~~~
| | |
| | std::... |
s234401837 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
string a[h];
for(int i=1;i<h+1)
cin>>a[i];
string b[h+2];
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++)
... | a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before ')' token
11 | for(int i=1;i<h+1)
| ^
| ;
|
s106311677 | p03712 | C++ | #include<iostream>
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> vec;
cin >> vec.at(i);
cout << "#" << vec[i] << "#" << endl;
... | a.cc: In function 'int main()':
a.cc:10:13: error: 'vector' was not declared in this scope
10 | vector<string> vec;
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#incl... |
s672445033 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
string a[];
for(int i=0;i<h;i++)
{
cin>>a[i];
}
string b[];
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(... | a.cc: In function 'int main()':
a.cc:8:10: error: array size missing in 'a'
8 | string a[];
| ^
a.cc:15:11: error: array size missing in 'b'
15 | string b[];
| ^
|
s230200957 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
string a[h];
for(int i=1;i<=h;i++)
cin>>a[i]
for(int i=0;i<=h+1;i++)
{
for(int j=0;j<=h+1;j++)
{
if(i==0||j==0||i==h+1||j==w+1)
a[i][j]='#'
}
}
for(int i=0;i<=h+1;... | a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before 'for'
13 | cin>>a[i]
| ^
| ;
14 |
15 | for(int i=0;i<=h+1;i++)
| ~~~
a.cc:15:17: error: 'i' was not declared in this scope
15 | for(int i=0;i<=h+1;i++)
| ... |
s477355565 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h;
int 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){
cout << '#';
}
cout << endl;
for (int i = 0; i < h; i++) {
cout << '#' << vec.at(i) << '#' << e... | a.cc: In function 'int main()':
a.cc:13:27: error: expected ';' before ')' token
13 | for(int i = 0; i < w + 2){
| ^
| ;
a.cc:22:27: error: expected ';' before ')' token
22 | for(int i = 0; i < w + 2){
| ^
| ... |
s887443676 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
/*最初に,縦H+ 2行,横W+ 2列の文字配列bを用意し,#で埋めておきます.
次に,各1iH,1jWごとにai;jをbi+1;j+1へコピーします.
最後に,配列bの内容を出力すればよいです.*/
int main() {
int H, W; cin >> H >> W;
cout << char(W+2, '#') << endl;
for (int i=0; i<H+2; i++) {
string s;
cin >> s;
cout << '#'+s+'#' << endl;
}
... | a.cc: In function 'int main()':
a.cc:10:24: error: expression list treated as compound expression in functional cast [-fpermissive]
10 | cout << char(W+2, '#') << endl;
| ^
a.cc:16:24: error: expression list treated as compound expression in functional cast [-fpermissive]
16 | cou... |
s351630633 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
victor<string>A( W - 2 ) ;
for ( int i = 0; i < H - 2; i++ ) {
cin >> A.at(i) ;
}
for ( int i = 0; i < W; i++ ) {
cout << "#";
}
cout << endl;
for ( int i = 0; i < H - 2; i++ ) {
cout << "#" << ... | a.cc: In function 'int main()':
a.cc:7:3: error: 'victor' was not declared in this scope
7 | victor<string>A( W - 2 ) ;
| ^~~~~~
a.cc:7:16: error: expected primary-expression before '>' token
7 | victor<string>A( W - 2 ) ;
| ^
a.cc:7:17: error: 'A' was not declared in this scope... |
s000166197 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
string S;
cin >>H >> W >> S;
vector<char> vec (H+1,#);
for (i=0; i<H+1; i++){
cout<<vec.,at(i)
}
} | a.cc:8:25: error: stray '#' in program
8 | vector<char> vec (H+1,#);
| ^
a.cc: In function 'int main()':
a.cc:8:26: error: expected primary-expression before ')' token
8 | vector<char> vec (H+1,#);
| ^
a.cc:9:8: error: 'i' was not declared in this... |
s277278006 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B;
cis >>A >>B;
cout << A*2 + B*2 + 4 << endl;
}
| a.cc: In function 'int main()':
a.cc:6:3: error: 'cis' was not declared in this scope; did you mean 'cos'?
6 | cis >>A >>B;
| ^~~
| cos
|
s985078259 | p03712 | C++ | #include<stdio.h>
char a[100][101],b[102][102];
int main(void){
int h,w;
scanf("%d %d",&h,&w);
for(int loop1=0;loop1<h;loop1++){
scanf("%s",a[loop1]);
}
for(int loop1=0;loop1<h+2;loop1++){
for(int loop2=0;loop2<w+2;loop2++){
b[loop1][loop2]="#";
}
}
for(int loop1=0;loop1<h;loop1++){
... | a.cc: In function 'int main()':
a.cc:11:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
11 | b[loop1][loop2]="#";
| ^~~
| |
| const char*
|
s496029261 | p03712 | C++ | #include<stdio.h>
char a[100][101],b[102][102];
int main(void){
int h,w;
scanf("%d %d",&h,&w);
for(int loop1=0;loop1<h;loop1++){
scanf("%s",a[loop1]);
}
for(int loop1=0;loop1<h+2;loop1++){
for(int loop2=0;loop2<w+2;loop2++){
b[loop1][loop2]='#';
}
}
for(int loop1=0;loop1<h;loop1++){
... | a.cc: In function 'int main()':
a.cc:20:21: error: 'loop' was not declared in this scope; did you mean 'loop2'?
20 | for(int loop2=0;loop<w+2;loop2++){
| ^~~~
| loop2
|
s399783896 | p03712 | C++ | #include<stdio.h>
char a[100][101],b[102][102];
int main(void){
int h,w;
scanf("%d %d",&h,&w);
for(int loop1=0;loop1<h;loop1++){
scanf("%s",a[i]);
}
for(int loop1=0;loop1<h+2;loop1++){
for(int loop2=0;loop2<w+2;loop2++){
b[loop1][loop2]='#';
}
}
for(int loop1=0;loop1<h;loop1++){
for(... | a.cc: In function 'int main()':
a.cc:7:18: error: 'i' was not declared in this scope
7 | scanf("%s",a[i]);
| ^
a.cc:16:43: error: expected primary-expression before ']' token
16 | b[loop1+1][loop2+1]=a[loop1][loop2];]
| ^
a.cc:19:19... |
s092410663 | p03712 | C++ | h,w=map(int, input().split())
li=['#'*(w+2)]
for i in range(h):
li.append('#'+input()+'#')
li.append('#'*(w+2))
for n in li:
print(n) | a.cc:1:1: error: 'h' does not name a type
1 | h,w=map(int, input().split())
| ^
|
s674367348 | p03712 | C++ | h,w=map(int, input().split())
li=['#'*(w+2)]
for i in range(h):
li.append('#'+input()+'#')
li.append('#'*(w+2))
for n in li:
print(n) | a.cc:1:1: error: 'h' does not name a type
1 | h,w=map(int, input().split())
| ^
|
s235587177 | p03712 | C++ | #include <iostream>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);++i)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
int main(){
int h, w;
cin >> h >> w;
string s;
rep(i, h+2){
printf('#');
if(i == 0 || i == h+1){
rep(i, w){
printf('#');
}
}else{
ci... | a.cc: In function 'int main()':
a.cc:15:12: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
15 | printf('#');
| ^~~
| |
| char
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_convers... |
s409075799 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
char a[n+2][m+2];
for(int i=0;i<=n+1;i++){
if(i==0||i==n+1){
for(int j=0;j<m+2;i++){
cout << "#";
}
cout << endl;
}
cout << "#";
for(int jj=1;jj<=m;jj++)
cin >> a[i][jj];
cout <... | a.cc: In function 'int main()':
a.cc:17:20: error: 'jj' was not declared in this scope; did you mean 'jn'?
17 | cout << a[i][jj];
| ^~
| jn
a.cc: At global scope:
a.cc:21:1: error: expected declaration before '}' token
21 | }
| ^
|
s526322991 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
char a[n+2][m+2];
for(int i=0;i<=n+1;i++){
if(i==0||i==n+1){
for(int j=0;j<m+2;i++){
cout << "#";
}
cout << endl;
}
cout << "#";
for(int j=1;j<=m;j++)
cin >> a[i][j];
cout << a[... | a.cc: In function 'int main()':
a.cc:17:20: error: 'j' was not declared in this scope
17 | cout << a[i][j];
| ^
a.cc: At global scope:
a.cc:21:1: error: expected declaration before '}' token
21 | }
| ^
|
s923022885 | 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);
vec.at(i)='#'+vec.at(i)+'#';
}
for(int i=0;i<W;i++){
cout<<'#';
}
endl;
for(int i=0;i<H;i++){
cout<<vec.at(i)<<endl;
}
for(int i=0;i<W;i++){
... | a.cc: In function 'int main()':
a.cc:14:7: error: statement cannot resolve address of overloaded function
14 | endl;
| ^
a.cc:21:7: error: statement cannot resolve address of overloaded function
21 | endl;
| ^
|
s277303962 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int i,j;
cin >> i >> j;
vector<string> str(i);
for(int l=0;l<i;l++) {
cin >> str.at(l);
}
for(int l=0;l<j+2;l++) {
cout << "#";
}
cout << endl;
for(int l=0;l<i;l++) {
cout << "#" << A.at(l) << "#" << endl;
}
for(int l... | a.cc: In function 'int main()':
a.cc:18:20: error: 'A' was not declared in this scope
18 | cout << "#" << A.at(l) << "#" << endl;
| ^
|
s253157327 | p03712 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s129144456 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector <char> S(W+2);
for (int i = 0; i<W+2; i++){
S.at(i) = '#';
}
cout << S << endl;
for ( int j = 1; j<H-1;j++){
for (int i=0; i<W+2; i++){
if(i == 0|i == W+1){
S.at(i) = '#';
}
else{
cin >>... | a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
11 | cout << S << endl;
| ~~~~ ^~ ~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<... |
s496086670 | 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 ];... | a.cc:9:16: error: extended character ’ is not valid in an identifier
9 | b [ i ][ j ] = ’# ’;
| ^
a.cc:9:17: error: stray '#' in program
9 | b [ i ][ j ] = ’# ’;
| ^
a.cc:9:19: error: extended character ’ is not valid in an identifier
9 | b [ i ][ j ] = ’# ’;
... |
s741887791 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int h, w;
int a[h+2][w+2];
for(int i(0);i<h+2;i++)
for(int j(0);j<w+2;j++)
a[i][j]='#';
for ( int i = 0; i < H ; i ++)
scanf ("% s " , a [ i ]);
/*for(int i(1);i<h+1;i++)
for(int j(1);j<w+1;j++)
cin >> a[i][j];*/
for(int i(0... | a.cc: In function 'int main()':
a.cc:10:24: error: 'H' was not declared in this scope
10 | for ( int i = 0; i < H ; i ++)
| ^
|
s923520334 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
vector<char>pic(w);
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;i++){
cin >> pic.at(j) ;
}
cout << pic ;
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<char>')
20 | cout << pic ;
| ~~~~ ^~ ~~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_... |
s334770386 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
for(int j = 0 ; j < w + 2 ; j++) cout << "#" ;
cout << endl;
for(int i = 0 ; i < h ; i++){
string s;
cin >> s;
cout << "#" << s << "#" << endl;
}
for(int j = 0 ; j < w + 2 ; j++) co... | a.cc: In function 'int main()':
a.cc:16:52: error: expected primary-expression before ';' token
16 | for(int j = 0 ; j < w + 2 ; j++) cout << "#" <<;
| ^
|
s223717295 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W+2,'#');
vec2 = vec;
for (int A=0; A<W+2; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H+2; i++) {
for (int j=1; j<W+1; j++) cin >> vec.at(j);
for (int k=0; k<W+2; k++) cout << vec.at(k) <<endl;
... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vec2' was not declared in this scope; did you mean 'vec'?
8 | vec2 = vec;
| ^~~~
| vec
|
s265204397 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W+2,'#');
vec2 = vec;
for (int A=0; A<W+2; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H+2; i++) {
for (int j=1; j<W+1; j++) cin >> vec.at(j);
for (int k=0; k<W+2; k++) cout << vec.at(k) <<endl;
... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vec2' was not declared in this scope; did you mean 'vec'?
8 | vec2 = vec;
| ^~~~
| vec
|
s191338062 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W+2,'#');
vec2 = vec;
for (int A=0; A<W+2; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H+2; i++) {
for (int j=1; j<W+1; j++) cin >> vec.at(j);
for (int k=0; k<W+2; k++) cout << vec.at(k) <<endl;
... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vec2' was not declared in this scope; did you mean 'vec'?
8 | vec2 = vec;
| ^~~~
| vec
a.cc:15:17: error: 'k' was not declared in this scope
15 | for (int k=0; k<W+2; k++) cout << vec2.at(k) <<endl;
| ^
|
s271406913 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W+2,'#');
vec2 = vec;
for (int A=0; A<W+2; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H+2; i++) {
for (int j=1; j<W+1; j++) cin >> vec.at(j);
for (int k=0; k<W+2; k++) cout << vec.at(k) <<endl;
... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vec2' was not declared in this scope; did you mean 'vec'?
8 | vec2 = vec;
| ^~~~
| vec
a.cc:14:16: error: redeclaration of 'std::vector<char> vec'
14 | vector<char> vec(W+2,'#')
| ^~~
a.cc:7:16: note: 'std::vector<char> ve... |
s913919574 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W+2,'#');
vec2 = vec;
for (int A=0; A<W+2; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H+2; i++) {
for (int j=1; j<W+1; j++) cin >> vec.at(j);
for (int k=0; k<W+2; k++) cout << vec.at(k) <<endl;
... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vec2' was not declared in this scope; did you mean 'vec'?
8 | vec2 = vec;
| ^~~~
| vec
|
s488997384 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<string> vec(i)
for (int i = 0;i < H;i++) {
cin >> vec(i)
}
for (int i = 0;i < W+1;i++) cout <<"#";
cout<<endl;
for (int i = 0;i < H;i++) cout <<"#"<<vec(i)<<"#"<<endl;
for(int i = 0;i < H;i++) {
cin >> vec(... | a.cc: In function 'int main()':
a.cc:7:22: error: 'i' was not declared in this scope
7 | vector<string> vec(i)
| ^
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for (int i = 0;i < H;i++) {
| ^~~
a.cc:13:44: error: no match for call to '(std::vector<std::__cxx11::ba... |
s998794785 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<string> vec(i)
for (int i = 0;i < H;i++) {
cin >> vec(i)
}
for (int i = 0;i < W+1;i++) cout <<"#";
cout<<endl;
for (int i = 0,i < H;i++) cout <<"#"<<vec(i)<<"#"<<endl;
for(int i = 0,i < H;i++) {
cin >> vec(... | a.cc: In function 'int main()':
a.cc:7:22: error: 'i' was not declared in this scope
7 | vector<string> vec(i)
| ^
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for (int i = 0;i < H;i++) {
| ^~~
a.cc:13:19: error: expected ';' before '<' token
13 | for (int i ... |
s525740849 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,'#');
for (int A=0; A<W; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H; i++) {
for (int j=1; j<W-1; j++) cin >> vec.at(j);
for (int k=0; k<W; k++) cout << vec.at(k) <<endl;
}
vector<char> vec... | a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'for'
14 | for (int B=0; B<W; B++) cout << vec2.at(B) <<endl;
| ^~~
a.cc:14:17: error: 'B' was not declared in this scope
14 | for (int B=0; B<W; B++) cout << vec2.at(B) <<endl;
| ^
|
s403645864 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,'#');
vec2 = vec;
for (int A=0; A<W; A++) cout << vec.at(A) <<endl;
for (int i=0; i<H; i++) {
for (int j=1; j<W-1; j++) cin >> vec.at(j);
for (int k=0; k<W; k++) cout << vec.at(k) <<endl;
}
f... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vec2' was not declared in this scope; did you mean 'vec'?
8 | vec2 = vec;
| ^~~~
| vec
|
s654828081 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,'#');
int i,j;
for (int i=0; i<H; i++) {
for (int j=1; j<=vec.size(); j++) {
cin >> vec.at(j);
}
cout << vec <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
13 | cout << vec <<endl;
| ~~~~ ^~ ~~~
| | |
| | std::vector<char>
| std::ostream {aka std::... |
s855620680 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,#);
int i,j;
for (int i=0; i<H; i++) {
for (int j=1; j<=vec.size(); j++) {
cin >> vec.at(j);
}
cout << vec <<endl;
}
}
| a.cc:7:22: error: stray '#' in program
7 | vector<char> vec(W,#);
| ^
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before ')' token
7 | vector<char> vec(W,#);
| ^
a.cc:13:10: error: no match for 'operator<<' (operand typ... |
s048432602 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,#)
int i,j;
for (int i=0; i<H; i++) {
for (int j=1; j<=vec.size(); j++) {
cin >> vec.at(j);
}
cout << vec <<endl;
}
}
| a.cc:7:22: error: stray '#' in program
7 | vector<char> vec(W,#)
| ^
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before ')' token
7 | vector<char> vec(W,#)
| ^
a.cc:8:3: error: expected ',' or ';' before 'int'
8 | ... |
s433788497 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,#)
for (int i=0; i<H; i++) {
for (int j=1; j<=vec.size(); j++) {
cin >> vec.at(j);
}
cout << vec <<endl;
}
}
| a.cc:7:22: error: stray '#' in program
7 | vector<char> vec(W,#)
| ^
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before ')' token
7 | vector<char> vec(W,#)
| ^
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | ... |
s604848557 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,#)
for (int i=1; i<H; i++) {
for (int j=1; j<=vec.size(); j++) {
cin >> vec.at(j);
}
cout << vec <<endl;
}
}
| a.cc:7:22: error: stray '#' in program
7 | vector<char> vec(W,#)
| ^
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before ')' token
7 | vector<char> vec(W,#)
| ^
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | ... |
s969911040 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> vec(W,"#")
for (int i=1; i<H; i++) {
for (int j=1; j<=vec.size(); j++) {
cin >> vec.at(j);
}
cout << vec <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:25: error: no matching function for call to 'std::vector<char>::vector(int&, const char [2])'
7 | vector<char> vec(W,"#")
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
... |
s226767989 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int mai(){
int H, W, Q;
cin >> H >> W;
Q = H * W;
vector<char> Ass(Q);
for(int i = 0;i<Q;i++){
cin >> Ass.at(i);
}
for(int j = 0;j<W+2;j++){
cout << "#";
}
cout << endl;
for(int k = 0;k<H;k++){
cout << "#";
for(int l = 0;l<W;l++){
int co = k*W + ... | a.cc: In function 'int mai()':
a.cc:32:1: warning: no return statement in function returning non-void [-Wreturn-type]
32 | }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.