criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N=sc.nextLong();
    long M=sc.nextLong();
    long sum_N = 0;
    long sum_M = 0;
    
    if(ABS(N-M) < 2){
      for(i = N;i = 0;i--){
        sum_N *= i;
      }
      for(j = M;j = 0;j--){
        sum_M *= j;
      }
    }
    System.out.println(sum_N * sum_M);
  }
}
      

Compiler output:
Main.java:11: error: cannot find symbol
    if(ABS(N-M) < 2){
       ^
  symbol:   method ABS(long)
  location: class Main
Main.java:12: error: cannot find symbol
      for(i = N;i = 0;i--){
          ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
      for(i = N;i = 0;i--){
                ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
      for(i = N;i = 0;i--){
                      ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
        sum_N *= i;
                 ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
      for(j = M;j = 0;j--){
          ^
  symbol:   variable j
  location: class Main
Main.java:15: error: cannot find symbol
      for(j = M;j = 0;j--){
                ^
  symbol:   variable j
  location: class Main
Main.java:15: error: cannot find symbol
      for(j = M;j = 0;j--){
                      ^
  symbol:   variable j
  location: class Main
Main.java:16: error: cannot find symbol
        sum_M *= j;
                 ^
  symbol:   variable j
  location: class Main
9 errors
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <bits/stdc++.h>

using namespace std;


long long int a,b,c[110],d[100010],ans =1,ant=1;

int main(){
  cin >> a >>b;
  
    if(abs(a-b) >1){
      cout << "0" <<endl;
    }
  
  else{
    
    if(abs(a-b) =1){
      
      for(int i=1;i<=a;i++){
        ans *= i;
        ans %=1000000007;
      }
      for(int i=1;i<=b;i++){
        ans *=i;
        ans %1000000007;
      }
      cout << ans << endl;
    }
    
    else{
      
        for(int i=1;i<=a;i++){
        ans *= i;
        ans %=1000000007;
      }
      for(int i=1;i<=b;i++){
        ans *=i;
        ans %1000000007;
      }
      ans *= 2;
      cout << ans << endl;
    }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: lvalue required as left operand of assignment
   20 |     if(abs(a-b) =1){
      |        ~~~^~~~~
Language: C++

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

int main(){
  int a,b;
  unsigned long long int c=1,d,e;
  cin>>a>>b;
  for(int i=1;i<=a;i++){
    c*=i;
    c=c%1000000007;
  }
  for(int =1;i<=b;i++){
    e*=i;
    e=c%1000000007;
  }
  if(abs(a-b)>1)
    cout<<0<<endl;
  else if(a==b){
    d=2*c*c%1000000007;
    cout<<d<<endl;
  }
  else{
    d=c*e%1000000007;
    cout<<d<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected unqualified-id before '=' token
   12 |   for(int =1;i<=b;i++){
      |           ^
a.cc:12:10: error: expected ';' before '=' token
   12 |   for(int =1;i<=b;i++){
      |          ^~
      |          ;
a.cc:12:11: error: expected primary-expression before '=' token
   12 |   for(int =1;i<=b;i++){
      |           ^
a.cc:12:14: error: 'i' was not declared in this scope
   12 |   for(int =1;i<=b;i++){
      |              ^
a.cc:12:18: error: expected ')' before ';' token
   12 |   for(int =1;i<=b;i++){
      |      ~           ^
      |                  )
a.cc:12:19: error: 'i' was not declared in this scope
   12 |   for(int =1;i<=b;i++){
      |                   ^
Language: C++

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

int main() {
  const wa=1000000007;
  int N,M;
  cin >> N >> M;
  if(abs(N-M)>1)cout << 0;
  else{
    long mat=1;
    for(long i=1;i<N+1;i++){
      mat*=i;
      mat=mat%wa;
    }
    for(long i=1;i<M+1;i++){
      mat*=i;
      mat=mat%wa;
    }
    if(N==M)mat*=2;
    cout << mat;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'wa' does not name a type
    5 |   const wa=1000000007;
      |         ^~
a.cc:13:15: error: 'wa' was not declared in this scope
   13 |       mat=mat%wa;
      |               ^~
a.cc:17:15: error: 'wa' was not declared in this scope
   17 |       mat=mat%wa;
      |               ^~
Language: C++

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

int main() {
  const wa=1000000007;
  int N,M;
  cin >> N >> M;
  if(abs(N-M)>1)cout << 0;
  else{
    long mat=1;
    for(int i=1;i<N+1;i++){
      mat*=i;
      mat=mat%wa;
    }
    for(int i=1;i<M+1;i++){
      mat*=i;
      mat=mat%wa;
    }
    if(N==M)mat*=2;
    cout << mat;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'wa' does not name a type
    5 |   const wa=1000000007;
      |         ^~
a.cc:13:15: error: 'wa' was not declared in this scope
   13 |       mat=mat%wa;
      |               ^~
a.cc:17:15: error: 'wa' was not declared in this scope
   17 |       mat=mat%wa;
      |               ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const wa=1000000007;

int main() {
  int N,M;
  cin >> N >> M;
  if(abs(N-M)>1)cout << 0;
  else{
    long mat=1;
    for(int i=1;i<N+1;i++){
      mat*=i;
      mat=mat%wa;
    }
    for(int i=1;i<M+1;i++){
      mat*=i;
      mat=mat%wa;
    }
    if(N==M)mat*=2;
    cout << mat;
  }
}



Compiler output:
a.cc:3:7: error: 'wa' does not name a type
    3 | const wa=1000000007;
      |       ^~
a.cc: In function 'int main()':
a.cc:13:15: error: 'wa' was not declared in this scope
   13 |       mat=mat%wa;
      |               ^~
a.cc:17:15: error: 'wa' was not declared in this scope
   17 |       mat=mat%wa;
      |               ^~
Language: C++

#include <iostream>
#include <stdlib.h>
using namespace std;

long Factorial(int k);

int main()
{
	long n,m,ans=0;	
	cin >> n >> m;
	if(abs(n-m)>=2){
		ans=0;
	}
	else if(abs(n-m)==1){
		ans=(Factorial(n)%1000000007)*Factorial(m)%1000000007;
	}
	else if(n==m){
		ans=2*(Factorial(n)%1000000007)Factorial(m)%1000000007;
	}

	cout << ans << endl;
	return 0;
}

long Factorial(int k){
    long sum=1;
    for (int i=1;i<=k;i++)
    {
        sum *= i;
        sum %= 1000000007;
    }
    return sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:48: error: expected ';' before 'Factorial'
   18 |                 ans=2*(Factorial(n)%1000000007)Factorial(m)%1000000007;
      |                                                ^~~~~~~~~
      |                                                ;
Language: C++

// Code by ajcxsu
// Problem: exhausted

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

const int N=2e5+10;
struct Pos { int x, y; } p[N];
bool cmp(const Pos &a, const Pos &b) { return a.x==b.x?a.x<b.x; }

#define ls x<<1
#define rs x<<1|1
int mx[N<<2], sum[N<<2];
void updata(int x, int l, int r, int d, int w) {
    if(l==r) { mx[x]+=w, sum[x]+=w; return; }
    int mid=(l+r)>>1;
    if(d<=mid) updata(ls, l, mid, d, w);
    else updata(rs, mid+1, r, d, w);
    mx[x]=max(mx[rs], mx[ls]+sum[rs]);
    sum[x]=sum[ls]+sum[rs];
}

int main() {
    ios::sync_with_stdio(false), cin.tie(0);
    int n, m, ans=0;
    cin>>n>>m;
    for(int i=1;i<=n;i++) cin>>p[i].x>>p[i].y; sort(p+1, p+1+n, cmp);
    for(int i=0;i<=m;i++) updata(1, 0, m+1, i, -1);
    for(int i=1;i<=n;i++) {
        updata(1, 0, m+1, p[i].y, 1);
        ans=max(ans, -p[i].x+mx[1]);
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'bool cmp(const Pos&, const Pos&)':
a.cc:9:63: error: expected ':' before ';' token
    9 | bool cmp(const Pos &a, const Pos &b) { return a.x==b.x?a.x<b.x; }
      |                                                               ^
      |                                                               :
a.cc:9:63: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <map>
#include <queue>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using namespace std;

ll perm(ll a) {
    if(MOD<=a) return 0;
    ll ans0 = 1, ans1 = 1;
    for (ll i = 1; i < a/2; ++i) {
        ans0 = (ans0 * (2*i)) % MOD;
        ans1 = (ans1 * (2*i+1)) % MOD;
    }
    ans0 = (ans0 * a) % MOD;
    if (a % 2 && a != 1){
        ans0 = (ans0 * (1 1a-1)) % MOD;
    }
    return (ans0 * ans1) % MOD;
}

int main() {
    ll n, m;
    cin >> n >> m;
    if(abs(n-m)>1){
        cout << 0 << "\n";
        return 0;
    }
    cout << (perm(n)*perm(m)*(n == m ? 2 : 1))%MOD << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'll perm(ll)':
a.cc:22:26: error: expected ')' before numeric constant
   22 |         ans0 = (ans0 * (1 1a-1)) % MOD;
      |                        ~ ^~~
      |                          )
a.cc:22:39: error: expected ')' before ';' token
   22 |         ans0 = (ans0 * (1 1a-1)) % MOD;
      |                ~                      ^
      |                                       )
Language: C++

#include <iostream>
#include <algorithm>
#include <cstring>
#include <map>
#include <unordered_map>
using namespace std;
const int mod = 1e9 + 7;
using ll = long long;
unordered_map<int,ll>hash;
ll f(int n) {
    if(!hash[n]) {
        ll ans = 1;
        for (ll i = 1; i <= n; ++i) {
            ans = (ans * i) % mod;
        }
        hash[n] =  ans;
        return ans;
    }
    else {
        return hash[n];
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int m, n;
    cin >> m >> n;
    ll ans = abs(m - n) > 1 ? 0 : (m == n ? 2 * f(m) * f(m) : f(m) * f(n)) % mod;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'll f(int)':
a.cc:11:9: error: reference to 'hash' is ambiguous
   11 |     if(!hash[n]) {
      |         ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:9:22: note:                 'std::unordered_map<int, long long int> hash'
    9 | unordered_map<int,ll>hash;
      |                      ^~~~
a.cc:16:9: error: reference to 'hash' is ambiguous
   16 |         hash[n] =  ans;
      |         ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:9:22: note:                 'std::unordered_map<int, long long int> hash'
    9 | unordered_map<int,ll>hash;
      |                      ^~~~
a.cc:20:16: error: reference to 'hash' is ambiguous
   20 |         return hash[n];
      |                ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:9:22: note:                 'std::unordered_map<int, long long int> hash'
    9 | unordered_map<int,ll>hash;
      |                      ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define int long long
typedef pair<int,int> ii;
typedef pair<ii,ii> iiii;
iiii x[1000005];
vector<ii> vec[10];
int r,c,n,cnt;
stack<int> st;
//0 là cột bên trái
//1 là hàng ở trên
//2 là cột bên phải
//3 là hàng ở dưới
void qualify(int x1,int y1,int x2,int y2,int num){
    int count1=0,count2=0;
    if(y1==0&&count1==0){
        vec[0].pb(mp(x1,num));
        count1++;
    }
    if(y1==c&&count1==0){
        count1++;
        vec[2].pb(mp(x1,num));
    }
    if(y2==0&&count2==0){
        count2++;
        vec[0].pb(mp(x2,num));
    }
    if(y2==c&&count2==0){
        count2++;
        vec[2].pb(mp(x2,num));
    }
    if(x1==0&&count1==0){
        count1++;
        vec[1].pb(mp(y1,num));
    }
    if(x1==r&&count1==0){
        count1++;
        vec[3].pb(mp(y1,num));
    }
    if(x2==0&&count2==0){
        count2++;
        vec[1].pb(mp(y2,num));
    }
    if(x2==r&&count2==0){
        count2++;
        vec[3].pb(mp(y2,num));
    }
}
bool cmp(const ii &a,const ii &b){
    return a.fi<b.fi;
}
bool cmp1(const ii &a,const ii &b){
    return a.fi>b.fi;
}
int main(){
    ios::sync_with_stdio(0);
    cin>>r>>c>>n;
    for(int i=1;i<=n;i++)
        cin>>x[i].fi.fi>>x[i].fi.se>>x[i].se.fi>>x[i].se.se;
    for(int i=1;i<=n;i++){
        int count1=0,count2=0;
        if(x[i].fi.fi==0||x[i].fi.fi==r)
            count1++;
        if(x[i].se.fi==0||x[i].se.fi==r)
            count2++;
        if(x[i].fi.se==0||x[i].fi.se==c)
            count1++;
        if(x[i].se.se==0||x[i].se.se==c)
            count2++;
        if(count1>=1&&count2>=1)
        qualify(x[i].fi.fi,x[i].fi.se,x[i].se.fi,x[i].se.se,i);
    }
    sort(vec[0].begin(),vec[0].end(),cmp1);
    sort(vec[1].begin(),vec[1].end(),cmp);
    sort(vec[2].begin(),vec[2].end(),cmp);
    sort(vec[3].begin(),vec[3].end(),cmp1);
    for(int i=0;i<=3;i++){
        for(int j=0;j<vec[i].size();j++){
            if(!st.empty()){
                if(vec[i][j].se==st.top())
                    st.pop();
                else
                    st.push(vec[i][j].se);
            }
            else
                st.push(vec[i][j].se);
        }
    }
    if(!st.empty())
        cout<<"NO";
    else
        cout<<"YES";
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

l = map(int, raw_input().split())
n = l[0]
m = l[1]
mod = 1000000000 + 7

'''
def mod_pow(x,n,mod): 
    ll ret = 1;
    while n > 0:
        if n & 1 :
            (ret *= x) %= mod
        (x *= x) %= mod
        n /= 2
    return ret

def combo(n,k,mod):
    if n / 2 < k:
        k = n - k
    bunshi = 1
    for i in range(n - k + 1,n + 1):
        bunshi *= i;
        bunshi %= mod;
    bunbo = 1
    for i in range(1,k + 1):
        bunbo *= i;
        bunbo *= mod;

    (bunshi *= mod_pow(bunbo(bunshi,mod - 2,mod)) %= mod)
'''

def f(n):
    ret = 1
    for i in  range(1,n + 1) :
        ret *= i
        ret %= mod
    return ret

if m < n :
    l = n
    n = m
    m = l

if n == m :
    print (2 * f(n) * f(n) % mod)
elif m - n < 2 :
    print (f(n) * f(m) % mod)
else:
    print (0)


Compiler output:
a.cc:6:1: error: empty character constant
    6 | '''
      | ^~
a.cc:6:3: warning: missing terminating ' character
    6 | '''
      |   ^
a.cc:6:3: error: missing terminating ' character
a.cc:29:1: error: empty character constant
   29 | '''
      | ^~
a.cc:29:3: warning: missing terminating ' character
   29 | '''
      |   ^
a.cc:29:3: error: missing terminating ' character
a.cc:1:1: error: 'l' does not name a type
    1 | l = map(int, raw_input().split())
      | ^
a.cc:9:5: error: expected unqualified-id before 'while'
    9 |     while n > 0:
      |     ^~~~~
a.cc:22:9: error: 'bunshi' does not name a type
   22 |         bunshi %= mod;
      |         ^~~~~~
a.cc:23:5: error: 'bunbo' does not name a type
   23 |     bunbo = 1
      |     ^~~~~
a.cc:26:9: error: 'bunbo' does not name a type
   26 |         bunbo *= mod;
      |         ^~~~~
a.cc:28:12: error: expected ')' before '*=' token
   28 |     (bunshi *= mod_pow(bunbo(bunshi,mod - 2,mod)) %= mod)
      |     ~      ^~~
      |            )
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
  int x = sc.nextInt();
  int y = scan.nextInt();
  long frac[] = new long[100020];
  int a = 1000000007;
  if (Math.abs(x - y) > 1) {
    System.out.println('0');
    return;
  }
  frac[0] = 1;
  for (int i = 1; i <= 100000; i++)frac[i] = frac[i - 1] * i % a;
  long ans = frac[x] * frac[y] % a;
  if (x == y) ans = ans * 2 % a;
  System.out.println(ans);
  return;
}}

Compiler output:
Main.java:6: error: cannot find symbol
  int y = scan.nextInt();
          ^
  symbol:   variable scan
  location: class Main
1 error
Language: C++

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

typedef long long ll;
ll n, m;
ll M = 1e9 + 7;

ll f(ll p) {
	ll re;
	for (re = 1; p > 0; re = re * p-- % M);
	return re;
}

ll abs(ll p) {return p > 0 ? p : -p;}

int main()
{
	cin >> n >> m;
    cout << f(n) * f(m) * max(0LL, 2 - abs(n - m)) % M << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:43: error: call of overloaded 'abs(ll)' is ambiguous
   20 |     cout << f(n) * f(m) * max(0LL, 2 - abs(n - m)) % M << endl;
      |                                        ~~~^~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
a.cc:15:4: note: candidate: 'll abs(ll)'
   15 | ll abs(ll p) {return p > 0 ? p : -p;}
      |    ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C

#include <stdio.h>
#include <math.h>
int factorial(int n) {
    if (n > 0) {
        return n * factorial(n - 1);
    } else {
        return 1;
    }
}

int main(void){
    int mode = pow(10,9) + 7;
    int N,M;
    int ans;
    scanf_s("%d", &N);
    scanf_s("%d", &M);
    if(N == M){
        ans = factorial(N) * factorial(M) * 2;
        printf("%d\n",ans % mode);
    }
    else if((N + 1) == M || N == (M + 1)){
        ans = factorial(N) * factorial(M);
        printf("%d\n",ans % mode);
    }
    else{
        printf("0\n");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   15 |     scanf_s("%d", &N);
      |     ^~~~~~~
      |     scanf
Language: C

#include <stdio.h>
#include <math.h>
int factorial(int n) {
    if (n > 0) {
        return n * factorial(n - 1);
    } else {
        return 1;
    }
}

int main(void){
    int mode = pow(10,9) + 7;
    int N,M;
    int ans;
    scanf("%d",&N);
    scanf("%d",&M);
    if(N == M){
        ans = factorial(N) * factorial(M) * 2;
        puts("%d",ans % mode);
    }
    else if((N + 1) == M || N == (M + 1)){
        ans = factorial(N) * factorial(M);
        puts("%d",ans % mode);
    }
    else{
        puts("0");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:9: error: too many arguments to function 'puts'
   19 |         puts("%d",ans % mode);
      |         ^~~~
In file included from main.c:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
main.c:23:9: error: too many arguments to function 'puts'
   23 |         puts("%d",ans % mode);
      |         ^~~~
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

#define MOD (7+1e9)

long long int factorial(long long int n) {
    long long int fact[100000];
    long long int i;

    fact[1] = 1;

    for(i = 2; i <= n; i++) {
        fact[i] = ((fact[i-1] % MOD) * (i % MOD)) % MOD;
    }

    return fact[n];
}

int main(){
    long long int n, m, count;

    scanf("%lld %lld", &n, &m);

    if(abs(n-m)>=2){
        printf("0\n");
        return 0;
    }

    if(m == n){
        //m!*n!*2
        count = ((factorial(m) % MOD) * (factorial(n) % MOD) * 2) % MOD;
    }else{
        //m!*n!
        count = ((factorial(m) % MOD) * (factorial(n) % MOD)) % MOD;
    }

    printf("%lld\n", count);
    return 0;
}

Compiler output:
main.c: In function 'factorial':
main.c:13:31: error: invalid operands to binary % (have 'long long int' and 'double')
   13 |         fact[i] = ((fact[i-1] % MOD) * (i % MOD)) % MOD;
      |                     ~~~~~~~~~ ^
      |                         |
      |                         long long int
main.c:13:43: error: invalid operands to binary % (have 'long long int' and 'double')
   13 |         fact[i] = ((fact[i-1] % MOD) * (i % MOD)) % MOD;
      |                                           ^
main.c: In function 'main':
main.c:31:32: error: invalid operands to binary % (have 'long long int' and 'double')
   31 |         count = ((factorial(m) % MOD) * (factorial(n) % MOD) * 2) % MOD;
      |                   ~~~~~~~~~~~~ ^
      |                   |
      |                   long long int
main.c:31:55: error: invalid operands to binary % (have 'long long int' and 'double')
   31 |         count = ((factorial(m) % MOD) * (factorial(n) % MOD) * 2) % MOD;
      |                                          ~~~~~~~~~~~~ ^
      |                                          |
      |                                          long long int
main.c:34:32: error: invalid operands to binary % (have 'long long int' and 'double')
   34 |         count = ((factorial(m) % MOD) * (factorial(n) % MOD)) % MOD;
      |                   ~~~~~~~~~~~~ ^
      |                   |
      |                   long long int
main.c:34:55: error: invalid operands to binary % (have 'long long int' and 'double')
   34 |         count = ((factorial(m) % MOD) * (factorial(n) % MOD)) % MOD;
      |                                          ~~~~~~~~~~~~ ^
      |                                          |
      |                                          long long int
Language: C

#include<bits/stdc++.h>
#define ll long long
#define mo 1000000007
using namespace std;
int x,y;
ll fac(int x){
	ll s=1;
	for (int i=1;i<=x;i++)
		s=s*i%mo;
	return s;
}
int main(){
	scanf("%d%d",&x,&y);
	if (x>y) swap(x,y);
	if (x==y) printf("%lld",fac(x)*fac(x)*2%mo);
	else if (x+1==y) printf("%lld",fac(x)*fac(y)%mo);
	else puts("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++

#encoding: utf-8

def main():
    N,M=map(int,input().split())
    if(abs(N-M)<=2):
        return 0
    ret=1
    for i in range(1,N+1):
        ret*=i
    for i in range(1,M+1):
        ret*=i
    return ret


if __name__ == '__main__':
    main()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #encoding
    1 | #encoding: utf-8
      |  ^~~~~~~~
a.cc:15:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   15 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:3:1: error: 'def' does not name a type
    3 | def main():
      | ^~~
Language: C

#include <iostream>
#include <algorithm>
#include <cmath>
#define MAX 1000000007
using namespace std;

long long int fct(int n)
{
	if(n==1)	return 1;
	return (n*fct(n-1))%MAX;
}

int main() 
{
	int n,m;
	
	cin>>n>>m;
	
	if(abs(n-m)>1)
	{
		cout<<0<<endl;
		return 0;
	}
	
	if(abs(n-m)==1)
	{
		cout<<(fct(n)*fct(m))%MAX<<endl;
		return 0;
	}
	
	cout<<(2*fct(n)*fct(m))%MAX<<endl;
	return 0;
}

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

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

long long int fct(int n)
{
	if(n==1)	return 1;
	return (n*fct(n-1))%MAX;
}

int main() 
{
	int n,m;
	
	cin>>n>>m;
	
	if(abs(n-m)>1)
	{
		cout<<0<<endl;
		return 0;
	}
	
	if(abs(n-m)==1)
	{
		cout<<(fct(n)*fct(m))%MAX<<endl;
		return 0;
	}
	
	cout<<(2*fct(n)*fct(m))%MAX<<endl;
	return 0;
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
/**
 * @author fangda.wang
 */
public class Reconciled {

	private final static int MOD = 1_000_000_000 +7;
	private final static BigDecimal B_MOD = BigDecimal.valueOf(MOD);

	public static void main (String... args) throws IOException {

		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		String[] vals = reader.readLine().split(" ");
		final int N = Integer.parseInt(vals[0]);
		final int M = Integer.parseInt(vals[1]);

		if (Math.abs(N-M) > 1) {
			System.out.print(0);
			return;
		}

		BigDecimal result;

		if (N == M) {
			result = BigDecimal.valueOf(2).multiply(getPermutation(N)).multiply(getPermutation(N));
		} else {
			result = getPermutation(N).multiply(getPermutation(M));
		}

		System.out.print(result.remainder(B_MOD));

	}

	private static BigDecimal getPermutation(final int n) {
		BigDecimal result = BigDecimal.ONE;
		for (int i = 1; i <= n; i++) {
			result = result.multiply(BigDecimal.valueOf(i));
			if (result.compareTo(B_MOD) == 1) result = result.remainder(B_MOD);
		}
		return result;
	}


}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
/**
 * @author fangda.wang
 */
public class Reconciled {

	private final static int MOD = 1_000_000_000 +7;
	private final static BigDecimal B_MOD = BigDecimal.valueOf(MOD);

	public static void main (String... args) throws IOException {

		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		String[] vals = reader.readLine().split(" ");
		final int N = Integer.parseInt(vals[0]);
		final int M = Integer.parseInt(vals[1]);

		if (Math.abs(N-M) > 1) {
			System.out.print(0);
			return;
		}

		BigDecimal result;

		if (N == M) {
			result = BigDecimal.valueOf(2).multiply(getPermutation(N)).multiply(getPermutation(N));
		} else {
			result = getPermutation(N).multiply(getPermutation(M));
		}

		System.out.print(result.remainder(B_MOD));

	}

	private static BigDecimal getPermutation(final int n) {
		BigDecimal result = BigDecimal.ONE;
		for (int i = 1; i <= n; i++) {
			result = result.multiply(BigDecimal.valueOf(i));
			if (result.compareTo(B_MOD) == 1) result = result.remainder(B_MOD);
		}
		return result;
	}


}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.math.BigDecimal;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Reconciled {
      | ^~~~~~
Language: C++

iiiii  const search = function (keywords) {
    return ajaxPost(`/signals/search`, {keywords: keywords})
          .then(res => {
                  renderRecent(res.recent);
                          renderClassic(res.cars);
                                })
                                      .catch(err => {
                                              console.error(err);
                                                    });
                                                      };


Compiler output:
a.cc:2:21: error: stray '`' in program
    2 |     return ajaxPost(`/signals/search`, {keywords: keywords})
      |                     ^
a.cc:2:37: error: stray '`' in program
    2 |     return ajaxPost(`/signals/search`, {keywords: keywords})
      |                                     ^
a.cc:1:1: error: 'iiiii' does not name a type
    1 | iiiii  const search = function (keywords) {
      | ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	
	int N, M;
	long long sum = 1;
	long long d = (long long)pow(10.0, 9.0) + 7;
	
	cin >> N >> M;
	
	if(N > M){
		int a = N;
		N = M;
		M = N;
		
		for(int i = 1 ; i <= N; i++){
			sum *= i;
			sum %= d;
		}
		sum *= sum;
		sum %= d;
		
		sum *= (N + 1);
		sum %= d;
	}
	else if(N == M){
		for(int i = 1 ; i <= N; i++){
			sum *= i;
			sum %= d;
		}
		sum *= sum;
		sum %= d;
		sum *= 2;
		sum %= d;
	}
	else sum = 0;
	
	cout << sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: 'pow' was not declared in this scope
    8 |         long long d = (long long)pow(10.0, 9.0) + 7;
      |                                  ^~~
Language: C++

#include<stdio.h>

long long int factorial(int N){
    int i;
    int fact;
    for(i=1;i<=N;i++){
        fact*=i;
    }
    return fact;
}

int main(){
    int N,M,multi_N,multi_M;
    scanf("%d %d",&N,&M);
    if(N-M>=3 || N-M<=-3){
        printf("0\n");
    }else{
        printf("%lld\n",factorial(M)*factorial(N)*2.0%(1000000000.0+7.0));
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:54: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   18 |         printf("%lld\n",factorial(M)*factorial(N)*2.0%(1000000000.0+7.0));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                                                  |                 |
      |                                                  double            double
Language: C++

    int b = (a * a) % mod


Compiler output:
a.cc:1:14: error: 'a' was not declared in this scope
    1 |     int b = (a * a) % mod
      |              ^
a.cc:1:18: error: 'a' was not declared in this scope
    1 |     int b = (a * a) % mod
      |                  ^
a.cc:1:23: error: 'mod' was not declared in this scope
    1 |     int b = (a * a) % mod
      |                       ^~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
using namespace std;

const int nom = 1000000007;
int ans = 0, n, m, f[100005];

int main()
{
         scanf("%d%d", &n, &m);
         if (abs(n - m) > 1) { printf("0"); return 0; }
         f[0] = 1;
         for (int i = 1; i <= max(n, m); i++)
                f[i] = (f[i - 1] * i) % nom;
         ans = (f[n] * f[m]) % nom;
         if (n == m) ans = (ans * 2) % nom:
         printf("%d", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: 'max' was not declared in this scope
   13 |          for (int i = 1; i <= max(n, m); i++)
      |                               ^~~
a.cc:16:43: error: found ':' in nested-name-specifier, expected '::'
   16 |          if (n == m) ans = (ans * 2) % nom:
      |                                           ^
      |                                           ::
a.cc:16:40: error: 'nom' is not a class, namespace, or enumeration
   16 |          if (n == m) ans = (ans * 2) % nom:
      |                                        ^~~
Language: Java


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Reconciled {

	static final long MOD = (long) 1e9 + 7;
	static final int MAX = (int) 1e5 + 1;

	public static void main(String[] args) throws IOException {
		MyScanner sc = new MyScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), m = sc.nextInt();
		long[] fact = new long[MAX];
		fact[0] = fact[1] = 1;
		for (int i = 2; i < MAX; i++)
			fact[i] = (i * fact[i - 1]) % MOD;
		if (n == m)
			out.println((((fact[n] * fact[m]) % MOD) << 1) % MOD);
		else if (n + 1 == m || n - 1 == m)
			out.println((fact[n] * fact[m]) % MOD);
		else
			out.println(0);
		out.flush();
		out.close();
	}

	static class MyScanner {
		StringTokenizer st;
		BufferedReader br;

		public MyScanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public MyScanner(String file) throws IOException {
			br = new BufferedReader(new FileReader(new File(file)));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


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

g`"#include<stdbool.h>

int all(int n) {
    unsigned long result = 1;
    for(int i = 1; i <=n; i++) {
        result = result*i;
        result = result % 1000000007;
    }
    return result;
}

int main() {
    int a,b;
    unsigned long kekka;
    scanf("%d %d", &a, &b);
    if (a == b) {
        kekka = (all(a) * all(b) * 2) % 1000000007;
    } else if (a == b+1 || a+1 == b) {
        kekka = (all(a) * all(b)) % 1000000007;
    } else {
        kekka = 0;
    }
    printf("%lu\n", kekka);
    return 0;
}


Compiler output:
main.c:1:2: error: stray '`' in program
    1 | g`"#include<stdbool.h>
      |  ^
main.c:1:3: warning: missing terminating " character
    1 | g`"#include<stdbool.h>
      |   ^
main.c:1:3: error: missing terminating " character
    1 | g`"#include<stdbool.h>
      |   ^~~~~~~~~~~~~~~~~~~~
main.c:1:2: error: expected ';' before 'int'
    1 | g`"#include<stdbool.h>
      |  ^
      |  ;
    2 | 
    3 | int all(int n) {
      | ~~~
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   15 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | g`"#include<stdbool.h>
main.c:15:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   15 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:15:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:23:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   23 |     printf("%lu\n", kekka);
      |     ^~~~~~
main.c:23:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:23:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
#include <windows.h>
#define LEN 100000

using namespace std;

class UFS {
	private:
		int f[LEN];
		int size[LEN];
		int len;
		int block;
	public:
		UFS(int n);
		void Add();
		int Union(int a, int b);
		int IsSameRoot(int a, int b);
		int GetLength();
		int FindRoot(int k);
		int GetBlocks();
		void Debug();
};
UFS::UFS(int n) {
	memset(f, 0, sizeof(f));
	memset(size, 0, sizeof(size));
	len = block = n;
}
void UFS::Add() {
	len++;
}
int UFS::Union(int a, int b) {
	if (a > len && b > len && a < 1 && b < 1) {
		return -1;
	}
	if ((a = FindRoot(a)) == (b = FindRoot(b))) {
		return 0;
	}
	if (size[b] > size[a]) {
		f[a] = b;
		size[b] += size[a];
	} else {
		f[b] = a;
		size[a] += size[b];
	}
	block--;
	return 1;
}
int UFS::IsSameRoot(int a, int b) {
	return FindRoot(a) == FindRoot(b);
}
int UFS::GetLength() {
	return len;
}
int UFS::FindRoot(int k) {
	if (!f[k]) {
		return k;
	} 
	f[k] = FindRoot(f[k]);
	return f[k];
}
int UFS::GetBlocks() {
	return block;
}
void UFS::Debug() {
	puts("====================");
	printf("Blocks: %d\n", block);
	for(int i = 1; i <= len; i++) {
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FindRoot(i));
		printf("%d -> %d\n", i, FindRoot(i));
	}
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7);
	puts("====================");
}

priority_queue<int> pq;

int main() {
	UFS u(100005);
	int n;
	cin >> n;
}

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

#include <iostream>

using namespace std;
struct
{
    int x,y;
}v[100003];
int n,viz[100003],dist,a,b,nod;
long long dist;
int main()
{
    cin>>n;
    for(int i=1;i<=n;++i) cin>>v[i].x>>v[i].y;
    for(int i=1;i<=n;++i)
    {
        if(!viz[i])
        {
            viz[i]=true;
            dist=99999999;
            for(int j=1;j<=n;++j)
            {
                if(i==j) continue;
                a=v[i].x-v[j].x;
                if(a<0) a=-a;
                b=v[i].y-v[j].y;
                if(b<0) b=-b;
                if(a<dist)
                {
                    dist=a;
                    nod=j;
                }
                if(b<dist)
                {
                    dist=b;
                    nod=j;
                }
            }
            viz[nod]=true;
            sol+=dist;
        }
    }
cout<<sol;
    return 0;
}


Compiler output:
a.cc:9:11: error: conflicting declaration 'long long int dist'
    9 | long long dist;
      |           ^~~~
a.cc:8:19: note: previous declaration as 'int dist'
    8 | int n,viz[100003],dist,a,b,nod;
      |                   ^~~~
a.cc: In function 'int main()':
a.cc:39:13: error: 'sol' was not declared in this scope
   39 |             sol+=dist;
      |             ^~~
a.cc:42:7: error: 'sol' was not declared in this scope
   42 | cout<<sol;
      |       ^~~
Language: C++

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


static const long long INF = 1000000000;
#define N 100000

struct POINT {
    int x;
    int y;
};

int n;
POINT p[N];
int cost[N + 1][N + 1];
long long d[N + 1][N + 1];

int main() {
    cin >> n;
    for ( int i = 0; i < n; i++ ) {
        cin >> p[i].x >> p[i].y;
    }
    
    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            cost[i][j] = INF;
        }
    }

    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            if ( i == j ) continue;
            cost[i][j] = std::min(std::abs(p[i].x - p[j].x), std::abs(p[i].y - p[j].y));
        }
    }
    
    for ( int k = 0; k < n; k++ ) {
        for ( int i = 0; i < n; i++ ) {
            for ( int j = 0; j < n; j++ ) {
                d[i][j] = std::min(d[i][j], d[i][k] + d[k][j]);
            }
        }
    }
    
    long long ans = 0;
    long long minc = INF;
    for ( int i = 0; i < n; i++ ) {
        for ( int  j = 0; j < n; j++ ) {
            long long tmp = d[i][j];
            minc = std::min(tmp, minc);
        }
        ans = ans + minc;
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
/tmp/ccWVy1Zw.o: in function `main':
a.cc:(.text+0x22a): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccWVy1Zw.o
a.cc:(.text+0x252): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccWVy1Zw.o
a.cc:(.text+0x281): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccWVy1Zw.o
a.cc:(.text+0x2bb): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccWVy1Zw.o
a.cc:(.text+0x33e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccWVy1Zw.o
collect2: error: ld returned 1 exit status
Language: C++

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<map>
#include<set>
#include<algorithm>
#include<queue>
#include<time.h>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
#define fe(x) for(int ii=be[x];ii;ii=e[ii].ne)
using namespace std;
int r,c,n,m,xx,yy,zz,ww,tot;
int random(){
	return rand()*32768+rand();
}
bool bor(int a,int b){
	if (a==0||a==r) return 1;
	if (b==0||b==c) return 1;
	return 0;
}
struct nod{
	int x1,y1,x2,y2;
};
nod a[110000];
double cj(double ax,double ay,double bx,double by){
	return ax*by-ay*bx;
}
inline bool cro(int c,int d){
	return ((cj(a[d].x1-a[c].x1,a[d].y1-a[c].y1,a[c].x2-a[c].x1,a[c].y2-a[c].y1)*cj(a[d].x2-a[c].x1,a[d].y2-a[c].y1,a[c].x2-a[c].x1,a[c].y2-a[c].y1))<0);
}
int main(){
	scanf("%d%d%d",&r,&c,&n);
	fo(i,1,n){
		scanf("%d%d%d%d",&xx,&yy,&zz,&ww);
		if (bor(xx,yy)&&bor(zz,ww)){
			++m;
			a[m].x1=xx;
			a[m].y1=yy;
			a[m].x2=zz;
			a[m].y2=ww;
		}
	}
	fo(i,1,4*m){
		int xx=random()%m+1,yy=random()%m+1;
		swap(a[xx],a[yy]);
	}
	fo(i,1,m-1)
		fo(j,i+1,m){
			if (cro(i,j)){
				printf("NO\n");
				return 0;
			}
			tot++;
			if (tot>=6000000){
				printf("YES\n");
				return 0;			
			}		
		}
	printf("YES\n");
	return 0;
}


Compiler output:
a.cc:15:5: error: ambiguating new declaration of 'int random()'
   15 | int random(){
      |     ^~~~~~
In file included from /usr/include/c++/14/bits/std_abs.h:38,
                 from /usr/include/c++/14/cmath:49,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/usr/include/stdlib.h:521:17: note: old declaration 'long int random()'
  521 | extern long int random (void) __THROW;
      |                 ^~~~~~
Language: C++

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

#define N 100000
#define INF (1 << 21)

struct POINT {
    int x;
    int y;
};

int n;
POINT p[N];
int cost[N + 1][N + 1];
long long d[N + 1][N + 1];

int main() {
    cin >> n;
    for ( int i = 0; i < n; i++ ) {
        cin >> p[i].x >> p[i].y;
    }
    
    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            cost[i][j] = INF;
        }
    }

    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            if ( i == j ) continue;
            cost[i][j] = std::min(std::abs(p[i].x - p[j].x), std::abs(p[i].y - p[j].y));
        }
    }
    
    for ( int k = 0; k < n; k++ ) {
        for ( int i = 0; i < n; i++ ) {
            for ( int j = 0; j < n; j++ ) {
                d[i][j] = std::min(d[i][j], d[i][k] + d[k][j]);
            }
        }
    }
    
    long long ans = 0;
    long long minc = INF;
    for ( int i = 0; i < n; i++ ) {
        for ( int  j = 0; j < n; j++ ) {
            long long tmp = d[i][j];
            minc = std::min(tmp, minc);
        }
        ans = ans + minc;
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
/tmp/cc0QajjK.o: in function `main':
a.cc:(.text+0x22a): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc0QajjK.o
a.cc:(.text+0x252): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc0QajjK.o
a.cc:(.text+0x281): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc0QajjK.o
a.cc:(.text+0x2bb): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc0QajjK.o
a.cc:(.text+0x33e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc0QajjK.o
collect2: error: ld returned 1 exit status
Language: C++

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

#define N 100000
#define INF (1 << 21)

struct POINT {
    int x;
    int y;
};

int n;
POINT p[N];
int cost[N + 1][N + 1];
long long d[N + 1][N + 1];

int main() {
    cin >> n;
    for ( int i = 0; i < n; i++ ) {
        cin >> p[i].x >> p[i].y;
    }
    
    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            cost[i][j] = INF;
        }
    }
    
    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            if ( i == j ) continue;
            cost[i][j] = std::min(std::abs(p[i].x - p[j].x), std::abs(p[i].y - p[j].y));
        }
    }
    
    
    for ( int k = 0; k < n; k++ ) {
        for ( int i = 0; i < n; i++ ) {
            if ( d[i][k] == INF ) continue;
            for ( int j = 0; j < n; j++ ) {
                if ( d[k][j] == INF ) continue;
                d[i][j] = std::min(d[i][j], d[i][k] + d[k][j]);
            }
        }
    }

    long long ans = 0;
    long long minc = INF;
    for ( int i = 0; i < n; i++ ) {
        for ( int  j = 0; j < n; j++ ) {
            long long tmp = d[i][j];
            minc = std::min(tmp, minc);
        }
        ans += minc;
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
/tmp/ccjHn4lZ.o: in function `main':
a.cc:(.text+0x21e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
a.cc:(.text+0x25e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
a.cc:(.text+0x292): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
a.cc:(.text+0x2ba): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
a.cc:(.text+0x2e9): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
a.cc:(.text+0x323): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
a.cc:(.text+0x3ac): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccjHn4lZ.o
collect2: error: ld returned 1 exit status