criyle/codenet-compile-errors huggingface dataset:
Language: C++

//
//  main.cpp
//  B_PictureFrame
//
//  Created by user1 on 2017/05/20.
//  Copyright © 2017年 user1. All rights reserved.
//

#include <iostream>
int H, W;
char a[100+ 2][100 + 2];

void init(){
    for(int h = 0; h<100+2; h++){
        for(int w=0; w<100+2; w++){
            a[h][w] = '0';        }
    }
}

void input(){
    std::cin >> H;
    std::cin >> W;
    
    //入力
    std::string buff;
    int ind = 0;
    //読み捨て
    std::getline(std::cin, buff);
    while(std::cin){
        std::getline(std::cin, buff);
        //Char array's index is offset +1 for head "#".
        std::strcpy(&(a[ind+1][1]), buff.c_str());
        if(ind >= H) break;
        ind ++;
        
    }
}

void solve(){
    //add "#" head and tail.
    for(int i=0; i<W+2; i++){
        a[0][i] = '#';
        a[H+1][i] = '#';
    }
    
    for(int i=0; i<H+2; i++){
        a[i][0] = '#';
        a[i][W+1] = '#';
    }
}

void show(){
    for(int h = 0; h<H+2; h++){
        for(int w=0; w<W+2; w++){
            printf("%c ", a[h][w]);
        }printf("\n");
    }
}

int main(int argc, const char * argv[]) {
    // insert code here...
    init();
    input();
    //show();
    solve();
    show();
    return 0;
}


Compiler output:
a.cc: In function 'void input()':
a.cc:32:14: error: 'strcpy' is not a member of 'std'
   32 |         std::strcpy(&(a[ind+1][1]), buff.c_str());
      |              ^~~~~~
Language: C++

import java.io.*;
import java.util.*;

public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split(" ");
		int a = Integer.parseInt(s[0]);
		int b = Integer.parseInt(s[1]);
		if((isGPA(a) && isGPA(b)) || (isGPB(a) && isGPB(b)) || (a == 2 && b == 2)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
	public static boolean isGPA(int num){
		int[] CNT = {1,3,5,7,8,10,12};
		for(int n : CNT){
			if(n == num){
				return true;
			}
		}
		return false;
	}

	public static boolean isGPB(int num){
		int[] CNT = {4,6,9,11};
		for(int n : CNT){
			if(n == num){
				return true;
			}
		}
		return false;
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
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.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main{
      | ^~~~~~
Language: C++

int main(){
    int x,y;
    scanf("%d %d",&x,&y);
    switch(x){
        case 1:
        case 3:
        case 5:
        case 7:
        case 8:
        case 10:
        case 12:
        if (y==1||y==3||y==5||y==7||y==8||y==10||y==12) printf("Yes\n");
        else printf("No\n");
        break;
        case 4:
        case 6:
        case 9:
        case 11:
        if(y==4||y==6||y==9||y==11) printf("Yes\n");
        else printf("No\n");
        break;
        case 2:
        if(y==2) printf("Yes\n");
        else printf("No\n");
        break;
    }
    return 0;   
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'scanf' was not declared in this scope
    3 |     scanf("%d %d",&x,&y);
      |     ^~~~~
a.cc:12:57: error: 'printf' was not declared in this scope
   12 |         if (y==1||y==3||y==5||y==7||y==8||y==10||y==12) printf("Yes\n");
      |                                                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:13:14: error: 'printf' was not declared in this scope
   13 |         else printf("No\n");
      |              ^~~~~~
a.cc:13:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:37: error: 'printf' was not declared in this scope
   19 |         if(y==4||y==6||y==9||y==11) printf("Yes\n");
      |                                     ^~~~~~
a.cc:19:37: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:14: error: 'printf' was not declared in this scope
   20 |         else printf("No\n");
      |              ^~~~~~
a.cc:20:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:23:18: error: 'printf' was not declared in this scope
   23 |         if(y==2) printf("Yes\n");
      |                  ^~~~~~
a.cc:23:18: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:24:14: error: 'printf' was not declared in this scope
   24 |         else printf("No\n");
      |              ^~~~~~
a.cc:24:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>

using namespace std;

int main(){
  int x,y,p,q;
  int a[] = {1,3,5,7,8,10,12},b[]={4,6,9,11};
  cin>>x>>y;
  if(x==y) break;
  for(int i=0; i<7; i++){
    if(x==a[i]){
     p=0;
     break;
    }
  }
  for(int j=0; j<7; j++){
    if(y==a[j]) {
      q=0;
      break;
    }
  }
  for(int c=0; c<4; c++){
    if(x==b[c]) {
      p=1; 
      break;
    }
  }
   for(int d=0; d<4; d++){
    if(y==b[d]) {
      q=1; 
      break;
    }
  }
  if(p==q)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: break statement not within loop or switch
    9 |   if(x==y) break;
      |            ^~~~~
Language: C

#include <stdio.h>
 
int main(void)
{
	int x, y;
	int a[]={1,3,5,7,8,10,12};
	int b[]={4,6,7,9,10};
	
	scanf("%d", &x);
	scanf("%d", &y);
	for(int i = 0;;i++)
	{
		if(a[i]==x&&a[i==y]){
			pritf("Yes");
			break;
		}else if(b[i]==x&&b[i]==y){
			printf("Yes");
			break;
		}else if(x==2&&y==2){
			printf("Yes");
			break;
		}else{
			printf("No");
			break;
		}
 	}
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:14:25: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   14 |                         pritf("Yes");
      |                         ^~~~~
      |                         printf
Language: Java

import java.util.*;

public class Grouping {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int x = sc.nextInt();
    int y = sc.nextInt();
    int a = 1, b = 2, c = 3;

    if(x == 2) {
      x = a;
    } else if(x == 4 || x == 6 || x == 9 || x == 11) {
      x = b;
    } else {
      x = c;
    }
    if(y == 2) {
      y = a;
    } else if(y == 4 || y == 6 || y == 9 || y == 11) {
      y = b;
    } else {
      y = c;
    }

    if(x == y) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

  }
}


Compiler output:
Main.java:3: error: class Grouping is public, should be declared in a file named Grouping.java
public class Grouping {
       ^
1 error
Language: C++

#include <vector>
#include <algorithm>

class Grouping {
public:
	Grouping() {};

	int serch(int x) {
		std::vector<int>::iterator itr;
		itr = find(groupe1.begin(), groupe1.end(), x);
		if (itr != groupe1.end()) {
			return 1;
		}

		itr = find(groupe2.begin(), groupe2.end(), x);
		if (itr != groupe2.end()) {
			return 2;
		}

		return 3;
	}

private:
	std::vector<int> groupe1 = {1, 3, 5, 7, 8, 10, 12};
	std::vector<int> groupe2 = { 4, 6, 9, 11 };
};

int main() {
	Grouping g;
	int x, y;

	std::cin >> x >> y;

	if (g.serch(x) == g.serch(y)) {
		std::cout << "Yes" << std::endl;
	}
	else { std::cout << "No" << std::endl; }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:14: error: 'cin' is not a member of 'std'
   32 |         std::cin >> x >> y;
      |              ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | 
a.cc:35:22: error: 'cout' is not a member of 'std'
   35 |                 std::cout << "Yes" << std::endl;
      |                      ^~~~
a.cc:35:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:44: error: 'endl' is not a member of 'std'
   35 |                 std::cout << "Yes" << std::endl;
      |                                            ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 | 
a.cc:37:21: error: 'cout' is not a member of 'std'
   37 |         else { std::cout << "No" << std::endl; }
      |                     ^~~~
a.cc:37:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:42: error: 'endl' is not a member of 'std'
   37 |         else { std::cout << "No" << std::endl; }
      |                                          ^~~~
a.cc:37:42: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include <stdio.h>
 
int main(void)
{
	int x, y;
	int a[]={1,3,5,7,8,10,12};
	int b[]={4,6,7,9,10};
	
	scanf("%d %d",&x, &y);
	for(int i = 0;;i++)
	{
		if(a[i]==x&&a[i==y]){
			pritf("Yes");
		}else if(b[i]==x&&b[i]==y){
			printf("Yes");
		}else if(x==2&&y==2){
			printf("Yes");
		}else{
			printf("No");
		}
 	}
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:13:25: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |                         pritf("Yes");
      |                         ^~~~~
      |                         printf
Language: C++

#include "stdafx.h"
#include<iostream>

using namespace std;

int main()
{
	int n,m,g1,g2;
	cin >> n;
	if (n == 1 || n == 3 || n == 5 || n == 7 || n == 8 || n == 10 || n == 12)
	{
		g1 = 1;
	}
	else if (n == 4 || n == 6 || n == 9 || n == 11)
	{
		g1 = 2;
	}
	else
	{
		g1 == 3;
	}
	cin >> n;
	if (n == 1 || n == 3 || n == 5 || n == 7 || n == 8 || n == 10 || n == 12)
	{
		g2 = 1;
	}
	else if (n == 4 || n == 6 || n == 9 || n == 11)
	{
		g2 = 2;
	}
	else
	{
		g2 == 3;
	}
	if (g1 == g2)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
    return 0;
}


Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

// Grouping.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<iostream>

using namespace std;

int main()
{
	int n,m,g1,g2;
	cin >> n;
	if (n == 1 || n == 3 || n == 5 || n == 7 || n == 8 || n == 10 || n == 12)
	{
		g1 = 1;
	}
	else if (n == 4 || n == 6 || n == 9 || n == 11)
	{
		g1 = 2;
	}
	else
	{
		g1 == 3;
	}
	cin >> n;
	if (n == 1 || n == 3 || n == 5 || n == 7 || n == 8 || n == 10 || n == 12)
	{
		g2 = 1;
	}
	else if (n == 4 || n == 6 || n == 9 || n == 11)
	{
		g2 = 2;
	}
	else
	{
		g2 == 3;
	}
	if (g1 == g2)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
    return 0;
}


Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

// clang-format off
  #include <bits/stdc++.h>
  #include<string>
      #define rep(i, n) for(int i = 0; i < (n); i++)
      using namespace std;

// clang-format on
int main() {
  int x, y;
  cin >> x >> y;
  if (x == 2 || y == 2) {
    cout << "No" << endl;
  } else if (x == 4) {
    if (y == 6) {
      cout << "Yes" << endl;
    } else if (y == 9) {
      cout << "Yes" << endl;
    } else if (y == 11) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }

  } else if (x == 6) {
    if (y == 9) {
      cout << "Yes" << endl;
    } else if (y == 11) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else if (x == 9) {
    if (y == 11) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    else if (x == 11) {
      cout << "No" << endl;
    }
  } else {
    cout << "Yes" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:5: error: expected '}' before 'else'
   38 |     else if (x == 11) {
      |     ^~~~
a.cc:32:22: note: to match this '{'
   32 |   } else if (x == 9) {
      |                      ^
a.cc: At global scope:
a.cc:41:5: error: expected unqualified-id before 'else'
   41 |   } else {
      |     ^~~~
a.cc:44:3: error: expected unqualified-id before 'return'
   44 |   return 0;
      |   ^~~~~~
a.cc:45:1: error: expected declaration before '}' token
   45 | }
      | ^
Language: C++


#include<iostream>
#include<string>
using namespace std;


int A() {
	int a;
	int b;
	cin >> a >> b;

	int ga=0;
	switch (a) {
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:case 10:case 12:
		ga = 1;
		break;
	case 4:case 6:case 9:case 11:
		ga = 2;
		break;
	case 2:
		ga = 3;
		break;
	}
	int gb = 0;
	switch (b) {
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:case 10:case 12:
		gb = 1;
		break;
	case 4:case 6:case 9:case 11:
		gb = 2;
		break;
	case 2:
		gb = 3;
		break;
	}
	if (ga == gb) cout << "Yes";
	else cout << "No";

	return 0;
}

Compiler output:
/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 status
Language: C++

#include <stdio.h>

int main()
{
	int x, y;
	int a[]={1,3,5,7,8,10,12};
	int b[]={4,6,7,9,10};
	
	scanf("%d %d",x, y);
	for(int i = 0;;i++)
	{
		if(a[i]==x&&a[i==y]){
			pritf("Yes");
		}else if(b[i]==x&&b[i]==y){
			printf("Yes");
		}else if(x==2&&y==2){
			printf("Yes");
		}else{
			printf("No");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'pritf' was not declared in this scope; did you mean 'printf'?
   13 |                         pritf("Yes");
      |                         ^~~~~
      |                         printf
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	cin >> x >> y;
	if(x==2){
		if(y==2){
			cout << "Yes";
		}else{
			cout << "No";
		}
	}else{
		if((x==4)||(x==6)||(x==9)||(x==11)){
			if((y==4)||(y==6)||(y==9)||(y==11)){
				cout << "Yes";
			}else{
				cout << "No";
			}
		}else{
			if((y==3)||(y==1)||(y==5)||(y==7)||(y==8)||(y==10)||(y==12)){
				cout << "Yes";
			}else{
				cout << "No";
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'x' was not declared in this scope
    5 |         cin >> x >> y;
      |                ^
a.cc:5:21: error: 'y' was not declared in this scope
    5 |         cin >> x >> y;
      |                     ^
Language: C++

(defun solver ()
  (let* ((x (read)) (y (read))
        (a 1) (b 2) (c 3)
        (array (vector 0 a c a b a b a a b a b a)))
    (if (= (svref array x) (svref array y))
        (format t "YES~%")
        (format t "NO~%"))))

(solver)

Compiler output:
a.cc:1:7: error: expected ')' before 'solver'
    1 | (defun solver ()
      | ~     ^~~~~~~
      |       )
Language: Java


			for (int i : a) {
				if (i == x) {
					tmpX = 1;
				}
				if (i == y) {
					tmpY = 1;
				}
			}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
			for (int i : a) {
			^
Main.java:5: error: class, interface, enum, or record expected
				}
				^
Main.java:8: error: class, interface, enum, or record expected
				}
				^
3 errors
Language: C++

#include <cstdio>
#include <iostream>
#include <string>

int main() {
    int x, y;
    scanf("%d%d", &x, &y);
    int group[] = { 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 };
    if (gropu[x - 1] == gropu[y - 1]) {
        puts("Yes");
    }
    else {
        puts("No");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'gropu' was not declared in this scope; did you mean 'group'?
    9 |     if (gropu[x - 1] == gropu[y - 1]) {
      |         ^~~~~
      |         group
Language: C++

#include<bits/stdc++.h>
using namespace std;

int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
int main() {
    int x, y;
    cin >> x >> y;
    cout << (a[x-1] == a[y-1] ? "Yes" : "No") << endl;
    
    return 0;
}
#include<bits/stdc++.h>
using namespace std;

int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
int main() {
    int x, y;
    cin >> x >> y;
    cout << (a[x-1] == a[y-1] ? "Yes" : "No") << endl;
    
    return 0;
}


Compiler output:
a.cc:15:5: error: redefinition of 'int a [12]'
   15 | int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
      |     ^
a.cc:4:5: note: 'int a [12]' previously defined here
    4 | int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
      |     ^
a.cc:16:5: error: redefinition of 'int main()'
   16 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  
  vector <vector<int>> data(A, vector<int>(B))
  for (int i=0; i<A; i++) {
    for (int j=0; j<B; j++) {
      cin >> data.at(i).at(j);
    }
  }
  
  int i=0;
  while (i<B+2) {
    cout << "#";
    i++;
  }
  
  cout << endl;
  
  for (int j=0; j<A; j++) {
    cout << "#";
    for (int k=0; k<B; k++) {
      cout << data.at(j).at(k);
    }
    cout << "#" << endl;
  }
  
  int j=0;
  while (j<B+2) {
    cout << "#";
    j++;
  }
  
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=0; i<A; i++) {
      |   ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for (int i=0; i<A; i++) {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  
  vector <vector<int>> data(A, vector<int>(B))
  for (int i=0; i<A; i++) {
    for (int j=0; j<B; j++) {
      cin >> data.at(i).at(j);
    }
  }
  
  int i=0;
  while (i<B+2) {
    cout << #;
    i++;
  }
  
  cout << endl;
  
  for (int j=0; j<A; j++) {
    cout << #;
    for (int k=0; k<B; k++) {
      cout << data.at(j).at(k);
    }
    cout << # << endl;
  }
  
  int j=0;
  while (j<B+2) {
    cout << #;
    j++;
  }
  
  cout << endl;
}


Compiler output:
a.cc:17:13: error: stray '#' in program
   17 |     cout << #;
      |             ^
a.cc:24:13: error: stray '#' in program
   24 |     cout << #;
      |             ^
a.cc:28:13: error: stray '#' in program
   28 |     cout << # << endl;
      |             ^
a.cc:33:13: error: stray '#' in program
   33 |     cout << #;
      |             ^
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=0; i<A; i++) {
      |   ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for (int i=0; i<A; i++) {
      |                 ^
a.cc:17:14: error: expected primary-expression before ';' token
   17 |     cout << #;
      |              ^
a.cc:24:14: error: expected primary-expression before ';' token
   24 |     cout << #;
      |              ^
a.cc:28:15: error: expected primary-expression before '<<' token
   28 |     cout << # << endl;
      |               ^~
a.cc:33:14: error: expected primary-expression before ';' token
   33 |     cout << #;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int h,w = 0;
  cin >> h >> w;
  
  vector<string> str(h);
  for(int i=0;i<h;i++){
    cin >> str.at(i);
  }
  
  for(int i=0;i<w+2;i++){
    cout << "#";
  }
  cout << endl;
  for(int i=0;i<h;i++){
    cout << "#" + str.at(j) + "#";
  }
  cout << endl;
  
  for(int i=0;i<w+2;i++){
    cout << "#";
  }
  cout << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: 'j' was not declared in this scope
   18 |     cout << "#" + str.at(j) + "#";
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int H, W;
  cin >> H >> w;
  
  vector<string> a(H);
  
  for (int i = 0; i < W; i++) {
    cin >> a.at(i);
  }
  
  for (int i = 0; i < W + 2; i++) {
    cout <<  "#" << endl;
  }
  
  for (int i = 0; i < H; i++) {
    cout << "#" << a.at(i) << "#" << endl;
  }
  
  for (int i = 0; i < W + 2; i++) {
    cout <<  "#" << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'w' was not declared in this scope
    6 |   cin >> H >> w;
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int h, w;
  cin >> h >> w;
  
  for(int i = 0; i<w; i++){
    cout<<"#";
  }
      
  for(int i = 0; i < h; i++){
    cout<<endl<<"#";
    for(int j = 0; j < w; j++){
      vector<int> vec(w);
      cin >> vec.at(j);
      cout<< vec.at(j);
    }
    cout<<"#"<<endl;
  }
      for(int i = 0; i<W; i++){
    cout<<"#";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'W' was not declared in this scope
   21 |       for(int i = 0; i<W; i++){
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int h, w;
  cin >> h >> w;
  
  for(int i = 0; i<w; i++{
    cout<<"#";
  }
      
  for(int i = 0; i < h; i++){
    cout<<endl<<"#";
    for(int j = 0; j < w; j++){
      vector<int> vec(w);
      cin >> vec.at(j);
      cout<< vec.at(j);
    }
    cout<<"#"<<endl;
  }
      for(int i = 0; i<W; i++{
    cout<<"#";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ')' before '{' token
    8 |   for(int i = 0; i<w; i++{
      |      ~                   ^
      |                          )
a.cc:21:24: error: 'W' was not declared in this scope
   21 |       for(int i = 0; i<W; i++{
      |                        ^
a.cc:21:30: error: expected ')' before '{' token
   21 |       for(int i = 0; i<W; i++{
      |          ~                   ^
      |                              )
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int h, w;
  cin >> h >> w;
  
  for(int i = 0; i<W; i++{
    cout<<"#";
  }
      
  for(int i = 0; i < h; i++){
    cout<<endl<<"#";
    for(int j = 0; j < w; j++){
      vector<int> vec(w);
      cin >> vec.at(j);
      cout<< vec.at(j);
    }
    cout<<"#"<<endl;
  }
      for(int i = 0; i<W; i++{
    cout<<"#";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'W' was not declared in this scope
    8 |   for(int i = 0; i<W; i++{
      |                    ^
a.cc:8:26: error: expected ')' before '{' token
    8 |   for(int i = 0; i<W; i++{
      |      ~                   ^
      |                          )
a.cc:21:24: error: 'W' was not declared in this scope
   21 |       for(int i = 0; i<W; i++{
      |                        ^
a.cc:21:30: error: expected ')' before '{' token
   21 |       for(int i = 0; i<W; i++{
      |          ~                   ^
      |                              )
Language: C++

char a [100][101] , b [102][102];
int main () {
int H , W ; cin >> H >> W ;
for ( int i = 0; i < H ; i ++)
scanf ("% s " , a [ i ]);
1
for ( int i = 0; i < H + 2; i ++)
for ( int j = 0; j < W + 2; j ++)
b [ i ][ j ] = ’# ’;
for ( int i = 0; i < H ; i ++)
for ( int j = 0; j < W ; j ++)
b [ i + 1][ j + 1] = a [ i ][ j ];
for ( int i = 0; i < H + 2; i ++) {
for ( int j = 0; j < W + 2; j ++)
cout << b [ i ][ j ];
cout << endl ;
}
}


Compiler output:
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 ] = ’# ’;
      |                   ^
a.cc: In function 'int main()':
a.cc:3:13: error: 'cin' was not declared in this scope
    3 | int H , W ; cin >> H >> W ;
      |             ^~~
a.cc:5:1: error: 'scanf' was not declared in this scope
    5 | scanf ("% s " , a [ i ]);
      | ^~~~~
a.cc:6:2: error: expected ';' before 'for'
    6 | 1
      |  ^
      |  ;
    7 | for ( int i = 0; i < H + 2; i ++)
      | ~~~
a.cc:7:18: error: 'i' was not declared in this scope
    7 | for ( int i = 0; i < H + 2; i ++)
      |                  ^
a.cc:8:18: error: 'j' was not declared in this scope
    8 | for ( int j = 0; j < W + 2; j ++)
      |                  ^
a.cc:15:1: error: 'cout' was not declared in this scope
   15 | cout << b [ i ][ j ];
      | ^~~~
a.cc:16:1: error: 'cout' was not declared in this scope
   16 | cout << endl ;
      | ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope
   16 | cout << endl ;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    int H , W ;
    cin >> H >> W ;
    string a;
    int i,all = H*W;
    for (i=1;i<=all;i++){
        cin >> a[i] ;
    }
    for (i=1;i<=W+2;i++){
        cout << "#" ;
    }cout << endl;


    cout << "#";
    for (i=1;i<=W;i++){
        cout << a[i];
    }cout << "#" << endl;

    for (int h=2;h<=H;h++){
        cout << "#";
        int P = W*h-(W-1);
        for (i=P;i<W+P;i++){
            cout << a[i];
        }
	
    }
    cout << "#" << endl;
    
    for (i=1;i<=W+2;i++){
        cout << "#" ;
        }cout << endl;
    }
}

Compiler output:
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: 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 j = 0; j < W; j++){
      cin >> vec.at(j);
      cout << vec.at(j);
    }
    cout << "#" << endl;
  }
  for (i = 0; i < W + 2; i++)
    cout << "#";
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: 'i' was not declared in this scope
   19 |   for (i = 0; i < W + 2; i++)
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int a,b;
  cin >> a>>b;
  vector<char>vec(a*b);
  for (int i=0;i<(a*b);i++){
    cin >> vec[i];
  }
  for (int j=0;j<(b+2);j++){
    cout<< '#';
  }
  cout << endl;
  for(int m=0;m<a;m++){
    for(int n=0;n<b;n++){
      cout << '#'<<vec.at(n+m*b) <<'#'<<
    }
    cout << endl;
  }
  for(int i=0;i<b+2;i++){
    cout <<'#';
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int a,b;
  cin >> a>>b;
  vector<char>vec(a*b);
  for (int i=0;i<vec.size();i++){
    cin >> vec[i];
  }
  for (int j=0;j<b+2;j++){
    cout<< '#';
  }
  cout << endl;
  for(int m=0;m<a;m++){
    for(int n=0;n<b;n++){
      cout << '#'<<vec.at(n+m*b) <<'#'<<
    }
    cout << endl;
  }
  for(int i=0;i<b+2;i++){
    cout <<'#';
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int a,b;
  cin >> a>>b;
  vector<char>vec(a*b);
  for (int i=0;i<vec.size();i++){
    cin >> vec[i];
  }
  for (int j=0;j<b+2;j++){
    cout<< '#';
  }
  cout << endl;
  for(m=0;m<a;m++){
    for(n=0;n<b;n++){
      cout << '#'<<vec.at(n+m*b) <<'#'<<
    }
    cout << endl;
  }
  for(int i=0;i<b+2;i++){
    cout <<'#';
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'm' was not declared in this scope
   15 |   for(m=0;m<a;m++){
      |       ^
a.cc:16:9: error: 'n' was not declared in this scope
   16 |     for(n=0;n<b;n++){
      |         ^
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>

int main() {
	int H, W; std::cin >> H >> W;
	std::vector<std::vector<char>> A(H, std::vector<char>(W));
	for (int i = 0; i < H; ++i) {
		for (int j = 0; i < W; ++j)
			std::cin >> A[i][j];

	for (int i = 0; i < W + 2; ++i)
		std::cout << '#';
	std::cout << std::endl;

	for (int i = 0; i < H; ++i) {
		std::cout << '#';
		for (int j = 0; i < W; ++j) {
			std::cin >> A[i][j];
			std::cout << A[i][j];
		}
		std::cout << '#' << std::endl;
	}

	for (int i = 0; i < W + 2; ++i)
		std::cout << '#';
	std::cout << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:9:12: note: to match this '{'
    9 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  int H,W;
  vector<string> line(H);
  cin>>H>>W;
  for(int i=0;i<W+2<i++){
    cout<<"#";
  }
  cout<<endl;
  for(int i=0;i<H;i++){
    cin>>line.at(i);
    cout<<"#"+line.at(i)<<"#"<<endl;
  }
  for(int i=0;i<W+2;i++){
  cout<<"#";
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before ')' token
    7 |   for(int i=0;i<W+2<i++){
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  int H,W;
  vector<string> line(H);
  cin>>H>>W;
  for(int i=0;i<W+2<i++){
    cout<<"#";
  }
  cout<<endl;
  for(int i=0;i<H;i++){
    cin>>line.at(i);
    cout<<"#"+line.at(i)<<"#"<<endl;
  }
  for(int i=0;i<W+2<i++){
  cout<<"#";
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before ')' token
    7 |   for(int i=0;i<W+2<i++){
      |                        ^
      |                        ;
a.cc:15:24: error: expected ';' before ')' token
   15 |   for(int i=0;i<W+2<i++){
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  int H,W;
  vector<string> line(H);
  cin>>H>>W;
  for(i=0;i<W+2<i++){
    cout<<"#";
  }
  cout<<endl;
  for(i=0;i<H;i++){
    cin>>line.at(i);
    cout<<"#"+line.at(i)<<"#"<<endl;
  }
  for(i=0;i<W+2<i++){
  cout<<"#";
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<W+2<i++){
      |       ^
a.cc:7:20: error: expected ';' before ')' token
    7 |   for(i=0;i<W+2<i++){
      |                    ^
      |                    ;
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i=0;i<H;i++){
      |       ^
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   for(i=0;i<W+2<i++){
      |       ^
a.cc:15:20: error: expected ';' before ')' token
   15 |   for(i=0;i<W+2<i++){
      |                    ^
      |                    ;
Language: Java

package car;

import java.util.Scanner;

public class main{
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int h = s.nextInt();
		int w = s.nextInt();
		
		String n = "", nn = "";
		for(int i = 0; i < w + 2; i++) n += "#";
		System.out.println(n);
		
		for(int i = 0; i < h; i++) {
			nn = s.next();
			System.out.println("#" + nn + "#");
		}
		System.out.println(n);
	}
}


Compiler output:
Main.java:5: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int H, W;
  cin >> H >> W ;
  vector<vector<int>> data(H, vector<int>(W));
  for (int j = 0; j < H; j++){
  	for (int i = 0; i < W; i++) {
    	cin >> data.at(i).at(j);
  	}
  }
  vector<vector<int>> ans(H+2, vector<int>(W+2));
  for (int j = 0; j < H; j++){
  	for (int i = 0; i < W; i++) {
    	data.at(i).at(j) = "#"
  	}
  }
  for (int j=1; j < H-1:j++){
    for (int i = 1; i < W-1; i++) {
      ans.at(i).at(j) = data.at(i-1).at(j-1)  
  }
  for (int j = 0; j < H; j++){
  	for (int i = 0; i < W; i++) {
    	cout << data<< endl;
  	}
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive]
   16 |         data.at(i).at(j) = "#"
      |                            ^~~
      |                            |
      |                            const char*
a.cc:16:31: error: expected ';' before '}' token
   16 |         data.at(i).at(j) = "#"
      |                               ^
      |                               ;
   17 |         }
      |         ~                      
a.cc:19:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   19 |   for (int j=1; j < H-1:j++){
      |                 ^
a.cc:19:24: error: expected ';' before ':' token
   19 |   for (int j=1; j < H-1:j++){
      |                        ^
      |                        ;
a.cc:27:4: error: expected primary-expression at end of input
   27 |   }
      |    ^
a.cc:27:4: error: expected ';' at end of input
   27 |   }
      |    ^
      |    ;
a.cc:27:4: error: expected primary-expression at end of input
a.cc:27:4: error: expected ')' at end of input
   27 |   }
      |    ^
      |    )
a.cc:19:7: note: to match this '('
   19 |   for (int j=1; j < H-1:j++){
      |       ^
a.cc:27:4: error: expected statement at end of input
   27 |   }
      |    ^
a.cc:27:4: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int H, W;
  cin >> H >> W;
  vector<char> picture(H*W);
  for (int i=0; i<H; i++) {
    for (int j=0; j<W; j++) {
      cin >> picture(i+j);
    }
  }
  for (int j=0; j<W; j++) {
    cout << "#";
  }
  cout << endl;
  for (int i=0; i<H; i++) {
    cout << "#";
    for (int j=0; j<W; j++) {
      cout << picture.at(i+j);
    }
    cout << "#" << endl;
  }
  for (int j=0; j<W; j++) {
    cout << "#";
  }
  cout << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: no match for call to '(std::vector<char>) (int)'
   10 |       cin >> picture(i+j);
      |              ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b,d,e;
  string c;
  cin >> a >> b;
  vector<string> vec(a);
 /for (int i = 0; i < a; i++) {
    for (int j = 0; j < b; j++) {
      cin >> c;
      vec.push_back(c);
    }
  }
  for(int i = 0 ; i < b-1 ; i++){
    cout << "#";
  }
  cout << "#" << endl;
  for(int i = 0 ; i < a ; i++){
    cout << "#";
    cout << c.at(i);
    cout << "#" << endl;
  }
  for(int i = 0 ; i < a ; i++){
    cout << "#";
  }
  cout << "#" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: expected primary-expression before '/' token
    9 |  /for (int i = 0; i < a; i++) {
      |  ^
a.cc:9:3: error: expected primary-expression before 'for'
    9 |  /for (int i = 0; i < a; i++) {
      |   ^~~
a.cc:9:19: error: 'i' was not declared in this scope
    9 |  /for (int i = 0; i < a; i++) {
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int  H, W;
  cin >> H >> W;
  string box;
  for (int j = 0; j < W + 2; j++) {
    box += '#';
  }
  vector<string> total(H + 2);
  total.at(0) = box;
  for (int i = 0; i < H; i++) {
    string a;
    cin >> a;
    string newa = '#' + a + '#';
    total.at(i + 1) = newa;
  }
  total.at(H + 1) = box;
  for (int k = 0; k < total.size(); k++) {
    cout << total.at(k) << endl;
  }
}
  total.at(H + 2) = box;
}


Compiler output:
a.cc:24:3: error: 'total' does not name a type
   24 |   total.at(H + 2) = box;
      |   ^~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b,c;
  cin >> a >> b;
  vector<int> vec(0);
  for (int i = 0; i < a; i++) {
    for (int i = 0; i < b; i++) {
      cin >> c;
      vec.push_back(c);
    }
  }
  for (int i = 0; i < b+1; i++) {
    cout << "#" ;
  }
  cout << "#" << endl;
  for (int i = 0; i < a; i++) {
    

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: expected '}' at end of input
   18 |   for (int i = 0; i < a; i++) {
      |                               ~^
a.cc:18:32: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    int H, W;
    cin >> H >> W;
    vector<string> a(H);
    vector<string> b(H + 2);
    for(int i = 0; i < H; i++){
        cin >> a.at(i);
    }
    for(int i = 0; i < H + 2; i++){
        for(int j = 0; j < W + 2; j++){
            ((b.at(i)).push_back('#');
        }
    }
    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            (b.at(i + 1)).at(j + 1) = (a.at(i)).at(j);
        }
    }
    for(int i = 0; i < H + 2; i++){
        for(int j = 0; j < W; j++){
            cout << (b.at(i)).at(j);
        }
        cout << endl;
    }
    /*for(int i = 0; i < H + 2; i++){
        if(i == 0 || i == H + 1){
            for(int j = 0; j < W + 2; j++){
                cout << "#";
            }
        }else{
            for(int j = 0; j < W + 2; j++){
                if(j == 0 || j == W + 1){
                    cout << "#";
                }else{
                    cout << (a.at(i - 1)).at(j - 1);
                }
            }
        }
        cout << endl;
    }*/
}

/*
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 0) >= this->size() (which is 0)
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:14:38: error: expected ')' before ';' token
   14 |             ((b.at(i)).push_back('#');
      |             ~                        ^
      |                                      )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W ;
  vector <string> A (H*W) ;
  for (int i=0 ; i<H*W ; i++){
   cin >> A.at(i) ;  
  }
 
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
    for (int j=0; j<H*W ; j+=W){
      cout << '#';
      for( ; (j+1)%W=0 ; j++){
  cout <<  A.at(j) ;
  }
    cout << '#' << endl;
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: lvalue required as left operand of assignment
   18 |       for( ; (j+1)%W=0 ; j++){
      |              ~~~~~^~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W ;
  vector <string> A <H*W> ;
  for (int i=0 ; i<H*W ; i++){
   cin >> A.at(i) ;  
  }
 
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
    for (int j=0; j<H*W ; j+=W){
      cout << '#';
      for( ; (j+1)%W=0 ; j++){
  cout <<  A.at(j) ;
  }
    cout << '#' << endl;
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before '<' token
    7 |   vector <string> A <H*W> ;
      |                     ^
a.cc:9:11: error: 'A' was not declared in this scope
    9 |    cin >> A.at(i) ;
      |           ^
a.cc:18:19: error: lvalue required as left operand of assignment
   18 |       for( ; (j+1)%W=0 ; j++){
      |              ~~~~~^~
a.cc:19:12: error: 'A' was not declared in this scope
   19 |   cout <<  A.at(j) ;
      |            ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W ;
  vector < string> A<H*W> ;
  for (int i=0 ; i<H*W ; i++){
   cin >> A.at(i) ;  
  }
 
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
    for (int j=0; j<H*W ; j+=W){
      cout << '#';
      for( ; (j+1)%W=0 ; j++){
  cout <<  A.at(j) ;
  }
    cout << '#' << endl;
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before '<' token
    7 |   vector < string> A<H*W> ;
      |                     ^
a.cc:9:11: error: 'A' was not declared in this scope
    9 |    cin >> A.at(i) ;
      |           ^
a.cc:18:19: error: lvalue required as left operand of assignment
   18 |       for( ; (j+1)%W=0 ; j++){
      |              ~~~~~^~
a.cc:19:12: error: 'A' was not declared in this scope
   19 |   cout <<  A.at(j) ;
      |            ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W ;
  vector < string> A<H*W>
  for (int i=0 ; i<H*W ; i++){
   cin >> A.at(i) ;  
  }
 
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
    for (int j=0; j<H*W ; j+=W){
      cout << '#'
      for( ; (j+1)%W=0 ; j++){
  cout <<  A.at(j) 
  }
    cout << '#' << endl;
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before '<' token
    7 |   vector < string> A<H*W>
      |                     ^
a.cc:8:18: error: 'i' was not declared in this scope
    8 |   for (int i=0 ; i<H*W ; i++){
      |                  ^
a.cc:17:18: error: expected ';' before 'for'
   17 |       cout << '#'
      |                  ^
      |                  ;
   18 |       for( ; (j+1)%W=0 ; j++){
      |       ~~~         
a.cc:18:19: error: lvalue required as left operand of assignment
   18 |       for( ; (j+1)%W=0 ; j++){
      |              ~~~~~^~
a.cc:18:29: error: expected ';' before ')' token
   18 |       for( ; (j+1)%W=0 ; j++){
      |                             ^
      |                             ;
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W ;
  for (int i=0 ; i<H ; i++){
    string l[i];
  getline(cin, l[i]); 
  }
 
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
  for (int i=0 ; i<H ; i++){
  cout << '#' << l[i] <<'#' <<endl; 
  }
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'l' was not declared in this scope
   17 |   cout << '#' << l[i] <<'#' <<endl;
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W ;
  string l[i];
  for (int i=0 ; i<H ; i++){
  getline(cin, l[i]); 
  }
 
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
  for (int i=0 ; i<H ; i++){
  cout << '#' << l[i] <<'#' <<endl; 
  }
  for ( int i=0 ; i<W+2 ;i++){
cout << '#' ;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'i' was not declared in this scope
    7 |   string l[i];
      |            ^
a.cc:9:16: error: 'l' was not declared in this scope
    9 |   getline(cin, l[i]);
      |                ^
a.cc:17:18: error: 'l' was not declared in this scope
   17 |   cout << '#' << l[i] <<'#' <<endl;
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
int A,B;
cin >> A >> B;
vector<char> S(A*B);
for(int i=0; i<A*B; i++)
{
    cin >> S.at(i);
}
int count=0;
for(int i=0; i<A+2; i++)
{
    for(int j=0; j<B+2; j++)
    {
        if(!(i==0||i==A+1)&&!(j==0||j==B+1))
        {
            cout << S.at(count);
            count++;
        }
        else
        {
            cout << "#";
        }
        if(j==B+1) cout << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H, W;
  cin >> H >> W;
  
  vector<string> image(H);
  
  for (int w = 0; w < W + 2; w++) {
    cout << '#';
  }
  cout << endl;
  
  for (int h = 0; h < H; h++;) {
    for (int i = 0; i < 3; i++) {
      if (i == 0) {
        cout << '#';
      } else if (i == 1) {
        string pixels;
        cin >> pixels;
        cout << pixels;
      } else {
        cout << '#' << endl;
      }
    }
  }
  for (int w = 0; w < W + 2; w++) {
    cout << '#';
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected ')' before ';' token
   15 |   for (int h = 0; h < H; h++;) {
      |       ~                     ^
      |                             )
a.cc:15:30: error: expected primary-expression before ')' token
   15 |   for (int h = 0; h < H; h++;) {
      |                              ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int H,W;
    cin>>H>>W;
    char a[H+2][W+2];
    for(int i=0;i<=H;i++){
        for(int j=0;j<=W;j++){
            cin>>a[i][j];
        }
    }
    string x[i-1];
    
    for(int z = 1; z < H; z++){
        cin >> x[z];
    }
    
    for(int z = 0; z < H; z++){
        cout << x[z] << endl;
    }
    char y;
    y='#';
    for(b=0;b<i;b++){
        cout<<y[i];
    }
    for(c=0;c<j;c++){
        cout<<y[j];
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'i' was not declared in this scope
   13 |     string x[i-1];
      |              ^
a.cc:16:16: error: 'x' was not declared in this scope
   16 |         cin >> x[z];
      |                ^
a.cc:20:17: error: 'x' was not declared in this scope
   20 |         cout << x[z] << endl;
      |                 ^
a.cc:24:9: error: 'b' was not declared in this scope
   24 |     for(b=0;b<i;b++){
      |         ^
a.cc:27:9: error: 'c' was not declared in this scope
   27 |     for(c=0;c<j;c++){
      |         ^
a.cc:27:15: error: 'j' was not declared in this scope
   27 |     for(c=0;c<j;c++){
      |               ^
Language: C++

 string a[2];
    
    for(int i = 0; i < 2; i++){
        cin >> a[i];
    }
    
    for(int i = 0; i < 2; i++){
        cout << a[i] << endl;
    }

Compiler output:
a.cc:1:2: error: 'string' does not name a type
    1 |  string a[2];
      |  ^~~~~~
a.cc:3:5: error: expected unqualified-id before 'for'
    3 |     for(int i = 0; i < 2; i++){
      |     ^~~
a.cc:3:20: error: 'i' does not name a type
    3 |     for(int i = 0; i < 2; i++){
      |                    ^
a.cc:3:27: error: 'i' does not name a type
    3 |     for(int i = 0; i < 2; i++){
      |                           ^
a.cc:7:5: error: expected unqualified-id before 'for'
    7 |     for(int i = 0; i < 2; i++){
      |     ^~~
a.cc:7:20: error: 'i' does not name a type
    7 |     for(int i = 0; i < 2; i++){
      |                    ^
a.cc:7:27: error: 'i' does not name a type
    7 |     for(int i = 0; i < 2; i++){
      |                           ^