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

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

int main(){
  int H,W;
  cin >> H >> W;
  
  vector<vector<char>> data(H,vector<char>(W));
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cin >> data.at(i).at(j);
    }
  }
  
  vector<int> row(0);
  for(int i=0;i<H;i++){
    int r=0;
    for(int j=0;j<W;j++){
      if(data.at(i).at(j) == '#'){
        r++;
      }
    }
    row.push_back(r);
  }
  
  vector<int> line(0);
  for(int j=0;j<W;j++){
    
    int r=0;
    
    for(int i=0;i<H;i++){
      if(data.at(i).at(j) == '#'){
        r++;
      }
    }
    line.push_back(r);
  }
  
  for(int i=0;i<H;i++){
    if(row.at(i) == 0){
      data.at(i).clear();
    }
  }
  
  for(int j=0;j<W;j++){
    if(line.at(j) == 0){
      for(int i=0;i<H;i++){
        data.erase(data.at(i).at(j));
      }
    }
  }
  
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cout << data.at(i).at(j) <<endl;
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:19: error: no matching function for call to 'std::vector<std::vector<char> >::erase(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   49 |         data.erase(data.at(i).at(j));
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; iterator = std::vector<std::vector<char> >::iterator; const_iterator = std::vector<std::vector<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::vector<std::vector<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; iterator = std::vector<std::vector<char> >::iterator; const_iterator = std::vector<std::vector<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  
  vector<vector<char>> data(H,vector<char>(W));
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cin >> data.at(i).at(j);
    }
  }
  
  vector<int> row(0);
  for(int i=0;i<H;i++){
    int r=0;
    for(int j=0;j<W;j++){
      if(data.at(i).at(j) == '#'){
        r++;
      }
    }
    row.push_back(r);
  }
  
  vector<int> line(0);
  for(int j=0;j<W;j++){
    
    int r=0;
    
    for(int i=0;i<H;i++){
      if(data.at(i).at(j) == '#'){
        r++;
      }
    }
    line.push_back(r);
  }
  
  for(int i=0;i<H;i++){
    if(row.at(i) == 0){
      data.at(i).clear();
    }
  }
  
  for(int j=0;j<W;j++){
    if(line.at(j) == 0){
      for(int i=0;i<H;i++){
        data.erase(data.at(i).at(j));
      }
    }
  }
  
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cout << data.at(i).at(j) <<endl;
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:19: error: no matching function for call to 'std::vector<std::vector<char> >::erase(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   48 |         data.erase(data.at(i).at(j));
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; iterator = std::vector<std::vector<char> >::iterator; const_iterator = std::vector<std::vector<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::vector<std::vector<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; iterator = std::vector<std::vector<char> >::iterator; const_iterator = std::vector<std::vector<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  
  vector<vector<char>> data(H,vector<char>(W));
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cin >> data.at(i).at(j);
    }
  }
  
  vector<int> row(0);
  for(int i=0;i<H;i++){
    int r=0;
    for(int j=0;j<W;j++){
      if(data.at(i).at(j) == '#'){
        r++;
      }
    }
    row.push_back(r);
  }
  
  vector<int> line(0);
  for(int j=0;i<W;j++){
    
    int r=0;
    
    for(int i=0;i<H;i++){
      if(data.at(i).at(j) == '#'){
        r++;
      }
    }
    line.push_back(r);
  }
  
  for(int i=0;i<H;i++){
    if(row.at(i) == 0){
      data.at(i).clear();
    }
  }
  
  for(int j=0;j<W;j++){
    if(line.at(j) == 0){
      for(int i=0;i<H;i++){
        data.at(i).at(j) = '';
      }
    }
  }
  
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cout << data.at(i).at(j) <<endl;
    }
  }
  
}

Compiler output:
a.cc:48:28: error: empty character constant
   48 |         data.at(i).at(j) = '';
      |                            ^~
a.cc: In function 'int main()':
a.cc:27:15: error: 'i' was not declared in this scope
   27 |   for(int j=0;i<W;j++){
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int h,w;
  cin>>h,w;
 cin>>vector<vector<string>>vec(h,;vector<string>(w));
for (int i=0;i<h;i++)  {
  for(int j=0;j<w;j++){
   if (vec.at(i).at(j)!=vec.at(i).at(j+1)&&j<w-1{
     break;}
       else{ continue;}
       }
       }
       
 for (int i=0;i<h;i++)  {
  for(int j=0;j<w;j++){
   if (vec.at(i).at(j)!=vec.at(i+1).at(j)&&i<h-1{
     break;}
       else{ continue;}
       }
       }        
       cout<<endl;}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: expected primary-expression before 'vec'
    6 |  cin>>vector<vector<string>>vec(h,;vector<string>(w));
      |                             ^~~
a.cc:6:53: error: expected ';' before ')' token
    6 |  cin>>vector<vector<string>>vec(h,;vector<string>(w));
      |                                                     ^
      |                                                     ;
a.cc:9:8: error: 'vec' was not declared in this scope
    9 |    if (vec.at(i).at(j)!=vec.at(i).at(j+1)&&j<w-1{
      |        ^~~
a.cc:9:49: error: expected ')' before '{' token
    9 |    if (vec.at(i).at(j)!=vec.at(i).at(j+1)&&j<w-1{
      |       ~                                         ^
      |                                                 )
a.cc:12:8: error: expected primary-expression before '}' token
   12 |        }
      |        ^
a.cc:17:8: error: 'vec' was not declared in this scope
   17 |    if (vec.at(i).at(j)!=vec.at(i+1).at(j)&&i<h-1{
      |        ^~~
a.cc:17:49: error: expected ')' before '{' token
   17 |    if (vec.at(i).at(j)!=vec.at(i+1).at(j)&&i<h-1{
      |       ~                                         ^
      |                                                 )
a.cc:20:8: error: expected primary-expression before '}' token
   20 |        }
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int h, w;
  cin >> h >> w;
  vector<vector<char>> table(h,vector<char>(w));
    for (int i = 0; i < h; i++) 
    {for(int j=0;j<w;j++){
    cin>>table.at(i).at(j);}
  }
   vector<int> allWhiteRows;
  vector<int> allWhiteCols;
  for(int i=0; i<h; i++){
    bool all = true;
    for(int j=0; j<w; j++){
      if(map.at(i).at(j) == '#'){
        all = false;
      }
    }
    if(all){
      allWhiteRows.push_back(i);
    }
  }
 
  for(int i=0; i<w; i++){
    bool all = true;
    for(int j=0; j<h; j++){
      if(map.at(j).at(i) == '#'){
        all = false;
      }
    }
    if(all){
      allWhiteCols.push_back(i);
    }
  }
  
  for(int i=0; i<h; i++){
    bool flag = false;
    for(int j=0; j<w; j++){
      if(
        find(allWhiteRows.begin(), allWhiteRows.end(),i) == allWhiteRows.end()
        && find(allWhiteCols.begin(), allWhiteCols.end(),j) == allWhiteCols.end()
        ) {
        cout << map.at(i).at(j);
        flag = true;
      }
    }
    if(flag){
      cout << endl;
    }
    
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected unqualified-id before '.' token
   17 |       if(map.at(i).at(j) == '#'){
      |             ^
a.cc:29:13: error: expected unqualified-id before '.' token
   29 |       if(map.at(j).at(i) == '#'){
      |             ^
a.cc:45:20: error: missing template arguments before '.' token
   45 |         cout << map.at(i).at(j);
      |                    ^
Language: C

#include <stdio.h>
int main(void){
    // Your code here!
    char s[1000][1000];
    int h, w, i, j, k=0,l=0, a[1000]={1000}, b[1000]={1000};
    
    scanf("%d%d",&h,&w);
    for(i=0;i<h;i++) scanf("%s",s[i]);
    
    for(i=0;i<h;i++){
        for(j=0;j<w;j++){
            if(s[i][0]!=s[i][j]) break;
        }
        if(j==w){
            a[k]=i;
            k++;
        }
    }
    k=0;
    for(j=0;j<w;j++){
        for(i=0;i<h;i++){
            if(s[0][j]!=s[i][j]) break;
        }
        if(i==h){
            b[k]=j;
            k++;
        }
    }
    k=0;
    for(i=0;i<h;i++){
        if(i==a[k]-k){
            for(l=i;l<h;l++){
                s[l]=s[l+1];
            }
            k++;
            i--;
            h--;
        }
    }
    k=0;
    for(j=0;j<w;j++){
        if(j==b[k]-k){
            for(l=j;l<w;l++){
                for(i=0;i<h;i++) s[i][l]=s[i][l+1];
            }
            k++;
            j--;
            w--;
        }
    }
    for(i=0;i<h;i++) printf("%s\n",s[i]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:21: error: assignment to expression with array type
   33 |                 s[l]=s[l+1];
      |                     ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using ld = long double;
long double const pi = std::acos(-1.0L);


int main() {
  int h, w;
  cin >> h >> w;
  vector<string> a(h);
  rep(i,h) cin >> a[i];
  vector<bool> row(h,false);
  vector<bool> col(w,false);
  rep(i,h){
    rep(j,w){
      if(a[i][j]=="#"){
        row[i]=true;
        col[j]=true;
      }
    }
  }
  rep(i,h){
    if(row[i]){
      rep(j,w){
        if(col[j]){
          cout << a[i][j];
        }
      }
      cout << endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(a[i][j]=="#"){
Language: C++

//Jai Bhole Ki
#include <bits/stdc++.h>
using namespace std;
#define fast static int fastline = []() { std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; }();
#define ll long long
#define LL unsigned ll
#define pb push_back
#define pi pair<ll,ll>
#define debug(x) cout<<x<<"\n";
#define debug cout<<"debugged\n";
#define minval -2e9
#define maxval 2e9
long double PI =3.14159265358979323846;
 
const ll M=1e7+7;
const ll inf=1e18;
const ll ms=2e5+5;
fast;
void solve()
{
    ll n,m;
    cin>>n>>m;
    string s[n];
    vector<bool>r(n,0),c(m,0);
    for(int i=0;i<n;i++)
        cin>>s[i];
    for(int i=0;i<n;i++)
    {bool flag=0;
        for(int j=0;j<m;j++)
        {
            if(s[i][j]=='#')
            {
                flag=1;break;
            }
        }
        if(!flag)
            r[i]=1;
    }
    for(int i=0;i<m;i++)
    {
        bool flag=0;
        for(int j=0;j<n;j++)
        {
            if(s[j][i]=='#')

Compiler output:
a.cc:10:9: warning: "debug" redefined
   10 | #define debug cout<<"debugged\n";
      |         ^~~~~
a.cc:9:9: note: this is the location of the previous definition
    9 | #define debug(x) cout<<x<<"\n";
      |         ^~~~~
a.cc: In function 'void solve()':
a.cc:44:29: error: expected statement at end of input
   44 |             if(s[j][i]=='#')
      |                             ^
a.cc:44:29: error: expected '}' at end of input
a.cc:43:9: note: to match this '{'
   43 |         {
      |         ^
a.cc:44:29: error: expected '}' at end of input
   44 |             if(s[j][i]=='#')
      |                             ^
a.cc:40:5: note: to match this '{'
   40 |     {
      |     ^
a.cc:44:29: error: expected '}' at end of input
   44 |             if(s[j][i]=='#')
      |                             ^
a.cc:20:1: note: to match this '{'
   20 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=1LL<<61;

int main() {
  ll h,w;
  cin >> h >> w;
  vector<string> maze(h);
  for(ll i=0;i<h;i++) cin >> maze[i];
  set<ll> y,x;
  for(ll i=0;i<h;i++) {
    ll f=1;
    for(ll j=0;j<w;j++) {
      if(maze[i][j]=='#')f=0;
    }
    if(f) y.insert(i);
  }
  for(ll i=0;i<w;i++) {
    ll f=1;
    for(ll j=0;j<h;j++) {
      if(maze[j][i]=='#')f=0;
    }
    if(f) x.insert(j);
  }
  for(ll i=0;i<h;i++) {
    if(y.count(i)) continue;
    for(ll j=0;j<w;j++) {
      if(x.count(j)) continue;
      cout << maze[i][j];
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:20: error: 'j' was not declared in this scope
   29 |     if(f) x.insert(j);
      |                    ^
Language: 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++){
    for(int j=0;j<w;j++) cin>>a[i][j];
  }
  vector<bool>gyo(h);
  vector<bool>row(w);
  for(int i=0;i<h;i++) gyo[i]=false;
  for(int i=0;i<w;i++) row[i]=false;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(a[i][j]=='#') gyo[i]=true;
    }
  }
  for(int j=0;j<w;j++){
    for(int i=0;i<h;i++){
      if(s[i][j]=='#') row[j]=true;
    }
  }
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(gyo[i] && row[j]) cout<<a[i][j];
      if(j==w-1) cout<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: 's' was not declared in this scope
   22 |       if(s[i][j]=='#') row[j]=true;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
nt main() {
	int h, w;
	cin >> h >> w;
	vector<string>a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}
 
	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}
	
	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}

Compiler output:
a.cc:4:1: error: 'nt' does not name a type; did you mean 'int'?
    4 | nt main() {
      | ^~
      | int
Language: C++

#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>
#include <ctime>

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <regex>
#define REP(i,n) for(int i = 0; i < n; i++)
#define FOR(i,j,n) for(int i = j; i < n; i++)
#define RFOR(i,j,n) for(int i = j-1; i >= n; i--)
#define PREC(n) fixed << setprecision(n)
#define print_array(v) REP(__k, v.size()) { cout << v[__k]; if(__k != v.size()-1) cout << " "; else cout << endl; }
#define YesorNo(a) printf(a?"Yes\n":"No\n")
#define _LIBCPP_DEBUG 0
using namespace std;
int64_t MOD = 1000000007;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int h, w;
  cin >> h >> w;
  vector<vector<char>> masu(h,vector<char>(w));
  vector<bool> h_b(h);
  vector<bool> w_b(w);
  REP(i,h) REP(j,w) cin >> masu[i][j];
  REP(i,h) {
    bool flag = false;
    REP(j,w) {
      if(masu[i][j] == '#') flag = true;
    }
    h_b[i] = flag;
  }
  REP(j,w) {
    bool flag = false;
    REP(i,h) {
      if(masu[i][j] == '#') flag = true;
    }
    w_b[j] = flag;
  }
  REP(i,h) {
    REP(j,w) {
      if(h_b[i] && w_b[j]) cout << masu[i][j];
    }
    if(h_b[i]) rcout << endl;
  }
  return 0;
}
//templete by private_yusuke

Compiler output:
a.cc: In function 'int main()':
a.cc:87:16: error: 'rcout' was not declared in this scope
   87 |     if(h_b[i]) rcout << endl;
      |                ^~~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(){
  int h,w;
  cin>>h>>w;
  vector<string>a(h);
  for(int i=0;i<h;i++){
    cin>>a[i];
  }
  vector<bool>row(h,false);
  vector<bool>col(w,false);
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(a[i][j]=="#"){
        row[i]=true;
        col[j]=true;
      }
    }
  }
  for(int i=0;i<h;i++){
    if(row[i]){
      for(int j=0;j<w;j++){
        if(col[j]){
          cout<<a[i][j];
        }
      }
      cout<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if(a[i][j]=="#"){
Language: C++

// #include <bits/stdc++.h>
// #include <vecot>
// using namespace std;
//
// int main() {
//   int H, W;
//   cin >> H >> W;
//   vector<vector<int>> array(H, vector<int> (W));
//
//   for(int i = 0; i < H; i++){
//     for(int j = 0; j < W; j++) {
//       cin >> array[i][j];
//     }
//   }
//
//
//   for(int i = 0; i < H; i++){
//     for(int j = 0; j < W; j++) {
//       if(array[i][j] == "")
//     }
//   }

  // ここからプログラム写経　　

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

int int main() {
  int h;
  cin >> h;
  int w;
  cin >> w;
  vector<string> a(h);
  for(int i = 0; i < h; i++){
    cin >> a[i];
  }

  vector<bool> row(h, false);
  vector<bool> col(w, false);
  for(int i = 0; i  < h; i++){
    for(int j = 0; j < w; j++){
      if(a[i][j] =='#'){
        row[i] = true;
        col[j] = true;
      }
    }
  }

  for(int i =0; i <  h; i++){
    if(row[i]){
      for(int j = 0; j < w; j++){
        if(col[j]){
          cout << a[i][j];
        }
      }
      cout << endl;
    }
  }
}


Compiler output:
a.cc:30:1: error: two or more data types in declaration of 'main'
   30 | int int main() {
      | ^~~
Language: C++

// #include <bits/stdc++.h>
// #include <vecot>
// using namespace std;
//
// int main() {
//   int H, W;
//   cin >> H >> W;
//   vector<vector<int>> array(H, vector<int> (W));
//
//   for(int i = 0; i < H; i++){
//     for(int j = 0; j < W; j++) {
//       cin >> array[i][j];
//     }
//   }
//
//
//   for(int i = 0; i < H; i++){
//     for(int j = 0; j < W; j++) {
//       if(array[i][j] == "")
//     }
//   }

  // ここからプログラム写経　　

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

int main() {
  int h;
  cin >> h;
  int w;
  cin >> w;
  vector<string> a(h);
  for(i = 0; i < h; i++){
    cin >> a[i];
  }

  vector<bool> row(h, false);
  vector<bool> col(w, false);
  for(int i = 0; i  < h; i++){
    for(int j = 0; j < w; j++){
      if(a[i][j] =='#'){
        row[i] = true;
        col[j] = true;
      }
    }
  }

  for(int i =0; i <  h; i++){
    if(row[i]){
      for(int  j = 0; j < w; j++){
        if(col[j]){
          cout << a[i][j];
        }
      }
      cout << endl;
    }
  }
}


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

// #include <bits/stdc++.h>
// #include <vecot>
// using namespace std;
//
// int main() {
//   int H, W;
//   cin >> H >> W;
//   vector<vector<int>> array(H, vector<int> (W));
//
//   for(int i = 0; i < H; i++){
//     for(int j = 0; j < W; j++) {
//       cin >> array[i][j];
//     }
//   }
//
//
//   for(int i = 0; i < H; i++){
//     for(int j = 0; j < W; j++) {
//       if(array[i][j] == "")
//     }
//   }

  // ここからプログラム写経　　

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

int int main() {
  int h;
  cin >> h;
  int w;
  cin >> w;
  vector<string> a(h);
  for(i = 0; i < h; i++){
    cin >> a[i];
  }

  vector<bool> row(h, false);
  vector<bool> col(w, false);
  for(int i = 0; i  < h; i++){
    for(int j = 0; j < w; j++){
      if(a[i][j] =='#'){
        row[i] = true;
        col[j] = true;
      }
    }
  }

  for(int i =0; i <  h; i++){
    if(row[i]){
      for(int  j = 0; j < w; j++){
        if(col[j]){
          cout << a[i][j];
        }
      }
      cout << endl;
    }
  }
}


Compiler output:
a.cc:30:1: error: two or more data types in declaration of 'main'
   30 | int int main() {
      | ^~~
Language: C

#include <stdio.h>
char a[101][101];
bool white_row[101];
bool white_col[101];
int main()
{
  int H, W, h, w;
  scanf("%d %d", &H, &W);
  for (h = 1; h <= H; h++) {
    for (w = 1; w <= W; w++) {
      scanf("%c ", &a[h][w]);
    }
  }
  for (h = 1; h <= H; h++) {
    white_row[h] = true;
    for (w = 1; w <= W; w++) {
      if (a[h][w]=='#') {
        white_row[h] = false;
        break;
      }
    }
  }
  for (w = 1; w <= W; w++) {
    white_col[w] = true;
    for (h = 1; h <= H; h++) {
      if (a[h][w]=='#') {
        white_col[w] = false;
        break;
      }
    }
  }

  // output
  for (h = 1; h <= H; h++) {
    if (white_row[h]) continue;
    for (w = 1; w <= W; w++) {
      if (white_col[w]) continue;
      putchar(a[h][w];
    }
    putchar("%n");
  }
  return 0;
}


Compiler output:
main.c:3:1: error: unknown type name 'bool'
    3 | bool white_row[101];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | char a[101][101];
main.c:4:1: error: unknown type name 'bool'
    4 | bool white_col[101];
      | ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:15:20: error: 'true' undeclared (first use in this function)
   15 |     white_row[h] = true;
      |                    ^~~~
main.c:15:20: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:15:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:24: error: 'false' undeclared (first use in this function)
   18 |         white_row[h] = false;
      |                        ^~~~~
main.c:18:24: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:38:22: error: expected ')' before ';' token
   38 |       putchar(a[h][w];
      |              ~       ^
      |                      )
main.c:38:23: error: expected ';' before '}' token
   38 |       putchar(a[h][w];
      |                       ^
      |                       ;
   39 |     }
      |     ~                  
main.c:40:13: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   40 |     putchar("%n");
      |             ^~~~
      |             |
      |             char *
In file included from main.c:1:
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
Language: C++

#include<iostream> 
#include<iomanip> 
#include<vector> 
#include<map> 
#include<set> 
#include<algorithm> 
#include<numeric> 
#include<limits> 
#include<bitset> 
#include<functional> 
#include<type_traits> 
#include<queue> 
#include<stack> 
#include<array> 
#include<random> 
#include<utility> 
#include<cstdlib> 
#include<ctime>

using namespace std;


int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<char> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:33: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   37 |                         if (a[i][j] == '#') {
      |                                 ^
a.cc:48:53: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   48 |                                         cout << a[i][j];
      |                                                     ^
Language: C++

#include<iostream> 
#include<iomanip> 
#include<vector> 
#include<map> 
#include<set> 
#include<algorithm> 
#include<numeric> 
#include<limits> 
#include<bitset> 
#include<functional> 
#include<type_traits> 
#include<queue> 
#include<stack> 
#include<array> 
#include<random> 
#include<utility> 
#include<cstdlib> 
#include<ctime>

using namespace std;


int main() {
    int H,W;
    cin >> H >> W;
    bool a = false;

    vector<vector<char>> data(H,vector<char>(W,'.'));
    
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            cin >> data.at(i).at(j);
        }
    }

    for (int i = 0; i < H; j++) {
        for (int j = 0; j < W; j++) {
            if()
        }
    }

    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            cout << data.at(i).at(j);

            if (j == W - 1) {
                cout << endl;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:28: error: 'j' was not declared in this scope
   36 |     for (int i = 0; i < H; j++) {
      |                            ^
a.cc:38:16: error: expected primary-expression before ')' token
   38 |             if()
      |                ^
a.cc:39:9: error: expected primary-expression before '}' token
   39 |         }
      |         ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<bool> row(h, false);
  vector<bool> col(w, false);
  vector<string> a(h);
  for (int i = 0; i < h; i++){
      cin >> a.at(i);
  }
  
  for (int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(a.at(i).at(j) == '#'){
        row.at(i) = true;
        col.at(j) = true;
      }
    }
  }
  for(int i = 0; i < h; i++){
    if(row.at(i)){
      for(int j = 0; j < w; j++){
        if(col.at(j)){
          cout << a.at(i).at(j);
        }
      }
    cout << endl;
    }
  }
}

/*#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}


Compiler output:
a.cc:34:1: error: unterminated comment
   34 | /*#include <iostream>
      | ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<bool> row(h, false);
  vector<bool> col(w, false);
  vector<string> a(h);
  for (int i = 0; i < h; i++){
      cin >> a.at(i);
  }
  
  for (int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(a.at(i).at(j) == '#'){
        row.at(i) = true;
        col.at(j) = true;
      }
    }
  }
  for(int i = 0; i < h; i++){
    if(row.at(i)){
      for(int j = 0; j < w; j++){
        if(col.at(j)){
          cout << a.at(i).at(j);
        }
      }
    }
    cout << endl;
  }
}
      

/*#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}


Compiler output:
a.cc:35:1: error: unterminated comment
   35 | /*#include <iostream>
      | ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<bool> row(h, false);
  vector<bool> col(w, false);
  vector<string> a(h);
  for (int i = 0; i < h; i++){
      cin >> a.at(i);
  }
  
  for (int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(a.at(i).at(j) == '#'){
        row.at(i) = true;
        col.at(j) = true;
      }
    }
  }
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(row.at(i) && col.at(j)){
        cout << a.at(i).at(j);
      }
    }
    cout << endl;
  }
}
      

/*#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}


Compiler output:
a.cc:33:1: error: unterminated comment
   33 | /*#include <iostream>
      | ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<bool> row(h, false);
  vector<bool> col(w, false);
  vector<string> a(h);
  for (int i = 0; i < h; i++){
      cin >> a.at(i);
  }
  
  for (int i = 0; i < h; i++){
    for(int j = 0; i < w; j++){
      if(a.at(i).at(j) == '#'){
        row.at(i) = true;
        col.at(j) = true;
      }
    }
  }
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(row.at(i) && col.at(j)){
        cout << a.at(i).at(j);
      }
    }
    cout << endl;
  }
}
      

/*#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}


Compiler output:
a.cc:33:1: error: unterminated comment
   33 | /*#include <iostream>
      | ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<bool> row(h, false);
  vector<bool> col(w, false);
  vector<string> a(h);
  for (int i = 0; i < h; i++){
      cin >> a.at(h);
  }
  
  for (int i = 0; i < h; i++){
    for(int j = 0; i < w; j++){
      if(a.at(i).at(j) == '#'){
        row.at(i) = true;
        col.at(j) = true;
      }
    }
  }
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(row.at(i) && col.at(j)){
        cout << a.at(i).at(j);
      }
    }
    cout << endl;
  }
}
      

/*#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}


Compiler output:
a.cc:33:1: error: unterminated comment
   33 | /*#include <iostream>
      | ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<bool> row(h, false);
  vector<bool> col(w, false);
  vector<string> a(h);
  for (int i = 0; i < h; i++){
      cin >> a.at(h);
  }
  
  for (int i = 0; i < h; i++){
    for(int j = 0; i < w; j++){
      if(a.at(i).at(j) == '#'){
        row.at(i) = true;
        col.at(j) = true;
      }
    }
  }
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(row.at(i) && col.at(j)){
        cout << a.at(i).at(j);
      }
    }
    cout << endl;
  }
      

/*#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> a(h);
	for (int i = 0; i < h; i++) {
		cin >> a[i];
	}

	vector<bool> row(h, false);
	vector<bool> col(w, false);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

	for (int i = 0; i < h; i++) {
		if (row[i]) {
			for (int j = 0; j < w; j++) {
				if (col[j]) {
					cout << a[i][j];
				}
			}
			cout << endl;
		}
	}
}


Compiler output:
a.cc:32:1: error: unterminated comment
   32 | /*#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:29:4: error: expected '}' at end of input
   29 |   }
      |    ^
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<vector<char>> data(H, vector<char>(W));
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> data.at(i).at(j);
    }
  }
  
  for (int i = 0; i < H; i++) {
    int white = 0; int black = 0;
    for (int j = 0; j < W; j++) {
      if (data.at(i).at(j) == '.') {
        white++;
      }
      else {
        black++;
      }
      
      if (white != 0 && black != 0) {
        break;
      }
    }
    
    if (white == W || black == W) {
      data.at(i).pop_back();
    }
  }
  
  for (int i = 0; i < W; i++) {
    int white = 0; int black = 0;
    for (int j = 0; j < H; j++) {
      if (data.at(j).at(i) == '.') {
        white++;
      }
      else {
        black++;
      }
      
      if (white != 0 && black != 0) {
        break;
      }
    }
    
    if (white == H || black == H) {
      for (int j = 0; j < H; j++) {
        data.at(j).at(i).pop_back();
      }
    }
  }
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cout << data.at(i).at(j);
      if (j == W - 1) {
        cout << endl;
      }
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:26: error: request for member 'pop_back' in '(& data.std::vector<std::vector<char> >::at(((std::vector<std::vector<char> >::size_type)j)))->std::vector<char>::at(((std::vector<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   52 |         data.at(j).at(i).pop_back();
      |                          ^~~~~~~~
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  
  vector<vector<char>> data(H, vector<char>(W));
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> data.at(i).at(j);
    }
  }
  
  for (int i = 0; i < H; i++) {
    int white = 0; int black = 0;
    for (int j = 0; j < W; j++) {
      if (data.at(i).at(j) == '.') {
        white++;
      }
      else {
        black++;
      }
      
      if (white != 0 && black != 0) {
        break;
      }
    }
    
    if (white == W || black == W) {
      data.at(i).pop_back();
    }
  }
  
  for (int i = 0; i < W; i++) {
    int white = 0; int black = 0;
    for (int j = 0; j < H; j++) {
      if (data.at(j).at(i) == '.') {
        white++;
      }
      else {
        black++;
      }
      
      if (white != 0 && black != 0) {
        break;
      }
    }
    
    if (white == H || black == H) {
      for (int j = 0; j < H; j++) {
        data.at(j).at(i).push_back();
      }
    }
  }
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cout << data.at(i).at(j);
      if (j == W - 1) {
        cout << endl;
      }
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:26: error: request for member 'push_back' in '(& data.std::vector<std::vector<char> >::at(((std::vector<std::vector<char> >::size_type)j)))->std::vector<char>::at(((std::vector<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   52 |         data.at(j).at(i).push_back();
      |                          ^~~~~~~~~
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<char>> data(H, vector<char>(W));
  for (int row = 0; row < H; row++) {
    for (int column = 0; column < W; column++) {
      cin >> data.at(row).at(column);
    }
  }
  int press = 0;
  for (int column = 0; column < W; column++) {
    for int row = 0; row < H; row++) {
      if (data.at(row).at(column) == '#') {
        break;
      }
      else if (row == H - 1) {
        press++;
      }
    }
  }
  int i = 0;
  vector<vector<char>> pressed(H, vector<char>(W - press));
  for (int column = 0; column < W; column++) {
    bool check = false;
    for (int row = 0; row < H; row++) {
      if (data.at(row).at(column) == '#') {
        check = true;
        break;
      }
    }
    if (check) {
      for (int row = 0; row < H; row++) {
        pressed.at(row).at(i) = data.at(row).at(column);
      }
      i++;
    }
  }
  for (int row = 0; row < H; row++) {
    bool check = false;
    for (int column = 0; column < W - press; column++) {
      if (pressed.at(row).at(column) == '#') {
        check = true;
        break;
      }
    }
    if (check) {
      for (int column = 0; column < W - press; column++) {
        cout << pressed.at(row).at(column);
      }
      cout << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected '(' before 'int'
   15 |     for int row = 0; row < H; row++) {
      |         ^~~
      |         (
Language: C++

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

int main() {
    int H, W;
    cin >> H >> W;
    vector <string> a(H);
    vector <bool> del(W);
    int rm=0;
    for (int i=0; i<H; i++) cin >> a.at(i);
    for (int i=0; i<W; i++) del.at(i)=false;
    for (int j=0; j<W; j++) {
        bool remcol=true;
        for (int i=0; i<H; i++) {
            if (a.at(i).at(j)!='.') {
                remcol = false;
                break;
            }
        }
        if (remcol) {
            del.at(j)=true;
            rm++;
        }
    }
    for (int j=W-1; j>=0; j--) {
        if (del.at(j)) {
            for (int i=0; i<H; i++) a.at(i).erase(a.at(i).begin()+j);
        }
    }
    for (int i=0; i<H; i++) {
        for (int j=0; j<W-rm; j++) {
            if (a.at(i).at(j)!='.') {
                cout << a.at(i) + "\n";
                break;
            }
        }
    }

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

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

int main() {
  int x,y;
  cin >> x >>y;
  
  vector<bool> x1(x,false);
  vector<bool> y1(y,false);
  
  vector<vector<char>> v(x,vector<char>(y));
  
  for(int i=0; i<x; i++){
    for(int j=0; j<y; j++){
      cin >> v.at(i).at(j);
    }
  }
  
  for(int i=0; i<x;i++){
    for(int j=0; j<y;j++){
      if(!(v.at(i).at(j)=='.'))
        break;
      if(j==y-1)
        x1.at(i)=true;
    }
  }
  
  for(int i=0; i<y;i++){
    for(int j=0;j<x; j++){
      if(!(v.at(j).at(i)=='.'))
        break;
      if(j==x-1)
        v1.at(i)=true;
    }
  }
  
  for(int i=0;i<x;i++){
    for(int j=0;j<y;j++){
      if( !( x1.at(i) || v1.at(j) ) )
        cout <<x.at(i).at(j);
    }
    cout << endl;
  }

  // ここにプログラムを追記
  // (ここで"試合結果の表"の2次元配列を宣言)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
   33 |         v1.at(i)=true;
      |         ^~
      |         __pstl::execution::v1
In file included from /usr/include/c++/14/pstl/glue_algorithm_defs.h:15,
                 from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/execution_defs.h:19:18: note: '__pstl::execution::v1' declared here
   19 | inline namespace v1
      |                  ^~
a.cc:39:26: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
   39 |       if( !( x1.at(i) || v1.at(j) ) )
      |                          ^~
      |                          __pstl::execution::v1
/usr/include/c++/14/pstl/execution_defs.h:19:18: note: '__pstl::execution::v1' declared here
   19 | inline namespace v1
      |                  ^~
a.cc:40:18: error: request for member 'at' in 'x', which is of non-class type 'int'
   40 |         cout <<x.at(i).at(j);
      |                  ^~
Language: C++

a,b = list(map(int,input().split()))
A = []
list = [["" for i in range(b)] for j in range(a)]
for i in range(a):
    n = input()
    if n.count(".") == b:
       pass 
    else:
        for j in range(b):
            list[i][j] = n[j]
for i in range(b):
    for j in range(a):
        A.append(list[j][i])
    if len(A) == A.count(".")+A.count(""):
        for k in range(a):
            list[k][i] = ""
    A = []
for i in range(a):
    for j in range(b):
        if list[i][j] != "":
            print(list[i][j],end="")
            AAA = 1
    if AAA == 1:
        print()
    AAA = 0

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b = list(map(int,input().split()))
      | ^
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  //二次元配列の宣言
  int M = max(H, W);
  vector<vector<char>> data(M, vector<char>(M, '.'));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data.at(i).at(j);
    }
  }
  //圧縮した回数
  int countH = 0;//行の圧縮
  int countW = 0;//列の圧縮

  //行の圧縮
  for(int i = 0; i < H; i++){
    bool x = false;
    for(int j = 0; j < H; j++){
      if(data.at(i).at(j) == '#'){
        break;
      }
      if(j = H-1){
        x = true;
      }
    }
    
    if(x){
      for(int k = i; k < M-1; k++){
        data.at(k) = data.at(k+1);
      }
      i--;
      countH++;
    }
  }
  
  //列と行の入れ替え
  for(int i = 0; i < M; i++){
    for(int j = i+1; j < M; j++){
      swap(data.at(i).at(j),data.at(j).at(i)));
    }
  }
  
  //列の圧縮
  for(int i = 0; i < H; i++){
    bool x = false;
    for(int j = 0; j < H; j++){
      if(data.at(i).at(j) == '#'){
        break;
      }
      if(j = H-1){
        x = true;
      }
    }
    
    if(x){
      for(int k = i; k < M-1; k++){
        data.at(k) = data.at(k+1);
      }
      i--;
      countW++;
    }
  }
  
  //出力
  for(int i = 0; i < H - countH; i++){
    for(int j = 0; j < W - countW; j++){
      cout << data.at(i).at(j);
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:46: error: expected ';' before ')' token
   43 |       swap(data.at(i).at(j),data.at(j).at(i)));
      |                                              ^
      |                                              ;
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  //二次元配列の宣言
  int M = max(H, W);
  vector<vector<char>> data(M, vector<char>(M, '.'));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data.at(i).at(j);
    }
  }
  //圧縮した回数
  int countH = 0;//行の圧縮
  int countW = 0;//列の圧縮

  //行の圧縮
  for(int i = 0; i < H; i++){
    bool x = false;
    for(int j = 0; j < H; j++){
      if(data.at(i).at(j) == '#'){
        break;
      }
      if(j = H-1){
        x = true;
      }
    }
    
    if(x){
      for(int k = i; k < M-1; k++){
        data.at(k) = data.at(k+1);
      }
      i--;
      countH++;
    }
  }
  
  //列と行の入れ替え
  for(int i = 0; i < M; i++){
    for(int j = i+1; j < M; j++){
      swap(data.at(i).at(j),data.at(j).at(i)));
    }
  }
  
  //列の圧縮
  for(int i = 0; i < H; i++){
    bool x = false;
    for(int j = 0; j < H; j++){
      if(data2.at(i).at(j) == '#'){
        break;
      }
      if(j = H-1){
        x = true;
      }
    }
    
    if(x){
      for(int k = i; k < M-1; k++){
        data2.at(k) = data.at(k+1);
      }
      i--;
      countW++;
    }
  }
  
  //出力
  for(int i = 0; i < H - countH; i++){
    for(int j = 0; j < W - countW; j++){
      cout << data2.at(i).at(j);
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:46: error: expected ';' before ')' token
   43 |       swap(data.at(i).at(j),data.at(j).at(i)));
      |                                              ^
      |                                              ;
a.cc:51:10: error: 'data2' was not declared in this scope; did you mean 'data'?
   51 |       if(data2.at(i).at(j) == '#'){
      |          ^~~~~
      |          data
a.cc:61:9: error: 'data2' was not declared in this scope; did you mean 'data'?
   61 |         data2.at(k) = data.at(k+1);
      |         ^~~~~
      |         data
a.cc:71:15: error: 'data2' was not declared in this scope; did you mean 'data'?
   71 |       cout << data2.at(i).at(j);
      |               ^~~~~
      |               data
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int h,w;
  cin>>h>>w;
  
  string board[110];
  
  for(int i=0;i<h;i++)
  {
       cin>>board[i];
  }
 
 bool goodx[h];
 bool goody[w];
  
  for(int i=0;i<h;i++)
    goodx=false;
    
  for(int i=0;i<w;i++)
     goody=false;
  
  for(int i=0;i<h;i++)
  {
      for(int j=0;j<w;j++)
      {
          if(board[i][j]=='#')
          {
               goodx[i]=true;
               goody[j]=true;
          }
      }      
  }
  
  
  
  for(int i=0;i<h;i++)
  {
     if(goodx[i])
     {
      for(int j=0;j<w;j++)
      {
        if(goody[j])
        {
          cout<<board[i][j];
        }
       }  
     }
        cout<<endl;
      
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: incompatible types in assignment of 'bool' to 'bool [h]'
   20 |     goodx=false;
      |     ~~~~~^~~~~~
a.cc:23:11: error: incompatible types in assignment of 'bool' to 'bool [w]'
   23 |      goody=false;
      |      ~~~~~^~~~~~