submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s476066462 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int mai(){
int H, W, Q;
cin >> H >> W;
Q = H * W;
vector<char> Ass;
for(int i = 0;i<Q;i++){
cin >> Ass.at(i);
}
for(int j = 0;j<W+2;j++){
cout << "#";
}
cout << endl;
for(int k = 0;k<H;k++){
cout << "#";
for(int l = 0;l<W;l++){
int co = k*W + l;
... | a.cc: In function 'int mai()':
a.cc:32:1: warning: no return statement in function returning non-void [-Wreturn-type]
32 | }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit... |
s839544441 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,Q;
cin >> H >> W;
Q = W * W;
vector<char> Ass(Q);
for(int i = 0;i<Q;i++){
cin >> Ass(i);
}
for(int j = 0;j<W+2;j++){
cout << "#";
}
cout << endl;
for(int k = 0;k<Q;k++){
if(k%W == 0)
cout<< "#";
cout << Ass.at(k);
if(k%W =... | a.cc: In function 'int main()':
a.cc:11:27: error: no match for call to '(std::vector<char>) (int&)'
11 | cin >> Ass(i);
| ~~~^~~
|
s253660020 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> vec(W);
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> vec.at(j);
}
}
vector<char> vec2(W + 2);
for (int i = 0; i < H + 2; i++) {
for (int j = 0; j < W + 2;... | a.cc: In function 'int main()':
a.cc:35:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
35 | cout << vec2 << endl;
| ~~~~ ^~ ~~~~
| | |
| | std::vector<char>
| std::ostream {aka st... |
s811195458 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string c;
cin >> a >> b;
vector<string> v(a);
for(int i=0;i<a;i++){
cin >> c;
vector<string> v.at(i) = c;
}
for(int i=0;i<b+2;i++){
cout << '#';
}
cout << "" << endl;
for(int i=0;i<a;i++){
cout << '#' << v.at(i) << '#' << endl;
... | a.cc: In function 'int main()':
a.cc:10:19: error: expected initializer before '.' token
10 | vector<string> v.at(i) = c;
| ^
|
s946086502 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string c;
cin >> a >> b;
vector<string> v(a);
for(int i=0;i<a;i++){
cin >> c;
vector<string> v(i) = c;
}
for(int i=0;i<b+2;i++){
cout << '#';
}
cout << "" << endl;
for(int i=0;i<a;i++){
cout << '#' << v.at(i) << '#' << endl;
}
... | a.cc: In function 'int main()':
a.cc:10:23: error: expected ',' or ';' before '=' token
10 | vector<string> v(i) = c;
| ^
|
s382953177 | 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 << "#";
vector<int> pic(W);
for (int j = 0; j < W ; j++) {
cin >> pic.at(j);
}
pic.push_back(... | a.cc: In function 'int main()':
a.cc:20:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
20 | cout << pic << endl;
| ~~~~ ^~ ~~~
| | |
| | std::vector<int>
| std::ostream {aka std::b... |
s244020578 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W,i;
cin>>H>>W;
for(i=0;i<W+2;i++)cout<<"#";
cout<<endl;
for(j=0;j<H;j++){
string S;
cin>>S;
S=" "+S+" ";
cout<<S<<endl;
}
for(i=0;i<W+2;i++)cout<<"#";
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:7: error: 'j' was not declared in this scope
9 | for(j=0;j<H;j++){
| ^
|
s367597876 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W,i,j;
cin >> H >> W;
string A;
for(i=0;i<W+2;i++)cout << '#';
cout << endl;
for(i=0;i<H;i++){
cin >> A;
cout >> '#' >> A >> '#' >>endl;
for(i=0;i<W+2;i++)cout << '#';
cout << 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 'char')
12 | cout >> '#' >> A >> '#' >>endl;
| ~~~~ ^~ ~~~
| | |
| | char
| std::ostream {aka std::basic_ostream<... |
s899668811 | 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 ( int i = 0; i < H ; i ++)
for ( int j = 0; ... | a.cc:11:16: error: extended character ’ is not valid in an identifier
11 | b [ i ][ j ] = ’# ’;
| ^
a.cc:11:17: error: stray '#' in program
11 | b [ i ][ j ] = ’# ’;
| ^
a.cc:11:19: error: extended character ’ is not valid in an identifier
11 | b [ i ][ j ] = ’# ’;
... |
s729001850 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector<vector<int>> table(H+2,vector<int>(W+2));
cout<<table<<endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::vector<int> >')
8 | cout<<table<<endl;
| ~~~~^~~~~~~
| | |
| | std::vector<std::vector<int> >
| std::ostream {... |
s731063425 | p03712 | C++ | nclude<bits/stdc++.h>
using namespace std;
#define Mod(n) n % 1000000007
const int dx[8] = {1, 0, -1, 0, -1, 1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
int main()
{
int h,w;
cin >> h >> w;
vector<string> s(h);
for(int i = 0;i < h;i++)
{
cin >> s[i];
s[i] = "#" + s[i] ... | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<bits/stdc++.h>
| ^~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope
10 | cin >> h >> w;
| ^~~
a.cc:11:5: error: 'vector' was not declared in this scope
11 | vector<string> s(h);
|... |
s606154092 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBUG
int main() {
int H,W;
cin >>H>>W;
vector<vector<int>> vec(H,vector<int>(W));
rep(i,H){
rep(j,W){
cin >> vec.at(i)at.(j);
}
}
rep(i,H+2){
rep(j,W+2){
if((i==0)||(i==H+1)||(j==0)||(j==W+1)){
cout<... | a.cc: In function 'int main()':
a.cc:12:5: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'})
12 | cin >> vec.at(i)at.(j);
| ~~~ ^~ ~~~~~~... |
s996829661 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBUG
int main() {
int H,W;
cin >>H>>W;
vector<vector<int>> vec(H,vector<int>(W));
rep(i,H){
rep(j,W){
cin>> vec.at(i)at.(j);
}
}
rep(i,H+2){
rep(j,W+2){
if((i==0)||(i==H+1)||(j==0)||(j==W+1)){
cout<<... | a.cc: In function 'int main()':
a.cc:12:4: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'})
12 | cin>> vec.at(i)at.(j);
| ~~~^~ ~~~~~~~~... |
s039243527 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >>H>>W;
vector<int> vec(H*W);
rep(i,H){
rep(j,W){
cin>>vec1.at(i*H+j);
}
}
rep(i,H+2){
rep(j,W+2){
if((i==0)||(i==H+1)||(j==0)||(j==W+1)){
cout<<'#';
if(j==W+1... | a.cc:11:12: error: extended character is not valid in an identifier
11 | vector<int> vec(H*W);
| ^
a.cc: In function 'int main()':
a.cc:14:8: error: 'vec1' was not declared in this scope
14 | cin>>vec1.at(i*H+j);
| ^~~~
a.cc:28:8: error: 'vec1' was not declared in this scope
2... |
s372029446 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >>H>>W;
vector<int> vec2(W);
vector<vector<int>> vec1(H,vec2);
rep(i,H){
rep(j,W){
cin>>vec1.at(i).at(j);
}
}
rep(i,H+2){
rep(j,W+2){
if((i==0)||(i==H+1)||(j==0)||(... | a.cc:11:20: error: extended character is not valid in an identifier
11 | vector<vector<int>> vec1(H,vec2);
| ^
a.cc: In function 'int main()':
a.cc:14:8: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
14 | cin>>vec1.at(i).at(j);
| ^~~~
| v... |
s738283377 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >>H>>W;
vector<vector<int>> vec1(H,vec2(W));
rep(i,H){
rep(j,W){
cin>>vec1.at(i).at(j);
}
}
rep(i,H+2){
rep(j,W+2){
if((i==0)||(i==H+1)||(j==0)||(j==W+1)){
cout<<... | a.cc:10:20: error: extended character is not valid in an identifier
10 | vector<vector<int>> vec1(H,vec2(W));
| ^
a.cc: In function 'int main()':
a.cc:10:29: error: 'vec2' was not declared in this scope
10 | vector<vector<int>> vec1(H,vec2(W));
| ^~~~
a... |
s481362889 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >>H>>W;
vector<vector<int>> vec(H,vector<int>(W));
rep(i,H){
rep(j,W){
cin>>vec.at(i).at(j);
}
}
rep(i,H+2){
rep(j,W+2){
if((i==0)||(i==H+1)||(j==0)||(j==W+1)){
c... | a.cc:10:20: error: extended character is not valid in an identifier
10 | vector<vector<int>> vec(H,vector<int>(W));
| ^
a.cc: In function 'int main()':
a.cc:13:8: error: 'vec' was not declared in this scope
13 | cin>>vec.at(i).at(j);
| ^~~
a.cc:27:8: error: 'vec' was not ... |
s263776055 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H,W;
cin >>H>>W;
vector<vector<int>> vec(H,vector<int>(W));
rep(i,H){
rep(i,W){
cin>>vec.at(i).at(j);
}
}
rep(i,H+2){
rep(i,W+2){
if((i==0)||(i==H+1)||(j==0)||(j==W+1)){
c... | a.cc:10:20: error: extended character is not valid in an identifier
10 | vector<vector<int>> vec(H,vector<int>(W));
| ^
a.cc: In function 'int main()':
a.cc:13:8: error: 'vec' was not declared in this scope
13 | cin>>vec.at(i).at(j);
| ^~~
a.cc:13:21: error: 'j' was not d... |
s283015723 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,i,j a_H_W;
cin>>H>>W;
for(i=0;i<H+1;i++){
cout<<"#";
}
cout<<"#"<<endl;
for(i=0;i<H;i++){
cout<<"#";
for(int j=0;j<W;j++){
cin>>a_H_W;
cout<<a_H_W;
}
cout<<"#"<<endl;
}
for(i=0;i<H+1;i++){
cout<<"#";
... | a.cc: In function 'int main()':
a.cc:5:15: error: expected initializer before 'a_H_W'
5 | int H,W,i,j a_H_W;
| ^~~~~
a.cc:14:12: error: 'a_H_W' was not declared in this scope
14 | cin>>a_H_W;
| ^~~~~
a.cc: At global scope:
a.cc:27:5: error: redefinition of 'int main()... |
s733009662 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,i,j a_H_W;
cin>>H>>W;
for(i=0;i<H+1;i++){
cout<<"#";
}
cout<<"#"<<endl;
for(i=0;i<H;i++){
cout<<"#";
for(int j=0;j<W;j++){
cin>>a_H_W;
cout<<a_H_W;
}
cout<<"#"<<endl;
}
for(i=0;i<H+1;i++){
cout<<"#";
... | a.cc: In function 'int main()':
a.cc:5:15: error: expected initializer before 'a_H_W'
5 | int H,W,i,j a_H_W;
| ^~~~~
a.cc:14:12: error: 'a_H_W' was not declared in this scope
14 | cin>>a_H_W;
| ^~~~~
|
s602259770 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,i,j;
cin>>H>>W;
for(i=0;i<H+1;i++){
cout<<"#";
}
cout<<"#"<<endl;
for(i=0;i<H;i++){
cout<<"#";
for(int j=0;j<W;j++){
cin>>int a_H_W;
cout<<a_H_W;
}
cout<<"#"<<endl;
}
for(i=0;i<H+1;i++){
cout<<"#";
}... | a.cc: In function 'int main()':
a.cc:14:12: error: expected primary-expression before 'int'
14 | cin>>int a_H_W;
| ^~~
a.cc:15:13: error: 'a_H_W' was not declared in this scope
15 | cout<<a_H_W;
| ^~~~~
|
s325674386 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
string s(a);
int i;
for (i=0; i<a; i++)
cin >> s(i);
for (i=0; i<b; i++) //up
cout << "#";
endl;
for (i=0; i<a; i++)
cout << "#" << s.at(i) << "#" << endl;
for (i=0; i<b; i++) //u... | a.cc: In function 'int main()':
a.cc:9:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
9 | string s(a);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
fr... |
s981386361 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
string s(a);
int i;
for (i=0; i<a; i++)
cin >> s(i);
for (i=0; i<b; i++) //up
cout << "#";
endl;
for (i=0; i<a; i++)
cout << "#" << s.at(i) << "#" << endl;
for (i=0; i<b; i++) //up... | a.cc: In function 'int main()':
a.cc:9:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
9 | string s(a);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
fr... |
s849786987 | p03712 | C++ | #include<iostream>
using namespace std;
int main ()
{
char a[200][200];
int i,j,m,n,k,l;
cin>>m>>n;
k=m+2;
l=n+2;
for(i=0;i<k;i++)eh
{
for(j=0;j<l;j++)
{
a[i][j]='#';
}
}
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
cin>... | a.cc: In function 'int main()':
a.cc:10:21: error: 'eh' was not declared in this scope
10 | for(i=0;i<k;i++)eh
| ^~
|
s610052829 | p03712 | C++ | int main(){
int h, w; cin >> h >> w;
vector<vector<char>> data(h, vector<char>(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> data[i][j];
}
}
vector<vector<char>> ans(h+2, vector<char>(w+2));
for (int i = 0; i < h+2; i++) {
for (int j = 0; j < w+2; j++) {
... | a.cc: In function 'int main()':
a.cc:2:13: error: 'cin' was not declared in this scope
2 | int h, w; cin >> h >> w;
| ^~~
a.cc:3:3: error: 'vector' was not declared in this scope
3 | vector<vector<char>> data(h, vector<char>(w));
| ^~~~~~
a.cc:3:17: error: expected primary-expressi... |
s071937081 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H;
int W;
int count = 0;
cin >> H >> W;
vector<int> tate(H);
vector<int> yoko(W);
vector<int> kazu(H*W);
for(int i=0; i < H*W;i++){
cin >> kazu(i);
}
for(int i=0; i < W + 1;i++){
if(i < W){
cout << "#";
}else{
cou... | a.cc: In function 'int main()':
a.cc:13:16: error: no match for call to '(std::vector<int>) (int&)'
13 | cin >> kazu(i);
| ~~~~^~~
|
s862583249 | p03712 | C++ | #define _GLIBCXX_DEBUG
#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++) {
string a;
cin >> s;
cout << "#" << a << "#" << endl;
}
for (in... | a.cc: In function 'int main()':
a.cc:14:16: error: 's' was not declared in this scope
14 | cin >> s;
| ^
|
s587004161 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H, W;
cin >> H >> W;
vector<string> pixel;
for(int i = 0; i < H; i++){
cin >> pixel;
}
for(int i = 0; i < W + 2; i++){
cout << '#';
}
cout << endl;
for(int i = 0; i < H; i++){
cout << '#' << pixel.at(i) << '#' << endl... | a.cc: In function 'int main()':
a.cc:10:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
10 | cin >> pixel;
| ~~~ ^~ ~~~~~
| | |
| | std::vector<std::__cxx11::basic_... |
s227825825 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
for (int i = 0; i < w + 2; i++)
cout << #;
cout << endl;
for (int i = 0; i < h; i++){
vector<int> v_i(w);
cout << '#';
for (int j = 0; j < w; j++){
cin >> v_i.at(j);
cout << v_i.at(j);
... | a.cc:9:13: error: stray '#' in program
9 | cout << #;
| ^
a.cc:24:13: error: stray '#' in program
24 | cout << #;
| ^
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before ';' token
9 | cout << #;
| ^
a.cc:24:14... |
s574234676 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<char> c(H*W)
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin >> c.at(i+j)
}
}
for(int i=0;i<W;i++){
cout << "#";
if(i==W-1)
cout << endl;
}
for(int i=0;i<H;i++){
cout << "#";
for(... | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<H;i++){
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<H;i++){
| ^
|
s562444540 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
int sum=0;
cin >> H >> W;
string st;
for(int i=0;i<H;i++){
cout >> "#";
}
for(int i=0;i<=W+1;i++){
cout >> "#";
}
cout >> endl;
/* vector<vector<char>> vec(105, vector<int>(105));
//vector<char> vec(105)(105);
... | a.cc: In function 'int main()':
a.cc:10:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
10 | cout >> "#";
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {ak... |
s815510130 | p03712 | C++ | #include <
using namespace std;
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
int main(){
int height, width;
cin >> height >> width;
vector<vector<char> > pixel(height + 2, vector<char> (width + 2, '#'));
rep(i, 1, height + 1){
rep(j, 1, width + 1){
cin >> pixel.at(i).at(... | a.cc:1:11: error: missing terminating > character
1 | #include <
| ^
a.cc:1:10: error: empty filename in #include
1 | #include <
| ^
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin >> height >> width;
| ^~~
a.cc:1:1: ... |
s170205726 | p03712 | C++ | using namespace std;
int main(){
int H, N;
cin >> H >> N;
vector<char> A(N * H);
for (int i = 0; i < N * H; i++){
cin >> A.at(i);
}
for (int j = 0; j < N + 2; j++){
cout << "#";
}
cout << endl;
for (int o = 0; o < H; o++){
cout << "#";
for (int k = 0; k < N; k++){
... | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> H >> N;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:6:3: error: 'v... |
s183079488 | p03712 | C++ | using namespace std;
int main(){
int H, N;
cin >> H >> N;
vector<char> A(N * H);
for (int i = 0; i < N * H; i++){
cin >> A.at(i);
}
for (int j = 0; j < N + 2; j++){
cout << "#";
}
cout << endl;
for (int o = 0; o < H; o++){
cout << "#";
for (int k = 0; k < N; k++){
... | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> H >> N;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:6:3: error: 'v... |
s615421671 | p03712 | C++ | using namespace std;
int main(){
int H, N
cin >> H >> N
vector<char> A(N * H);
for (int i = 0; i < N * H; i++){
cin >> A.at(i);
}
for (int j = 0; j < N + 2; j++){
cout << "#";
}
cout << endl;
for (int o = 0; o < H; o++){
cout << "#";
for (int k = 0; k < N; k++){
c... | a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'cin'
5 | cin >> H >> N
| ^~~
a.cc:8:23: error: 'N' was not declared in this scope
8 | for (int i = 0; i < N * H; i++){
| ^
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin >... |
s606572156 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin >> H >> W;
vector<string> ary(H);
for (int i = 0; i <= H + 1; i++) {
if (i == 0 || i == H + 1) {
for (int j == 0; j < W + 2; j++) {
cout << '#';
}
cou... | a.cc: In function 'int main()':
a.cc:13:23: error: expected ';' before '==' token
13 | for (int j == 0; j < W + 2; j++) {
| ^~~
| ;
a.cc:13:24: error: expected primary-expression before '==' token
13 | for (int j == 0; j < W + 2; j++)... |
s393715329 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
main() {
int H, W;
string s;
cin << H << W;
for(int i=0; i<W+1; i++){
cout << '#';
}
cout << endl;
for(int x=0; x<H-1; x++){
cin >> s;
cout << '#' << s << '#' << endl;
}
for(int y=0; y<W+1; y++){
cout << '#';
}
cout << endl;
}
| a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << H << W;
| ~~~ ^~ ~
|... |
s039214890 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
main() {
int H, W;
string s;
cin >> H >> W;
for(int i=0; i<W+1; i++){
cout << '#';
}
cout << endl;
for(int x=0; x<H; x++){
cin >> s;
cout << '#' << s << '#' << endl;
}
for(int y0; yW+1; y+){
cout << '#';
}
cout << endl;
}
| a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:16:15: error: 'yW' was not declared in this scope; did you mean 'y0'?
16 | for(int y0; yW+1; y+){
| ^~
| y0
a.cc:16:21: er... |
s357883824 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector(string) vec(H);
for(int i=0;i<H;i++){
cin >> vec.at(i);
}
cout << string(W+2,#) << endl;
for(int i=0;i<H;i++){
cout << '#' << vec.at(i) << '#' << endl;
}
cout << string(W+2,'#') << endl;
}
| a.cc:14:22: error: stray '#' in program
14 | cout << string(W+2,#) << endl;
| ^
a.cc: In function 'int main()':
a.cc:8:9: error: missing template arguments before '(' token
8 | vector(string) vec(H);
| ^
a.cc:8:16: error: expected primary-expression before ')' token
... |
s058572256 | 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<char> abc(W);
for (int j = 0;j < H;j++) {
cout << "#";
for (int i = 0;i < W;i++) {
cin >> abc(i);
cou... | a.cc: In function 'int main()':
a.cc:21:17: error: no match for call to '(std::vector<char>) (int&)'
21 | cin >> abc(i);
| ~~~^~~
|
s148541749 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int i,j,H, W;
vector<vector<int>> data(H+2, vector<int>(W+2));
cin>>H>>W;
for(i=0;i<H+2;i++){
for(j=0;j<W+2;j++){
if(i=o||i=H+2||j=0||j=W+2){
data.at(i).at(j)="#";
}
else{
cin>>data.at(i).at(j);
... | a.cc: In function 'int main()':
a.cc:15:12: error: 'o' was not declared in this scope
15 | if(i=o||i=H+2||j=0||j=W+2){
| ^
a.cc:15:25: error: lvalue required as left operand of assignment
15 | if(i=o||i=H+2||j=0||j=W+2){
| ~^~~
a.cc:16:26: error: invalid c... |
s768501714 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
vector<vector<int>> data(H+2, vector<int>(W+2));
cin>>H>>W;
for(i=0;i<H+2;i++){
for(j=0;j<W+2;j++){
if(i=o||i=H+2||j=0||j=W+2){
data.at(i).at(j)="#";
}
else{
cin>>data.at(i).at(j);
}
... | a.cc: In function 'int main()':
a.cc:12:7: error: 'i' was not declared in this scope
12 | for(i=0;i<H+2;i++){
| ^
a.cc:13:13: error: 'j' was not declared in this scope
13 | for(j=0;j<W+2;j++){
| ^
a.cc:15:12: error: 'o' was not declared in this scope
15 | if(i=o||i... |
s658969343 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H W;
vector<vector<int>> data(H+2, vector<int>(W+2));
cin>>H>>W;
for(i=0;i<H+2;i++){
for(j=0;j<W+2;j++){
if(i=o||i=H+2||j=0||j=W+2){
data.at(i).at(j)="#";
}
else{
cin>>data.at(i).at(j);
}
... | a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'W'
6 | int H W;
| ^
a.cc:8:28: error: 'H' was not declared in this scope
8 | vector<vector<int>> data(H+2, vector<int>(W+2));
| ^
a.cc:8:45: error: 'W' was not declared in this scope
... |
s587788903 | 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++){
string pixel;
cin >> pixel;
cout <<"#";
cout <<pixel;
cout <<"#"<<endl;
}
for(int i=0;i<W+2;i++){
cout <<"#";
}
cout <<endl;
| a.cc: In function 'int main()':
a.cc:22:15: error: expected '}' at end of input
22 | cout <<endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s712588304 | 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++){
string pixel
cin >> pixel;
cout <<"#";
cout <<pixel;
cout <<"#"<<endl;
}
for(int i=0;i<W+2;i++){
cout <<"#";
}
cout <<endl; | a.cc: In function 'int main()':
a.cc:14:3: error: expected initializer before 'cin'
14 | cin >> pixel;
| ^~~
a.cc:16:10: error: 'pixel' was not declared in this scope
16 | cout <<pixel;
| ^~~~~
a.cc:22:15: error: expected '}' at end of input
22 | cout <<endl;
| ... |
s298088758 | p03712 | C++ | b
| a.cc:1:1: error: 'b' does not name a type
1 | b
| ^
|
s850735291 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string word;
cin >> H >> W;
for(int i = 0;i < W+2;i++){
cout << "#";
}
cout << endl;
cout << "#";
for(int i = 0;i < H;i++){
cin >> word;
cout << word << "#" << endl;
}
for(int i = 0;i < W+2;i++){
cout << "#";
}
}
| a.cc: In function 'int main()':
a.cc:7:10: error: 'H' was not declared in this scope
7 | cin >> H >> W;
| ^
a.cc:7:15: error: 'W' was not declared in this scope
7 | cin >> H >> W;
| ^
|
s846610092 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B;
cin >> A >> B;
vector<string> vec(A);
vec.size() = B;
//for (int i = 0; i < A;i++) {
// cin >> vec.at(i);
// }//代入
for (int i = 0; i < A + 2;i++) {
cout << "#" << endl;
}//1行目の#を入力
for (int i = 0;i < A;i++) {
cout <<... | a.cc: In function 'int main()':
a.cc:8:11: error: lvalue required as left operand of assignment
8 | vec.size() = B;
| ~~~~~~~~^~
|
s559927188 | 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;
for(int i=0;i<H;i++){
vector<char> a(W);
cout<<"#";
for(int j=0;j<W;j++){
cin>>a.at(j);
cout<<a.at(j);
}
cout<<"#"<<endl;
} | a.cc: In function 'int main()':
a.cc:18:4: error: expected '}' at end of input
18 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s971546144 | 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;
for(int i=0;i<H;i++){
vector<char> a(W);
cout<<"#";
for(int j=0;j<W;j++){
cin>>a.at(j);
cout<<a.at(j);
}
cout<<"#"<<endl;
} | a.cc: In function 'int main()':
a.cc:18:4: error: expected '}' at end of input
18 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s894708221 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
char a[h+2][w+2];
for(int i=0;i<=w+1;i++){
a.at(0).at(i)='#';
a.at(h+1).at(i)='#';
}
for(int i=1;i<=h;i++){
a.at(i).at(0)='#';
for(int j=1;j<=w;j++){
cin >> a.at(i).at(... | a.cc: In function 'int main()':
a.cc:9:11: error: request for member 'at' in 'a', which is of non-class type 'char [(h + 2)][(w + 2)]'
9 | a.at(0).at(i)='#';
| ^~
a.cc:10:11: error: request for member 'at' in 'a', which is of non-class type 'char [(h + 2)][(w + 2)]'
10 | a.at(h+1)... |
s569165392 | p03712 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
Integer h = scan.nextInt();
Integer w = scan.nextInt();
StringBuilder sb = new StringBuilder();
for(int i = 0; i < w + 2; i++) {
sb.append("#")
}
System.out.println(sb);
... | Main.java:10: error: ';' expected
sb.append("#")
^
Main.java:22: error: ';' expected
sb.append("#")
^
2 errors
|
s720265530 | 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 ] = ’# ’;
... |
s466547519 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
string a="#";
cin>>H>>W;
vector <string> top(W+2,a);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main(W+2,a);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot(W+2,a);
co... | a.cc: In function 'int main()':
a.cc:9:7: 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<<top<<endl;
| ~~~~^~~~~
| | |
| | std::vector<std::__cxx11::basic_string<char... |
s194421896 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
string a=#;
cin>>H>>W;
vector <string> top(W+2,a);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main(W+2,a);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot(W+2,a);
cout... | a.cc:6:12: error: stray '#' in program
6 | string a=#;
| ^
a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before ';' token
6 | string a=#;
| ^
a.cc:9:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostre... |
s359392488 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
string "#";
cin>>H>>W;
vector <string> top(W+2,#);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main(W+2,#);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot(W+2,#);
cout... | a.cc:8:27: error: stray '#' in program
8 | vector <string> top(W+2,#);
| ^
a.cc:11:30: error: stray '#' in program
11 | vector <string> main(W+2,#);
| ^
a.cc:16:27: error: stray '#' in program
16 | vector <string> bot(W+2,#);
| ... |
s677682743 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
string '#';
cin>>H>>W;
vector <string> top(W+2,'#');
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main(W+2,'#');
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot(W+2,'#');
... | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '#'
6 | string '#';
| ^~~
a.cc:8:30: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int, char)'
8 | vector <string> top(W+2,'#');
| ... |
s841123011 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
string #;
cin>>H>>W;
vector <string> top(W+2,#);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main(W+2,#);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot(W+2,#);
cout<<... | a.cc:6:10: error: stray '#' in program
6 | string #;
| ^
a.cc:8:27: error: stray '#' in program
8 | vector <string> top(W+2,#);
| ^
a.cc:11:30: error: stray '#' in program
11 | vector <string> main(W+2,#);
| ^
a.cc:16:2... |
s457450486 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector <string> top (W+2,#);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main (W+2,#);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot (W+2,#);
cout<<bot<<endl... | a.cc:7:28: error: stray '#' in program
7 | vector <string> top (W+2,#);
| ^
a.cc:10:31: error: stray '#' in program
10 | vector <string> main (W+2,#);
| ^
a.cc:15:28: error: stray '#' in program
15 | vector <string> bot (W+2,#);
... |
s322956397 | p03712 | C++ | #include <bits/stdc++.H>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector <string> top (W+2,#);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <string> main (W+2,#);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <string> bot (W+2,#);
cout<<bot<<endl... | a.cc:1:10: fatal error: bits/stdc++.H: No such file or directory
1 | #include <bits/stdc++.H>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s418317918 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector <int> top (W+2,#);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <int> main (W+2,#);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <int> bot (W+2,#);
cout<<bot<<endl;
} | a.cc:7:25: error: stray '#' in program
7 | vector <int> top (W+2,#);
| ^
a.cc:10:28: error: stray '#' in program
10 | vector <int> main (W+2,#);
| ^
a.cc:15:25: error: stray '#' in program
15 | vector <int> bot (W+2,#);
| ... |
s509102268 | p03712 | C++ | #include <bits/stdc++.H>
using namespace std;
int main(){
int H,W;
cin>>H>>W;
vector <int> top (W+2,#);
cout<<top<<endl;
for(int i=0; i<H+2; i++){
vector <int> main (W+2,#);
for(int j=1; j<w+1; j++)
cin>>main.at(j);
cout<<main<<endl;
}
vector <int> bot (W+2,#);
cout<<bot<<endl;
} | a.cc:1:10: fatal error: bits/stdc++.H: No such file or directory
1 | #include <bits/stdc++.H>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s801573161 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
vector<char> vecA(H)(W),vecB(H+2)(W+2);
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>vecA.at(i)(j);
}
}
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
if(i==0||i==H+1||j==0||j==W+1)
vecB.at(i)(j)... | a.cc: In function 'int main()':
a.cc:6:23: error: expected ',' or ';' before '(' token
6 | vector<char> vecA(H)(W),vecB(H+2)(W+2);
| ^
a.cc:10:22: error: expression cannot be used as a function
10 | cin>>vecA.at(i)(j);
| ~~~~~~~~~~^~~
a.cc:17:9: error: 'vecB' ... |
s808374050 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> S(W+2);
string T;
for (int i=0; i < W+2; i++){
S.at(i) = '#';
}
cout << S << endl;
for (int i=0; i<H; i++){
cin >> T;
cout << '#' << T << '#'<<endl;
}
cout << S << endl;
}
#include <bits/std... | a.cc: In function 'int main()':
a.cc:12:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
12 | cout << S << endl;
| ~~~~ ^~ ~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<... |
s605273225 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> S(W+2);
string T;
for (int i=0; i < W+2; i++){
S.at(i) = '#';
}
cout << S << endl;
for (int i=0; i<H; i++){
cin >> T;
cout << '#' << T << '#'<<endl;
}
cout << S << endl;
}
#include <bits/std... | a.cc: In function 'int main()':
a.cc:12:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
12 | cout << S << endl;
| ~~~~ ^~ ~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<... |
s635494772 | p03712 | C++ | int main() {
int H,W;
cin >> H >> W;
string S;
string T;
for (int i=0; i < W+2; i++){
S.push_back('#');
}
cout << S << endl;
for (int i=0; i<H; i++){
cin >> T;
cout << '#' << T << '#'<<endl;
}
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> H >> W;
| ^~~
a.cc:4:3: error: 'string' was not declared in this scope
4 | string S;
| ^~~~~~
a.cc:5:9: error: expected ';' before 'T'
5 | string T;
| ^~
| ;
a.c... |
s713414229 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<char> S(W+2);
string T;
for (int i=0; i < W+2; i++){
S.at(i) = '#';
}
cout << S << endl;
for (int i=0; i<H; i++){
cin >> T;
cout << '#' << T << '#'<<endl;
}
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:12:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
12 | cout << S << endl;
| ~~~~ ^~ ~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<... |
s834596409 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
string S(W+2);
string T;
for (int i=0; i < W+2; i++){
S.at(i) = '#';
}
cout << S << endl;
for (int i=0; i<H; i++){
cin >> T;
cout << '#' << T << '#'<<endl;
}
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:7:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
7 | string S(W+2);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/i... |
s610379578 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int h,w,i,j;
cin>>h>>w;
vector<string> v((h+2)*(w+2),"#");
for(i=1;i<w+1;i++){
for(j=1;j<h+1;j++){
cin>>v.at(i+w*j);
}
}
for(i=0;i<w+2;i++){
for(j=0;j<h+2;j++){
cout<<v.at(i+w*j);
}
cout<<"\n";
}
}
#inclu... | a.cc:23:5: error: redefinition of 'int main()'
23 | int main(void){
| ^~~~
a.cc:3:5: note: 'int main()' previously defined here
3 | int main(void){
| ^~~~
|
s290668844 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int h,w,i,j;
cin>>h>>w;
vector<char> v((h+2)*(w+2),"#");
for(i=1;i<w+1;i++){
for(j=1;j<h+1;j++){
cin>>v.at(i+w*j);
}
}
for(i=0;i<w+2;i++){
for(j=0;j<h+2;j++){
cout<<v.at(i+w*j);
}
cout<<"\n";
}
} | a.cc: In function 'int main()':
a.cc:6:33: error: no matching function for call to 'std::vector<char>::vector(int, const char [2])'
6 | vector<char> v((h+2)*(w+2),"#");
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/function... |
s486939504 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int h,w,i,j;
cin>>h>>w;
vector<char> v((h+2)*(w+2),"#");
for(i=1;i<w;i++){
for(j=1;j<h;j++){
cin>>v.at(i+w*j);
}
}
for(i=0;i<w+1;i++){
for(j=0;j<h+1;j++){
cout<<v.at(i+w*j);
}
cout<<"\n";
}
} | a.cc: In function 'int main()':
a.cc:6:33: error: no matching function for call to 'std::vector<char>::vector(int, const char [2])'
6 | vector<char> v((h+2)*(w+2),"#");
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/function... |
s311505631 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int h,w,i,j;
cin>>h>>w;
vector<char> v[(h+2)*(w+2),"#"];
for(i=1;i<w;i++){
for(j=1;j<h;j++){
cin>>v.at(i+w*j);
}
}
for(i=0;i<w+1;i++){
for(j=0;j<h+1;j++){
cout<<v.at(i+w*j);
}
cout<<"\n";
}
} | a.cc: In function 'int main()':
a.cc:6:29: error: expected ']' before ',' token
6 | vector<char> v[(h+2)*(w+2),"#"];
| ^
| ]
a.cc:6:30: error: expected unqualified-id before string constant
6 | vector<char> v[(h+2)*(w+2),"#"];
| ... |
s079020340 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int h,w;
cin>>h>>w;
vector<char> v[(h+2)*(w+2),"#"]
for(i=1;i<w;i++){
for(j=1;j<h;j++){
cin>>v.at(i+w*j)
}
}
for(i=0;i<w+1;i++){
for(j=0;j<h+1;j++){
cout<<v.at(i+w*j)
}
cout<<"\n"
}
} | a.cc: In function 'int main()':
a.cc:6:29: error: expected ']' before ',' token
6 | vector<char> v[(h+2)*(w+2),"#"]
| ^
| ]
a.cc:6:30: error: expected unqualified-id before string constant
6 | vector<char> v[(h+2)*(w+2),"#"]
| ... |
s036112542 | 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 ] = ’# ’;
... |
s604508809 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
char a;
cin>>H>>W;
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
if(i==0||i==H+1||j==0||j==W+1)cout<<"#";
else{
cin>>a;
cout<<a
}
}
cout<<endl;
}
} | a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before '}' token
12 | cout<<a
| ^
| ;
13 | }
| ~
|
s085337119 | p03712 | C++ | #include <iostream>
using namespace std;
int main(){
int h,w;
cin >> h >> w;
char arr[h][w];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin >> arr[h][w];
}
}
for(int i=0;i<w+2;i++){
cout << "#";
}
cout << endl;
for(int i=0;i<h;i++){
cout << "#";
for(int j=0;j<w,j++){
... | a.cc: In function 'int main()':
a.cc:19:24: error: expected ';' before ')' token
19 | for(int j=0;j<w,j++){
| ^
| ;
|
s791607270 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<string> vec(W);
for(int i=0; i<W+2; i++){
cout << '#';
}
cout << endl;
for(int i=0; i<H; i++){
cout << '#';
for(int l=0; l<W; l++){
cin >> vec.at(l);
}
for(int l=0; l<W; l++){
... | a.cc: In function 'int main()':
a.cc:24:4: error: expected '}' at end of input
24 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s220796909 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main{
int H,W;
cin >> H >> W;
vector<string> vec(W);
for(int i=0; i<W+2; i++){
cout << '#';
}
cout << endl;
for(int i=0; i<H; i++){
cout << '#';
for(int l=0; l<W; l++){
cin >> vec.at(l);
}
for(int l=0; l<W; l++){
c... | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main{
| ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
5 | int H,W;
| ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
4 | int main{
| ^
a.cc:6:3: error:... |
s387605871 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string H,W;
cin >> H >>W;
vector<string> A() | a.cc: In function 'int main()':
a.cc:8:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
8 | vector<string> A()
| ^~
a.cc:8:21: error: expected initializer at end of input
8 | vector<string> A()
| ^
a.cc:8:21: error... |
s881178394 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<int> vec((H+2)*(W+2), '#');
for (int w = 0; w < W; i++) {
for (int h =0; h<H;h++){
cin >> vec.at(W+3+(W+2)*h);
}
}
for(int w=0;w<W+2;w++){
for(int h=0;h<H+2;h++){
cout << vec.at((W+2)*h+w)... | a.cc: In function 'int main()':
a.cc:10:26: error: 'i' was not declared in this scope
10 | for (int w = 0; w < W; i++) {
| ^
|
s507419342 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<int> vec((H+2)*(W+2), #);
for (int w = 0; w < W; i++) {
for (int h =0; h<H;h++){
cin >> vec.at(W+3+(W+2)*h);
}
}
for(int w=0;w<W+2;w++){
for(int h=0;h<H+2;h++){
cout << vec.at((W+2)*h+w);
... | a.cc:8:32: error: stray '#' in program
8 | vector<int> vec((H+2)*(W+2), #);
| ^
a.cc: In function 'int main()':
a.cc:8:33: error: expected primary-expression before ')' token
8 | vector<int> vec((H+2)*(W+2), #);
| ^
a.cc:10:26: error... |
s370578919 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) pu... | a.cc: In function 'int main()':
a.cc:28:10: error: 'n' was not declared in this scope
28 | fo(i,n){
| ^
a.cc:4:31: note: in definition of macro 'fo'
4 | #define fo(a,b) for(int a=0;a<b;a++)
| ^
|
s466021708 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> A(H, vector<int>(W));
for (int i = 0; i < H ; i++) {
for (int j = 0; j < W; j++) {
cin >> A.at(i).at(j);
}
}
// 入力処理
for (int i = 0; i < W + 2; i++) {
cout << "#";
}
cout<< endl... | a.cc: In function 'int main()':
a.cc:22:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
22 | cout >> A.at(i).at(j);
| ~~~~ ^~ ~~~~~~~~~~~~~
| ... |
s637003928 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
char a[101][101],b[102][102];
int main(){
int H,W;
cin >> H >> W;
for(int i=0;i<H;++i){
cin >> a[i];
}
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
b[i][j] = "#";
}
}
for(int i=0;i<H;++i){
for(int j=0;j<W;j++){
b[i+1][j+1] = a[i]... | a.cc: In function 'int main()':
a.cc:14:17: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
14 | b[i][j] = "#";
| ^~~
| |
| const char*
|
s005701308 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w,i,j;
cin >> h >> w;
int pic[h][w];
for(i=0;i<h;i++){
for(j=0;j<w;j++){
cin >> pic[i][j];
}
}
for(i=0;i<w+2;i++){
cout << '#';
}
cout << endl;
for(i=0;i<h;i++){
cout << '#... | a.cc:29:17: error: stray '#' in program
29 | cout << #;
| ^
a.cc: In function 'int main()':
a.cc:29:18: error: expected primary-expression before ';' token
29 | cout << #;
| ^
|
s661215345 | 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 << '#';
for(int i = 0;i < H;i++){
string nyuryoku;
cin >> nyuryoku;
vector<string> retu = {#};
retu.push_back(nyuryoku);
retu.push_back(#);
for(int i = 0;i < W + ... | a.cc:13:28: error: stray '#' in program
13 | vector<string> retu = {#};
| ^
a.cc:15:20: error: stray '#' in program
15 | retu.push_back(#);
| ^
a.cc: In function 'int main()':
a.cc:15:19: error: no matching function for call to 'std::vector<std::__... |
s869493522 | 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 << '#';
for(int i = 0;i < H;i++){
string nyuryoku;
cin >> nyuryoku;
vector<string> retu = {'#'};
retu.push_back(nyuryoku);
retu.push_back('#');
for(int i = 0;i < ... | a.cc: In function 'int main()':
a.cc:13:31: error: converting to 'std::vector<std::__cxx11::basic_string<char> >' from initializer list would use explicit constructor 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::b... |
s433380023 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w,i,j;
cin >> h >> w;
int pic[h][w];
for(i=0;i<h;i++){
for(j=0;j<w;j++){
cin >> pic[i][j];
}
}
for(i=0;i<w+2;i++){
cout << '#';
}
cout << endl;
for(i=0;i<h;i++){
cout << '#... | a.cc:29:17: error: stray '#' in program
29 | cout << #;
| ^
a.cc: In function 'int main()':
a.cc:23:18: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
23 | cout >> pic[i][j];
| ~~~~ ^~ ~~~~~... |
s332744388 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w,i,j;
cin >> h >> w;
int pic[h][w]
for(i=0;i<h;i++){
for(j=0;j<w;j++){
cin >> pic[i][j];
}
}
for(i=0;i<w+2;i++){
cout << '#';
}
cout << endl;
for(i=0;i<h;i++){
cout << '#'... | a.cc:29:17: error: stray '#' in program
29 | cout << #;
| ^
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'for'
9 | for(i=0;i<h;i++){
| ^~~
a.cc:9:20: error: expected ';' before ')' token
9 | for(i=0;i<h;i++){
| ... |
s258839138 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
int pic[h][w]
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin >> pic[i][j];
}
}
for(int i=0;i<w+2;i++){
cout << #;
}
cout << endl;
for(int i=0;i<h;i++){
... | a.cc:17:17: error: stray '#' in program
17 | cout << #;
| ^
a.cc:31:17: error: stray '#' in program
31 | cout << #;
| ^
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'for'
9 | for(int i=0;i<h;i++){
| ^~~
a... |
s813388572 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int H, W;
cin >> H >> W;
vector<string> vec_1(W+2, "#");
cout << vec_1 << endl;
vector<string> vec_2(W)
for(int i=0; i<H; i++)
{
cin >> vec_2;
cout >> "#" >> vec_2 >> "#" >>endl;
}
cout << vec_1 << endl;
}
| a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
11 | cout << vec_1 << endl;
| ~~~~ ^~ ~~~~~
| | |
| | std::vector<std::__cxx11::ba... |
s107062618 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int H, W;
cin >> H >> W;
vector<string> vec_1(W+2, '#');
cout << vec_1 << endl;
vector<string> vec_2(W)
for(int i=0; i<H; i++)
{
cin >> vec_2;
cout >> "#" >> vec_2 >> "#" >>endl;
}
cout << vec_1 << endl;
}
| a.cc: In function 'int main()':
a.cc:10:32: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int, char)'
10 | vector<string> vec_1(W+2, '#');
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/inclu... |
s378454814 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v(1000000000);
cout << v[0] << endl;
}
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 ... | a.cc:10:5: error: redefinition of 'int main()'
10 | int main () {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
|
s967401752 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin << H << W
for(int i = 0; i < W+3; i++){
cout << "#"
}
for(int i = 0; i < H+1; i++){
cin << tmp
cout << "#" << tmp << "#" <<endl;
}
for(int i = 0; i < W+3; i++){
cout << "#"
}
}
| a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << H << W
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:7: note: candidate: 'op... |
s820261238 | p03712 | C++ | #include <iostream>
#include <vector>
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define rep(i,n) FOR(i, 0, n)
using namespace std;
int main() {
int H, W;
vector<vector<char>> pixel(H,vector<char>(W);
cin >> H >> W;
rep(i, H) {
rep(j.W) {
cin >> pixel.at(i).at(j);
}
}
int k = 0;
while (k < W + ... | a.cc:15:24: error: macro "rep" requires 2 arguments, but only 1 given
15 | rep(j.W) {
| ^
a.cc:4:9: note: macro "rep" defined here
4 | #define rep(i,n) FOR(i, 0, n)
| ^~~
a.cc: In function 'int main()':
a.cc:10:53: error: expected ')' before ';' token
... |
s370781961 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> a(W + 2, '#');
cout << a << endl;
for (int j = 0; j < H; j++) {
vector<char> b(W + 2, '#');
for (int i = 1; i < W + 1; i++) {
cin >> b.at(i);
cout << b << endl;
}
}
cout << a << ... | a.cc: In function 'int main()':
a.cc:10:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
10 | cout << a << endl;
| ~~~~ ^~ ~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<... |
s298260062 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<char> a(W + 2, #);
cout << a << endl;
for (int j = 0; j < H; j++) {
vector<char> b(W + 2, #);
for (int i = 1; i < W + 1; i++) {
cin >> b.at(i);
cout << b << endl;
}
}
cout << a << endl... | a.cc:9:25: error: stray '#' in program
9 | vector<char> a(W + 2, #);
| ^
a.cc:13:31: error: stray '#' in program
13 | vector<char> b(W + 2, #);
| ^
a.cc: In function 'int main()':
a.cc:9:26: error: expected primary-expression before ')' ... |
s482546937 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
vector<char> G(w*h);
for(int i=0; i<h; i++){
cin >> G(i);
}
for(int i=0; i<w+2;i++){
cout << '#';
}
cout << endl;
for(int j=0;j<h;j++){
for(int i=0;i<w;i++){
cout << '#' << G(i) << '#' << endl;
}
... | a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<char>) (int&)'
9 | cin >> G(i);
| ~^~~
a.cc:17:25: error: no match for call to '(std::vector<char>) (int&)'
17 | cout << '#' << G(i) << '#' << endl;
| ~^~~
|
s504834355 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
vector<string> G(w);
for(int i=0; i<h; i++){
cin >> G(i);
}
for(int i=0; i<w+2;i++){
cout << '#';
}
cout << endl;
for(int i=0;i<h;i++){
cout << '#' << G(i) << '#' << endl;
}
for(int i=0; i<w+2;i++){
... | a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
9 | cin >> G(i);
| ~^~~
a.cc:16:21: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
16 | cout << '#' << G(i) << '#' << en... |
s436119623 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
vector(string) G(w);
for(int i=0; i<h; i++){
cin >> G(i);
}
for(int i=0; i<w+2;i++){
cout << '#';
}
cout << endl;
for(i=0;i<h;i++){
cout << '#' << G(i) << '#' << endl;
}
for(int i=0; i<w+2;i++){
co... | a.cc: In function 'int main()':
a.cc:7:9: error: missing template arguments before '(' token
7 | vector(string) G(w);
| ^
a.cc:7:16: error: expected primary-expression before ')' token
7 | vector(string) G(w);
| ^
a.cc:9:12: error: 'G' was not declared in this scope
9 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.