submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s712728781 | p03712 | C | #include<stdio.h>
int main(){
int a, b, i, j;#include<stdio.h>
int main(){
int a, b, i, j;
char s[100][101];
scanf("%d %d", &a, &b);
for(i = 0; i < a; ++i){
scanf("%s", s[i]);
}
for(i = 0; i < b + 2; ++i) printf("#");
puts("");
for(i = 0; i < a; ++i) printf("#%s#\n", s[i]);
for(i = 0; i < b + 2;... | main.c: In function 'main':
main.c:3:18: error: stray '#' in program
3 | int a, b, i, j;#include<stdio.h>
| ^
main.c:3:19: error: 'include' undeclared (first use in this function)
3 | int a, b, i, j;#include<stdio.h>
| ^~~~~~~
main.c:3:19: note: each undeclared... |
s569603390 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int tate,yoko;
cin >> tate >> yoko;
vector<string> vec(tate);
for ( int i = 0; i < tate; i++ ) {
cin >> vec(i);
}
for ( int i = 0; i > yoko + 2; i++ ) {
cout << "#";
}
cout << endl;
for ( int i = 0; i > vec.size(); i++ )... | a.cc: In function 'int main()':
a.cc:10:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
10 | cin >> vec(i);
| ~~~^~~
|
s215075281 | 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<H;i++){
for(int j=0;<W;j++){
cin>>a[i+1][j+1];
}
}
for(int i=0;i<H+2;i++){
for(int j=0;j<W+2;j++){
cout<<a[i][j];
}
cout<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:20: error: array must be initialized with a brace-enclosed initializer
7 | char a[H+2][W+2]='#';
| ^~~
a.cc:10:17: error: expected primary-expression before '<' token
10 | for(int j=0;<W;j++){
| ^
|
s367146699 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,W;
string S;
cin >> N >>W;
vector<string> vec (W+2,"#");
for(int i=0;i<W+2;i++)
cout << vec.at(i);
cout <<endl;
for(int i=0;i<N;i++){
cin >>S;
cout << '#'+S+'#' <<endl;
}
cout <<vec <<endl;
} | a.cc: In function 'int main()':
a.cc:21:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
21 | cout <<vec <<endl;
| ~~~~ ^~~~~
| | |
| | std::vector<std::__cxx11::basic_strin... |
s242567594 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,W;
string S;
cin >> N >>W;
vector<string> vec (W+2,"#");
cout << vec <<endl;
for(int i=0;i<N;i++){
cin >>S;
cout << '#'+S+'#' <<endl;
}
cout <<vec <<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<std::__cxx11::basic_string<char> >')
12 | cout << vec <<endl;
| ~~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_s... |
s206339199 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,W;
string S;
cin >> N >>W;
vector<string> vec (W+2,#);
cout << vec <<endl;
for(int i=0;i<N;i++){
cin >>S;
cout << '#'+S+'#' <<endl;
}
cout <<vec <<endl;
} | a.cc:10:27: error: stray '#' in program
10 | vector<string> vec (W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:10:28: error: expected primary-expression before ')' token
10 | vector<string> vec (W+2,#);
| ^
a.cc:12:8: error: no match for 'ope... |
s665226890 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
int a;
for(int i = 0;i < h;i++) {
cout << '#';
for(int j = 0;j < w;j++) {
cin >> a;
cout << a;
}
cout << '#' << endl;
}
for(int i = 0;i < w + 2) {
cout << '#';
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:15:26: error: expected ';' before ')' token
15 | for(int i = 0;i < w + 2) {
| ^
| ;
|
s548183862 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<int> text(H);
cin >> text;
cout << '#' * W << endl;
for (int i = 0; i<W; i++) {
cout << '#' << text.at(i) << '#' << text
}
cout << '#' * W << endl;
}
| a.cc: In function 'int main()':
a.cc:8:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
8 | cin >> text;
| ~~~ ^~ ~~~~
| | |
| | std::vector<int>
| std::istream {aka std::basic_istream<char>}
In... |
s041615195 | p03712 | C++ | char a [100][101] , b [102][102];
int main () {
int H , W ; cin >> H >> W ;
for ( int i = 0; i < H ; i ++)
scanf ("% s " , a [ i ]);
for ( int i = 0; i < H + 2; i ++)
for ( int j = 0; j < W + 2; j ++)
b [ i ][ j ] = ’# ’;
for ( int i = 0; i < H ; i ++)
for ( int j = 0; j < W ; j ++)
b [ ... | a.cc:8:22: error: extended character ’ is not valid in an identifier
8 | b [ i ][ j ] = ’# ’;
| ^
a.cc:8:23: error: stray '#' in program
8 | b [ i ][ j ] = ’# ’;
| ^
a.cc:8:25: error: extended character ’ is not valid in an identifier
8 | ... |
s058254096 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i += 1) {
for(int j = 0; j < W; j += 1) {
cin>>A.at(i).at(j);
}
}
vector<vector<char>>B(H+2,vector<char>(W+2));
for(int i = 0; i < H+2; i += 1) {
... | a.cc: In function 'int main()':
a.cc:16:35: error: request for member 'push_back' in '(& B.std::vector<std::vector<char> >::at(((std::vector<std::vector<char> >::size_type)i)))->std::vector<char>::at(((std::vector<char>::size_type)j))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::... |
s588625008 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i += 1) {
for(int j = 0; j < W; j += 1) {
cin>>A.at(i).at(j);
}
}
vector<vector<char>>B(H+2,vector<char>(W+2));
for(int i = 0; i < H+2; i += 1) {
... | a.cc: In function 'int main()':
a.cc:16:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
16 | B.at(i).at(j)="#";
| ^~~
| |
| const cha... |
s152576917 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i += 1) {
for(int j = 0; j < W; j += 1) {
cin>>A.at(i).at(j);
}
}
vector<vector<char>>B(H+2,vector<char>(W+2));
for(int i = 0; i < H+2; i += 1) {
... | a.cc: In function 'int main()':
a.cc:16:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
16 | B.at(i).at(j)="#";
| ^~~
| |
| const cha... |
s576285211 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >>W;
vector<vector<char>> vec(H, vector<char>(W));
for (int i=0; i<H; ++i){
for (int j=0; j<W; ++j){
cin >> vec.at(i).at(j);
}
}
for (int i=0; i<w+2; ++i) {
cout << "#" << endl;
}
for (int i=0; i<H; ++i){
... | a.cc: In function 'int main()':
a.cc:13:19: error: 'w' was not declared in this scope
13 | for (int i=0; i<w+2; ++i) {
| ^
a.cc:27:19: error: 'w' was not declared in this scope
27 | for (int i=0; i<w+2; ++i) {
| ^
|
s667218928 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>" ">>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
}
cout<<(W+2)*"#"<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<e... | a.cc: In function 'int main()':
a.cc:5:9: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [2]')
5 | cin>>H>>" ">>W;
| ~~~~~~^~~~~
| | |
| | const char [2]
| std::basic_ist... |
s211495719 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
}
cout<<(W+2)*"#"<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<endl;
... | a.cc: In function 'int main()':
a.cc:12:14: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator*'
12 | cout<<(W+2)*"#"<<endl;
| ~~~~~^~~~
| | |
| int const char [2]
a.cc:14:14: error: no match for 'operator<<' (operand types are 'std::basi... |
s467932390 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
}
cout<<(W+2)*"#"<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<endl;
... | a.cc: In function 'int main()':
a.cc:12:14: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator*'
12 | cout<<(W+2)*"#"<<endl;
| ~~~~~^~~~
| | |
| int const char [2]
a.cc:14:14: error: no match for 'operator<<' (operand types are 'std::basi... |
s219160671 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
}
cout<<(W+2)*"#"<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<endl;
... | a.cc: In function 'int main()':
a.cc:12:14: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator*'
12 | cout<<(W+2)*"#"<<endl;
| ~~~~~^~~~
| | |
| int const char [2]
a.cc:14:14: error: no match for 'operator<<' (operand types are 'std::basi... |
s111800748 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
}
cout<<"#"*(W+2)<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<endl;
... | a.cc: In function 'int main()':
a.cc:12:12: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
12 | cout<<"#"*(W+2)<<endl;
| ~~~^~~~~~
| | |
| | int
| const char [2]
a.cc:14:14: error: no match for 'operator<<' (operand ... |
s771325648 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; i+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
cout<<"#"*(W+2)<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<endl;
}
... | a.cc: In function 'int main()':
a.cc:7:31: error: '\U0000ff5b' was not declared in this scope
7 | for(int i = 0; i < H; i+=1) {
| ^~
a.cc:8:20: error: 'j' was not declared in this scope
8 | for(int j = 0; j < W; j+=1) {
| ^
a.cc:11:12: error: in... |
s244467077 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main( ){
int H,W;
cin>>H>>W;
vector<vector<char>>A(H,vector<char>(W));
for(int i = 0; i < H; H+=1) {
for(int j = 0; j < W; j+=1) {
cin>>A.at(i).at(j);
}
cout<<"#"*(W+2)<<endl;
for(int i = 0; i < H; i+=1) {
cout<<"#"<<A.at(i)<<"#"<<endl;
}
... | a.cc: In function 'int main()':
a.cc:7:31: error: '\U0000ff5b' was not declared in this scope
7 | for(int i = 0; i < H; H+=1) {
| ^~
a.cc:8:20: error: 'j' was not declared in this scope
8 | for(int j = 0; j < W; j+=1) {
| ^
a.cc:11:12: error: in... |
s333267569 | p03712 | C++ | #include <bits/stdc++.h>
#define mod 1000000007
#define rep(i, n) for(int i=0; i<n; ++i)
using namespace std;
typedef long long ll;
const long long INF = 1LL << 60;
int main(void){
int H, W;
char a[110][110];
cin >> H >> W;
rep(i, H)
rep(j, W)
cin >> H[i][j];
rep(i, H+2){
rep(j, W+2){
if(j =... | a.cc: In function 'int main()':
a.cc:20:33: error: invalid types 'int[int]' for array subscript
20 | cin >> H[i][j];
| ^
|
s831420038 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
int N = H * W;
vector <char> a(N);
for (int i = 0; i < H; i++){
for (int j = i; i*W <= j < (i + 1) * W; j++){
cin >> a.at(j);
}
}
for (int i = 0; i < W + 2; i++){
cout >> '#';
}
cout >> endl... | a.cc: In function 'int main()':
a.cc:18:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char')
18 | cout >> '#';
| ~~~~ ^~ ~~~
| | |
| | char
| std::ostream {aka std::basic_ostream<char>}
a.cc:18:10: ... |
s165394738 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector> Ah(H)
for(int i = 0; i < H; i++)
vector<char> Aw(W); // vector list of test scores
// add input to list
for (int j = 0; j < W; j++) {
cin >> A.at(j);
Ah.at(i) = Aw
}
cout << Ah ... | a.cc: In function 'int main()':
a.cc:7:16: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
7 | vector<vector> Ah(H)
| ^
a.cc:7:16: note: expected a type, got 'vector'
a.cc:7:16: error: template argument 2 is inval... |
s431293945 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H , W;
string S;
vector<char> A(W + 2, '#');
for (int i = 0; i < W + 2) {
cout << A.at(i);
}
cout << endl;
for (int i = 0; i < H + 2) {
vector<char> A(W + 2, '#');
cin >> S;
for (int j = 0; j < W + 2) {
if (j == 0 || j ... | a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before ')' token
8 | for (int i = 0; i < W + 2) {
| ^
| ;
a.cc:12:28: error: expected ';' before ')' token
12 | for (int i = 0; i < H + 2) {
| ^
... |
s945555643 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<char> vec(h+2,vector<char>(w+2));
for(int i = 1; i < h+1;i++){
for(int j = 1; j < w+1;j++){
cin >>vec.at(i).at(j);
}
}
for(int i = 0; i < w + 2;i++){
vec.at(0).at(i) = '#';
vec.at(h+1).at(i) = '#';
}
fo... | a.cc: In function 'int main()':
a.cc:7:41: error: no matching function for call to 'std::vector<char>::vector(int, std::vector<char>)'
7 | vector<char> vec(h+2,vector<char>(w+2));
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/incl... |
s546421986 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
for(int i = 0; i < H; i++) {
vector<int> vec(W);
cin >> vec.at(0);
}
cout << W * '#' <<endl;
for(int j = 0; j < H; j++) {
cout << "#";
for(int i = 0; i < W; i++) {
cout << vec.at(i);
}
cou... | a.cc: In function 'int main()':
a.cc:18:17: error: 'vec' was not declared in this scope
18 | cout << vec.at(i);
| ^~~
a.cc:21:4: error: expected '}' at end of input
21 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s955317172 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int W,H; cin >> W >> H;
for(int i=0;i<H;i++){
string Si;
cin >> Si;
}
for(int i=0;i<W+2;i++){
cout << "##" << endl;
}
for(int i=0;i<H;i++){
cout << "##" << Si << "##" << endl;
}
for(int i=0;i<W+2;i++){
cout << "##" << endl... | a.cc: In function 'int main()':
a.cc:15:21: error: 'Si' was not declared in this scope; did you mean 'i'?
15 | cout << "##" << Si << "##" << endl;
| ^~
| i
|
s276176616 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int W,H; cin >> W >> H;
for(int i=0;i<H;i++){
string Si;
cin >> Si;
}
for(int i=0;i<W+2;i++){
cout << "##" << endl;
}
for(int i=0;i<H;i++){
cout << "##" << Si << endl;
}
for(int i=0;i<W+2;i++){
cout << "##" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:15:21: error: 'Si' was not declared in this scope; did you mean 'i'?
15 | cout << "##" << Si << endl;
| ^~
| i
|
s786556463 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int s,w;
cin >>s>>w;
vector<string> vec(s);
for (int i=0;i<s;i++){
cin >>vec.at(i);
vec.at(i) = "#" + vec.at(i) +"#";
}
for (int i=;i<w+2;i++){
cout <<"#";
}
cout << endl;
for (int i =0;i<s;i++){
cout <<vec.at(i)<<endl;
}
f... | a.cc: In function 'int main()':
a.cc:12:14: error: expected primary-expression before ';' token
12 | for (int i=;i<w+2;i++){
| ^
a.cc:19:14: error: expected primary-expression before ';' token
19 | for (int i=;i<w+2;i++){
| ^
|
s310647671 | p03712 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
string l(w+2, '#');
cout << l << endl;
for(int i=0; i<h; i++){
sting tmp;
cin >> tmp;
cout << '#' << tmp << "#\n";
}
cout << l << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'sting' was not declared in this scope
11 | sting tmp;
| ^~~~~
a.cc:12:24: error: 'tmp' was not declared in this scope; did you mean 'tm'?
12 | cin >> tmp;
| ^~~
| ... |
s685200616 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int W,H; cin >> W >> H;
string moj;
for(int i=0;i<H;i++){
cin >> moj.at(i);
}
for(int i=0;i<W+2;i++){
cout << "#" << endl;
}
for(int i=0;i<H;i++){
cout << "#" << moj.at(i) << "#\n" << endl;
}
for(int i=0;i<W+2;i++){
cout << ... | a.cc: In function 'int main()':
a.cc:18:20: error: 'eendl' was not declared in this scope
18 | cout << "#" << eendl;
| ^~~~~
|
s210863409 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<string> s;
for(int i=0;i<H;i++)cin >> s;
for(int i=0;i<W+2;i++)cout << "#";
cout << endl;
for(int i=0;i<H;i++)cout << "#" << s.at(i) << "#";
for(int i=0;i<W+2;i++)cout << "#";
cout << endl;
} | a.cc: In function 'int main()':
a.cc:8:27: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
8 | for(int i=0;i<H;i++)cin >> s;
| ~~~ ^~ ~
| | |
... |
s750328837 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
vector<char> str(H*W);
for(int i=0;i<H*W;i++)cin>>str(i);
for(int i=0;i<W+2;i++)cout<<"#";
cout<<"_n";
for(int i=0;i<H;i++){
cout<<"#";
for(int j=0;j<W;j++)cout<<str(i*W+j);
cout<<"#\n";
}
for(int i=0;i<W+2;i+... | a.cc: In function 'int main()':
a.cc:8:33: error: no match for call to '(std::vector<char>) (int&)'
8 | for(int i=0;i<H*W;i++)cin>>str(i);
| ~~~^~~
a.cc:13:34: error: no match for call to '(std::vector<char>) (int)'
13 | for(int j=0;j<W;j++)cout<<str(i*W+j);
| ... |
s310564028 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
vector<char> str(H*W);
for(int i=0;i<H*W;i++)cin>>str(i);
for(int i=0;i<W+2;i++)cout<<"#";
cout<<"_n";
for(int i=0;i<H;i++){
cout<<"#";
for(int j=0;j<W;j++)cout<<str(i*H+j);
cout<<"#\n";
}
for(int i=0;i<W+2;i+... | a.cc: In function 'int main()':
a.cc:8:33: error: no match for call to '(std::vector<char>) (int&)'
8 | for(int i=0;i<H*W;i++)cin>>str(i);
| ~~~^~~
a.cc:13:34: error: no match for call to '(std::vector<char>) (int)'
13 | for(int j=0;j<W;j++)cout<<str(i*H+j);
| ... |
s742804690 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
vector<string> str(H*W);
for(int i=0;i<HW;i++)cin>>str(i);
for(int i=0;i<W+2;i++)cout<<"#";
cout<<"_n";
for(int i=0;i<H;i++){
cout<<"#";
for(int j=0;j<W;j++)cout<<str(i*H+j);
cout<<"#\n";
}
for(int i=0;i<W+2;i... | a.cc: In function 'int main()':
a.cc:8:17: error: 'HW' was not declared in this scope; did you mean 'W'?
8 | for(int i=0;i<HW;i++)cin>>str(i);
| ^~
| W
a.cc:8:32: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
8 | for(int i=0... |
s840593566 | 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 (i = 0; i < H; i++) {
cin >> str;
cout << "#" << str << "##" << endl;
}
for (i = 0; i < W + 2; i++) {
cout << "#";
}
cout << endl;
}... | a.cc: In function 'int main()':
a.cc:13:12: error: 'str' was not declared in this scope; did you mean 'std'?
13 | cin >> str;
| ^~~
| std
|
s707713807 | 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;
for (i = 0; i < H; i++) {
cin >> str;
cout << "#" << str << "##" << endl;
}
for (i = 0; i < W + 2; i++) {
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
8 | for (i = 0; i < W + 2; i++) {
| ^
a.cc:12:8: error: 'i' was not declared in this scope
12 | for (i = 0; i < H; i++) {
| ^
a.cc:13:12: error: 'str' was not declared in this scope; did you mean 'st... |
s932969103 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W, i, j;
char s;
cin >> H >> W;
int k=0;
while(k<W+2){
cout << "#";
k++;
}
cout << endl;
for (i = 0; i < H; i++) {
cout << "#";
for (j = 0; j < W, j++) {
cin >> s;
cout << s;
}
cout << "#" ... | a.cc: In function 'int main()':
a.cc:20:27: error: expected ';' before ')' token
20 | for (j = 0; j < W, j++) {
| ^
| ;
|
s582291366 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W, i, j;
char s;
cin >> H >> w;
int k=0;
while(int k<W+2){
cout << "#";
k++;
}
cout << endl;
for (i = 0; i < H; i++) {
cout << "#";
for (j = 0; j < W, j++) {
cin >> s;
cout << s;
}
cout << ... | a.cc: In function 'int main()':
a.cc:7:15: error: 'w' was not declared in this scope
7 | cin >> H >> w;
| ^
a.cc:11:14: error: expected initializer before '<' token
11 | while(int k<W+2){
| ^
a.cc:11:14: error: expected ')' before '<' token
11 | while(int k<W+2){
... |
s518018543 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<string> vec(H);
for(int i=0;i<H;i++){
cin >> vec.at(i);
}
for(int i=0;i<W+2;i++){
cout << "#";
}
cout << endl;
for(int i=0;i<H;i++){
cout << '#' << vec.at(i) << '#' << endl;
}
for(int i=0;i<W+2;i... | a.cc: In function 'int main()':
a.cc:21:16: error: expected '}' at end of input
21 | cout << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s922400598 | p03712 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
int h,w;
cin>>h>>w;
string s;
vector<string>res;
for(int i=0;i<h;i++){
cin>>s;
res.push_back(s);
}
s.clear();
for(int i=0;i<w+2;i++)
{
s+='#';
}
cout<<s<<endl;
for(auto &x :res... | a.cc:41:5: error: redefinition of 'int main()'
41 | int main()
| ^~~~
a.cc:7:5: note: 'int main()' previously defined here
7 | int main()
| ^~~~
|
s126801444 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H>> W;
// N要素の配列
vector<int> 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++) {
cin >> A.at(j);
cout << A.at(... | a.cc:13:13: error: stray '#' in program
13 | cout << #;
| ^
a.cc:17:13: error: stray '#' in program
17 | cout << #;
| ^
a.cc:22:13: error: stray '#' in program
22 | cout << #<<endl;
| ^
a.cc:25:13: error: stray '#' in program
25 | cout <<... |
s875594573 | 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(i = 0 ; i < H ; i++){
vector<string> vec(W+1,"#");
for(int i = 1 ; i < W+1 ; i++){
cin >> vec.at(i);
cout << vec.at... | a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
13 | for(i = 0 ; i < H ; i++){
| ^
|
s348385212 | 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(i = 0 ; i < H ; i++){
vector<string> vec(W+1,#);
for(i = 1 ; i < W+1 ; i++){
cin >> vec.at(i);
cout << vec.at(i);
... | a.cc:15:28: error: stray '#' in program
15 | vector<string> vec(W+1,#);
| ^
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
13 | for(i = 0 ; i < H ; i++){
| ^
a.cc:15:29: error: expected primary-expression before ')' token
... |
s403908140 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
int h,w;
cin>>h>>w;
cha... | a.cc: In function 'int main()':
a.cc:19:14: error: expected ',' before '+' token
19 | cin>>[i+1][j+1];
| ^
| ,
a.cc:19:14: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:19:17: error: expected '{' before '[' token
19 | cin>>[i+1][j+1];
... |
s449554717 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
char a[h][w];
rep(i,h){
... | a.cc: In function 'int main()':
a.cc:14:10: error: 'h' was not declared in this scope
14 | char a[h][w];
| ^
a.cc:14:13: error: 'w' was not declared in this scope
14 | char a[h][w];
| ^
a.cc:17:14: error: expected ',' before '+' token
17 | cin>>[i+1][j+1];
| ... |
s961604466 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> pic(H + 2);
pic.at(0) = "#" * (W + 2);
pic.at(H +1) = "#" * (W + 2);
for (int i = 1; i < H + 1; i++){
string S;
cin >> S;
pic.at(i) = "#" + S + "#";
}
for (int i = 0, i < H + 2, i++){
cout... | a.cc: In function 'int main()':
a.cc:8:19: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
8 | pic.at(0) = "#" * (W + 2);
| ~~~ ^ ~~~~~~~
| | |
| | int
| const char [2]
a.cc:9:22: error:... |
s177801436 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<char> F(W+2,'#');
vector<char> T(W);
for(int i=0;i<W+2;i++){
cout<<F.at(i);
}
cout<<endl;
for(int i=0;i<H;i++){
cout<<'#';
for(int u=0;u<W;u++){
cin>>T.at(i);
cout<<T.at(i);
}
cout<<... | a.cc: In function 'int main()':
a.cc:21:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
21 | cout<<F<<endl;
| ~~~~^~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<char>}
In ... |
s438178207 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<char> F(W+2,'#');
vector<char> T(W);
cout<<F<<endl;
for(int i=0;i<H;i++){
for(int u=0;u<W;u++){
cin>>T.at(i);
}
cout<<'#'+T+'#'<<endl;
}
cout<<F<<endl;
}
| 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<char>')
9 | cout<<F<<endl;
| ~~~~^~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<char>}
In f... |
s747277186 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<char> F(W+2,#);
vector<char> T(W);
cout<<F<<endl;
for(int i=0;i<H;i++){
for(int u=0;u<W;u++){
cin>>T.at(i);
}
cout<<'#'+T+'#'<<endl;
}
cout<<F<<endl;
}
| a.cc:7:22: error: stray '#' in program
7 | vector<char> F(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before ')' token
7 | vector<char> F(W+2,#);
| ^
a.cc:9:7: error: no match for 'operator<<' (operand types... |
s471726809 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>N>>W;
vector<char> F(w+2,#);
vector<char> T(W);
cout<<F<<endl;
for(int i=0;i<H;i++){
for(int u=0;u<W;u++){
cin>>T.at(i);
}
cout<<'#'+T+'#'<<endl;
}
cout<<F<<endl;
}
| a.cc:7:22: error: stray '#' in program
7 | vector<char> F(w+2,#);
| ^
a.cc: In function 'int main()':
a.cc:6:9: error: 'N' was not declared in this scope
6 | cin >>N>>W;
| ^
a.cc:7:18: error: 'w' was not declared in this scope
7 | vector<char> F(w+2,#);
|... |
s443635531 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
string sub;
cin >> h >> w;
vector<string> a(h+2,#);
for(int i = 1; i < w + 2; i++){
a.at(0) += "#";
}
for(int i = 1; i < h + 1; i++){
cin >> sub;
a.at(i) += sub + "#";
}
a.at(h + 1) = a.at(0);
for(int i = 0; i < h + 2; ... | a.cc:8:24: error: stray '#' in program
8 | vector<string> a(h+2,#);
| ^
a.cc: In function 'int main()':
a.cc:8:25: error: expected primary-expression before ')' token
8 | vector<string> a(h+2,#);
| ^
|
s730482815 | p03712 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h = 0, w = 0;
cin >> h >> w;
vector<char> sharp(w, '#');
cout << sharp << endl;
string buf = "";
for (int i=0; i<h; i++) {
cout << "#";
cin >> buf;
cout << buf;
cout << "#" << endl;
}
cout << ... | a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
11 | cout << sharp << endl;
| ~~~~ ^~ ~~~~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_... |
s255403153 | p03712 | C | #include <stdio.h>
int main(){
int h,w;
char a[110][110];
scanf("%d%d",&h,&w);
for(int i=0;i<h;i++)scanf("%s",&a[i]);
for(int i=0;i<w+2;i++)printf("#");
printf("\n");
for(int i=0;i<h;i++)printf("#%s#\n",s[i]);
for(int i=0;i<w+2;i++)printf("#");
return 0;
} | main.c: In function 'main':
main.c:9:39: error: 's' undeclared (first use in this function)
9 | for(int i=0;i<h;i++)printf("#%s#\n",s[i]);
| ^
main.c:9:39: note: each undeclared identifier is reported only once for each function it appears in
|
s917987464 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;string p;cin>>h>>w;
vector<string> s(h);
for(int i=0;i<h;i++)cin>>s.at(i);
for(int j=0;j<W+2;j++)p.at(j)='#';
cout<<p<<endl;
for(int k=0;k<h;k++)cout<<"#"<<s.at(k)<<"#"<<endl;
cout<<p<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: 'W' was not declared in this scope
7 | for(int j=0;j<W+2;j++)p.at(j)='#';
| ^
|
s232777396 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;string p;cin>>h>>w;
vector(string) s(h);
for(int i=0;i<h;i++)cin>>s.at(i);
for(int j=0;j<W+2;j++)p.at(j)='#';
cout<<p<<endl;
for(int k=0;k<h;k++)cout<<"#"<<s.at(k)<<"#"<<endl;
cout<<p<<endl;
} | a.cc: In function 'int main()':
a.cc:5:9: error: missing template arguments before '(' token
5 | vector(string) s(h);
| ^
a.cc:5:16: error: expected primary-expression before ')' token
5 | vector(string) s(h);
| ^
a.cc:6:28: error: 's' was not declared in this scope
6 ... |
s782234784 | p03712 | C++ | #include<iostream>
using namespace std;
int main(){
int h,w
cin << h << w <<
vector<int> vec(h);
for(int i=0;i<h,i++){
cin << vec.at(i)
}
/* 真ん中に入れるにはどうするか? 画像があって、その周囲を#で囲む様子
つまり、列はw+2で、行もh+2となる
headerとfooterを意識して要素を分け、文字列の前後を#で囲む
for{int i=0;i<w+2;i++){
cout << "#"
}
cout << endl;
真... | a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
6 | cin << h << w <<
| ^~~
a.cc:8:22: error: expected ';' before ')' token
8 | for(int i=0;i<h,i++){
| ^
| ;
a.cc:9:16: error: 'vec' was not declared in this scope... |
s472073129 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
string a;
for (int i = 0; i < w; i++) {
cout << *;
}
cout << endl;
for (int i = 0; i < h; i++) {
cin >> a;
cout << * << a << * << endl;
}
for (int i = 0; i < w; i++) {
cout << *;
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:10:14: error: expected primary-expression before ';' token
10 | cout << *;
| ^
a.cc:16:15: error: expected primary-expression before '<<' token
16 | cout << * << a << * << endl;
| ^~
a.cc:16:25: error: expected primary-expression ... |
s818010858 | p03712 | Java |
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
StringBuilder sb = new StringBuilder("");
int h = s.nextInt();
int w = s.nextInt();
int i = 0;
String a = "";
String b = "";
String ary[] = new String[h];
for (i = 0; i < h; i++) {
ary[i] = "#" + s.... | Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s217797135 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin >> H >> W;
string a;
for (int i = 0; i < W + 1; i++){
cout << "#" <<;
}
cout << "#" << endl;
for (int i = 0; i < H; i++){
cout << "#" <<;
for (int i = 0; i < W; i++){
cin >> a;
cout << a <<;
}
... | a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before ';' token
10 | cout << "#" <<;
| ^
a.cc:16:19: error: expected primary-expression before ';' token
16 | cout << "#" <<;
| ^
a.cc:19:19: error: expected primary-expression b... |
s418465017 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H, W;
cin >> H >> W;
string a;
for (int i = 0; i < W + 1; i++){
cout << "#" <<;
}
cout << "#" << endl;
for (int i = 0; i < H; i++){
cou << "#" <<;
for (int i = 0; i < W; i++){
cin >> a;
cout << a <<;
}
... | a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before ';' token
10 | cout << "#" <<;
| ^
a.cc:16:5: error: 'cou' was not declared in this scope; did you mean 'cos'?
16 | cou << "#" <<;
| ^~~
| cos
a.cc:16:18: error: expected prima... |
s804108729 | 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> a(100)(100);
rep(i,h) {
rep(j,w) {
cin >> a,at(i)(j);
a.push_back("#");
}
}
rep(i,a.h+1) {
rep(j,a.w+1) {
cout << ... | a.cc: In function 'int main()':
a.cc:12:24: error: expected ',' or ';' before '(' token
12 | vector<string> a(100)(100);
| ^
a.cc:16:10: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char>... |
s902795364 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int h,w; cin >> h >>w;
for (int a=0;a<w+2;a++) {
cout << "#";
}
cout << endl;
for (int i=0;i<h;i++) {
string s; cin >> s;
cout << "#" << s << "#" << endl;
}
for (int a=0;a<w+2;b++) {
cout << "#"
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:13:22: error: 'b' was not declared in this scope
13 | for (int a=0;a<w+2;b++) {
| ^
a.cc:14:16: error: expected ';' before '}' token
14 | cout << "#"
| ^
| ;
15 | }
| ~
|
s457489195 | p03712 | C++ | #include <iostream>
using namespace std;
int main() {
int h,w; cin >> h >>w;
for (int a=0;a<w+2;i++) {
cout << "#";
}
cout << endl;
for (int i=0;i<h;i++) {
string s; cin >> s;
cout << "#" << s << "#" << endl;
}
for (int a=0;a<w+2;i++) {
cout << "#"
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:5:22: error: 'i' was not declared in this scope
5 | for (int a=0;a<w+2;i++) {
| ^
a.cc:13:22: error: 'i' was not declared in this scope
13 | for (int a=0;a<w+2;i++) {
| ^
a.cc:14:16: error: expected ';' before '}' toke... |
s050305473 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w; cin>>h >>w;
vector<vector<char>> s(h+2,vector<char>(w+2));
for(int i=0;i<h+2;i++){
for(int j=0;j<w+2;j++){
s[i][j]='#';
}
}
for(int i=1;i<h+1;i++){
for(int j=1;j<w+1;j++){
int a;cin>>a;
s[i][j]=a;
}
}
for(... | a.cc: In function 'int main()':
a.cc:19:9: error: 'j' was not declared in this scope
19 | for(j=0;j<w+2;j++){
| ^
|
s353339550 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w; cin>>h >>w;
vector<vector<char>> s(h+2,vector<char>(w+2,'#'));
for(int i=1;i<h+1;i++){
for(int j=1;j<w+1;j++){
cin>>s[i][j];
}
}
for(int i=1;i<h+1;i++){
for(int j=1;j<w+1;j++){
cout<<s[i][j]
}
endl;
} | a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '}' token
14 | cout<<s[i][j]
| ^
| ;
15 | }
| ~
a.cc:16:9: error: statement cannot resolve address of overloaded function
16 | endl;
| ^
... |
s572560823 | p03712 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w; cin>>h >>w;
vector<vector<char>> a(h+2,vector<char>(w+2,'#'));
for(int i=1;i<h+1;i++){
for(int j=1;j<w+1;j++){
cin>>s[i][j];
}
}
for(int i=1;i<h+1;i++){
for(int j=1;j<w+1;j++){
cout<<s[i][j]
}
endl;
} | a.cc: In function 'int main()':
a.cc:9:12: error: 's' was not declared in this scope
9 | cin>>s[i][j];
| ^
a.cc:14:13: error: 's' was not declared in this scope
14 | cout<<s[i][j]
| ^
a.cc:16:9: error: statement cannot resolve address of overloaded function
16 | ... |
s641371226 | p03712 | C++ | import Foundation
extension String {
var argi: [Int] { return self.characters.split(" ").map { Int(String($0))! } }
}
let arr = readLine()!.argi
let h: Int = arr[0]
var w: Int = arr[1]
w += 2
var res: String = ""
for i in 0..<w {
res += "#"
}
res += "\n"
for i in 0..<h {
let input = readLine()
re... | a.cc:16:10: error: too many decimal points in number
16 | for i in 0..<w {
| ^~~
a.cc:21:10: error: too many decimal points in number
21 | for i in 0..<h {
| ^~~
a.cc:26:10: error: too many decimal points in number
26 | for i in 0..<w {
| ^~~
a.cc:1:1: error: 'impor... |
s299948896 | p03712 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,i;
vector<char> c[10000];
cin>>a>>b;
for(i=0;i<a*b;i++) cin>>c[i];
for(i=0;i<b+2;i++) cout<<"#";
cout<<endl;
for(i=0;i<a;i++){
cout<<"#";
for(int j=i*b;j<i*b+b;j++){
cout<<c[j];
}
cout<<"#"<<endl;
}
return 0;
}
... | a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
6 | vector<char> c[10000];
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | us... |
s782440263 | p03712 | C++ | import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
solve();
}
public static void solve() {
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.PrintWriter;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.ArrayList;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodu... |
s876699973 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin>>a>>d;
vector<string> mozi(b);
for(int i=0;i<b+2;i++)
{
cout<<"#";
}
cout<<endl;
for(int i=0;i<a;i++)
{
cin>>mozi[i];
cout<<"#"<<mozi[i]<<"#"<<endl;
}
for(int i=0;i<b+2;i++)
{
cout<<"#";
}
co... | a.cc: In function 'int main()':
a.cc:7:11: error: 'd' was not declared in this scope
7 | cin>>a>>d;
| ^
a.cc:26:13: error: expected ';' before '}' token
26 | cout<<endl
| ^
| ;
27 | }
| ~
|
s264100102 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> M;
vector<string> X(H+1);
for(int i=1; i<=H; i++) {
cin >> X[i];
}
for(int i=0; i<H+2; i++) {
if(i==0 || i==H+1) {
for(int j=0; j<M+2; j++) {
cout << "#";
}
cout << endl;
}
else {
... | a.cc: In function 'int main()':
a.cc:6:15: error: 'M' was not declared in this scope
6 | cin >> H >> M;
| ^
|
s074055796 | p03712 | C++ | #include<string>
using namespace std;
int main(void){
int H, W;
cin >> H >> W;
for(int i = 0; i < W + 2; i++) cout << "#" << "\n";
for(int i = 0; i < H; i++){
string a;
cin >> a;
cout << "#" << a << "#" << "\n";
}
for(int i = 0; i < W + 2; i++) cout << "#" << "\n";
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >> H >> W;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<string>
+++ |+#include <iostream>
2 |
a.cc:8:34: err... |
s472231629 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0; i<n;i++)
#define REPR(i, n) for(int i=n-1 ; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)
#define INF 2e9
#define ll long long
int main(){
int h, w;
cin>>h>>w;
int a[i][j];
REP(i, h){
REP(j, w){
... | a.cc: In function 'int main()':
a.cc:14:11: error: 'i' was not declared in this scope
14 | int a[i][j];
| ^
a.cc:14:14: error: 'j' was not declared in this scope
14 | int a[i][j];
| ^
a.cc:17:18: error: 'a' was not declared in this scope
17 | cin>>a[i][j];... |
s759033496 | p03712 | C++ | #include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main(){
int c,d;
string a,d,e,s,sum;
cin>>c>>d;
for(int i=0;i<c+2;i++){
for(int j=0;j<d+2;j++){
if(i==0||i==c+1||j==0||j==d+1){
cout<<'#';
}
else{
cin>>a;
cout<<a;
}
}
cout<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:10: error: conflicting declaration 'std::string d'
7 | string a,d,e,s,sum;
| ^
a.cc:6:9: note: previous declaration as 'int d'
6 | int c,d;
| ^
|
s922793140 | p03712 | C++ | 1 1
z | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 1
| ^
|
s390565477 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<vector<int>> vec(H,vector(W));
for(int i=0;i>H;i++){
for(int j=0;i>W;i++){
cin >> vec[i][j];
}
}
for(int i=0;i>W+2;i++)cout << "#" << endl;
for(int i=0;i>H;i++){
cout << "#"
for(int j=0;j>W... | a.cc: In function 'int main()':
a.cc:8:37: error: class template argument deduction failed:
8 | vector<vector<int>> vec(H,vector(W));
| ^
a.cc:8:37: error: no matching function for call to 'vector(int&)'
In file included from /usr/include/c++/14/vector:66,
... |
s510595311 | p03712 | C++ | int A,B;
cin >> A;
cin >> B;
vector<string> S(A);
for(int i = 0;i < (B + 2);i++){
cout << "#";
}
cout << endl;
for(int i = 0;i < A;i++){
cin >> S.at(i);
cout << "#" << S.at(i) << "#" << endl;
}
for(int i = 0;i < (B + 2);i++){
cout << "#";
... | a.cc:2:5: error: 'cin' does not name a type
2 | cin >> A;
| ^~~
a.cc:3:5: error: 'cin' does not name a type
3 | cin >> B;
| ^~~
a.cc:4:5: error: 'vector' does not name a type
4 | vector<string> S(A);
| ^~~~~~
a.cc:5:5: error: expected unqualified-id before 'for'
... |
s126253146 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
int i;
char a;
for(i=0;i<H+2;i++){
if((i == 0)|(i==H+1)){
for(j=0;j<W+2;j++){
cout << '#';
}
cout << endl;
}
else{
cout << '#';
for(j=0;j<W+1;j++){
cin >> a;
... | a.cc: In function 'int main()':
a.cc:12:11: error: 'j' was not declared in this scope
12 | for(j=0;j<W+2;j++){
| ^
a.cc:19:11: error: 'j' was not declared in this scope
19 | for(j=0;j<W+1;j++){
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc... |
s443070946 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
int i;
char a;
for(i=0;i<H+2;i++){
if((i == 0)||(i==H+1)){
for(j=0;j<W+2;j++){
cout << '#';
}
}
else{
cout << '#';
for(j=0;j<W+1;j++){
cin >> a;
cout << a;
... | a.cc: In function 'int main()':
a.cc:12:11: error: 'j' was not declared in this scope
12 | for(j=0;j<W+2;j++){
| ^
a.cc:18:11: error: 'j' was not declared in this scope
18 | for(j=0;j<W+1;j++){
| ^
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc... |
s457446310 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
int i;
char a;
for(i=0;i<H+2;i++){
if((i == 0)||(i==H+1){
for(j=0;j<W+1;j++){
cout << '#';
}
}
else{
cout << '#';
for(j=0;j<W+1;j++){
cin >> a;
cout << a;
}... | a.cc: In function 'int main()':
a.cc:11:26: error: expected ')' before '{' token
11 | if((i == 0)||(i==H+1){
| ~ ^
| )
a.cc:25:1: error: expected primary-expression before '}' token
25 | }
| ^
a.cc:25:2: error: expected '}' at end of input
2... |
s934121624 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W, w;
cin >> H >> W;
w = W;
W = W + 2;
char Frame = "#";
for(int i = 0; i < W; i++) {
cout << Frame;
}
cout << endl;
string str;
for(int i = 0; i < H; i++) {
str = "";
for(int j = 0; j < w; j++) {
cin >> str;
}
cout << "#" << ... | a.cc: In function 'int main()':
a.cc:10:22: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
10 | char Frame = "#";
| ^~~
| |
| const char*
|
s237689580 | p03712 | C++ | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | a.cc: In function 'int main()':
a.cc:273:19: error: 'a' was not declared in this scope
273 | cout << a[i][j];
| ^
|
s245146644 | 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<string> vec(W);
for (int j = 0; j < W, j++) {
cin >> vec.at(j);
}
... | a.cc: In function 'int main()':
a.cc:13:29: error: expected ';' before ')' token
13 | for (int i = 0; i < H, i++) {
| ^
| ;
a.cc:17:31: error: expected ';' before ')' token
17 | for (int j = 0; j < W, j++) {
| ... |
s525176982 | p03712 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
int main() {
int H, W;
cin ... | a.cc: In function 'int main()':
a.cc:24:28: error: expected ';' before '}' token
24 | cout << '#'
| ^
| ;
25 | }
| ~
a.cc:46:28: error: expected ';' before '}' token
46 | c... |
s585140695 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
/* メモリ食い過ぎ注意 */
#define int long long
typedef long long ll;
ll gcd(ll a, int b)
{
if (a < b)
gcd(b, a);
if (b == 0)
return a;
int r;
while ((r = a % b))
{
a = b;
b = r;
}
return b;
}
/* define const */
const ll... | a.cc: In function 'int main()':
a.cc:37:25: error: 'n' was not declared in this scope
37 | for (int i = 0; i < n + 2; i++)
| ^
a.cc:46:25: error: 'n' was not declared in this scope
46 | for (int i = 0; i < n + 2; i++)
| ^
|
s386853553 | 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 < (W + 2)) {
cout << "#";
}
cout << endl;
for (int j = 0; j < H; j++) {
cin >> vec.at(j);
cout << "#" << vec.at(j) << "#" << endl;
}
for (int i = 0; i <... | a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before ')' token
10 | for (int i = 0; i < (W + 2)) {
| ^
| ;
a.cc:20:31: error: expected ';' before ')' token
20 | for (int i = 0; i < (W + 2)) {
| ... |
s638596920 | 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 < W + 2) {
cout << "#";
}
cout << endl;
for (int j = 0; j < H; j++) {
cin >> vec.at(j);
cout << "#" << vec.at(j) << "#" << endl;
}
for (int i = 0; i < W... | a.cc: In function 'int main()':
a.cc:10:28: error: expected ';' before ')' token
10 | for (int i = 0; i < W + 2) {
| ^
| ;
a.cc:20:29: error: expected ';' before ')' token
20 | for (int i = 0; i < W + 2) {
| ^... |
s375041752 | p03712 | C++ | H, W = map(int, input().split())
a = [""] * H
for i in range(H):
a[i] = input()
print("#" * (W * 2))
for i in range(H):
print('#', a[i], "#", sep="")
print("#" * (W * 2))
| a.cc:1:1: error: 'H' does not name a type
1 | H, W = map(int, input().split())
| ^
|
s930938821 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >>a>>b;
for(i=0;i<b+2;i++)
cout<<"#";
cout<<endl;
for(i=0;i<a;i++){
int str;
cin>>str;
cout<<"#"<<str<<"#"<<endl;
}
for(i=0;i<b+2;i++)
cout<<"#";
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=0;i<b+2;i++)
| ^
a.cc:12:7: error: 'i' was not declared in this scope
12 | for(i=0;i<a;i++){
| ^
a.cc:19:9: error: 'i' was not declared in this scope
19 | for(i=0;i<b+2;i++)
| ... |
s510564124 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >>a>>b;
for(i=0;i<b+2;i++)
cout<<#;
cout<<endl;
for(i=0;i<a;i++){
int str;
cin>>str;
cout<<"#"<<str<<"#"<<endl;
}
for(i=0;i<b+2;i++)
cout<<#;
cout<<endl;
}
| a.cc:9:11: error: stray '#' in program
9 | cout<<#;
| ^
a.cc:20:11: error: stray '#' in program
20 | cout<<#;
| ^
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=0;i<b+2;i++)
| ^
a.cc:9:12: error: expected pri... |
s128207193 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
for(int i=0;i<W+2;i++){
cout<<"#";
}
cout<<endl;
for(int i=0;i<H;i++){
vector<string> n;
cin>>n;
cout<<"#"<<n.at(i)<<"#"<<endl;
}
for(int i=0;i<W+2;i++){
cout<<"#";
}
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:13:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
13 | cin>>n;
| ~~~^~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
... |
s803270875 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
for(int i=0;i<W+2;i++){
cout<<"#";
}
cout<<endl;
for(int i=0;i<H;i++){
vector<string> n;
cin>>n;
cout<<"#"<<n<<"#"<<endl;
}
for(int i=0;i<W+2;i++){
cout<<"#";
}
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:13:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
13 | cin>>n;
| ~~~^~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
... |
s274802318 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin>>H>>W;
vector<string> w(W+2,"#");
cout<<w<<endl;
for(int i=0;i<H;i++){
vector<string> n;
cin>>n;
cout<<"#"<<n<<"#"<<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::__cxx11::basic_string<char> >')
8 | cout<<w<<endl;
| ~~~~^~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
... |
s971677612 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin<<H<<W;
vector<string> w(W+2,"#");
cout>>w>>endl;
for(int i=0;i<H;i++){
vector<string> n;
cin>>n;
cout<<"#"<<n<<"#"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin<<H<<W;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:6: note: candidate: 'operator<<(... |
s198890149 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H>>W;
vector<char> vec(W+2,'#');
cout << vec <<endl;
for(int i = 0; i < H; i++){
vector<char> vec(W+2,'#');
for(int j = 0; j < W ; j++){
cin >> vec.at(j+1);
}
cout << vec << endl;
}
cout << vec << e... | a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
8 | cout << vec <<endl;
| ~~~~ ^~ ~~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostrea... |
s366354934 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H>>W;
vector<char> vec(W+2,#);
cout << vec <<endl;
for(int i = 0; i < H; i++){
vector<char> vec(W+2,'#');
for(int j = 0; j < W ; j++){
cin >> vec.at(j+1);
}
cout << vec << endl;
}
cout << vec << end... | a.cc:7:24: error: stray '#' in program
7 | vector<char> vec(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:7:25: error: expected primary-expression before ')' token
7 | vector<char> vec(W+2,#);
| ^
a.cc:8:8: error: no match for 'operator<<' (opera... |
s778430631 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H>>W;
vector<char> vec(W+2,#);
cout << vec <<endl;
for(int i = 0; i < H; i++){
vector<string> vec(W+2,#);
for(int j = 0; j < W ; j++){
cin >> vec.at(j+1);
}
cout << vec << endl;
}
cout << vec << end... | a.cc:7:24: error: stray '#' in program
7 | vector<char> vec(W+2,#);
| ^
a.cc:10:29: error: stray '#' in program
10 | vector<string> vec(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:7:25: error: expected primary-expression before ')' token
... |
s289863996 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H>>W;
vector<string> vec(W+2,#);
cout << vec <<endl;
for(int i = 0; i < H; i++){
vector<string> vec(W+2,#);
for(int j = 0; j < W ; j++){
cin >> vec.at(j+1);
}
cout << vec << endl;
}
cout << vec << e... | a.cc:7:26: error: stray '#' in program
7 | vector<string> vec(W+2,#);
| ^
a.cc:10:29: error: stray '#' in program
10 | vector<string> vec(W+2,#);
| ^
a.cc: In function 'int main()':
a.cc:7:27: error: expected primary-expression before ')' to... |
s034015144 | p03712 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W,;
cin << H << W;
vector(string)M(W)
for(int i = 0; i < H; i++){
cin >> M.at(i);
}
for(int i = 0; i < H + 2; i++){
if(i == 0 || i == H+1){
for(int x =0; x < W + 2; x++){
cout << '#';
}
cout << endl;
}else{
cout << '#' << M.at(i-1) <... | a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before ';' token
5 | int H, W,;
| ^
a.cc:6:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin << H << W;
| ~~~ ^~ ~
| | |
| | ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.