submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s514660609 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector<vector<char>> a(H+2)(W+2);
for(int i=1;i<=H;i++){
for(int j=1;j<=W;j++){
cin>>a[i][j];
}
}
for(int i=0;i<H+2;i++){
a[i][0] = '#';
a[i][W+1] = '#';
}
for(int ... | a.cc: In function 'int main()':
a.cc:7:32: error: expected ',' or ';' before '(' token
7 | vector<vector<char>> a(H+2)(W+2);
| ^
|
s186803063 | 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<h;i++){
cin >> a.at(i)
}
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{
cout << "#" <... | a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before '}' token
9 | cin >> a.at(i)
| ^
| ;
10 | }
| ~
|
s840198316 | 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 <<'#' ;
for(int j=0;j<H;j++){
cout <<endl <<'#';
for(int i=0; i<W;i++)
cout <<A.at(j*W+i);
cout <<'#';
}
c... | a.cc: In function 'int main()':
a.cc:15:14: error: 'A' was not declared in this scope
15 | cout <<A.at(j*W+i);
| ^
|
s304308958 | 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 <<'#' ;
for(int j=0;j<H;j++){
cout <<endl <<'#';
for(int i=0; i<)
cout <<A.at(j*W+i);
cout <<'#';
}
cout<<... | a.cc: In function 'int main()':
a.cc:14:20: error: expected primary-expression before ')' token
14 | for(int i=0; i<)
| ^
a.cc:14:20: error: expected ';' before ')' token
14 | for(int i=0; i<)
| ^
| ;
a.cc:15:14: error: 'A' was not... |
s268918051 | 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 <<'#' ;
for(int j=0;j<H;j++){
cout <<endl <<'#';
for(int i=0; i<)
cout <<A.at(j*W+i);
cout <<'#';
}
cout<<... | a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin <<H <<W;
| ~~~ ^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:7: note: candidate: 'operat... |
s795423112 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin >> H >> W;
cout << string(W + 2, '#') << endl;
for (int i = 0; i < H; i++) {
string h;
cin >> h;
cout << '#' << h << '#' << endl;
}
cout << string(W + 2, '#') << endl;
}
#include <bits/stdioc++.h>
using names... | a.cc:19:10: fatal error: bits/stdioc++.h: No such file or directory
19 | #include <bits/stdioc++.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
|
s274254092 | p03712 | C++ | #include <bits/stdioc++.h>
using namespace std;
int main () {
int H, W;
cin >> H >> W;
cout << string(W + 2, '#') << endl;
for (int i = 0; i < H; i++) {
string h;
cin >> h;
cout << '#' << h << '#' << endl;
}
cout << string(W + 2, '#') << endl;
}
| a.cc:1:10: fatal error: bits/stdioc++.h: No such file or directory
1 | #include <bits/stdioc++.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
|
s305818437 | p03712 | C++ | #include <bits/stdioc++.h>;
using namespace std;
int main () {
int H, W;
cin >> H >> W;
cout >> string(W + 2, '#') >> endl;
for (int i = 0; i < H + 2; i++) {
string h;
cin >> h;
cout >> '#' >> h >> '#' >> endl;
}
cout >> string(W + 2, '#') >> endl;
}
| a.cc:1:27: warning: extra tokens at end of #include directive
1 | #include <bits/stdioc++.h>;
| ^
a.cc:1:10: fatal error: bits/stdioc++.h: No such file or directory
1 | #include <bits/stdioc++.h>;
| ^~~~~~~~~~~~~~~~~
compilation terminated.
|
s435955373 | p03712 | C++ | #include <bits/stdioc++.h>
using namespace std;
int main () {
int H, W;
cin >> H >> W;
cout >> string(W + 2, '#') >> endl;
for (int i = 0; i < H + 2; i++) {
string h;
cin >> h;
cout >> '#' >> h >> '#' >> endl;
}
cout >> string(W + 2, '#') >> endl;
}
| a.cc:1:10: fatal error: bits/stdioc++.h: No such file or directory
1 | #include <bits/stdioc++.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
|
s904173816 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> output(H);
for (int i = 0; i < H; i++) cin >> vector[i];
cout << '#' * (W + 2) << endl;
for (int i = 0; i < H; i++) cout << '#' << vector[i] << '#' << endl;
cout << '#' * (W + 2) << endl;
}
| a.cc: In function 'int main()':
a.cc:8:44: error: missing template arguments before '[' token
8 | for (int i = 0; i < H; i++) cin >> vector[i];
| ^
a.cc:10:52: error: missing template arguments before '[' token
10 | for (int i = 0; i < H; i++) cout << '#' << v... |
s736969186 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> output(H);
for (int i = 0, i < H, i++) cin >> vector[i];
cout << '#' * (W + 2) << endl;
for (int i = 0, i < H, i++) cout << '#' << vector[i] << '#' << endl;
cout << '#' * (W + 2) << endl;
}
| a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '<' token
8 | for (int i = 0, i < H, i++) cin >> vector[i];
| ^~
| ;
a.cc:8:21: error: expected primary-expression before '<' token
8 | for (int i = 0, i < H, i++) cin >> vector[i];
... |
s878486355 | p03712 | C++ | #include <iostream>
using namespace std;
int main(){
int n.m;
cin >> n >> m;
char a[n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin >> a[i][j];
}
}
char b[n+2][m+2];
for(int i=0;i<n+2;i++){
b[i][0]='#';
b[i][m+1]='#';
}
for(int i=0;i<m+2;i++){
b[0][i]='#';
b[n+1][... | a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
5 | int n.m;
| ^
a.cc:6:10: error: 'n' was not declared in this scope
6 | cin >> n >> m;
| ^
a.cc:6:15: error: 'm' was not declared in this scope; did you mean 'tm'?
6 | cin >> n >> m;
... |
s222537581 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
for(int i=0; i<b+2; i++){
cout<<'#';
}
cout<<endl;
//最初の#
for(int j=0; j<a; j++){
cout<<'#';
vector<string> vec(b);
fou(int m=0; m<b; m++){
cin>>vec.at(i);
cout<<vec.at(i);
}
cout<<'#';<<endl;
}
for(int i=0; i<... | a.cc: In function 'int main()':
a.cc:15:21: error: expected primary-expression before 'int'
15 | fou(int m=0; m<b; m++){
| ^~~
a.cc:15:30: error: 'm' was not declared in this scope
15 | fou(int m=0; m<b; m++){
| ^
a.cc:19... |
s394235356 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
for(int i=0; i<b+2; i++){
cout<<'#';
}
cout<<endl;
//最初の#
for(int j=0; j<a; j++){
cout<<'#';
vector<string> vec(b);
fou(int m=0; m<b; m++){
cin>>vec.at(i);
cout<<vec.at(i);
}
cout<<'#';<<endl;
}
for(int i=0; i<... | a.cc: In function 'int main()':
a.cc:15:21: error: expected primary-expression before 'int'
15 | fou(int m=0; m<b; m++){
| ^~~
a.cc:15:30: error: 'm' was not declared in this scope
15 | fou(int m=0; m<b; m++){
| ^
a.cc:19... |
s145542927 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,W;
char R[100][100];
cin >> H >> W;
for(int y=0;y<H+2;y++){
for(int x=0;x<W+2;x++){
if(x==0||y==0)
R[x][y]="#";
else
cin>>R[x][y];
}
}
for(int y=0;y<H+2;y++){
for(int x=0;x<W+2;x++){
cout<<R[x][y... | a.cc: In function 'int main()':
a.cc:7:10: error: 'H' was not declared in this scope
7 | cin >> H >> W;
| ^
a.cc:11:17: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
11 | R[x][y]="#";
| ^~~
| |
| co... |
s454200891 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w, i;
string s;
cin >> h >> w;
for(i=0; i<w+2; i++){
cout << '#'
}
cout << '\n';
for(i=0; i<h; i++){
cout << '#';
cin >> s;
cout << s;
cout << "#\n";
}
for(i=0; i<w+2; i++){
... | a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '}' token
9 | cout << '#'
| ^
| ;
10 | }
| ~
a.cc:19:20: error: expected ';' before '}' token
19 | cout << '#'
| ^
... |
s527643399 | p03712 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int h,w;
char s[100][100];
cin>>h>>w;
for(int i=0;i<h;++i){
for(int j=0;j<w;++j)cin>>s[i][j];
}
cin>>s;
for(int i=0;i<=h+1;++i)cout<<"#";
cout<<endl;
for(int j=0;j<w;++j){
cout<<"#";
for(int i=0;i<h;++i)cout<<s... | a.cc: In function 'int main()':
a.cc:12:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char [100][100]')
12 | cin>>s;
| ~~~^~~
| | |
| | char [100][100]
| std::istream {aka std::basic_i... |
s850345825 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> a((H+2)*(W+2), "#");
for (int i=0; i<(H+2)*(W+2); i++) {
if ( (i !< W+2) || (i !> (H+2)*(W+2)-(W+2)-1 ) ) {
if ( (i%(W-1)==0) || (i%*W==0) ) {
cin >> a.at(i);
}
}
}
for (int i=... | a.cc: In function 'int main()':
a.cc:8:34: error: no matching function for call to 'std::vector<char>::vector(int, const char [2])'
8 | vector<char> a((H+2)*(W+2), "#");
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functi... |
s692683515 | p03712 | C | #include<iostream>
#include<algorithm>
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++){
string s; cin>>s;
cout<<"#"<<s<<"#"<<endl;
}
for(int i=0;i<w+2;i++)cout<<"#";
cout<<endl;
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s138594784 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> a((H+2)*(W+2), "#");
for (int i=0; i<(H+2)*(W+2); i++) {
if ( (i !< W+2) || (i !> (H+2)*(W+2)-(W+2)-1 ) ) {
if ( (i%(W-1)==0) || (i%*W==0) ){
cin >> a.at(i);
}
}
}
for (int i=0... | a.cc: In function 'int main()':
a.cc:8:34: error: no matching function for call to 'std::vector<char>::vector(int, const char [2])'
8 | vector<char> a((H+2)*(W+2), "#");
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functi... |
s183652366 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H ,W;
cin >> H >> W;
vector<vector<char>> data(H + 2, vector<int> (W + 2, '#'));
for(int i = 0; i < H; i++) {
for(int j = 0; j < W; j++) {
cin >> data.at(i + 1).at(j + 1);
}
}
for(int i = 0; i < H + 2; i++) {
for(int j = 0; j ... | a.cc: In function 'int main()':
a.cc:6:60: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int, std::vector<int>)'
6 | vector<vector<char>> data(H + 2, vector<int> (W + 2, '#'));
| ^
In file included from /usr/includ... |
s047693399 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
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... | 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... |
s511829747 | 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... |
s114876221 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
{
char a[101][101];
char b[102][102];
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;... | a.cc:3:1: error: expected unqualified-id before '{' token
3 | {
| ^
|
s056852290 | 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 (... | a.cc:10:11: error: extended character ’ is not valid in an identifier
10 | b[i][j] = ’#’;
| ^
a.cc:10:12: error: stray '#' in program
10 | b[i][j] = ’#’;
| ^
a.cc:10:13: error: extended character ’ is not valid in an identifier
10 | b[i][j] = ’#’;
| ^
a.cc: In... |
s910524615 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
vector<vector<string>>vec(H,vector<string>(W));
for(int i=0;i<H;++i){
for(int j=0;j<W;++j){
cin>>vec.at(i).at(j);
}
}
int k=0;
while(k<W+2){
cout<<'#';
k++;
}
cout<<endl;
for(int i=0;i<H;i++){
... | a.cc: In function 'int main()':
a.cc:26:7: error: redeclaration of 'int k'
26 | int k=0;
| ^
a.cc:13:7: note: 'int k' previously declared here
13 | int k=0;
| ^
|
s108559622 | 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<W+2; i++){
cout << '#';
}
cout << endl;
for (int i=1; i<H+1; i++){
pic.at(i).at(0) = '#';
pic.at(i).at(W+1) = '#';
for (int j=1; j<W+... | a.cc: In function 'int main()':
a.cc:21:24: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type {aka std::vector<char>}) (int&)'
21 | cout << pic.at(i)(j);
| ~~~~~~~~~^~~
|
s963762184 | 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<W+2, i++){
cout << '#';
}
cout << endl;
for (int i=1; i<H+1; i++){
pic.at(i).at(0) = '#';
pic.at(i).at(W+1) = '#';
for (int j=1; j<W+... | a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before ')' token
9 | for(int i=0; i<W+2, i++){
| ^
| ;
a.cc:20:28: error: expected ';' before ')' token
20 | for(int j=0; j<W+2, j++){
| ^
| ... |
s041958694 | 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<W+2, i++){
cout << '#';
}
cout << endl;
for (int i=1; i<H+1; i++){
pic.at(i).at(0) = '#';
pic.at(i).at(W+1) = '#';
for (int j=1; j<W+... | a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before ')' token
9 | for(int i=0; i<W+2, i++){
| ^
| ;
a.cc:20:28: error: expected ';' before ')' token
20 | for(int j=0; j<W+2, i++){
| ^
| ... |
s778670892 | 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));
pic.at(0) = vector<char> (W+2,'#');
pic.at(H+1) = vector<char> (W+2,'#');
for (int i=0, i<H+2, i++){
pic.at(i).at(0) = '#';
pic.at(i).at(W+1) = '#';
for (int... | a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '<' token
11 | for (int i=0, i<H+2, i++){
| ^
| ;
a.cc:11:18: error: expected primary-expression before '<' token
a.cc:11:27: error: expected ';' before ')' token
11 | for (int i=0, i<H+2, i++)... |
s149989243 | p03712 | C++ | #include <bits/stdc++.h>
using manespace std;
int main(){
int H,W;
cin >> H >> W;
vector <vector<char>> pic(H+2, vector<char> (W+2));
pic.at(0) = vector<char> (W+2,'#');
pic.at(H+1) = vector<char> (W+2,'#');
for (int i=0, i<H+2, i++){
pic.at(i).at(0) = '#';
pic.at(i).at(W+1) = '#';
for (int... | a.cc:2:7: error: expected nested-name-specifier before 'manespace'
2 | using manespace std;
| ^~~~~~~~~
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 /usr/inc... |
s642412856 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,i,j;
char a;
cin >> H >> W;
for(i=0;i<W+2;++i){cout << "#";}
cout << endl;
for(j=0;j<H;++j){
cout << "#";
for(i=0;i<W;++i){
cin >> a;
cout << a;
}
cout << "#";
}
cout << endl;
}
for(i=0;i<W+2;++i){co... | a.cc:21:3: error: expected unqualified-id before 'for'
21 | for(i=0;i<W+2;++i){cout << "#";}
| ^~~
a.cc:21:11: error: 'i' does not name a type
21 | for(i=0;i<W+2;++i){cout << "#";}
| ^
a.cc:21:17: error: expected unqualified-id before '++' token
21 | for(i=0;i<W+2;++i){cout << "#"... |
s470448438 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,i,j;
string a;
cin >> H >>W;
for(i=0;i<W+2;++i){cout << "#";}
cout << endl;
for(j=0;j<H;++j){
for(i=0;i<W;++i){
if(i=0){
cout << "#";
cin >> a;
cout << a;
}
else if(i>0&&i<W-1){
cout << a;
}
el... | a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
29 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s821866074 | p03712 | C | #include <stdio.h>
int main(void) {
int h,w,i;
char a[111];
scanf("%d%d",&h,&w);
for(i=0;i<=w+1;i++) {
printf("#");
}
printf("\n");
for(i=0;i<h;i++) {
scanf("%s",a);
printf("#%s#\n",s);
}
for(i=0;i<=w+1;i++) {
printf("#");
}
} | main.c: In function 'main':
main.c:12:21: error: 's' undeclared (first use in this function)
12 | printf("#%s#\n",s);
| ^
main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
|
s409979665 | p03712 | C++ | #include <stdio.h>
int main(void) {
int h,w,i;
char a[111];
scanf("%d%d",&h,&w);
for(i=0;i<=w+1;i++) {
printf("#");
}
printf("\n");
for(i=0;i<h;i++) {
scanf("%s",a);
printf("#%s#\n",s);
}
for(i=0;i<=w+1;i++) {
printf("#");
}
} | a.cc: In function 'int main()':
a.cc:12:21: error: 's' was not declared in this scope
12 | printf("#%s#\n",s);
| ^
|
s252994826 | 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;
string str (W);
for (int j = 0 ;j < H ;j++) {
cout << "#";
for (int k = 0 ;k < W ;k++) {
cin >> str.at (k);
cout << str.at (k);
}
... | a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
11 | string str (W);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /u... |
s792136384 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (i = 0 ;i < W + 2 ;i++) {
cout << "#";
}
cout << endl;
string str (W);
for (j = 0 ;j < H ;j++) {
cout << "#";
for (k = 0 ;k < W ;k++) {
cin >> str.at (k);
cout << str.at (k);
}
cout << ... | a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
7 | for (i = 0 ;i < W + 2 ;i++) {
| ^
a.cc:11:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
11 | string str (W);
| ^
In file included from... |
s101490274 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
int i,j;
cin >> N >> M;
vector<int>vec1(M);
for(i=0;i<M+2;++i){
cout << "#" ;
}
for(j=0;j<N;++j){
for(i=0;i<M;++i){
cin >> vec1.at(i);
if(i=0){
cout << "#"vec1.at(i);
}
else if(0<i<M){
cout << vec1.at(i... | a.cc: In function 'int main()':
a.cc:16:15: error: unable to find string literal operator 'operator""vec1' with 'const char [2]', 'long unsigned int' arguments
16 | cout << "#"vec1.at(i);
| ^~~~~~~
a.cc:22:24: error: expected ';' before string constant
22 | cout <<vec1.at(i)"#"<<en... |
s878406641 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
int i,j
cin >> N >> M;
vector<int>vec1(M);
for(i=0;i<M+2;++i){
cout << "#" ;
}
for(j=0;j<N;++j){
for(i=0;i<M;++i){
cin >> vec1.at(i);
if(i=0){
cout << "#"vec1.at(i);
}
else if(0<i<M){
cout << vec1.at(i)... | a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin >> N >> M;
| ^~~
a.cc:12:7: error: 'j' was not declared in this scope
12 | for(j=0;j<N;++j){
| ^
a.cc:16:15: error: unable to find string literal operator 'operator""vec1' with 'const char [2]', 'lo... |
s692951069 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
int i,j
cin >> N >> M;
vector<int>vec1(M);
for(i=0;i<M+2;++i){
cout << "#" ;
}
for(j=0;J<N;++j){
for(i=0;i<M;++i){
cin >> vec1.at(i);
if(i=0){
cout << "#"vec1.at(i);
}
else if(0<i<M){
cout << vec1.at(i)... | a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin >> N >> M;
| ^~~
a.cc:12:7: error: 'j' was not declared in this scope
12 | for(j=0;J<N;++j){
| ^
a.cc:12:11: error: 'J' was not declared in this scope
12 | for(j=0;J<N;++j){
| ^... |
s644231939 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int high,width;
cin >> high >> width;
vector<string> word(high);
for(int i = 0; i < high; i++){
cin >> word.at(i);
}
std::string str = std::string((width + 2), '#');
cout << str << endl;
for(int i = 0; i < high; i++){
cout << '#';
co... | a.cc: In function 'int main()':
a.cc:19:22: error: expected ';' at end of input
19 | cout << str << endl
| ^
| ;
a.cc:19:22: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s603898520 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int high,width;
cin >> high >> width;
vector<string> word(high);
for(int i = 0; i < high; i++){
cin >> word.at(i);
}
cout << "#" * (width + 2) << endl;
for(int i = 0; i < high; i++){
cout << "#";
cout << word.at(i);
cout << "#" << ... | a.cc: In function 'int main()':
a.cc:11:15: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
11 | cout << "#" * (width + 2) << endl;
| ~~~ ^ ~~~~~~~~~~~
| | |
| | int
| const char [2]
a.cc:18:15: ... |
s927719177 | p03712 | C++ | #####
#abc#
#arc#
##### | a.cc:1:1: error: stray '##' in program
1 | #####
| ^~
a.cc:1:3: error: stray '##' in program
1 | #####
| ^~
a.cc:1:5: error: stray '#' in program
1 | #####
| ^
a.cc:2:2: error: invalid preprocessing directive #abc
2 | #abc#
| ^~~
a.cc:3:2: error: invalid preprocessing dire... |
s139061995 | p03712 | C | #include <iostream>
using namespace std;
int main(){
int h , w, i, j;
cin >> h >> w;
char m[h + 2][w + 2];
for(i = 1; i < h + 1; i++){
for(j = 1; j < w + 1; j++){
cin >> m[i][j];
}
}
for(i = 0; i < h + 2; i++){
m[i][0] = '#';
m[i][w + 1] = '#';
}
for(i = 0; i < w + 2; i++){
m[... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s722184488 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
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 ... | a.cc:13:28: error: extended character ’ is not valid in an identifier
13 | b [ i ][ j ] = ’# ’;
| ^
a.cc:13:29: error: stray '#' in program
13 | b [ i ][ j ] = ’# ’;
| ^
a.cc:13:31: error: extended character ’ is not valid ... |
s402138632 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
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; j++) {
b[i][j] = '#';
}
}
for (in... | a.cc: In function 'int main()':
a.cc:20:38: error: expected ';' before '}' token
20 | b[i + 1][j + 1] = a[i][j]
| ^
| ;
21 | }
| ~
|
s466093658 | p03712 | Java | import java.io.*;
import java.util.function.*;
import java.util.stream.*;
class Wandbox
{
/**
* ABC 062 B: Picture Frame
* (周囲1ピクセルを'#'で囲む)
*/
public static void main(String[] args) throws IOException
{
// 入力
BufferedReader br = new BufferedReader(
new I... | Main.java:17: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
item -> new Integer(item)).toArray();
^
1 warning
|
s874883442 | p03712 | Java | import java.io.*;
import java.util.function.*;
import java.util.stream.*;
class Wandbox
{
/**
* ABC 062 B: Picture Frame
* (周囲1ピクセルを'#'で囲む)
*/
public static void main(String[] args) throws IOException
{
// 入力
BufferedReader br = new BufferedReader(
new In... | Main.java:17: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
item -> new Integer(item)).toArray();
^
1 warning
|
s430319874 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
vector<string> vec(x);
for (int i = 0; i < x; i++){
cin >> vec[i]
}
for (int i = 0; i < y; i++){
cout << "#";
}
cout << endl;
for (int i = 0; i < y; i++){
cout << "#" << vec[i] << "#" << endl;
}
f... | a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before '}' token
8 | cin >> vec[i]
| ^
| ;
9 | }
| ~
|
s838356629 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
vector<string> vec(x);
for (int i = 0; i < x; i++){
string a;
cin >> a;
vec.push_back(a);
}
for (int i = 0; i < y; i++){
cout << "#";
}
cout << endl;
for (in i = 0; i < y; i++){
cout << "#" << ve... | a.cc: In function 'int main()':
a.cc:18:8: error: 'in' was not declared in this scope; did you mean 'yn'?
18 | for (in i = 0; i < y; i++){
| ^~
| yn
a.cc:18:18: error: 'i' was not declared in this scope
18 | for (in i = 0; i < y; i++){
| ^
|
s145288579 | p03712 | C++ | #include<iostream>
#incltde<algorithm>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
int i;
string c;
for(i=0;i<=1+b;i++){
cout<<"#";
}
cout<<endl;
for(i=0;i<a;i++){
cin>>c;
cout<<"#"<<c<<"#"<<endl;
}
for(i=0;i<=1+b;i++){
cout<<"#";
}
cout<<endl;
} | a.cc:2:2: error: invalid preprocessing directive #incltde; did you mean #include?
2 | #incltde<algorithm>
| ^~~~~~~
| include
|
s886848879 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
vector<string>d;
for(int i=0;i<a;i++){
for(int j=0;j<b;j++){
cin>>d[i][j];
}
}
for(int k=0;k<a+2;k++){
for(int l=0;l<b+2;l++){
if(k==0||k==a+1||l==0||l==b+1){
cout<<"#";
}
else{
cout<<[k+1][l+1];
}
}
co... | a.cc: In function 'int main()':
a.cc:19:41: error: expected ',' before '+' token
19 | cout<<[k+1][l+1];
| ^
| ,
a.cc:19:41: error: expected identifier before '+' token
a.cc: In lambda function:... |
s679001782 | p03712 | C++ | #include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n))
#define Vec(a,n) vector<string> (a)((n))
#define P pair<int,int>
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n)... | a.cc: In function 'int main()':
a.cc:22:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
22 | cin << s;
| ~~~ ^~ ~
| | |
| | std::string {aka ... |
s917176680 | p03712 | Java | #include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n))
#define Vec(a,n) vector<string> (a)((n))
#define P pair<int,int>
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n)... | Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
^
Main.java:2: error: illegal character: '#'
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
^
Main.java:2: error: class, interface, enum, or record ex... |
s800555662 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >>H >>W;
vector<int> vec(W);
for(int i = 1;i < H+1;i++){
for(int j = 1;j < W+1;j++){
cin >> vec.at(j);}
if(i == 0||i == H){
for(int j = 0;j < W+1;j++){
cout << "#" <<endl;}
}
else if(i > 0){
cout << "... | a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s371070855 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >>H >>W;
vector<int> vec(W);
for(int i = 0;i < H;i++){
for(int j = 0;j < W;j++){
cin >> vec.at(j);
}
if(i == 0||i == H-1){
for(int j = 0;j < W;j++){
cout << "#" <<endl;
}
}
else if(i > 0){
cout ... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s131110879 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >>H >>W;
vector<int> vec(W);
for(int i = 0;i < H;i++){
for(int j = 0;j < W;j++){
cin >> vec.at(j);
}
if(i == 0||i == H-1){
for(int j = 0;j < W;j++){
cout << "#" <<endl;
}
}
else if(i > 0){
cout ... | a.cc: In function 'int main()':
a.cc:23:15: error: 'j' was not declared in this scope
23 | else if(j == W-1){
| ^
|
s494350430 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >>H >>W;
vector<int> vec(W);
for(int i = 0;i < H;i++){
for(int j = 0;j < W;j++){
cin >> vec.at(j);
}
if(i == 0||i == H-1){
for(int j = 0;j < W;j++){
cout << "#" <<endl;
}
}
else if(i > 0){
cout ... | a.cc: In function 'int main()':
a.cc:22:7: error: expected '}' before 'else'
22 | else if(j == W-1){
| ^~~~
a.cc:17:19: note: to match this '{'
17 | else if(i > 0){
| ^
a.cc:22:15: error: 'j' was not declared in this scope
22 | else if(j == W-1){
| ... |
s951815107 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >>H >>W;
vector<int> vec(W);
for(int i = 0;i < H;i++){
for(int j = 0;j < W;j++){
cin >> vec.at(j);
}
if(i == 0||i == H-1){
for(int j = 0;j < W;j++){
cout << "#" <<endl;
}
}
else if(i > 0){
cout ... | a.cc: In function 'int main()':
a.cc:19:14: error: 'j' was not declared in this scope
19 | if(W > j){
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s715624610 | 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++ ) {
cout << "#";
for ( i nt j = 0; j < W; j++ ) {
char c;
cin >> c;
cout << c;
}
cout << "#" << endl... | a.cc: In function 'int main()':
a.cc:13:12: error: expected ';' before 'nt'
13 | for ( i nt j = 0; j < W; j++ ) {
| ^~~
| ;
a.cc:13:23: error: 'j' was not declared in this scope
13 | for ( i nt j = 0; j < W; j++ ) {
| ^
|
s542940523 | p03712 | Java | import java.util.*;
public class Main
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int H=in.nextInt();
int W=in.nextInt();
String dum=in.nextLine();
String s[]=new String[H];
for (int i=0; i<H; i++)
s[i]=in.nextLine();
for(int i=0; i<W+2; i++)
System.out.print("#");
System.out.println("... | Main.java:17: error: cannot find symbol
System.out.println("#"+a[i]+"#");
^
symbol: variable a
location: class Main
1 error
|
s809174085 | p03712 | Java | import java.io.*;
public class c
{
public static void main(String args[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
String[] str=b.readLine().trim().split(" ");
int r=Integer.parseInt(str[0]);
int c=Integer.parseInt(str[1]);
... | Main.java:2: error: class c is public, should be declared in a file named c.java
public class c
^
1 error
|
s500185035 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector <string> a(100);
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
if(0<i<H+1&&0<j<W+1){
cin >> a[i][j];
}
else a[i][j]="#";
}
}
for(int i=0;i<H+2;i++){
cout << a[i] <<endl;
... | a.cc: In function 'int main()':
a.cc:13:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
13 | else a[i][j]="#";
| ^~~
| |
| const char*
|
s600368436 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector <string> a(100);
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
if(0<i<H+1&&0<j<W+1){
cin >> a[i][j];
}
else a[i][j]="#";
}
}
for(i=0;i<H+2;i++){
cout << a[i] <<endl;
} ... | a.cc: In function 'int main()':
a.cc:13:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
13 | else a[i][j]="#";
| ^~~
| |
| const char*
a... |
s419360020 | 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 < W + 1; i++) {
cout << "#";
if (i == W) {
cout << endl;
}
}
for (int i = 0; i < H ; i++) {
cout << "#";
for (int... | a.cc: In function 'int main()':
a.cc:7:33: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
7 | for (int j = 0; j < W:j++) {
| ^
a.cc:7:38: error: found ':' in nested-name-specifier, expect... |
s742519835 | p03712 | C | #include<stdio.h>
int main(){
int h,w;
char a[100][101];
scanf("%d%d",&h,&w);
for(i=0;i<h;i++)scanf("%s",a[i]);
for(i=-1;i<=h;i++){
if(i==-1||i==h){
for(j=0;j<n+2;j++)printf("#");
puts("");
}
else{
printf("#%s#",a[i]);
}
}
return 0;
} | main.c: In function 'main':
main.c:7:5: error: 'i' undeclared (first use in this function)
7 | for(i=0;i<h;i++)scanf("%s",a[i]);
| ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:5: error: 'j' undeclared (first use in this function)
10 | fo... |
s695715586 | p03712 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#define INF (long)1e9
const int MOD = 1e9 + 7;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
using namespace std;
typedef... | a.cc: In function 'int main()':
a.cc:63:18: error: expected '}' at end of input
63 | return 0;
| ^
a.cc:18:1: note: to match this '{'
18 | {
| ^
|
s966081747 | p03712 | C | #include<stdio.h>
#include<string>
int main(){
int n, m, i, j, t, k;
char a[111][111];
while(~scanf("%d %d", &n, &m)){
getchar();
for(i = 0; i < n; i++) { gets(a[i]); a[i][m] = '#'; }
for(i = 0; i < m + 2; i++) printf("#");
printf("\n");
for(i = 0; i < n; i++) { printf("#"); puts(a[i]); }
for(i = 0... | main.c:2:9: fatal error: string: No such file or directory
2 | #include<string>
| ^~~~~~~~
compilation terminated.
|
s996301904 | p03712 | C++ | #include<stdio.h>
#include<string>
int main(){
int n, m, i, j, t, k;
char a[111][111];
while(~scanf("%d %d", &n, &m)){
getchar();
for(i = 0; i < n; i++) { gets(a[i]); a[i][m] = '#'; }
for(i = 0; i < m + 2; i++) printf("#");
printf("\n");
for(i = 0; i < n; i++) { printf("#"); puts(a[i]); }
for(i = 0... | a.cc: In function 'int main()':
a.cc:9:43: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | for(i = 0; i < n; i++) { gets(a[i]); a[i][m] = '#'; }
| ^~~~
| getw
|
s822092842 | p03712 | C++ | #include <bits/stdc++.h>
#define rep(i,a,n) for(int (i) = (a);(i) < (n);(i)++)
typedef long long ll;
using namespace std;
int main(){
int h,w;
cin >> h >> w;
char s;
rep(i,0,h+2){
rep(j,0,w+2){
if(i == 0 || j == 0 || i == h+1 || j == w+1){
cout << "#";
}
else{
... | a.cc: In function 'int main()':
a.cc:17:15: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
17 | cin << s;
| ~~~ ^~ ~
| | |
| | char
| std::istream {aka std::basic_istre... |
s218364837 | p03712 | C++ |
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, ... | a.cc: In function 'int main()':
a.cc:73:17: error: 'cin' was not declared in this scope
73 | int H,W;cin>>H>>W;
| ^~~
a.cc:12:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
11 | #include<cstring>
+++ |+#include <iostr... |
s135884127 | 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);
}
for(int k=0;k<W+2;k++){
cout<<"#"<<endl;
}
for(int i=0;i<H;i++){
cout << "#";
cout << pic.at(i);
cout << "#" << endl;
}
for(int k=0;k<W+2;... | a.cc: In function 'int main()':
a.cc:8:14: error: request for member 'at' in 'pic', which is of non-class type 'std::vector<std::__cxx11::basic_string<char> > [H]'
8 | cin>>pic.at(i);
| ^~
a.cc:15:17: error: request for member 'at' in 'pic', which is of non-class type 'std::vector<std::__cxx1... |
s136181979 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> a(H);
for (int i=0; i<H; i++){
cin >> a.at(i);
}
cout << "#"*(W+2) << endl;
for (int i=0; i<H; i++){
cout << "#"+a.at(i)+"#";
}
cout << "#"*(W+2) << endl;... | a.cc: In function 'int main()':
a.cc:13:16: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
13 | cout << "#"*(W+2) << endl;
| ~~~^~~~~~
| | |
| | int
| const char [2]
a.cc:17:16: error: invalid opera... |
s906909356 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> a(H);
for (int i=0; i<H; i++){
cin >> a.at(i);
}
cout << "#"*(W+2) << endl;
for (int i=0; i<H; i++){
cout << "#"+a.at(i)+"#";
}
cout << "#"*(W+2) << endl;... | a.cc: In function 'int main()':
a.cc:13:16: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
13 | cout << "#"*(W+2) << endl;
| ~~~^~~~~~
| | |
| | int
| const char [2]
a.cc:17:16: error: invalid opera... |
s449041948 | p03712 | C++ | #include<cstdio>
using namespace std;
int main(){
int n, w, i, j;
char a[110][110];
scanf("%d%d", &n, &w);
for(i = 0; i < n+2; i++)
for(j = 0; j < m+2; j++)
a[i][j] = '#';
for(i = 1; i <= n; i++)
for(j = 1; j <= m; j++)
scanf("%c", &a[i][j]);
for(i = 0; i < n+2; i++){
for(j = 0;... | a.cc: In function 'int main()':
a.cc:9:20: error: 'm' was not declared in this scope
9 | for(j = 0; j < m+2; j++)
| ^
a.cc:12:21: error: 'm' was not declared in this scope
12 | for(j = 1; j <= m; j++)
| ^
a.cc:16:20: error: 'm' was not declared in this s... |
s420444351 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int x,y;
char s[105][105];
cin>>x>>y;
for(int i=0;i<=x;i++)
gets(s[i]);
for(int i=0;i<y+2;i++)
cout<<"#";
cout<<endl;
for(int i=1;i<=x;i++)
{
cout<<"#";
for(int j=0;j<y;j++)
cout<<s[i][j];
cout<<"#"<<endl;
}
for(int i=0;i<y+2;i++)
cout<<"#"... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s[i]);
| ^~~~
| getw
|
s665691601 | p03712 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;
public class Main {
int[] inputArray;
public static void main(String[] args) throws IOException {
new Main().run();
}
void run() {
... | Main.java:21: error: ')' expected
for(int i=0; i<=h+1; i++;){
^
Main.java:21: error: illegal start of expression
for(int i=0; i<=h+1; i++;){
^
Main.java:26: error: not a statement
array[i][j]
^
Main.java:26: error: ';' expected
array[i][j]
^
Main.jav... |
s093754193 | p03712 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;
public class Main {
int[] inputArray;
public static void main(String[] args) throws IOException {
new Main().run();
}
void run() {
... | Main.java:21: error: ')' expected
for(int i=0; i<=h+1; i++;){
^
Main.java:21: error: illegal start of expression
for(int i=0; i<=h+1; i++;){
^
Main.java:26: error: not a statement
array[i][j]
^
Main.java:26: error: ';' expected
array[i][j]
^
Main.jav... |
s901593818 | p03712 | C++ | include <bits/stdc++.h>
using namespace std;
int main(){
int i,array[100001],n[100001]={},c=0,a,b;
string s[101];
cin>>a>>b;
for(i=0;i<a;i++){
cin>>s[i];
}
for(i=0;i<b+2;i++){
cout<<"#";
}
cout<<endl;
for(i=0;i<a;i++){
cout<<"#"<<s[i]<<"#"<<endl;
}
for(i=0;i<b+2;i++){
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:6:3: error: 'string' was not declared in this scope
6 | string s[101];
| ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin>>a>>b;
| ^~~
a.cc... |
s676931318 | 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; i++){
cout << "#" << endl; //上側の#出力
}
for (int i = 0; i < H; i++){ //縦の読み込み
for (int j = 0; j < W; j++){ //横の読み込み
cin >> a;
cout << a;
}
cout << "#" << a << "#" ... | a.cc: In function 'int main()':
a.cc:18:28: error: expected ';' before '}' token
18 | cout << "#" << a << "#" //両脇の#出力
| ^
| ;
19 | }
| ~
|
s454724772 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
| a.cc: In function 'int main()':
a.cc:7:17: error: expected '}' at end of input
7 | cin >> H >> W;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s258467802 | p03712 | C++ | 2 3
abc
arc | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2 3
| ^
|
s862682280 | p03712 | C | #include <iostream>
int main()
{
int h, w;
std::cin >> h >> w;
for( int i = 0; i < w + 2; i++ ) {
std::cout << '#';
}
std::cout << std::endl;
for( int i = 0; i < h; i++ ) {
for( int j = 0; j < w; j++ ) {
if( j == 0 ) {
std::cout << '#';
}
char a;
std::cin >> a;
std::cout << a;
if( j ... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s751312245 | p03712 | C++ | #include <iostream>
using namespace std;
int main(void){
int h,w;
char buf[128];
cin >> h >> w;
for (int i=0; i<w+2; i++) cout << '*';
cout << endl;
for (int i=0;i<h; i++){
cin >> buf;
cout << '*' buf << '*' << endl;
}
for (int i=0; i<w+2; i++) cout << '*';
cout << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before 'buf'
13 | cout << '*' buf << '*' << endl;
| ^~~~
| ;
|
s649106033 | p03712 | C++ | #include <iostream>
using namespace std;
char board[102][102];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int H, W;
cin >> H >> W;
memset(board, '#', sizeof(char) * 102 * 102);
for (int i = 1; i <= H; ++i)
for (int j = 1; j <= W; ++j) cin >> board[i][j];
for (int i = 0; i <= H + 1; ++i... | a.cc: In function 'int main()':
a.cc:13:3: error: 'memset' was not declared in this scope
13 | memset(board, '#', sizeof(char) * 102 * 102);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#inclu... |
s874867083 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,w;
cin>>n>>w;
vector<string> s(n);
for (int i=0; n>i; i++){
cin>>s.at(i);
}
for (int j=0; w+2>j;j++){
cout<<"#";
}
cout<<endl;
for (int k=0; n>k; k++){
cout<<"#"<<s.at(k)<<"#"<<endl;
}
for (int j=0; w+2>j;j++){
cout<<"#"<<;
}
cout<<endl... | a.cc: In function 'int main()':
a.cc:18:28: error: expected primary-expression before ';' token
18 | cout<<"#"<<;
| ^
|
s537758691 | p03712 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
int main (void) {
int H,W;
cin >> H >> W;
char A[H+2][W+2];
char s,t;
for (int i=0; i<=H+1; i++) {
for (int j=0; j<=W+1; j++) ... | a.cc: In function 'int main()':
a.cc:18:32: error: lvalue required as left operand of assignment
18 | if (i=0 || j=0 || i=H+1|| j=W+1){
| ~~~^~~~
a.cc:19:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
19 | A[i][j]="#";
| ... |
s102594898 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
char a[100][100] = { # };
for (int i = 1;i < h + 1;i++) {
for (int j = 1;j < w + 1;j++) {
cin >> a[i][j];
}
}
for (int i = 0;i < h + 2;i++) {
for (int j = 0;j < w + 2;j++) {
cout << a[i][j];
}
cout << endl;
}
}
| a.cc:7:30: error: stray '#' in program
7 | char a[100][100] = { # };
| ^
|
s753016965 | p03712 | Java | import java.util.*;
public class B62 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
String[] c = new String[m];
for(int i = 0;i < n;i++) {
c[i] = sc.next();
}
for(int i = 0;i < m+2;i++)System.out.print("#");
System.out.pr... | Main.java:2: error: class B62 is public, should be declared in a file named B62.java
public class B62 {
^
1 error
|
s403306847 | p03712 | C++ | #include <iostream>
using namespace std;
int main(){
int H, W, i, j;
char a[H][W];
string flame;
for(i=0; i<H; i++){
flame += '#';
for(j=0; j<W; j++){
cin >> a[i][j];
}
}
flame += "##";
cout << flame << endl;
for(i=0; i<H; i++){
cout << '#';
for(j=0; j<W; j++){
cout << a[i][j];
}
cout << "... | a.cc: In function 'int main()':
a.cc:22:34: error: expected primary-expression before ';' token
22 | cout << "#\n" << ;
| ^
|
s973074353 | p03712 | C++ | #include <iostream>
using namespace std;
int main(){
int H, W, i, j;
char a[H][W];
for(i=0; i<H; i++){
for(j=0; j<W; j++){
cin >> a[i][j];
if(i==0||i==H-1||j==0||j==W) a[i][j]='#';
}
}
for(i=0; i<H; i++){
for(j=0; j<W; j++){
cout << a[i][j];
}
cout << "\n" << ;
}
} | a.cc: In function 'int main()':
a.cc:18:33: error: expected primary-expression before ';' token
18 | cout << "\n" << ;
| ^
|
s479688179 | p03712 | C++ | // finish date: 2018/01/20
#include <iostream>
#include <cmath>
#include <vector>
#include <bitset>
#include <algorithm>
#include <stack>
#include <map>
#include <climits>
using namespace std;
#define FOR(i, a, b) for(int (i)=a;(i)<(b);(i)++)
#define rep(i, n) FOR(i,0,n)
#define ll long long
#define bigmod 100000000... | a.cc: In function 'int main()':
a.cc:32:30: error: expected ';' before 'cout'
32 | rep(i, W + 2) cout << "#"
| ^
| ;
33 | cout << endl;
| ~~~~
|
s827065146 | p03712 | C++ |
h,w=map(int,input().split())
print('#' * (w + 2))
for _ in range(h):
print("#" + input() + "#")
print('#' * (w + 2)) | a.cc:2:1: error: 'h' does not name a type
2 | h,w=map(int,input().split())
| ^
|
s957589175 | p03712 | C++ | #include <iostream>
#include <math.h>
#include <string>
#include <string.h>
#include <stdio.h>
#include <algorithm>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define IN(n) scanf("%d",&n,);
int main(){
int h,w;
char a[100];
IN2(h,w);
REP(i,h+2){
if(i==0||i==h+1){
... | a.cc: In function 'int main()':
a.cc:13:5: error: 'IN2' was not declared in this scope; did you mean 'IN'?
13 | IN2(h,w);
| ^~~
| IN
|
s051780267 | 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;
cout << '#';
int input;
for(int i=0;i<h;i++){
cin >>input
cout << input;
}
cout << '#' << endl;
for(in... | a.cc: In function 'int main()':
a.cc:16:20: error: expected ';' before 'cout'
16 | cin >>input
| ^
| ;
17 | cout << input;
| ~~~~
|
s944547699 | p03712 | C++ | list(map(print, (lambda a:['#'*len(a[0])]+a+['#'*len(a[0])])(['#'+input()+'#' for _ in range(list(map(int, input().split()))[0])]))) | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | list(map(print, (lambda a:['#'*len(a[0])]+a+['#'*len(a[0])])(['#'+input()+'#' for _ in range(list(map(int, input().split()))[0])])))
| ^
|
s594916415 | p03712 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int a,b,c,f=0,t=0;
string s[102];
cin>>a>>b;
r(i,a){
cin>>s[i+1];
s[i+1]="#"+s[i+1]+"#";
}
r(i,w+2)s[0]+="#",s[a+1]+="#";
r(i,a+2)cout<<s[i]<<endl;
} | a.cc: In function 'int main()':
a.cc:12:13: error: 'w' was not declared in this scope
12 | r(i,w+2)s[0]+="#",s[a+1]+="#";
| ^
a.cc:2:30: note: in definition of macro 'r'
2 | #define r(i,n) for(int i=0;i<n;i++)
| ^
|
s158289613 | p03712 | C++ | #include<stdio.h>
#include<iostream>
using namespace std;
#include<string.h>
int main(void)
{ int w,h,i;
char a[100];
scanf("%d%d",&h,&w);
for(i=0;i<h;i++)
gets(a);
for(i=0;i<w+2;i++)
printf("#");
printf("\n");
for(i=0;i<h;i++)
{
printf("#");
cout<<a;
printf("#\n") ;
}
for(i=0;i<w+2;i++)... | a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(a);
| ^~~~
| getw
|
s746951434 | p03712 | C | You are given a image with a height of H pixels and a width of W pixels. Each pixel is represented by a lowercase English letter. The pixel at the i-th row from the top and j-th column from the left is aij.
Put a box around this image and output the result. The box should consist of # and have a thickness of 1.
Const... | main.c:1:1: error: unknown type name 'You'
1 | You are given a image with a height of H pixels and a width of W pixels. Each pixel is represented by a lowercase English letter. The pixel at the i-th row from the top and j-th column from the left is aij.
| ^~~
main.c:1:9: error: expected '=', ',', ';', 'asm' o... |
s528223471 | p03712 | C | #include<stdio.h>
#include<String.h>
int main()
{
int r,a,b,c,h,i,k,t;
char ch[20][100];
while(scanf("%d%d",&a,&b)!=EOF)
{
getchar();
for(i=1;i<=a;i++)
scanf("%s",&ch[i]);
printf("#");
for(i=1;i<=b;i++)
printf("#");
printf("#\n");
for(i=1;i<=a;i++)
{
printf("#");
printf("%s",ch[i]);
... | main.c:2:9: fatal error: String.h: No such file or directory
2 | #include<String.h>
| ^~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.