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

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

using namespace std;

int N,M,L;

int B[10],H[10],P[10],T[10];

int flow[11]; //BÌÉ]¤Ê B,F,AÉË¶A±êÈ~FAÍgíêÈ¢
double ht[11]; //tbãÌAæØçê½Ì³h

void Fill(int l,int r,int in,int &water)
{
	if(water == 0) return ; //ªÈ¢
	if(l != r){
		int ci = l,ch = 0; //ÌCfbNXÆ³
		for(int i = l; i < r; i++){
			if(ch < H[i]){
				ci = i; ch = H[i];
			}
		}
		if(ci >= in){
			Fill(l,ci,in,water);
			Fill(ci+1,r,in,water);
		} else {
			Fill(ci+1,r,in,water);
			Fill(l,ci,in,water);
		}
	}

	int s = ((r == N) ? 100 : B[r]) - ((l == 0) ? 0 : B[l - 1]); //êÊÏ
	double h = ht[l]; //³
	//if(h >= 50.0) return ; //±êÈ~ÇÁÍsÂ\
	double max_h = min((r == N) ? 50 * 30 : H[r],(l == 0) ? 50 * 30 : H[l - 1]);

	////ÇÁ³êé³
	double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s);
	water -= (int)(add_h * s); //ð¸çµ
	for(int i = l; i <= r; i++) ht[i] += add_h; //Êðã°é

}

void solve()
{
	cin >> N;
	flow[0] = 0;
	for(int i = 0; i < N; i++){
		cin >> B[i] >> H[i];
		H[i] *= 30;
		flow[i+1] = 0;
	}

	int F[10],A[10];
	cin >> M;
	for(int i = 0; i < M; i++){
		cin >> F[i] >> A[i];
		for(int j = 0; j <= N; j++){
			if(j == N || F[i] < B[j]){
				flow[j] += A[i];
				break;
			}
		}
	}

	cin >> L;
	for(int i = 0; i < L; i++)
		cin >> P[i] >> T[i];
	
	for(int i = 0; i < L; i++){
		for(int j = 0; j <= N; j++){
			ht[j] = 0.0; // ³NA
		}

		//Ìã©ç¬ü
		for(int j = 0; j <= N; j++){
			if(flow[j] == 0) continue; //¬üÈµ
			int water = flow[j]*T[i];
			Fill(0,N,j,water);
		}

		int p = 0;
		while(p < N && P[i] > B[p]) p++;
		//ÅãÉ30ÅÁÄ³ðàÆÉß·
		printf("%.4lf\n",ht[p] / 30.0);
	}

}

int main()
{
	int D;
	cin >> D;
	for(int i = 0; i < D; i++)
	{
		solve();
	}

	return 0;
}

Compiler output:
a.cc: In function 'void Fill(int, int, int, int&)':
a.cc:40:38: error: 'max_h' was not declared in this scope
   40 |         double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s);
      |                                      ^~~~~
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

int N,M,L;

int B[10],H[10],P[10],T[10];

int flow[11]; //BÌÉ]¤Ê B,F,AÉË¶A±êÈ~FAÍgíêÈ¢
double ht[11]; //tbãÌAæØçê½Ì³h

void Fill(int l,int r,int in,double &water)
{
	if(water == 0) return ; //ªÈ¢
	if(l != r){
		int ci = l,ch = 0; //ÌCfbNXÆ³
		for(int i = l; i < r; i++){
			if(ch < H[i]){
				ci = i; ch = H[i];
			}
		}
		if(ci >= in){
			Fill(l,ci,in,water);
			Fill(ci+1,r,in,water);
		} else {
			Fill(ci+1,r,in,water);
			Fill(l,ci,in,water);
		}
	}

	int s = ((r == N) ? 100 : B[r]) - ((l == 0) ? 0 : B[l - 1]); //êÊÏ
	double h = ht[l]; //³
	//if(h >= 50.0) return ; //±êÈ~ÇÁÍsÂ\
	double max_h = min<double>((r == N) ? 50 * 30 : H[r],(l == 0) ? 50 * 30 : H[l - 1]);

	////ÇÁ³êé³
	double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s);
	water -= add_h * s; //ð¸çµ
	for(int i = l; i <= r; i++) ht[i] += add_h; //Êðã°é

}

void solve()
{
	cin >> N;
	flow[0] = 0;
	for(int i = 0; i < N; i++){
		cin >> B[i] >> H[i];
		H[i] *= 30;
		flow[i+1] = 0;
	}

	int F[10],A[10];
	cin >> M;
	for(int i = 0; i < M; i++){
		cin >> F[i] >> A[i];
		for(int j = 0; j <= N; j++){
			if(j == N || F[i] < B[j]){
				flow[j] += A[i];
				break;
			}
		}
	}

	cin >> L;
	for(int i = 0; i < L; i++)
		cin >> P[i] >> T[i];
	
	for(int i = 0; i < L; i++){
		for(int j = 0; j <= N; j++){
			ht[j] = 0.0; // ³NA
		}

		//Ìã©ç¬ü
		for(int j = 0; j <= N; j++){
			if(flow[j] == 0) continue; //¬üÈµ
			double water = flow[j]*T[i];
			Fill(0,N,j,water);
		}

		int p = 0;
		while(p < N && P[i] > B[p]) p++;
		//ÅãÉ30ÅÁÄ³ðàÆÉß·
		cout << ht[p] / 30.0 << endl;
	}

}

int main()
{
	int D;
	cin >> D;
	for(int i = 0; i < D; i++)
	{
		solve();
	}

	return 0;
}

Compiler output:
a.cc: In function 'void Fill(int, int, int, double&)':
a.cc:38:38: error: 'max_h' was not declared in this scope
   38 |         double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s);
      |                                      ^~~~~
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

int N,M,L;

int B[10],H[10],P[10],T[10];

int flow[11]; //BÌÉ]¤Ê B,F,AÉË¶A±êÈ~FAÍgíêÈ¢
double ht[11]; //tbãÌAæØçê½Ì³h

double min(double a,double b)
{
	return (a > b) ? b : a;
}

void Fill(int l,int r,int in,double &water)
{
	if(water == 0) return ; //ªÈ¢
	if(l != r){
		int ci = l,ch = 0; //ÌCfbNXÆ³
		for(int i = l; i < r; i++){
			if(ch < H[i]){
				ci = i; ch = H[i];
			}
		}
		if(ci >= in){
			Fill(l,ci,in,water);
			Fill(ci+1,r,in,water);
		} else {
			Fill(ci+1,r,in,water);
			Fill(l,ci,in,water);
		}
	}

	int s = ((r == N) ? 100 : B[r]) - ((l == 0) ? 0 : B[l - 1]); //êÊÏ
	double h = ht[l]; //³
	//if(h >= 50.0) return ; //±êÈ~ÇÁÍsÂ\
	double max_h = min((r == N) ? 50 * 30 : H[r],(l == 0) ? 50 * 30 : H[l - 1]);

	////ÇÁ³êé³
	double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s);
	water -= add_h * s; //ð¸çµ
	for(int i = l; i <= r; i++) ht[i] += add_h; //Êðã°é

}

void solve()
{
	cin >> N;
	flow[0] = 0;
	for(int i = 0; i < N; i++){
		cin >> B[i] >> H[i];
		H[i] *= 30;
		flow[i+1] = 0;
	}

	int F[10],A[10];
	cin >> M;
	for(int i = 0; i < M; i++){
		cin >> F[i] >> A[i];
		for(int j = 0; j <= N; j++){
			if(j == N || F[i] < B[j]){
				flow[j] += A[i];
				break;
			}
		}
	}

	cin >> L;
	for(int i = 0; i < L; i++)
		cin >> P[i] >> T[i];
	
	for(int i = 0; i < L; i++){
		for(int j = 0; j <= N; j++){
			ht[j] = 0.0; // ³NA
		}

		//Ìã©ç¬ü
		for(int j = 0; j <= N; j++){
			if(flow[j] == 0) continue; //¬üÈµ
			double water = flow[j]*T[i];
			Fill(0,N,j,water);
		}

		int p = 0;
		while(p < N && P[i] > B[p]) p++;
		//ÅãÉ30ÅÁÄ³ðàÆÉß·
		cout << ht[p] / 30.0 << endl;
	}

}

int main()
{
	int D;
	cin >> D;
	for(int i = 0; i < D; i++)
	{
		solve();
	}

	return 0;
}

Compiler output:
a.cc: In function 'void Fill(int, int, int, double&)':
a.cc:43:38: error: 'max_h' was not declared in this scope
   43 |         double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s);
      |                                      ^~~~~
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

int N,M,L;

int B[10],H[10],P[10],T[10];

int flow[11]; //BÌÉ]¤Ê B,F,AÉË¶A±êÈ~FAÍgíêÈ¢
double ht[11]; //tbãÌAæØçê½Ì³h

double min(double a,double b)
{
	return (a > b) ? b : a;
}

void Fill(int l,int r,int in,double &water)
{
	if(water == 0) return ; //ªÈ¢
	if(l != r){
		int ci = l,ch = 0; //ÌCfbNXÆ³
		for(int i = l; i < r; i++){
			if(ch < H[i]){
				ci = i; ch = H[i];
			}
		}
		if(ci >= in){
			Fill(l,ci,in,water);
			Fill(ci+1,r,in,water);
		} else {
			Fill(ci+1,r,in,water);
			Fill(l,ci,in,water);
		}
	}

	int s = ((r == N) ? 100 : B[r]) - ((l == 0) ? 0 : B[l - 1]); //êÊÏ
	double h = ht[l]; //³
	//if(h >= 50.0) return ; //±êÈ~ÇÁÍsÂ\
	double max_high = min((r == N) ? 50 * 30 : H[r],(l == 0) ? 50 * 30 : H[l - 1]);

	////ÇÁ³êé³
	double add_h = (water > s * (max_high - h)) ? (max_high - h) : (water / (double)s);
	water -= add_h * s; //ð¸çµ
	for(int i = l; i <= r; i++) ht[i] += add_h; //Êðã°é

}

void solve()
{
	cin >> N;
	flow[0] = 0;
	for(int i = 0; i < N; i++){
		cin >> B[i] >> H[i];
		H[i] *= 30;
		flow[i+1] = 0;
	}

	int F[10],A[10];
	cin >> M;
	for(int i = 0; i < M; i++){
		cin >> F[i] >> A[i];
		for(int j = 0; j <= N; j++){
			if(j == N || F[i] < B[j]){
				flow[j] += A[i];
				break;
			}
		}
	}

	cin >> L;
	for(int i = 0; i < L; i++)
		cin >> P[i] >> T[i];
	
	for(int i = 0; i < L; i++){
		for(int j = 0; j <= N; j++){
			ht[j] = 0.0; // ³NA
		}

		//Ìã©ç¬ü
		for(int j = 0; j <= N; j++){
			if(flow[j] == 0) continue; //¬üÈµ
			double water = flow[j]*T[i];
			Fill(0,N,j,water);
		}

		int p = 0;
		while(p < N && P[i] > B[p]) p++;
		//ÅãÉ30ÅÁÄ³ðàÆÉß·
		cout << ht[p] / 30.0 << endl;
	}

}

int main()
{
	int D;
	cin >> D;
	for(int i = 0; i < D; i++)
	{
		solve();
	}

	return 0;
}

Compiler output:
a.cc: In function 'void Fill(int, int, int, double&)':
a.cc:43:38: error: 'max_high' was not declared in this scope
   43 |         double add_h = (water > s * (max_high - h)) ? (max_high - h) : (water / (double)s);
      |                                      ^~~~~~~~
Language: C++

#include <iostream>

using namespace std;
int full( int height_max, int space, int water );

int main(){
  int N, B[100], H[100];  // the number of boards , x position, the height of the board
  int M, F[100], A[100];  // the number of faucets , x position, the amount of water flow
  int L, P[100], T[10];  // the number of observation time, x position, the observation time in seconds
  int block_height[100] = {0};
  int space, water, f;

  //recieve*******************/
  cin >> N;
  for ( int i = 0; i < N; i++ ){
    cin >> B[i] >> H[i];
  }
  cin >> M;
  for ( int j = 0; j < M; j++ ){
    cin >> F[j] >> A[j];
  }
  cin >> L;
  for ( int k = 0; k < L; k++ ){
    cin >> P[k] >> T[k];
  }
  /***************************/
  for ( k = 0; k < L; k++ ){
    for ( j = 0; j < M; j++ ){
      for ( i = 0; B[i] < F[j]; i++ ){
      }
      space = 30 * B[i] - B[i-1];
      if ( H[i] < H[i-1] ){
	height_max = H[i];
      }
      water = T[k] * A[j];
      f = block_height[i-1] = full( height_max, space, water );
      if ( f = 0 ){
	space += 30 * B[i] - B[i+1];
  }

}

int full( int height_max, int space, int water){
  if ( water <= height_max * space ){
    return height_max * space - water;
  }else{
    return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'k' was not declared in this scope
   27 |   for ( k = 0; k < L; k++ ){
      |         ^
a.cc:28:11: error: 'j' was not declared in this scope
   28 |     for ( j = 0; j < M; j++ ){
      |           ^
a.cc:29:13: error: 'i' was not declared in this scope
   29 |       for ( i = 0; B[i] < F[j]; i++ ){
      |             ^
a.cc:31:22: error: 'i' was not declared in this scope
   31 |       space = 30 * B[i] - B[i-1];
      |                      ^
a.cc:33:9: error: 'height_max' was not declared in this scope
   33 |         height_max = H[i];
      |         ^~~~~~~~~~
a.cc:36:37: error: 'height_max' was not declared in this scope
   36 |       f = block_height[i-1] = full( height_max, space, water );
      |                                     ^~~~~~~~~~
a.cc:43:48: error: a function-definition is not allowed here before '{' token
   43 | int full( int height_max, int space, int water){
      |                                                ^
a.cc:49:2: error: expected '}' at end of input
   49 | }
      |  ^
a.cc:27:28: note: to match this '{'
   27 |   for ( k = 0; k < L; k++ ){
      |                            ^
a.cc:49:2: error: expected '}' at end of input
   49 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <map>

using namespace std;

int matrix[200][200] = { { 0 } };

int main(){
	while(true){
		int N;
		cin >> N;
		if(N == 0){ break; }
		for(int i = 0; i < 200; ++i){
			for(int j = 0; j < 200; ++j){ matrix[i][j] = 1000; }
		}
		map<string, int> names;
		while(N--){
			string line;
			cin >> line;
			int delimiter = line.find_first_of('-');
			string a = line.substr(0, delimiter), b = line.substr(delimiter + 1);
			if(names.find(a) == names.end()){
				names.insert(make_pair(a, static_cast<int>(names.size())));
			}
			if(names.find(b) == names.end()){
				names.insert(make_pair(b, static_cast<int>(names.size())));
			}
			int ai = names[a], bi = names[b];
			matrix[ai][bi] = 1;
		}
		for(int k = 0; k < names.size(); ++k){
			for(int i = 0; i < names.size(); ++i){
				for(int j = 0; j < names.size(); ++j){
					if(matrix[i][j] > matrix[i][k] + matrix[k][j]){
						matrix[i][j] = matrix[i][k] + matrix[k][j];
					}
				}
			}
		}
		for(int i = 0; i < names.size(); ++i){
			for(int j = 0; j < names.size(); ++j){
				if(matrix[i][j] <= 2 || matrix[j][i] <= 2){ continue; }
				for(int k = 0; k < names.size(); ++k){
					if(matrix[i][k] == 1 && matrix[j][k] == 1){
						matrix[i][j] = matrix[j][i] = 0;
						modified = true;
						break;
					}
					if(matrix[k][i] == 1 && matrix[k][j] == 1){
						matrix[i][j] = matrix[j][i] = 0;
						modified = true;
						break;
					}
				}
			}
		}
		for(int k = 0; k < names.size(); ++k){
			for(int i = 0; i < names.size(); ++i){
				for(int j = 0; j < names.size(); ++j){
					if(matrix[i][j] > matrix[i][k] + matrix[k][j]){
						matrix[i][j] = matrix[i][k] + matrix[k][j];
					}
				}
			}
		}
		int M;
		cin >> M;
		while(M--){
			string line;
			cin >> line;
			int delimiter = line.find_first_of('-');
			string a = line.substr(0, delimiter), b = line.substr(delimiter + 1);
			if(names.find(a) == names.end() || names.find(b) == names.end()){
				cout << "NO" << endl;
				continue;
			}
			int ai = names[a], bi = names[b];
			if(matrix[ai][bi] < 1000){
				cout << (matrix[ai][bi] % 2 == 1 ? "YES" : "NO") << endl;
				continue;
			}
			cout << "NO" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:49: error: 'modified' was not declared in this scope
   48 |                                                 modified = true;
      |                                                 ^~~~~~~~
a.cc:53:49: error: 'modified' was not declared in this scope
   53 |                                                 modified = true;
      |                                                 ^~~~~~~~
Language: Java

import java.util.Scanner;

public class Fortune{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int data = sc.nextInt();

		for(int j=0; j<data; j++){
			int max = 0;
			int before = sc.nextInt();
			int year = sc.nextInt();
			int type_num = sc.nextInt();
			for(int i=0; i<type_num; i++){
				int type = sc.nextInt();
				double rate = sc.nextDouble();
				int fee = sc.nextInt();
				int after = 0;
				switch(type){
					case 0:
					after = Simple_interest(before, year, rate, fee);
					break;
					case 1:
					after = Compound_interest(before, year, rate, fee);
					break;
				}
				if(max < after) max = after;
			}
			System.out.println(max);
		}
	}

	public static int Simple_interest(int before, int year, double rate, int fee){
		int fortune = before, interest = 0;

		for(int i=0; i<year; i++){
			interest += fortune*rate;
			fortune -= fee;
		}

		return fortune+interest;
	}

	public static int Compound_interest(int before, int year, double rate, int fee){
		int fortune = before, interest = 0;

		for(int i=0; i<year; i++){
			interest += fortune*rate;
			fortune = fortune + interest - fee;
			interest = 0;
		}

		return fortune;
	}
}

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



import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main 
{

	public static void main(String[] args) 
	{
//		System.out.println("START");
		
		Scanner scan = new Scanner(System.in);
		
		int dataSetNum = scan.nextInt();
//		List<DataSet> dataSets = new ArrayList<DataSet>();
		
		for(int i = 0; i < dataSetNum; i++)
		{
//			dataSets.add(new DataSet());
		}
		for(int i = 0; i < dataSetNum; i++)
		{
//			System.out.println(dataSets.get(i).getAnswer());
		}

	}



Compiler output:
Main.java:28: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main 
{

	public static void main(String[] args) 
	{
//		System.out.println("START");
		
		Scanner scan = new Scanner(System.in);
		
		int dataSetNum = scan.nextInt();
		List<DataSet> dataSets = new ArrayList<DataSet>();
		
		for(int i = 0; i < dataSetNum; i++)
		{
			dataSets.add(new DataSet(scan));
		}
		for(int i = 0; i < dataSetNum; i++)
		{
			System.out.println(dataSets.get(i).getAnswer());
		}

	}


	static class DataSet
	{
		Scanner scan;
		int startingMoney;
		int years;
//		List<Method> methods = new ArrayList<Method>();
		int numOfMethods;
		
		int answer;
		
		public int getAnswer()
		{
			return answer;
		}

		void takeIn()
		{
			nextInt();
			
		}
		
		public DataSet(Scanner scanny)
		{
			scan = scanny;
			takeIn();

			//constructor
		}
	}
}


Compiler output:
Main.java:47: error: cannot find symbol
			nextInt();
			^
  symbol:   method nextInt()
  location: class DataSet
1 error
Language: Java

package exercise2;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main 
{

	public static void main(String[] args) 
	{
//		System.out.println("START");
		
		
		int dataSetNum = 4;
		List<DataSet> dataSets = new ArrayList<DataSet>();
		
		for(int i = 0; i < dataSetNum; i++)
		{
			dataSets.add(new DataSet(scan));
		}
		for(int i = 0; i < dataSetNum; i++)
		{
			System.out.println(dataSets.get(i).getAnswer());
		}

	}


	static class DataSet
	{
		Scanner scan;
		int startingMoney;
		int years;
//		List<Method> methods = new ArrayList<Method>();
		int numOfMethods;
		
		int answer;
		
		public int getAnswer()
		{
			return answer;
		}

		void takeIn()
		{
			scan.nextInt();

			
		}
		
		public DataSet(Scanner scanny)
		{
			scan = scanny;
			takeIn();

			//constructor
		}
	}
}


Compiler output:
Main.java:20: error: cannot find symbol
			dataSets.add(new DataSet(scan));
			                         ^
  symbol:   variable scan
  location: class Main
1 error
Language: Java



import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main 
{

	public static void main(String[] args) 
	{
//		System.out.println("START");
		
		
			dataSets.add(new DataSet());

	}


	static class DataSet
	{
		Scanner scan = new Scanner(System.in);
		int startingMoney;
		int years;
//		List<Method> methods = new ArrayList<Method>();
		int numOfMethods;
		
		int answer;
		
		public int getAnswer()
		{
			return answer;
		}

		void takeIn()
		{
			scan.nextInt();

			
		}
		
		public DataSet()
		{
			takeIn();

			//constructor
		}
	}
}


Compiler output:
Main.java:15: error: cannot find symbol
			dataSets.add(new DataSet());
			^
  symbol:   variable dataSets
  location: class Main
1 error
Language: Java

import java.util.*;
public class P1135 {
	Scanner sc ;
	long si;
	int y;
	int t;
	Str[] type;
	void run() {
		sc = new Scanner(System.in);
		int n=sc.nextInt();
		for (int i=0;i<n;i++) {
			si = sc.nextLong();
			y = sc.nextInt();
			t = sc.nextInt();
			type = new Str[t];
			for (int j=0;j<t;j++) 
				type[j] = new Str(sc.nextInt(),sc.nextDouble(),sc.nextInt());
			System.out.println(calc());
			
		}
	}
	
	long calc() {
		long sum;
		long maxSum = 0;
		long tmp;
		for (int j=0;j<t;j++) {
			sum = si;
			tmp = 0;
			for (int i=0;i<y;i++) {
				if (type[j].type == 0){
				tmp = (long) ( (sum) * type[j].r );
				sum = sum + tmp -type[j].cost;
				}else {
					sum = (long) ( sum - type[j].cost ) ;
					tmp += (long) ( (sum) * type[j].r);
				}
//				System.out.println(sum);
			}
			if (type[j].type == 1) sum = sum+tmp;
			maxSum = (sum<maxSum)? maxSum:sum;
		}
		System.out.println();
		return maxSum;
	}
	
	class Str {
		int type;
		double r;
		int cost;
		Str(int type, double r, int cost) {
			this.type = type;
			this.r = r;
			this.cost = cost;
		}
	}
	public static void main(String[] args) {
		new P1135().run();
	}
	
}

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

import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//dirichlet();
		fortune();
		
	}
	
	public static void fortune(){
		Scanner sc = new Scanner(System.in);
		int numOfData = sc.nextInt();
		for(int i = 0; i < numOfData; i++){
			int ini = sc.nextInt();
			int years = sc.nextInt();
			int num = sc.nextInt();
			int max = 0;
			for(int j = 0; j < num; j++){
				int isSev = sc.nextInt();
				double per = sc.nextDouble();
				int hand = sc.nextInt();
				int sum = ini;
				if(isSev == 1){
					for(int k = 0; k < years; k++){
						double plus = sum * per;
						int add = (int)plus;
						sum += add - hand;
					}
				}
				else{
					int save = 0;
					for(int k = 0; k < years; k++){
						//System.out.print(sum + " ");
						double plus = sum * per;
						int add = (int)plus;
						//System.out.print(add + " ");
						save += add;
						sum -= hand;
						//System.out.print(sum + " ");
						//System.out.println(add + " ");
					}
					sum += save;
					//System.out.println(sum);
					
				}
				if(max < sum){
					max = sum;
					
				}

				
			}
			System.out.println(max);
			
		}
		
	}

Compiler output:
Main.java:61: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;

/**
 * Created by Reopard on 2014/05/22.
 */
public class Main {
    static Scanner sc = new Scanner(System.in);
    int initial, year, janre;

    OhgasFortune(int initial, int year, int janre){
        this.initial = initial;
        this.year = year;
        this.janre = janre;
    }


    public static void main(String args[]){
        int m, simpOrComp, commission, tmp, interest, max;
        double rate;
        OhgasFortune o;
        m = sc.nextInt();
        for(int i = 0; i < m; i++){
            max = 0;
            o = new OhgasFortune(sc.nextInt(), sc.nextInt(), sc.nextInt());
            for(int j = 0; j < o.janre; j++){
                tmp = o.initial;
                simpOrComp = sc.nextInt();
                rate = sc.nextDouble();
                commission = sc.nextInt();
                if(simpOrComp == 0){
                    interest = 0;
                    for(int k = 0; k < o.year; k++){
                        interest += tmp * rate;
                        tmp -= commission;
                    }
                    tmp += interest;
                }else{
                    for(int k = 0; k < o.year; k++) tmp += tmp * rate - commission;
                }
                if(max < tmp) max = tmp;
            }
            System.out.println(max);
        }
    }
}

Compiler output:
Main.java:10: error: invalid method declaration; return type required
    OhgasFortune(int initial, int year, int janre){
    ^
1 error
Language: C

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

float estimate_Tanri(float operatingfund,float rate_of_interest,int period,int fee);
float estimate_Fukuri(float operatingfund,float rate_of_interest,int period,int fee);

int main(void) {
	int m;
	scanf("%d",&m);
	int i;
	for(i=0;i<m;i++){
		float operatingfund;
		scanf("%f",&operatingfund);
		int period;
		scanf("%d",&period);

		int n;						//?????¨??????????¨??????°
		scanf("%d",&n);
		int result = 0;
		int j;
		for(j=0;j<n;j++){
			int TorF;
			float rate_of_interest;
			int fee;
			scanf("%d %f %d",&TorF,&rate_of_interest,&fee);

			int tmp;
			if(TorF == 0){
				tmp = estimate_Tanri(operatingfund,rate_of_interest,period,fee);
			}
			else{
				tmp = estimate_Fukuri(operatingfund,rate_of_interest,period,fee);
			}

			if(result[i]<=tmp){
				result = tmp;
			}
		}
		printf("%d\n",result);
	}
	return 0;
}

float estimate_Tanri(float operatingfund,float rate_of_interest,int period,int fee){
	int i;
	float total_interest = 0;
	for(i=0;i<period;i++){
		total_interest += (float)(int)(operatingfund * rate_of_interest);
		operatingfund -= (float)fee;
	}
	return total_interest + operatingfund;
}

float estimate_Fukuri(float operatingfund,float rate_of_interest,int period,int fee){
	int i;
	for(i=0;i<period;i++){
		operatingfund = operatingfund + (float)(int)(operatingfund * rate_of_interest) - (float)fee;
	}
	return operatingfund;
}

Compiler output:
main.c: In function 'main':
main.c:35:34: error: subscripted value is neither array nor pointer nor vector
   35 |                         if(result[i]<=tmp){
      |                                  ^
Language: C

#include <stdio.h>

int main(void){

  int m,fund,year,way;
  int select;
  double rate;
  int commission;
  int interest;
  int i,j,k;
  int res;


  scanf("%d",&m);

  for(k=0;k<m;k++){

    int max[101]={0};
   

    scanf("%d",&fund);
    scanf("%d",&year);
    scanf("%d",&way);

    for(i=0;i<way;i++){
       int result[101]={0};
      scanf("%d %lf %d",&select,&rate,&commission);
      res=fund;
      interest=0;

      if(select==0){
	for(j=0;j<year;j++){
	  interest+=(int)(res*rate);
	  res-=commission;
	}
	result[i]=res+interest;
      }

      else if(select==1){
	for(j=0;j<year;j++){
	  interest=(int)(res*rate);
	  res=(res+interest)-commission;
	}
	result[i]=res;
      }
    }

    for(i=0;i<way;i++){
      if(result[i]>max[k]){
	max[k]=result[i];
      }
    }

  }

  for(i=0;i<m;i++){
    printf("%d\n",max[i]);
  }

  return 0;

}

Compiler output:
main.c: In function 'main':
main.c:49:10: error: 'result' undeclared (first use in this function)
   49 |       if(result[i]>max[k]){
      |          ^~~~~~
main.c:49:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:57:19: error: 'max' undeclared (first use in this function)
   57 |     printf("%d\n",max[i]);
      |                   ^~~
Language: C

#include <math.h>
int main(){
	int N,m,y,n,i,R;
	for(scanf("%d",&n);n--;printf("%d\n",R)){
		for(scanf("%d%d%d",&m,&y,&n),r=m,i=0;i<n;i++){
			int t, c, i, dm=0;
			double r;
			scanf("%d%lf%d",&t,&r,&c);
			if(t){ //fukuri
				for(i=0;i<y;i++){
					dm=(int)floor(r*m);
					m=m+dm-c;
				}
			}else{ //tanri
				for(i=0;i<y;i++){
					dm+=(int)floor(r*m);
					m=m-c;
				}
				m+=dm;
			}
			if(m>R)R=m;
		}
	}
exit(0);}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         for(scanf("%d",&n);n--;printf("%d\n",R)){
      |             ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <math.h>
  +++ |+#include <stdio.h>
    2 | int main(){
main.c:4:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         for(scanf("%d",&n);n--;printf("%d\n",R)){
      |             ^~~~~
main.c:4:13: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:32: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 |         for(scanf("%d",&n);n--;printf("%d\n",R)){
      |                                ^~~~~~
main.c:4:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:32: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:46: error: 'r' undeclared (first use in this function)
    5 |                 for(scanf("%d%d%d",&m,&y,&n),r=m,i=0;i<n;i++){
      |                                              ^
main.c:5:46: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:1: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   24 | exit(0);}
      | ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include <math.h>
  +++ |+#include <stdlib.h>
    2 | int main(){
main.c:24:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   24 | exit(0);}
      | ^~~~
main.c:24:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

#include <stdio.h>

int main(void)
{
	int m,n,money,year,system,cost,interest=0,total=0,last=0;
	int interest2[10],intererst_total=0;
	double rate;
	int i,j,k;
	scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&money);
		scanf("%d",&year);
		scanf("%d",&n);
		total=money;
		for(j=0;j<n;j++){
			scanf("%d %lf %d",&system,&rate,&cost);
			if(system==1){
				interest=total*rate;
				total=total+interest-cost;
			}else if(system==0){
				for(k=0;k<n;k++){
					interest2[k]=total*rate;
					total=total-cost;
					interest_total=interest_total+interest[k];
				}
			}
		}
		printf("%d",total);
	}
}
	

Compiler output:
main.c: In function 'main':
main.c:24:41: error: 'interest_total' undeclared (first use in this function); did you mean 'intererst_total'?
   24 |                                         interest_total=interest_total+interest[k];
      |                                         ^~~~~~~~~~~~~~
      |                                         intererst_total
main.c:24:41: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:79: error: subscripted value is neither array nor pointer nor vector
   24 |                                         interest_total=interest_total+interest[k];
      |                                                                               ^
Language: C++


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

typedef struct set {
  int f;
  double ir;
  long int  c, d;
  long int  out;
}set_t ;

int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  int m;
  long int init;
  cin >> m;
  long int  out[m];
  
  for(int i = 0; i < m; i++) {
    cin >> init;
    int y, n;
    cin >> y;

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

typedef struct set {
  int f;
  double ir;
  long int  c, d;
  long int  out;
}set_t ;

int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  int m;
  long int init;
  cin >> m;
  long int  out[m];
  
  for(int i = 0; i < m; i++) {
    cin >> init;
    int y, n;
    cin >> y;
cin >> n;
    out[m] = 0;
    set_t s[n];
    for(int j = 0; j < n; j++) {
      cin >> s[j].f >> s[j].ir >> s[j].c;
      s[j].d = 0;
      s[j].out = init;
      switch(s[j].f) {
      case 1:
        for(int k = 0; k < y; k++) {
          s[j].out *= (1+s[j].ir);
          s[j].out -= s[j].c;
        }
        break;
      case 0:
        for(int k = 0; k < y; k++) {
          s[j].d += (s[j].out * s[j].ir);
          s[j].out -= s[j].c;
        }
        s[j].out += s[j].d;
 break;
      }
    }
    for(int j = 0; j < n; j++) {
      if(out[m] < s[j].out) out[m] = s[j].out;
    }
    cout << out[m] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   35 | int main() {
      |         ^~
a.cc:35:9: note: remove parentheses to default-initialize a variable
   35 | int main() {
      |         ^~
      |         --
a.cc:35:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:35:12: error: a function-definition is not allowed here before '{' token
   35 | int main() {
      |            ^
a.cc:76:2: error: expected '}' at end of input
   76 | }
      |  ^
a.cc:20:30: note: to match this '{'
   20 |   for(int i = 0; i < m; i++) {
      |                              ^
a.cc:76:2: error: expected '}' at end of input
   76 | }
      |  ^
a.cc:12:12: note: to match this '{'
   12 | int main() {
      |            ^
Language: C++


loop{
	line = gets
	if line==nil or line =="\n" then
		break
	end
	
	for i in 1..line.to_i() do
		amount = gets.to_i()
		year = gets.to_i()
		num = gets.to_i()
		max = 0
		for j in 1..num.to_i() do
			line = gets
			sp = line.split(nil)
			r = sp[1].to_f()
			c = sp[2].to_f()
			if sp[0] == "1" then
				last = amount
				r = r +1.0
				for k in 1..year do
					last = last * r - c
					last = last.to_i()
				end
				
			else
				last = amount
				rishi = 0
				for k in 1..year do
					rishi  = rishi + last * r
					last = last - c
				end
				last = last + rishi
				last = last.to_i()

			end
			
			if last > max then
				max = last
			end
		end
		print(max)
	end
}

Compiler output:
a.cc:8:18: error: too many decimal points in number
    8 |         for i in 1..line.to_i() do
      |                  ^~~~~~~~~~~~
a.cc:13:26: error: too many decimal points in number
   13 |                 for j in 1..num.to_i() do
      |                          ^~~~~~~~~~~
a.cc:21:42: error: too many decimal points in number
   21 |                                 for k in 1..year do
      |                                          ^~~~~~~
a.cc:29:42: error: too many decimal points in number
   29 |                                 for k in 1..year do
      |                                          ^~~~~~~
a.cc:2:1: error: 'loop' does not name a type
    2 | loop{
      | ^~~~
Language: Java

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


public class Polygonal_Line_Search {
    static Scanner s = new Scanner(System.in);

    static class Point {
        int x=0;
        int y=0;

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

    public static void main(String[] args) {
        while (true) {
            int n = s.nextInt();
            if(n==0) break;

            int m = s.nextInt();

            int count = 0;
            Point[] p = new Point[m];

            for (int j = 0; j < m; j++) {
                int x = s.nextInt();
                int y = s.nextInt();

                p[j] = new Point(x,y);
            }
            for (int i = 0; i < n; i++) {
                int m2 = s.nextInt();
                Point[] p2 = new Point[m2];

                for (int j = 0; j < m2; j++) {
                    int x = s.nextInt();
                    int y = s.nextInt();

                    p2[j]=new Point(x,y);
                }

                if (check(p, p2)) System.out.println(i+1);
                else {
                    reverse(p2);
                    if (check(p, p2)) System.out.println(i+1);
                }
            }
            System.out.println("+++++");
        }
    }
    public static boolean check(Point[] p, Point[] p2){
        int difx,dify;
        boolean flag;

        if(p.length!=p2.length) return false;

        for(int i=1;i<p2.length;i++){
            p[i].x-=p[0].x;
            p[i].y-=p[0].y;
            p2[i].x-=p2[0].x;
            p2[i].y-=p2[0].y;
        }
        p[0].x=0;
        p[0].y=0;
        p2[0].x=0;
        p2[0].y=0;

        flag=turnCheck(p,p2,0);

        return flag;
    }

    public static boolean turnCheck(Point[] p, Point[] p2,int num){
        boolean flag;
        if(num ==4) return false;

        if(p[1].x==p2[1].x && p[1].y==p2[1].y){
            for(int i=2;i<p.length;i++){
                if(!(p[i].x==p2[i].x && p[i].y==p2[i].y)){
                    return false;
                }
            }
            return true;
        } else {
            for (int i=1;i<p2.length;i++){
                int tempx=p2[i].x;
                int tempy=p2[i].y;
                p2[i].x=-tempy;
                p2[i].y=tempx;
            }
            flag=turnCheck(p,p2,num+1);
        }
        return flag;
    }

    public static final void reverse(Point[] arr) {
        final int len = arr.length;
        Point tmp;
        for (int i = 0; i < len / 2; i++) {
            tmp = arr[i];
            arr[i] = arr[len - 1 - i];
            arr[len - 1 - i] = tmp;
        }
    }
}

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

import java.util.Scanner;

public class QbPolygonalLineSearch {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while (run(sc)) {}
  }

  static boolean run(Scanner sc) {
    int n = sc.nextInt();
    if (n == 0) {
      return false;
    }
    String k = "";
    for (int i = 0; i < n + 1; i++) {
      int m = sc.nextInt();
      int[] x = new int [m];
      int[] y = new int [m];
      for (int j = 0; j < m; j++) {
        x[j] = sc.nextInt();
        y[j] = sc.nextInt();
      }
      String id = normalize2(x, y);
      // System.out.println(i + " : " + id);
      if (i == 0) {
        k = id;
      } else {
        if (k.equals(id)) {
          System.out.println(i);
        }
      }
    }
    System.out.println("+++++");
    return true;
  }

  static String normalize2(int x[], int y[]) {
    int l = x.length;
    int[] ids1 = normalize(x, y);
    int[] ids2 = new int[ids1.length];
    for (int i = 0; i < ids1.length; i++) {
      ids2[i] = ids1[ids1.length - i - 1];
    }
    for (int i = 1; i < ids2.length; i += 2) {
      ids2[i] = ~ids2[i] + 2;
    }
    String id1 = "";
    String id2 = "";
    for (int i = 0; i < ids1.length; i += 2) {
      id1 += ids1[i];
      id2 += ids2[i];
      if (i + 1 < ids1.length) {
        id1 += "rl".charAt(ids1[i + 1]);
        id2 += "rl".charAt(ids2[i + 1]);
      }
    }
    return id1.compareTo(id2) > 0 ? id1 + id2 : id2 + id1;
  }

  static int[] normalize(int x[], int y[]) {
    int d = dir(x[0], y[0], x[1], y[1]);
    int l = Math.abs(x[0] - x[1]) + Math.abs(y[0] - y[1]);
    int[] ids = new int[(x.length - 1) * 2 - 1];
    ids[0] = l;
    for (int i = 1; i + 1 < x.length; i++) {
      int[] dx = dirx(x[i], y[i], x[i + 1], y[i + 1], d);
      int d2 = dx[0];
      d = dx[1];
      int l2 = Math.abs(x[i] - x[i + 1]) + Math.abs(y[i] - y[i + 1]);
      ids[i * 2 - 1] = d2;
      ids[i * 2] = l2;
    }
    return ids;
  }

  static int D1 = 0;
  static int D2 = 1;
  static int D3 = 2;
  static int D4 = 3;

  static int[] dirx(int x1, int y1, int x2, int y2, int d) {
    if (d == D1) {
      return x1 < x2 ? new int[]{ 0, D2 } : new int[]{ 1, D4 };
    } else if (d == D3) {
      return x1 < x2 ? new int[]{ 1, D2 } : new int[]{ 0, D4 };
    } else if (d == D2) {
      return y1 < y2 ? new int[]{ 1, D1 } : new int[]{ 0, D3 };
    } else {
      return y1 < y2 ? new int[]{ 0, D1 } : new int[]{ 1, D3 };
    }
  }

  static int dir(int x1, int y1, int x2, int y2) {
    if (x1 == x2) {
      return y1 < y2 ? D1 : D3;
    }
    return x1 < x2 ? D2 : D4;
  }
}

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

import java.util.Scanner;

public class PolygonalLineSearch {
	Scanner in = new Scanner(System.in);
	int n, m;
	int maxX, maxY, minX, minY;
	int[][] x;
	int[][] y;
	
	public PolygonalLineSearch() {
		while (true) {
			n = in.nextInt();
			if (n == 0) break;
			x = new int[n+1][];
			y = new int[n+1][];
			for (int i = 0; i <= n; i++) {
				m = in.nextInt();
				x[i] = new int[m];
				y[i] = new int[m];
				maxX = Integer.MIN_VALUE;
				maxY = Integer.MIN_VALUE;
				minX = Integer.MAX_VALUE;
				minY = Integer.MAX_VALUE;
				for (int j = 0; j < m; j++) {
					x[i][j] = in.nextInt() * 2;
					y[i][j] = in.nextInt() * 2;
					maxX = Math.max(maxX, x[i][j]);
					maxY = Math.max(maxY, y[i][j]);
					minX = Math.min(minX, x[i][j]);
					minY = Math.min(minY, y[i][j]);
				}
				int gx = (maxX + minX) / 2;
				int gy = (maxY + minY) / 2;
				for (int j = 0; j < m; j++) {
					x[i][j] -= gx;
					y[i][j] -= gy;
				}
			}
			for (int i = 1; i <= n; i++) {
				if (x[0].length != x[i].length) continue;
				else if (equalPolygon(i))
					System.out.println(i);
			}
			System.out.println("+++++");
		}
	}
	
	boolean equalPolygon(int tgt) {
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < m; j++) {
				if ((x[0][j] == x[tgt][j] && y[0][j] == y[tgt][j]) ||
					(x[0][j] == x[tgt][m-j-1]) && (y[0][j] == y[tgt][m-j-1])) {
					if (j == m - 1) return true;
					continue;
				}
				else break;
			}
			for (int j = 0; j < m; j++) {
				int temp = x[tgt][j];
				x[tgt][j] = y[tgt][j];
				y[tgt][j] = -temp;
			}
		}
		return false;
	}
	
	public static void main(String[] args) {
		new PolygonalLineSearch();
	}
}

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

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

typedef pair<int,int> P;

// デバッグ出力
void debug(vector<P> v, int i){
	cout << "Line " << i << endl;
	for(int i=0 ; i < v.size() ; i++ ){
		cout << "(" << v[i].first << "," << v[i].second << ")" << endl;
	}
	cout << endl;
}

int main(){
	int n;
	while( cin >> n , n ){
		// 折れ線の集まり
		vector< vector<P> > list(n+1);
		// 答えの番号
		vector<int> ans;
		
		// n+1 の折れ線
		for(int i=0 ; i <= n ; i++ ){
			int m, sx, sy;
			vector<P> v;
			
			cin >> m;
			// 1つの折れ線は m 個の頂点を持つ
			for(int j = 0 ; j < m ; j++ ){
				int x,y;
				
				cin >> x >> y;
				if( j == 0 ){
					sx = x;
					sy = y;
					v.push_back( P(0,0) );
				}else{
					v.push_back( P(x-sx,y-sy) );
				}
			}
			//debug( v , i );
			list[i] = v;
		}
		
		// list[0]と同じものを探す
		for(int i=1 ; i <= n ; i++ ){
			// 頂点の数が同じかどうか
			if( list[0].size() == list[i].size() ){
				// 回転した4パターンを調べる
				for(int k=0 ; k < 4 ; k++ ){
					bool flag = true;
					// 90度回転
					for(int j=0 ; j < list[0].size() ; j++ ){
						int x = list[i][j].first;
						int y = list[i][j].second;
						list[i][j].first  = y ;
						list[i][j].second = -x;
					}
					//cout << "90 turn!" << endl;
					//debug( list[i] , i );
					// 各点が同じかどうか調べる
					for(int j=0 ; j < list[0].size() ; j++ ){
						int x1 = list[0][j].first;
						int y1 = list[0][j].second;
						int x2 = list[i][j].first;
						int y2 = list[i][j].second;
						if( x1 != x2 || y1 != y2 ){
							flag = false;
							break;
						}
					}
					if( flag ){
						ans.push_back( i );
						break;
					}
					
					// 逆から各点が同じかどうか調べる
					flag = true;
					vector<P> r_line = list[i];
					reverse( r_line.begin() , r_line.end() );
					int sx, sy;
					for(int j=0 ; j < r_line.size() ; j++ ){
						if( j == 0 ){
							sx = r_line[j].first;
							sy = r_line[j].second;
						}
						r_line[j].first -= sx;
						r_line[j].second -= sy;
					}
					//cout << "90 turn. reverse!" << endl;
					//debug( r_line , i );
					for(int j=0 ; j < list[0].size() ; j++ ){
						int x1 = list[0][j].first;
						int y1 = list[0][j].second;
						int x2 = r_line[j].first;
						int y2 = r_line[j].second;
						if( x1 != x2 || y1 != y2 ){
							flag = false;
							break;
						}
					}
					if( flag ){
						ans.push_back( i );
						break;
					}
				}
			}
		}
		
		// 解の出力
		for(int i=0 ; i < ans.size() ; i++ ){
			cout << ans[i] << endl;
		}
		cout << "+++++" << endl;
	}
}

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

#include<iostream>
#include<vector>
using namespace std;
typedef pair<int,int> P;
int n;
vector<P> t;
P change(P p){
  return P(-p.second,p.first);
}

vector<P> ro(vector<P> vec){
  while(1){
    if(vec[0].first==0&&vec[0].second>0)break;
    for(int i=0;i<(int)vec.size();i++){
      vec[i]=change(vec[i]);
    }
  }
  return vec;
}

vector<P> input(){
  vector<P> res;
  int m,x[100],y[100];
  cin>>m;
  for(int i=0;i<m;i++){
    cin>>x[i]>>y[i];
    if(i==0)continue;
    res.push_back(P(x[i]-x[i-1],y[i]-y[i-1]));
  }
  return ro(res);
}

int main(){
  while(1){
    cin>>n;
    if(n==0)break;
    t.clear();
    t=input();
    for(int i=0;i<n;i++){
      vector<P> u=input();
      vector<P> v=u;
      reverse(v.begin(),v.end());
      for(int i=0;i<(int)v.size();i++){
	v[i].first*=-1;	v[i].second*=-1;
      }
      v=ro(v);
      if(t==u||t==v){
	cout<<i+1<<endl;
      }
    }
    cout<<"+++++"<<endl;
  }
  return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;
int main() {
	int n;

	while (cin >> n, n) {
		int m0;
		cin >> m0;
		vector<int> x0(m0);
		int x, y, X, Y;
		for (int i = 0; i < m0; i++) {
			cin >> X >> Y;
			if (i > 0) {
				x0[i] = (x - X) + (y - Y);
			}
			x = X;
			y = Y;
		}

		for (int i = 0; i < n; i++) {
			int m;
			cin >> m;
			vector<int> line(m);
			int x, y, X, Y;
			for (int i = 0; i < m0; i++) {
				cin >> X >> Y;
				if (i > 0) {
					line[i] = (x - X) + (y - Y);
				}
				x = X;
				y = Y;
			}
			if (m0 == m) {
				if (x0 == line) {
					cout << i + 1 << endl;
				}else if (reverse(line.begin, line.end),x0 == line) {
					cout << i + 1 << endl;
				}
			}
		}

		cout << "+++++" << endl;
	}



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:50: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   39 |                                 }else if (reverse(line.begin, line.end),x0 == line) {
      |                                           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:39:50: note:   couldn't deduce template parameter '_BIter'
   39 |                                 }else if (reverse(line.begin, line.end),x0 == line) {
      |                                           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;
int main() {
	int n;

	while (cin >> n, n) {
		int m0;
		cin >> m0;
		vector<int> x0(m0);
		int x, y, X, Y;
		for (int i = 0; i < m0; i++) {
			cin >> X >> Y;
			if (i > 0) {
				x0[i] = (x - X) + (y - Y);
			}
			x = X;
			y = Y;
		}

		for (int i = 0; i < n; i++) {
			int m;
			cin >> m;
			vector<int> line(m);
			int x, y, X, Y;
			for (int i = 0; i < m0; i++) {
				cin >> X >> Y;
				if (i > 0) {
					line[i] = (x - X) + (y - Y);
				}
				x = X;
				y = Y;
			}
			if (m0 == m) {
				if (x0 == line) {
					cout << i + 1 << endl;
				} else if (reverse(line.begin, line.end),x0 == line) {
					cout << i + 1 << endl;
				}
			}
		}

		cout << "+++++" << endl;
	}



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:51: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   39 |                                 } else if (reverse(line.begin, line.end),x0 == line) {
      |                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:39:51: note:   couldn't deduce template parameter '_BIter'
   39 |                                 } else if (reverse(line.begin, line.end),x0 == line) {
      |                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided