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

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

enum {X=0, Y=1, Z=2 };

void main(){
	int K,N;
	int *data1[3], *data2[3];	
	

	cin >> N >> K;
	for(int x=0; x<3; x++){
		data1[x] = new int[N];
		data2[x] = new int[N];
	}
	for(int n=0; n<N; n++){
		cin >> data1[X][n] >> data1[Y][n] >> data1[Z][n] >> data2[X][n] >> data2[Y][n] >> data2[Z][n];
	}
	

	map<int, char> gridmap[3];	
	int *gridstep[3];	
	char *grid;	
	for(int x=0; x<3; x++){
		for(int n=0; n<N; n++){
			gridmap[x].insert(make_pair(data1[x][n], -1));
			gridmap[x].insert(make_pair(data2[x][n], -1));
		}
	}
	char gridnum[3] = {0,0,0};
	for(int x=0; x<3; x++){
		gridstep[x] = new int[gridmap[x].size()];
		for(auto it = gridmap[x].begin(); it!=gridmap[x].end(); it++, gridnum[x]++){
			gridstep[x][gridnum[x]] = it->first;
			it->second = gridnum[x];
		}
	}
	int griddim = (gridnum[X]-1)*(gridnum[Y]-1)*(gridnum[Z]-1);
	grid = new char[griddim];
	for(int a=0; a<griddim; a++)grid[a] = 0;


	for(int n=0; n<N; n++){
		int xyz1[3], xyz2[3];
		for(int x=0; x< 3; x++){
			xyz1[x] = gridmap[x].find(data1[x][n])->second;
			xyz2[x] = gridmap[x].find(data2[x][n])->second;
		}
		for(int xn=xyz1[X]; xn<xyz2[X]; xn++){
			for(int yn=xyz1[Y]; yn<xyz2[Y]; yn++){
				for(int zn=xyz1[Z]; zn<xyz2[Z]; zn++){
					grid[zn + (gridnum[2]-1)*(yn + (gridnum[1]-1)*xn)]++;
				}
			}
		}
	}


	long long value=0;
	for(int xn=0; xn< gridnum[X]-1; xn++){
		for(int yn=0; yn< gridnum[Y]-1; yn++){
			for(int zn=0; zn< gridnum[Z]-1; zn++){
				if(grid[zn + (gridnum[2]-1)*(yn + (gridnum[1]-1)*xn)] >= K){
					value += (long long)(gridstep[X][xn+1] -gridstep[X][xn])*
										(gridstep[Y][yn+1] -gridstep[Y][yn])*
										(gridstep[Z][zn+1] -gridstep[Z][zn]);
				}
			}
		}
	}
	
	cout << value << endl;


	for(int x=0; x<3; x++){
		delete[] data1[x];
		delete[] data2[x];
		delete[] gridstep[x];
	}
	delete[] grid;
}

Compiler output:
a.cc:7:1: error: '::main' must return 'int'
    7 | void main(){
      | ^~~~
Language: C++

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

typedef __int64 LONG;

LONG zip[3][200];
int M[3];

int a[50][6];
int N, K;

int O[200][200][200];

int main()
{
	scanf("%d %d", &N, &K);	
	memset(zip, -1, sizeof(zip));
	memset(M, 0, sizeof(M));
	memset(a, 0, sizeof(a));
	memset(O, 0, sizeof(O));
	
	for (int i = 0; i < N; i++){
		for (int j = 0; j < 6; j++){
			scanf("%d", &a[i][j]);
			
			bool f = true;
			for (int k = 0; k < M[j % 3]; k++){
				if (zip[j % 3][k] == a[i][j]){
					f = false;
					break;
				}
			}
			
			if (f){
				zip[j % 3][M[j % 3]] = a[i][j];
				M[j % 3]++;
			}
		}
	}
	
	for (int i = 0; i < 3; i++){
		sort(zip[i], zip[i] + M[i]);
	}
	
	for (int i = 0; i < N; i++){
		for (int j = 0; j < 6; j++){
			int l = 0;
			int r = M[j % 3] - 1;
			int m = (l + r) / 2;
			
			while (zip[j % 3][m] != a[i][j]){
				if (zip[j % 3][m] < a[i][j]){
					l = m + 1;
				}
				else {
					r = m - 1;
				}
				
				m = (l + r) / 2;
			}
			
			a[i][j] = m;
		}
	}
	
	for (int i = 0; i < N; i++){
		for (int x = a[i][0]; x < a[i][3]; x++){
			for (int y = a[i][1]; y < a[i][4]; y++){
				for (int z = a[i][2]; z < a[i][5]; z++){
					O[x][y][z]++;
				}
			}
		}
	}

	LONG sum = 0;
	
	for (int x = 0; x < 200; x++){
		for (int y = 0; y < 200; y++){
			for (int z = 0; z < 200; z++){
				if (O[x][y][z] >= K){
					sum += (zip[0][x + 1] - zip[0][x]) * 
					       (zip[1][y + 1] - zip[1][y]) *
					       (zip[2][z + 1] - zip[2][z]);
				}
			}
		}
	}
	
	printf("%I64d\n", sum);
	
	return 0;
}

Compiler output:
a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    6 | typedef __int64 LONG;
      |         ^~~~~~~
      |         __int64_t
a.cc:8:1: error: 'LONG' does not name a type
    8 | LONG zip[3][200];
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:16: error: 'zip' was not declared in this scope
   19 |         memset(zip, -1, sizeof(zip));
      |                ^~~
a.cc:78:9: error: 'LONG' was not declared in this scope
   78 |         LONG sum = 0;
      |         ^~~~
a.cc:84:41: error: 'sum' was not declared in this scope
   84 |                                         sum += (zip[0][x + 1] - zip[0][x]) *
      |                                         ^~~
a.cc:92:27: error: 'sum' was not declared in this scope
   92 |         printf("%I64d\n", sum);
      |                           ^~~
Language: C++

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

using namespace std;
#define MAX_N 50
#define rep(i,n) for(int i=0;i<n;i++)

int W,H,D,N,K;
int X1[MAX_N],X2[MAX_N],Y1[MAX_N],Y2[MAX_N],D1[MAX_N],D2[MAX_N];
vector<int> xl,yl,dl;

int fld[MAX_N * 2][MAX_N*2][MAX_N*2];

int compress(int *x1,int *x2, int w,vector<int> *xs){
	
	rep(i,N){
			int tx1=x1[i], tx2=x2[i];
			xs->push_back(tx1);
			xs->push_back(tx2);
	}
	sort(xs->begin(),xs->end());
	xs->erase(unique(xs->begin(),xs->end()),xs->end());
	
	rep(i,N){
		x1[i] = find(xs->begin(),xs->end(),x1[i] )- xs->begin();
		x2[i] = find(xs->begin(),xs->end(),x2[i] )- xs->begin();
	}
	return xs->size();
	
}

void solve(){
	W=compress(X1,X2,W,&xl);
	H=compress(Y1,Y2,H,&yl);
	D=compress(D1,D2,D,&dl);

	memset(fld, 0, sizeof(fld));
	rep(i,N){
		for(int d=D1[i]; d<D2[i]; d++){
			for(int y = Y1[i]; y<Y2[i];y++){
				for(int x = X1[i]; x<X2[i];x++){
					fld[d][y][x]++;
				}
			}
		}
	}

	long long int ans=0;
	rep(d,D){
		rep(y,H){
			rep(x,W){
				if(fld[d][y][x]<K)continue;
				ans+=(xl[x+1]-xl[x])*(yl[y+1]-yl[y])*(dl[d+1]-dl[d]);
			}
		}
	}

	printf("%lld\n",ans);
}

int main(){
	scanf("%d %d",&N,&K);
	W=H=D=1000000;
	rep(i,N){
		//int x1,x2,y1,y2,d1,d2;
		scanf("%d %d %d %d %d %d",&X1[i],&Y1[i],&D1[i],&X2[i],&Y2[i],&D2[i]);
	}
	solve();

	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:39:9: error: 'memset' was not declared in this scope
   39 |         memset(fld, 0, sizeof(fld));
      |         ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<vector>
  +++ |+#include <cstring>
    5 |
Language: C++

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);

	void run() {
		int N = sc.nextInt();
		int K = sc.nextInt();
		long[] xS = new long[N];
		long[] yS = new long[N];
		long[] zS = new long[N];
		long[] xT = new long[N];
		long[] yT = new long[N];
		long[] zT = new long[N];
		ArrayList<Long> X = new ArrayList<Long>();
		ArrayList<Long> Y = new ArrayList<Long>();
		ArrayList<Long> Z = new ArrayList<Long>();
		for (int i = 0; i < N; i++) {
			xS[i] = sc.nextLong();
			yS[i] = sc.nextLong();
			zS[i] = sc.nextLong();
			xT[i] = sc.nextLong();
			yT[i] = sc.nextLong();
			zT[i] = sc.nextLong();
			X.add(xS[i]);
			X.add(xT[i]);
			Y.add(yS[i]);
			Y.add(yT[i]);
			Z.add(zS[i]);
			Z.add(zT[i]);
		}

		Collections.sort(X);
		Collections.sort(Y);
		Collections.sort(Z);

		long ans = 0;
		for (int i = 0; i < N * 2 - 1; i++) {
			for (int j = 0; j < N * 2 - 1; j++) {
				for (int k = 0; k < N * 2 - 1; k++) {
					int overlap = 0;
					// x,y,z???????????????????????¨????????????????????????
					// ????????????????¢?????????????????????¬??????????????????
					for (int l = 0; l < N; l++) {
						if (xS[l] <= X.get(i) && X.get(i + 1) <= xT[l]
								&& yS[l] <= Y.get(j) && Y.get(j + 1) <= yT[l]
								&& zS[l] <= Z.get(k) && Z.get(k + 1) <= zT[l]) {
							overlap++;
						}
					}
					if (overlap >= K) {
						ans += (X.get(i + 1) - X.get(i)) * (Y.get(j + 1) - Y.get(j)) * (Z.get(k + 1) - Z.get(k));
					}
				}
			}
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().run();
	}
}

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


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

using namespace std;

namespace
{
	int n, k;
	int x1[50], yy[50], d1[50], x2[50], y2[50], d2[50];
	int cx1[50], cy1[50], cd1[50], cx2[50], cy2[50], cd2[50];

	int compd[123][123][123];
}

//w1,w2???????????????????????§???????????§???????????????
vector<int> compress(int *w1, int *w2)
{
	vector<int>ws;
	for (int i = 0; i < n; ++i)
	{
		ws.push_back(w1[i]);
		ws.push_back(w2[i]);
	}
	sort(ws.begin(), ws.end());
	ws.erase(unique(ws.begin(), ws.end()), ws.end());
	for (int i = 0; i < n; ++i)
	{
		w1[i] = find(ws.begin(), ws.end(), w1[i]) - ws.begin();
		w2[i] = find(ws.begin(), ws.end(), w2[i]) - ws.begin();
	}
	return ws;
}

int main()
{
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; ++i)
	{
		scanf("%d %d %d %d %d %d", x1 + i, yy + i, d1 + i, x2 + i, y2 + i, d2 + i);
	}
	
	auto xsv = compress(x1, x2);
	auto ysv = compress(yy, y2);
	auto dsv = compress(d1, d2);
	int xs = xsv.size();
	int ys = ysv.size();
	int ds = dsv.size();

	memset(compd, 0, sizeof(compd));

	//??????????¨????
	for (int i = 0;i < n;++i)
	{
		const int hash[8][3] = { {0,0,0},{0,0,1},{0,1,0},{0,1,1},{1,0,0},{1,0,1},{1,1,0},{1,1,1}, };
		for (int p = 0; p < 8; ++p)
		{
			compd
				[hash[p][0] ? x1[i] : x2[i]]
				[hash[p][1] ? yy[i] : y2[i]]
				[hash[p][2] ? d1[i] : d2[i]] =
					(hash[p][0]^hash[p][1]^hash[p][2]) ? 1 : -1;
		}
	}
	
	//?´????????????¨???
	for (int x = 0; x < xs; ++x)
	{
		for (int y = 0; y < ys; ++y)
		{
			for (int d = 1; d < ds; ++d)
			{
				compd[x][y][d] += compd[x][y][d - 1];
			}
		}
	}
	for (int x = 0; x < xs; ++x)
	{
		for (int y = 1; y < ys; ++y)
		{
			for (int d = 0; d < ds; ++d)
			{
				compd[x][y][d] += compd[x][y - 1][d];
			}
		}
	}
	for (int x = 1; x < xs; ++x)
	{
		for (int y = 0; y < ys; ++y)
		{
			for (int d = 0; d < ds; ++d)
			{
				compd[x][y][d] += compd[x - 1][y][d];
			}
		}
	}

	long long ans = 0;
	for (int x = 0; x < xs; ++x)
	{
		for (int y = 0; y < ys; ++y)
		{
			for (int d = 0; d < ds; ++d)
			{
				assert(compd[x][y][d] >= 0);
				if (compd[x][y][d] >= k)
				{
					ans += (xsv[x + 1] - xsv[x]) * (ysv[y + 1] - ysv[y]) * (dsv[d + 1] - dsv[d]);
				}
			}
		}
	}
	printf("%lld",ans);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:9: error: 'memset' was not declared in this scope
   52 |         memset(compd, 0, sizeof(compd));
      |         ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <assert.h>
  +++ |+#include <cstring>
    6 |
Language: C++

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

const int MAX_DIS = 1000000;
int n, k;
int x[2][51], y[2][51], z[2][51];
int lx[301], ly[301], lz[301];
int ocean[301][301][301];
long long int ans;

int compress(int *start, int *end, int *lx){
    vector<int> v;

    for(int i = 0; i < n; i++){
        for(int j = -1; j <= 1; j++){
            int x1 = start[i] + j, x2 = end[i] + j;
            if(0 <= x1 && x1 <= MAX_DIS)
                v.push_back(x1);
            if(0 <= x2 && x2 <= MAX_DIS)
                v.push_back(x2);
        }
    }

    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());

    for(int i = 0; i < n; i++){
        start[i] = find(v.begin(), v.end(), start[i]) - v.begin();
        end[i] = find(v.begin(), v.end(), end[i]) - v.begin();
    }

    for(int i = 0; i < v.size(); i++)
        lx[i] = v[i];

    return v.size();
}

int main(){
    scanf("%d%d", &n, &k);
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 2; j++){
            scanf("%d%d%d", &x[j][i], &y[j][i], &z[j][i]);
        }
    }

    int w = compress(x[0], x[1], lx);
    int h = compress(y[0], y[1], ly);
    int d = compress(z[0], z[1], lz);

    for(int i = 0; i < n; i++){
        for(int j = x[0][i]; j < x[1][i]; j++){
            for(int l = y[0][i]; l < y[1][i]; l++){
                for(int m = z[0][i]; m < z[1][i]; m++){
                    ocean[j][l][m]++;
                }
            }
        }
    }

    for(int i = 0; i < w - 1; i++){
        for(int j = 0; j < h - 1; j++){
            for(int l = 0; l < d - 1; l++){
                if(ocean[i][j][l] >= k)
                    ans += (lx[i + 1] - lx[i]) * g(ly[j + 1] - ly[j]) * (lz[l + 1] - lz[l]);
            }
        }
    }

    printf("%lld\n", ans);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:50: error: 'g' was not declared in this scope
   66 |                     ans += (lx[i + 1] - lx[i]) * g(ly[j + 1] - ly[j]) * (lz[l + 1] - lz[l]);
      |                                                  ^
Language: C++

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

const int MAX_DIS = 1000000;
int n, k;
int x[2][51], y[2][51], z[2][51];
int ocean[301][301][301];
long long int lx[301], ly[301], lz[301];
long long int ans;

int compress(int *start, int *end, int *lx){
    vector<int> v;

    for(int i = 0; i < n; i++){
        for(int j = -1; j <= 1; j++){
            int x1 = start[i] + j, x2 = end[i] + j;
            if(0 <= x1 && x1 <= MAX_DIS)
                v.push_back(x1);
            if(0 <= x2 && x2 <= MAX_DIS)
                v.push_back(x2);
        }
    }

    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());

    for(int i = 0; i < n; i++){
        start[i] = find(v.begin(), v.end(), start[i]) - v.begin();
        end[i] = find(v.begin(), v.end(), end[i]) - v.begin();
    }

    for(int i = 0; i < v.size(); i++)
        lx[i] = v[i];

    return v.size();
}

int main(){
    scanf("%d%d", &n, &k);
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 2; j++){
            scanf("%d%d%d", &x[j][i], &y[j][i], &z[j][i]);
        }
    }

    int w = compress(x[0], x[1], lx);
    int h = compress(y[0], y[1], ly);
    int d = compress(z[0], z[1], lz);

    for(int i = 0; i < n; i++){
        for(int j = x[0][i]; j < x[1][i]; j++){
            for(int l = y[0][i]; l < y[1][i]; l++){
                for(int m = z[0][i]; m < z[1][i]; m++){
                    ocean[j][l][m]++;
                }
            }
        }
    }

    for(int i = 0; i < w - 1; i++){
        for(int j = 0; j < h - 1; j++){
            for(int l = 0; l < d - 1; l++){
                if(ocean[i][j][l] >= k)
                    ans += (lx[i + 1] - lx[i]) * (ly[j + 1] - ly[j]) * (lz[l + 1] - lz[l]);
            }
        }
    }

    printf("%lld\n", ans);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:34: error: cannot convert 'long long int*' to 'int*'
   48 |     int w = compress(x[0], x[1], lx);
      |                                  ^~
      |                                  |
      |                                  long long int*
a.cc:13:41: note:   initializing argument 3 of 'int compress(int*, int*, int*)'
   13 | int compress(int *start, int *end, int *lx){
      |                                    ~~~~~^~
a.cc:49:34: error: cannot convert 'long long int*' to 'int*'
   49 |     int h = compress(y[0], y[1], ly);
      |                                  ^~
      |                                  |
      |                                  long long int*
a.cc:13:41: note:   initializing argument 3 of 'int compress(int*, int*, int*)'
   13 | int compress(int *start, int *end, int *lx){
      |                                    ~~~~~^~
a.cc:50:34: error: cannot convert 'long long int*' to 'int*'
   50 |     int d = compress(z[0], z[1], lz);
      |                                  ^~
      |                                  |
      |                                  long long int*
a.cc:13:41: note:   initializing argument 3 of 'int compress(int*, int*, int*)'
   13 | int compress(int *start, int *end, int *lx){
      |                                    ~~~~~^~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

int num[200][200][200]; //x,y,z
int main(void){
	int n, k; cin >> n >> k;
	rep(x, 200)rep(y, 200)rep(z, 200) num[x][y][z] = 0;
	int x1, y1, z1, x2, y2, z2;
	for (int i = 0; i < n; ++i){
		cin >> x1 >> y1 >> z1 >> x2 >> y2 >> z2;
		for (int x = x1; x < x2; ++x){
			for (int y = y1; y < y2; ++y){
				for (int z = z1; z < z2; ++z){
					num[x][y][z]++;z
				}
			}
		}
	}
	int ans = 0;
	rep(x, 200)rep(y, 200)rep(z, 200){
		if(num[x][y][z] == k) ans++;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:57: error: expected ';' before '}' token
   19 |                                         num[x][y][z]++;z
      |                                                         ^
      |                                                         ;
   20 |                                 }
      |                                 ~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)

int n, k;
vector<ll> xs, ys, zs;
map<ll, ll> zipx, zipy, zipz;//<???, ??§??????>
map<ll, ll> unzipx, unzipy, unzipz;//<??§??????, ???>
int num[100][100][100];//???????¨?????????\??????

int main(void){
	cin >> n >> k;
	ll x1[51], x2[51], y1[51], y2[51], z1[51], z2[51];//?????????????????§?¨?
	rep(i, n){
		cin >> x1[i] >> y1[i] >> z1[i];
		cin >> x2[i] >> y2[i] >> z2[i];
		xs.push_back(x1[i]); xs.push_back(x2[i]);
		ys.push_back(y1[i]); ys.push_back(y2[i]);
		zs.push_back(z1[i]); zs.push_back(z2[i]);
	}
	sort(xs.begin(), xs.end());
	xs.erase(unique(xs.begin(),xs.end()), xs.end());//???????¶????
	sort(ys.begin(), ys.end());
	ys.erase(unique(ys.begin(), ys.end()), ys.end());
	sort(zs.begin(), zs.end());
	zs.erase(unique(zs.begin(), zs.end()), zs.end());

	rep(i, xs.size()){
		zipx[i] = xs[i];
		unzipx[xs[i]] = i;
		// printf("unzip[%d] = %d\n", xs[i], i);
		// printf("zip[%d] = %d\n", i, xs[i]);
	}
	rep(i, ys.size()){
		zipy[i] = ys[i];
		unzipy[ys[i]] = i;
		// printf("unzip[%d] = %d\n", ys[i], i);
		// printf("zip[%d] = %d\n", i, ys[i]);
	}
	rep(i, zs.size()){
		zipz[i] = zs[i];
		unzipz[zs[i]] = i;
		// printf("unzip[%d] = %d\n", zs[i], i);
		// printf("zip[%d] = %d\n", i, zs[i]);
	}

	memset(num, 0, sizeof(num));
	for (int i = 0; i < n; ++i){
		// printf("%d %d %d %d %d %d\n", unzipx[x1[i]], unzipy[y1[i]], unzipz[z1[i]], unzipx[x2[i]], unzipy[y2[i]], unzipz[z2[i]]);
		for (int x = unzipx[x1[i]]; x < unzipx[x2[i]]; ++x){
			for (int y = unzipy[y1[i]]; y < unzipy[y2[i]]; ++y){
				for (int z = unzipz[z1[i]]; z < unzipz[z2[i]]; ++z){
					// printf("%d %d %d \n", x, y, z);
					num[x][y][z]++;
				}
			}
		}
	}
	ll ans = 0;
	rep(x, 100)rep(y, 100)rep(z, 100){
		if(num[x][y][z] >= k){
			// printf("%lld\n", zipx[x + 1] - zipx[x]);
			// printf("%lld\n", zipy[x + 1] - zipy[y]);
			// printf("%lld\n", zipz[x + 1] - zipz[z]);
			ans += ((zipx[x + 1] - zipx[x]) * (zipy[y + 1] - zipy[y]) * (zipz[z + 1] - zipz[z]));
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:9: error: 'memset' was not declared in this scope
   51 |         memset(num, 0, sizeof(num));
      |         ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <map>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

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

int n, K;
vector<int> v[6];
vector<int> w[3];
vector<int> u[3];
vector<long long int> d[3];
long long int ans;

int main(){
	scanf("%d %d", &n, &K);
	for(int i=0; i<n; i++){
		for(int j=0; j<6; j++){
			int t;
			scanf("%d", &t);
			v[j].push_back(t);
			w[j%3].push_back(t);
		}
	}
	for(int i=0; i<3; i++){
		sort(w[i].begin(), w[i].end());
		w[i].erase(unique(w[i].begin(), w[i].end()), w[i].end());
	}
/*
	for(int i=0; i<3; i++){
		for(int j=0; j<w[i].size(); j++){
			printf("%d\t", w[i][j]);
		}
		printf("\n");
	}
*/
	for(int i=0; i<n; i++){
		for(int j=0; j<6; j++){
			v[j][i] = find(w[j%3].begin(), w[j%3].end(), v[j][i]) - w[j%3].begin();
		}
	}
/*
	for(int i=0; i<n; i++){
		for(int j=0; j<6; j++){
			printf("%d\t", v[j][i]);
		}
		printf("\n");
	}
*/
	for(int i=0; i<3; i++){
		for(int j=0; j<w[i].size()-1; j++){
			d[i].push_back(w[i][j+1]-w[i][j]);
		}
	}
/*
	for(int i=0; i<3; i++){
		for(int j=0; j<d[i].size(); j++){
			printf("%d\t", d[i][j]);
		}
		printf("\n");
	}
*/
	int u[w[0].size()][w[1].size()][w[2].size()];
	memset(u, 0, sizeof(u));
	for(int i=0; i<n; i++){
		for(int j=v[0][i]; j<v[3][i]; j++){
			for(int k=v[1][i]; k<v[4][i]; k++){
				for(int l=v[2][i]; l<v[5][i]; l++){
					u[j][k][l]++;
				}
			}
		}
	}

	for(int i=0; i<w[0].size(); i++){
		for(int j=0; j<w[1].size(); j++){
			for(int k=0; k<w[2].size(); k++){
				if(u[i][j][k] >= K) ans += d[0][i] * d[1][j] * d[2][k];
			}
		}
	}
/*
	for(int i=0; i<3; i++)
		for(int j=0; j<w[i].size(); j++)
			u[i].push_back(0);

	for(int i=0; i<3; i++){
		for(int j=0; j<n; j++){
			for(int k=v[i][j]; k<v[i+3][j]; k++){
				u[i][k]++;
			}
		}
	}

	for(int i=0; i<3; i++){
		for(int j=0; j<u[i].size(); j++){
			printf("%d\t", u[i][j]);
		}
		printf("\n");
	}

	for(int i=0; i<u[0].size()-1; i++){
		for(int j=0; j<u[1].size()-1; j++){
			for(int k=0; k<u[2].size()-1; k++){
				if(u[0][i] >= K && u[1][j] >= K && u[2][k] >= K){
					ans += d[0][i] * d[1][j] * d[2][k];
					printf("%d %d %d\n", i, j, k);
				}
			}
		}
	}
*/
	printf("%lld\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:9: error: 'memset' was not declared in this scope
   62 |         memset(u, 0, sizeof(u));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#define FI first
#define SE second
#define PB push_back
#define MT make_tuple
#defineint long long
using namespace std;

int N,K;
int fld[105][105][105];
int X1[55],X2[55],Y1[55],Y2[55],Z1[55],Z2[55];
vector<int> X,Y,Z;

vector<int> compress(int *x1,int *x2){
    vector<int> xs;
    for(int i=0;i<N;++i){
        xs.PB(x1[i]);
        xs.PB(x2[i]);
    }
    sort(xs.begin(),xs.end());
    xs.erase(unique(xs.begin(),xs.end()),xs.end());
    for(int i=0;i<N;++i){
        x1[i]=lower_bound(xs.begin(),xs.end(),x1[i])-xs.begin();
        x2[i]=lower_bound(xs.begin(),xs.end(),x2[i])-xs.begin();
    }
    vector<int> length;
    for(int i=0;i<xs.size()-1;++i){
        length.PB(xs[i+1]-xs[i]);
    }
    return length;
}


signed main(){
    cin>>N>>K;
    for(int i=0;i<N;++i)cin>>X1[i]>>Y1[i]>>Z1[i]>>X2[i]>>Y2[i]>>Z2[i];
    X=compress(X1,X2);
    Y=compress(Y1,Y2);
    Z=compress(Z1,Z2);
    for(int i=0;i<N;++i){
        for(int x=X1[i];x<X2[i];++x){
            for(int y=Y1[i];y<Y2[i];++y){
                for(int z=Z1[i];z<Z2[i];++z){
                    fld[x][y][z]++;
                }
            }
        }
    }
    int ans=0;
    for(int x=0;x<X.size();++x){
        for(int y=0;y<Y.size();++y){
            for(int z=0;z<Z.size();++z){
                if(fld[x][y][z]>=K)ans+=X[x]*Y[y]*Z[z];
            }
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc:22:2: error: invalid preprocessing directive #defineint; did you mean #define?
   22 | #defineint long long
      |  ^~~~~~~~~
      |  define
Language: C++

#include<iostream>
#define e(i,n) for(int i=0;i<n;i++)
using namespace std;int n,q,p;long long x[110],y[110],z[110],a[110][2],b[110][2],c[110][2],s;int main(){cin>>n>>q;e(i,2*n){cin>>x[i]>>y[i]>>z[i];a[i/2][i%2]=x[i],b[i/2][i%2]=y[i],c[i/2][i%2]=z[i];}sort(x,x+n*2);sort(y,y+n*2);sort(z,z+n*2);s=0;e(i,n*2-1)e(j,n*2-1)e(k,n*2-1){p=0;e(t,n){bool o=1;e(r,2){if(a[t][0]>x[i+r]||x[i+r]>a[t][1])o=0;if(b[t][0]>y[j+r]||y[j+r]>b[t][1])o=0;if(c[t][0]>z[k+r]||z[k+r]>c[t][1])o=0;}if(o)p++;}if(p>=q)s+=(x[i+1]-x[i])*(y[j+1]-y[j])*(z[k+1]-z[k]);}cout<<s<<endl;return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:198: error: 'sort' was not declared in this scope; did you mean 'short'?
    3 | using namespace std;int n,q,p;long long x[110],y[110],z[110],a[110][2],b[110][2],c[110][2],s;int main(){cin>>n>>q;e(i,2*n){cin>>x[i]>>y[i]>>z[i];a[i/2][i%2]=x[i],b[i/2][i%2]=y[i],c[i/2][i%2]=z[i];}sort(x,x+n*2);sort(y,y+n*2);sort(z,z+n*2);s=0;e(i,n*2-1)e(j,n*2-1)e(k,n*2-1){p=0;e(t,n){bool o=1;e(r,2){if(a[t][0]>x[i+r]||x[i+r]>a[t][1])o=0;if(b[t][0]>y[j+r]||y[j+r]>b[t][1])o=0;if(c[t][0]>z[k+r]||z[k+r]>c[t][1])o=0;}if(o)p++;}if(p>=q)s+=(x[i+1]-x[i])*(y[j+1]-y[j])*(z[k+1]-z[k]);}cout<<s<<endl;return 0;}
      |                                                                                                                                                                                                      ^~~~
      |                                                                                                                                                                                                      short
Language: C++

#include<iostream>
#include<algorithm>
class road{
public:
    int dp[1<<10][4];
    int num;
    road(){
        for(int i=0;i<(1<<10);++i){
            for(int j=0;j<4;++j){
                dp[i][j]=-1;
            }
        }
    }
};
int N,M,K;
road **map;
int mx[]{1,0,-1,0},my[]{0,1,0,-1};
int search(int,int,int,int);
using namespace std;
int main(){
    cin>>N>>M>>K;
    map=new road*[M+1];
    for(int i=1;i<=M;++i){
        map[i]=new road[N+1];
    }
    char dummy;
    for(int i=1;i<=N;++i){
        for(int j=1;j<=M;++j) {
            cin>>dummy;
            if(dummy=='#'){
                map[j][i].num=-1;
            }else if(dummy=='.'){
                map[j][i].num=0;
            }else{
                map[j][i].num=dummy-'0';
            }
        }
    }
    cout<<search(1,1,0,K)<<endl;
    return 0;
}
int search(int x,int y,int lo,int k){
    if(y==0||x==0||y>N||x>M||map[x][y].num==-1)return INT32_MIN;
    if(x==M&&y==N&&k==0)return 0;
    if(map[x][y].dp[lo][k]>-1)return map[x][y].dp[lo][k];
    int stock=0;
    int res=INT32_MIN;
    swap(stock,map[x][y].num);
    for(int i=0;i<2;++i){
        res=max(search(x+mx[i],y+my[i],(lo>>2)+(i<<8),k),res);
    }
    if(k>0){
        for(int i=2;i<4;++i) {
            res=max(res,search(x+mx[i],y+my[i],(lo>>2)+(i<<8),k-1));
        }
    }
    map[x][y].dp[lo][k]=res+stock;
    swap(stock,map[x][y].num);
    return map[x][y].dp[lo][k];
}

Compiler output:
a.cc: In function 'int search(int, int, int, int)':
a.cc:43:55: error: 'INT32_MIN' was not declared in this scope
   43 |     if(y==0||x==0||y>N||x>M||map[x][y].num==-1)return INT32_MIN;
      |                                                       ^~~~~~~~~
a.cc:47:13: error: 'INT32_MIN' was not declared in this scope
   47 |     int res=INT32_MIN;
      |             ^~~~~~~~~
Language: C++

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime>
using namespace std;

int h,w,K;
string str;
int fie[100][100];
short dp[51][51][4][1<<12+1];
int res=0;

short dfs(int x,int y,int k,int bit,int pc){
	int nx=x,ny=y;
	if(check[x][y][k][bit]!=-1)return dp[x][y][k][bit];
	
	//11nx++,10nx--,01ny++,00ny--;
	int nbit=bit;
	if(nbit >>11 & 1)nbit-=1<<11;
	if(nbit >>10 & 1)nbit-=1<<10;
	nbit<<=2;
	short r=-20000;
	if(k>=1){
		nbit+=2;
		x--;
		if(x>=0 && y>=0 && fie[x][y]!=-1){
			r=max(r,dfs(x,y,k-1,nbit,pc+1));
		}
		x++;
		y--;
		nbit-=2;
		if(x>=0 && y>=0 && fie[x][y]!=-1){
			r=max(r,dfs(x,y,k-1,nbit,pc+1));
		}
		y++;
	}
	nbit+=3;
	x++;
	if(x>=0 && y>=0 && fie[x][y]!=-1){
		r=max(r,dfs(x,y,k,nbit,pc+1));
	}
	x--;
	nbit-=2;
	y++;
	if(x>=0 && y>=0 && fie[x][y]!=-1){
		r=max(r,dfs(x,y,k,nbit,pc+1));
	}
	y--;
	
	int sum=0;
	bool f=false;
	for(int i=0;i<min(pc,6);i++){
		if(bit >>i*2 & 1){
			if(bit >>(i*2+1) & 1)nx--;
			else ny--;
		}else{
			if(bit >>(i*2+1) & 1)nx++;
			else ny++;
		}
		if(nx==x && ny==y){
			f=true;
			break;
		}
	}
	if(!f)sum+=fie[x][y];
	
	if(r<0 && x==w-1 && y==h-1)r=0;
	check[x][y][k][bit]=true;
	return (dp[x][y][k][bit]=sum+r);
}

int main(void){
	scanf("%d%d%d",&h,&w,&K);
	memset(fie,-1,sizeof(fie));
	memset(dp,-1,sizeof(dp));
	for(int i=0;i<h;i++){
		cin >> str;
		for(int j=0;j<w;j++){
			if(str[j]=='.')fie[j][i]=0;
			else if(str[j]=='#')fie[j][i]=-1;
			else fie[j][i]=str[j]-'0';
		}
	}
	printf("%d\n",dfs(0,0,K,0,0));
	return 0;
}

Compiler output:
a.cc: In function 'short int dfs(int, int, int, int, int)':
a.cc:36:12: error: 'check' was not declared in this scope
   36 |         if(check[x][y][k][bit]!=-1)return dp[x][y][k][bit];
      |            ^~~~~
a.cc:89:9: error: 'check' was not declared in this scope
   89 |         check[x][y][k][bit]=true;
      |         ^~~~~
Language: C++

// JOI 2012-2013 予選6
#include<algorithm>
#include<map>
#include<iostream>
#include<vector>
#include<utility>
#include<cstring>

typedef std::pair<int, int> P;

const int INF = 1 << 30;

int H, W, K;
char field[50][51];

std::map<std::vector<P>, int> memo[51][51][4];
int rec( int x, int y, int k, std::vector<P>& visited )
{
	if( k < 0 )
		return -INF;

	std::vector<P> p;
	for( int i = 0; i != visited.size(); ++i )
			if( std::max( x - visited[i].first, 0 ) + std::max( y - visited[i].second, 0 ) <= k )
				p.push_back( visited[i] );

	std::sort( p.begin(), p.end() );
	visited = p;

	if( memo[x][y][k].count( visited ) )
		return memo[x][y][k][visited];

	int ret = -INF;

	if( x == H - 1 && y == W - 1 )
		ret = 0;

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

	for( int d = 0; d != 4; ++d )
	{
		int nx = x + dx[d], ny = y + dy[d];
		int nk = d >= 2 ? k - 1 : k;

		if( nx < 0 || nx >= H || ny < 0 || ny >= W || field[nx][ny] == '#' )
			continue;

		int val = 0;
		std::vector<P> nv = visited;
		if( !std::binary_search( visited.begin(), visited.end(), P( nx, ny ) ) )
		{
			val = field[ny][nx] - '0';
			nv.push_back( P( nx, ny ) );
		}

		ret = std::max( ret, rec( nx, ny, nk, nv ) + val );
	}

	return memo[x][y][k][visited] = ret;
}

int main()
{
	std::cin >> H >> W >> K;
	for( int i = 0; i != H; ++i )
	{
		for( int j = 0; j != W; ++j )
		{
			std::cin >> field[i];

			if( field[i][j] == '.' ) field[i][j] = '0';
		}
	}

	std::cout << rec( 0, 0, K, std::vector<P>() ) << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:41: error: cannot bind non-const lvalue reference of type 'std::vector<std::pair<int, int> >&' to an rvalue of type 'std::vector<std::pair<int, int> >'
   75 |         std::cout << rec( 0, 0, K, std::vector<P>() ) << std::endl;
      |                                         ^~~~~~~~~~~
a.cc:17:47: note:   initializing argument 4 of 'int rec(int, int, int, std::vector<std::pair<int, int> >&)'
   17 | int rec( int x, int y, int k, std::vector<P>& visited )
      |                               ~~~~~~~~~~~~~~~~^~~~~~~
Language: Java

import java.util.Scanner;

public class T1 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int[] len_list = new int[3];
		int[] triangles = new int[3];
		while (true) {
			for (int i = 0; i < 3; i++){
				int len = sc.nextInt();
				len_list[i] = len;
			}
			// 3辺の長さ
			int l1 = len_list[0];
			int l2 = len_list[1];
			int l3 = len_list[2];
			// 存在しない場合出力
			if (l1 + l2 < l3) {
				int t1 = triangles[0];
				int t2 = triangles[1];
				int t3 = triangles[2];
				System.out.println(l1+l2+l3+" "+l1+" "+l2+" "+l3);
			}
			int s1 = l1 * l1 + l2 * l2;
			int s2 = l3 * l3;
			if (s1 > s2) {
				triangles[0]++;
			} else {
				if (s1 == s2) {
					triangles[1]++;
				} else {
					triangles[2]++;
				}
			}

		}
	}
}



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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main3 {
	public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String buf;

		try {
			int count[] = new int[4];
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf, " ");
				ArrayList<Integer> e = new ArrayList<Integer>();
				for (int i=0;i<3;i++) {
					e.add(Integer.parseInt(st.nextToken()));
				}
				Collections.sort(e);
				if (e.get(0)+e.get(1)<=e.get(2)) {
					System.out.println(count[0]+" "+count[1]+" "+count[2]+" "+count[3]);
					break;
				}
				int l = e.get(0)*e.get(0)+e.get(1)*e.get(1);
				int r = e.get(2)*e.get(2);
				if (l==r) {
					count[1]++;
				} else if (l>r) {
					count[2]++;
				} else {
					count[3]++;
				}
				count[0]++;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}



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

import java.util.*;

class Main{
	public static void main(Stinrg[] args){
		int over = 0;
		int count = 0;
		int under = 0;
		Scanner sc = new Scanner(System.in);
		
		while(true){
			String[] str = sc.nextLine().split(" ");
		//put	
			int sml = Integer.parseInt(str[0]);
			int mid = Integer.parseInt(str[1]);
			int lrg = Integer.parseInt(str[2]);
		//sort	
			while(!(sml<=mid && mid<=lrg)){
				if(sml>mid){
					int i=sml;
					sml=mid;
					mid=i;
				}
				if(mid>lrg){
					int i=mid;
					mid=lrg;
					lrg=i;
				}
			}
			
			if(lrg>(sml+mid)){
				break;
			}else if(sml*sml + mid*mid==lrg*lrg){
				count=+1;
			}else if(sml*sml+mid*mid<lrg*lrg){
				over=+1;
			}else if(sml*sml+mid*mid>lrg*lrg){
				under=+1;
			}
		}
	}
}


Compiler output:
Main.java:4: error: cannot find symbol
	public static void main(Stinrg[] args){
	                        ^
  symbol:   class Stinrg
  location: class Main
1 error
Language: C

main(){
int a, b, c, s, flag, tri, right, acute, obtuse;
tri = 0;
right = 0;
acute = 0;
obtuse = 0;
flag = 1;
while(flag){
  scanf("%d%d%d", &a, &b, &c);
  if(a >= b){
    if(a >= c) {a = a;}
    else {s = a; a = c; c = s;}
  }
  else {
    if(b >= c) {s = a; a = b; b = s;}
    else {s = a; a = c; c = s;}
  }
s = (b*b + c*c -a*a) / (2*b*c)
if(s == 0) {tri++; right++;}
else if(s > 0 && s < 1) {tri++; acute++}
else if(s < 0 && s > -1) {tri++; obtuse++}
else {flag = 0;}
}

printf ("%d %d %d %d\n", tri, right, acute, obtuse);
return 0;
}



Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |   scanf("%d%d%d", &a, &b, &c);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:9:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |   scanf("%d%d%d", &a, &b, &c);
      |   ^~~~~
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:31: error: expected ';' before 'if'
   18 | s = (b*b + c*c -a*a) / (2*b*c)
      |                               ^
      |                               ;
   19 | if(s == 0) {tri++; right++;}
      | ~~                             
main.c:25:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   25 | printf ("%d %d %d %d\n", tri, right, acute, obtuse);
      | ^~~~~~
main.c:25:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(){
int a, b, c, s, flag, tri, right, acute, obtuse;
tri = 0;
right = 0;
acute = 0;
obtuse = 0;
flag = 1;
while(flag){
  scanf("%d%d%d", &a, &b, &c);
  if(a >= b){
    if(a >= c) {a = a;}
    else {s = a; a = c; c = s;}
  }
  else {
    if(b >= c) {s = a; a = b; b = s;}
    else {s = a; a = c; c = s;}
  }
s = (b*b + c*c -a*a) / (2*b*c)
if(s == 0) {tri++; right++;}
else if(s > 0 && s < 1) {tri++; acute++;}
else if(s < 0 && s > -1) {tri++; obtuse++;}
else {flag = 0;}
}

printf ("%d %d %d %d\n", tri, right, acute, obtuse);
return 0;
}



Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |   scanf("%d%d%d", &a, &b, &c);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:9:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |   scanf("%d%d%d", &a, &b, &c);
      |   ^~~~~
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:31: error: expected ';' before 'if'
   18 | s = (b*b + c*c -a*a) / (2*b*c)
      |                               ^
      |                               ;
   19 | if(s == 0) {tri++; right++;}
      | ~~                             
main.c:25:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   25 | printf ("%d %d %d %d\n", tri, right, acute, obtuse);
      | ^~~~~~
main.c:25:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(void)
{
	int a, b, c, n, S = 0, A = 0, C = 0, D = 0;

	for (S = 0; ; ) {
		scanf("%d %d %d\n", &a, &b, &c);
		if (a < b) {t = a; a = b; b = t}
		if (a < c) {t = a; a = c; c = t}
		if (a > b + c) break;
		S++;
		if      (a * a <  b * b + c * c) A++;
		else if (a * a == b * b + c * c) C++;
		else if (a * a >  b * b + c * c) D++;
	}
	printf("%d %d %d %d\n", S, A, C, D);
}



Compiler output:
main.c: In function 'main':
main.c:9:29: error: 't' undeclared (first use in this function)
    9 |                 if (a < b) {t = a; a = b; b = t}
      |                             ^
main.c:9:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:48: error: expected ';' before '}' token
    9 |                 if (a < b) {t = a; a = b; b = t}
      |                                                ^
      |                                                ;
main.c:10:48: error: expected ';' before '}' token
   10 |                 if (a < c) {t = a; a = c; c = t}
      |                                                ^
      |                                                ;
Language: C

#include <stdio.h>

int main(void)
{
	int a, b, c, n, t, S = 0, A = 0, C = 0, D = 0;

	for (S = 0; ; ) {
		scanf("%d %d %d\n", &a, &b, &c);
		if (a < b) {t = a; a = b; b = t}
		if (a < c) {t = a; a = c; c = t}
		if (a > b + c) break;
		S++;
		if      (a * a <  b * b + c * c) A++;
		else if (a * a == b * b + c * c) C++;
		else if (a * a >  b * b + c * c) D++;
	}
	printf("%d %d %d %d\n", S, A, C, D);
}



Compiler output:
main.c: In function 'main':
main.c:9:48: error: expected ';' before '}' token
    9 |                 if (a < b) {t = a; a = b; b = t}
      |                                                ^
      |                                                ;
main.c:10:48: error: expected ';' before '}' token
   10 |                 if (a < c) {t = a; a = c; c = t}
      |                                                ^
      |                                                ;
Language: C

#include <stdio.h>

int main()
{
    int a, b, c, t;
    int sa, sb, sc;
 
    sa = sb = sc = 0;
    while () {
        scanf("%d%d%d", &a, &b, &c);
        if (a + b <= c || b + c <= a || c + a <= b) break;
        if (c < a) t = c, c = a, a = t;
        if (c < b) t = c, c = b, b = t;
        t = a*a + b*b;
        if      (c*c == t) sa++;
        else if (c*c <  t) sb++;
        else               sc++;
    }
    printf("%d %d %d %d\n", sa+sb+sc, sa, sb, sc);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:12: error: expected expression before ')' token
    9 |     while () {
      |            ^
Language: C

#include <stdio.h>

int main()
{
    int a, b, c, t;
    int sa, sb, sc;
 
    sa = sb = sc = 0;
    while (i) {
        scanf("%d%d%d", &a, &b, &c);
        if (a + b <= c || b + c <= a || c + a <= b) break;
        if (c < a) t = c, c = a, a = t;
        if (c < b) t = c, c = b, b = t;
        t = a*a + b*b;
        if      (c*c == t) sa++;
        else if (c*c <  t) sb++;
        else               sc++;
    }
    printf("%d %d %d %d\n", sa+sb+sc, sa, sb, sc);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:12: error: 'i' undeclared (first use in this function)
    9 |     while (i) {
      |            ^
main.c:9:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
    int a, b, c, t;
    int sa, sb, sc;
 
    sa = sb = sc = 0;
    while (087) {
        scanf("%d%d%d", &a, &b, &c);
        if (a + b <= c || b + c <= a || c + a <= b) break;
        if (c < a) t = c, c = a, a = t;
        if (c < b) t = c, c = b, b = t;
        t = a*a + b*b;
        if      (c*c == t) sa++;
        else if (c*c <  t) sb++;
        else               sc++;
    }
    printf("%d %d %d %d\n", sa+sb+sc, sa, sb, sc);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:12: error: invalid digit "8" in octal constant
    9 |     while (087) {
      |            ^~~
Language: C

#include <stdio.h>

int main()
{
    int a, b, c, t;
    int sa, sb, sc;
 
    sa = sb = sc = 0;
    while {
        scanf("%d%d%d", &a, &b, &c);
        if (a + b <= c || b + c <= a || c + a <= b) break;
        if (c < a) t = c, c = a, a = t;
        if (c < b) t = c, c = b, b = t;
        t = a*a + b*b;
        if      (c*c == t) sa++;
        else if (c*c <  t) sb++;
        else               sc++;
    }
    printf("%d %d %d %d\n", sa+sb+sc, sa, sb, sc);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:11: error: expected '(' before '{' token
    9 |     while {
      |           ^
      |           (
Language: C

#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
	int a[3],b,c,d,e;
	b=c=d=e=0;
	while(scanf("%d %d %d",&a[0],&a[1],&a[2])!=EOF){
		sort(a,a+3);
		if(a[0]+a[1]<=a[2]){
				cout << b << " " << c << " " << d << " " << e << endl;
				return 0;
		}
		b++;
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])	c++;
		if(a[0]*a[0]+a[1]*a[1]>a[2]*a[2])	d++;
		if(a[0]*a[0]+a[1]*a[1]<a[2]*a[2])	e++;
	}
}

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

#include<cstdio>
int main(void){
    
    int a=0,b=0,c=0;
    int change=0;
    int right=0,obtuse=0,acute=0;
    int value=0,check=0,count=0;
    int flag=true;
    while(flag){
        count++;
        scanf("%d%d%d",&a,&b,&c);
        if(c<a){
            change=a;
            a=c;
            c=a;
        }
        if(c<b){
            change=b;
            a=b;
            b=a;
        }
        check=a+b-c
        value=a*a+(b*b-c*c);
        if(check<=0){
            break;
        }
        if(value==0){
            right++;
        }
        else if(value<0){
            obtuse++;
        }
        else{
            acute++;
        }
    }
    printf("%d %d %d %d",count,right,obtuse,acute);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: expected ';' before 'value'
   22 |         check=a+b-c
      |                    ^
      |                    ;
   23 |         value=a*a+(b*b-c*c);
      |         ~~~~~
Language: C++

#include<iostream>
using namespace std;

int out[4] = {0};

int main() {
int l[3];
while( cin >> l[0] >> l[1] >> l[2] ) {
sort(l, l+3);
if ( l[2] > l[0] + l[1] )
break;

out[0]++;
if ( l[2] * l[2] == l[0] * l[0] + l[1] * l[1] )
out[1]++;
if ( l[2] * l[2] < l[0] * l[0] + l[1] * l[1] )
out[2]++;
if ( l[2] * l[2] > l[0] * l[0] + l[1] * l[1] )
out[3]++;
}

cout << out[0] << " " << out[1] << " " << out[2] << " " << out[3] << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 | sort(l, l+3);
      | ^~~~
      | short
Language: C++

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

int Solve(int a,int b,int c){

  if(c*c < a*a+b*b )return 1;
  if(c*c == a*a+b*b)return 0;
  else return 2;

}

int main(){

  int sum[]={0,0,0};
  vector< int > a(3);

  while(cin>>a[0]>>a[1]>>a[2]){
    sort(a.begin(),a.end());

    if(a[0]+a[1] > a[2]){
      sum[ Solve(a[0],a[1],a[2]) ] ++;
    }
    else{
      break;
    }

  }

  cout << sum[0]+sum[1]+sum[2] << ' ' << sum[0] << ' ' << sum[1] << ' ' << sum[2] << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: C++

#include <iostream>
using namespace std;

int main() {
    int a, b, c;
    int tri=0, sharp=0, obtuse=0, right=0;
    while(cin>>a>>b>>c) {
        int temp = max({a, b, c});
        if(temp==b) {
            swap(a, b);
        } else if(temp==c) {
            swap(a, c);
        }
        if(a>=b+c) break;
        tri++;
        int d = b*b+c*c-a*a;
        if(d==0) right++;
        else if(d>0) sharp++;
        else obtuse++;
    }
    cout << tri << ' ' << right << ' ' << sharp << ' ' << obtuse << '\n';

    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |         int temp = 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