submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s860960145 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
char t;
cin >> h >> w;
for(int i = 0; i < w; i++)
cout << '#';
cout << endl;
for(i = 0; i < h; i++){
cout << '#';
for(j = 0; j < w; j++;){
cin >> t;
cout << t;
}
cout << '#' << endl;
}
for(int i = 0; i ... | a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
11 | for(i = 0; i < h; i++){
| ^
a.cc:13:9: error: 'j' was not declared in this scope
13 | for(j = 0; j < w; j++;){
| ^
a.cc:13:26: error: expected ')' before ';' token
13 | for(j = 0; j < w... |
s588788398 | p03712 | C++ | #include <bits/c++.h>
using namespace std;
int main(){
int h, w;
char t;
cin >> h >> w;
for(int i = 0; i < w; i++)
cout << '#';
cout << endl;
for(i = 0; i < h; i++){
cout << '#';
for(j = 0; j < w; j++;){
cin >> t;
cout << t;
}
cout << '#' << endl;
}
for(int i = 0; i < w... | a.cc:1:10: fatal error: bits/c++.h: No such file or directory
1 | #include <bits/c++.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s842624831 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int h, w;
string s[101];
s[0] = "", s[h+1] = "";
cin >> h >> w;
for(int i=0; i<h; ++i) cin >> s[i+1];
for(int j=0; j<w; ++j) {
s[0] += "#";
s[h+1] += "#";
}
for(int i=0; i<=h+1; ++i){
s[i] = "#" + s[i] + "#";
cout << s[i] << end... | a.cc:18:2: error: stray '#' in program
18 | }#include<bits/stdc++.h>
| ^
a.cc:18:3: error: 'include' does not name a type
18 | }#include<bits/stdc++.h>
| ^~~~~~~
a.cc:21:5: error: redefinition of 'int main()'
21 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here... |
s947490435 | 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<W+2;i++) cout << '#';
cout << endl;
for(int i=0;i<H;i++){
cin >> A[i];
cout << '#' << A[i] << '#' << endl;
} | a.cc: In function 'int main()':
a.cc:12:4: error: expected '}' at end of input
12 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s985184228 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,W;
cin >> N >> W;
vector<string> pic(N);
for(int i = 0; i<H; i++){
cin >> pic.at(i);
}
for(int i = -1; i<H+1; i++){
cout << "#";
if(i == -1 || i == H) for(int i = 0; i<N; i++) cout << "#";
else cout << pic.at(H);
cout <<... | a.cc: In function 'int main()':
a.cc:8:20: error: 'H' was not declared in this scope
8 | for(int i = 0; i<H; i++){
| ^
a.cc:12:21: error: 'H' was not declared in this scope
12 | for(int i = -1; i<H+1; i++){
| ^
|
s459825362 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,W;
cin >> N >> W;
vector<string> pic(H);
for(int i = 0; i<H; i++){
cin >> pic.at(i);
}
for(int i = -1; i<H+1; i++){
cout << "#";
if(i == -1 || i == H) for(int i = 0; i<N; i++) cout << "#";
else cout << pic.at(H);
cout <<... | a.cc: In function 'int main()':
a.cc:7:22: error: 'H' was not declared in this scope
7 | vector<string> pic(H);
| ^
|
s193980364 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,W;
cin >> N >> W;
vector<string> pic(H);
for(int i = 0; i<H; i++){
cin >> pic(i);
}
for(int i = -1; i<H+1; i++){
cout << "#";
if(i == -1 || i == H) for(int i = 0; i<N; i++) cout << "#";
else cout << pic.at(H);
cout << "#... | a.cc: In function 'int main()':
a.cc:7:22: error: 'H' was not declared in this scope
7 | vector<string> pic(H);
| ^
a.cc:9:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
9 | cin >> pic(i);
| ~~~^~~
|
s787647357 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<char> vec(W);
for(int i = 0;i< H; i++){
for(int i = 0; i < W; i++){
cin >> vec.at(i);
}
}
cout<< "#" << '#'*W << "#" <<endl;
for(int i = 0; i < H; i++){
cout<< "#" << vec(i) << "#" <<endl;
}
cout... | a.cc: In function 'int main()':
a.cc:18:24: error: no match for call to '(std::vector<char>) (int&)'
18 | cout<< "#" << vec(i) << "#" <<endl;
| ~~~^~~
|
s943533436 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<str> vec(W);
for(int i = 0;i< H; i++){
for(int i = 0; i < W; i++){
cin >> vec.at(i);
}
}
cout<< "#" << '#'*W << "#" <<endl;
for(int i = 0; i < H; i++){
cout<< "#" << vec.at(i) << "#" <<endl;
}
co... | a.cc: In function 'int main()':
a.cc:8:10: error: 'str' was not declared in this scope; did you mean 'std'?
8 | vector<str> vec(W);
| ^~~
| std
a.cc:8:13: error: template argument 1 is invalid
8 | vector<str> vec(W);
| ^
a.cc:8:13: error: template argument 2 i... |
s408152683 | p03712 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc: In function 'int main()':
a.cc:315:29: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char')
315 | cout>>a[i][j];
| ~~~~^~~~~~~~~
| | |
| ... |
s037808579 | p03712 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc: In function 'int main()':
a.cc:297:23: error: expected initializer before '+' token
297 | char a[H+2][W]+2;
| ^
a.cc:303:25: error: 'a' was not declared in this scope
303 | a[i][j]='#';
| ^
a.cc:309:30: error: 'a' was no... |
s314523081 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<char> vec(W);
for(int i = 0;i< H; i++){
for(int i = 0; i < W; i++){
cin >> vec.at(i);
}
}
cout<< "#" << "#"*W << "#" <<endl;
for(int i = 0; i < H; i++){
cout<< "#" << vec.at(i) << "#" <<endl;
}
c... | a.cc: In function 'int main()':
a.cc:15:20: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
15 | cout<< "#" << "#"*W << "#" <<endl;
| ~~~^~
| | |
| | int
| const char [2]
a.cc:20:20: error:... |
s875811806 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
int X = 2;
vector<char> vec(W);
for(int i = 0;i< H; i++){
for(int i = 0; i < W; i++){
cin >> vec.at(i);
}
}
cout<< "#"*(W+X) <<endl;
for(int i = 0; i < H; i++){
cout<< "#" << vec.at(i) << "#" <<endl;
}
... | a.cc: In function 'int main()':
a.cc:16:13: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
16 | cout<< "#"*(W+X) <<endl;
| ~~~^~~~~~
| | |
| | int
| const char [2]
a.cc:21:14: error: invalid operands of types 'co... |
s030664100 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<char> vec(W);
for(int i = 0;i< H; i++){
for(int i = 0; i < W; i++){
cin >> vec.at(i);
}
}
cout<< "#"*(W+2) <<endl;
for(int i = 0; i < H; i++){
cout<< "#" << vec.at(i) << "#" <<endl;
}
cout<< "#"*(W... | a.cc: In function 'int main()':
a.cc:14:13: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
14 | cout<< "#"*(W+2) <<endl;
| ~~~^~~~~~
| | |
| | int
| const char [2]
a.cc:19:14: error: invalid operands of types 'co... |
s934363026 | p03712 | C++ | #include<string.h>
int main(void){
int H, W, i;
do{
scanf("%d%d", &H, &W);
}while(H < 0 || H > 100 || W < 0 || W > 100);
char a[100][100];
for(i = 0; i < H; i++){
do{
scanf("%s", a[i]);
}while(strlen(a[i]) > W);
}
for(i = 1; i <= W + 2; i++)
printf("*");
printf("\n");
for(i = 0; i < H; i++)
pr... | a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf' was not declared in this scope
6 | scanf("%d%d", &H, &W);
| ^~~~~
a.cc:12:25: error: 'scanf' was not declared in this scope
12 | scanf("%s", a[i]);
| ^~~~~
a.cc:17... |
s288304744 | p03712 | C++ | #include<string.h>
int main(void){
int H, W, i;
do{
scanf("%d%d", &H, &W);
}while(H < 0 || H > 100 || W < 0 || W > 100);
char a[100][100];
for(i = 0; i < H; i++){
do{
scanf("%s", a[i]);
}while(strlen(a[i]) > W);
}
for(i = 1; i <= W + 2; i++)
printf("*");
printf("\n");
for(i = 0; i < H; i++)
pr... | a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf' was not declared in this scope
6 | scanf("%d%d", &H, &W);
| ^~~~~
a.cc:12:25: error: 'scanf' was not declared in this scope
12 | scanf("%s", a[i]);
| ^~~~~
a.cc:17... |
s891695815 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> image(H*W);
for(int i=0;i<H*W;i++){
cin >> image.at(i);
}
for(int i=0;i<(W+2);i++){
cout << "#";
}
cout << endl;
for(int i=0;i<W*H;i++){
if(i%W==0){
cout <<"#";
}
cout << image.at(i);... | a.cc: In function 'int main()':
a.cc:25:22: error: expected ';' before 'i'
25 | for(int i=0;i<(W+2)i++){
| ^
| ;
|
s450063367 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector(string) image(H*W);
for(int i=0;i<H*W;i++){
cin >> image.at(i);
}
for(int i=0;i<W;i++){
cout << "#";
}
cout << endl;
for(int i=0;i<H*W;i=i++){
if((i+1)%W==1){
cout << "#";
}
cout << image... | a.cc: In function 'int main()':
a.cc:7:9: error: missing template arguments before '(' token
7 | vector(string) image(H*W);
| ^
a.cc:7:16: error: expected primary-expression before ')' token
7 | vector(string) image(H*W);
| ^
a.cc:9:12: error: 'image' was not declared in t... |
s036798163 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector(char) image(H*W);
for(int i=0;i<H*W;i++){
cin >> image.at(i);
}
for(int i=0;i<W i++){
cout << "#";
}
cout << endl;
for(int i=0;i<H*W;i=i++){
if((i+1)%W==1){
cout << "#";
}
cout << image.a... | a.cc: In function 'int main()':
a.cc:7:9: error: missing template arguments before '(' token
7 | vector(char) image(H*W);
| ^
a.cc:7:10: error: expected primary-expression before 'char'
7 | vector(char) image(H*W);
| ^~~~
a.cc:9:12: error: 'image' was not declared in this scope
... |
s478578297 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<vector<char>> a;
for (int i = 0; i < H; i++)
{
for (int j = 0; j < W; j++)
{
cin >> a[i][j];
}
}
vector<vector<char>> b);
for (int i = 0; i < H+2; i++)
... | a.cc: In function 'int main()':
a.cc:15:27: error: expected initializer before ')' token
15 | vector<vector<char>> b);
| ^
a.cc:22:17: error: 'b' was not declared in this scope
22 | b[i][j]='#';
| ^
a.cc:28:21: error: 'b' was not declared i... |
s274797995 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H , W;
cin >> H >> W;
string S = string(W+2 , "#");
cout << S << endl;
for (int i = 0 ; i < H ; i ++){
cout << '#';
string input;
cin >> input;
cout << input;
cout << '#';
}
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:7:36: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int, const char [2])'
7 | string S = string(W+2 , "#");
| ^
In file included from /usr/include/c++/14/string:54,
from /... |
s407724020 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H , W;
cin >> H >> W;
string S;
vector <string> result(W+2 , "#");
cout << result << endl;
for (int i = 0 ; i < H ; i ++){
cin >> S;
for (int j = 0 ; j < W ; j++{
result.at(j+1) = S.at();
}
cout << result << ... | a.cc: In function 'int main()':
a.cc:9:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
9 | cout << result << endl;
| ~~~~ ^~ ~~~~~~
| | |
| | st... |
s025011801 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H , W;
cin >> H >> W;
string S;
vector <string> result(W+2 , '#');
cout << result << endl;
for (int i = 0 ; i < H ; i ++){
cin >> S;
for (int j = 0 ; j < W ; j++{
result.at(j+1) = S.at();
}
cout << result << ... | a.cc: In function 'int main()':
a.cc:8:41: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int, char)'
8 | vector <string> result(W+2 , '#');
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s077728802 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H , W;
cin >> H >> W;
string S;
vector <char> result(W+2 , '#');
cout << result << endl;
for (int i = 0 ; i < H ; i ++){
cin >> S;
for (int j = 0 ; j < W ; j++{
result.at(j+1) = S.at();
}
cout << result << en... | a.cc: In function 'int main()':
a.cc:9:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
9 | cout << result << endl;
| ~~~~ ^~ ~~~~~~
| | |
| | std::vector<char>
| ... |
s459559958 | p03712 | C++ | #include <bits/.stdc++.h>
using namespace std;
int main(){
int H , W;
cin >> H >> W;
string S;
vector <char> result(W+2 , '#');
cout << result << endl;
for (int i = 0 ; i < H ; i ++){
cin >> S;
for (int j = 0 ; j < W ; j++{
result.at(j+1) = S.at();
}
cout << result << e... | a.cc:1:10: fatal error: bits/.stdc++.h: No such file or directory
1 | #include <bits/.stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s363986038 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string s;
for (int i = 0; i < W + 2; i++) {
s += '#';
}
vector<char> a(H);
for (int i = 0; i < H; i++) {
cin >> a.at(i);
}
cout << s <<endl;
for (int i = 0; i < H; i++) {
cout << '#'... | a.cc: In function 'int main()':
a.cc:22:21: error: expected '}' at end of input
22 | cout << s << endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s562639942 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
string s;
for (int i = 0; i < W + 2; i++) {
s += '#';
}
vector<char> a(H);
for (int i = 0; i < H; i++) {
cin >> a.at(i);
}
cout << s <<endl;
for (int i = 0; i < H; i++) {
cout << '#'... | a.cc: In function 'int main()':
a.cc:22:12: error: expected ';' before 'endl'
22 | cout << s endl;
| ^~~~~
| ;
a.cc:26:23: error: 'N' was not declared in this scope
26 | for (int i = 0; i < N; i++) {
| ^
a.cc:27:12: error: 'A' was not declared in t... |
s917962075 | p03712 | C++ | #include<bits.stdc++/h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
for(int i=0; i<W+1; i++){
cout<<"#";
}
cout<<"#"<<endl;
vector<int> tate(H);
vector<int> yoko(W);
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cin>>yoko.at(j);
}
cout<<"#";
for(... | a.cc:1:9: fatal error: bits.stdc++/h: No such file or directory
1 | #include<bits.stdc++/h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s168145825 | p03712 | C++ | #include<bits.stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
for(int i=0; i<W+1; i++){
cout<<"#";
}
cout<<"#"<<endl;
vector<int> tate(H);
vector<int> yoko(W);
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cin>>yoko.at(j);
}
cout<<"#";
for(... | a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
1 | #include<bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s070983878 | 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;
vector<string> A(H)
for(int i = 0; i < H; i++){
cin >> A.at(i);
cout << "#" << A.at(i) << "#" << endl;}
for(int i = 0; i <W+2; i++){
cout ... | a.cc: In function 'int main()':
a.cc:13:3: error: expected ',' or ';' before 'for'
13 | for(int i = 0; i < H; i++){
| ^~~
a.cc:13:18: error: 'i' was not declared in this scope
13 | for(int i = 0; i < H; i++){
| ^
|
s253158815 | 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;
vector<string> A(H)
for(i = 0; i < H; i++){
cin >> A.at(i);
cout << "#" << A.at(i) << "#" << endl;}
for(i = 0; i <W+2; i++){
cout << "#" ;}
... | a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i = 0; i <W+2; i++){
| ^
a.cc:13:3: error: expected ',' or ';' before 'for'
13 | for(i = 0; i < H; i++){
| ^~~
a.cc:13:14: error: 'i' was not declared in this scope
13 | for(i = 0; i < H; i++)... |
s004048199 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int H,W;
int main(){
cin>>H>>W;
vector<char> a(H*W);
cin>>a;
for(int i=0;i<W+2;i++)cout<<'#';
cout<<endl;
for(int i=0;i<H;i++){
cout<<'#';
for(int j=0;j<W;j++)cout<<a[H*W];
cout<<'#'<<endl;
}
for(int i=0;i<W+2;i++)cout<<'#';
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
7 | cin>>a;
| ~~~^~~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<char>}
In file includ... |
s836740406 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
string board[100];
for(int i=0; i<h; i++){
cin >> board[i];
}
for(int i=0; i<h+2; i++) cin >> '#';
for(int i=0; i<h; i++){
cout << '#';
for(int j=0; j<w; j++){
cout << board[i][j];
}
cout << '#' << endl;
... | a.cc: In function 'int main()':
a.cc:14:38: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
14 | for(int i=0; i<h+2; i++) cin >> '#';
| ~~~ ^~ ~~~
| | |
| ... |
s525018000 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
string board[100];
for(int i=0; i<h; i++){
cin >> board[i];
}
for(int i=0; i<h+2; i++) cin >> '#';
for(int i=0; i<h; i++){
cin >> '#';
for(int j=0; j<w; j++){
cin >> board[i][j];
}
cout << '#' << endl;
}
... | a.cc: In function 'int main()':
a.cc:14:38: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
14 | for(int i=0; i<h+2; i++) cin >> '#';
| ~~~ ^~ ~~~
| | |
| ... |
s044428096 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >> H >> W;
vector<string> vec1(W);
rep(i,W+2){
cout << "#";
}
cout << endl;
rep(i,W){
cin >> vec1.at(i);
}
cout << "#";
rep(i,W){
cout << vec1.at(i);
}
cout << "#" << endl;
}
... | a.cc:3:19: error: expected unqualified-id before 'for'
3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
| ^~~
a.cc:23:2: note: in expansion of macro 'rep'
23 | rep(i,W+1){
| ^~~
a.cc:23:6: error: 'i' does not name a type
23 | rep(i,W+1){
| ^
a.cc:3:35: note:... |
s536016314 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >> H >> W;
vector<string> vec1(W);
rep(i,W+2){
cout << "#";
}
cout << endl;
rep(i,W){
cin >> vec1.at(i);
}
cout << "#";
rep(i,W){
cout << vec1.at(i);
}
cout << "#" << endl;
}
... | a.cc:3:19: error: expected unqualified-id before 'for'
3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
| ^~~
a.cc:23:2: note: in expansion of macro 'rep'
23 | rep(i,W+1){
| ^~~
a.cc:23:6: error: 'i' does not name a type
23 | rep(i,W+1){
| ^
a.cc:3:35: note:... |
s343612872 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >> H >> W;
vecter<string> vec2(H);
vector<string> vec1(W);
rep(i,W){
cout << "#";
cout << endl;
}
rep(i,H){
rep(i,W){
cin >> vec1.at(i);
}
rep(i,W){
cout << "#" << vec1.at(i) << "#"... | a.cc: In function 'int main()':
a.cc:7:2: error: 'vecter' was not declared in this scope
7 | vecter<string> vec2(H);
| ^~~~~~
a.cc:7:15: error: expected primary-expression before '>' token
7 | vecter<string> vec2(H);
| ^
a.cc:7:17: error: 'vec2' was not declared in this scope
7 ... |
s923334469 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
for(int i=0;i<H+2;i++){
if(i==0 || i==H+1){
vector<string> vec(W+2,"#");
for(int j=0;j<W+2;j++){
cout<<vec.at(j);
}
cout<<endl;
}
else{
cin>>str;
cout<<"#"<<str<<"#"<<endl;
... | a.cc: In function 'int main()':
a.cc:16:12: error: 'str' was not declared in this scope; did you mean 'std'?
16 | cin>>str;
| ^~~
| std
|
s576969568 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
for(int i=0;i<H+2;i++){
if(i==0 || i==H+1){
vector<string> vec(W+2,"#");
cout<<vec<<endl;
}
else{
vector<string> str;
cin>>str;
cout<<"#"<<str<<"#"<<endl;
}
}
} | a.cc: In function 'int main()':
a.cc:10:11: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
10 | cout<<vec<<endl;
| ~~~~^~~~~
| | |
| | std::vector<std::__cxx11:... |
s783119870 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
for(int i=0;i<H+2;i++){
if(i==0 || i==H+1){
vector<string> vec(W+2,'#');
cout<<vec<<endl;
}
else{
vector<string> str;
cin>>str;
cout<<'#'<<str<<'#'<<endl;
}
}
} | a.cc: In function 'int main()':
a.cc:9:33: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int, char)'
9 | vector<string> vec(W+2,'#');
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/incl... |
s946237285 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
for(int i=0;i<H+2;i++){
if(i==0 || i==H+1){
vector<string> vec(W+2,#);
cout<<vec<<endl;
}
else{
vector<string> str;
cin>>str;
cout<<#<<str<<#<<endl;
}
}
} | a.cc:9:30: error: stray '#' in program
9 | vector<string> vec(W+2,#);
| ^
a.cc:15:13: error: stray '#' in program
15 | cout<<#<<str<<#<<endl;
| ^
a.cc:15:21: error: stray '#' in program
15 | cout<<#<<str<<#<<endl;
| ... |
s352311674 | 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<<"#"<<endl;
}
cout<<endl;
for(int i=0;i<H;i++){
vector<int> h;
for(int j=0;j<W;j++){
cin>>h.at(j);
}
cout<<"#"<<h<<"#"<<endl;
}
for(int i=0;i<W+2;i++){
cout<<"#"<<endl;
... | a.cc: In function 'int main()':
a.cc:17:14: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<int>')
17 | cout<<"#"<<h<<"#"<<endl;
| ~~~~~~~~~^~~
| | |
| | std::vector<int>
| std::basic_ostream<char>
In fi... |
s588294851 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
cout<<'#'*(W+2)<<endl;
for(int i=0;i<H;i++){
vector<int> h;
for(int j=0;j<W;j++){
cin>>h.at(j);
}
cout<<"#"<<h<<"#"<<endl;
}
cout<<'#'*(W+2)<<endl;
} | a.cc: In function 'int main()':
a.cc:13:14: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<int>')
13 | cout<<"#"<<h<<"#"<<endl;
| ~~~~~~~~~^~~
| | |
| | std::vector<int>
| std::basic_ostream<char>
In fi... |
s201129640 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
cout<<"#"*(W+2)<<endl;
for(int i=0;i<H;i++){
vector<int> h;
for(int j=0;j<W;j++){
cin>>h.at(j);
}
cout<<"#"<<h<<"#"<<endl;
}
cout<<"#"*(W+2)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:12: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
7 | cout<<"#"*(W+2)<<endl;
| ~~~^~~~~~
| | |
| | int
| const char [2]
a.cc:13:14: error: no match for 'operator<<' (operand t... |
s121364653 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
cout<<'#'*(W+2)<<endl;
for(int i=0;i<H;i++){
vector<int> h;
for(int j=0;j<W;j++){
cin>>h.at(j);
}
cout<<'#'<<h<<endl;
}
cout<<'#'*(W+2)<<endl;
} | a.cc: In function 'int main()':
a.cc:13:14: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<int>')
13 | cout<<'#'<<h<<endl;
| ~~~~~~~~~^~~
| | |
| | std::vector<int>
| std::basic_ostream<char>
In file in... |
s162292767 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<str>vec(H);
for(int i = 0; i < H; i++){
cin >> vec.at(i);
i++ ;
}
cout<< "#"*(W+2) <<endl;
for(int i = 0; i < H; i++){
cout<< "#" << vec.at(i) << "#" <<endl;
i++;
}
cout<< "#"*(W+2) <<endl;... | a.cc: In function 'int main()':
a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'?
7 | vector<str>vec(H);
| ^~~
| std
a.cc:7:13: error: template argument 1 is invalid
7 | vector<str>vec(H);
| ^
a.cc:7:13: error: template argument 2 is ... |
s984548501 | p03712 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm>
#include <iomanip>
#define DEBUG 0
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;
int main... | a.cc: In function 'int main()':
a.cc:24:14: error: expected unqualified-id before '>>' token
24 | cin .>> a[i];
| ^~
|
s003171822 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int man(){
int H,W;
vector<string> a(W);
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cin >> a.at(j);
}
}
for(int i=0; i<W+2; i++){
cout << "#" << endl;
}
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cout << "#" << a.at(j) << "#"... | a.cc: In function 'int man()':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
23 | }
| ^
/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... |
s424803957 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int man(){
int H,W;
vector<int> a(W);
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cin >> a.at(j);
}
}
for(int i=0; i<W; i++){
cout << "#" << endl;
}
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cout << "#" << a.at(j) << "#" << e... | a.cc: In function 'int man()':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
23 | }
| ^
/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... |
s415794128 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int man(){
int H,W;
vector<int> a(W);
for(int i=0; i<N; i++){
for(int j=0; j<W; j++){
cin >> a.at(j);
}
}
for(int i=0; i<W; i++){
cout << "#" << endl;
}
for(int i=0; i<N; i++){
for(int j=0; j<W; j++){
cout << "#" << a.at(j) << "#" << e... | a.cc: In function 'int man()':
a.cc:7:18: error: 'N' was not declared in this scope
7 | for(int i=0; i<N; i++){
| ^
a.cc:15:18: error: 'N' was not declared in this scope
15 | for(int i=0; i<N; i++){
| ^
a.cc:23:1: warning: no return statement in function returnin... |
s737517807 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<string> pic;
vector<string> sharp(W + 2, "#");
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++){
cin >> pic.at(j);
}
cout << sharp << endl;
cout << "#" + pic + "#" << endl;
cout << sharp << endl;
} ... | a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
12 | cout << sharp << endl;
| ~~~~ ^~ ~~~~~
| | |
| | std::vector<std::__... |
s641498190 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
char a[100][100], b[102][102];
for(int i=0; i<H; i++){
cin >> a[i];
}
for(int i = 0; i < H +2 ; i++){
for( int j=0; j < W+2; j++){
b[i][j] = '#';
}
}
for( int i = 0; i < H; i++){
for( int j=0... | a.cc:7:1: error: extended character is not valid in an identifier
7 | char a[100][100], b[102][102];
| ^
a.cc: In function 'int main()':
a.cc:7:1: error: '\U00003000char' was not declared in this scope
7 | char a[100][100], b[102][102];
| ^~~~~~
a.cc:10:12: error: 'a' was not declared in this sc... |
s174985313 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
char a[100][100], b[102][102];
for(int i=0; i<H; i++){
cin >> a[i];
}
for(int i = 0; i < H +2 ; i++){
for( int j=0; j < W+2; j++){
b[i][j] = "#";
}
}
for( int i = 0; i < H; i++){
for( int j=0... | a.cc:7:1: error: extended character is not valid in an identifier
7 | char a[100][100], b[102][102];
| ^
a.cc: In function 'int main()':
a.cc:7:1: error: '\U00003000char' was not declared in this scope
7 | char a[100][100], b[102][102];
| ^~~~~~
a.cc:10:12: error: 'a' was not declared in this sc... |
s812627529 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin>>h,w;
vector<string> vec(h+2);
for(int i=0;i<w+2;i++){
vec(0)+="#";
vec(h+1)+="#";
}
for(int i=1;i<h+1;i++){
cin>>vec(i);
vec(i)="#"+vec(i)+"#";
}
for(int i=0;i<h+2;i++){
cout<<vec(i)<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:8: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int)'
9 | vec(0)+="#";
| ~~~^~~
a.cc:10:8: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int)'
10 | vec(h+1)+="#";
| ~~~^~~~~
a.cc:... |
s582734686 | 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 ] = ’# ’;
... |
s313802000 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cout << "h,wを入力 -> ";
while(1){
cin >> h >> w;
cout <<"(h,w)=(" << h <<"," <<w<<")" << endl;
if(h>=1 && h<=100 && w>=1 && w<=100){
break;
}
else{
cout << "1<= H,W <=... | a.cc: In function 'int main()':
a.cc:29:11: error: expected ';' before '}' token
29 | return 0
| ^
| ;
30 | }
| ~
|
s378506065 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cout << "h,wを入力 -> ";
while(1){
cin >> h >> w;
cout <<"(h,w)=(" << h <<"," <<w<<")" << endl;
if(h>=1 && h<=100 && w>=1 && w<=100){
break;
}
else{
cout << "1<= H,W <=... | a.cc: In function 'int main()':
a.cc:30:7: error: expected '}' at end of input
30 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s671846619 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cout << "h,wを入力 -> ";
while(1){
cin >> h >> w;
cout <<"(h,w)=(" << h <<"," <<w<<")" << endl;
if(h>=1 && h<=100 && w>=1 && w<=100)
break;
else{
cout << "1<= H,W <= 100. re-input." << endl;
}
}
... | a.cc: In function 'int main()':
a.cc:64:6: error: expected '}' at end of input
64 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s510219331 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H,W;
string A
| a.cc: In function 'int main()':
a.cc:7:11: error: expected initializer at end of input
7 | string A
| ^
a.cc:7:11: error: expected '}' at end of input
a.cc:5:13: note: to match this '{'
5 | int main () {
| ^
|
s437853105 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
for(int x=0;x<W+2;x++){
cout<<"#"<<endl;
}
vector<char> P(W);
for(int p=0;p<H;p++){
cin>>P;
cout<<"#"<<P<<"#"<<endl;
}
for(int x=0;x<W+2;x++){
cout<<"#"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
11 | cin>>P;
| ~~~^~~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<char>}
In ... |
s314371034 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
for(int x=0;x<W+2;x++){
cout<<"#"<<endl;
}
vector<string> P;
for(int p=0;p<H;p++){
cin>>P;
cout<<"#"<<P<<"#"<<endl;
}
for(int x=0;x<W+2;x++){
cout<<"#"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
11 | cin>>P;
| ~~~^~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
... |
s426793946 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
for(int x=0;x<W+2;x++){
cout<<"#"<<endl;
}
for(int p=0;p<H;p++){
vector <string>Pi(W);
cin>>Pi>>endl;
cout<<"#"<<Pi<<"#"<<endl;
}
for(int x=0;x<W+2;x++){
cout<<"#"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
11 | cin>>Pi>>endl;
| ~~~^~~~
| | |
| | std::vector<std::__cxx11::basic_string<c... |
s809066324 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector<string> L=vector<string>(W+2,#);
cout<<L<<endl;
for(int p=0;p<H;p++){
vector <string>Pi(W);
cin>>Pi>>endl;
cout<<"#"<<Pi<<"#"<<endl;
}
cout<<L<<endl;
}
| a.cc:6:39: error: stray '#' in program
6 | vector<string> L=vector<string>(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:6:34: error: expected primary-expression before '(' token
6 | vector<string> L=vector<string>(W+2,#);
| ... |
s661982626 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector<char> L=vector<char>(W+2,#);
cout<<L<<endl;
for(int p=0;p<H;p++){
vector <string>Pi(W);
cin>>Pi>>endl;
cout<<"#"<<Pi<<"#"<<endl;
}
cout<<L<<endl;
}
| a.cc:6:35: error: stray '#' in program
6 | vector<char> L=vector<char>(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:6:30: error: expected primary-expression before '(' token
6 | vector<char> L=vector<char>(W+2,#);
| ^
a.cc:6:36: ... |
s772128879 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vectur<char> L=vector<char>(W+2,#);
cout<<L<<endl;
for(int p=0;p<H;p++){
vector <string>Pi(W);
cin>>Pi>>endl;
cout<<"#"<<Pi<<"#"<<endl;
}
cout<<L<<endl;
}
| a.cc:6:35: error: stray '#' in program
6 | vectur<char> L=vector<char>(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'vectur' was not declared in this scope
6 | vectur<char> L=vector<char>(W+2,#);
| ^~~~~~
a.cc:6:10: error: expected primary-expr... |
s837647322 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int height, widgth; //縦H, 横W
cin >> height >> widgth;
vector<string> lines(widgth);
for(int line_i=0; line_i<height; line_i++)
cin >> lines.at(line_i);
for(int i=0; i<(widgth+2); i++)
cout << "#" << endl;
for(int i=0; i<height; i... | a.cc: In function 'int main()':
a.cc:16:25: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
16 | cout << "#" << lines(i) << "#" << endl;
| ~~~~~^~~
|
s898042983 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int height, widgth; //縦H, 横W
cin >> height >> widgth;
vector<string> lines(widgth);
for(int line_i=0; line_i<height; line_i++)
cin >> lines.at(i);
for(int i=0; i<(widgth+2); i++)
cout << "#" << endl;
for(int i=0; i<height; i++)
... | a.cc: In function 'int main()':
a.cc:10:21: error: 'i' was not declared in this scope
10 | cin >> lines.at(i);
| ^
a.cc:16:25: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
16 | cout << "#" << lines(i) << "#" << endl;
| ... |
s773583469 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int height, widgth; //縦H, 横W
cin >> height >> widgth;
vector<string> lines(widgth);
for(int line_i=0; line_i<height; line_i++)
cin >> vec.at(i);
for(int i=0; i<(widgth+2); i++)
cout << "#" << endl;
for(int i=0; i<height; i++)
... | a.cc: In function 'int main()':
a.cc:10:12: error: 'vec' was not declared in this scope
10 | cin >> vec.at(i);
| ^~~
a.cc:10:19: error: 'i' was not declared in this scope
10 | cin >> vec.at(i);
| ^
a.cc:16:25: error: no match for call to '(std::vector<std::__cxx11:... |
s301092749 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int height, widgth; //縦H, 横W
cin >> height >> widgth;
vector<string> lines(widgth)
for(int line_i=0; line_i<height; line_i++)
cin >> vec.at(i);
for(int i=0; i<(widgth+2); i++)
cout << "#" << endl;
for(int i=0; i<height; i++)
... | a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
9 | for(int line_i=0; line_i<height; line_i++)
| ^~~
a.cc:9:21: error: 'line_i' was not declared in this scope; did you mean 'lines'?
9 | for(int line_i=0; line_i<height; line_i++)
| ^~~~~~
... |
s318327538 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_ij;
int a_HW
cin >> H;
cin >> W;
cin >> a_HW;
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
}
if ( W = 0 && 1 <= H <= H ) {
cout << '#';
}
... | a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'cin'
10 | cin >> H;
| ^~~
a.cc:12:12: error: 'a_HW' was not declared in this scope
12 | cin >> a_HW;
| ^~~~
|
s232135375 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_ij;
cin >> H;
cin >> W;
cin >> a_HW;
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
}
if ( W = 0 && 1 <= H <= H ) {
cout << '#';
}
if ( H = (... | a.cc: In function 'int main()':
a.cc:11:12: error: 'a_HW' was not declared in this scope
11 | cin >> a_HW;
| ^~~~
|
s370050259 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_HW;
cin >> H;
cin >> W;
cin >> a_HW;
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
}
if ( W = 0 && 1 <= H <= H ) {
cout << '#';
}
if ( H = (... | a.cc: In function 'int main()':
a.cc:25:17: error: 'a_ij' was not declared in this scope
25 | cout << a_ij;
| ^~~~
a.cc:28:17: error: 'a_ij' was not declared in this scope
28 | cout << a_ij;
| ^~~~
|
s911619060 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_HW;
cin >> H;
cin >> W;
cin >> a_HW;
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
}
if ( W = 0 && 1 <= H <= H ) {
cout << '#';
}
if ( H = (... | a.cc: In function 'int main()':
a.cc:25:17: error: 'a_ij' was not declared in this scope
25 | cout << a_ij;
| ^~~~
a.cc:27:13: error: 'j' was not declared in this scope
27 | for(j=1; j<=W; j++) {
| ^
a.cc:28:17: error: 'a_ij' was not declared in this scope
... |
s887944897 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_HW;
cin >> H;
cin >> W;
cin >> a_HW;
for(H=1; W=1; H<=H); W<=W; H++; W++;) {
cout << a_HW;
}
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
}
... | a.cc: In function 'int main()':
a.cc:12:41: error: expected primary-expression before ')' token
12 | for(H=1; W=1; H<=H); W<=W; H++; W++;) {
| ^
|
s138827408 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_HW;
cin >> H;
cin >> W;
cin >> a_HW;
for(H=1; W=1; H<=H; W<=W; H++; W++) {
cout << a_HW;
}
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
}
i... | a.cc: In function 'int main()':
a.cc:12:23: error: expected ')' before ';' token
12 | for(H=1; W=1; H<=H; W<=W; H++; W++) {
| ~ ^
| )
a.cc:12:39: error: expected ';' before ')' token
12 | for(H=1; W=1; H<=H; W<=W; H++; W++) {
| ... |
s048424676 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_HW;
cin >> H;
cin >> W;
cin >> a_HW;
for( H = 1; W = 1; (H <= H); (W <= W); H++; W++;) {
cout << a_HW;
}
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#... | a.cc: In function 'int main()':
a.cc:12:32: error: expected ')' before ';' token
12 | for( H = 1; W = 1; (H <= H); (W <= W); H++; W++;) {
| ~ ^
| )
a.cc:12:53: error: expected primary-expression before ')' token
12 | for( H = 1; W = 1... |
s033890576 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H;
1 <= H <= 100;
int W;
1 <= W <= 100;
int a_HW;
cin >> H;
cin >> W;
cin >> a_HW;
for( H = 1; W = 1; H <= H; W <= W; H++; W++) {
cout << a_HW;
}
if ( W = 0 && 0 <= H <= (H + 1) ) {
cout << '#';
... | a.cc: In function 'int main()':
a.cc:12:30: error: expected ')' before ';' token
12 | for( H = 1; W = 1; H <= H; W <= W; H++; W++) {
| ~ ^
| )
a.cc:12:48: error: expected ';' before ')' token
12 | for( H = 1; W = 1; H <= H; W <= W; H++; W... |
s971605780 | p03712 | C | #include <stdio.h>
int main(){
int h, w;
scanf("%d%d", &h, &w);
char a[h][w];
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
scanf("%c", &a[i][j]);
}
}
for(i = 0; i < h+2; i++){
printf("#");
}
printf("/n");
for(i = 0; i < h; i++){
printf("#");
for(j = 0; j < w; j+... | main.c: In function 'main':
main.c:12:7: error: 'i' undeclared (first use in this function)
12 | for(i = 0; i < h+2; i++){
| ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: 'j' undeclared (first use in this function)
18 | ... |
s459348461 | p03712 | C | #include <stdio.h>
int main(void){
int i,j,H=0,W=0;
char a[H+2][W+2];
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%c",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
... | main.c: In function 'main':
main.c:9:7: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scnaf("%c",&a[i][j]);
| ^~~~~
| scanf
|
s648918685 | p03712 | C | #include <stdio.h>
int main(void){
int i,j,H=0,W=0;
char a[H][W];
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%c",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
... | main.c: In function 'main':
main.c:9:7: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scnaf("%c",&a[i][j]);
| ^~~~~
| scanf
|
s874431295 | p03712 | C | #include <stdio.h>
int main(void){
int i,j,H,W;
char a[][];
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%c",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
printf... | main.c: In function 'main':
main.c:5:8: error: array type has incomplete element type 'char[]'
5 | char a[][];
| ^
main.c:5:8: note: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first
main.c:9:7: error: implicit declaration of function 'scnaf'; did you m... |
s229686711 | p03712 | C | #include <stdio.h>
int main(void){
int i,j,H,W;
string a[][];
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%c",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
prin... | main.c: In function 'main':
main.c:5:3: error: unknown type name 'string'; did you mean 'stdin'?
5 | string a[][];
| ^~~~~~
| stdin
main.c:5:10: error: array type has incomplete element type 'int[]'
5 | string a[][];
| ^
main.c:5:10: note: declaration of 'a' as multidimensiona... |
s903698091 | p03712 | C | #include <stdio.h>
int main(void){
int i,j,H,W;
string a[][];
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%s",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
prin... | main.c: In function 'main':
main.c:5:3: error: unknown type name 'string'; did you mean 'stdin'?
5 | string a[][];
| ^~~~~~
| stdin
main.c:5:10: error: array type has incomplete element type 'int[]'
5 | string a[][];
| ^
main.c:5:10: note: declaration of 'a' as multidimensiona... |
s708070813 | p03712 | C | #include <stdio.h>
int main(void){
int a[][],i,j,H,W;
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%d",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
printf("#");
... | main.c: In function 'main':
main.c:4:7: error: array type has incomplete element type 'int[]'
4 | int a[][],i,j,H,W;
| ^
main.c:4:7: note: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first
main.c:8:7: error: implicit declaration of function 'scnaf'; did ... |
s030107312 | p03712 | C | #include <stdio.h>
int main(void){
int i,j,H,W;
scanf("%d",&H); scanf("%d¥n",&W);
for(i=1; i<=H+1; i++){
for(j=1; j<=W+1; j++){
scnaf("%d",&a[i][j]);
}
printf("¥n");
}
for(i=0; i<=H+2; i++){
for(j=0; j<=W+2; j++){
if(i==0 || j==0 || i==H+2 || j== W+2){
printf("#");
}... | main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scnaf("%d",&a[i][j]);
| ^~~~~
| scanf
main.c:8:19: error: 'a' undeclared (first use in this function)
8 | scnaf("%d",&a[i][j]);... |
s862749527 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pint = pair<int,int>;
ll mod = 1000000007;
int dx[4] = {1,0,-1,0},dy[4] = {0,1,0,-1};
void chmin(long long &a, long long b) { if (a > b) a = b; }
const long long INF = 1LL<<60;
int main() {
int h,w;
cin >> h >> w;
vector<string> a(h,v... | a.cc: In function 'int main()':
a.cc:12:39: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int&, std::vector<char>)'
12 | vector<string> a(h,vector<char>(w));
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s260398181 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pint = pair<int,int>;
ll mod = 1000000007;
int dx[4] = {1,0,-1,0},dy[4] = {0,1,0,-1};
void chmin(long long &a, long long b) { if (a > b) a = b; }
const long long INF = 1LL<<60;
int main() {
int h,w;
cin >> h >> w;
vector<string> a(h,v... | a.cc: In function 'int main()':
a.cc:12:41: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int&, std::vector<std::__cxx11::basic_string<char> >)'
12 | vector<string> a(h,vector<string>(w));
| ^
In file included from /u... |
s468647821 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b, c, i;
int A[999999999999999999999999999999999999999999999999] = {};
cin >> a >> b >> c;
for(i=0;i<a;i++) {
cin >> A[i];
}
for(i=-2;i<b;i++) {
cout << "#";
}
cout << endl;
for(i=0;i<a;i++) {
cout << "#" << A[i-1] << "#" << endl... | a.cc:5:9: warning: integer constant is too large for its type
5 | int A[999999999999999999999999999999999999999999999999] = {};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:7: error: size of array 'A' exceeds maximum object size '9223372036854775807'
... |
s982152990 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H, W;
cin >> H >> W;
vector<string>low(H);
for(int i=0; i<H; i++){
cin >> low.at(i);
}
for(i=0; i<(W+2); i++){
cout << '#';
}
cout << endl;
for(int j=0; j<H; j++){
/*for(i=0; i<(W+2); i++){
if(i == 0 || i == (W+1)){
... | a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
11 | for(i=0; i<(W+2); i++){
| ^
a.cc:24:9: error: 'i' was not declared in this scope
24 | for(i=0; i<(W+2); i++){
| ^
|
s925663218 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> str(H + 2);
for(int i = 0; i < (H + 2); i++){
if(i == 0 || i == H + 1){
for(int j = 0; j < W; j++)
str.at(i) += '#'
}
else
cin >> str.at(i);
cout << '#' << str.at(i) << '#' << end... | a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before '}' token
11 | str.at(i) += '#'
| ^
| ;
12 | }
| ~
|
s933641363 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> str(H + 2);
for(int i = 0; i < (H + 2); i++){
if(i == 0 || i == H + 1){
for(int j = 0; j < W; j++)
str += '#'
}
else
cin >> str.at(i);
cout << '#' << str.at(i) << '#' << endl;
... | a.cc: In function 'int main()':
a.cc:11:11: error: no match for 'operator+=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'char')
11 | str += '#'
| ~~~~^~~~~~
|
s306115252 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> str(H + 2);
vector<char> vec(W, '#');
for(int i = 0; i < (H + 2); i++){
if(i == 0)
str.at(0) = vec;
else if(i == (H + 1))
str.at(H + 1) = vec;
else
cin >> str.at(i);
cout << '#'... | a.cc: In function 'int main()':
a.cc:11:19: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'std::vector<char>')
11 | str.at(0) = vec;
... |
s198436034 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> str(H + 2);
vector<char> vec(W, #);
for(int i = 0; i < (H + 2); i++){
if(i == 0)
str.at(0) = vec;
else if(i == (H + 1))
str.at(H + 1) = vec;
else
cin >> str.at(i);
cout << '#' <... | a.cc:8:23: error: stray '#' in program
8 | vector<char> vec(W, #);
| ^
a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before ')' token
8 | vector<char> vec(W, #);
| ^
a.cc:11:19: error: no match for 'operator=' (operand ... |
s072904537 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> str(H + 2);
vector<char> vec(W, #);
for(int i = 0; i < (H + 2); i++){
if(i == 0)
str.at(0) = vec;
else if(i == (H + 1))
str.at(H + 1) = vec;
else
cin >> str.at(i)
cout << '#' <<... | a.cc:8:23: error: stray '#' in program
8 | vector<char> vec(W, #);
| ^
a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before ')' token
8 | vector<char> vec(W, #);
| ^
a.cc:11:19: error: no match for 'operator=' (operand ... |
s371939964 | 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<W+2; i++) {
cout << '#';
}
cout << endl;
for (int i=0; i<H; i++) {
cin >> pic(i);
cout << '#' << pic(i) << '#' << endl;
}
for (int i=0; i<W+2; i++) {
cout << '#';
... | a.cc: In function 'int main()':
a.cc:13:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
13 | cin >> pic(i);
| ~~~^~~
a.cc:14:23: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
14 | cout << '#' << pic(i) << '#... |
s742052862 | p03712 | C++ | #include<bits/stdc++.h>
int main() {
int H,W;
cin >> H,W >> endl;
H += 2
for (int i = 0;i < H;i++) {
cout << "#" << endl;
}
cout << "#";
vector <string> A(N);
for (int i =0;i < N;i++) {
cin >> A.at(i) >> endl;
cout << A.at(i);
}
cout << "#" << endl;
cout << "#";
vector <string> ... | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> H,W >> endl;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: n... |
s535273656 | p03712 | C++ | #include<bits/stdc++.h>
int main() {
int H,W;
cin >> H,W >> endl;
H += 2
for (int i = 0;i < H;i++) {
cout << "#" << endl;
}
cout << "#";
vector <string> A(N);
for (int i =0;i < N;i++) {
cin >> A.at(i) >> endl;
cout << A.at(i);
}
cout << "#" << endl;
cout << "#";
vector <string> ... | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> H,W >> endl;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: n... |
s533225062 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
int H, W;
cin >> H >> W;
char = a;
for (int i = 0, i <= W + 1; i++){
cout << '#' ;
}
cout << e... | a.cc: In function 'int main()':
a.cc:10:10: error: expected unqualified-id before '=' token
10 | char = a;
| ^
a.cc:11:22: error: expected ';' before '<=' token
11 | for (int i = 0, i <= W + 1; i++){
| ^~~
| ;
a.cc:11:23: error: expected... |
s759366628 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
int H, W;
cin >> H >> W;
char = a
for (int i = 0, i <= W + 1; i++){
cout << '#' ;
}
cout << en... | a.cc: In function 'int main()':
a.cc:10:10: error: expected unqualified-id before '=' token
10 | char = a
| ^
a.cc:11:33: error: 'i' was not declared in this scope
11 | for (int i = 0, i <= W + 1; i++){
| ^
a.cc:18:20: error: 'a' was not declared in thi... |
s826288580 | p03712 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int i,j;
int H,W;
cin >> H >> W;
vector<char> a(H*W);
//読み込み
for(i=0;i<H*W;i++) cin >> a[i];
for(i=0;i<W+2;i++) cout << '#';
cout << endl;
for(i=0;i<H;i++){
cout << '#';
... | a.cc: In function 'int main()':
a.cc:27:14: error: expected '}' at end of input
27 | return 0;
| ^
a.cc:6:12: note: to match this '{'
6 | int main() {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.