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

#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <math.h>
#include <iomanip>
#include <limits>
#include <bits/stdc++.h>
#include <queue>
#include <type_traits>
#include<cstdint>
#include <cassert>
#include <algorithm>
#include <functional>
using namespace std;
int main(){
    unsigned unsigned long long MOD =1000000007;
    long long N,M;
    cin >> N >> M;
    vector<long long> vec(M);
    for(int i=0;i<M;i++){
        long long x;
        cin >> x;
        vec[i]=x;
    }
    vector<unsigned long long> kaidan(N+1);
    int j=0;
    kaidan[0]=1;
    if(vec[0]==1){
        kaidan[1]=0;
        j++;
    }else{
        kaidan[1]=1;
    }
    for(int i=2;i<N+1;i++){
        if(vec[j]==i){
            j++;
            kaidan[i]=0;
            continue;
        }else{
            kaidan[i]=(kaidan[i-1]%MOD+kaidan[i-2]%MOD)%MOD;
        }
    }
    cout << kaidan[N] % MOD<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: duplicate 'unsigned'
   19 |     unsigned unsigned long long MOD =1000000007;
      |              ^~~~~~~~
      |              --------
Language: C++

#define _USE_MATH_DEFINES
#include<iostream>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<string>
#include<set>
#include<map>
#include<stdbool.h>
#include<math.h>
#include<sstream>
#include<math.h>
#include<vector>
#include<functional>
#include<queue>
#include<utility>
#include<bitset>
typedef long long ll;
#define N (1000000000+7)
#define INF 1e16
using namespace std;
typedef pair<ll, ll> P;
ll level;
struct edge {
	ll to;
};

vector<edge>G[100010];
ll d[100010];

bool cmp(const pair<ll, ll> &a, const pair<ll, ll> &b) {
	if (a.second == b.second)return a.first < b.first;
	else return a.second > b.second;
}

void dfs(int root,vector<ll> &c) {
	d[root] = c[level];
	level--;
	for (auto itr = G[root].begin();itr != G[root].end();++itr) {
		//cout << itr->to << endl;
		if (d[itr->to] == 0)dfs(itr->to, c);
	}
	return;
}

int main(void) {
	ll n, m;
	cin >> n >> m;
	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}
	if(m!=0)vector<ll>w(m);
	ll ans = 0;
	for (ll i = 0;i < m;i++)cin >> w[i];
	ll dp[100010] = { 0 };
	dp[0] = 0;
	dp[1] = 1;
	dp[2] = 2;
	for (ll i = 3;i <= n;i++)dp[i] = (dp[i - 1] % N + dp[i - 2] % N) % N;
	if (m == 0) {
		cout << dp[n] << endl;
		return 0;
	}
	if (w[0] == 1)ans = 1;
	else ans = (dp[w[0] - 1]) % N;
	for (ll i = 1;i < m;i++) {
		if (w[i] - w[i - 1] - 1 <= 0)ans = ans * 0;
		else {
			if (w[i] - w[i - 1] - 1 == 1)ans = ans * 1;
			else {
				ans = (ans*(dp[w[i] - w[i - 1] - 2]) % N) % N;
			}
		}
	}
	if (n - w[m - 1]>1)ans = (ans*(dp[n - w[m - 1]-1]) % N) % N;
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:40: error: 'w' was not declared in this scope
   55 |         for (ll i = 0;i < m;i++)cin >> w[i];
      |                                        ^
a.cc:65:13: error: 'w' was not declared in this scope
   65 |         if (w[0] == 1)ans = 1;
      |             ^
a.cc:68:21: error: 'w' was not declared in this scope
   68 |                 if (w[i] - w[i - 1] - 1 <= 0)ans = ans * 0;
      |                     ^
a.cc:76:17: error: 'w' was not declared in this scope
   76 |         if (n - w[m - 1]>1)ans = (ans*(dp[n - w[m - 1]-1]) % N) % N;
      |                 ^
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.function.Consumer;

public class Main {
    private static final Scanner scanner = new Scanner(System.in);
    private static final Consumer<List<String>> consumer = solve();

    public static void main(String[] args) {
        List<String> input = readInput();
        int N = Integer.valueOf(input.get(0).split(" ")[0]);
        memo = new long[N + 1];
        Arrays.fill(memo, 0);
        memo[0] = 1;
        input.stream().skip(1).map(Integer::valueOf).forEach(x -> {
            memo[x] = 0;
        });
        System.out.println(rec(N));
    }

    private static List<String> readInput() {
        final List<String> lineList = new ArrayList<>();
        while (scanner.hasNextLine()) {
            lineList.add(scanner.nextLine());
        }
        return lineList;
    }

    private static long[] memo;

    private static long rec(int n) {
        if (n < 0) {
            return 0;
        }
        if (memo[n] >= 0) {
            return memo[n];
        }
        memo[n] = (rec(n - 1) + rec(n - 2)) % 1_000_000_007;
        return memo[n];
    }

}


Compiler output:
Main.java:9: error: cannot find symbol
    private static final Consumer<List<String>> consumer = solve();
                                                           ^
  symbol:   method solve()
  location: class Main
1 error
Language: C++

#include <iostream>
#include <array>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int kaidann(int dannsuu){
  if(dannsuu = 1){
    return 1;
  }else if(dannsuu = 2){
    return 2;
  }else{
    return kaidann(dannsuu-1)+kaidann(dannsuu-2);
  }
}
int main(){
  array<int,100000>a;
  int n,m,ans=0;
  cin>>n>>m;
  for(int i=0;i<m;i++){
    cin>>a.at(i);
  }
  int i;
  for(i=0;i<m-1;i++){
    int s = a.at(i+1)-a.at(i);
    if(s = 0){
      ans = 0;
      break;
    }else{
      ans = ans + kaidann(s);
    }
    
  }
  cout<<ans<<ensl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: 'ensl' was not declared in this scope
   33 |   cout<<ans<<ensl;
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,b;
  cin>>n>>b;
  int f=1;
  vector<int> broken(b);
  for(int i=0;i<b;i++){
    cin>>b[i];
    if(i>=1&&b[i]-b[i-1]==1){f=0; break;}
    else{n-=2;}
  }
  vector<int> a(n);
  a[0]=1;
  a[1]=2;
  for(int i=2;i<n;i++){
    a[i]=a[i-1]%1000000007+2*a[i-2]%1000000007;
  }
  if(f){cout<<a[n-1]%1000000007;}
  else{cout<<0;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: invalid types 'int[int]' for array subscript
    9 |     cin>>b[i];
      |           ^
a.cc:10:15: error: invalid types 'int[int]' for array subscript
   10 |     if(i>=1&&b[i]-b[i-1]==1){f=0; break;}
      |               ^
a.cc:10:20: error: invalid types 'int[int]' for array subscript
   10 |     if(i>=1&&b[i]-b[i-1]==1){f=0; break;}
      |                    ^
Language: C++

#include <stdio.h>

#define mod 1000000007

int main(void)
{
	int n,m;
	
	scanf("%d%d",&n,&m);
	
	int a[m],i;
	
	for(i = 0; i < m; i++){
		scanf("%d",&a[i]);
	}
	
	int ans = 0;genzai = 0;
	
	while(genzai <= n){
		
		for(i = 0; i < n;i++){
			int count1 = 0,count2 = 0;
			if(genzai + 1 == a[i]){
				count1++;
			}
			if(genzai + 2 == a[i]){
				count2++;
			}
			if(count1 = 0){
				ans++;
				genzai++;
			}
			if(count2 = 0){
				ans++;
			}
		}
	}
	
	return 0;
	
}
		
		
		
	
	
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: 'genzai' was not declared in this scope
   17 |         int ans = 0;genzai = 0;
      |                     ^~~~~~
Language: C++

100 5
1
23
45
67
89#include <bits/stdc++.h>
#include <cstdio>

using ll = long long;
using namespace std;
int main() {
    ll N, M; cin >> N >> M;

    vector<ll> a(M);
    for(ll i=0;i<M;++i)cin>>a[i];

    ll num[100100] = {};
    ll brokenis1[100100] = {};
    for(ll i=0; i<M; ++i) brokenis1[a[i]] = 1;
    num[0] = 1;
    num[1] = 0;
    for (ll i = 2; i <= N; i++) {
        if(brokenis1[i] == 0) {
            num[i] = (num[i-1] + num[i-2]) % 1000000007;
        }
    }
    cout << num[N] << "\n";
}

Compiler output:
a.cc:6:3: error: stray '#' in program
    6 | 89#include <bits/stdc++.h>
      |   ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 100 5
      | ^~~
a.cc: In function 'int main()':
a.cc:12:14: error: 'cin' was not declared in this scope
   12 |     ll N, M; cin >> N >> M;
      |              ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include <cstdio>
  +++ |+#include <iostream>
    8 | 
a.cc:14:5: error: 'vector' was not declared in this scope
   14 |     vector<ll> a(M);
      |     ^~~~~~
a.cc:8:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    7 | #include <cstdio>
  +++ |+#include <vector>
    8 | 
a.cc:14:14: error: expected primary-expression before '>' token
   14 |     vector<ll> a(M);
      |              ^
a.cc:14:16: error: 'a' was not declared in this scope
   14 |     vector<ll> a(M);
      |                ^
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout << num[N] << "\n";
      |     ^~~~
a.cc:27:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

public class Main {

    private static BigInteger[] dp;
    private static int goal;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int m = sc.nextInt();

        dp = new BigInteger[n + 1];
        for (int i = 0; i <= n; i++) {
            dp[i] = BigInteger.ZERO;
        }

        goal = n;

        BigInteger minusOne = new BigInteger("-1");

        for (int i = 0; i < m; i++) {
            dp[sc.nextInt()] = minusOne;
        }

        solve(0);

        System.out.println(dp[0].mod(new BigInteger("1000000007")));
    }

    private static BigInteger solve(int step) {
        if (step == goal) {
            return BigInteger.ONE;
        } else if (step > goal || dp[step].signum() < 0) {
            return BigInteger.ZERO;
        }

        if (dp[step].signum() > 0) {
            return dp[step];
        }

        return dp[step] = solve(step + 1).add(solve(step + 2));
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
    private static BigInteger[] dp;
                   ^
  symbol:   class BigInteger
  location: class Main
Main.java:30: error: cannot find symbol
    private static BigInteger solve(int step) {
                   ^
  symbol:   class BigInteger
  location: class Main
Main.java:7: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:12: error: cannot find symbol
        dp = new BigInteger[n + 1];
                 ^
  symbol:   class BigInteger
  location: class Main
Main.java:14: error: cannot find symbol
            dp[i] = BigInteger.ZERO;
                    ^
  symbol:   variable BigInteger
  location: class Main
Main.java:19: error: cannot find symbol
        BigInteger minusOne = new BigInteger("-1");
        ^
  symbol:   class BigInteger
  location: class Main
Main.java:19: error: cannot find symbol
        BigInteger minusOne = new BigInteger("-1");
                                  ^
  symbol:   class BigInteger
  location: class Main
Main.java:27: error: cannot find symbol
        System.out.println(dp[0].mod(new BigInteger("1000000007")));
                                         ^
  symbol:   class BigInteger
  location: class Main
Main.java:32: error: cannot find symbol
            return BigInteger.ONE;
                   ^
  symbol:   variable BigInteger
  location: class Main
Main.java:34: error: cannot find symbol
            return BigInteger.ZERO;
                   ^
  symbol:   variable BigInteger
  location: class Main
11 errors
Language: C++

/*
A(n+2)=A(n+1)+A(n)
A(1)=1
A(2)=2
*/

int function(int N)
{
  int a=1,b=2;
  int tmp;
  
  for(i=0;i<N-1;i++)
  {
    tmp=a;
    a=b;
    b+=tmp;
  }
  
  return a;
}

int main()
{
  int N,M;
  scanf("%d",&N,&M);
  long long int ans=0;
  int start=1,end;
  
  for(int i=0;i<M;i++)
  {
    scanf("%d",&end);
    if(start==end)
    {
      printf("0");
      return 0;
    }
    ans=(ans+function(end-start))%1000000007;
    start=end+1;
  }
  printf("%lld",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int function(int)':
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i=0;i<N-1;i++)
      |       ^
a.cc: In function 'int main()':
a.cc:25:3: error: 'scanf' was not declared in this scope
   25 |   scanf("%d",&N,&M);
      |   ^~~~~
a.cc:34:7: error: 'printf' was not declared in this scope
   34 |       printf("0");
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | /*
a.cc:40:3: error: 'printf' was not declared in this scope
   40 |   printf("%lld",ans);
      |   ^~~~~~
a.cc:40:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
#define PII pair<int,int>
#define ll long long
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
int read()
{
	char ch = getchar();
	int x = 0;
	while (ch > '9' || ch < '0') ch = getchar();
	while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
	return x;
}
int n, m;
ll dp[100005];
bool broken[100005];
ll dfs(int step)
{
	if (dp[step] != -1) return dp[step];
	else if (broken[step]) return dp[step] = 0;
	else return dp[step] = (dfs(step - 1) % 1000000007 + dfs(step - 2) % 1000000007) % 1000000007;
}
int main()
{
	dp[1] = 1;
	dp[2] = 2;
	memset(dp, -1, sizeof(dp));
	memset(broken, 0, sizeof(broken));
	n = read(), m = read();
	for (int i = 1; i <= m; i++) {
		int c = read();
		broken[c] = 1;
	}
	if (broken[1] == 1) dp[1] = 0, dp[2] = 1;
	if (broken[2] == 1) dp[2] = 0;
	ll ans = dfs(n) % 1000000007;
	cout << ans;
	return 0;
}


Compiler output:
a.cc:5:19: error: 'acos' was not declared in this scope
    5 | const double PI = acos(-1.0);
      |                   ^~~~
a.cc: In function 'int main()':
a.cc:28:9: error: 'memset' was not declared in this scope
   28 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #define PII pair<int,int>
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan  = new Scanner(System.in);
      	int n = scan.nextInt();	
      	int M = scan.nextInt();	
      	int[] a = new int[M];
      	int ans = 0;
      	ArrayList<Integer> fibo = new ArrayList<>();
      	fibo.add(1);
      	fibo.add(1);
      	for(int i = 0; i < M; i++){
        	a[i] = scan.nextInt();
          	fibo.add(gibo.get(i) + fibo.get(i+1));
        }
      	ans = ans + fibo.get(a[0]);
      	for(int k = 0; k < M; k++){
          	if(a[k + 1] - a[k] == 1){
            	System.out.print("0");
              	break;	
            }
        	ans = ans + fibo.get(a[k + 1] - a[k]);
        }
      	if(ans < 1000000007){
        	System.out.print(ans);
        }
      	else{
        	System.out.print(ans % 1000000007);
        }
    }
 
}

Compiler output:
Main.java:15: error: cannot find symbol
          	fibo.add(gibo.get(i) + fibo.get(i+1));
          	         ^
  symbol:   variable gibo
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner scan  = new Scanner(System.in);
      	int n = scan.nextInt();	
      	int M = scan.nextInt();	
      	int[] a = new int[M];
      	int ans = 0;
      	ArrayList<Integer> fibo = new ArrayList<>();
      	fibo.add(1);
      	fibo.add(1);
      	for(int i = 0; i < M; i++){
        	a[i] = scan.nextInt();
          	fibo.add(gibo.get(i) + fibo.get(i+1));
        }
      	ans = ans + fibo.get(a[0]);
      	for(int k = 0; k < M; k++){
          	if(a[k + 1] - a[k] == 1){
            	System.out.print("0");
              	break();	
            }
        	ans = ans + fibo.get(a[k + 1] - a[k]);
        }
      	if(ans < 1000000007){
        	System.out.print(ans);
        }
      	else{
        	System.out.print(ans % 1000000007);
        }
    }

}

Compiler output:
Main.java:21: error: ';' expected
              	break();	
              	     ^
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
long long mod = 1000000007;
int main(){
	long long n,m; cin >> n >> m;
	vector<bool> av = vector<bool>(m+10, false);
	for(long long i = 0; i < m; i++){
		long long a; cin >> a;
		av[a] = true; 
	}

	long long dp[n+10];
	dp[0] = 1;
	if(!av[1])dp[1] = 1;
	else dp[1] = 0;

	for(long longi = 2; i < n+1; i++){
		if(av[i]) dp[i] = 0;
		else dp[i] = dp[i - 1] + dp[i - 2];
		//cout << i << ": "<< dp[i] << endl;
	}
	cout << dp[n]%mod << endl;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: 'i' was not declared in this scope
   19 |         for(long longi = 2; i < n+1; i++){
      |                             ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        long c = 0;
        long d = 0;
        if(dp[i - 1] != -1) c = dp[i - 1];
        if(dp[i - 2] != -1) d = dp[i - 2];
        dp[i] = (c + d) % MOD;
      }
    }
    System.out.println(dp[n]);
  }

Compiler output:
Main.java:35: error: reached end of file while parsing
  }
   ^
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>();
    int[] a = new int[m];
    for(int i = 0; i < m; i++) {
      a[i] = sc.nextInt();
      list.add(a[i]);
    }
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] dp = new long[n + 1];
    dp[0] = 1;
    if(list.contains(1)) {
      dp[1] = 0;
    } else {
      dp[1] = 1;
    }
    for(int i = 0; i < m; i++) {
      dp[a[i]] = -1;
    }
    for(int i = 2; i < n + 1; i++) {
      if(dp[i] != -1) {
        int a = 0;
        int b = 0;
        if(dp[i - 1] != -1) a = dp[i - 1];
        if(dp[i - 2] != -1) b = dp[i - 2];
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
      }
    }
    System.out.println(dp[n]);
  }
}

Compiler output:
Main.java:27: error: variable a is already defined in method main(String[])
        int a = 0;
            ^
Main.java:29: error: incompatible types: possible lossy conversion from long to int
        if(dp[i - 1] != -1) a = dp[i - 1];
                                  ^
Main.java:30: error: incompatible types: possible lossy conversion from long to int
        if(dp[i - 2] != -1) b = dp[i - 2];
                                  ^
3 errors
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<climits>
using namespace std;

int N, M;
int a[100000];
int step[100000];

int rec(int s, int sum){
    if(s == N) return sum+1;  
    if(s > N) return sum;
    // for(int i=0;i<M;i++){
    //     if(a[i] == s) return sum;
    // }
    if(step[i] == 0) return sum;
    sum = rec(s+1, sum);
    sum = rec(s+2, sum);
    return sum;
}

int main(void){
    cin >> N >> M;
    for(int i=0;i<M;i++){
        step[i] = 1;    // ok
    }
    for(int i=0;i<M;i++){
        cin >> a[i];
        step[a[i]] = 0; // hole
    }
    int ans = rec(0, 0) % 1000000007;
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int rec(int, int)':
a.cc:17:13: error: 'i' was not declared in this scope
   17 |     if(step[i] == 0) return sum;
      |             ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main () {
  int MOD = 1e9 + 7;
  int N, M;
  cin >> N >> M;
  vector<int>ans(N, 0);
  verctor<bool>sta(N, true);
  for (int i = 0; i < M; i ++) {
    int a;
    cin >> a;
    sta[a - 1] = false;
  }
  if (sta[0]) ans[0] = 1;
  if (sta[1]) ans[1] = ans[0] + 1;
  for (int i = 2; i < N; i ++) {
    if (sta[i]) {
      ans[i] = ans[i - 1] + ans[i - 2];
      ans %= MOD;
    }
  }
  cout << ans[N - 1] << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'verctor' was not declared in this scope
    9 |   verctor<bool>sta(N, true);
      |   ^~~~~~~
a.cc:9:11: error: expected primary-expression before 'bool'
    9 |   verctor<bool>sta(N, true);
      |           ^~~~
a.cc:13:5: error: 'sta' was not declared in this scope; did you mean 'std'?
   13 |     sta[a - 1] = false;
      |     ^~~
      |     std
a.cc:15:7: error: 'sta' was not declared in this scope; did you mean 'std'?
   15 |   if (sta[0]) ans[0] = 1;
      |       ^~~
      |       std
a.cc:16:7: error: 'sta' was not declared in this scope; did you mean 'std'?
   16 |   if (sta[1]) ans[1] = ans[0] + 1;
      |       ^~~
      |       std
a.cc:18:9: error: 'sta' was not declared in this scope; did you mean 'std'?
   18 |     if (sta[i]) {
      |         ^~~
      |         std
a.cc:20:11: error: no match for 'operator%=' (operand types are 'std::vector<int>' and 'int')
   20 |       ans %= MOD;
      |       ~~~~^~~~~~
Language: C++

#include <stdio.h>
#include <algorithm>
#include <string>
#include <vector>



int main() {
	int N, M;
	scanf("%d %d", &N, &M);
	int* b = new int[N + 1];
	for (int i = 0; i < N + 1; i++) {
		b[i] = 1;
	}
	for (int i = 0; i < M; i++) {
		int a;
		scanf_s("%d", &a);
		b[a] = 0;
	}
	long long* n = new long long[N + 1];
	n[0] = 1;
	n[1] = b[1];
	for (int i = 2; i < N + 1; i++) {
		n[i] = b[i] * (n[i - 1] + n[i - 2]);
	}
	int res = n[N] % 1000000007;
	printf("%d", res);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   17 |                 scanf_s("%d", &a);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
using namespace std;

const int MAXN = 1e6 + 10, MOD = 1e9 + 7;
long long dp[MAXN];
bool O[MAXN];

int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
   O[a] = 1; 
  }
  dp[0] = 1;
  for (int i = 1; i <= n; i++) {
   if (O[i])
     continue;
   dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= MOD;
  }
  cout << dp[n];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'n' was not declared in this scope
    9 |   cin >> n >> m;
      |          ^
a.cc:9:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    9 |   cin >> n >> m;
      |               ^
      |               tm
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
using namespace std;
typedef long long ll;
ll dp[100005]={0};
const int mod=1000000007;
int main(){
  int n,m;
  cin>>n>>m;
  queue<int> out;
  for(int i=0;i<m;i++){
    int a;
    cin>>a;
    out.push(a);
  }
  dp[0]=1;
  for(int i=0;i<n;i++){
    if(!que.empty()){
      if(out.front()==i){
        while(out.front()==i&&!que.empty()) out.pop();
        continue;
      }
    }
    dp[i+1]+=dp[i];
    dp[i+1]%=mod;
    dp[i+2]+=dp[i];
    dp[i+2]%=mod;
  }
  cout<<dp[n]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'que' was not declared in this scope
   21 |     if(!que.empty()){
      |         ^~~
Language: C++

#include  <iostream>
#include  <stdio.h>
#include <algorithm>
#include <map>
#include <math.h>

using namespace std;
#include <vector>
#define rep(i,n) for (ll i = 0; i < (n) ; i++)
#define INF 1e9
#define llINF 1e18
#define base10_4 10000      //1e4
#define base10_5 100000     //1e5
#define base10_6 1000000    //1e6
#define base10_7 10000000   //1e7
#define base10_8 100000000  //1e8
#define base10_9 1000000000 //1e9

#define MOD 1000000007
#define pb push_back
#define ll long long
#define ull unsigned long long
#define vint vector<int>
#define vll vector<ll>

//#include <stack>
//#include <queue>

// #include <iomanip>
//  cout << fixed << setprecision(15) << y << endl;

string ans_Yes = "Yes"; 
string ans_No = "No"; 
string ans_yes = "yes"; 
string ans_no = "no"; 

ll H;
ll W;
ll C;
ll N;
ll M;
ll K;

ll ltmp;
string stmp;
double dtmp;
vll MASU[base10_5];

getTmpAns(ll hi,ll wi, ll dh , ll dw){
    ll tmpans = 0;
    while(1){
        hi += dh;
        wi += dw;

        if(hi<0 || hi >= H) break;
        if(wi<0 || wi >= W) break;
        if(MASU[hi][wi]==1) break;
        tmpans++;        
    }
    return tmpans;

}
ll llmin(ll a,ll b){
    if(a>=b) return b;
    return a;
}
ll llmax(ll a,ll b){
    if(a<=b) return b;
    return a;
}
int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    cin >> H;
    cin >> W;
    rep(hi,H){
        string S;
        cin >> S;
        rep(wi,W){
            //cout << wi << endl;
            if(S.substr(wi,1)=="#")   MASU[hi].push_back(1);
            else             MASU[hi].push_back(0);
        }
    }

    ll ans = 0;
    rep(hi,H){
        rep(wi,W){
            if(MASU[hi][wi] != 1){
                ll tmpans = 1;
                tmpans += getTmpAns(hi,wi,1,0);
                tmpans += getTmpAns(hi,wi,-1,0);
                tmpans += getTmpAns(hi,wi,0,1);
                tmpans += getTmpAns(hi,wi,0,-1);
                ans = llmax(ans,tmpans);
            }
        }
    }
    cout << ans << endl;
    

}

Compiler output:
a.cc:49:1: error: ISO C++ forbids declaration of 'getTmpAns' with no type [-fpermissive]
   49 | getTmpAns(ll hi,ll wi, ll dh , ll dw){
      | ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using Graph = vector<vector<int>>;
typedef long long ll;
typedef pair<int, int> P;

const int MOD = 1000000007;
const int INF_32 = 1LL << 30;
const int64_t INF_64 = 1LL << 60;

int main()
{
    int h, w;
    vector<string> s(h);
    rep(i, h) cin >> s[i];
    vector<vector<int>> cnt(h, vectro<int>(w));
    rep(i, h)
    {
        vector<int> done(w);
        rep(j, w)
        {
            if (s[i][j] == '#')
                continue;
            if (done[j])
                continue;
            int l = 0;
            while (j + l < w) {
                if (s[i][j + l] == '#')
                    break;
                ++l;
            }
            rep(k, l)
            {
                cnt[i][j + k] += l;
                done[j + k] = 1;
            }
        }
    }
    rep(j, w)
    {
        vector<int> done(h);
        rep(i, h)
        {
            if (s[i][j] == '#')
                continue;
            if (done[i])
                continue;
            int l = 0;
            while (i + l < w) {
                if (s[i + l][j] == '#')
                    break;
                ++l;
            }
            rep(k, l)
            {
                cnt[i + k][j] += l;
                done[i + k] = 1;
            }
        }
    }

    int ans = 0;
    rep(i, h) rep(j, w) ans = max(anc, cnt[i][j] - 1);
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: 'vectro' was not declared in this scope
   21 |     vector<vector<int>> cnt(h, vectro<int>(w));
      |                                ^~~~~~
a.cc:21:39: error: expected primary-expression before 'int'
   21 |     vector<vector<int>> cnt(h, vectro<int>(w));
      |                                       ^~~
a.cc:68:35: error: 'anc' was not declared in this scope; did you mean 'ans'?
   68 |     rep(i, h) rep(j, w) ans = max(anc, cnt[i][j] - 1);
      |                                   ^~~
      |                                   ans
Language: C

#include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define max(a, b) ((a) > (b) ? (a) : (b))

int main(void)
{
    int h, w;
    int **grid;
    int **ans;
    grid = (int**)malloc(sizeof(int*) * 2000);
    ans = (int**)malloc(sizeof(int*) * 2000);
    rep(i, 2000)
    {
        grid[i] = (int *)malloc(sizeof(int) * 2000);
        ans[i] = (int *)malloc(sizeof(int) * 2000);
    }
    
    scanf("%d%d", &h, &w);
    rep(i, h)
    {
        char tmp[w + 1];
        scanf("%s", tmp);
        rep(j, w)
        {
            if (tmp[j] == '.')
                grid[i][j] = 0;
            else
                grid[i][j] = 1;
        }
    }

    rep(i, h)
    {
        int sum[w] = {0};
        int sumCnt = 0;
        rep(j, w)
        {
            if (grid[i][j] == 0)
                sum[sumCnt]++;
            else
                sumCnt++;
        }

        sumCnt = 0;
        rep(j, w)
        {
            if (grid[i][j] == 0)
                ans[i][j] += sum[sumCnt];
            else
                sumCnt++;
        }
    }
    rep(i, w)
    {
        int sum[h] = {0};
        int sumCnt = 0;
        rep(j, h)
        {
            if (grid[j][i] == 0)
                sum[sumCnt]++;
            else
                sumCnt++;
        }

        sumCnt = 0;
        rep(j, w)
        {
            if (grid[j][i] == 0)
                ans[j][i] += sum[sumCnt];
            else
                sumCnt++;
        }
    }

    int max = -1;
    rep(i, h)
        rep(j, w)
            max = max(max, ans[i][j]);

    printf("%d\n", max - 1);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:35:22: error: variable-sized object may not be initialized except with an empty initializer
   35 |         int sum[w] = {0};
      |                      ^
main.c:56:22: error: variable-sized object may not be initialized except with an empty initializer
   56 |         int sum[h] = {0};
      |                      ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define max(a, b) ((a) > (b) ? (a) : (b))

int main(void)
{
    int h, w, grid[200][200], ans[200][200] = {0};
    scanf("%d%d", &h, &w);
    rep(i, h)
    {
        char tmp[w + 1];
        scanf("%s", tmp);
        rep(j, w)
        {
            if (tmp[j] == '.')
                grid[i][j] = 0;
            else
                grid[i][j] = 1;
        }
    }

    rep(i, h)
    {
        int sum[w] = {0};
        int sumCnt = 0;
        rep(j, w)
        {
            if (grid[i][j] == 0)
                sum[sumCnt]++;
            else
                sumCnt++;
        }

        sumCnt = 0;
        rep(j, w)
        {
            if (grid[i][j] == 0)
                ans[i][j] += sum[sumCnt];
            else
                sumCnt++;
        }
    }
    rep(i, w)
    {
        int sum[h] = {0};
        int sumCnt = 0;
        rep(j, h)
        {
            if (grid[j][i] == 0)
                sum[sumCnt]++;
            else
                sumCnt++;
        }

        sumCnt = 0;
        rep(j, w)
        {
            if (grid[j][i] == 0)
                ans[j][i] += sum[sumCnt];
            else
                sumCnt++;
        }
    }

    int max = -1;
    rep(i, h)
        rep(j, w)
            max = max(max, ans[i][j]);

    printf("%d\n", max - 1);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:22: error: variable-sized object may not be initialized except with an empty initializer
   25 |         int sum[w] = {0};
      |                      ^
main.c:46:22: error: variable-sized object may not be initialized except with an empty initializer
   46 |         int sum[h] = {0};
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
typedef long long ll;
typedef pair<int,int> pii;

int field[2005][2005];
int hcos[2005][2005];
int wcos[2005][2005];
int main(){
    int h,w;
    cin>>h>>w;
    REP(i,h){
        string s;
        cin>>s;
        REP(j,w){
            if(s[j]=='.'){
                field[i][j]=0;
            }else{
                field[i][j]=1;
            }
        }
    }

    REP(i,h){
        int cnt=0;
        REP(j,w){
            if(field[i][j]==1){
                cnt = 0;
                hcos[i][j]=0;
            }else{
                cnt++;
                hcos[i][j]=cnt;
            }
        }
        for(int j=w-1;j>0;j--){
            if(hcos[i][j]==0) continue;
            if(hcos[i][j]<hcos[i][j+1]){
                hcos[i][j]=hcos[i][j+1];
            }
        }
    }

    REP(j,w){
        int cnt=0;
        REP(i,h){
            if(field[i][j]==1){
                cnt = 0;
                vcos[i][j]=0;
            }else{
                cnt++;
                vcos[i][j]=cnt;
            }
        }
        for(int i=h-1;i>0;i--){
            if(vcos[i][j]==0) continue;
            if(vcos[i][j]<vcos[i+1][]){
                vcos[i][j]=vcos[i+1][j];
            }
        }
    }
    ll ans = 1e9+7;
    REP(i,h){
        REP(j,w){
            if(field[i][j]==1) continue;
            ans = min(ans,vcos[i][j]+hcos[i][j]-1);
        }
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:17: error: 'vcos' was not declared in this scope; did you mean 'wcos'?
   50 |                 vcos[i][j]=0;
      |                 ^~~~
      |                 wcos
a.cc:53:17: error: 'vcos' was not declared in this scope; did you mean 'wcos'?
   53 |                 vcos[i][j]=cnt;
      |                 ^~~~
      |                 wcos
a.cc:57:16: error: 'vcos' was not declared in this scope; did you mean 'wcos'?
   57 |             if(vcos[i][j]==0) continue;
      |                ^~~~
      |                wcos
a.cc:58:16: error: 'vcos' was not declared in this scope; did you mean 'wcos'?
   58 |             if(vcos[i][j]<vcos[i+1][]){
      |                ^~~~
      |                wcos
a.cc:58:37: error: expected primary-expression before ']' token
   58 |             if(vcos[i][j]<vcos[i+1][]){
      |                                     ^
a.cc:67:27: error: 'vcos' was not declared in this scope; did you mean 'wcos'?
   67 |             ans = min(ans,vcos[i][j]+hcos[i][j]-1);
      |                           ^~~~
      |                           wcos
Language: C++

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

int main(){
  int H,W;
  cin>>H>>W;

  int L[2010][2010], R[2010][2010], D[2010][2010], U[2010][2010];
  bool grid[2010][2010];
  for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
char a;
  cin>>a;
  if(a=='.') grid[i][j]=true;
  else grid[i][j]=false;

  }
  }

  
  for(int i=0; i<H; i++){
    int cur=0;
    for(int j=0; j<W; j++){
if(grid[i][j]==false) cur=0;
     else cur++;
      L[i][j]=cur;
    }
      for(int i=0; i<H; i++){
    int cur=0;
    for(int j=W; j>-1; j--){
if(grid[i][j]==false) cur=0;
     else cur++;
      R[i][j]=cur;
    }
        for(int j=0; j<W; j++){
    int cur=0;
    for(int i=0; i<H; i++){
if(grid[i][j]==false) cur=0;
     else cur++;
      U[i][j]=cur;
    }  
          
     for(int j=0; j<W; j++){
    int cur=0;
    for(int i=H; i>-1; i--){
if(grid[i][j]==false) cur=0;
     else cur++;
      D[i][j]=cur;
    }int res=0;
       for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
      res=max(res,D[i][j]+U[i][j]+R[i][j]+L[i][j]);
}
       }
  
    cout<<res-3<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:2: error: expected '}' at end of input
   57 | }
      |  ^
a.cc:35:31: note: to match this '{'
   35 |         for(int j=0; j<W; j++){
      |                               ^
a.cc:57:2: error: expected '}' at end of input
   57 | }
      |  ^
a.cc:28:29: note: to match this '{'
   28 |       for(int i=0; i<H; i++){
      |                             ^
a.cc:57:2: error: expected '}' at end of input
   57 | }
      |  ^
a.cc:21:25: note: to match this '{'
   21 |   for(int i=0; i<H; i++){
      |                         ^
a.cc:57:2: error: expected '}' at end of input
   57 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int H,W;
  cin>>H>>W;

  int L[2010][2010], R[2010][2010], D[2010][2010], U[2010][2010];
  bool grid[2010][2010];
  for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
char a;
  cin>>a;
  if(a=='.') grid[i][j]=true;
  else grid[i][j]=false;

  }
  }

  
  for(int i=0; i<H; i++){
    int cur=0;
    for(int j=0; j<W; j++){
if(grid[i][j]==false) cur=0;
     else cur++;
      L[i][j]=cur;
    }
      for(int i=0; i<H; i++){
    int cur=0;
    for(int j=W; j>-1; j--){
if(grid[i][j]==false) cur=0;
     else cur++;
      R[i][j]=cur;
    }
        for(int j=0; j<W; j++){
    int cur=0;
    for(int i=0; i<H; i++){
if(grid[i][j]==false) cur=0;
     else cur++;
      U[i][j]=cur;
    }  
          
     for(int j=0; j<W; j++){
    int cur=0;
    for(int i=H; i>-1; i--){
if(grid[i][j]==false) cur=0;
     else cur++;
      D[i][j]=cur;
    }int res=0;
       for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
      res=max(res,D[i][j]+U[i][j]+R[i][j]+L[i][j]);
  
    cout<<res-3<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:50:30: note: to match this '{'
   50 |        for(int i=0; i<H; i++){
      |                              ^
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:43:28: note: to match this '{'
   43 |      for(int j=0; j<W; j++){
      |                            ^
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:35:31: note: to match this '{'
   35 |         for(int j=0; j<W; j++){
      |                               ^
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:28:29: note: to match this '{'
   28 |       for(int i=0; i<H; i++){
      |                             ^
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:21:25: note: to match this '{'
   21 |   for(int i=0; i<H; i++){
      |                         ^
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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


  
  

int main(){
  int H,W;
  cin>>H>>W;
  int res=0;
  
  bool grid[2010][2010];
  for(int i=0; i<H; i++){
    for(int j=0; j<W; j++){
      char a;
       scanf_s("%s", &a);
  if(a=='.') grid[i][j]=true;
      else grid[i][j]=false;
    }
  }
  
   for(int i=0; i<H; i++){
    for(int j=0; j<W; j++){
      int counter=0;
      if(grid[i][j]==false) continue;
      int r=i; int l=j;
      while(r>0){ 
        r--;
        if(grid[r][l]==false) break;
        counter++;
      }
        r=i; l=j;
      while(r<H-1){
        r++;
        if(grid[r][l]==false) break;
        counter++;
      } 
         r=i; l=j;
      while(l>-1){ 
        l--;
        if(grid[r][l]==false) break;
        counter++;
      } 
      r=i; l=j;
       while(l<W-1){ 
        l++;
        if(grid[r][l]==false) break;
        counter++;
      } 
      res=max(res,counter);
    }
   }
  cout<<res+1<<endl;
}
       
      


Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   17 |        scanf_s("%s", &a);
      |        ^~~~~~~
      |        scanf
Language: C++

#include<iostream>
#include<vector>
using namespace std;
vector<vector<char>> c(2005,vector<char>(2005));

int f(int a,int b,int i,int j,int d=0){
  if(c.at(i+a).at(j+b)=='#'||i+a>=H||i+a<0||j+b<0||j+b>=W){
    return d;
  }else{
    return f(a,b,i+a,j+a,d+1);
  }
}

int main(){
  int H,W,ans=0,temp=0;
  cin>>H>>W;
  
  for(int i=0;i<H;i++){
    cerr<<endl;
    for(int j=0;j<W;j++){
    cin>>c.at(i).at(j);
    cerr<<c.at(i).at(j);
  }}
  
  for(int i=0;i<H;i++){for(int j=0;j<W;j++){
    if(c.at(i).at(j)=='#'){continue;}
    temp+=f(1,0,i,j);
    temp+=f(0,1,i,j);
    temp+=f(-1,0,i,j);
    temp+=f(0,-1,i,j);
    ans=max(ans,temp);
  }}
  
  cout<<ans;
}

Compiler output:
a.cc: In function 'int f(int, int, int, int, int)':
a.cc:7:35: error: 'H' was not declared in this scope
    7 |   if(c.at(i+a).at(j+b)=='#'||i+a>=H||i+a<0||j+b<0||j+b>=W){
      |                                   ^
a.cc:7:57: error: 'W' was not declared in this scope
    7 |   if(c.at(i+a).at(j+b)=='#'||i+a>=H||i+a<0||j+b<0||j+b>=W){
      |                                                         ^
a.cc:12:1: warning: control reaches end of non-void function [-Wreturn-type]
   12 | }
      | ^
Language: C++

#include<iostream>
#include <algorithm>
#include <functional>
#include<vector>
#include<math.h>
#include <assert.h>
#include<bitset>
#include<string>
#include <deque>
#include<queue>
#include <iomanip>
#include<map>
#include <random>
#include<type_traits>
#include<stack>
#include <sstream> 
#include <limits>
#include <numeric>
#include<string.h>
#include<set>
#include <climits>
using namespace std;
typedef unsigned long long ull;
#define ll long long int
static const double PI = 3.141592653589793;
const ll INF = 100000000000000;
ll mod = 1000000007;
//typedef vector<int> V;
//typedef vector<V> VV;
//typedef vector<VV> VVV;

ll board[2005][2005];
string check[2005];

int main() {
	ll h, w;
	cin >> h >> w;
	for (int i = 0; i < h; i++) {
		cin >> check[i];
	}

	for (int i = 0; i < h; i++) {
		int s = 0, t = 0,c=0;
		while (s < w) {
			if (t >= w) {
				for (int j = s; j < t - 1; j++) {
					board[i][j] += c;
				}
				break;
			}
			if (check[i][t] == '#') {
				for (int j = s; j < t - 1; j++) {
					board[i][j] += c;
				}
				c = 0;
				s = t + 1;
				if (t >= w)break;
			}
			else {
				c++;
			}
			t++;
		}
	}
	for (int i = 0; i < w; i++) {
		int s = 0, t = 0, c = 0;
		while (s < h) {
			if (t >= h) {
				for (int j = s; j < t - 1; j++) {
					board[j][i] += c;
				}
				break;
			}
			if (check[t][i] == '#') {
				for (int j = s; j < t - 1; j++) {
					board[j][i] += c;
				}
				c = 0;
				s = t + 1;
			}
			else {
				c++;
			}
			t++;
		}
	}
	ll y = 0;
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			y = max(y, board[i][j]);
		}
	}
	cout << max(ll(0), y - 1) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:12: error: expected primary-expression before 'long'
   24 | #define ll long long int
      |            ^~~~
a.cc:93:21: note: in expansion of macro 'll'
   93 |         cout << max(ll(0), y - 1) << endl;
      |                     ^~
Language: C++

import numpy as np
h, w = map(int,input().split())
map=[list(input()) for _ in range(h)]

map = [[1 if s == '.' else 0 for s in map[i]] for i in range(h)]
map = np.array(map,dtype=int)
l=map.copy()
r=map.copy()
u=map.copy()
d=map.copy()

for i in range(1,h):
    u[i] += u[i-1]
    u[i] *= map[i]
for i in range(h-1, 0, -1):
    d[i-1] += d[i]
    d[i-1] *= map[i-1]
for i in range(w):
    l[:, i] += l[:, i-1]
    l[:, i] *= map[:, i]
for i in range(w-1, 0, -1):
    r[:, i-1] += r[:, i]
    r[:, i-1] *= map[:, i-1]

print((u+d+l+r).max()-3)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.H>
using namespace std;
typedef long long int ll;
int main()
{
    ll h,w;
    cin>>h>>w;
    vector<string>v(h);
    for(int i=0;i<h;i++)
        cin>>v[i];

    // left array computation
    vector<vector<int>>left(h,vector<int>(w,0));
    for(int i=0;i<h;i++)
    {
        if(v[i][0]=='.'){
        left[i][0]=1;
        }
    }
    for(int i=0;i<h;i++)
    {
        for(int j=1;j<w;j++)
        {
            if(v[i][j]=='.')
            {
                left[i][j]=left[i][j-1]+1;
            }
            else if(v[i][j]=='#')
            {
                left[i][j]=0;
            }
        }
    }


     vector<vector<int>>right(h,vector<int>(w,0));
    for(int i=0;i<h;i++)
    {
        if(v[i][w-1]=='.'){
        right[i][w-1]=1;
        }
    }
    for(int i=0;i<h;i++)
    {
        for(int j=w-2;j>=0;j--)
        {
            if(v[i][j]=='.')
            {
                right[i][j]=right[i][j+1]+1;
            }
            else if(v[i][j]=='#')
            {
                right[i][j]=0;
            }
        }
    }


    //up

     vector<vector<int>>up(h,vector<int>(w,0));
    for(int i=0;i<w;i++)
    {
        if(v[0][i]=='.'){
        up[0][i]=1;
        }
    }
    for(int i=1;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            if(v[i][j]=='.')
            {
                up[i][j]=up[i-1][j]+1;
            }
            else if(v[i][j]=='#')
            {
                up[i][j]=0;
            }
        }
    }

    // down


     vector<vector<int>>down(h,vector<int>(w,0));
    for(int i=0;i<w;i++)
    {
        if(v[h-1][i]=='.'){
        down[h-1][i]=1;
        }
    }
    for(int i=h-2;i>=0;i--)
    {
        for(int j=0;j<w;j++)
        {
            if(v[i][j]=='.')
            {
                down[i][j]=down[i+1][j]+1;
            }
            else if(v[i][j]=='#')
            {
                down[i][j]=0;
            }
        }
    }


    int  res=INT_MIN;
    vector<vector<int>> ans(h,vector<int>(w,0));
    for(int i=0;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            if(v[i][j]=='.')
            {
               ans[i][j]=left[i][j]+right[i][j]+down[i][j]+up[i][j]-3;
               res=max(res,ans[i][j]);
            }
            else
            {
                continue;
            }
        }
    }
    cout<<res;
}


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

#include <iostream>
#include <vector>
#include <string>
using namespace std;
 
int H, W;
vector<string> fi;
int Left[2100][2100], Right[2100][2100], Up[2100][2100], Down[2100][2100];
 
int main(){
  cin >> H >> W;
  fi.resize(H);
  for(int i=0; i<H; i++) cin >> fi[i];
  
  for(int i=0; i<H; i++){
    int cur =0;
    for(int j=0; j<W; j++){
      if(fi[i][j] == '#') cur = 0;
      else cur++;
      Left[i][j] = cur;
    }
  }
 
  for(int i=0; i<H; i++){
    int cur = 0;
    for(int j=W-1; j>=0; j--){
      if(fi[i][j] == '#') cur = 0;
      else cur++;
      Right[i][j] = cur;
    }
  }
  
  for(int i=0; i<W; i++){
    int cur =0;
    for(int j=0; j<H; j++){
      if(fi[j][i] == '#') cur = 0;
      else cur++;
      Down[j][i] = cur;
    }
  }
  
  for(int i=0; i<W; i++){
    int cur = 0;
    for(int j=H-1; j>=0; j--){
      if(fi[j][i] == '#') cur == 0;
      else cur++;
      Up[j][i] = cur;
    }
  }
  
  int res = 0;
  for(int i=0; i<H; i++){
    for(int j=0; j<W; j++){
      if(fi[i][j] == '#') continue;
      res = max(res, Right[i][j]+Left[i][j]+Down[j][i]+Up[j][i]-3);
    }
  }
  
  cout << res << enfl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:18: error: 'enfl' was not declared in this scope
   59 |   cout << res << enfl;
      |                  ^~~~