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

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <utility>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>

using namespace std;

#define REP(i,n,m) for( long long int i = (n); i < (m); i++ )
#define ll long long
#define ALL(a) (a).begin(), (a).end()
#define SORT(v) sort( ALL(v) );
#define LAST(v) v[v.size()-1]
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define pi pair<int, int>
#define MP make_pair
#define PB push_back
#define IIN(a) int a; cin >> a;
#define LIN(a) ll a; cin >> a;
#define SIN(a) string a; cin >> a;
#define EPS (1e-10)
#define INF 1000000000000LL

int MOD=1000000007;
int dx[2] = {0, 1};
int dy[2] = {1, 0};
//I ASCII code: '0' = 48; 'A' = 65; 'a' = 97

ll h, w;
char grid[w][h];


signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin >> h >> w;
    int cnt = 0;

    REP( i, 0, h ){
      REP( i, 0, w){

        cin >> grid[i][j];
        if( grid[i][j] == '#') cnt++;

      }
    }
    cout << ( ( cnt == h + w - 1 ) ? "Possible" : "Impossible") << endl;
    return 0;
}


Compiler output:
a.cc:42:14: error: size of array 'grid' is not an integral constant-expression
   42 | char grid[w][h];
      |              ^
a.cc:42:11: error: size of array 'grid' is not an integral constant-expression
   42 | char grid[w][h];
      |           ^
a.cc: In function 'int main()':
a.cc:53:24: error: 'j' was not declared in this scope
   53 |         cin >> grid[i][j];
      |                        ^
Language: C++

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

int main() {
  int h,w;
  cin>>h>>w;
  char a;
  int ans=0:;
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++){
      cin>>a;
      if(a=='#')
        ans++;
    }
  if(ans==h+w-1)
    cout<<"Possible";
  else cout<<"Impossible";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ',' or ';' before ':' token
    8 |   int ans=0:;
      |            ^
Language: C++

#include <stdio.h>
using namespace std;
int main(){
  int H,W;
  cin >> H >> W;
  char a[H][W];
  int ans=0;
  for(int i=0;i<H;i++){
	for(int j=0;j<W;j++){
		cin >> a[i][j];
      	if(a[i][j]=='#')ans++;
    }
  }
  if(ans==H+W-1)cout << "Possible" << endl;
  else cout << "Impossible" << endl;
}

  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> H >> W;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |   if(ans==H+W-1)cout << "Possible" << endl;
      |                 ^~~~
a.cc:14:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:39: error: 'endl' was not declared in this scope
   14 |   if(ans==H+W-1)cout << "Possible" << endl;
      |                                       ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:15:8: error: 'cout' was not declared in this scope
   15 |   else cout << "Impossible" << endl;
      |        ^~~~
a.cc:15:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:32: error: 'endl' was not declared in this scope
   15 |   else cout << "Impossible" << endl;
      |                                ^~~~
a.cc:15:32: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <cstring>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <cmath>
#include <queue>
#include <set>
#include <stack>

using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define repr(i, n) for(ll i = n - 1; i >= 0; i--)
#define repone(i, n) for(ll i = 1; i <= (ll)(n); i++)
#define each(i, mp) for(auto i:mp)
#define FOR(i, m, n) for(ll i = m;i < n;i++)
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const ll mod = 1000000007;
const ll inf = ll(1e9);
const ll half_inf = ll(1e5);
const ll ll_inf = ll(1e9) * ll(1e9);

ll h, w;
char a[8][8];
bool seen[8][8];

bool dfs(int i, int j) {
    seen[i][j] = true;
    if (i - 1 >= 0 && a[i - 1][j] == '#' && !seen[i - 1][j]) return false;
    if (j - 1 >= 0 && a[i][j - 1] == '#' && !seen[i][j - 1]) return false;
    if (i == h - 1 && j == w - 1) return true;

    if (i + 1 <= h - 1 && a[i + 1][j] == '#' && j + 1 < w - 1 && a[i][j + 1] == '#')
        return false;
    if (i + 1 <= h - 1 && a[i + 1][j] == '#') if (dfs(i + 1, j)) return true;
    if (j + 1 <= w - 1 && a[i][j + 1] == '#') if (dfs(i, j + 1)) return true;
    return false;
}

void solve() {
    fill(seen, seen + 8, false);
    if (dfs(0, 0)) cout << "Possible" << endl;
    else cout << "Impossible" << endl;
}

int main() {
    cin >> h >> w;
    rep(i, h) rep(j, w) cin >> a[i][j];
    solve();
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = bool (*)[8]; _Tp = bool; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = bool (*)[8]; _Tp = bool]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = bool (*)[8]; _Tp = bool]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:45:9:   required from here
   45 |     fill(seen, seen + 8, false);
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:18: error: incompatible types in assignment of 'const bool' to 'bool [8]'
  952 |         *__first = __tmp;
      |         ~~~~~~~~~^~~~~~~
Language: C++

#include<cstdio>
using namespace std;
int main(){
  int h,w,g[8][8]={},l=0,flag=1;
  char s[8][10];
  scanf("%d %d",&h,&w);
  for(int i=0;i<h;i++)
    scanf("%s",s[i]);
  g[0][0]=1;
  for(int i=0;i<h;i++)
    for(;l<w;l++){
      if(j!=w-1&&g[i][j]&&s[i][j+1]=='#'){
        g[i][j+1]=1;
      }
      else if(i!=h-1&&g[i][j]&&s[i+1][j]=='#'){
        g[i+1][j]=1;
        break;
      }
    }
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++)
      if(s[i][j]=='#'&&g[i][j]==0)
        flag=0;
  if(flag)
    printf("Possible\n");
  else
    printf("Impossible\n");
}
  

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

int main() {
    int h, w;
    cin >> h >> w;
    int sharp = 0;
    for(int i = 0; i < n; i++){
        char t;
        cin >> t;
        if(t=='#'){sharp++;}
    }
    if(sharp == h+w-1){
        cout << "Possible" << endl;
    }else{
        cout << "Impossible" << endl;
    }
    return 0;
}


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

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i = (a);i <(n);i++)
using namespace std;

int main(){
  int n,m,x=0,y=0;
  char cell[10][10];
  cin >> n >> m;
  
  rep(i,0,10){
    rep(j,0,10){
      cell[i][j] = 'X';
    }
  }
  
  rep(i,0,n){
    rep(j,0,m){
      cin >> cell[i][j];
    }
  }
  
  while(1){
    if(cell[x+1][y] == '#'){
      cell[x][y] = '.'
      x++;
    }
    else if(cell[x][y+1] == '#'){
      cell[x][y] = '.'
      y++;
    }
    else{
      break;
    }
  }
  
  rep(i,0,n){
    rep(j,0,m){
      if(cell[i][j] == '#'){
        cout << "Impossible" << endl;
        return 0;
      }
    }
  }
  
  cout << "Possible" << endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: expected ';' before 'x'
   24 |       cell[x][y] = '.'
      |                       ^
      |                       ;
   25 |       x++;
      |       ~                
a.cc:28:23: error: expected ';' before 'y'
   28 |       cell[x][y] = '.'
      |                       ^
      |                       ;
   29 |       y++;
      |       ~
Language: C++

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i = (a);i <(n);i++)
using namespace std;

int main(){
  int n,m,x=0,y=0;
  char cell　cell[10][10];
  cin >> n >> m;
  
  rep(i,0,10){
    rep(j,0,10){
      cell[i][j] = 'X';
    }
  }
  
  rep(i,0,n){
    rep(j,0,m){
      cin >> cell[i][j];
    }
  }
  
  while(1){
    if(cell[x+1][y] == '#'){
      x++;
    }
    else if(cell[x][y+1] == '#'){
      y++;
    }
    else{
      break;
    }
  }
  
  rep(i,0,n){
    rep(j,0,m){
      if(cell[i][j] == '#'){
        cout << "Impossible" << endl;
        return 0;
      }
    }
  }
  
  cout << "Possible" << endl;
  return 0;
  
}

Compiler output:
a.cc:7:8: error: extended character 　 is not valid in an identifier
    7 |   char cell　cell[10][10];
      |        ^
a.cc: In function 'int main()':
a.cc:12:7: error: 'cell' was not declared in this scope; did you mean 'ceill'?
   12 |       cell[i][j] = 'X';
      |       ^~~~
      |       ceill
a.cc:18:14: error: 'cell' was not declared in this scope; did you mean 'ceill'?
   18 |       cin >> cell[i][j];
      |              ^~~~
      |              ceill
a.cc:23:8: error: 'cell' was not declared in this scope; did you mean 'ceill'?
   23 |     if(cell[x+1][y] == '#'){
      |        ^~~~
      |        ceill
a.cc:36:10: error: 'cell' was not declared in this scope; did you mean 'ceill'?
   36 |       if(cell[i][j] == '#'){
      |          ^~~~
      |          ceill
Language: C++

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

int main(){
  int n,m,x=0,y=0;
  char cell　cell[10][10];
  cin >> n >> m;
  
  rep(i,0,10){
    rep(j,0,10){
      cell[i][j] = 'X';
    }
  }
  
  rep(i,0,n){
    rep(j,0,m){
      cin >> cell[i][j];
    }
  }
  
  while(1){
    if(cell[x+1][y] == '#'){
      x++;
    }
    else if(cell[x][y+1] == '#'){
      y++;
    }
    else{
      break;
    }
  }
  
  rep(i,0,n){
    rep(j,0,m){
      if(cell[i][j] == '#'){
        cout << "Impossible" << endl;
        return 0;
      }
    }
  }
  
  cout << "Possible" << endl;
  return 0;
  
}

Compiler output:
a.cc:6:8: error: extended character 　 is not valid in an identifier
    6 |   char cell　cell[10][10];
      |        ^
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   rep(i,0,10){
      |       ^
a.cc:9:3: error: 'rep' was not declared in this scope
    9 |   rep(i,0,10){
      |   ^~~
a.cc:22:8: error: 'cell' was not declared in this scope; did you mean 'ceill'?
   22 |     if(cell[x+1][y] == '#'){
      |        ^~~~
      |        ceill
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int H = sc.nextInt();
        int W = sc.nextInt();
        String[] dic = new String[H];
        for(int i=0;i<H;i++) dic[i]=sc.next();
        int end = -1;
        for(int i=0;i<H;i++){
          int left = 0;
          while(dic[i].charAt(left)=='.') left++;
          if(end>left){
            System.out.println("Impossible");
            System.exit(0);
          }
          end = 4;
          whlie(dic[i].charAt(end)=='.') end++;
        }
        System.out.println("Possible");
    }
}


Compiler output:
Main.java:19: error: ';' expected
          whlie(dic[i].charAt(end)=='.') end++;
                                        ^
1 error
Language: C++

use std::io::*;
use std::str::FromStr;

fn main() {
    let h: usize = read();
    let w: usize = read();
    let mut a: Vec<Vec<char>> = (0..h).map(|_| read::<String>().chars().collect()).collect();

    let mut x = 0;
    let mut y = 0;
    let mut check = true;
    while x != w - 1 || y != h - 1 {
        let po1 = x < w - 1 && a[y][x + 1] == '#';
        let po2 = y < h - 1 && a[y + 1][x] == '#';
        if (po1 && po2) || (x > 0 && a[y][x - 1] == '#') || (y > 0 && a[y - 1][x] == '#') {
            check = false;
            break;
        }
        a[y][x] = '.';
        if po1 {
            x += 1;
        }
        if po2 {
            y += 1;
        }
    }
    println!("{}", if check { "Possible" } else { "Impossible" });
}

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}


Compiler output:
a.cc:7:34: error: too many decimal points in number
    7 |     let mut a: Vec<Vec<char>> = (0..h).map(|_| read::<String>().chars().collect()).collect();
      |                                  ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::*;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::str::FromStr;
      | ^~~
a.cc:4:1: error: 'fn' does not name a type
    4 | fn main() {
      | ^~
a.cc:30:1: error: 'fn' does not name a type
   30 | fn read<T: FromStr>() -> T {
      | ^~
Language: C++

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
int main(){
	ll n, e, t; cin>>n>>e>>t;
	if(n > 2004) return;
	ll a[n];
	for(int i = 0; i < n; i++) cin>>a[i];
	ll dp[n+1]; dp[n] = 0;
	for(int i = n-1; i >= 0; i--){
		dp[i] = dp[i+1] + t;
		for(int j = i+1; j < n; j++){
			dp[i] = min(dp[i], dp[j+1] + max(2*(a[j]-a[i]), t));
		}
	}
	cout<<dp[0] + e<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: return-statement with no value, in function returning 'int' [-fpermissive]
    7 |         if(n > 2004) return;
      |                      ^~~~~~
Language: C++

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

const int N = 8;

int n, m;
char a[N][N];

int main(){
    scanf("%d%d", &n, &m);
    for(int i = 0; i < n; i++) scanf("%s", a[i]);
    for(int x = 0, y = 0; x < n && y < m; ){
        a[x][y] = '.';
        if(x < n - 1 && a[x + 1][y] == '#') x++;
        else y++;
    }
    for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) if(a[x][y] == '#'){ 
        puts("Impossible");
        return 0;
    }
    puts("Possible");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:64: error: 'x' was not declared in this scope
   17 |     for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) if(a[x][y] == '#'){
      |                                                                ^
a.cc:17:67: error: 'y' was not declared in this scope
   17 |     for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) if(a[x][y] == '#'){
      |                                                                   ^
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
using namespace std;
#define N 1000010
#define M 1048576
#define inf 1<<30
int n,pre[1000010][26],pp[26][1000010],len[26],ff[N],cnt,key[N];
char s[1000010],t[1000010];
int f[N];
int upp(int r,int aa,int val)
{
	int mid,l=1;
	while(l<r-1)
	{
		mid=(l+r)>>1;
		if(pp[aa][mid]==val) return pp[aa][mid];
		if(pp[aa][mid]<val) l=mid;
		else r=mid-1;
	}
	if(pp[aa][r]<=val)return pp[aa][r];
	return pp[aa][l];
}
int main()
{
	//freopen("game.in","r",stdin);freopen("game.out","w",stdout);
	scanf("%d",&n);
	scanf("%s%s",s+1,t+1);
	int ii;
	for(ii=1;ii<=n;ii++) if(s[i]!=t[i]) break;
	if(ii==n+1) {cout<<0;return 0;}
	s[0]=t[0]=-1,s[n+1]=t[n+1]=inf;
	for(int i=1;i<=n;i++)
	{
		s[i]-='a',t[i]-='a';
		for(int j=0;j<26;j++) pre[i][j]=pre[i-1][j];
		pre[i][s[i]]=i,pp[s[i]][++len[s[i]]]=pre[i-1][s[i]];
		if(!pre[i][t[i]]) {cout<<-1;return 0;}
		f[i]=pre[i][t[i]];
	}
	for(int i=0;i<26;i++) pp[i][++len[i]]=pre[n][i],pp[i][++len[i]]=inf;
	int q=inf;
	for(int i=n-1;i>=1;i--)
	{
		q=min(f[i+1],q);
		if(len[t[i]]<=10) while(f[i]>q) f[i]=pre[f[i]-1][t[i]];
		else f[i]=upp(len[t[i]],t[i],q);
		if(!f[i]) {cout<<-1;return 0;}
	}
	int maxx=0;
	for(int i=1;i<=n;i++) if(t[i]!=t[i-1]) ff[++cnt]=f[i],key[cnt-1]=i-1;
	key[cnt]=n,ff[cnt+1]=inf;
	for(int i=1;i<=cnt;i++) key[i]-=i,ff[i]-=i;
	for(int i=1;i<=cnt;i++)maxx=max(maxx,(int)(lower_bound(ff+1,ff+cnt+2,key[i])-ff)-i);
	cout<<maxx;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:35: error: 'i' was not declared in this scope; did you mean 'ii'?
   29 |         for(ii=1;ii<=n;ii++) if(s[i]!=t[i]) break;
      |                                   ^
      |                                   ii
a.cc:6:14: warning: overflow in conversion from 'int' to 'char' changes value from '1073741824' to '0' [-Woverflow]
    6 | #define inf 1<<30
      |             ~^~~~
a.cc:31:36: note: in expansion of macro 'inf'
   31 |         s[0]=t[0]=-1,s[n+1]=t[n+1]=inf;
      |                                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,sum=0;
  cin>>a>>b;
  char k[112345];
  for(int i=0;i<a;i++){
    for(int m=0;m<b;m++){
      cin>>k[i][m];
      if(k[i][m]=='#') sum++;
    }
  }
  
  if(sum==a+b-1) cout<<"Possible"<<endl;
  else cout<<"Impossible"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: invalid types 'char[int]' for array subscript
    9 |       cin>>k[i][m];
      |                ^
a.cc:10:14: error: invalid types 'char[int]' for array subscript
   10 |       if(k[i][m]=='#') sum++;
      |              ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <stdio.h>
using namespace std;
using ll =long long;

int main (void) {
  int H,W;
  cin >> H >>W;
  int A[H][W];
  for (int i=0; i<H; i++) {
      for (int j=0; j<W; j++) {
        cin >> A[i][j];
      }
  }
  for (int i=1; i<W; i++) {
    if(A[0][i]==35){
        for (int j=0; j<H; j++) {
          if(A[i][j]==35){
            cout << "Impossible":
            return 0;
          }
    }
    if(A[i][0]==35){
        for (int j=0; j<H; j++) {
          if(A[j][i]==35){
            cout << "Impossible":
            return 0;
          }
        }
    }
  }
  cout << "Possible";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:33: error: expected ';' before ':' token
   26 |             cout << "Impossible":
      |                                 ^
      |                                 ;
a.cc:33:33: error: expected ';' before ':' token
   33 |             cout << "Impossible":
      |                                 ^
      |                                 ;
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:13:17: note: to match this '{'
   13 | int main (void) {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int w,h,sx,sy,sum;
int dir[2][2] = {{1,0},{0,1}};
char Map[25][25];
int flag=0;
struct node
{
    int x,y;
};
void BFS()
{
    queue<node> q;
    node n,p;
    n.x = sx;
    n.y = sy;
    q.push(n);
    while(!q.empty())
    {
        n = q.front();
        q.pop();
        for(int i = 0; i < 2; i++)
        {
            int tx = n.x + dir[i][0];
            int ty = n.y + dir[i][1];
            if(tx >= 0 && tx < h && ty >= 0 && ty < w && Map[tx][ty] == '#')
            {
                if(tx+ty=h-1+w-1)
                {
                    flag=1;
                    return;
                }
                p.x = tx;
                p.y = ty;
                q.push(p);
            }
        }
    }
    return;
}
int main()
{
    int i,j;
    cin>>h>>w;
    for(i = 0; i < h; i++)
        for(j = 0; j < w; j++)
            cin >> Map[i][j];
    BFS();
    if(flag)
        cout<<"Possible"<<endl;
    else
        cout<<"Impossible"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'void BFS()':
a.cc:29:22: error: lvalue required as left operand of assignment
   29 |                 if(tx+ty=h-1+w-1)
      |                    ~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int w,h,sx,sy,sum;
char a[25][25];
int d[25][25];
int main()
{
    memset(d,0,sizeof(d));
    int i,j;
    cin>>h>>w;
    for(i = 1; i <= h; i++)
        for(j = 1; j <=w; j++)
            cin >> a[i][j];
    for(i=1; i<h; i++)
        for(j=1; j<w; j++)
        {
            if(a[i][j]=='#'&&a[i+1][j]=='#'&&a[i][j+1]=='#'&&a[i+1][j+1]=='#')
            {
                cout<<"Impossible"<<endl;
                return 0;
            }
        }
    for(i=0; i<=h+1; i++)
        for(j=0; j<=w+1; j++)
        {
            if(i==0||j==0||i==h+1||j==w+1)
                d[i][j]=1;
        }
    i=1,j=1;
    if(a[h][w]=='.')
    {
        cout<<"Impossible"<<endl;
    }
    else
    {
        for(int k=1;;)
        {
            if(i=h&&j=w)
                break;
            if(a[i-1][j]=='#'&&!d[i-1][j])
            {
                cout<<"Impossible"<<endl;
                return 0;
            }
            if(a[i][j-1]=='#'&&!d[i][j-1])
            {
                cout<<"Impossible"<<endl;
                return 0;
            }
            if(a[i+1][j]=='#')
            {
                d[i][j]=1;
                i+=1;
            }
            else if(a[i][j+1]=='#')
            {
                d[i][j]=1;
                j+=1;
            }
        }
        cout<<"Possible"<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:19: error: lvalue required as left operand of assignment
   39 |             if(i=h&&j=w)
      |                  ~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long h,w,cnt=0;
  char c;
  cin >> h >> w;
  for (int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin >> c;
      if(c=='#'){
        cnt++;
      }
    }
  }
  if(cnt==h+w-1){
    cout << "Possible" << endl;
  }else{
    cout << "Impossible" << endl;
  }

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

#include<cstdio>
#include<algorithm>

using namespace std;

int R, C;
char G[15][15];
bool check[15][15];

int main(){
	scanf("%d %d", &R, &C);
	memset(check, true, sizeof(check));
	for(int i=0;i<R;i++){
		scanf("%s", G[i]);
		for(int j=0;j<C;j++){
			if (G[i][j] == '#'){
				check[i][j] = false;
			}
		}
	}
	bool changed = true;
	int posX = 0, posY = 0;
	while(changed){
		changed = false;
		while(posX != R-1 && G[posX+1][posY] == '#'){
			posX++;
			check[posX][posY] = true;
			changed = true;
		}
		while(posY != C-1 && G[posX][posY+1] == '#'){
			posY++;
			check[posX][posY] = true;
			changed = true;
		}
	}
	bool ans = true;
	for(int i=0;i<R;i++){
		for(int j=0;j<C;j++){
			ans &= check[i][j];
		}
	}
	printf("%s\n", ans?"Possible":"Impossible");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(check, true, sizeof(check));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 |
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define yesno(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define MAX_N 10
using namespace std;

typedef long long ll;
typedef pair<int,int> P1;
typedef pair<P1,P1> P2;
const ll INF=100000000000000001;
int dp[MAX_N][MAX_N]={};
bool d[MAX_N]={};
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
queue<P1> que;
vector<string> v;
int main() {
	int h,w;
	cin>>h>>w;
	rep(i,h){
		rep(j,w){
			char chr;
			cin>>chr;
			if(chr=='#')dp[i][j]=1;
		}
	}
	que.push(P1(0,0));
	while(!que.empty()){
		P1 pp1=que.front();que.pop();
		int x=pp1.first;
		int y= pp1.second;
		dp[x][y]=2;
		if(dp[x+1][y]==1&&dp[x][y+1]==1){
			cout<<"Impossible"<<endl;
			return 0;
		}
		if(dp[x+1][y]==1)que.push(P1(x+1,y));
		if(dp[x][y+1]==1)que.push(P1(x,y+1));
	}
	bool flg=true;
	rep(i,h){
		rep(j,w){
			if(dp[i][j]==1)flg=false;
		}
	}
	if(flg){
		cout<<"Possible"<<endl;
	}else{
		cout<<"Impossible"<<endl;
	}
	cout<<dp[k]<<endl;
	return 0;
}


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

#include <bits/stdc++.h>

using namespace std;

char a[11][11];

int main () {
	int n, m;
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		for (int j = 1;j <= m;j ++) {
			cin >> a[i][j];
			if (a[i][j] != '#' || (i == 1 && j == 1)) continue;
			if (a[i - 1][j] == '#' && a[i][j - 1] == '#') {
				cout << "Impossible";
				return 0;
			}
			if (a[i - 1][j] != '#' && a[i][j - 1] != '#') {
				cout << "Impossible";
				return 0;
			}
		}
	}
	if (a[n][m] != '#') cout << "Impossible"
	else cout << "Possible";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:49: error: expected ';' before 'else'
   24 |         if (a[n][m] != '#') cout << "Impossible"
      |                                                 ^
      |                                                 ;
   25 |         else cout << "Possible";
      |         ~~~~
Language: C++

#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <ctime>
#include <Queue>
#include <sstream>
#include <utility>
#include <bitset>
#include <stack>

using namespace std;

#define MP make_pair 
#define PB push_back 
#define INF (1000000007) 
#define eps 1e-8
#define MOD (1000003)
#define IOS ios::sync_with_stdio(false)

typedef pair<int,int> pii ;
typedef pair<double,double> pdd ;
typedef long long ll ;

ll n,e,t;
ll dp[100005],p[100005];
ll mx=1e18;
multiset<ll>s;

int main()
{
	IOS;
	cin>>n>>e>>t;
	for(int i=1;i<=n;i++) cin>>p[i];
	dp[0]=0;
	int pos=0;
	for(int i=1;i<=n;i++)
	{
		s.insert(dp[i-1]);
		while(pos<=i)
		{
			if((p[i]-p[pos])*2>t) 
			{
				mx=min(dp[pos-1]-p[pos]*2,mx);
				s.erase(dp[pos-1]);
				pos++;
			}
			else break;
		}
		dp[i]=min(*s.begin()+ta,mx+2*p[i]);
	}
	cout<<dp[n]+e;
	return 0;
}

Compiler output:
a.cc:12:10: fatal error: Queue: No such file or directory
   12 | #include <Queue>
      |          ^~~~~~~
compilation terminated.
Language: C++

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

int h, w, cnt;
string s[8];

int main() {
    cin >> h >> w;
    for(int i = 0; i < h; i++) cin >> s[i];

    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            if (s[i][j] == '#') cnt++;
        }
    }

    if (cnt == (h + w - 1)) cout << "Possible" << endl;
    else cout << "Impossible” << endl;

    return 0;
}

Compiler output:
a.cc:18:18: warning: missing terminating " character
   18 |     else cout << "Impossible” << endl;
      |                  ^
a.cc:18:18: error: missing terminating " character
   18 |     else cout << "Impossible” << endl;
      |                  ^~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:20:5: error: expected primary-expression before 'return'
   20 |     return 0;
      |     ^~~~~~
Language: C++

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

int h, w, cnt;
string s[8];

int main() {
    cin >> h >> w;
    for(int i = 0; i < h; i++) cin >> s[i];

    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            if (s[i][j] == '#') cnt++;
        }
    }

    if (cnt == (h + w - 1)) cout << ”Possible” << endl;
    else cout << ”Impossible” << endl;

    return 0;
}

Compiler output:
a.cc:17:37: error: extended character ” is not valid in an identifier
   17 |     if (cnt == (h + w - 1)) cout << ”Possible” << endl;
      |                                     ^
a.cc:17:37: error: extended character ” is not valid in an identifier
a.cc:18:18: error: extended character ” is not valid in an identifier
   18 |     else cout << ”Impossible” << endl;
      |                  ^
a.cc:18:18: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:17:37: error: '\U0000201dPossible\U0000201d' was not declared in this scope
   17 |     if (cnt == (h + w - 1)) cout << ”Possible” << endl;
      |                                     ^~~~~~~~~~
a.cc:18:18: error: '\U0000201dImpossible\U0000201d' was not declared in this scope
   18 |     else cout << ”Impossible” << endl;
      |                  ^~~~~~~~~~~~
Language: C++

#include <stdio.h>

int main(){
	int h, w, i, ct=0;
	char c;
	scanf("%d%d\n",&h,&w);
	for( i=0; i<h; i++ ){
		for( j=0; j<w; j++ ){
			scanf("%c",c);
			if( c=='#' ) ct++;
		}
		gatchar();
	}
	if( ct == w+h+1 ) printf("Possible\n");
	else printf("Impossible\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'j' was not declared in this scope
    8 |                 for( j=0; j<w; j++ ){
      |                      ^
a.cc:12:17: error: 'gatchar' was not declared in this scope; did you mean 'getchar'?
   12 |                 gatchar();
      |                 ^~~~~~~
      |                 getchar
Language: C++

h, w = map(int, input().split())
a = [input() for i in range(h)]

dx = [1, 0, -1, 0]
dy = [0, -1, 0, 1]

def check(y, x):
    for i in range(4):
        cnt = 0
        ny = y + dy[i]
        nx = x + dx[i]
        if (ny < 0) or (ny >= h) or (nx < 0) or (nx >= w):
            continue
        if a[ny][nx] == '#':
            cnt+=1
    if cnt >= 3:
        return 1;
    else:
        return 0;

def dfs(y, x):
    if a[y][x] == '#':
        return 0
    if (y == h - 1) and (x == w - 1):
        return 1

    dfs(y + 1, x)
    dfs(y, x + 1)
    return 0

ans = "Possible"
for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            if check(i,j):
                ans = "Inpossible"

if not dfs(0, 0):
    ans = "Inpossible"

print (ans)


Compiler output:
a.cc:1:1: error: 'h' does not name a type
    1 | h, w = map(int, input().split())
      | ^
a.cc:18:5: error: expected unqualified-id before 'else'
   18 |     else:
      |     ^~~~
a.cc:21:1: error: 'def' does not name a type
   21 | def dfs(y, x):
      | ^~~
Language: C++

    #include <iostream>
    #include <vector>
    #include <set>
    #include <queue>
    #include <algorithm>
    #include <string>
    #include <cmath>
    using namespace std;
    #define MAX 100
    int is[MAX];
    int h, w;
    string s[8];
    bool judge() {
        int start = 0;
    	for (int row = 0; row < h; ++row) {
    	    start = searchRowEnd(start, row);
    	    if (start == -1) {
    	        return false;
    	    }
    	}
    	return start == w - 1;
    }
    
    int searchRowEnd(int start, int row) {
        int endCol = -1;
        bool onLoad = false;
        for (int col = 0; col < w; col++) {
            if (col >= start && endCol == -1) {
                onLoad = true;
            }
            if (onLoad && s[row][col] != '#') {
                endCol = col - 1;
            }
            if (!onLoad && s[row][col] == '#') {
                return -1;
            }
        }
        return endCol;
    }
     
    int main(void) {
    	cin >> h >> w;
    	for (int i = 0; i < h; ++i) {
    		cin >> s[i];
    	}
    	bool f = judge();
    	cout << (f ? "Possible" : "Impossible") << endl;
    	return 0;
    }

Compiler output:
a.cc: In function 'bool judge()':
a.cc:16:21: error: 'searchRowEnd' was not declared in this scope
   16 |             start = searchRowEnd(start, row);
      |                     ^~~~~~~~~~~~
Language: C++

int main() {
	vector<string> s(8);
	int h, w, cnt=0;
	cin >> h >> w;
	rep(i, h)
		cin >> s[i];
	rep(i, h)
		rep(j, w)
		if (s[i][j] == '#')
			cnt++;
	h+w - 1 == cnt ? cout << "Possible" << endl : cout << "Impossible" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'vector' was not declared in this scope
    2 |         vector<string> s(8);
      |         ^~~~~~
a.cc:2:16: error: 'string' was not declared in this scope
    2 |         vector<string> s(8);
      |                ^~~~~~
a.cc:2:24: error: 's' was not declared in this scope
    2 |         vector<string> s(8);
      |                        ^
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> h >> w;
      |         ^~~
a.cc:5:13: error: 'i' was not declared in this scope
    5 |         rep(i, h)
      |             ^
a.cc:5:9: error: 'rep' was not declared in this scope
    5 |         rep(i, h)
      |         ^~~
a.cc:11:26: error: 'cout' was not declared in this scope
   11 |         h+w - 1 == cnt ? cout << "Possible" << endl : cout << "Impossible" << endl;
      |                          ^~~~
a.cc:11:48: error: 'endl' was not declared in this scope
   11 |         h+w - 1 == cnt ? cout << "Possible" << endl : cout << "Impossible" << endl;
      |                                                ^~~~
Language: C++

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


int main () {

    int H,W; cin >> H >> W;
    int cnt=0;

    for (int i=0; i<H; ++i) {
	string s;
	cin >> s;
	for(auto c : s) {
	    if( c == '#' ) w++;
	}
    }
    if( cnt == H+W-1 )
	cout << "Possible" << endl;
    else
	cout << "Impossible" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 'w' was not declared in this scope
   14 |             if( c == '#' ) w++;
      |                            ^
Language: C++

#include<cstdio>
using namespace std;
int d[10][10];
char ma[10][10];
int main(){
    //freopen("a.in","r", stdin);
    //freopen("a.out", "w", stdout);
    int n, m, i, j;
    scanf("%d%d", &n, &m);
    gets(ma[0]);
    for(i=1; i<=n; i++)
        gets(ma[i]);
    for(i=n; i>=1; i--)
        for(j=1; j<=m; j++){
            d[i][j]=d[i+1][j] + d[i][j-1] - d[i+1][j-1] + (ma[i][j-1]=='#');
        }
    for(i=1; i<=n; i++){
        for(j=1; j<=m; j++)
            printf("%d ", d[i][j]);
        printf("\n");
    }
    i=1; j=1;
    bool b=1;
    while(b && (i!=n && j!=m)){
        if(d[i+1][j-1])
            b=0;
        if(ma[i][j+1]=='#' && j<=m)
            j++;
        else if(ma[i+1][j]=='#' && i<=n)
            i++;
        else
            b=0;
    }
    if(!b)
        printf("Impossible");
    else
        printf("Possible");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |     gets(ma[0]);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <string>

using namespace std;

const int NMAX = 8 + 5;

int n, m;
string mat[NMAX];

bool works(int lin, int col) {
    if (mat[lin][col] != '#')
        return false;
    if (lin == n && col == m)
        return true;

    if (mat[lin + 1][col] == '#')
        return works(lin + 1, col);
    if (mat[lin][col + 1] == '#')
        return works(lin + 1, col);
}

int main()
{
    cin >> n >> m;

    for (int i = 1; i <= n; ++ i) {
        cin >> mat[i];
        mat[i] = " " + mat[i];
    }

    int cnt = 0;
    for (int i = 1; i <= n; ++ i)
        for (auto it: str[i])
            cnt += (it == '#');

    if (cnt != n + m - 1) {
        cout << "Impossible\n";
        return 0;
    }

    if (works(1, 1))
        cout << "Possible\n";
    else
        cout << "Impossible\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:23: error: 'str' was not declared in this scope; did you mean 'std'?
   34 |         for (auto it: str[i])
      |                       ^~~
      |                       std
a.cc: In function 'bool works(int, int)':
a.cc:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^
Language: C++

#include <iostream>
int main(){
	int H,W,c=0;
	char a;
	std::cin>>H>>W;
	while(cin>>a)c+=a=='#';
	std::cout<<(c==H+W-1?"P":"Imp")<<"ossible\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         while(cin>>a)c+=a=='#';
      |               ^~~
      |               std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <vector>
#include <list>
#include <bitset>
#include <iostream> 
#include <set>
#include <map>
#include <string>
#include <sstream>
#include <climits>
#include <cmath>
#include <stack>
#include <queue>
#include <cfloat>
#include <initializer_list>
#include <iomanip>
#include <functional>
#include <unordered_map>
#include <regex>

using namespace std;

int main(int argc, char *argv[])
{  
  int H, W;
  cin >> H >> W;
  int sum = 0;
  for (int i = 0; i < H; ++i) 
    {
      for (int j = 0; j < W; ++j)
        {
          char c;
          cin >> c;
          if (grid[i][j] == '#') ++sum;
        }
    }
  if (sum == H + W - 1) cout << "Possible" << endl;
  else cout << "Impossible" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:37:15: error: 'grid' was not declared in this scope
   37 |           if (grid[i][j] == '#') ++sum;
      |               ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define INF 1000000009
#define INP "input.txt"
#define OUT "output.txt"

int n, m;
char arr[10][10];

bool solution() {
	int cnt = 0;
	for(int i = 0; i < n; i++) 
		for(int j = 0; j < n; j++) {
			if(arr[i][j] == '#') cnt++;
		}	
	if(cnt != n + m - 1) return false;

	int i, j;
	i = j = 0;
	if(arr[i][j] != '#') return false;

	while(i != n - 1 && j != m - 1) {
		if(i + 1 < n && arr[i + 1][j] == '#') i++;
		else if(j + 1 < m && arr[i][j + 1] == '#') j++;
		else return false;
	}
	return true;
}

int main () {
	 //freopen(INP, "r", stdin);
	 //freopen(OUT, "w", stdout);

	 scanf(" %d %d ", &n, &m);
	 for(int i = 0; i < n; i++) {
	 	gets(arr[i]);
	 }

	 if(solution) printf("Possible\n");
	 else printf("Impossible\n");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   38 |                 gets(arr[i]);
      |                 ^~~~
      |                 getw
Language: C++

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
using namespace std;
int x[1000005];
long long int dp[1000005];
long long int dp2[1000005];
int main(){
	int n,e,t;
	scanf("%d %d %d",&n,&e,&t);
	for(int i=0;i<n;i++)
	dp[i]=1e18;
	dp[0]=t;
	scanf("%d",&x[0]);
	for(int i=1;i<n;i++)
	scanf("%d",&x[i]),x[i]-=x[0];
	x[0]=0;
	int p=0,mini=1e9;
	dp[0]=t;
	dp2[0]=dp[i]-x[i+1]*2;;
	for(int i=1;i<n;i++){
		dp[i]=max(t,x[i]*2);
		int Min=0,Max=i-1;
		while(Max-1>Min){
			int mid=(Max+Min)/2;
			if((x[i]-x[mid+1])*2<t){
				Min=mid;
			}
			else{
				Max=mid;
			}
		}
		if((x[i]-x[p+1])*2>t)
		p++;
		dp[i]=min(x[i]*2+dp2[p-1],t+dp[p]);
		dp2[i]=min(dp2[i-1],dp[i]-x[i+1]*2);
	//	printf("%d\n",dp[i]);
	}
	printf("%lld",dp[n-1]+e);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:19: error: 'i' was not declared in this scope
   21 |         dp2[0]=dp[i]-x[i+1]*2;;
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char masu[12][12];
int n,m,ans,x,y;
bool flag=false,s1=false,s2=false;;
queue <pair <int,int> > pp;

int main(){
    cin >> n >> m;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            cin >> masu[j][i];
        }
    }

    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            if( masu[j][i]=='#'&&masu[j+1][i-1]||masu[j-1][i+1])break;
        }
        if(i==m&&j==n)flag=true;
    }
   


    if(flag==true)cout << "Possible" << endl;
    else cout << "Impossible" << endl;
    //cin >> x;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: 'j' was not declared in this scope
   20 |         if(i==m&&j==n)flag=true;
      |                  ^
Language: C++

#include<iostream>
using namespace std;
char data1[10][10];
int main()
{
	int h, w;
	cin >> h >> w;
	for (int i = 1; i <= h; ++i)
		for (int j = 1; j <= w; ++j)
			cin >> data1[i][j];
	for (int i = 1; i <h; ++i)
		for (int j = 1; j < w; ++j)
		{
			if (data1[i][j] == '#'&&data1[i][j + 1] == '#'&&data1[i + 1][j] == '#')
			{
				cout << "Impossible" << endl;
				return 0;
			}
			else if((data1[i][j] == '#'&&data1[i-1][j] == '#'&&data1[i][j-1] == '#'&&i!=1)
			{
				cout << "Impossible" << endl;
				return 0;
			}


		}
	cout << "Possible" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:103: error: expected ')' before '{' token
   19 |                         else if((data1[i][j] == '#'&&data1[i-1][j] == '#'&&data1[i][j-1] == '#'&&i!=1)
      |                                ~                                                                      ^
      |                                                                                                       )
   20 |                         {
      |                         ~                                                                              
a.cc:26:17: error: expected primary-expression before '}' token
   26 |                 }
      |                 ^
Language: C++

#include<iostream>
using namespace std;
char data1[10][10];
int main()
{
	int h, w;
	cin >> h >> w;
	for (int i = 1; i <= h; ++i)
		for (int j = 1; j <= w; ++j)
			cin >> data1[i][j];
	for (int i = 1; i <h; ++i)
		for (int j = 1; j < w; ++j)
		{
			if (data1[i][j] == '#'&&data1[i][j + 1] == '#'&&data1[i + 1][j] == '#')
			{
				cout << "Impossible" << endl;
				return 0;
			}
			else if((data1[i][j] == '#'&&data1[i-1][j] == '#'&&data1[i][j-1] == '#'&&i!=1)

		}
	cout << "Possible" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:103: error: expected ')' before '}' token
   19 |                         else if((data1[i][j] == '#'&&data1[i-1][j] == '#'&&data1[i][j-1] == '#'&&i!=1)
      |                                ~                                                                      ^
      |                                                                                                       )
   20 | 
   21 |                 }
      |                 ~                                                                                      
a.cc:21:17: error: expected primary-expression before '}' token
   21 |                 }
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0; i<(n); i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define LL long long
#define ULL unsigned long long
using namespace std;

char nmap[10][10];
int h,w;

bool solve(int y, int x) {
	if(y == h-1 && x == w-1) {
		nmap[y][x] = 'A';
		REP(i,h) {
			if(0 < count(nmap[i], nmap[i] +w-1, '#')) {
				REP(j,h) replace(nmap[j], nmap[j] +w-1, 'A', '#');
				return false;
			}
		}
		return true;
	}

	bool a=false,b=false;
	if(x+1 < w && nmap[y][x+1] == '#') {
		nmap[y][x] = 'A';
		a = solve(y,x+1);
	}
	if(y+1 < h && nmap[y+1][x] == '#') {
		nmap[y][x] = 'A';
		b = solve(y+1,x);
	}
	return a||b;
}

int main() {
	REP(i,10) nmap[i] = "..........";
	cin>>h>>w;
	REP(i,h) cin>>nmap[i];
	cout << (solve(0,0)?"Possible":"Impossible") << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:27: error: incompatible types in assignment of 'const char [11]' to 'char [10]'
   38 |         REP(i,10) nmap[i] = "..........";
      |                   ~~~~~~~~^~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
char a[10][10];
int g=0,ans=0,l,r;
int next[2][2]={{0,1},{1,0}};
void dfs(int x,int y)
{
    if(x==r-1&&y==l-1) { ans=1;return ;}
       for(int i=0;i<=1;i++)
       {
        int dx=x+next[i][0];
        int dy=y+next[i][1];
        if(a[dx][dy]=='#'&&dx>=0&&dx<r&&dy>=0&&dy<=l)
        dfs(dx,dy);

       }

}
int main()
{
   scanf("%d%d",&r,&l);
   for(int i=0;i<r;i++)
   {
       getchar();
       for(int j=0;j<l;j++)
   {
       scanf("%c",&a[i][j]);
       if(a[i][j]=='#') g++;
   }
   }
   dfs(0,0);
   if(ans==1&&g==r+l-1)
    printf("Possible\n");
   else
    printf("Impossible\n");
return 0;
}



Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:14:18: error: reference to 'next' is ambiguous
   14 |         int dx=x+next[i][0];
      |                  ^~~~
In file included from /usr/include/c++/14/string:47,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:8:5: note:                 'int next [2][2]'
    8 | int next[2][2]={{0,1},{1,0}};
      |     ^~~~
a.cc:15:18: error: reference to 'next' is ambiguous
   15 |         int dy=y+next[i][1];
      |                  ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:8:5: note:                 'int next [2][2]'
    8 | int next[2][2]={{0,1},{1,0}};
      |     ^~~~
Language: C

#include <stdio.h>

int main(void) {
	
	int height,width;
	int flag = 0;
	scanf("%d %d",&height,&width);
	
	int nowPositionH = 0;
	int nowPositionW = 0;
	
	char mozi[height + 5][width + 5];
	for(int i = 0 ; i < height ; i ++){
		scanf("%s", mozi[i]);
	}
	int hcount = 0;
	int wcount = 0;
	int fw = 0;
	
	while(1){
		if(mozi[nowPositionH][nowPositionW + 1] == '#'){
			if(nowPositionH == height -1 && nowPositionW > fw){
				if(mozi[nowPositionH - 1][nowPositionW] == '#'){
					flag = 1;
					break;
				}
			}
			if(mozi[nowPositionH + 1][nowPositionW] == '#'){
				flag = 1;
				break;
			}
			nowPositionW++;
		} else if(mozi[nowPositionH + 1][nowPositionW] == '#'){
			nowPositionH++;
			if(nowPositon == height){
				fw = nowPositionW;
			}
		} else {
			flag = 1;
			break;
		}
		hcount++;
		if(nowPositionH == height -1 && nowPositionW == width -1){
			break;
		}

	}
	nowPositionH = 0;
	nowPositionW = 0;
	
	if(flag == 0){
		while(1){
			if(mozi[nowPositionH + 1][nowPositionW] == '#'){
				if(mozi[nowPositionH][nowPositionW + 1] == '#'){
					flag = 1;
					break;
				}
				nowPositionH++;
			} else if(mozi[nowPositionH][nowPositionW + 1] == '#'){
				nowPositionW++;
			} else {
				flag = 1;
				break;
			}
			wcount++;
			
			if(nowPositionH == height - 1  && nowPositionW == width - 1){
					break;
			}
		}
	}
	
	if(mozi[height -2][width - 1] == '#' && mozi[height -1][width - 2] == '#'){
		flag = 1;
	}
	
	if(hcount != wcount){
		flag = 1;
	}

	
	if(flag == 0){
		printf("Possible\n");
	} else {
		printf("Impossible\n");
	}
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:28: error: 'nowPositon' undeclared (first use in this function); did you mean 'nowPositionW'?
   35 |                         if(nowPositon == height){
      |                            ^~~~~~~~~~
      |                            nowPositionW
main.c:35:28: note: each undeclared identifier is reported only once for each function it appears in