Language: C++

#[allow(unused_imports)]
use std::char::*;
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::*;
use std::str::FromStr;

#[allow(unused_macros)]
macro_rules! debug {($($a:expr),*) => {println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);}}
#[allow(unused_macros)]
macro_rules! input {(source=$s:expr,$($r:tt)*) => {let mut iter=$s.split_whitespace(); let mut next=||{iter.next().unwrap()}; input_inner! {next,$($r)*}};($($r:tt)*) => {let stdin=std::io::stdin();let mut bytes=std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next=move||->String{bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect()}; input_inner! {next,$($r)*}};}
#[allow(unused_macros)]
macro_rules! input_inner {($next:expr) => {}; ($next:expr,) => {}; ($next:expr,$var:ident:$t:tt$($r:tt)*) => {let $var=read_value!($next,$t); input_inner! {$next$($r)*}};}
#[allow(unused_macros)]
macro_rules! read_value {($next:expr,($($t:tt),*)) => {($(read_value! ($next,$t)),*)}; ($next:expr, [$t:tt; $len:expr]) => {(0..$len).map(|_|read_value! ($next,$t)).collect::<Vec<_>>()}; ($next:expr,chars) => {read_value! ($next,String).chars().collect::<Vec<char>>()}; ($next:expr,usize1) => {read_value! ($next,usize)-1}; ($next:expr,$t:ty) => {$next().parse::<$t>().expect("Parse error")};}

#[derive(PartialEq, PartialOrd)]
pub struct Total<T>(pub T);
impl<T: PartialEq> Eq for Total<T> {}
impl<T: PartialOrd> Ord for Total<T> {
    fn cmp(&self, other: &Total<T>) -> std::cmp::Ordering {
        self.0.partial_cmp(&other.0).unwrap()
    }
}

#[allow(dead_code)]
const MAX: usize = 100006;
#[allow(dead_code)]
const INF_U32: u32 = 1 << 31;
#[allow(dead_code)]
const INF_I32: i32 = 1 << 30;
#[allow(dead_code)]
const INF_U64: u64 = 1 << 63;
#[allow(dead_code)]
const INF_I64: i64 = 1 << 62;
#[allow(dead_code)]
const MOD: i64 = 1e9 as i64 + 7;

#[allow(dead_code)]
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")
}

#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

#[allow(unused_imports)]
use std::f64;

fn dfs(y:usize, x:usize, cnt_f:i64, cnt_a:i64, a:&Vec<Vec<char>>, h:usize, w:usize) -> bool {
    //debug!(y,x,cnt_f);
    if y==h-1 && x==w-1 {
        if cnt_f == cnt_a {
            return true;
        }
    }
    if x+1 < w && a[y][x+1]=='#' {
        return dfs(y,x+1,cnt_f+1,cnt_a,a,h,w);
    }
    if y+1 < h && a[y+1][x] == '#' {
        return dfs(y+1,x,cnt_f+1,cnt_a,a,h,w);
    }
    return false;
}

fn main() {
    input!{h:usize, w:usize, a:[chars;h]};

    let mut cnt = 0i64;
    for i in 0..h {
        for j in 0..w {
            if a[i][j] == '#' { cnt+=1; }
        }
    }
    println!("{}",if dfs(0,0,1,cnt,&a,h,w) {"Possible"} else {"Impossible"});

}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_imports)]
      |  ^
a.cc:3:2: error: invalid preprocessing directive #[
    3 | #[allow(unused_imports)]
      |  ^
a.cc:5:2: error: invalid preprocessing directive #[
    5 | #[allow(unused_imports)]
      |  ^
a.cc:10:2: error: invalid preprocessing directive #[
   10 | #[allow(unused_macros)]
      |  ^
a.cc:12:2: error: invalid preprocessing directive #[
   12 | #[allow(unused_macros)]
      |  ^
a.cc:14:2: error: invalid preprocessing directive #[
   14 | #[allow(unused_macros)]
      |  ^
a.cc:16:2: error: invalid preprocessing directive #[
   16 | #[allow(unused_macros)]
      |  ^
a.cc:17:126: error: too many decimal points in number
   17 | macro_rules! read_value {($next:expr,($($t:tt),*)) => {($(read_value! ($next,$t)),*)}; ($next:expr, [$t:tt; $len:expr]) => {(0..$len).map(|_|read_value! ($next,$t)).collect::<Vec<_>>()}; ($next:expr,chars) => {read_value! ($next,String).chars().collect::<Vec<char>>()}; ($next:expr,usize1) => {read_value! ($next,usize)-1}; ($next:expr,$t:ty) => {$next().parse::<$t>().expect("Parse error")};}
      |                                                                                                                              ^~~~~~~
a.cc:19:2: error: invalid preprocessing directive #[
   19 | #[derive(PartialEq, PartialOrd)]
      |  ^
a.cc:24:13: error: too many decimal points in number
   24 |         self.0.partial_cmp(&other.0).unwrap()
      |             ^~~~~~~~~~~~~~
a.cc:28:2: error: invalid preprocessing directive #[
   28 | #[allow(dead_code)]
      |  ^
a.cc:30:2: error: invalid preprocessing directive #[
   30 | #[allow(dead_code)]
      |  ^
a.cc:32:2: error: invalid preprocessing directive #[
   32 | #[allow(dead_code)]
      |  ^
a.cc:34:2: error: invalid preprocessing directive #[
   34 | #[allow(dead_code)]
      |  ^
a.cc:36:2: error: invalid preprocessing directive #[
   36 | #[allow(dead_code)]
      |  ^
a.cc:38:2: error: invalid preprocessing directive #[
   38 | #[allow(dead_code)]
      |  ^
a.cc:41:2: error: invalid preprocessing directive #[
   41 | #[allow(dead_code)]
      |  ^
a.cc:54:2: error: invalid preprocessing directive #[
   54 | #[allow(dead_code)]
      |  ^
a.cc:64:2: error: invalid preprocessing directive #[
   64 | #[allow(unused_imports)]
      |  ^
a.cc:87:14: error: too many decimal points in number
   87 |     for i in 0..h {
      |              ^~~~
a.cc:88:18: error: too many decimal points in number
   88 |         for j in 0..w {
      |                  ^~~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::char::*;
      | ^~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::cmp::*;
      | ^~~
a.cc:6:1: error: 'use' does not name a type
    6 | use std::collections::*;
      | ^~~
a.cc:7:1: error: 'use' does not name a type
    7 | use std::io::*;
      | ^~~
a.cc:8:1: error: 'use' does not name a type
    8 | use std::str::FromStr;
      | ^~~
a.cc:11:1: error: 'macro_rules' does not name a type
   11 | macro_rules! debug {($($a:expr),*) => {println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);}}
      | ^~~~~~~~~~~
a.cc:13:1: error: 'macro_rules' does not name a type
   13 | macro_rules! input {(source=$s:expr,$($r:tt)*) => {let mut iter=$s.split_whitespace(); let mut next=||{iter.next().unwrap()}; input_inner! {next,$($r)*}};($($r:tt)*) => {let stdin=std::io::stdin();let mut bytes=std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next=move||->String{bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect()}; input_inner! {next,$($r)*}};}
      | ^~~~~~~~~~~
a.cc:15:1: error: 'macro_rules' does not name a type
   15 | macro_rules! input_inner {($next:expr) => {}; ($next:expr,) => {}; ($next:expr,$var:ident:$t:tt$($r:tt)*) => {let $var=read_value!($next,$t); input_inner! {$next$($r)*}};}
      | ^~~~~~~~~~~
a.cc:17:1: error: 'macro_rules' does not name a type
   17 | macro_rules! read_value {($next:expr,($($t:tt),*)) => {($(read_value! ($next,$t)),*)}; ($next:expr, [$t:tt; $len:expr]) => {(0..$len).map(|_|read_value! ($next,$t)).collect::<Vec<_>>()}; ($next:expr,chars) => {read_value! ($next,String).chars().collect::<Vec<char>>()}; ($next:expr,usize1) => {read_value! ($next,usize)-1}; ($next:expr,$t:ty) => {$next().parse::<$t>().expect("Parse error")};}
      | ^~~~~~~~~~~
a.cc:20:1: error: 'pub' does not name a type
   20 | pub struct Total<T>(pub T);
      | ^~~
a.cc:21:1: error: 'impl' does not name a type
   21 | impl<T: PartialEq> Eq for Total<T> {}
      | ^~~~
a.cc:22:1: error: 'impl' does not name a type
   22 | impl<T: PartialOrd> Ord for Total<T> {
      | ^~~~
a.cc:29:10: error: found ':' in nested-name-specifier, expected '::'
   29 | const MAX: usize = 100006;
      |          ^
      |          ::
a.cc:29:7: error: 'MAX' does not name a type
   29 | const MAX: usize = 100006;
      |       ^~~
a.cc:31:14: error: found ':' in nested-name-specifier, expected '::'
   31 | const INF_U32: u32 = 1 << 31;
      |              ^
      |              ::
a.cc:31:7: error: 'INF_U32' does not name a type
   31 | const INF_U32: u32 = 1 << 31;
      |       ^~~~~~~
a.cc:33:14: error: found ':' in nested-name-specifier, expected '::'
   33 | const INF_I32: i32 = 1 << 30;
      |              ^
      |              ::
a.cc:33:7: error: 'INF_I32' does not name a type
   33 | const INF_I32: i32 = 1 << 30;
      |       ^~~~~~~
a.cc:35:14: error: found ':' in nested-name-specifier, expected '::'
   35 | const INF_U64: u64 = 1 << 63;
      |              ^
      |              ::
a.cc:35:7: error: 'INF_U64' does not name a type
   35 | const INF_U64: u64 = 1 << 63;
      |       ^~~~~~~
a.cc:37:14: error: found ':' in nested-name-specifier, expected '::'
   37 | const INF_I64: i64 = 1 << 62;
      |              ^
      |              ::
a.cc:37:7: error: 'INF_I64' does not name a type
   37 | const INF_I64: i64 = 1 << 62;
      |       ^~~~~~~
a.cc:39:10: error: found ':' in nested-name-specifier, expected '::'
   39 | const MOD: i64 = 1e9 as i64 + 7;
      |          ^
      |          ::
a.cc:39:7: error: 'MOD' does not name a type
   39 | const MOD: i64 = 1e9 as i64 + 7;
      |       ^~~
a.cc:42:1: error: 'fn' does not name a type
   42 | fn read<T: FromStr>() -> T {
      | ^~
a.cc:55:1: error: 'fn' does not name a type
   55 | fn read_vec<T: std::str::FromStr>() -> Vec<T> {
      | ^~
a.cc:65:1: error: 'use' does not name a type
   65 | use std::f64;
      | ^~~
a.cc:67:1: error: 'fn' does not name a type
   67 | fn dfs(y:usize, x:usize, cnt_f:i64, cnt_a:i64, a:&Vec<Vec<char>>, h:usize, w:usize) -> bool {
      | ^~
a.cc:83:1: error: 'fn' does not name a type
   83 | fn main() {
      | ^~