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

int a[101010], b[101010];
vector<pair<int, int>>v;
const int MOD = 1e9 + 7;
 
int main(){
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) cin >> a[i], v.emplace_back(a[i], 1);
	for (int i = 0; i < n; i++) cin >> b[i], v.emplace_back(b[i], 2);
	sort(ALL(v));
	LL ans = 1;
	int pa = 0, pb = 0;
	for (int i = 0; i < 2 * n; i++) {
		if (v[i].second == 1) {
			if (pb == 0)pa++;
			else (ans *= pb) %= MOD,pb--;
		}
		if (v[i].second == 2) {
			if (pa == 0)pb++;
			else (ans *= pa) %= MOD,pa--;
		}
	}
	cout << ans%MOD << endl;
}

Compiler output:
a.cc:2:1: error: 'vector' does not name a type
    2 | vector<pair<int, int>>v;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:8:50: error: 'v' was not declared in this scope
    8 |         for (int i = 0; i < n; i++) cin >> a[i], v.emplace_back(a[i], 1);
      |                                                  ^
a.cc:9:50: error: 'v' was not declared in this scope
    9 |         for (int i = 0; i < n; i++) cin >> b[i], v.emplace_back(b[i], 2);
      |                                                  ^
a.cc:10:18: error: 'v' was not declared in this scope
   10 |         sort(ALL(v));
      |                  ^
a.cc:10:14: error: 'ALL' was not declared in this scope
   10 |         sort(ALL(v));
      |              ^~~
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |         sort(ALL(v));
      |         ^~~~
      |         short
a.cc:11:9: error: 'LL' was not declared in this scope
   11 |         LL ans = 1;
      |         ^~
a.cc:16:31: error: 'ans' was not declared in this scope
   16 |                         else (ans *= pb) %= MOD,pb--;
      |                               ^~~
a.cc:20:31: error: 'ans' was not declared in this scope
   20 |                         else (ans *= pa) %= MOD,pa--;
      |                               ^~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << ans%MOD << endl;
      |         ^~~~
a.cc:23:17: error: 'ans' was not declared in this scope
   23 |         cout << ans%MOD << endl;
      |                 ^~~
a.cc:23:28: error: 'endl' was not declared in this scope
   23 |         cout << ans%MOD << endl;
      |                            ^~~~
Language: Java



import java.util.Arrays;
import java.util.Scanner;

class event implements Comparable<event>{
		public int a;
		public int b;
		public event(int a , int b){
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(event other){
			// return b - other.b;
			return Integer.compare(b , other.b);
		}
		
}

public class Main{


	
	public static void main(String[] args) {
			
		       Scanner in = new Scanner(System.in);
                       int N = in.nextInt();
                       int[] size = new int[2];
                       event[] vs = new event[2*N];
                       for (int x=0; x<2; x++)
                            for (int i=0; i<N; i++)
                                         vs[i+x*N] = new event(x, in.nextInt());

                      Arrays.sort(vs);

                  long mod = 1_000_000_007;
                  long res = 1L;
                  for (event e : vs)
                  {
                     if (size[1 - e.a] > 0){
                       res *= size[1 - e.a];
                       res %= mod;

                       size[1 - e.a]--;
                  }
                   else
                   {
                        size[p.t]++;
                    }
               }
			
			System.out.println(res);

	}

}

Compiler output:
Main.java:49: error: cannot find symbol
                        size[p.t]++;
                             ^
  symbol:   variable p
  location: class Main
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;

class event implements Comparable<event>{
		public int a;
		public int b;
		public event(int a , int b){
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(event other){
			// return b - other.b;
			return Integer.compare(b , other.b);
		}
		
}

public class A_1D_Matching{


	
	public static void main(String[] args) {
			
			long mod = 10^9+7;
			
			Scanner in = new Scanner(System.in);
			int n = in.nextInt();
			int size[] = new int[2];
			event[] a = new event[2*n];
			
		    for (int x=0; x<2; x++)
		    	for (int i=0; i< n; i++)
		    		a[i+x*n] = new event(x, in.nextInt());
	
			Arrays.sort(a);
	
			long res = 1;
			for(event e : a){
				if(size[1 - e.a] > 0){
					res *= size[1 - e.a];
					//res %= mod;
					size[1 - e.a]--;
				}else{
					size[e.a]++;
				}
				
			}
			
			System.out.println(res);
			
			
		}

}


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

package AtCoder_Code_Final_2016;

import java.util.Arrays;
import java.util.Scanner;

class event implements Comparable<event>{
		public int a;
		public int b;
		public event(int a , int b){
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(event other){
			// return b - other.b;
			return Integer.compare(b , other.b);
		}
		
}

public class A_1D_Matching {


	
	public static void main(String[] args) {
			
			long mod = 10^9+7;
			
			Scanner in = new Scanner(System.in);
			int n = in.nextInt();
			int size[] = new int[2];
			event[] a = new event[2*n];
			
		    for (int x=0; x<2; x++)
		    	for (int i=0; i< n; i++)
		    		a[i+x*n] = new event(x, in.nextInt());
	
			Arrays.sort(a);
	
			long res = 1;
			for(event e : a){
				if(size[1 - e.a] > 0){
					res *= size[1 - e.a];
					//res %= mod;
					size[1 - e.a]--;
				}else{
					size[e.a]++;
				}
				
			}
			
			System.out.println(res);
			
			
		}

}


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

package AtCoder_Code_Final_2016;

import java.util.Arrays;
import java.util.Scanner;

class event implements Comparable<event>{
		public int a;
		public int b;
		public event(int a , int b){
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(event other){
			// return b - other.b;
			return Integer.compare(b , other.b);
		}
		
}

public class A_1D_Matching {


	
public static void main(String[] args) {
		
		long mod = 10^9+7;
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int size[] = new int[2];
		event[] a = new event[2*n];
		
	    for (int x=0; x<2; x++)
	    	for (int i=0; i< n; i++)
	    		a[i+x*n] = new event(x, in.nextInt());

		Arrays.sort(a);

		long res = 1;
		for(event e : a){
			if(size[1 - e.a] > 0){
				res *= size[1 - e.a];
				//res %= mod;
				size[1 - e.a]--;
			}else{
				size[e.a]++;
			}
			
		}
		
		System.out.println(res);
		
		
	}

}


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

import java.util.Arrays;
import java.util.Scanner;

class event implements Comparable<event>{
		public int a;
		public int b;
		public event(int a , int b){
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(event other){
			// return b - other.b;
			return Integer.compare(b , other.b);
		}
		
}

public class A_1D_Matching {


	
	public static void main(String[] args) {
		
		long mod = 10^9+7;
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int size[] = new int[2];
		event[] a = new event[2*n];
		
	    for (int x=0; x<2; x++)
	    	for (int i=0; i< n; i++)
	    		a[i+x*n] = new event(x, in.nextInt());

		Arrays.sort(a);

		long res = 1;
		for(event e : a){
			if(size[1 - e.a] > 0){
				res *= size[1 - e.a];
				//res %= mod;
				size[1 - e.a]--;
			}else{
				size[e.a]++;
			}
			
		}
		
		System.out.println(res);
		
		
	}

}


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

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <time.h>
#include <sys/timeb.h>
 
using namespace std;
 
int get_time(string r)
{
	struct timeb rawtime;
	ftime(&rawtime);
	static int ms = rawtime.millitm;
	static unsigned long s = rawtime.time;
	int out_ms = rawtime.millitm - ms;
	unsigned long out_s = rawtime.time - s;
	if (out_ms < 0)
	{
		out_ms += 1000;
		out_s -= 1;
	}
	ms = rawtime.millitm;
	s = rawtime.time;
	int total = 1000*out_s+out_ms;
	cout<<r<<": "<<total<<"ms"<<endl;
	return total;
}
 
bool cmp(pair<int, int> a, pair<int, int> b) {
	return a.first < b.first;
}
 
int main(int argc, char *argv[]) {
//	get_time("begin");
	
	long beMod = 10e9+7;
	int N;
	int a, b;
	vector<pair<int, int>> all;
	cin >> N;
	for (int i = 0; i < N; i++)
		cin>>a, all.emplace_back(a, 1);
	for (int i = 0; i < N; i++)
		cin>>b, all.emplace_back(b, -1);
		
	sort(all.begin(), all.end());
	
	vector<long> f(100001); //factorial
	f[0] = 1;
	for (int i = 1; i <= 100000; i++)
		f[i] = (f[i - 1] * i) % beMod;
		
//	for (int i = 0; i < 2 * N; i++) cout<<all[i].first<<endl;
	
	long cnt = 0, res = 1;
	for(int i=0;i<all.size();i++){
		if(all[i].second==1){
			if(cnt < 0) res = res * -cnt % mod;
			cnt++;
		}
		else{
			if(cnt > 0) res = res * cnt % mod;
			cnt--;
		}
	}
	
	cout<<res<<endl;
	
//	get_time("end");
	return 0;
} 

Compiler output:
a.cc: In function 'int get_time(std::string)':
a.cc:14:14: warning: 'int ftime(timeb*)' is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
   14 |         ftime(&rawtime);
      |         ~~~~~^~~~~~~~~~
In file included from a.cc:7:
/usr/include/x86_64-linux-gnu/sys/timeb.h:29:12: note: declared here
   29 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
a.cc: In function 'int main(int, char**)':
a.cc:60:56: error: 'mod' was not declared in this scope
   60 |                         if(cnt < 0) res = res * -cnt % mod;
      |                                                        ^~~
a.cc:64:55: error: 'mod' was not declared in this scope
   64 |                         if(cnt > 0) res = res * cnt % mod;
      |                                                       ^~~
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <iostream>
#include <cassert>
#include <cmath>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <cstdlib>

using namespace std;

#define TASKNAME ""

void solve(int test_number);

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.setf(ios::fixed);
    cout.precision(9);
    cerr.setf(ios::fixed);
    cerr.precision(3);
#ifdef LOCAL
    freopen("test.in", "r", stdin);
    freopen("test.out", "w", stdout);
#else
#endif
    int n = 1;
    for (int i = 0; i < n; i++) {
        solve(i);
    }
}

const int MAX_N = 100005;
const int MOD = 1000000007;


int n, a[MAX_N], b[MAX_N], fact[MAX_N];

void solve(int test_number) {
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; i++) {
        scanf("%d"< &b[i]);
    }
    sort(a, a + n);
    sort(b, b + n);
    long long ans = 1;
    int var = 0;
    int i = 0, j = 0;
    while (i < n || j < n) {
        if (i == n || (var == 0 && a[i] < b[j])) {
            swap(a, b);
            swap(i, j);
        }
        while (j < n && b[j] < a[i]) {
            var++;
            j++;
        }
        i++;
        ans = ans * var % MOD;
        var--;
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'void solve(int)':
a.cc:50:19: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast
   50 |         scanf("%d"< &b[i]);
      |               ~~~~^~~~~~~
a.cc:50:19: error: cannot convert 'bool' to 'const char*'
   50 |         scanf("%d"< &b[i]);
      |               ~~~~^~~~~~~
      |                   |
      |                   bool
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:428:42: note:   initializing argument 1 of 'int scanf(const char*, ...)'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

int mai(){}

Compiler output:
a.cc: In function 'int mai()':
a.cc:1:11: warning: no return statement in function returning non-void [-Wreturn-type]
    1 | int mai(){}
      |           ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

int N;
struct node
{
	int x;
	bool flag;
}arr[200001];
bool cmp(node a,node b)
{
	return a.x > b.x;
}
int main()
{
	while(~scanf("%d",&N))
	{
		for(int i=1;i<=N;i++)
		{
			scanf("%d",&arr[i].x);
			arr[i].flag = 0;
		}
		for(int i=N+1;i<=2*N;i++)
		{
			scanf("%d",&arr[i].x);
			arr[i].flag = 1;
		}
		sort(arr+1,arr+1+2*N,cmp);
		int cnt = 0;
		__int64 ans = 1;
		for(int i=1;i<=2*N;i++)
		{
			if(!arr[i].flag)
			{
				cnt++;
			}
			else 
			{
				if(cnt != 0)
				{
					__int64 tmp = 1;
					for(int k=1;k<=cnt;k++)
					{
						tmp *= k;
						tmp %= 1000000000 + 7;
					}
					ans *= tmp;
					ans %= 1000000000 + 7;
				}
				cnt = 0;
			}
		}
		printf("%lld",ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   32 |                 __int64 ans = 1;
      |                 ^~~~~~~
      |                 __int64_t
a.cc:43:48: error: expected ';' before 'tmp'
   43 |                                         __int64 tmp = 1;
      |                                                ^~~~
      |                                                ;
a.cc:46:49: error: 'tmp' was not declared in this scope; did you mean 'cmp'?
   46 |                                                 tmp *= k;
      |                                                 ^~~
      |                                                 cmp
a.cc:49:41: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |                                         ans *= tmp;
      |                                         ^~~
      |                                         abs
a.cc:49:48: error: 'tmp' was not declared in this scope; did you mean 'cmp'?
   49 |                                         ans *= tmp;
      |                                                ^~~
      |                                                cmp
a.cc:55:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   55 |                 printf("%lld",ans);
      |                               ^~~
      |                               abs
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

int N;
struct node
{
	int x;
	bool flag;
}arr[200001];
bool cmp(node a,node b)
{
	return a.x > b.x;
}
int main()
{
	while(~scanf("%d",&N))
	{
		for(int i=1;i<=N;i++)
		{
			scanf("%d",&arr[i]);
			arr[i].flag = 0;
		}
		for(int i=N+1;i<=2*N;i++)
		{
			scanf("%d",&arr[i]);
			arr[i].flag = 1;
		}
		sort(arr+1,arr+1+2*N,cmp);
		int cnt = 0;
		__int64 ans = 1;
		for(int i=1;i<=2*N;i++)
		{
			if(!arr[i].flag)
			{
				cnt++;
			}
			else 
			{
				if(cnt != 0)
				{
					__int64 tmp = 1;
					for(int k=1;k<=cnt;k++)
					{
						tmp *= k;
						tmp %= 1000000000 + 7;
					}
					ans *= tmp;
					ans %= 1000000000 + 7;
				}
				cnt = 0;
			}
		}
		printf("%lld",ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   32 |                 __int64 ans = 1;
      |                 ^~~~~~~
      |                 __int64_t
a.cc:43:48: error: expected ';' before 'tmp'
   43 |                                         __int64 tmp = 1;
      |                                                ^~~~
      |                                                ;
a.cc:46:49: error: 'tmp' was not declared in this scope; did you mean 'cmp'?
   46 |                                                 tmp *= k;
      |                                                 ^~~
      |                                                 cmp
a.cc:49:41: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |                                         ans *= tmp;
      |                                         ^~~
      |                                         abs
a.cc:49:48: error: 'tmp' was not declared in this scope; did you mean 'cmp'?
   49 |                                         ans *= tmp;
      |                                                ^~~
      |                                                cmp
a.cc:55:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   55 |                 printf("%lld",ans);
      |                               ^~~
      |                               abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;

int main() {
    int n; cin >> n;
    vector<int> a(n, 0), b(n, 0);

    for(int i = 0; i < n; ++i)
        cin >> a[i];

    for(int i = 0; i < n; ++i)
        cin >> b[i];

    sort(a.begin(), a.end());
    sort(b.begin(), b.end());

    int ans = 1;
    
    set<int> s;
    for(int i = 0; i < n; ++i)
        s.insert(b[i]);
    
    auto many = [&] (int x, int y) {
        auto lf = lower_bound(a.begin(), a.end(), x);
        if(lf == a.end())
            return 0;
        auto rt = upper_bound(a.begin(), a.end(), y);
        rt--;
        return (rt - lf + 1);
    };

    for(int i = 0; i < n; ++i) {
        int x = *(s.begin());
        s.erase(s.begin());
        ans = 1LL * ans * (many(min(x, a[i]), max(x, a[i]))) % MOD;
    }

    cout << ans << "\n";
}

Compiler output:
a.cc: In lambda function:
a.cc:30:25: error: inconsistent types 'int' and 'long int' deduced for lambda return type
   30 |         return (rt - lf + 1);
      |                ~~~~~~~~~^~~~
Language: C++

# cf16-exhibition-final-openB - Inscribed Bicycle
def main():
    x1, y1, x2, y2, x3, y3 = map(int, open(0).read().split())
    x2 -= x1
    y2 -= y1
    x3 -= x1
    y3 -= y1
    a = ((x2 - x3) ** 2 + (y2 - y3) ** 2) ** 0.5
    b = (x3 ** 2 + y3 ** 2) ** 0.5
    c = (x2 ** 2 + y2 ** 2) ** 0.5
    r = abs(x2 * y3 - x3 * y2) / (a + b + c)
    d = max(a, b, c)
    ans = r * d / (2 * r + d)
    print(ans)


if __name__ == "__main__":
    main()


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #cf16
    1 | # cf16-exhibition-final-openB - Inscribed Bicycle
      |   ^~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def main():
      | ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
  double x[3], y[3];
  for(int i = 0; i < 3; i++) cin >> x[i] >> y[i];
  double a, b, c;
  a = sqrt(pow(x[0]-x[1], 2)+pow(y[0]-y[1], 2));
  b = sqrt(pow(x[1]-x[2], 2)+pow(y[1]-y[2], 2));
  c = sqrt(pow(x[2]-x[0], 2)+pow(y[2]-y[0], 2));
  double s = (a+b+c) / 2;
  double S = sqrt(s*(s-a)*(s-b)*(s-c));
  double maxL = max({a, b, c});
  double h = 2*S/maxL;
  double r = S/(s+h);
  cout << setprecision(12);
  cout << r << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   15 |   double maxL = max({a, b, c});
      |                 ~~~^~~~~~~~~~~
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: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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

#include<iostream>

using namespace std;

int main(){
 double x1,y1,x2,y2,x3,y3;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  double a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
  double b=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
  double c=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));

  double s=abs((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1))/2.0;
  double r=2*s/(a+b+c);
  
  cout << r*max({a,b,c})/(2+max({a,b,c})) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'sqrt' was not declared in this scope
    8 |   double a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |            ^~~~
a.cc:15:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   15 |   cout << r*max({a,b,c})/(2+max({a,b,c})) << endl;
      |             ~~~^~~~~~~~~
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: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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
a.cc:15:32: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   15 |   cout << r*max({a,b,c})/(2+max({a,b,c})) << endl;
      |                             ~~~^~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

A=list(map(int,input().split()))
x1=A[0]
y1=A[1]
B=list(map(int,input().split()))
x2=B[0]
y2=B[1]
C=list(map(int,input().split()))
x3=C[0]
y3=C[1]
a=((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))**0.5
b=((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1))**0.5
c=((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3))**0.5
S=abs((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2
print(2*S/(a+b+c+4*S/(max(a,b,c))))


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A=list(map(int,input().split()))
      | ^
Language: C++

#include <algorithm>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define int long long
#define ll long long
#define eps LDBL_EPSILON
#define mod 998244353
#define double long double
#define INF LLONG_MAX/1000
#define P pair<int,int>
#define prique priority_queue
using namespace std;
double x[3], y[3], d[3];
signed main() {
	rep(i, 3)cin >> x[i] >> y[i];
	d[0] = hypot(x[0] - x[1], y[0] - y[1]);
	d[1] = hypot(x[1] - x[2], y[1] - y[2]);
	d[2] = hypot(x[2] - x[0], y[2] - y[0]);
	double s = (d[0] + d[1] + d[2]) / 2;
	double S = sqrt(s * (s - d[0]) * (s - d[1]) * (s - d[2]));
	double r = S / s;
	double mi = 0, ma = 1000;
	while (ma - mi > eps) {
		double md = (mi + ma) / 2;
		if (r < md)ma = md;
		else if (max({ d[0],d[1],d[2] }) / r * (r - md) >= 2 * md)mi = md;
		else ma = md;
	}
	printf("%.12Lf %.12Lf\n", mi,ma);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'LDBL_EPSILON' was not declared in this scope
   21 | #define eps LDBL_EPSILON
      |             ^~~~~~~~~~~~
a.cc:38:26: note: in expansion of macro 'eps'
   38 |         while (ma - mi > eps) {
      |                          ^~~
Language: C++

#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
#define gsort(b, e) sort(b, e, greater<decltype(*b)>())

template <typename T>
T sq(T a) {
    return a * a;
}

int main() {
    double x[3], y[3];
    for (int i = 0; i < 3; ++i) {
        cin >> x[i] >> y[i];
    }

    // (x[0], y[0])を原点に平行移動
    for (int i = 2; i >= 0; --i) {
        x[i] -= x[0];
        y[i] -= y[0];
    }

    // 三角形の面積
    double S = abs(x[1] * y[2] - x[2] * y[1]) / 2;

    // 各辺の長さ
    double r[3];
    for (int i = 0; i < 3; ++i) {
        r[i] = sqrt(sq(x[i] - x[(i + 1) % 3]) + sq(y[i] - y[(i + 1) % 3]));
    }

    // 内接円の半径
    double z = S * 2 / (r[0] + r[1] + r[2]);
    gsort(r, r + 3);

    double ok = 0, ng = 1000;
    for (int i = 0; i < 100; ++i) {
        double mid = (ok + ng) / 2;
        if (mid * 2 <= r[0] * (1 - mid / z)) {
            ok = mid;
        } else {
            ng = mid;
        }
    }

    cout << fixed << setprecision(15) << ok << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
    5 | #define gsort(b, e) sort(b, e, greater<decltype(*b)>())
      |                     ^~~~
a.cc:35:5: note: in expansion of macro 'gsort'
   35 |     gsort(r, r + 3);
      |     ^~~~~
Language: C++

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

double coss(int a,int b,int c,int d,int e,int f){
  int aba,abb;
  aba = (c - a) * (c - a) + (d - b) * (d - b);
  abb = (e -a) * (e- a) + (f- b) * (f- b);
  int mul = (c-a)*(e-a) + (d-b)*(f-b);
  double absol=   sqrt((double) aba)*sqrt((double) abb);
  return (double)mul / absol;
}

double abso(int a,int b,int c,int d){
	return
      (double)
      sqrt((c - a) * (c - a) + (d - b) * (d - b));
}
  
bool check(double th1,double th2, int a,int b,int c,int d,double r){
  double l1 = r / sin(th1);
  double l2 = r / sin(th2);
  double avx,avy,bvx,bvy;
  avx = (cos(th1)*()
  
                   
int main(){
  int a,b; cin >> a >> b;
  int c,d; cin >> c >> d;
  int e,f; cin >> e >> f;
  double ans = 0;
  double th1= acos(coss(a,b,c,d,e,f)) / 2.0;
  double th2= acos(coss(c,d,a,b,e,f)) / 2.0;
  
  double ok=0.0,ng = 1000.0;
  while(ng - ok < 0.000000001){
    double mid = (ng + ok) / 2.0;
    if(check(th1,th2,a,b,c,d,mid)){
      ok = mid;
    }else{
      ng = mid;
    }
  }
  ans = ok;
  
  

Compiler output:
a.cc: In function 'bool check(double, double, int, int, int, int, double)':
a.cc:24:20: error: expected primary-expression before ')' token
   24 |   avx = (cos(th1)*()
      |                    ^
a.cc:24:21: error: expected ')' before 'int'
   24 |   avx = (cos(th1)*()
      |         ~           ^
      |                     )
......
   27 | int main(){
      | ~~~                  
a.cc:44:12: error: expected '}' at end of input
   44 |   ans = ok;
      |            ^
a.cc:20:68: note: to match this '{'
   20 | bool check(double th1,double th2, int a,int b,int c,int d,double r){
      |                                                                    ^
a.cc:44:12: warning: no return statement in function returning non-void [-Wreturn-type]
   44 |   ans = ok;
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <vector>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
#define MOD 1000000007 
//ll dx[4] = {1,-1,0,0};
//ll dy[4] = {0,0,1,-1};

/*ll pasc[100][100];
ll getPasc(ll n,ll k){
  if(pasc[n][k]!=0){
    return pasc[n][k];
  }else{
    pasc[n][k] = getPasc(n-1,k-1)+getPasc(n-1,k);
    return pasc[n][k];
  }
}*/

double getMaxR(double kakuA,double kakuB,double abL,double ra,double rb){
  double r;
  if((rb-ra)<=0.000000001){
    return (ra+rb)/2;
  }
  r = (ra+rb)/2;
  double x,y;
  x = r/(tan(kakuA/2));
  y = r/(tan(kakuB/2));
  if((x+y+2*r)>abL){
    return getMaxR(kakuA,kakuB,abL,ra,r);
  }else{
    return getMaxR(kakuA,kakuB,abL,r,rb);
  }
}

int main(){
  pair<double,double> vec2;
  vec2 a,b,c;
  cin>>a.first>>a.second>>b.first>>b.second>>c.first>>c.second;
  vec2 ab,bc,ca;
  ab.first = b.first-a.first;
  ab.second = b.second-a.second;
  bc.first = c.first-b.first;
  bc.second = c.second-b.second;
  ca.first = a.first-c.first;
  ca.second = a.second-c.second;
  double abL,bcL,caL;
  abL = sqrt(pow(ab.first,2.0)+pow(ab.second,2.0));
  bcL = sqrt(pow(bc.first,2.0)+pow(bc.second,2.0));
  caL = sqrt(pow(ca.first,2.0)+pow(ca.second,2.0));
  
  double kakuA,kakuB,kakuC;
  /*vec2 abE,bcE,caE;
  abE.first = ab.first/abL;
  abE.second = ab.second/abL;
  bcE.first = bc.first/bcL;
  bcE.second = bc.second/bcL;
  caE.first = ca.first/caL;
  caE.second = ca.second/caL;*/
  
  kakuA = abs(tanh(ab.first/ab.second)-tanh(-ca.first/(-ca.second)));
  kakuB = abs(tanh(bc.first/bc.second)-tanh(-ab.first/(-ab.second)));
  kakuC = abs(tanh(ca.first/ca.second)-tanh(-bc.first/(-bc.second)));
  
  double r;
  r = getMaxR(kakuA,kakuB,abL,0,500);
  r = max(r,getMaxR(kakuB,kakuC,bcL,0,500));
  r = max(r,getMaxR(kakuC,kakuA,caL,0,500));
  cout<<r<<endl;
  
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:7: error: expected ';' before 'a'
   38 |   vec2 a,b,c;
      |       ^~
      |       ;
a.cc:39:8: error: 'a' was not declared in this scope
   39 |   cin>>a.first>>a.second>>b.first>>b.second>>c.first>>c.second;
      |        ^
a.cc:39:27: error: 'b' was not declared in this scope
   39 |   cin>>a.first>>a.second>>b.first>>b.second>>c.first>>c.second;
      |                           ^
a.cc:39:46: error: 'c' was not declared in this scope
   39 |   cin>>a.first>>a.second>>b.first>>b.second>>c.first>>c.second;
      |                                              ^
a.cc:40:7: error: expected ';' before 'ab'
   40 |   vec2 ab,bc,ca;
      |       ^~~
      |       ;
a.cc:41:3: error: 'ab' was not declared in this scope; did you mean 'abs'?
   41 |   ab.first = b.first-a.first;
      |   ^~
      |   abs
a.cc:43:3: error: 'bc' was not declared in this scope
   43 |   bc.first = c.first-b.first;
      |   ^~
a.cc:45:3: error: 'ca' was not declared in this scope
   45 |   ca.first = a.first-c.first;
      |   ^~
Language: Java

import java.io.*;
import java.util.*;

class Main {
    static Scanner scanner = new Scanner();
    static long mod = 1000000007;

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int xor = 0;
        boolean[] x = new boolean[32];
        for (int i = 0; i < n; i++) {
            int a = scanner.nextInt();
            x[Integer.toBinaryString((a - 1) ^ a).length() - 1] = true;
            xor ^= a;
        }
        long ans = 0;
        for (int i = Integer.toBinaryString(Integer.highestOneBit(xor) - 1).length(); i >= 0; i--) {
            int j = 1 << i;
            if ((xor & j) != 0) {
                if (x[i]) {
                    ans++;
                    xor ^= j * 2 - 1;
                } else {
                    System.out.println(-1);
                    return;
                }
            }
        }
        System.out.println(ans);
    }

    static class Scanner {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);
        StringTokenizer tokenizer;

        String next() {
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                    tokenizer = new StringTokenizer(reader.readLine());
                }
            } catch (IOException ignored) {
            }
            return tokenizer.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}j

Compiler output:
Main.java:55: error: reached end of file while parsing
}j
 ^
1 error
Language: C++

#include <iostream>
#include <map>

using namespace std;

int main() {
    int r = 0, n;
    cin >> n;
    map<int, int> m;
    for (int i = 0; i < n; ++i) {
        int a;
        scanf("%d", &a);
        r ^= a;
        int u = __builtin_ffs(a);
        if(!m[u-1]) m[u-1]=a;
    }
    int x = 1 << 30, ans = 0;
    for (int p = 30; p >= 0; --p) {
        if(r & x){
            if(!m[p]) {
                puts("-1");
                return 0;
            }else {
                r ^= m[p][0];
                r ^= (m[p][0]-1);
                ans++;
            }
        }
        x /= 2;
    }
    cout << ans << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: invalid types 'std::map<int, int>::mapped_type {aka int}[int]' for array subscript
   24 |                 r ^= m[p][0];
      |                          ^
a.cc:25:27: error: invalid types 'std::map<int, int>::mapped_type {aka int}[int]' for array subscript
   25 |                 r ^= (m[p][0]-1);
      |                           ^
Language: C++

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

const int MAXN = 1e5;
const int INF = 1e9;

int N;
long long A[MAXN + 10];


long long lg(long long x) {
   int cc = 0;
   while(x > 1) {
      x >>= 1;
      cc++;
   }
   return cc;
}

bool cnt[40];

int main() {
   scanf("%d", &N);
   for(int i = 0; i < N; i++) {
      scanf("%lld", &A[i]);
      if((A[i] & (A[i] - 1LL)) == 0LL) {
         cnt[lg(A[i])] = true;
      }
   }
   long long xr = 0;
   for(int i = 0; i < N; i++) {
      xr ^= A[i];
   }
   int res = 0;
   for(long long i = 30; i > 0; i--) {
      if(xr & (1LL << i)) {
         if(!cnt[i]) {
            print("-1\n");
            exit(0);
         }
         xr ^= 1LL << i;
         xr ^= (1LL << i) - 1LL;
         res++;
      }
   }
   int cc = N;
   for(int i = 0; i < N; i++) {
      if((A[i] & (A[i] - 1LL)) == 0LL) cc--;
   }
   if(xr == 0LL) printf("%d\n", res);
   else if(xr == 1LL && cc > 0LL) printf("%d\n", res+1);
   else printf("-1\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:13: error: 'print' was not declared in this scope; did you mean 'rint'?
   38 |             print("-1\n");
      |             ^~~~~
      |             rint
Language: C++

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

const int MAXN = 1e5;
const int INF = 1e9;

int N;
int A[MAXN + 10];

void done(int xr) {
   printf("%d\n", xr);
   exit(0);
}

int lg(int x) {
   int cc = 0;
   while(x > 1) {
      x >>= 1;
      cc++;
   }
   return cc;
}

bool cnt[40];

int main() {
   scanf("%d", &N);
   for(int i = 0; i < N; i++) {
      scanf("%d", &A[i]);
      if((A[i] & (A[i] - 1)) == 0) {
         cnt[lg(A[i])] = true;
         //cerr << "cnt[lg(" << A[i] << ") = " << lg(A[i]) << "] = true\n";
      }
   }
   int xr = 0;
   for(int i = 0; i < N; i++) {
      xr ^= A[i];
   }
   int res = 0;
   for(int i = 30; i > 0; i--) {
      if(xr & (1 << i)) {
         if(!cnt[i]) {
            print("-1\n");
            exit(0);
         }
         xr ^= 1 << i;
         xr ^= (1 << i) - 1;
         res++;
      }
   }
   int cc = N;
   for(int i = 0; i < N; i++) {
      if((A[i] & (A[i] - 1)) == 0) cc--;
   }
   if(xr == 0) printf("%d\n", res);
   else if(xr == 1 && cc > 0) printf("%d\n", res+1);
   else printf("-1\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:13: error: 'print' was not declared in this scope; did you mean 'rint'?
   43 |             print("-1\n");
      |             ^~~~~
      |             rint
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
#define all(a) a.begin(),a.end()
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265

int n;
int a[1000000];
int x=0;

int main(){
  cin>>n;
  rep(i,n){
    cin>>a[i];
    x = x^a[i];
  }

  int ans=0;
  for (int k=30; k>=1; k--) {
    if (x == 0) break;
    if (!(x>>(k-1) & 1)) continue;
 
    for (size_t i=0; i<N; ++i) {
      if ((a[i]^(a[i]-1)) == (1<<k)-1) {
        x ^= (1<<k)-1;
        ++res;
        a[i] = 0;  
        break;
      }
    }
  }


  if(x!=0){
    cout<<-1<<endl;
  }
  else{
    cout<<ans<<endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:24: error: 'N' was not declared in this scope
   34 |     for (size_t i=0; i<N; ++i) {
      |                        ^
a.cc:37:11: error: 'res' was not declared in this scope; did you mean 'rep'?
   37 |         ++res;
      |           ^~~
      |           rep
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
#define all(a) a.begin(),a.end()
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265

int n;
int a[1000000];
int x=0;

int main(){
  cin>>n;
  rep(i,n){
    cin>>a[i];
    x = x^a[i];
  }

  int res=0;
  for (int k=30; k>=1; k--) {
    if (x == 0) break;
    if (!(x>>(k-1) & 1)) continue;
 
    for (size_t i=0; i<N; ++i) {
      if ((a[i]^(a[i]-1)) == (1<<k)-1) {
        x ^= (1<<k)-1;
        ++res;
        a[i] = 0;  
        break;
      }
    }
  }


  if(x!=0){
    cout<<-1<<endl;
  }
  else{
    cout<<ans<<endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:24: error: 'N' was not declared in this scope
   34 |     for (size_t i=0; i<N; ++i) {
      |                        ^
a.cc:49:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
void toBinary(ll x){


    char s[100];
    ltoa(x , s , 2);
    cout << s << endl;
}

bool comp(int a , int b){

    return (a &-a)  > (b & -b) ;
}
const int N = 1e5 + 5  ;
int a[N];
int main()
{



    // 1010
    int n ;
    cin >> n ;
    int xo = 0 ;
    for(int i =0 ; i < n ; i ++){
        cin >> a[i];
        xo ^= a[i];
    }
    int res = 0 ;
    sort(a , a + n , comp );
    for(int i =0 ; i < n ; i ++)
    {
          int x = a[i];
          if(( x & -x ) & xo){
                xo = (xo ^ a[i]);
                xo ^= (a[i] -1);
                res ++ ;
          }

    }
    if(!xo){
        cout << res << endl;
    }else {
        puts("-1");
    }



    return 0;
}


Compiler output:
a.cc: In function 'void toBinary(ll)':
a.cc:8:5: error: 'ltoa' was not declared in this scope
    8 |     ltoa(x , s , 2);
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

#define int long long
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
#define X first
#define Y second
#define endl '\n'
#define all(o) o.begin(), o.end()
#define IOS ios::sync_with_stdio(0), cin.tie(0)
struct space{
    vector<ll> v;
    bool add(ll val){
        for(auto i : v)
            if(val & (i & -i)) val ^= i;
        if(!val) return false;
        for(int i=0; i<v.size(); i++)
            if(val & -val & v[i]) v[i] ^= val;
        v.push_back(val);
        return true;
    }
    void clear(){v.clear();}
    int size(){return int(v.size());}
    int num(ll val){
        int cnt = 0;
        for(auto i : v)
            if(val & (i & -i)) val ^= i, cnt++;
        if(!val) return cnt;
        return -1;
    }
};
main(){
    space s;
    int n;
    cin >> n;
    int xs = 0;
    for(int i=0; i<n; i++){
        int x;
        cin >> x;
        s.add(x ^ (x - 1));
        xs ^= x;
    }
    cout << s.num(xs) << endl;
}


Compiler output:
a.cc: In member function 'long long int space::size()':
a.cc:3:13: error: expected primary-expression before 'long'
    3 | #define int long long
      |             ^~~~
a.cc:26:23: note: in expansion of macro 'int'
   26 |     int size(){return int(v.size());}
      |                       ^~~
a.cc:3:13: error: expected ';' before 'long'
    3 | #define int long long
      |             ^~~~
a.cc:26:23: note: in expansion of macro 'int'
   26 |     int size(){return int(v.size());}
      |                       ^~~
a.cc:3:13: error: expected primary-expression before 'long'
    3 | #define int long long
      |             ^~~~
a.cc:26:23: note: in expansion of macro 'int'
   26 |     int size(){return int(v.size());}
      |                       ^~~
a.cc: At global scope:
a.cc:35:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   35 | main(){
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int MAX_N = (int)1e5 + 5;

bool used[MAX_N];	// この数字を使ったかどうか
bool change[MAX_N];	// この桁が１引く事によって変化するかどうか

int main()
{
	memset(used, false, sizeof(used));
	
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int N; cin >> N;
	vector<int> a(N, 0);
	rep (i, N) cin >> a[i];

	int res = 0;
	for(int digit = 31; digit >= 0; --digit){
		memset(cand, false, sizeof(cand));
		memset(change, false, sizeof(change));
		int cnt = 0;
		rep (i, N){
			if (a[i] & (1<<digit)){
				++cnt;
				if (!used[i] && !((a[i] - 1) & (1<<digit))) change[i] |= true;
			} // end if
		} // end rep

		if (cnt % 2 == 0){ 
			rep (i, N) used[i] |= change[i]; // 1 引いて変化するものはもう使えない。よって使ったにフラグ。
		}else{
			bool one = false;
			rep (i, N){
				if (!used[i] && change[i]){
					if (!one){
						--a[i];
						++res;
						one |= true;
					} // end if
					used[i] |= true;
				} // end if
			} // end rep
			if (!one){ // 一個もない
				res = -1;
				break;
			} // end if
		} // end if
	} // end for
	cout << res << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:24: error: 'cand' was not declared in this scope; did you mean 'rand'?
   27 |                 memset(cand, false, sizeof(cand));
      |                        ^~~~
      |                        rand
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n, a[100009], b[100009];
int main() {
	scanf("%d", &n);
	for(int i = 0; i < n; i++) scanf("%d", &a[i]);
	bool flag = true;
	for(int i = 30; i >= 0 && flag; i--) {
		int s = 0;
		for(int j = 0; j < n; j++) s ^= (a[j] >> i) & 1;
		if(s == 1) {
			bool ok = false;
			for(int j = 0; j < n && !ok; j++) {
				if(!b[j] && a[j] >> i << i == a[j]) {
					a[j]--;
					b[j] = 1;
					ok = true;
				}
			}
			if(!ok) flag = false;
		}
	}
	int ss = 0;
	for(int i = 0; i < n; i++) ss ^= a[j];
	if(ss != 0) flag = false;
	if(!flag) printf("-1\n");
	else {
		int ret = 0;
		for(int i = 0; i < n; i++) ret += b[i];
		printf("%d\n", ret);
	}
}

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

#include <stdio.h>
 
int main(void)
{
	int N, M[100000], S[30] = {0};
	int i,j, a = 0;
	
	scanf("%d", &N);
	
	for (i = 0; i < N; i++) scanf("%d", &M[i]);
	
	for (j = 0; j < N; j++ ) {
		for (i = 0; i < 30; i++) {
			S[i] += (M[j]>>i&1);
		}
	}
	
	for (i = 0; i < 30; i++) {
		if (S[i] % 2) a++;
		}
	}
	
	printf("%d", a);
	
	return 0;
}

Compiler output:
a.cc:23:15: error: expected constructor, destructor, or type conversion before '(' token
   23 |         printf("%d", a);
      |               ^
a.cc:25:9: error: expected unqualified-id before 'return'
   25 |         return 0;
      |         ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <bits/stdc++.h>

#ifdef AZN

#include "Azn.cpp"

#else
#define pln(...)
#endif

using namespace std;

typedef long long ll;
typedef double dd;

void solve(ll test_num) {
  (void) test_num;
  int N;
  cin >> N;
  vector<int> arr(N);
  for (int& a : arr) cin >> a;
  int xsum = 0;
  set<int> have;
  for (int a : arr) {
    xsum ^= a;
    have.insert(__builtin_ctz(a));
  }
  dbgln(xsum);
  int res = 0;
  for (int bit = 30; bit >= 0; --bit) {
    if (xsum >> bit & 1) {
      if (!have.count(bit)) {
        cout << "-1\n";
        return;
      }
      ++res;
      xsum ^= (1 << bit) - 1;
    }
  }
  cout << res << endl;
}

void init() {

}

int main() {
#ifdef AZN
  const auto start_time = chrono::system_clock::now();
  freopen("/home/azneye/Documents/Stuff/input.txt", "r", stdin);
#endif
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  init();
  ll tests = 1;
  //cin >> tests;
  for (ll test = 1; test <= tests; ++test) {
    solve(test);
  }
#ifdef AZN
  cerr << "Took: " << ((chrono::system_clock::now() - start_time).count() / 1e9) << " s" << endl;
#endif
  return 0;
}

Compiler output:
a.cc: In function 'void solve(ll)':
a.cc:28:3: error: 'dbgln' was not declared in this scope
   28 |   dbgln(xsum);
      |   ^~~~~
Language: C

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
using namespace std;

#define all(c) (c).begin(), (c).end()
#define iter(c) __typeof((c).begin())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define tr(c, i) for (iter(c) i = (c).begin(); i != (c).end(); ++i)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)

typedef long long ll;


int main(){
  int aa[6],ba[6];
  rep(i,6){
    cin >> aa[i]; 
  }
  rep(i,6){
    cin >> ba[i];
  }
  double a=0,b=0;
  rep(i,6){
  if(aa[i]==ba[i]){
      a += aa[i]*0.005;
      b += ba[i]*0.005;
  }else if(aa[i] > ba[i]){
      b+= ba[i]*0.01;
  }else if(aa[i]<ba[i]){
    a+= aa[i]*0.01;
    }
  
  //cout << a << ":" << b << " ";
  }
  if(a>b) printf("%.12lf\n", 1-a);
  else printf("%.12lf\n", 1-b);
  return 0;
}


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

15
335279264 849598327 822889311
446755913 526239859 548830120
181424399 715477619 342858071
625711486 448565595 480845266
647639160 467825612 449656269
160714711 336869678 545923679
61020590 573085537 816372580
626006012 389312924 135599877
547865075 511429216 605997004
561330066 539239436 921749002
650693494 63219754 786119025
849028504 632532642 655702582
285323416 611583586 211428413
990607689 590857173 393671555
560686330 679513171 501983447

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 15
      | ^~