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

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <map>
using namespace std;
int main()
{
    int n,t,q;
    while(~scanf("%d%d",&n,&t))
    {
        long long sum=0;
        long long m=-1;
        for(int i=0; i<n; i++)
        {
            scanf("%d",&q);
            m=max(m,q);
            sum+=q;
            if(t>=sum)
                printf("%lld\n",(t-sum)/m+2);
            else
                printf("1\n");
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: no matching function for call to 'max(long long int&, int&)'
   18 |             m=max(m,q);
      |               ~~~^~~~~
In file included from /usr/include/c++/14/string:51,
                 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:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:18: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 |             m=max(m,q);
      |               ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:18:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 |             m=max(m,q);
      |               ~~~^~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;

#define MAX 100005

int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];

int main() {
  scanf("%d %d", &n, &t);

  c[1] = 0;
  s[1] = 0;
  scanf("%d", &h[1]);
  for ( int i = 2; i <= n; i++ ) {
    scanf("%d", &h[i]);
    c[i] = h[i - 1] + h[i - 2];
    s[i] = h[i] > h[i - 1] ? 1 : 0;
  }

  // for ( int i = 1; i <= n; i++ ) {
  //   printf("h:%d, c:%d, s:%d\n", h[i], c[i], s[i]);
  // }

  int t;
  int p;
  int q;
  int temp;
  t = l - c[1];
  p = l / h[1];
  q = l % h[1];
  if ( q == 0 ) {
    p += 1;
  }
  o[1] = p;
  printf("%d", o[1]);
  for ( int i = 2; i <= n; i++ ) {
    t = l - c[i];
    if (s[i] == 1 ) {
      temp = h[i] - h[i - 1];
    } else {
      temp = h[i];
    }
    p = l / temp;
    q = l % temp;
    if ( q == 0 ) {
      p += 1;
    }
    o[i] = p;
    printf("%d\n", o[i]);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
   40 |   t = l - c[1];
      |       ^
Language: C++

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

int main(void){
    int n,t;
    cin>>n>>t;
    vector<ll> s(n+1);
    ll cycle = 0;
    rep(i,n) {
        ll h;
        cin>>h;
        s[i+1] = s[i] + h;
        cycle = max(cycle, h);
        ll tt = t-s[i];
        ll res = tt/cycle + 1;
        if(tt%cycle >= h) res++;
        cout<<max(res,0)<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: no matching function for call to 'max(ll&, int)'
   19 |         cout<<max(res,0)<<endl;
      |               ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:18: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |         cout<<max(res,0)<<endl;
      |               ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:19:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |         cout<<max(res,0)<<endl;
      |               ~~~^~~~~~~
Language: C

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#define MAXN 1<<19
#define inf 1000000007
using namespace std;
int n,k;
int tt;
int w[MAXN];
char a[MAXN],b[MAXN];
int f[MAXN];
int seg[MAXN << 1];
void modify(int sit,int x)
{
	seg[sit+=MAXN]=x;
	for(sit >>= 1; sit ; sit>>=1)
	{
		seg[sit]=min(seg[sit<<1],seg[sit<<1|1]);
	}
}
int query(int l,int r)
{
	int mn=inf;
	for(l += MAXN,r+=(MAXN)+1;l<r;l>>=1,r>>=1)
	{
		if(l & 1) mn=min(mn,seg[l++]);
		if(r & 1) mn=min(mn,seg[--r]);
	}
	return mn;
}
int main()
{
	scanf("%d %d",&n,&k);
	scanf("%s",a+1);
	scanf("%s",b+1);
	int xx=1;
	while(xx*2<k){xx*=2;tt++;}
	for(int i=1;i<=n;i++)
	{
		f[i]=inf;
	}
	b[0]=-1;
	for(int i=1;i<=n;i++)
	{
		w[i]=w[i-1];
		if(b[i]!=b[i-1])
		{
			w[i]++;
		}
	}
	modify(0,0+0-1);
	for(int i=1;i<=n;i++)
	{
		if(a[i]==b[i]){f[i]=f[i-1];}
		else f[i]=(w[i]+query(max(0,i-k),i-1)+1)/2+1;
		modify(i,2*f[i]-w[i+1]);
	}
	printf("%d\n",f[n]);
	return 0;
}




Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

const int MaxN = 500000;
using namespace std;

int dp[MaxN + 5];
char s[MaxN + 5], t[MaxN + 5];
int n, K;
int main() 
{
	while(~scanf("%d%d", &n, &K)) {
		scanf("%s%s", s + 1, t + 1);
		int ans = 0;
		for (int i = 1; i <= n; i++) {
			if(s[i] != t[i]) {
				ans++;
				if(i == n) {
					break;
				}
				int l = 1; while(l + i <= n && l < K && (t[i] == t[l + i] || t[l + i] == s[i])) l++;
				int now = i + l - 1;
				t[now] = s[i];
				int t = now;
				while(s[t] == s[now] && now > i) now--;
				int tmp = 0;
				for (int j = i; j < now; j++) {
					if(s[j] != s[i]) tmp++;
					else {
						ans += (tmp + K - 1) / K;
						tmp = 0;
					}
				}
				ans += (tmp + K - 1) / K;
				i = now;
			}
		}
		printf("%d\n", ans);
	}
	return 0;
}



Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int INF = 1 << 30;

struct SegNode
{
  int v;

  SegNode(int v) : v(v) {}

  SegNode operator*(const SegNode &r) const
  {
    return (v < r.v ? *this : r);
  }
} e(INF);

struct SegmentTree
{
  int sz;
  vector< SegNode > seg;

  SegmentTree(int n)
  {
    sz = 1;
    while(sz < n) sz <<= 1;
    seg.assign(2 * sz - 1, e);
  }

  void update(int k, const SegNode &x)
  {
    k += sz - 1;
    seg[k] = x;
    while(k > 0) {
      k = (k - 1) >> 1;
      seg[k] = seg[2 * k + 1] * seg[2 * k + 2];
    }
  }

  SegNode query(int a, int b, int k, int l, int r)
  {
    if(a >= r || b <= l) return (e);
    if(a <= l && r <= b) return (seg[k]);
    return (query(a, b, 2 * k + 1, l, (l + r) >> 1) * query(a, b, 2 * k + 2, (l + r) >> 1, r));
  }

  SegNode query(int a, int b)
  {
    return (query(a, b, 0, 0, sz));
  }
};

int main()
{
  int N, K;
  string S, T;

  cin >> N >> K;

  cin >> S;
  cin >> T;

  vector< int > sweep(N + 1);
  for(int i = 0; i + 1 < N; i++) {
    if(T[i] != T[i + 1]) sweep[i + 1] = 1;
    sweep[i + 1] += sweep[i];
  }

  SegmentTree seg(N);
  vector< int > dp(N + 1, INF);
  dp[0] = 0;
  seg.update(0, 0);
  for(int i = 1; i <= N; i++) {
    dp[i] = min(dp[i - 1] + (S[i - 1] != T[i - 1], (seg.query(i - K, i - 1).v + 3 + sweep[i - 1]) / 2);
    seg.update(i, dp[i] * 2 - sweep[i]);
  }
  cout << dp.back() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:103: error: expected ')' before ';' token
   75 |     dp[i] = min(dp[i - 1] + (S[i - 1] != T[i - 1], (seg.query(i - K, i - 1).v + 3 + sweep[i - 1]) / 2);
      |                ~                                                                                      ^
      |                                                                                                       )
Language: Java

import java.util.Scanner;



public class I{
    public static final int MP = 200010; //MaxPassengers
    public static final int MSN = 100010; //MaxStationNumber
    public static class p{
        int bp; //boarding point
        int dp; //deplaning
    }
    public static void main(String[] args){
        int P1 = 0, P2 = 0;
        p[] pas = new p[MP]; //passenger
        int[] igo = new int[MSN]; //is getting on
        int[] agon = new int[MSN]; //already getting on
        int[] agoff= new int[MSN]; //already getting off 
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        for(int i = 0; i < n; i++){
            pas[i] = new p(); 
            pas[i].bp = Integer.parseInt(sc.next());
            pas[i].dp = Integer.parseInt(sc.next());
            igo[pas[i].bp]++;
            igo[pas[i].dp]--;
            agon[pas[i].bp]++;
            agoff[pas[i].dp]++;
        }
        for(int j = 1; j < MSN; j++){ //make Accumulation
            igo[j] += igo[j-1];
            agon[j] += agon[j-1];
            agoff[j] += agoff[j-1];
            if(P2 < igo[j]){ //Policy 2
                P2 = igo[j];
            }
        }
        for(int k = 1; k < n; k++){
            //i番目の人が降りる一つ前までの駅までに乗ってきた人数-i番目の人が乗る駅で降りている人数
            if(P1 < (agon[pas[k].dp - 1] - agoff[pas[k].bp])){ 
                P1 = agon[pas[k].dp - 1] - agoff[pas[k].bp];
            }
        }
        System.out.println(P1 + " " + P2);
        sc.close();   
    }
}


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

import java.util.Scanner;



public class Main{
    public static final int MP = 200010; //MaxPassengers
    public static final int MSN = 100010; //MaxStationNumber
    public static class p{
        int bp; //boarding point
        int dp; //deplaning
    }
    public static void main(String[] args){
        int P1 = 0, P2 = 0;
        p[] pas = new p[MP]; //passenger
        int[] igo = new int[MSN]; //is getting on
        int[] agon = new int[MSN]; //already getting on
        int[] agoff= new int[MSN]; //already getting off 
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        for(int i = 0; i < n; i++){
            pas[i] = new p(); 
            pas[i].bp = Integer.parseInt(sc.next());
            pas[i].dp = Integer.parseInt(sc.next());
            igo[pas[i].bp]++;
            igo[pas[i].dp]--;
            agon[pas[i].bp]++;
            agoff[pas[i].dp]++;
        }
        for(int j = 1; j < MSN; j++){ //make Accumulation
            igo[j] += igo[j-1];
            agon[j] += agon[j-1];
            agoff[j] += agoff[j-1];
            if(P2 < igo[j]){ //Policy 2
                P2 = igo[j];
            }
        }
        for(int k = 0; k < n; k++){
            //i番目の人が降りる一つ前までの駅までに乗ってきた人数-i番目の人が乗る駅で降りている人数
            if(P1 < (agon[pas[k].dp - 1] - agoff[pas[k].bp])){ 
                P1 = agon[pas[k].dp - 1] - agoff[pas[k].bp];
            }
        }
        System.out.println(P1 + " " + P2);
        sc.close();   
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main{
      | ^~~~~~
Language: C++

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

template <typename T,typename E>
struct SegmentTree{
  typedef function <T(T,T)> F;
  typedef function <T(T,E)> G;
  int n;
  F f;
  G g;
  T d1;
  E d0;
  vector<T> dat;
  SegmentTree(){};
  SegmentTree(int n_,F f,G g,T d1,
	      vector<T> v = vector<T>()):
    f(f),g(g),d1(d1){
    init(n_);
    if(n_==(int)v.size()) build(n_,v);
  }

  void init(int n_){
    n = 1;
    while(n<n_) n *= 2;
    dat.clear();
    dat.resize(2*n-1,d1);
  }
  
  void build(int n_,vector<T> v){
    for(int i=0;i<n_;i++) dat[i+n-1] = v[i];
    for(int i=n-2;i>=0;i--)
      dat[i] = f(dat[i*2+1],dat[i*2+2]);
  }

  inline int query(int a,int b,int c,int d,function< int(T, int, int)> calc){
    int vl = d1, vr = d1;
    for(int l=a+n,r=b+n;l<r;l>>=1,r>>=1){
      if(l&1) vl = vl+calc(dat[(l++)-1]);
      if(r&1) vr = calc(dat[(--r)-1])+vr;
    }
    return vl+vr;
  }
};

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin>>n;
  vector<int> s(n),t(n);
  for(int i=0;i<n;i++) cin>>s[i];
  const int MAX = 114514;
  using Vec = vector<int>;
  vector<Vec> v(MAX);
  for(int 
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:57:3: error: expected unqualified-id before 'return'
   57 |   return 0;
      |   ^~~~~~
a.cc:56:10: error: expected ';' before 'return'
   56 |   for(int
      |          ^
      |          ;
   57 |   return 0;
      |   ~~~~~~  
a.cc:57:3: error: expected primary-expression before 'return'
   57 |   return 0;
      |   ^~~~~~
a.cc:56:10: error: expected ';' before 'return'
   56 |   for(int
      |          ^
      |          ;
   57 |   return 0;
      |   ~~~~~~  
a.cc:57:3: error: expected primary-expression before 'return'
   57 |   return 0;
      |   ^~~~~~
a.cc:56:10: error: expected ')' before 'return'
   56 |   for(int
      |      ~   ^
      |          )
   57 |   return 0;
      |   ~~~~~~
Language: C++

from bisect import bisect
n, a, b, q = map(int, input().split())

W = [input().split() for i in range(a)]
X = [int(x) for x, c in W]
C = [c for x, c in W]

P = [list(map(int, input().split())) for i in range(b)]
Y = [y for y, h in P] + [n+1]
D = [0]*b

for i in range(b):
    y0, h = P[i]; y1 = Y[i+1]
    l = y1 - y0
    D[i] = min(y0 - h, l)

idx = 0
S = {}
for i in range(a):
    x = X[i]; c = C[i]
    S[x] = c
    if x < Y[0]:
        continue
    while Y[idx+1] <= x: idx += 1
    i = idx; j = i
    while Y[0] <= x:
        while x < Y[i]: i -= 1
        y0, h = P[i]; y1 = Y[i+1]
        if h == 0: break
        x = h + ((x - y0) % D[i])
        assert x < y0
        S[x] = c
def check(z):
    if z in S:
        return S[z]
    i = bisect(Y, z)-1
    while Y[0] <= z:
        while z < Y[i]: i -= 1
        y0, h = P[i]; y1 = Y[i+1]
        if h == 0: break
        z = h + ((z - y0) % D[i])
        assert z < y0
        if z in S:
            return S[z]
    return '?'

Z = [int(input()) for i in range(q)]
print(*map(check, Z), sep='')

Compiler output:
a.cc:48:27: error: empty character constant
   48 | print(*map(check, Z), sep='')
      |                           ^~
a.cc:1:1: error: 'from' does not name a type
    1 | from bisect import bisect
      | ^~~~
a.cc:13:19: error: 'y1' does not name a type
   13 |     y0, h = P[i]; y1 = Y[i+1]
      |                   ^~
a.cc:19:1: error: expected unqualified-id before 'for'
   19 | for i in range(a):
      | ^~~
a.cc:20:15: error: 'c' does not name a type
   20 |     x = X[i]; c = C[i]
      |               ^
a.cc:25:14: error: 'j' does not name a type
   25 |     i = idx; j = i
      |              ^
a.cc:28:23: error: 'y1' does not name a type
   28 |         y0, h = P[i]; y1 = Y[i+1]
      |                       ^~
a.cc:39:23: error: 'y1' does not name a type
   39 |         y0, h = P[i]; y1 = Y[i+1]
      |                       ^~
Language: C++

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

int n,m;
vector<int> G[100001];
vector<int> mdfG[100001];
bool used[100001];
vector<int> route;
int cmp[100001];
int all=0;
int ans=0;

set<deque<int> > se;

void dfs(int v,int p){
	used[v]=true;
	route.push_back(v);
	for(int i=0;i<mdfG[v].size();i++){
		int next=mdfG[v][i];
		if(p!=next){
			if(!used[next]){
				dfs(next,v);
			}else{
				deque<int> tmp;
				int si=route.size()-1;
				while(route[si]!=next){
					tmp.push_back(route[si]);
					si--;
				}
				tmp.push_back(next);
				int best=next;
				for(int j=0;j<tmp.size();j++){
					best=min(best,tmp[j]);
				}
				while(best!=tmp[0]){
					int tp=tmp.front();
					tmp.pop_front();
					tmp.push_back(tp);
				}
				se.insert(tmp);
			}
		}
	}
	used[v]=false;
	route.pop_back();
}

int main(void){
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++){
		int a,b;
		scanf("%d%d",&a,&b);
		a--;
		b--;
		G[a].push_back(b);
		G[b].push_back(a);
	}
	if(m==n-1){
		printf("0\n");
	}else if(m==n){
		printf("1\n");
	}else{
		queue<int> que;
		memset(cmp,-1,sizeof(cmp));
		for(int i=0;i<n;i++){
			if(G[i].size()>=3){
				cmp[i]=all++;
				for(int j=0;j<G[i].size();j++){
					if(G[G[i][j]].size()<=2){
						if(cmp[G[i][j]]==-1){
							cmp[G[i][j]]=all++;
							que.push(G[i][j]);
						}
					}
				}
			}
		}
		if(all.size()>=50)break;
		while(que.size()){
			int v=que.front();
			que.pop();
			for(int i=0;i<G[v].size();i++){
				if(cmp[G[v][i]]==-1){
					cmp[G[v][i]]=cmp[v];
					que.push(G[v][i]);
				}
			}
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<G[i].size();j++){
				if(cmp[i]!=cmp[G[i][j]])mdfG[cmp[i]].push_back(cmp[G[i][j]]);
			}
		}
		for(int i=0;i<all;i++){
			sort(mdfG[i].begin(),mdfG[i].end());
			mdfG[i].erase(unique(mdfG[i].begin(),mdfG[i].end()),mdfG[i].end());
		}
		dfs(0,-1);
		printf("%d\n",se.size()/2);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:24: error: request for member 'size' in 'all', which is of non-class type 'int'
   80 |                 if(all.size()>=50)break;
      |                        ^~~~
a.cc:80:35: error: break statement not within loop or switch
   80 |                 if(all.size()>=50)break;
      |                                   ^~~~~
Language: C++

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

int n,m;
vector<int> G[100001];
vector<int> mdfG[100001];
bool used[100001];
vector<int> route;
int cmp[100001];
int all=0;
int ans=0;

set<deque<int> > se;

void dfs(int v,int p){
	used[v]=true;
	route.push_back(v);
	for(int i=0;i<mdfG[v].size();i++){
		int next=mdfG[v][i];
		if(p!=next){
			if(!used[next]){
				dfs(next,v);
			}else{
				deque<int> tmp;
				int si=route.size()-1;
				while(route[si]!=next){
					tmp.push_back(route[si]);
					si--;
				}
				tmp.push_back(next);
				int best=next;
				for(int j=0;j<tmp.size();j++){
					best=min(best,tmp[j]);
				}
				while(best!=tmp[0]){
					int tp=tmp.front();
					tmp.pop_front();
					tmp.push_back(tp);
				}
				se.insert(tmp);
			}
		}
	}
	used[v]=false;
	route.pop_back();
}

int main(void){
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++){
		int a,b;
		scanf("%d%d",&a,&b);
		a--;
		b--;
		G[a].push_back(b);
		G[b].push_back(a);
	}
	if(m==n-1){
		printf("0\n");
	}else if(m==n){
		printf("1\n");
	}else{
		queue<int> que;
		memset(cmp,-1,sizeof(cmp));
		for(int i=0;i<n;i++){
			if(G[i].size()>=3){
				cmp[i]=all++;
				for(int j=0;j<G[i].size();j++){
					if(G[G[i][j]].size()<=2){
						if(cmp[G[i][j]]==-1){
							cmp[G[i][j]]=all++;
							que.push(G[i][j]);
						}
					}
				}
			}
		}
		if(all>=50)break;
		while(que.size()){
			int v=que.front();
			que.pop();
			for(int i=0;i<G[v].size();i++){
				if(cmp[G[v][i]]==-1){
					cmp[G[v][i]]=cmp[v];
					que.push(G[v][i]);
				}
			}
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<G[i].size();j++){
				if(cmp[i]!=cmp[G[i][j]])mdfG[cmp[i]].push_back(cmp[G[i][j]]);
			}
		}
		for(int i=0;i<all;i++){
			sort(mdfG[i].begin(),mdfG[i].end());
			mdfG[i].erase(unique(mdfG[i].begin(),mdfG[i].end()),mdfG[i].end());
		}
		dfs(0,-1);
		printf("%d\n",se.size()/2);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:28: error: break statement not within loop or switch
   80 |                 if(all>=50)break;
      |                            ^~~~~
Language: Java

package aoj_1500_id;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;

/**
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1500
 *
 */
public class TMain {

	private static int calcCompareNum(int sum, int lack, int[] list) {
		// 計算
		int combiNum=(int)Math.pow(list.length, lack);
		int[] sums=new int[combiNum];
		Arrays.fill(sums, 0);
		int t=1;
		int base=list.length;
		for(int i=lack-1; i>=0; i--) {
			for(int j=0; j<sums.length; j++) {
				int temp=j/t;
				sums[j]+=list[temp%base];
			}
			t*=base;
		}
		// 判定
		int count=0;
		for(int i=0; i<sums.length; i++)
			if(sum==sums[i]%10)
				count++;
		return count;
	}

	private static int bai(int val) {
		return val>5?(val-4)*2-1:2*val;
	}

	public static void main(String[] args) throws NumberFormatException, IOException {

		/** IDの桁数 */
		int n;
		/** 入力されたID */
		int lackOdd=0, lackEven=0, sum=0;
		/** 数字の候補の数 */
		int m;

		// データ読み込み
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		n=Integer.parseInt(br.readLine());
		char[] charArray=br.readLine().toCharArray();
		for(int i=charArray.length-1; i>=0; i--) {
			if(charArray[i]=='*')
				if(i%2==0)
					lackOdd++;
			else
				lackEven++;
		else
			sum+= i%2==0?Integer.parseInt(charArray[i]+""):bai(Integer.parseInt(charArray[i]+""));
		}
		m=Integer.parseInt(br.readLine());
		String line=br.readLine();
		String[] strArray=line.split(" ");
		LinkedList<Integer> tempCandidate=new LinkedList<Integer>();
		for(int i=0; i<m; i++) {
			int tempNum=Integer.parseInt(strArray[i]);
			tempCandidate.add(tempNum);
		}
		br.close();

		// 求める
		int num=10-sum%10;
		num%=10;
		int[] evenList=new int[tempCandidate.size()];
		int count=0;
		for(int val: tempCandidate)
			evenList[count++]=bai(val);
		int[] oddList=new int[tempCandidate.size()];
		count=0;
		for(int val: tempCandidate)
			oddList[count++]=val;

		count=0;
		for(int i=0; i<10; i++) {
			// (i+j)%10=numとなるjを作る
			int j=i<=num?(num-i):(num-i+10);
			// 奇数でiをつくり，偶数でjを作る
			int c1=calcCompareNum(i, lackEven, evenList);
			int c2=calcCompareNum(j, lackOdd, oddList);
			count+=c1*c2;
		}

		// 出力
		System.out.println(count);

	}
}

Compiler output:
Main.java:13: error: class TMain is public, should be declared in a file named TMain.java
public class TMain {
       ^
1 error
Language: Java


import java.io.IOException;
import java.util.Scanner;

import sun.launcher.resources.launcher;

public class Main {

	public static void main(String[] args) throws IOException {

		new Main().run();
	}

	private void run() throws IOException {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		char[] id = scanner.next().toCharArray();
		int m = scanner.nextInt();
		int[] a = new int[m];
		for (int i = 0; i < m; i++)
			a[i] = scanner.nextInt();
		int[][] dp = new int[10][n + 1];
		dp[0][0] = 1;
		for (int i = 0; i < n; i++)
			for (int j = 0; j < 10; j++) {
				if (id[n - i - 1] == '*')
					for (int k = 0; k < m; k++)
						dp[(j + slove(i, a[k])) % 10][i + 1] += dp[j][i];
				else
					dp[(j + slove(i, id[n - i - 1])) % 10][i + 1] += dp[j][i];
			}
		System.out.println(dp[0][n]);
	}

	private int slove(int p, int i) {
		int j = i * 2;
		return (p % 2 == 1) ? j / 10 + j % 10 : i;
	}
}

Compiler output:
Main.java:5: error: package sun.launcher.resources is not visible
import sun.launcher.resources.launcher;
                   ^
  (package sun.launcher.resources is declared in module java.base, which does not export it)
1 error
Language: C

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

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

typedef long double D;

const int LOOP=100;
const D PI=acos(-1);
const D EPS=1e-8;
D calc(vint r){
    int n=r.size();

    D ret=0.0;
    do{

        vint rr(n);
        rep(i,n)rr[i]=r[i]*r[(i+1)%n];

        int ei=LLONG_MAX;
        rep(i,n)chmin(ei,rr[i]);
        D lb=-ei;
        D ub=ei;

        rep(i,LOOP){
            D mid=(lb+ub)/2.0;
            D sum=0.0;
            rep(j,n)sum+=acos(mid/rr[j]);
            if(sum>2*PI)lb=mid;
            else ub=mid;
        }
        D sum=0.0;
        rep(j,n)sum+=acos(lb/rr[j]);
        if(abs(sum-2*PI)>EPS){
            continue; //???????
        }
        sum=0.0;
        rep(i,n)sum+=rr[i]*sin(acos(lb/rr[i]));
        chmax(ret,sum);
    }while(next_permutation(all(r)));
    return ret;
}

signed main(){
    int N;
    cin>>N;
    vint R(N);rep(i,N)cin>>R[i];

    sort(all(R));

    D ans=0.0;

    rep(i,1<<N){
        int num=__builtin_popcount(i);
        if(num<=2)continue;
        vint r;
        rep(j,N)if(i>>j&1)r.pb(R[j]);
        chmax(ans,calc(r));
    }

    printf("%.20Lf\n",ans/2.0);
    return 0;
}



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

#include<iostream>
#include<string>
using namespace std;
 
#define N 100000
 
int q2n[10] = {0,2,4,6,8,1,3,5,7,9};
 
int main() {
    int n, a[10], m, dp[N+1][10];
    string s;
    cin >> n >> s;
    cin >> m;
    for(int j=0; j<10; ++j) dp[0][j] = 0;
    for(int i=0; i<m; ++i) cin >> a[i];
    dp[0][0] = 1;
    for(int i=0; i<n; ++i) {
        for(int j=0; j<10; ++j) dp[i+1][j] = 0;
        if(s[n-1-i]=='*') {
            if(i%2) {
                for(int j=0; j<10; ++j) for(int k=0; k<m; ++k) {
                    dp[i+1][(j+q2n[a[k]])%10] += dp[i][j];
                }
            }else {
                for(int j=0; j<10; ++j) for(int k=0; k<m; ++k) {
                    dp[i+1][(j+a[k])%10] += dp[i][j];
                }
            }
        }else {
            if(i%2) {
                for(int j=0; j<10; ++j) {
                    dp[i+1][(j+q2n[(int)(s[n-1-i]-'0')])%10] += dp[i][j];
                }
            }else {
                for(int j=0; j<10; ++j) {
                    dp[i+1][(j+(int)(s[n-1-i]-'0'))%10] += dp[i][j];
                }
            }
        }
    }
    cout << dp[n][0] << endl;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:42:14: error: expected '}' at end of input
   42 |     return 0;
      |              ^
a.cc:9:12: note: to match this '{'
    9 | int main() {
      |            ^
Language: C++

n = gets.to_i
s = gets.chomp
gets
candidates = gets.split.map(&:to_i)
dp = [1] + [0] * 9
(0..s.size-1).each do |i|
    new_dp = [0] * 10
    (s[i] == ?* ? candidates : [s[i].to_i]).each do |c|
        if (s.size - i).even?
            c = (c * 2).to_s.split("").map(&:to_i).inject(:+)
        end
        (0..9).each do |j|
            new_dp[(j + c) % 10] += dp[j]
        end
    end
    dp = new_dp
end
p dp[0]


Compiler output:
a.cc:6:2: error: too many decimal points in number
    6 | (0..s.size-1).each do |i|
      |  ^~~~~~~~~~~
a.cc:12:10: error: too many decimal points in number
   12 |         (0..9).each do |j|
      |          ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int n;
string s;
vector<int> V;
int ans;

void input(){

  cin >> n;
  cin >> s;
  int m;
  cin >> m;
  while(m--){
    int in;
    cin >> in;
    V.push_back(in);
  }
}

bool isValid(string str){

  reverse(str.begin(),str.end());

  int num = 0;

  for(int i = 0; i < str.length(); i++){

    if(i%2){
      //even
      int tmp = str[i]-'0';
      tmp*=2;
      num += tmp/10 + tmp%10;
    }else{
      //odd
      num += str[i]-'0';
    }
  }
  return num%10 == 0;
}

void solve(int num, string str){
 
  if(num > 0){
    for(int i = 0; i < V.size(); i++){
      string tmp = str;
      for(int j = 0; j < tmp.length(); j++)
	if(tmp[j] == '*'){
	  tmp[j] = V[i]+'0';
	  break;
	}
      solve(num-1,tmp);
    }
  }else{
    //   cout << "str " << str << endl;
    if(isValid(str)) ans++;
  }
}


int main(){

  input();
  int num = 0;

  for(int i = 0; i < s.length(); i++)
    if(s[i] == '*') num++;

  solve(num,s);
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'bool isValid(std::string)':
a.cc:26:3: error: 'reverse' was not declared in this scope
   26 |   reverse(str.begin(),str.end());
      |   ^~~~~~~
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#include <string>

using namespace std;

#define rep(i,a,b) for(int i=(a); i<(b); i++)

// i番目(0-index)にnが来た
int dig(int i, int n){
  if(i%2 == 1) n*=2;
  if(n>9) n = n/10 + n%10;
  return n;
}

int n,m;
string id;
int a[10];
unsigned int dp[100000][10];

int main(){
  cin >> n >> id >> m;
  rep(i,0,m) cin >> a[i];

  memset(dp,0,sizeof(dp));
  if(id[0] == '*'){
    rep(i,0,m){
      dp[0][dig(0,a[i])] = 1;
    }
  } else {
    dp[0][dig(0,id[0])] = 1;
  }
  reverse(id.begin(), id.end());
  rep(i,1,n){
    rep(j,0,10){
      if(id[i] != '*'){
        dp[i][(j+dig(i,id[i]-'0'))%10] += dp[i-1][j];
      } else {
        rep(k,0,m){
          dp[i][(j+dig(i,a[k]))%10] += dp[i-1][j];
        }
      }
    }
  }

  cout << dp[n-1][0] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:3: error: 'reverse' was not declared in this scope
   34 |   reverse(id.begin(), id.end());
      |   ^~~~~~~
Language: C++

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

int main(){
	int n, m;
	string id;

	cin >> n >> id >> m;

	vector<int> v(m);
	for(int i=0;i<m;i++)cin >> v[i];

	reverse(id.begin(), id.end());

	int checksum = 0;
	vector<int> star;

	for(int i=0;i<id.size();i++){
		if(id[i] == '*'){
			star.push_back(i);
		} else {
			int n = id[i] - '0';
			if(i % 2 == 0){
				checksum += n;
			} else {
				n *= 2;
				checksum += n / 10;
				checksum += n % 10;
			}
		}
	}

	int all = 1;
	for(int i=0;i<star.size();i++)all *= m;

	int res = 0;

	for(int mask=0;mask<all;mask++){
		int tmp = mask;
		int sum = checksum;

		for(int i=0;i<star.size();i++){
			int d = v[tmp % m];
			
			if(star[i] % 2 == 0){
				sum += d;
			} else {
				d *= 2;
				sum += d / 10;
				sum += d % 10;
			}

			tmp /= m;
		}

		if(sum % 10 == 0)++res;
	}

	cout << res << endl;

	return 0;
}

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

#include<cstdio>
#include<iostream>

#define NMAX 100000
#define MMAX 10
#define AMAX 9
#define KMAX 7

using namespace std;

int n;
char inp;
int ID[NMAX+20];
int m;
int cand[MMAX+5];

int OVERSUM(int x){
	return x%10+x/10;
}
int ID_CHECK(int cnt,int sum){

	if(cnt==n){a
		if(sum%10==0) return 1;
		else return 0;
	}

	int flag=0,ans=0,tmp;

	if((cnt+1)%2==0) flag=2;
	else flag=1;
		if(ID[cnt]==-1){
			for(int i=0;i<m;i++){
				tmp=OVERSUM(cand[i]*flag);
				ans+=ID_CHECK(cnt+1,sum+tmp);
			}
		}
		else{
			tmp=OVERSUM(ID[cnt]*flag);
			ans+=ID_CHECK(cnt+1,sum+tmp);
		}
		return ans;
}

int main(void){

	cin>>n;

	getchar();

	for(int i=n-1;i>=0;i--){
		inp=getchar();
		if(inp!='*') ID[i]=inp-'0';
		else ID[i]=-1;
	}

	cin>>m;

	for(int i=0;i<m;i++){
		cin>>cand[i];
	}

	cout<<ID_CHECK(0,0)<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int ID_CHECK(int, int)':
a.cc:22:20: error: 'a' was not declared in this scope
   22 |         if(cnt==n){a
      |                    ^
a.cc:24:17: error: expected '}' before 'else'
   24 |                 else return 0;
      |                 ^~~~
a.cc:22:19: note: to match this '{'
   22 |         if(cnt==n){a
      |                   ^
a.cc: At global scope:
a.cc:29:9: error: expected unqualified-id before 'if'
   29 |         if((cnt+1)%2==0) flag=2;
      |         ^~
a.cc:30:9: error: expected unqualified-id before 'else'
   30 |         else flag=1;
      |         ^~~~
a.cc:31:17: error: expected unqualified-id before 'if'
   31 |                 if(ID[cnt]==-1){
      |                 ^~
a.cc:37:17: error: expected unqualified-id before 'else'
   37 |                 else{
      |                 ^~~~
a.cc:41:17: error: expected unqualified-id before 'return'
   41 |                 return ans;
      |                 ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
a.cc: In function 'int ID_CHECK(int, int)':
a.cc:25:9: warning: control reaches end of non-void function [-Wreturn-type]
   25 |         }
      |         ^
Language: C

#include<stdio.h>
#include<math.h>
int E[2],A[2],B[9][2],i,j,k,m=1<<30,R,M=100000007,P[1005][1005]={0};
int d(int a[2],int b[2]){return abs(a[0]-b[0])+abs(a[1]-b[1]);}
int min(int a,int b){return a<b?a:b;}
int C(int p,int q)
{
	P[0][0]=1;
	for(int i=0;i<=p;i++)
		for(int j=0;j<=q;j++)
		{
			if(i==0||j==0)P[i][j]=1;
			else P[i][j]=(P[i][j-1]+P[i-1][j])%M;
		}
	return P[p-q][q];
}

int main()
{
	scanf("%d%d%d%d%d%d",&E[0],&E[1],&A[0],&A[1],&B[0][0],&B[0][1]);
	for(i=-1,k=1;i<2;i++)
		for(j=-1;j<2;j++)
			if(i!=0||j!=0)
			{
				B[k][0]=B[0][0]+E[0]*i;
				B[k][1]=B[0][1]+E[1]*j;
				k++;
			}
	for(i=0;i<9;i++)
		m=min(m,d(B[i],A));
	for(i=R=0;i<9;i++)
		if(d(B[i],A)==m)
			R=(R+C(m,abs(B[i][0]-A[0])))%M;
	printf("%d\n",R);
	return 0;
}

Compiler output:
main.c: In function 'd':
main.c:4:33: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    4 | int d(int a[2],int b[2]){return abs(a[0]-b[0])+abs(a[1]-b[1]);}
      |                                 ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int E[2],A[2],B[9][2],i,j,k,m=1<<30,R,M=100000007,P[1005][1005]={0};
Language: C++

import sys
from math import factorial
sys.setrecursionlimit(10000)
def comb (x,y):
	return factorial(x)//factorial(x-y)//factorial(y)

w,h,ax,ay,bx,by=map(int,input().split())
dx=min(w-abs(ax-bx),abs(ax-bx))
dy=min(h-abs(ay-by),abs(ay-by))
ans=1
if dx*2==w:ans*=2
if dy*2==h:ans*=2
ans*=comb(dx+dy,dx)
print(ans%100000007)

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

#include<iostream>
#include<algorithm>
using namespace std;
int dp[1000][1000];
int solve(int h,int w){
	for(int i=1;i<h;i++)for(int j=1;j<w;j++)dp[i][j]=0;
	for(int i=0;i<w;i++)dp[0][i]=1;
	for(int i=0;i<h;i++)dp[i][0]=1;
	for(int i=1;i<h;i++)for(int j=1;j<w;j++)dp[i][j]=(dp[i-1][j]+dp[i][j-1])%100000007;
	return dp[h-1][w-1];
}
int main(){
	int r,e,a,b,c,d,ans;
	cin>>r>>e>>a>>b>>c>>d;
	if(a==c&&b==d){cout<<"0"<<endl;return}
	a-=c,b-=d;
	if(a<0)a=-a;if(b<0)b=-b;
	if(a*2>r)a=r-a;if(b*2>e)b=e-b;
	ans=solve(a+1,b+1);
	if(a*2==r)ans*=2;if(b*2==e)ans*=2;
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:46: error: expected primary-expression before '}' token
   15 |         if(a==c&&b==d){cout<<"0"<<endl;return}
      |                                              ^
a.cc:15:46: error: expected ';' before '}' token
   15 |         if(a==c&&b==d){cout<<"0"<<endl;return}
      |                                              ^
      |                                              ;
Language: C++

#include <cstdio>
#include <algorithm>

#define MOD (100000007)

typedef __int64 lint;

using namespace std;

lint memo[1024][1024];

lint getWay(int x, int y)
{
	if (x == 0 || y == 0){
		return (1);
	}
	if (memo[x][y]){
		return (memo[x][y]);
	}
	
	return (memo[x][y] = (getWay(x, y - 1) + getWay(x - 1, y)) % MOD);
}

int main()
{
	int d[2], a[2], b[2];
	int mul;
	
	scanf("%d %d %d %d %d %d", &d[0], &d[1], &a[0], &a[1], &b[0], &b[1]);
	
	mul = 1;
	
	for (int i = 0; i < 2; i++){
		if (abs(a[i] - b[i]) == abs(d[i] - a[i] - b[i])){
			mul *= 2;
			a[i] = abs(a[i] - b[i]);
		}
		else {
			a[i] = min(abs(a[i] - b[i]), abs(d[i] - a[i] - b[i]));
		}
	}
	
	printf("%I64d\n", getWay(a[0], a[1]) * mul % MOD);
	
	return (0);
}

Compiler output:
a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    6 | typedef __int64 lint;
      |         ^~~~~~~
      |         __int64_t
a.cc:10:1: error: 'lint' does not name a type; did you mean 'uint'?
   10 | lint memo[1024][1024];
      | ^~~~
      | uint
a.cc:12:1: error: 'lint' does not name a type; did you mean 'uint'?
   12 | lint getWay(int x, int y)
      | ^~~~
      | uint
a.cc: In function 'int main()':
a.cc:43:27: error: 'getWay' was not declared in this scope; did you mean 'getw'?
   43 |         printf("%I64d\n", getWay(a[0], a[1]) * mul % MOD);
      |                           ^~~~~~
      |                           getw
Language: C++

#include <cstdio>
#include <algorithm>

#define MOD (100000007)

typedef __int64 lint;

using namespace std;

lint memo[1024][1024];

lint getWay(int x, int y)
{
	if (x == 0 || y == 0){
		return (1);
	}
	if (memo[x][y]){
		return (memo[x][y]);
	}
	
	return (memo[x][y] = (getWay(x, y - 1) + getWay(x - 1, y)) % MOD);
}

int main()
{
	int d[2], a[2], b[2];
	int mul;
	
	scanf("%d %d %d %d %d %d", &d[0], &d[1], &a[0], &a[1], &b[0], &b[1]);
	
	mul = 1;
	
	for (int i = 0; i < 2; i++){
		if (abs(a[i] - b[i]) == d[i] - abs(a[i] - b[i])){
			mul *= 2;
			a[i] = abs(a[i] - b[i]);
		}
		else {
			a[i] = min(abs(a[i] - b[i]), d[i] - abs(a[i] - b[i]));
		}
	}
	
	printf("%I64d\n", getWay(a[0], a[1]) * mul % MOD);
	
	return (0);
}

Compiler output:
a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    6 | typedef __int64 lint;
      |         ^~~~~~~
      |         __int64_t
a.cc:10:1: error: 'lint' does not name a type; did you mean 'uint'?
   10 | lint memo[1024][1024];
      | ^~~~
      | uint
a.cc:12:1: error: 'lint' does not name a type; did you mean 'uint'?
   12 | lint getWay(int x, int y)
      | ^~~~
      | uint
a.cc: In function 'int main()':
a.cc:43:27: error: 'getWay' was not declared in this scope; did you mean 'getw'?
   43 |         printf("%I64d\n", getWay(a[0], a[1]) * mul % MOD);
      |                           ^~~~~~
      |                           getw
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<functional>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
typedef __int64 ll;
ll mod=100000007;
int comb[2003][2003];
void Comb(int c){
	for(int i=0;i<c;i++){
		for(int j=0;j<c;j++){
			comb[i][j]=0;
		}
	}
	comb[0][0]=1;
	for(int i=1;i<c;i++){
		comb[i][0]=1;
		for(int j=1;j<i+1;j++){
			comb[i][j]=comb[i-1][j]+comb[i-1][j-1];
			comb[i][j]%= mod;
		}
	}
}
int main(){
	int r,c,x1,y1,x2,y2;
	Comb(2002);
	while(cin>>r>>c>>x1>>y1>>x2>>y2){
		r--;c--;
		int a[]={abs(x1-x2),abs(x1-r)+1+x2,abs(x2-r)+1+x1};
		int b[]={abs(y1-y2),abs(y1-c)+1+y2,abs(y2-c)+1+y1};
		int sa=5000,sb=5000;
		for(int i=0;i<3;i++){
			sa=min(sa,a[i]);
			sb=min(sb,b[i]);
			//cout<<"    "<<a[i]<<" "<<b[i]<<endl;
		}
		int ca=0,cb=0;
		for(int i=0;i<3;i++){
			if(a[i]==sa)
				ca++;
			if(b[i]==sb)
				cb++;
		}
		int x=ca*cb%mod;
		ll ans=(ll)(comb[sa+sb][sa])*(ll)x%mod;
		cout<<ans<<endl;
		
	}
	return 0;
}

Compiler output:
a.cc:11:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   11 | typedef __int64 ll;
      |         ^~~~~~~
      |         __int64_t
a.cc:12:1: error: 'll' does not name a type; did you mean 'all'?
   12 | ll mod=100000007;
      | ^~
      | all
a.cc: In function 'void Comb(int)':
a.cc:25:38: error: 'mod' was not declared in this scope
   25 |                         comb[i][j]%= mod;
      |                                      ^~~
a.cc: In function 'int main()':
a.cc:49:29: error: 'mod' was not declared in this scope
   49 |                 int x=ca*cb%mod;
      |                             ^~~
a.cc:50:17: error: 'll' was not declared in this scope; did you mean 'all'?
   50 |                 ll ans=(ll)(comb[sa+sb][sa])*(ll)x%mod;
      |                 ^~
      |                 all
a.cc:51:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 |                 cout<<ans<<endl;
      |                       ^~~
      |                       abs
Language: C++

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

const int dx[9] = {0, 0, 0, 1, -1, -1, -1, 1, 1};
const int dy[9] = {0, -1, 1, 0, 0, -1, 1, -1, 1};

const long long mod = 100000007;

long long mod_pow(long long m, long long k) {
	long long res = 1;
	while(k > 0) {
		if(k & 1)
			(res *= m) %= mod;

		(m *= m) %= mod;
		k >>= 1;
	}
	
	return res;
}

long long mod_combination(long long n, long long r) {
	long long res = 1;
	n %= mod;

	for(long long i = 0; i < r; ++i)
		res = res * (n - i) % mod;

	long long tmp = 1;
	for(long long i = 1; i <= r; ++i)
		tmp = tmp * i % mod;

	res = res * mod_pow(tmp, mod - 2) % mod;

	return res;
}

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

	int r, c, ax, ay, bx, by;
	cin >> r >> c >> ax >> ay >> bx >> by;

	vector<int> x, y;
	int mn = INT_MAX;
	for(int i = 0; i < 9; ++i) {
		x.push_back(abs(c * dx[i] + bx - ax));
		y.push_back(abs(r * dy[i] + by - ay));
		if(mn > x[i] + y[i])
			mn = x[i] + y[i];
	}

	int ans = 0;
	for(int i = 0; i < 9; ++i)
		if(mn == x[i] + y[i])
			ans += mod_combination(x[i] + y[i], y[i]);

	cout << ans << endl;

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
   41 |         cin.tie(false);
      |         ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/basic_ios.h:299:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>* std::basic_ios<_CharT, _Traits>::tie() const [with _CharT = char; _Traits = std::char_traits<char>]'
  299 |       tie() const
      |       ^~~
/usr/include/c++/14/bits/basic_ios.h:299:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/14/bits/basic_ios.h:311:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>* std::basic_ios<_CharT, _Traits>::tie(std::basic_ostream<_CharT, _Traits>*) [with _CharT = char; _Traits = std::char_traits<char>]'
  311 |       tie(basic_ostream<_CharT, _Traits>* __tiestr)
      |       ^~~
/usr/include/c++/14/bits/basic_ios.h:311:43: note:   no known conversion for argument 1 from 'bool' to 'std::basic_ostream<char>*'
  311 |       tie(basic_ostream<_CharT, _Traits>* __tiestr)
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:48:18: error: 'INT_MAX' was not declared in this scope
   48 |         int mn = INT_MAX;
      |                  ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <vector>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

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

const int dx[9] = {0, 0, 0, 1, -1, -1, -1, 1, 1};
const int dy[9] = {0, -1, 1, 0, 0, -1, 1, -1, 1};

const long long mod = 100000007;

long long mod_pow(long long m, long long k) {
	long long res = 1;
	while(k > 0) {
		if(k & 1)
			(res *= m) %= mod;

		(m *= m) %= mod;
		k >>= 1;
	}
	
	return res;
}

long long mod_combination(long long n, long long r) {
	long long res = 1;
	n %= mod;

	for(long long i = 0; i < r; ++i)
		res = res * (n - i) % mod;

	long long tmp = 1;
	for(long long i = 1; i <= r; ++i)
		tmp = tmp * i % mod;

	res = res * mod_pow(tmp, mod - 2) % mod;

	return res;
}

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

	int r, c, ax, ay, bx, by;
	cin >> r >> c >> ax >> ay >> bx >> by;

	vector<int> x, y;
	int mn = INT_MAX;
	for(int i = 0; i < 9; ++i) {
		x.push_back(abs(c * dx[i] + bx - ax));
		y.push_back(abs(r * dy[i] + by - ay));
		if(mn > x[i] + y[i])
			mn = x[i] + y[i];
	}

	long long ans = 0;
	for(int i = 0; i < 9; ++i)
		if(mn == x[i] + y[i])
			ans = (ans + mod_combination(x[i] + y[i], y[i])) % mod;

	cout << ans << endl;

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
   41 |         cin.tie(false);
      |         ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/basic_ios.h:299:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>* std::basic_ios<_CharT, _Traits>::tie() const [with _CharT = char; _Traits = std::char_traits<char>]'
  299 |       tie() const
      |       ^~~
/usr/include/c++/14/bits/basic_ios.h:299:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/14/bits/basic_ios.h:311:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>* std::basic_ios<_CharT, _Traits>::tie(std::basic_ostream<_CharT, _Traits>*) [with _CharT = char; _Traits = std::char_traits<char>]'
  311 |       tie(basic_ostream<_CharT, _Traits>* __tiestr)
      |       ^~~
/usr/include/c++/14/bits/basic_ios.h:311:43: note:   no known conversion for argument 1 from 'bool' to 'std::basic_ostream<char>*'
  311 |       tie(basic_ostream<_CharT, _Traits>* __tiestr)
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:48:18: error: 'INT_MAX' was not declared in this scope
   48 |         int mn = INT_MAX;
      |                  ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <vector>
  +++ |+#include <climits>
    4 | using namespace std;
Language: Java

import java.util.*;

public class War {
	public static void main (String[] args){
		int n=0;
		int sum=1;
		ArrayList<Integer> h = new ArrayList<Integer>();

		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();

		for(int i=0; i<n; i++){
			h.add(scan.nextInt());
		}

		Collections.sort(h);
		Collections.reverse(h);

		for(int i=0; i<n; i++){
			if(h.get(i) - i/4 <= 0){break;}
			sum += (h.get(i) - i/4);

		}

		System.out.println(sum);
	}
}

Compiler output:
Main.java:3: error: class War is public, should be declared in a file named War.java
public class War {
       ^
1 error