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

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int h,w;cin>>h>>w;
  set<pair<int, int>> moved;
  rep(y, h){
    string s;cin>>s;
    rep(x,w){
      if(s[x]=='#')moved.insert(make_pair(y,x));
    }
  }

  bool f=true;
  rep(y, h){
    rep(x,w){
      bool d_r = !(moved.count(make_pair(y+1, x)) ^ moved.count(make_pair(y, x+1)));
      bool u_l = !(moved.count(make_pair(y-1, x)) ^ moved.count(make_pair(y, x-1)));

      if( (y==0 && x==0 && d_r) || (y==h-1 && x==w-1 && u_l) ){
        f=false;break;
      }else if( moved.count(make_pair(y,x)) && (u_l || d_r) ) ){
//cout<<y<<' '<<x<<endl;
        f=false;break;
      }
    }
  }

  if(f) cout<<"Possible";
  else cout<<"Impossible";

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:63: error: expected primary-expression before ')' token
   26 |       }else if( moved.count(make_pair(y,x)) && (u_l || d_r) ) ){
      |                                                               ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define NIL -1
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x)  (int)x.size()
#define SP(x)  setprecision((int)x)


using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;} //最小公倍数

//-------------------------------------------------
//コピペするとこ



//-------------------------------------------------


int main()
{
  int h, w ;
  cin >> h >> w ;
  vector<string> s(h) ;
  REP(i,h){
    cin >> s.at(i) ;
  }
  
  if(s.at(0).st(0)=='.' || s.at(h-1).st(w-1)=='.'){
    cout <<"Impossible"<<endl ;
    return 0 ;
  }
  
  int i=0 ;
  int j=0 ;
  while(true){
    if(s.at(i+1).at(j)=='.'&&s.at(i).at(j+1)=='#'){
      i++ ;
    }
    else if(s.at(i).at(j+1)=='.'&&s.at(i+1).at(j)=='#'){
      j++ ;
    }
    if(i==h-1 &&j==w-1){
      cout <<"Possible"<<endl ;
      return 0 ;
    }
    if(i==h || j==w){
      cout <<"Impossible"<<endl ;
      return 0 ;
    }
  }
      
  return 0 ;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:46:14: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'st'; did you mean 'at'?
   46 |   if(s.at(0).st(0)=='.' || s.at(h-1).st(w-1)=='.'){
      |              ^~
      |              at
a.cc:46:38: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'st'; did you mean 'at'?
   46 |   if(s.at(0).st(0)=='.' || s.at(h-1).st(w-1)=='.'){
      |                                      ^~
      |                                      at
Language: C++

#include <bits/stdc++.h>

#define REP(i, n) for(int i = 0; i < (int)n; ++i)

using namespace std;

int H, W;

bool dfs(int x, int y, vector<vector<int>> v) {
    if (x == W - 1 && y == H - 1) return true;
    if (x == W - 1) {
        if (v[y + 1][x] == 1) return dfs(x, y + 1, v);
        else return false;
    }
    if (y == H - 1) {
        if (v[y][x + 1] == 1) return dfs(x + 1, y, v);
        else return false;
    }
    if ((v[y][x + 1] == 1 && v[y + 1][x] == 1) || (v[y][x + 1] == 0 && v[y + 1][x] == 0) return false;
    if (v[y][x + 1] == 1) return dfs(x + 1, y, v);
    else return dfs(x, y + 1, v);
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> H >> W;
    vector<int> _v(W);
    vector<vector<int>> v(H, _v);
    REP(i, H) {
        string A;
        cin >> A;
        REP(j, W) {
            if (A[j] == '#') v[i][j] = 1;
            else v[i][j] = 0;
        }
    }
    if (!dfs(0, 0, v)) cout << "Impossible" << '\n';
    else cout << "Possible" << '\n';
}

Compiler output:
a.cc: In function 'bool dfs(int, int, std::vector<std::vector<int> >)':
a.cc:19:89: error: expected ';' before 'return'
   19 |     if ((v[y][x + 1] == 1 && v[y + 1][x] == 1) || (v[y][x + 1] == 0 && v[y + 1][x] == 0) return false;
      |                                                                                         ^~~~~~~
      |                                                                                         ;
a.cc:20:5: error: expected primary-expression before 'if'
   20 |     if (v[y][x + 1] == 1) return dfs(x + 1, y, v);
      |     ^~
a.cc:19:103: error: expected ')' before 'if'
   19 |     if ((v[y][x + 1] == 1 && v[y + 1][x] == 1) || (v[y][x + 1] == 0 && v[y + 1][x] == 0) return false;
      |        ~                                                                                              ^
      |                                                                                                       )
   20 |     if (v[y][x + 1] == 1) return dfs(x + 1, y, v);
      |     ~~                                                                                                 
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
Language: C++

#include "cstdio"
int i,j,n,m,ss,sss;
int main(){
	scanf("%d%d",&n,&m);
	for(i=1;i<=n;i++){
		getchar();
		for(j=1;j<=m;j++){
			char c=getchar();
			if(c=='#')ss++;
		}
	}
	if(ss!=n+m-1)printf("Impossible\n");
	else printf("Possible\n");
	returnn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'returnn' was not declared in this scope
   14 |         returnn 0;
      |         ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void act(int x,int y){
    if(x==m-1&&y==n-1){
        for(int i=0;i<m;++i)for(int j=0;j<n;++j){
            if(a[i][j])return;
        }
        flag=1;
        return;
    }
    if(flag==1)return;
    if(a[x+1][y]){
        a[x+1][y]=0;
        act(x+1,y);
        a[x+1][y]=1;
    }
    if(a[x][y+1]){
        a[x][y+1]=0;
        act(x,y+1);
        a[x][y+1]=1;
    }
    if(!a[x][y+1]&&!a[x+1][y])return;
}
int main(){
    scanf("%d%d",&m,&n);
    for(int i=0;i<=m;++i){
        gets(kk);
        for(int j=0;j<n;++j)
        if(kk[j]=='#')a[i-1][j]=1;
    }
    if(a[0][0]){
        a[0][0]=0;
        act(0,0);
    }
    if(flag)cout<<"Possible"<<endl;
    else cout<<"Impossible"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   29 |         gets(kk);
      |         ^~~~
      |         getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void act(int x,int y){
    if(x==m-1&&y==n-1){
        for(int i=0;i<m;++i)for(int j=0;j<n;++j){
            if(a[i][j])return;
        }
        flag=1;
        return;
    }
    if(flag==1)return;
    if(a[x+1][y]){
        a[x+1][y]=0;
        dfs(x+1,y);
        a[x+1][y]=1;
    }
    if(a[x][y+1]){
        a[x][y+1]=0;
        dfs(x,y+1);
        a[x][y+1]=1;
    }
    if(!a[x][y+1]&&!a[x+1][y])return;
}
int main(){
    scanf("%d%d",&m,&n);
    for(int i=0;i<=m;++i){
        gets(kk);
        for(int j=0;j<n;++j)
        if(kk[j]=='#')a[i-1][j]=1;
    }
    if(a[0][0]){
        a[0][0]=0;
        act(0,0);
    }
    if(flag)cout<<"Possible"<<endl;
    else cout<<"Impossible"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'void act(int, int)':
a.cc:16:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   16 |         dfs(x+1,y);
      |         ^~~
      |         ffs
a.cc:21:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   21 |         dfs(x,y+1);
      |         ^~~
      |         ffs
a.cc: In function 'int main()':
a.cc:29:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   29 |         gets(kk);
      |         ^~~~
      |         getw
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define pb push_back
#define eb emplace_back
using ll=long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 50;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

using namespace std;



void solve(){
    int h,w;
    cin>>h>>w;
    rep(i,h)rep(j,w){
        char c;
        cin>>c;
        if(c=='#')++cnt;
    }
    if(cnt==h*w-1)cout<<"Possible\n";//最短経路分のマスしか存在しない
    else cout<<"Impossible\n";
}
 
signed main(){
	std::ios::sync_with_stdio(false);
    std::cin.tie(0);
	solve();
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:48:21: error: 'cnt' was not declared in this scope; did you mean 'int'?
   48 |         if(c=='#')++cnt;
      |                     ^~~
      |                     int
a.cc:50:8: error: 'cnt' was not declared in this scope; did you mean 'int'?
   50 |     if(cnt==h*w-1)cout<<"Possible\n";//最短経路分のマスしか存在しない
      |        ^~~
      |        int
Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <queue>
#include <tuple>
#include <map>
#include <set>
#include <sstream>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define SORT(c) sort(ALL(x))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
const int INF = 1001001001;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

__attribute__((constructor))
void initial(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
}

signed main(){
  int h,w; cin>>h>>w;
  bool visited[h][w];
  vector<string> a(h); rep(i,h) cin>>a[i], rep(j,w) visited[i][j]=false;

  queue<PII> q;
  q.push({0,0}); visited[0][0]=true;
  while(!q.empty()){
    PII p = q.front(); q.pop();
    bool c1=false, c2=false;
    visited[p.first][p.second]=true;
    if(p.first==h-1&&p.second==w-1) return cout<<"Possible"<<endl,0;
    if(p.first+1<h&&p.second<w){
      if(a[p.first+1][p.second]=='#') q.push({p.first+1,p.second}), c1=true;
    }
    if(p.first<h&&p.second+1<w){
      if(a[p.first][p.second+1]=='#') q.push({p.first,p.second+1}), c2=true;
    }
    if(p.first-1>=0){
      if(!visited[p.first-1][p.second]&&a[p.first-1][p.second]=='#') break;
    }
    if(p.second-1>=0){
      if(!visited[p.first][p.second-1]&&a[p.first][p.second-1]=='#') break;
    }
    if(c1==c2) break;
  }
  cout<<"Impossible"<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected primary-expression before 'for'
   19 | #define rep(i,n) for(int i=0; i<(int)(n); i++)
      |                  ^~~
a.cc:54:44: note: in expansion of macro 'rep'
   54 |   vector<string> a(h); rep(i,h) cin>>a[i], rep(j,w) visited[i][j]=false;
      |                                            ^~~
a.cc:54:48: error: 'j' was not declared in this scope
   54 |   vector<string> a(h); rep(i,h) cin>>a[i], rep(j,w) visited[i][j]=false;
      |                                                ^
a.cc:19:31: note: in definition of macro 'rep'
   19 | #define rep(i,n) for(int i=0; i<(int)(n); i++)
      |                               ^
Language: C++

#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <queue>
using namespace std;
vector<vector<int>> vec;
int h,w;

int main(){
    cin >> h >> w ;
    vec.resize(h,vector<int>(w));
    for(int i=0;i<h;i++){
        string s;
        cin >> s;
        for(int j=0;j<w;j++){
            vec[i][j]=s[j];
        }
    }
    queue<pair<int,int>> q;
    vector<vector<int>> reg(h,vector<int>(w));
    q.push(pair<int,int>(0,0));
    reg[0][0]=0;
    bool h1=true;
    while(!q.empty()){
        int y=q.front().first;
        int x=q.front().second;
        q.pop();
        bool h2=false;
        vec[y][x]='?';
        if(y+1<h){
            if(vec[y+1][x]=='#'){
                q.push(pair<int,int>(y+1,x));
                reg[y+1][x]=reg[y][x]+1;
                h2=true;
            }
        }
        if(x+1<w){
            if(vec[y][x+1]=='#'){
                q.push(pair<int,int>(y,x+1));
                reg[y][x+1]=reg[y][x]+1;
                if(h2){
                    h1=false;
                    break;
                }
            }
        }
    }
    if(vec[h-1][w-1]=='#'||ref[h-1][w-1]!=h+w-2){
        cout<<"Impossible"<<endl;
    }else{
        cout<<"Possible"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:31: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   50 |     if(vec[h-1][w-1]=='#'||ref[h-1][w-1]!=h+w-2){
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>

/////////////////////////////////////////////////////////

class XY{
public:
  ll x, y;
  XY() {x = y = 0;}
  XY(ll u, ll v) {x = u; y = v;}
};

template<typename T1, typename T2>
void chmin(T1 &a, T2 b) {if(a > b) a = b;}
template<typename T1, typename T2>
void chmax(T1 &a, T2 b) {if(a < b) a = b;}

template<typename T1, typename T2>
ll mypow(T1 a, T2 n){
  if(n == 0) return 1;
  if(n == 1) return a;
  if(n % 2) return a * mypow(a, n - 1);
  ll tmp = mypow(a, n / 2);
  return tmp * tmp;
}

template<typename T>
int BS(vector<T> V, int left, int right, T key){
  int mid = (left + right) / 2;
  if(V[mid] <= key) left = mid;
  else right = mid;
  if(right - mid == 1) return left;
  else return BS(V, left, right, key);
}

ll comb(ll n, ll r){
	ll res = 1;
  rep(i, 0, r){
    res *= n - i;
    res /= i + 1;
  }
  return res;
}

/////////////////////////////////////////////////////////

int DFS(vector<vector<char>> &A, int h, int w){
  if(h == A.size() - 1 && w == A[0].size() - 1) return 1;
  int res = 0;
  if(h < A.size() - 1) if(A[h + 1][w] == '#') if(DFS(A, h + 1, w)) res = 1;
  if(w < A[0].size() - 1) if(A[h][w + 1] == '#') if(DFS(A, h, w + 1)) res = 1;
  return res;
}

void Main() {
  int H, W; cin >> H >> W;
  vector<vector<char>> A(H, vector<char>(W));
  int cnt = 0;
  rep(i, 0, H) rep(j, 0, W) {
    cin >> A[i][j];
    if(A[i][j] == '#') cnt++;
  }
  string res;
  int cnt = 0;
  if(cnt == H + W - 1 && DFS(A, 0, 0)) res = "Possible";
  else res = "Impossible";
  cout << res << endl;
}

/////////////////////////////////////////////////////////

int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << std::fixed << std::setprecision(15);

  Main();
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:71:7: error: redeclaration of 'int cnt'
   71 |   int cnt = 0;
      |       ^~~
a.cc:65:7: note: 'int cnt' previously declared here
   65 |   int cnt = 0;
      |       ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>

/////////////////////////////////////////////////////////

class XY{
public:
  ll x, y;
  XY() {x = y = 0;}
  XY(ll u, ll v) {x = u; y = v;}
};

template<typename T1, typename T2>
void chmin(T1 &a, T2 b) {if(a > b) a = b;}
template<typename T1, typename T2>
void chmax(T1 &a, T2 b) {if(a < b) a = b;}

template<typename T1, typename T2>
ll mypow(T1 a, T2 n){
  if(n == 0) return 1;
  if(n == 1) return a;
  if(n % 2) return a * mypow(a, n - 1);
  ll tmp = mypow(a, n / 2);
  return tmp * tmp;
}

template<typename T>
int BS(vector<T> V, int left, int right, T key){
  int mid = (left + right) / 2;
  if(V[mid] <= key) left = mid;
  else right = mid;
  if(right - mid == 1) return left;
  else return BS(V, left, right, key);
}

ll comb(ll n, ll r){
	ll res = 1;
  rep(i, 0, r){
    res *= n - i;
    res /= i + 1;
  }
  return res;
}

/////////////////////////////////////////////////////////

int DFS(vector<vector<char>> &A, int h, int w){
  if(h == A.size() - 1 && w == A[0].size() - 1) return 1;
  int res = 0;
  if(h < A.size() - 1) if(A[h + 1][w] == '#') if(DFS(A, h + 1, w)) res = 1;
  if(w < A[0].size() - 1) if(A[h][w + 1] == '#') if(DFS(A, h, w + 1)) res = 1;
  return res;
}

void Main() {
  int H, W; cin >> H >> W;
  vector<vector<char>> A(H, vector<char>(W));
  int cnt = 0;
  rep(i, 0, H) rep(j, 0, W) {
    cin >> A[i][j];
    if(A[i][j] == '#' cnt++;)
  }
  string res;
  int cnt = 0;
  if(cnt == H + W - 1 && DFS(A, 0, 0)) res = "Possible";
  else res = "Impossible";
  cout << res << endl;
}

/////////////////////////////////////////////////////////

int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << std::fixed << std::setprecision(15);

  Main();
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:68:22: error: expected ';' before 'cnt'
   68 |     if(A[i][j] == '#' cnt++;)
      |                      ^~~~
      |                      ;
a.cc:68:29: error: expected primary-expression before ')' token
   68 |     if(A[i][j] == '#' cnt++;)
      |                             ^
a.cc:69:3: error: expected primary-expression before '}' token
   69 |   }
      |   ^
a.cc:71:7: error: redeclaration of 'int cnt'
   71 |   int cnt = 0;
      |       ^~~
a.cc:65:7: note: 'int cnt' previously declared here
   65 |   int cnt = 0;
      |       ^~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main(){
    int H,W,sharp=0;
    cin >> H >> W;
    vector<string> A(H);
    for(int i=0;i<H;i++){
        cin >> A[i];
    }
 
    for(int i=0;i<H-1;i++){
        for(int j=0;j<W-1;j++){
            if(A[i][j]=='#'){
                    sharp++;
                }
            }
        }
    }
 
    if(sharp == H+W-1){
        cout << "Possible" << endl;
    }else{
        cout << "Impossible" << endl;
    }
}

Compiler output:
a.cc:22:5: error: expected unqualified-id before 'if'
   22 |     if(sharp == H+W-1){
      |     ^~
a.cc:24:6: error: expected unqualified-id before 'else'
   24 |     }else{
      |      ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
    int H,W;
    bool ok = true;
    cin >> H >> W;
    vector<string> A(H);
    for(int i=0;i<H;i++){
        cin >> A[i];
    }

    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            
            if(A[i][j]=='#' && j==w-1){
                if((A[i+1][j]=='#')^(A[i][j-1]=='.')!=1){
                    ok = false;
                }
            }else if(A[i][j]=='#'){
                if((A[i+1][j]=='#')^(A[i][j+1]=='#')!=1){
                    ok = false;
                }
            }

            
        }
    }

    if(ok){
        cout << "Possible" << endl;
    }else{
        cout << "Impossible" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: 'w' was not declared in this scope
   17 |             if(A[i][j]=='#' && j==w-1){
      |                                   ^
Language: C++

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

int main() {
  int H,W;cin>>H>>W;
  int ans =0;
  for(int i=0;i<H;++i){
    string S;cin>>S;
    for (aut c:S)if(c=='#') ++ans;
  }
  if (ans==H+W-1)cout<<"Possible"<<endl;
  else cout<<"Impossible"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'aut' was not declared in this scope; did you mean 'auto'?
   10 |     for (aut c:S)if(c=='#') ++ans;
      |          ^~~
      |          auto
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
a.cc:10:35: error: expected ';' before '}' token
   10 |     for (aut c:S)if(c=='#') ++ans;
      |                                   ^
      |                                   ;
   11 |   }
      |   ~                                
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
a.cc:10:35: error: expected ')' before '}' token
   10 |     for (aut c:S)if(c=='#') ++ans;
      |         ~                         ^
      |                                   )
   11 |   }
      |   ~                                
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
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.at(i).at(j);
    }
  }
  int count=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(a.at(i).at(j)=='#'){
        count++
      }
    }
  }
  if(count==h+w-1){
    cout<<"Possible";
  }
  else{
    cout<<"Impossible";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
   16 |         count++
      |                ^
      |                ;
   17 |       }
      |       ~
Language: C++

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

const int N = 2e4 + 7;
int p[N], a[N], b[N];
int n; 

int main() {
cin >> n;
for (int i = 1; i <= n; i++){
cin >> p[i]; 
} 
for (int i = 1; i <= n; i++) {
 a[I] 
} 

}	

Compiler output:
a.cc: In function 'int main()':
a.cc:14:4: error: 'I' was not declared in this scope
   14 |  a[I]
      |    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int h,w,n=0;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.at(i).at(j);
      if(a.at(i).at(j)=='#')n++;
    }
  }
  if(n!=h+w-1)cout<<"Impossible"<<endl;
  else{
    vector<pair<int,int>>p(n);
    int s=0;
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
        if(a.at(i).at(j)=='#'){
          p.at(s).first=j;
          p.at(s).second=i;
          s++;
        }
        if(s==n-1)break;
      }
    }
    int t=0;
    for(int i=0;i<n-1;i++){
      if(p.at(i)>p.at(i+1)){
        t++;
        break;
      }
    }
    if(t>0)coutt<<"Impossible"<<endl;
    else cout<<"Possible"<<endl;
  }
}
      
         
           


Compiler output:
a.cc: In function 'int main()':
a.cc:33:12: error: 'coutt' was not declared in this scope
   33 |     if(t>0)coutt<<"Impossible"<<endl;
      |            ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = (int)1e9 + 7;
const int INF = (int)100100100;

int main() {
    //ll N; cin >> N;
    //ll N,M; cin >> N >> M;
    //string S; cin >> S;
    ll H,W; cin >> H >> W;
    ll sum=0
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            char c;
            cin >> c;
            if(c=='#')sum++;
        }    
    }
    if(sum==H+W-1)cout << "Possible";
    else cout << "impossible";
    


}

/*



 */


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

#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iomanip>
using namespace std;
long long int gcd(long long int x, long long int y){
  return y!=0 ? gcd(y, x%y) : x;
}
long long int lcm(long long int x, long long int y){
  return x*y/gcd(x, y);
}
long long int factorial(long long int x){
  return x==0 ? 1 : x*factorial(x-1);
}
int main(){
  long long i, j, h, w, ct=-1, tmp=0;
  cin >> h >>w;
  a[h][w];
  for(i=0; i<h; i++)
    for(j=0; j<w; j++)
      cin >> a[i][j];
  for(i=0; i<h; i++)
    for(j=0; j<w; j++){
      if(a[i][j]=='#'){
	if(i+j==ct+1&&(i==tmp+1||i==tmp)){
	  ct++;
	  tmp=1;
	}
	else{
	  cout << "Impossible";
	  return 0;
	}
      }
    }
  cout << "Possible";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: 'a' was not declared in this scope
   19 |   a[h][w];
      |   ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};

int main(){
  int h,w;
  cin>>h>>w;
  vector<string> a(h);
  REP(i,h){
    cin>>a[i];
  }
  int x=0,y=0;
  int dx[]={1,0,-1,0};
  int dy[]={0,1,0,-1};
  int cnt=0;
  bool flag=true;
  int nx,ny;
  while(x != h-1 || y != w-1){
    REP(i,4){
      nx = x+dx[i];
      ny=y+dy[i];
      if(nx<h && ny<w){
        if(a[nx][ny]=='.'){
          continue;
        }else{
          
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:112:2: error: expected '}' at end of input
  112 | }
      |  ^
a.cc:106:23: note: to match this '{'
  106 |       if(nx<h && ny<w){
      |                       ^
a.cc:112:2: error: expected '}' at end of input
  112 | }
      |  ^
a.cc:103:13: note: to match this '{'
  103 |     REP(i,4){
      |             ^
a.cc:112:2: error: expected '}' at end of input
  112 | }
      |  ^
a.cc:102:30: note: to match this '{'
  102 |   while(x != h-1 || y != w-1){
      |                              ^
a.cc:112:2: error: expected '}' at end of input
  112 | }
      |  ^
a.cc:89:11: note: to match this '{'
   89 | int main(){
      |           ^
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while (in.hasNextLine()) {
            input.add(in.nextLine());
        }
        in.close();
        int y = Integer.parseInt(input.get(0).split(" ")[0]);
        int x = Integer.parseInt(input.get(0).split(" ")[1]);
        int count = 0;
        for (int i = 0; i < y; i++) {
            for (int j = 0; j < x; j++) {
                if (input.get(i + 1).charAt(j) == '#') {
                    count++;
                }
            }
        }
        String str = y + x - 1 == count ? "Possible" : "Impossible";
        System.out.println(str);
    }
}

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

#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}

int main()
{
  int H, W;
  cin >> H >> W;
  vector<int> M(H, 0), m(H, 0);
  for (int i = 0; i < H; i++)
  {
    string S;
    cin >> S;
    bool flg = false;
    for (int j = 0; j < W; j++)
    {
      if (S.at(j) == '#')
      {
        if (!flg)
        {
          m.at(i) = j;
          flg = true;
        }
        else M.at(i) = j;
      }
    }
  }
  
  string ans = "Possible";
  for (int i = 1; i < N; i++)
  {
    if (M.at(i - 1) != m.at(i))
    {
      ans = "Impossible";
      break;
    }
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:23: error: 'N' was not declared in this scope
   39 |   for (int i = 1; i < N; i++)
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}

int main()
{
  int H, W;
  cin >> H >> W;
  vector<int> M(H, 0), m(H, 0);
  for (int i = 0; i < H; i++)
  {
    string S;
    cin >> S;
    bool flg = false;
    for (int j = 0; j < W; j++)
    {
      if (S.at(j) == '#')
      {
        if (!flg)
        {
          m.at(i) = j;
          flg = true;
        }
        else M.at(i) = j;
      }
    }
  }
  
  string ans = "Possible"
  for (int i = 1; i < N; i++)
  {
    if (M.at(i - 1) != m.at(i))
    {
      ans = "Impossible";
      break;
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:3: error: expected ',' or ';' before 'for'
   39 |   for (int i = 1; i < N; i++)
      |   ^~~
a.cc:39:19: error: 'i' was not declared in this scope
   39 |   for (int i = 1; i < N; i++)
      |                   ^
a.cc:39:23: error: 'N' was not declared in this scope
   39 |   for (int i = 1; i < N; i++)
      |                       ^
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<string> s(h);
  for(int i = 0; i < h; i++) {
    cin >> s[i];
  }
  int c = 0;
  for(int i = 0; i < h; i++) {
    for(int j = 0; j < w; j++) {
      if(s[i][j] == '#') c++;
    }
  }
  if(c == h + w - 1) cout << "Possible" << endl;
  else cout << "Impossible" << endl;
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: <bits/stdc++.h: No such file or directory
    1 | #include <<bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void dfs(int x,int y){
	if(x==m-1&&y==n-1){
		for(int i=0;i<m;++i)for(int j=0;j<n;++j)if(a[i][j])return;
		flag = 1;    
        return;
    }
	if(flag==1)return;
    if(a[x+1][y]){
        a[x+1][y]=0;
        dfs(x+1,y);
        a[x+1][y]=1;
    }
    if(a[x][y+1]){
        a[x][y+1]=0;
        dfs(x,y+1);
        a[x][y+1]=1;
    }
    if(!a[x][y+1]&&!a[x+1][y])return;
}
int main(){
    scanf("%d%d",&m,&n);
    for(int i=0;i<=m;++i){
        gets(kk);
        for(int j=0;j<n;++j)if(kk[j]=='#')a[i-1][j]=1;
    }
    if(a[0][0]){
        a[0][0]=0;
        dfs(0,0);
    }
    if(flag)cout<<"Possible"<<endl;
    else cout<<"Impossible"<<endl;
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   27 |         gets(kk);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void dfs(int x,int y){
    if(x == m-1 && y == n-1){
        for(int i = 0;i < m;++i)
			for(int j = 0;j < n;++j){
            	if(a[i][j]) return;
        }
        flag = 1;
        return;
    }
    if(flag == 1) return;
    if(a[x+1][y]){
        a[x+1][y] = 0;
        dfs(x+1,y);
        a[x+1][y] = 1;
    }
    if(a[x][y+1]){
        a[x][y+1] = 0;
        dfs(x,y+1);
        a[x][y+1] = 1;
	}
    if(!a[x][y+1] && !a[x+1][y]) return;
}
int main(){
    scanf("%d%d",&m,&n);
    for(int i=0;i<=m;++i){
        gets(kk);
        for(int j=0;j<n;++j)
        if(kk[j]=='#')a[i-1][j] = 1;
    }
    if(a[0][0]){
        a[0][0] = 0;
        dfs(0,0);
    }
    if(flag)cout<<"Possible"<<endl;
    else cout<<"Impossible"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   30 |         gets(kk);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;

int main() {
  int h,w; cin>>h>>w;
  char masu[h][w];
  rep(i, h){
    rep(j, w){
      cin>>masu[i][j];
    }
  }
  bool imp=false;
    rep(i, h){
    rep(j, w){
      if(masu[i][j]=='#'){
        if(i!=h-1||j!=w-1){
          if(masu[i+1][j]=="."&&masu[i][j+1]=="."){
            imp=true;}
        }
        else if(i==h-1||j!=w-1){
          if(masu[i][j+1]=="."){
            imp=true;}
        }
        else if(i!=h-1||j==w-1){
          if(masu[i+1][j]=="."){
            imp=true;}
        }  
    }
  }
     if(imp=true)
       cout<<"Impossible"<<endl;
      else
        cout<<"Possible"<<endl;
      

}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |           if(masu[i+1][j]=="."&&masu[i][j+1]=="."){
      |              ~~~~~~~~~~~~^~~~~
a.cc:20:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |           if(masu[i+1][j]=="."&&masu[i][j+1]=="."){
      |                                 ~~~~~~~~~~~~^~~~~
a.cc:24:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |           if(masu[i][j+1]=="."){
      |              ~~~~~~~~~~~~^~~~~
a.cc:28:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |           if(masu[i+1][j]=="."){
      |              ~~~~~~~~~~~~^~~~~
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;

int main() {
  int h,w cin>>h>>w;
  char masu[h][w];
  rep(i, h){
    rep(j, w){
      cin>>masu[i][j];
    }
  }
  bool imp=false;
    rep(i, h){
    rep(j, w){
      if(masu[i][j]=='#'){
        if(i!=h-1||j!=w-1){
          if(masu[i+1][j]=="."&&masu[i][j+1]=="."){
            imp=true;}
        }
        else if(i==h-1||j!=w-1){
          if(masu[i][j+1]=="."){
            imp=true;}
        }
        else if(i!=h-1||j==w-1){
          if(masu[i+1][j]=="."){
            imp=true;}
        }  
    }
  }
     if(imp=true)
       cout<<"Impossible"<<endl;
      else
        cout<<"Possible"<<endl;
      

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected initializer before 'cin'
    8 |   int h,w cin>>h>>w;
      |           ^~~
a.cc:9:16: error: 'w' was not declared in this scope
    9 |   char masu[h][w];
      |                ^
a.cc:12:12: error: 'masu' was not declared in this scope
   12 |       cin>>masu[i][j];
      |            ^~~~
a.cc:18:10: error: 'masu' was not declared in this scope
   18 |       if(masu[i][j]=='#'){
      |          ^~~~
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;

int main() {
  int h,w cin>>h>>w;
  char masu[h][w];
  rep(i, h){
    rep(j, w){
      cin>>masu[i][j]
    }
  }
  bool imp=false;
    rep(i, h){
    rep(j, w){
      if(masu[i][j]=='#'){
        if(i!=h-1||j!=w-1){
          if(masu[i+1][j]=="."&&masu[i][j+1]=="."){
            imp=true;}
        }
        else if(i==h-1||j!=w-1){
          if(masu[i][j+1]=="."){
            imp=true;}
        }
        else if(i!=h-1||j==w-1){
          if(masu[i+1][j]=="."){
            imp=true;}
        }  
    }
  }
     if(imp=true)
       cout<<"Impossible"<<endl;
      else
        cout<<"Possible"<<endl;
      

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected initializer before 'cin'
    8 |   int h,w cin>>h>>w;
      |           ^~~
a.cc:9:16: error: 'w' was not declared in this scope
    9 |   char masu[h][w];
      |                ^
a.cc:12:12: error: 'masu' was not declared in this scope
   12 |       cin>>masu[i][j]
      |            ^~~~
a.cc:18:10: error: 'masu' was not declared in this scope
   18 |       if(masu[i][j]=='#'){
      |          ^~~~
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int cnt=0,c,h,w; cin>>h>>w;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin>>c;
      if(c=='#')cnt++;
    }
  }
  cout<<(cnt=h+w-1 ? "Possible" : "Impossible")<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   12 |   cout<<(cnt=h+w-1 ? "Possible" : "Impossible")<<endl;
      |              ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                    |
      |                    const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
  int cnt=0,h,w; cin>>h>>w;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin>>c;
      if(c=='#')cnt++;
    }
  }
  cout<<(h+w-1=cnt ? "Possible" : "Impossible")<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'c' was not declared in this scope
    8 |       cin>>c;
      |            ^
a.cc:12:13: error: lvalue required as left operand of assignment
   12 |   cout<<(h+w-1=cnt ? "Possible" : "Impossible")<<endl;
      |          ~~~^~
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
 
int main() {
	int h,w;
	cin >> h >> w;
  	int count = 0;
	char A[h][w];
    rep(i,h){
      rep(j, w){
        cin >> A[i][j];
        if(map[i][j] = '#') count++;
      }
    }
    if(count == h + w - 1) cout << "Possible" << endl;
	else cout << "Impossible" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: expected unqualified-id before '[' token
   29 |         if(map[i][j] = '#') count++;
      |               ^
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
 
int main() {
	int h,w;
	cin >> h >> w;
  	int count = 0;
	vector<vector<char>> A(h, (vector<char>(w)));
    rep(i,h){
      rep(j, w){
        cin >> A[i][j];
        if(map[i][j] = '#') count++;
      }
    }
    if(count == h + w - 1) cout << "Possible" << endl;
	else cout << "Impossible" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: expected unqualified-id before '[' token
   29 |         if(map[i][j] = '#') count++;
      |               ^
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
 
int main() {
	int h,w;
	cin >> h >> w;
  	int count = 0;
	vector<vector<char>> map(h, (vector<char>(w));
    rep(i,h){
      rep(j, w){
        cin >> map[i][j];
      }
    }
	rep(i,h){
      rep(j, w){
        if(map[i][j] = '#') count++;
      }
    }
    if(count == h + w - 1) cout << "Possible" << endl;
	else cout << "Impossible" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:54: error: expected ')' before ';' token
   25 |         vector<vector<char>> map(h, (vector<char>(w));
      |                                 ~                    ^
      |                                                      )
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
 
int main() {
	int h,w;
	cin >> h >> w;
  	int count = 0;
	vector<vector<string>> map(h, (vector<string>(w));
    rep(i,h){
      rep(j, w){
        cin >> map[i][j];
      }
    }
	rep(i,h){
      rep(j, w){
        if(map[i][j] = "#") count++;
      }
    }
    if(count == h + w - 1) cout << "Possible" << endl;
	else cout << "Impossible" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:58: error: expected ')' before ';' token
   25 |         vector<vector<string>> map(h, (vector<string>(w));
      |                                   ~                      ^
      |                                                          )
a.cc:33:22: error: could not convert '(&(& map.std::vector<std::vector<std::__cxx11::basic_string<char> > >::operator[](((std::vector<std::vector<std::__cxx11::basic_string<char> > >::size_type)i)))->std::vector<std::__cxx11::basic_string<char> >::operator[](((std::vector<std::__cxx11::basic_string<char> >::size_type)j)))->std::__cxx11::basic_string<char>::operator=(((const char*)"#"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   33 |         if(map[i][j] = "#") count++;
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<60;
 
int main() {
	int h,w;
	cin >> h >> w;
  	int count = 0;
	vector<vector<string>> map(h, (vector<string>(w));
    rep(i,h){
      rep(j, w){
        cin >> map[i][j];
      }
    }
	rep(i,h){
      rep(j, w){
        if(map[i][j] = '#') count++;
      }
    }
    if(count == h + w - 1) cout << "Possible" << endl;
	else cout << "Impossible" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:58: error: expected ')' before ';' token
   25 |         vector<vector<string>> map(h, (vector<string>(w));
      |                                   ~                      ^
      |                                                          )
a.cc:33:22: error: could not convert '(&(& map.std::vector<std::vector<std::__cxx11::basic_string<char> > >::operator[](((std::vector<std::vector<std::__cxx11::basic_string<char> > >::size_type)i)))->std::vector<std::__cxx11::basic_string<char> >::operator[](((std::vector<std::__cxx11::basic_string<char> >::size_type)j)))->std::__cxx11::basic_string<char>::operator=(35)' from 'std::__cxx11::basic_string<char>' to 'bool'
   33 |         if(map[i][j] = '#') count++;