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

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

template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; }

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

	for(int c, d, w, x; cin >> c >> d >> w >> x, c;) {
		vector<vector<int> > e(c, vector<int>(d));
		for(int i = 0; i < c; ++i)
			for(int j = 0; j < d; ++j)
				cin >> e[i][j];

		vector<vector<int> > f(c, vector<int>(d));
		for(int i = 0; i < c; ++i)
			for(int j = 0; j < d; ++j)
				cin >> f[i][j];

		vector<vector<int> > dp(w + 1, vector<int>(x + 1, -INT_MAX));
		dp[0][0] = 0;

		for(int i = 0; i < d; ++i) {
			vector<vector<int> > next(w + 1, vector<int>(x + 1, -INT_MAX));
			for(int j = 0; j < w + 1; ++j) {
				for(int k = 0; k < x + 1; ++k) {
					chmax(next[j][k], dp[j][k]);
					for(int l = 0; l < c; ++l) {
						int tmp_w = j;
						int tmp_e = dp[j][k];
						for(int m = l; m < c; ++m) {
							if(!e[m][i])
								break;

							tmp_w += f[m][i];
							tmp_e += e[m][i];
							if(tmp_w > w)
								break;

							int tmp_x = k + (l != m);
							if(tmp_x > x)
								break;

							chmax(next[tmp_w][tmp_x], tmp_e);
						}
					}
					
				}
			}

			dp.swap(next);
		}

		int ans = 0;
		for(int i = 0; i < w + 1; ++i)
			for(int j = 0; j < x + 1; ++j)
				chmax(ans, dp[i][j]);

		cout << ans << endl;
	}


	return EXIT_SUCCESS;
}

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

ツ！
4
-100 -100
100 -100
100 100
-100 100

4
-99 -100
100 -100
100 100
-99 100

4
-100 -99
100 -99
100 100
-100 100
14
-99 -70
-92 -79
10 -98
37 -100
62 -95
77 -69
88 -47
92 -10
96 28
100 91
42 92
-62 92
-88 91
-98 64
0

Compiler output:
a.cc:1:1: error: '\U000030c4\U0000ff01' does not name a type
    1 | ツ！
      | ^~~~
Language: C++

main(n,i){for(;scanf("%d",&n),n;){for(;n--;)scanf("%*d%*d");puts("0.000000000000000 0.000000000000000");}exit(0);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(n,i){for(;scanf("%d",&n),n;){for(;n--;)scanf("%*d%*d");puts("0.000000000000000 0.000000000000000");}exit(0);}
      |     ^
Language: C++

#include <cstdio>
main(){
cout<<"hello world"<<endl;
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:1: error: 'cout' was not declared in this scope
    3 | cout<<"hello world"<<endl;
      | ^~~~
a.cc:3:22: error: 'endl' was not declared in this scope
    3 | cout<<"hello world"<<endl;
      |                      ^~~~
Language: C++

4
-100 -100
100 -100
100 100
-100 100
4
-99 -100
100 -100
100 100
-99 100
4
-100 -99
100 -99
100 100
-100 100
14
-99 -70
-92 -79
10 -98
37 -100
62 -95
77 -69
88 -47
92 -10
96 28
100 91
42 92
-62 92
-88 91
-98 64
0

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 4
      | ^
Language: C

$<.each{|s| a,b,c=s.split.map{|x|x.to_f};p Math.sqrt(4*b*b-a*a)*a/4+Math.sqrt(c*c+2*b*c)*b/2}

Compiler output:
main.c:1:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | $<.each{|s| a,b,c=s.split.map{|x|x.to_f};p Math.sqrt(4*b*b-a*a)*a/4+Math.sqrt(c*c+2*b*c)*b/2}
      |  ^
Language: C++

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
	fixed(cout);
	cout << setprecision(13);
	while (!cin.eof()) {
		long a,l,x;
		cin >> a >> l >> x;
		auto h_1 = sqrt(l * l - a * a / 4.0);
		auto h_2 = sqrt((x + l) * (x + l) / 4.0 - l * l / 4.0);
		cout << h_1 << endl;
		cout << h_2 << endl;
		cout << a * h_1 / 2 + l * h_2 << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: 'sqrt' was not declared in this scope
   10 |                 auto h_1 = sqrt(l * l - a * a / 4.0);
      |                            ^~~~
Language: C++

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
    fixed(cout);
    cout << setprecision(13);
    while (!cin.eof()) {
        long a,l,x;
        cin >> a >> l >> x;
        double h_1 = sqrt(l * l - a * a / 4.0);
        double h_2 = sqrt((x + l) * (x + l) / 4.0 - l * l / 4.0);
        cout << h_1 << endl;
        cout << h_2 << endl;
        cout << a * h_1 / 2 + l * h_2 << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: 'sqrt' was not declared in this scope
   10 |         double h_1 = sqrt(l * l - a * a / 4.0);
      |                      ^~~~
Language: C++

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
    fixed(cout);
    cout << setprecision(13);
    while (!cin.eof()) {
        long a,l,x;
        cin >> a >> l >> x;
        auto h_1 = sqrt<double>(l * l - a * a / 4.0);
        auto h_2 = sqrt<double>((x + l) * (x + l) / 4.0 - l * l / 4.0);
        cout << h_1 << endl;
        cout << h_2 << endl;
        cout << a * h_1 / 2 + l * h_2 << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'sqrt' was not declared in this scope
   10 |         auto h_1 = sqrt<double>(l * l - a * a / 4.0);
      |                    ^~~~
a.cc:10:25: error: expected primary-expression before 'double'
   10 |         auto h_1 = sqrt<double>(l * l - a * a / 4.0);
      |                         ^~~~~~
a.cc:11:25: error: expected primary-expression before 'double'
   11 |         auto h_2 = sqrt<double>((x + l) * (x + l) / 4.0 - l * l / 4.0);
      |                         ^~~~~~
Language: C++


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

int main()
{
  double a,l,x;
  double s;
  cout<<setprecision(10)<<setiosflags(ios::fixed);
  while(cin>>a>>l>>x){
    x+=l;
    s = sqrt(l*l - a*a/4.0) * a / 2.0;
    s += sqrt(x*x/4.0 - l*l/4.0) * l;
    cout<<s<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'setprecision' was not declared in this scope
   10 |   cout<<setprecision(10)<<setiosflags(ios::fixed);
      |         ^~~~~~~~~~~~
a.cc:4:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    3 | #include<cmath>
  +++ |+#include <iomanip>
    4 | using namespace std;
a.cc:10:27: error: 'setiosflags' was not declared in this scope
   10 |   cout<<setprecision(10)<<setiosflags(ios::fixed);
      |                           ^~~~~~~~~~~
a.cc:10:27: note: 'std::setiosflags' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
Language: C++

#include<cstdio>
#include<math>
main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}

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

#include<cmath>
main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:25: error: 'scanf' was not declared in this scope
    2 | main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}
      |                         ^~~~~
a.cc:2:50: error: 'printf' was not declared in this scope
    2 | main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}
      |                                                  ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<cmath>
  +++ |+#include <cstdio>
    2 | main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}
Language: C++

#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
const double PI = acos(-1);
const double EPS = 1e-8;



int main() {
  double a, l, x;
  while(cin>>a>>l>>x) {
    double s = (a+l+l)/2;
    double S = sqrt(s*(s-a)*(s-l)*(s-l));
    x = (l+x)/2;
    s = (l+x+x)/2;
    S += 2*sqrt(s*(s-l)*(s-x)*(s-x));
    printf("%.10f\n", S);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |   while(cin>>a>>l>>x) {
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <stack>
  +++ |+#include <iostream>
    5 | using namespace std;
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	double a, l, x;
	cout.precision(10);
	while (cin >> a >> l >> x) {
		double area = sqrt(l * l - a * a / 4.0) * a / 2.0 + sqrt((l + x) * (l + x) / 4.0 - l * l / 4.0) * l;
		cout << fixed << area << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: 'sqrt' was not declared in this scope
   10 |                 double area = sqrt(l * l - a * a / 4.0) * a / 2.0 + sqrt((l + x) * (l + x) / 4.0 - l * l / 4.0) * l;
      |                               ^~~~
Language: Java

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static int s;
	static int d;
	static int m;
	static Map<Integer,Kanmi> Fmap = new HashMap<>();
	public void solve(){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNextLine()){
			Main.s = scan.nextInt();
			Main.d = scan.nextInt();
			Main.m = scan.nextInt();
			ArrayList<Kanmi> list = new ArrayList<>();
			for(int i = 0;i < Main.s;i++){
				ArrayList<Integer[]> wp = new ArrayList<>();
				int k = scan.nextInt();
				for(int j = 0;j < k;j++){
					wp.add(new Integer[]{scan.nextInt(),scan.nextInt()});
				}
				list.add(new Kanmi(k,wp));
			}
			Main.Fmap.clear();
			Main.dp.clear();
			for(int i = 0;i < Main.d;i++){
				Main.Fmap.put(i,list.get(scan.nextInt()));
				Main.dp.put(i,new HashMap<>());
			}
			int[] ans = Main.rec(0,Main.m, 0);
			System.out.println(ans[1] + " " + (Main.m - ans[0]));
			scan.next();
		}
		scan.close();
	}
	public static void main(String[] args) {
		new Main().solve();
		System.exit(0);
	}
	static Map<Integer,Map<Integer,int[]>> dp = new HashMap<>();
	public static int[] rec(int day,int money,int weight){
		if(money < 0){
			return new int[]{Integer.MAX_VALUE,0};
		}
		if(day >= Main.d){
			return new int[]{money,weight};
		}
		if(Main.dp.get(day).containsKey(money)){
			return Main.dp.get(day).get(money);
		}
		int[] max = new int[]{Integer.MAX_VALUE,0};
		for(Integer[] e : Main.Fmap.get(day).wp){
			int[] r = Main.rec(day+1, money-e[1], weight+e[0]);
			if(max[1] <= r[1] && max[0] > r[0]){
				max = r;
			}
		}
		Main.dp.get(day).put(money, max);
		return max;
	}
	static class Kanmi{
		int k;
		ArrayList<Integer[]> wp;
		public Kanmi(int k,ArrayList<Integer[]> wp){
			this.k = k;
			this.wp = wp;
		}
	}

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

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static int s;
	static int d;
	static int m;
	static Map<Integer,Kanmi> Fmap = new HashMap<>();
	public static int main(String[] args) {
		while(true){
			Scanner scan = new Scanner(System.in);
			Main.s = scan.nextInt();
			if(Main.s < 0){break;}
			Main.d = scan.nextInt();
			Main.m = scan.nextInt();
			ArrayList<Kanmi> list = new ArrayList<>();
			for(int i = 0;i < Main.s;i++){
				ArrayList<Integer[]> wp = new ArrayList<>();
				int k = scan.nextInt();
				for(int j = 0;j < k;j++){
					wp.add(new Integer[]{scan.nextInt(),scan.nextInt()});
				}
				list.add(new Kanmi(k,wp));
			}
			for(int i = 0;i < Main.d;i++){
				Main.Fmap.put(i,list.get(scan.nextInt()));
				Main.dp.put(i,new HashMap<>());
			}
			int[] ans = Main.rec(0,Main.m, 0);
			System.out.println(ans[1] + " " + (Main.m - ans[0]));
			//break;
		}
		return 0;
	}
	static Map<Integer,Map<Integer,int[]>> dp = new HashMap<>();
	public static int[] rec(int day,int money,int weight){
		if(money < 0){
			return new int[]{Integer.MAX_VALUE,0};
		}
		if(day >= Main.d){
			return new int[]{money,weight};
		}
		if(Main.dp.get(day).containsKey(money)){
			return Main.dp.get(day).get(money);
		}
		int[] max = new int[]{Integer.MAX_VALUE,0};
		for(Integer[] e : Main.Fmap.get(day).wp){
			int[] r = Main.rec(day+1, money-e[1], weight+e[0]);
			if(max[1] <= r[1] && max[0] > r[0]){
				max = r;
			}
		}
		Main.dp.get(day).put(money, max);
		return max;
	}
	static class Kanmi{
		int k;
		ArrayList<Integer[]> wp;
		public Kanmi(int k,ArrayList<Integer[]> wp){
			this.k = k;
			this.wp = wp;
		}
	}
}

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


import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static int s;
	static int d;
	static int m;
	static Map<Integer,Kanmi> Fmap = new HashMap<>();
	public static void main(String[] args) {
		while(true){
			Scanner scan = new Scanner(System.in);
			Main.s = scan.nextInt();
			if(Main.s < 0){break;}
			Main.d = scan.nextInt();
			Main.m = scan.nextInt();
			ArrayList<Kanmi> list = new ArrayList<>();
			for(int i = 0;i < Main.s;i++){
				ArrayList<Integer[]> wp = new ArrayList<>();
				int k = scan.nextInt();
				for(int j = 0;j < k;j++){
					wp.add(new Integer[]{scan.nextInt(),scan.nextInt()});
				}
				list.add(new Kanmi(k,wp));
			}
			for(int i = 0;i < Main.d;i++){
				Main.Fmap.put(i,list.get(scan.nextInt()));
				Main.dp.put(i,new HashMap<>());
			}
			int[] ans = Main.rec(0,Main.m, 0);
			System.out.println(ans[1] + " " + (Main.m - ans[0]));
			//break;
		}
		System.exit(0);
	}
	static Map<Integer,Map<Integer,int[]>> dp = new HashMap<>();
	public static int[] rec(int day,int money,int weight){
		if(money < 0){
			return new int[]{Integer.MAX_VALUE,0};
		}
		if(day >= Main.d){
			return new int[]{money,weight};
		}
		if(Main.dp.get(day).containsKey(money)){
			return Main.dp.get(day).get(money);
		}
		int[] max = new int[]{Integer.MAX_VALUE,0};
		for(Integer[] e : Main.Fmap.get(day).wp){
			int[] r = Main.rec(day+1, money-e[1], weight+e[0]);
			if(max[1] <= r[1] && max[0] > r[0]){
				max = r;
			}
		}
		Main.dp.get(day).put(money, max);
		return max;
	}
	static class Kanmi{
		int k;
		ArrayList<Integer[]> wp;
		public Kanmi(int k,ArrayList<Integer[]> wp){
			this.k = k;
			this.wp = wp;
		}
	}
}

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

#define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
#include <cctype>
#include <utility>

using namespace std;

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

int tx[] = {0,1,0,-1};
int ty[] = {-1,0,1,0};

static const double EPS = 1e-8;

class Goods{
public:
	short w;
	short p;
	Goods(short _w,short _p) : w(_w), p(_p) {}
};

short dp[101][5001];
const static short MAX_W = 5000;

short main(){
	short s,d,m;
	
	while(~scanf("%hd %hd %hd",&s,&d,&m)){		

		map<short,vector<Goods> > data;
		for(short i=0;i<s;i++){
			short k;
			scanf("%hd",&k);
			for(short j=0;j<k;j++){
				short w,p;
				scanf("%hd %hd",&w,&p);
				data[i].push_back(Goods(w,p));
			}
		}

		vector<short> days;

		for(short i=0;i<d;i++){
			short f;
			scanf("%hd",&f);
			days.push_back(f);
		}

		
		memset(dp,0x3f,sizeof(dp));
		dp[0][0] = 0;

		for(short idx=0;idx<days.size();idx++){
			vector<Goods>& it = data[days[idx]];
			
			for(short i=0;i < it.size();i++){
				short w = it[i].w;
				short p = it[i].p;
				for(short j=0;j<=MAX_W;j++){		
					if(j-w >= 0){
						dp[idx+1][j] = min(min(dp[idx][j],dp[idx+1][j]),(short)(dp[idx][j-w]+p));
					}
					else{
						dp[idx+1][j] = min(dp[idx+1][j],dp[idx][j]);
					}
				}
			}
		}

		short resw=0;
		short resm=0;
		for(short i=0;i<=MAX_W;i++){
			if(dp[d][i] <= m){
				resm = dp[d][i];
				resw = i;
			}
		}

		printf("%hd %hd\n",resw,resm);
	}
}

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

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

#define REP(i, s, e) for(int i = (int)s; i < (int) e; i++)
#define rep(i, n) REP(i, 0 ,n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

#define fi first
#define se second
#define pb push_back
#define mp make_pair

typedef long long ll;


double dist(double x, double y){
    return sqrt(x*x+y*y);
}

int main(){
    int n;
    while(cin>> n && n){
        vector<double> x(n), y(n), r(n);
        rep(i, n) cin>>x[i]>>y[i]>>r[i];
        auto check = [&](double m){
            rep(i, n) rep(j, i) if(dist(x[i]-x[j], y[i]-y[j]) > (r[i]+r[j])*m+EPS) return false;
            return true;
        };
        double ng = 0.0, ok = 1e8;
        rep(i, 10000){
            double m = (ng + ok) / 2.0;
            if(check(m)) ok = m;
            else ng = m;
        }
        printf("%.15lf\n", ok);
    }
}

Compiler output:
a.cc: In lambda function:
a.cc:27:79: error: 'EPS' was not declared in this scope
   27 |             rep(i, n) rep(j, i) if(dist(x[i]-x[j], y[i]-y[j]) > (r[i]+r[j])*m+EPS) return false;
      |                                                                               ^~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
#include<iostream>
#include<cmath>
#include<ctime>
#define INF 1000001LL
#define INF2 1000001000000LL
using namespace std;

typedef long long ll;

struct cord{
  int d,k;
  vector<ll> c;
  cord(void){d = k = 0;c.clear();}
  cord(vector<ll> v){d = v.size(); k = 0; c = v;}
  bool operator<(const cord a)const{return c[k]<a.c[k];}
  bool operator==(const cord a)const{return c==a.c;}
};

ll dis(cord a, cord b){
  if(a.d != b.d)return INF;
  ll res = 0;
  for(int i=0;i<a.d;i++)res += (a.c[i]-b.c[i]) * (a.c[i]-b.c[i]);
  return res;
}

struct KDTree{
  int n,d,root;
  vector<cord> v;

  KDTree(void){n = d = root = 0;v.clear();}

  KDTree(vector<cord> x){
    n = x.size();
    if(!n)return;
    d = x[0].c.size();
    if(!d)return;
    v = x;
    compose(0,n,0);
  }

  void compose(int l, int r, int depth){
    if(r-l<=1)return;
    for(int i=l;i<r;i++)v[i].k = depth;
    sort(v.begin()+l,v.begin()+r);

    compose(l,(l+r)/2,(depth+1)%d);
    compose((l+r)/2+1,r,(depth+1)%d);
    return;
  }

  void search(int l,int r,vector<ll> &range, cord p, int depth, ll &dist){
    if(r-l<1)return;

    for(int i=0;i<d;i++){
      if(range[2*i]>p.c[i] && (range[2*i]-p.c[i])*(range[2*i]-p.c[i]) > dist)return;
      if(range[2*i+1]<p.c[i] && (range[2*i+1]-p.c[i])*(range[2*i+1]-p.c[i]) > dist)return;
    }
   
    int mid = (l+r)/2;
    dist = min(dist,dis(p,v[mid]));

    ll tmp = range[2*depth];
    range[2*depth] = v[mid].c[depth];
    search(mid+1,r,range,p,(depth+1)%d,dist);
    range[2*depth] = tmp;
    
    tmp = range[2*depth+1];
    range[2*depth+1] = v[mid].c[depth];
    search(l,mid,range,p,(depth+1)%d,dist);
    range[2*depth+1] = tmp;
  }
};

int n,q,m;
vector<cord> v;
cord p,r;
vector<ll> tmp;   

int main(){
  vector<ll> range;
  for(int i=0;i<3;i++){
    range.push_back(-INF); 
    range.push_back(INF);
  }

  while(scanf("%d%d",&n,&q)!=EOF,n||q){
    v.resize(n); tmp.resize(3);

    for(int i=0;i<n;i++){
      for(int j=0;j<3;j++)scanf("%lld",&tmp[j]);
      v[i] = cord(tmp);
    }
    for(int i=0;i<n;i++)a[i] = v[i];

    KDTree kd(v);
    for(int i=0;i<q;i++){
      scanf("%d",&m);
      double ans = 0;
      ll now, prv;

      for(int j=0;j<3;j++)scanf("%lld",&tmp[j]);

      p = cord(tmp); prv = INF2;
      kd.search(0,n,range,p,0,prv);

      for(int j=1;j<m;j++){
	for(int k=0;k<3;k++)scanf("%lld",&tmp[k]);

	r = cord(tmp); now = INF2;
	kd.search(0,n,range,r,0,now);
	ans += min(sqrt(prv) + sqrt(now), sqrt(dis(p,r)) );
	prv = now; p = r;
      }
      printf("%.10lf\n",ans);
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:25: error: 'a' was not declared in this scope
   97 |     for(int i=0;i<n;i++)a[i] = v[i];
      |                         ^
Language: Java

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;
import java.util.PriorityQueue;
import java.math.BigInteger;
import java.math.BigDecimal;
      
public class Main{
  
static final InputStream in=System.in;
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
static final long LINF=Long.MAX_VALUE/2;
  
public static void main(String[] args) throws IOException{
InputReader ir=new InputReader(in);
while(true){
n=ir.nextInt();
if(n==0) break;
Vector[] vs=new Vector[n];
for(int i=0;i<n;i++) vs[i]=new Vector(ir.nextInt(),ir.nextInt());
double ans=0;
for(int i=0;i<n-1;i++) ans+=(double)Math.abs(vs[i].crossP(vs[i+1]))/2;
ans+=(double)Math.abs(vs[n-1].crossP(vs[0]))/2;
out.println(ans);
}
out.flush();
}

static class Vector{

int x;
int y;

public Vector(int x,int y){this.x=x; this.y=y;}

public int crossP(Vector v){return this.x*v.y-this.y*v.x;}

public int dotP(Vector v){return this.x*v.x+this.y*this.y;}

public double length(){return Math.hypot(x,y);}

public String toString{return "("+this.x+","+this.y+")";}
}

static class InputReader {
private InputStream in;
private byte[] buffer=new byte[1024];
private int curbuf;
private int lenbuf;
  
public InputReader(InputStream in) {this.in=in;}
    
public int readByte() {
if(lenbuf==-1) throw new InputMismatchException();
if(curbuf>=lenbuf){
curbuf= 0;
try{
lenbuf=in.read(buffer);
}
catch (IOException e) {
throw new InputMismatchException();
}
if(lenbuf<=0)
return -1;
}
return buffer[curbuf++];
}
  
public boolean isSpaceChar(int c){return !(c>=33&&c<=126);}
  
private int skip() {int b; while((b = readByte())!=-1&&isSpaceChar(b)); return b;}
  
public String next() {
int b=skip();
StringBuilder sb=new StringBuilder();
while(!isSpaceChar(b)){
sb.appendCodePoint(b);
b=readByte();
}
return sb.toString();
}
   
public int nextInt() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
int res=0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}
  
public long nextLong() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
long res = 0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}
  
public int[] toIntArray(int n){
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=nextInt();
return a;
}
}
}

Compiler output:
Main.java:52: error: ';' expected
public String toString{return "("+this.x+","+this.y+")";}
                      ^
1 error
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int Case = 1;
		while(true){
			int n = sc.nextInt();
			if(n==0)break;
			double a[][] = new double[n][2];
			for(int i=0;i<n;i++){
				a[i][0] = sc.nextDouble();
				a[i][1] = sc.nextDouble();
			}
			double area = 0;
			for(int i=0;i<n-1;i++) area+=(a[i][0]*a[i+1][1]-a[i][1]*a[i+1][0])/2;
			area+=(a[n-1][0]*a[0][1]-a[n-1][1]*a[0][0])/2;
			System.out.printf("%d %.1f\n", Case++, -area);
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

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

public class AreaofPolygons {
    
    public static void main(String[] args) throws IOException{
        int j = 1;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in),1);
        
        while(true){
            ArrayList<Integer> x = new ArrayList<>();
            ArrayList<Integer> y = new ArrayList<>();

            int n = Integer.parseInt(br.readLine());
            if(n == 0)
            {
                break;
            }
            for(int i = 0;i<n;i++)
            {
                String st = br.readLine();
                String[] num = st.split(" ",0);
                x.add(Integer.parseInt(num[0]));
                y.add(Integer.parseInt(num[1]));
            }
            int s = 0;
            for(int i = 0;i<n;i++)
            {
                if(i != n - 1)
                {
                    s += (x.get(i)*y.get(i+1) - x.get(i+1)*y.get(i));
                }else{
                    s += (x.get(i)*y.get(0) - x.get(0)*y.get(i));
                }
            }
            double S = Math.abs(s)/2.0;
            System.out.print(j+" ");
            System.out.printf("%.1f",S);
            System.out.println("");
            String musi = br.readLine();
            j++;
        }
    }
}

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

import java.util.Scanner;
public class polygons {
	public static void main(String args[]){
		int n;
		int cnt=0;
		Scanner sc=new Scanner(System.in);
		while (true){
			n=sc.nextInt();
			if (n==0) break;
			double s=0.0;
			int [][] ver=new int[n][2];
			for (int i=0;i<n;i++){
				ver[i][0]=sc.nextInt();
				ver[i][1]=sc.nextInt();
				if(i>1){
					s+=cal(ver[i],ver[i-1],ver[0]);
				}
			}
			cnt++;
			System.out.println(cnt+" "+Math.abs(s/2));
		}
	}
	private static double cal(int [] a,int [] b,int [] o){
		a[0]=a[0]-o[0];
		a[1]=a[1]-o[1];
		b[0]=b[0]-o[0];
		b[1]=b[1]-o[1];
		return(a[0]*b[1]-a[1]*b[0]);
	}
}

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

import java.util.Scanner;
public class main {
	public static void main(String args[]){
		int n;
		int cnt=0;
		Scanner sc=new Scanner(System.in);
		while (true){
			n=sc.nextInt();
			if (n==0) break;
			double s=0.0;
			int [][] ver=new int[n][2];
			for (int i=0;i<n;i++){
				ver[i][0]=sc.nextInt();
				ver[i][1]=sc.nextInt();
				if(i>1){
					s+=cal(ver[i],ver[i-1],ver[0]);
				}
			}
			cnt++;
			System.out.println(cnt+" "+Math.abs(s/2));
		}
	}
	private static double cal(int [] a,int [] b,int [] o){
		a[0]=a[0]-o[0];
		a[1]=a[1]-o[1];
		b[0]=b[0]-o[0];
		b[1]=b[1]-o[1];
		return(a[0]*b[1]-a[1]*b[0]);
	}
}

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

import java.util.*;

public class Main {
  private static Scanner sc = new Scanner(System.in);
  public static void main(String...args) {
    while(sc.hasNext()) {
      final int n = sc.nextInt();
      if (n == 0)
        break;
      solve(n);
  }
  private static void solve(final int n) {
    final int[] x = new int[n];
    final int[] y = new int[n];
    for(int i = 0; i < n; i++) {
      x[i] = sc.nextInt();
      y[i] = sc.nextInt();
    }
    int ans = 0;
    for(int i = 2; i < n; i++)
      ans += x[i-1] * y[i] - x[i] * y[i-1];
    System.out.println(Math.abs(ans));
  }
}

Compiler output:
Main.java:12: error: illegal start of expression
  private static void solve(final int n) {
  ^
1 error
Language: Java

import java.util.*;
 
public class Main {
  private static Scanner sc = new Scanner(System.in);
  public static void main(String...args) {
    while(sc.hasNext()) {
      final int n = sc.nextInt();
      if (n == 0)
        break;
      solve(n);
  }
  private static int case = 1;
  private static void solve(final int n) {
    final int[] x = new int[n];
    final int[] y = new int[n];
    for(int i = 0; i < n; i++) {
      x[i] = sc.nextInt();
      y[i] = sc.nextInt();
    }
    int ans = 0;
    for(int i = 2; i < n; i++)
      ans += x[i-1] * y[i] - x[i] * y[i-1];
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
  }
}

Compiler output:
Main.java:12: error: illegal start of expression
  private static int case = 1;
  ^
Main.java:12: error: <identifier> expected
  private static int case = 1;
                    ^
Main.java:23: error: illegal start of expression
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
                       ^
Main.java:23: error: : or -> expected
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
                                                          ^
4 errors
Language: Java

import java.util.*;
  
public class Main {
  private static Scanner sc = new Scanner(System.in);
  public static void main(String...args) {
    while(sc.hasNext()) {
      final int n = sc.nextInt();
      if (n == 0)
        break;
      solve(n);
    }
  }
  private static int case = 1;
  private static void solve(final int n) {
    final int[] x = new int[n];
    final int[] y = new int[n];
    for(int i = 0; i < n; i++) {
      x[i] = sc.nextInt();
      y[i] = sc.nextInt();
    }
    int ans = 0;
    for(int i = 2; i < n; i++)
      ans += x[i-1] * y[i] - x[i] * y[i-1];
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
  }
}

Compiler output:
Main.java:13: error: <identifier> expected
  private static int case = 1;
                    ^
Main.java:24: error: illegal start of expression
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
                       ^
Main.java:24: error: : or -> expected
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
                                                          ^
3 errors
Language: Java

import java.util.*;
import java.lang.Math;
public class AOJ1100
{
    public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	for(int a=1;;a++){
	    Polygo pol =new Polygo();
	    int n=sc.nextInt();
	    if(n==0)break;
	    for(int i=0;i<n;i++){
		pol.addXY(sc.nextDouble(),sc.nextDouble());
	    }
	    System.out.println(a+" "+Math.abs(pol.getArea()));
	}
    }
    
}
class Polygo
{
    ArrayList<Double> x=new ArrayList<Double>();
    ArrayList<Double> y=new ArrayList<Double>();
    Polygo()
    {
    }
    public void addXY(double x,double y)
    {
	this.x.add(x);
	this.y.add(y);
    }
    public StringBuffer getX()
    {
	StringBuffer s= new StringBuffer();
	for(int i=0;i<x.size();i++){
	    s.append(x.get(i));
	    s.append(" ");
	}
	return s;
    }
    public StringBuffer getY()
    {
	StringBuffer s= new StringBuffer();
	for(int i=0;i<y.size();i++){
	    s.append(y.get(i));
	    s.append(" ");
	}
	return s;
    }
    public double getArea()
    {
	double S=0;
	double[] x1=new double[2];
	double[] y1=new double[2];
	int d[]={1,0};
	
	x1[0]=x.get(0);
	y1[0]=y.get(0);
      
	for(int i=1;i<x.size();i++){
	    x1[i%2]=x.get(i);
	    y1[i%2]=y.get(i);
	    S+=(x1[d[i%2]]-x1[i%2])*(y1[d[i%2]]+y1[i%2]);
	}
	S+=(x.get(x.size()-1)-x.get(0))*(y.get(x.size()-1)+y.get(0));
	
	return S/2;
	
    }
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main{
	static int N, D, money;
	static int[] prices;
	private static int solve(){
        int answer = 0;
        if (prices[0] * 2 > money) return 0;
        if (prices[prices.length - 1] + prices[prices.length - 2] <= money) return prices[prices.length - 1] + prices[prices.length - 2];
        for (int i = 0; i < N - 1; i++)
        {
            int index = Arrays.binarySearch(prices, i + 1, prices.length - i - 1, money - prices[i]);
            if (index > i) return prices[i] + prices[index];
            index = ~index - 1;
            if (index == i) continue;
            answer = Math.max(prices[i] + prices[index], answer);
        }
        return answer;
	}
	public static void main(String args[]){
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] strs = br.readLine().split(",");
        N = Integer.parseInt(strs[0]); D = Integer.parseInt(strs[1]);
        prices = new int[N];
        for (int i = 0; i < N; i++)
            prices[i] = Integer.parseInt(be.readLine());
        Arrays.Sort(prices);
        for (int i = 0; i < D; i++)
        {
            money = Integer.parseInt(be.readLine());
            System.out.println(solve());
        }
	}
}

Compiler output:
Main.java:28: error: cannot find symbol
            prices[i] = Integer.parseInt(be.readLine());
                                         ^
  symbol:   variable be
  location: class Main
Main.java:29: error: cannot find symbol
        Arrays.Sort(prices);
              ^
  symbol:   method Sort(int[])
  location: class Arrays
Main.java:32: error: cannot find symbol
            money = Integer.parseInt(be.readLine());
                                     ^
  symbol:   variable be
  location: class Main
3 errors
Language: C

#include <math.h>
#include <stdio.h>
#pragma warning(disable : 4996)
int n, c, x[100], y[100];
double s(int xa, int ya, int xb, int yb, int xc, int yc) {
	return abs((xb - xa) * (yc - ya) - (xc - xa) * (yb - ya)) * 0.5;
}
int main() {
	while (true) {
		scanf("%d", &n);
		if (n == 0) break;
		for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
		double ret = 0;
		for (int i = 2; i < n; i++) {
			ret += s(x[0], y[0], x[1], y[1], x[i], y[i]);
		}
		printf("%d %.1f\n", ++c, ret);
	}
	return 0;
}

Compiler output:
main.c: In function 's':
main.c:6:16: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    6 |         return abs((xb - xa) * (yc - ya) - (xc - xa) * (yb - ya)) * 0.5;
      |                ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    3 | #pragma warning(disable : 4996)
main.c: In function 'main':
main.c:9:16: error: 'true' undeclared (first use in this function)
    9 |         while (true) {
      |                ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    3 | #pragma warning(disable : 4996)
main.c:9:16: note: each undeclared identifier is reported only once for each function it appears in
    9 |         while (true) {
      |                ^~~~
Language: C

import java.util.*;
  
public class Main {
  private static Scanner sc = new Scanner(System.in);
  public static void main(String...args) {
    while(sc.hasNext()) {
      final int n = sc.nextInt();
      if (n == 0)
        break;
      solve(n);
    }
  }
  private static int case = 1;
  private static void solve(final int n) {
    final int[] x = new int[n];
    final int[] y = new int[n];
    for(int i = 0; i < n; i++) {
      x[i] = sc.nextInt();
      y[i] = sc.nextInt();
    }
    int ans = 0;
    for(int i = 2; i < n; i++)
      ans += x[i-1] * y[i] - x[i] * y[i-1];
    System.out.println(case++ + " " + (.5 * Math.abs(ans)));
  }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<string> vstring;
typedef vector<pint> vpint;
typedef stringstream SS;

template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }

#define rep(i,n) for(int i=0;i<(n);++i)
#define repn(i,m,n) for(int i=(m);i<(n);++i)
#define repd(i,n) for(int i=(n)-1;i>=0;--i)
#define repnd(i,m,n) for(int i=(n)-1;i>=(m);--i)
#define rep0(i,n) for(i=0;i<(n);++i)
#define repn0(i,m,n) for(i=(m);i<(n);++i)
#define repd0(i,n) for(i=(n)-1;i>=0;--i)
#define repnd0(i,m,n) for(i=(n)-1;i>=(m);--i)
#define repc(i,n) for(int i=0;i<=(n);++i)
#define repcn(i,m,n) for(int i=(m);i<=(n);++i)
#define repcd(i,n) for(int i=(n);i>=0;--i)
#define repcnd(i,m,n) for(int i=(n);i>=(m);--i)
#define repc0(i,n) for(i=0;i<=(n);++i)
#define repcn0(i,m,n) for(i=(m);i<=(n);++i)
#define repcd0(i,n) for(i=(n);i>=0;--i)
#define repcnd0(i,m,n) for(i=(n);i>=(m);--i)
#define all(n) n.begin(),n.end()
#define sz(n) ((int)(n).size())
#define IL for(;;)
#define MP make_pair
#define PB push_back
#define X second
#define Y first
#define p_queue(n) priority_queue<n,vector<n>,greater<n> >
#define PUTLINE cout<<"LINE:"<<__LINE__<<endl;

const int INF = 2147483647/3;
const double EPS = 1e-10;
const double PI = acos(-1.0);

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

int x[100], y[100];

int main() {
	int n, res, count = 0;
	IL{
		cin >> n;
		if (n == 0) break;
		rep (i, n) cin >> x[i] >> y[i];
		res = 0;
		rep (i, n - 1) res += (x[i + 1] - x[i]) * (y[i + 1] + y[i]);
		res += (x[0] - x[n - 1]) * (y[0] + y[n + 1]);
		res = abs(res);
		printf("%d %.1f\n", ++count, (double)res / 2);
	}
	return 0;
}

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

#include <stdio.h>

int main(){
	int n, cnt = 1;
	scanf_s("%d", &n);
	while (n){
		float s = 0, x0, y0, xa, xb, ya, yb;
		scanf_s("%f %f", &x0, &y0);
		xb = x0;
		yb = y0;
		for (int i = n - 1; i>0; i--){
			xa = xb;
			ya = yb;
			scanf_s("%f %f", &xb, &yb);
			s += (xb + xa)*(yb - ya);
		}
		s += (x0 + xb)*(y0 - yb);
		printf("%d %.1f\n", cnt++, s>0 ? s / 2 : (-s) / 2);
		scanf_s("%d", &n);
	}
	return 0;
}

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

#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
// ------ Classes ------ //
class Point {
public:
	long double px, py;
	Point() : px(0), py(0) {};
	Point(long double px_, long double py_) : px(px_), py(py_) {};
	friend bool operator==(const Point& p1, const Point& p2) { return p1.px == p2.px && p1.py == p2.py; }
	friend bool operator!=(const Point& p1, const Point& p2) { return p1.px != p2.px || p1.py != p2.py; }
	friend bool operator<(const Point& p1, const Point& p2) { return p1.px < p2.px ? true : (p1.px == p2.px && p1.py < p2.py); }
	friend bool operator>(const Point& p1, const Point& p2) { return p1.px > p2.px ? true : (p1.px == p2.px && p1.py > p2.py); }
	friend bool operator<=(const Point& p1, const Point& p2) { return !(p1 > p2); }
	friend bool operator>=(const Point& p1, const Point& p2) { return !(p1 < p2); }
	friend Point operator+(const Point& p1, const Point& p2) { return Point(p1.px + p2.px, p1.py + p2.py); }
	friend Point operator-(const Point& p1, const Point& p2) { return Point(p1.px - p2.px, p1.py - p2.py); }
	friend Point operator*(const Point& p1, long double d) { return Point(p1.px * d, p1.py + d); }
	friend Point operator*(long double d, const Point& p1) { return p1 * d; }
	friend Point operator/(const Point& p1, long double d) { return Point(p1.px / d, p1.py / d); }
	Point& operator+=(const Point& p1) { px += p1.px; py += p1.py; return *this; }
	Point& operator-=(const Point& p1) { px -= p1.px; py -= p1.py; return *this; }
	Point& operator*=(long double d) { px *= d; py *= d; return *this; }
	Point& operator/=(long double d) { px /= d; py /= d; return *this; }
};
// ------ Functions ------ //
long double norm(const Point& a) { return a.px * a.px + a.py * a.py; }
long double abs(const Point& a) { return sqrtl(norm(a)); }
long double dot(const Point& a, const Point& b) { return a.px * b.px + a.py * b.py; }
long double crs(const Point& a, const Point& b) { return a.px * b.py - a.py * b.px; }
long double area(vector<Point> v) {
	long double ret = 0.0L;
	for (int i = 0; i < v.size(); i++) ret += crs(v[i], v[(i + 1) % v.size()]);
	return ret / 2;
}
// ------ Main ------ //
int n, c; vector<Point> v;
int main() {
	while(scanf("%d", &n), n) {
		p.resize(n);
		for(int i = 0; i < n; i++) cin >> v[i].px >> v[i].py;
		printf("%d %.2f\n", ++c, area(v));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:17: error: 'p' was not declared in this scope
   42 |                 p.resize(n);
      |                 ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<complex>
#include<vector>
#include<queue>
using namespace std;
typedef complex<int> xy_t;
int main()
{
  int n;
  double x,y,sum = 0.0;
  queue<int> answer;
  while(cin >> n && n > 0){
    vector<xy_t> p(n);
    for( int i = 0; i < n; ++i){
      cin >> x >> y;
      p[i] = xy_t(x,y);
    }
    for( int i = 0; i + 2 < n; ++i){
      xy_t a = p[0],b = p[i + 1],c = p[i + 2];
      sum += ((conj(b - a)*(c - a)).imag())/2.0;
    }
    answer.push(abs(sum));
  }
  while(!answer.empty()){
    printf("%.1f\n",answer.top());
    answer.pop();
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:28: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   27 |     printf("%.1f\n",answer.top());
      |                            ^~~
      |                            pop
Language: C++

#incluce <iostream>
#include <stdio.h>
#include <cmath>
#include <vector>

struct vertex{
	int x;
	int y;
	vertex(int x0, int y0){x = x0, y = y0;}
};

typedef std::vector<vertex> convex;

int judgeCurve(vertex p1, vertex p2, vertex p3){
	double vec1_x = p2.x - p1.x, vec1_y = p2.y - p1.y;
	double vec2_x = p3.x - p1.x, vec2_y = p3.y - p1.y;
	
	double ang1 = atan2(vec1_y, vec1_x);
	double vec_x = cos(ang1) * vec2_x + sin(ang1) * vec2_y;
	double vec_y = -sin(ang1) * vec2_x + cos(ang1) * vec2_y;
	
	double ang2 = atan2(vec_y, vec_x);
	if(ang2 > 0) return -1;
	else return 1;
}


double areaTriangle(vertex p1, vertex p2, vertex p3)
{
	double vec1_x = p2.x - p1.x, vec1_y = p2.y - p1.y;
	double vec2_x = p3.x - p1.x, vec2_y = p3.y - p1.y;
	
	return fabs(vec1_x * vec2_y - vec1_y * vec2_x) / 2;
}

double areaConvex(convex conv)
{
	double area = 0;
	
	for(int i = 1; i+1 < (int)conv.size(); i++){
		area += areaTriangle(conv[0], conv[i], conv[i+1]);
	}
	return area;
}

int main(void)
{
	int cnt = 0;
	int n;
	std::vector<vertex> p;
	convex main_conv;
	std::vector<convex> sub_conv;
	
	double area;
	
	while(1){
cin >> n;
		///scanf("%d", &n);
		if(n == 0) break;
		
		int tmp_x, tmp_y;
		
		p.clear();
		main_conv.clear();
		sub_conv.clear();
		
		for(int i = 0; i < n; i++){
cin >> tmp_x >> tmp_y;
			//scanf("%d %d", &tmp_x, &tmp_y);
			p.push_back(vertex(tmp_x, tmp_y));
		}
		
		while(judgeCurve(p[n-1], p[0], p[1]) == -1){
			p.push_back(p[0]);
			p.erase(p.begin());
		}
		
		bool reverseFlag = false;
		int reverse_start, reverse_end;
		convex tmp;
		
		for(int i = 0; i <= n; i++){
			int prev = (n + i - 1) % n, now = (n + i) % n, next = (n + i + 1) % n;
			
			if(judgeCurve(p[prev], p[now], p[next]) == 1){
				main_conv.push_back( p[now] );
				if(reverseFlag){
					reverseFlag = false;
					reverse_end = now;
					tmp.clear();
					for(int i = reverse_start; i <= reverse_end; i++){
						tmp.push_back( p[i] );
					}
					sub_conv.push_back( tmp );
				}
			}else{
				reverseFlag = true;
				reverse_start = prev;
			}
		}
		p.pop_back();
		
		area = 0;
		area = areaConvex(main_conv);
		for(int i = 0; i < (int)sub_conv.size(); i++){
			area -= areaConvex(sub_conv[i]);
		}
		
		cnt++;
		printf("%d %.1f\n", cnt, area);
	}
	
	return 0;
}
	

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include?
    1 | #incluce <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:57:1: error: 'cin' was not declared in this scope; did you mean 'sin'?
   57 | cin >> n;
      | ^~~
      | sin