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

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

public class B {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int p = sc.nextInt();
			int q = sc.nextInt();
			new B(p, q);
		}
	}

	int p, q;
	int aaaa = 2;
	String shousuu = "";
	ArrayList<Integer> amari = new ArrayList<Integer>();

	B(int p, int q) {
		this.p = p;
		this.q = q;
		solve();
	}

	private void solve() {
		System.out.print("0.");
		solve2((p % q) * 10);
	}

	private void solve2(int warareru) {
		aaaa++;
		if (warareru == 0) {
			System.out.println();
		} else if (!amari.contains(warareru)) {
			amari.add(warareru);
			System.out.print(warareru / q);
			solve2((warareru - q * (warareru / q)) * 10);
		} else {
			System.out.println();
			int basho = amari.indexOf(warareru);
			for (int i = 0; i < aaaa - 1; i++) {
				if (i < basho + 2)
					System.out.print(" ");
				else
					System.out.print("^");
			}
			System.out.println();
		}
	}
}

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

#include<stdio.h>
#include<list>
#include<algorithm>
class s{
 public:
  int num;
  int i;
  s(int n,int j){
    num=n;
    i=j;
  }
};
int main(){
  using namespace std;
  int p,q,pn,i,pr,j;
  char ans[1000];
  list
 memo;
  list
::iterator it;
  pn=1;
  while(scanf("%d %d",&p,&q)!=EOF){
    for(pr=0,p*=10,i=0;p%q;i++,p*=10){
      it=memo.begin();
      while(it!=memo.end()){
	if(it->num==p) break;
	it++;
      }
      if(memo.end()==it){
	memo.push_back(*(new s(p,i+1)));
      }else{
	pr=it->i;
	ans[i]='\0';
	goto find;
      }
      if(p>q){
	ans[i]=(int)(p/q)+(int)'0';
	p=p%q;
      }else{
	ans[i]='0';
      }
    }
    ans[i]=(int)'0'+(int)(p/q);
    ans[i+1]='\0';
  find:;
    printf("%s\n",ans);
    if(pr){
      for(j=0;j<pr-1;j++){
	printf(" ");
      }
      while(j++<i) printf("^");
      printf("\n");
    }
    pn++;
    memo.clear();
  }
  return 0;
}

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

main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'p' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'q' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'l' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:50: error: variable-sized object may not be initialized except with an empty initializer
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
      |                                                  ^
main.c:1:70: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
      |                                                                      ^~~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'putchar'
main.c:1:105: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | main(p,q,l){for(;~scanf("%d%d",&p,&q);){int r[q]={l=1};for(;!r[p%=q];putchar(p/q+48))r[p]=l++,p*=10;for(puts(" ");p&&l;)putchar(--l?--r[p]>0?32:94:10);}}
      |                                                                                                         ^~~~
main.c:1:105: note: include '<stdio.h>' or provide a declaration of 'puts'
Language: C++

#include <iostream>
#include <set>
#include <vector>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n) 
int main(void){
  int p,q;
  while(cin>>p>>q){
    vector<int> mod;
    mod.push_back(p);
    int count=0;
    while(true){
      p*=10;
      cout << p/q;
      p=p%q;
      if(!p){
        cout<<endl;
        break;
      }
      if(find(mod.begin(),mod.end(),p)!=mod.end()){
        int div = distance(mod.begin(),find(mod.begin(),mod.end(),p));
        cout<<endl;
        REP(i,div) cout<<' ';
        REP(i,count-div+1) cout<<'^';
        cout<<endl;
        break;
      }
      mod.push_back(p);
      count++;
    }
  }
  return  0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   25 |       if(find(mod.begin(),mod.end(),p)!=mod.end()){
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:25:14: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   25 |       if(find(mod.begin(),mod.end(),p)!=mod.end()){
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:26:44: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   26 |         int div = distance(mod.begin(),find(mod.begin(),mod.end(),p));
      |                                        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:26:44: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   26 |         int div = distance(mod.begin(),find(mod.begin(),mod.end(),p));
      |                                        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

/*
AizuOnline A0113
Maximum Sum Sequence
*/
#include <stdio.h>
long long hijosuu;
long long josuu;
int       quo[100];
long long rem[100];
int js;             // junkansetu start
int je;             // junkansetu end
init()
{
  hijosuu = 100LL;
  josuu   = 32768LL;
}
// write junkansetu
write_yamagata()
{  int i;
  printf("\n");
  for(i=1;i<=js-1;i++)
    printf(" ");
  for(i=0;i<je-js;i++)
    printf("^");
  printf("\n");
}
main()
{
  int i,j;
  long long q,r;
  int flag;      // seisuubu 0 shousuubu 1

    init();


    while (EOF != scanf ("%lld %lld",&hijosuu,&josuu))
    {
      flag=0;
      i=0;
 
      while(1)
	{
	  q = hijosuu / josuu;
	  r= (hijosuu % josuu);
	  hijosuu = 10 * r;
	  //if(flag==1)
	  //  printf("%lld",q);
	  if(r==0)
	    {
	      printf("%lld\n",q);
	      break;
	    }
	  if(flag==0)              //print seisuubu
	    {  // printf(".");        //print comma :iranai
	      flag = 1;
	      i=0;
	      continue;
	    }
	  i++;
	  if(flag)
	    {
	      quo[i]=q;
	      rem[i]=r;
	    }
	    
	  if(i>1)
	    for(j=i-1;j>=1;j--)
	      if(quo[i]==quo[j] && rem[i]==rem[j])
		{
		  js=j;
		  je=i;
		  write_yamagata();
		  goto END_JUNKAN;
		}
	PRINT:
	  if(flag)
	    printf("%lld",q);
	}
    END_JUNKAN: ;
      // printf("\njs je=%d %d\n",js,je);
    }

printf("\n");
return(0);
}

Compiler output:
a.cc:12:1: error: ISO C++ forbids declaration of 'init' with no type [-fpermissive]
   12 | init()
      | ^~~~
a.cc: In function 'int init()':
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
a.cc: At global scope:
a.cc:18:1: error: ISO C++ forbids declaration of 'write_yamagata' with no type [-fpermissive]
   18 | write_yamagata()
      | ^~~~~~~~~~~~~~
a.cc: In function 'int write_yamagata()':
a.cc:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
   26 | }
      | ^
a.cc: At global scope:
a.cc:27:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   27 | main()
      | ^~~~
Language: C++

#include<iostream>
#include<vector>

void drawdown(int a,int size){
	int i = 0;
	for (; i < a; i++)std::cout << " ";
	for (; i < size; i++)std::cout << "^";
	std::cout << std::endl;
}

int main(){

	int p, q;
	while (std::cin >> p >> q){
		std::vector<int>r;
		r.push_back(0);

		while (true){

			if (p / q == 0)p *= 10;
			std::cout << p / q;
			p %= q;
			auto it = std::find(r.begin(), r.end(), p);
			if (it != r.end()){
				std::cout << std::endl;
				if (p == 0)break;
				else {
					drawdown(it - r.begin(), r.size());
					break;
				}
			}
			r.push_back(p);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:44: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   23 |                         auto it = std::find(r.begin(), r.end(), p);
      |                                   ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:23:44: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   23 |                         auto it = std::find(r.begin(), r.end(), p);
      |                                   ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>

void drawdown(int a,int size){
	int i = 0;
	for (; i < a; i++)std::cout << " ";
	for (; i < size; i++)std::cout << "^";
	std::cout << std::endl;
}

int main(){

	int p, q;
	while (std::cin >> p >> q){
		std::vector<int>r;
		r.push_back(0);

		while (true){

			if (p / q == 0)p *= 10;
			std::cout << p / q;
			p %= q;
			std::vector<int>::iterator it = std::find(r.begin(), r.end(), p);
			if (it != r.end()){
				std::cout << std::endl;
				if (p == 0)break;
				else {
					drawdown(it - r.begin(), r.size());
					break;
				}
			}
			r.push_back(p);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:66: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   23 |                         std::vector<int>::iterator it = std::find(r.begin(), r.end(), p);
      |                                                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:23:66: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   23 |                         std::vector<int>::iterator it = std::find(r.begin(), r.end(), p);
      |                                                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.Scanner;


public class AOJ0114 {
	public static void main(String[] argv) {
		Scanner sc = new Scanner(System.in);
		
		int[] num = new int[6];
		
		while (true) {
			for (int i=0;i<num.length;++i) {
				num[i] = Integer.parseInt(sc.next());
			}
			if (max(num)!=0) {
				System.out.println(""+lcm(calc(num)));
			}
		}
	}
	
	private static int[] calc (int... num) {
		int[] no = new int[(int)num.length/2];
		for (int i=0;i<num.length;i+=2) {
			int val = 1, a = i, m = i+1, count=0;
			do {
				val = (num[a]*val)%num[m];
				++count;
			} while (val != 1);
			no[i/2] = count;
		}
		return no;
	}
	
	private static int lcm (int... num) {
		int max = max(num);
		for (int i=2;i<=max;++i) {
			int[] no = mod0(i, num.clone());
			if (no!=null) {
				return i*lcm(no);
			}
		}
		int sum = 1;
		for (int n : num) {
			sum *= n;
		}
		return sum;
	}
	
	private static int[] mod0 (int n, int... num) {
		boolean flag = true;
		for (int i=0;i<num.length;++i) {
			if (num[i]%n!=0) {
				if (flag) {
					flag = false;
				} else {
					return null;
				}
			} else {
				num[i]/=n;
			}
		}
		return num;
	}
	
	private static int max (int... num) {
		int max = 0;
		for (int n : num) {
			if (max < n) {
				max = n;
			}
		}
		return max;
	}
	
}

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

#include <stdio.h>

long long cal_lcm(long long a, long long b)
{
    long long t;
    long long gcd;
	long long a_bak;
	
	a_bak = a;
	gcd = b;
	
    if (a < gcd){
        t = a;
        a = gcd;
        gcd = t;
     }
        
     while (a % gcd != 0){
        t = gcd;
        gcd = a % gcd;
        a = t;
    }
	
	return (a_ bak * b / gcd);
}


int round(int a, int m)
{
	int x, n;
	
	x = 1;
	n = 0;
	
	do {
		x = (a * x) % m;
		n++;
	} while (x != 1);

	return (n);
}

int main(void)
{
	int a1, a2, a3;
	int m1, m2, m3;
	int n1, n2, n3;
	long long lcm;
	
	while (1){
		scanf("%d%d%d%d%d%d", &a1, &m1, &a2, &m2, &a3, &m3);
		if (a1 == 0 && m1 == 0 &&
		    a2 == 0 && m2 == 0 &&
		    a3 == 0 && m3 == 0){
			
			break;
		}

		n1 = round(a1, m1);
		n2 = round(a2, m2);
		n3 = round(a3, m3);
		
		lcm = cal_lcm(n1, n2);
		lcm = cal_lcm(lcm, n3);

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

Compiler output:
main.c: In function 'cal_lcm':
main.c:24:17: error: 'a_' undeclared (first use in this function); did you mean 'a'?
   24 |         return (a_ bak * b / gcd);
      |                 ^~
      |                 a
main.c:24:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:19: error: expected ')' before 'bak'
   24 |         return (a_ bak * b / gcd);
      |                ~  ^~~~
      |                   )
main.c: At top level:
main.c:28:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
   28 | int round(int a, int m)
      |     ^~~~~
main.c:2:1: note: 'round' is declared in header '<math.h>'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 |
Language: C++

#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<cmath>
#include<climits>
#include<vector>
#include<algorithm>
#include<queue>
#include<stack>
using namespace std;

#define ing long long

int gcd(int a, int b){
	if(b == 0) return a;
	return gcd(b, a % b);
}

int lcm(int a, int b){
	return a*b / gcd(a, b);
}

int f(int x, int a, int m){
	if(x == 1) return 0;
	return f(a*x % m, a, m) + 1;
}

unsigned main(){
	while(true){
		int A, M, ans = 1;
		for(int i = 0; i < 3; i++){
			cin >> A >> M;
			if(!A || !M) return 0;
			ans = lcm(ans, f( A % M, A, M ) + 1 );
		}
		printf("%d\n", ans);
	}
}

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

#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<cmath>
#include<climits>
#include<vector>
#include<algorithm>
#include<queue>
#include<stack>
using namespace std;

long long gcd(long long a, long long b){
	if(b == 0) return a;
	return gcd(b, a % b);
}

long long lcm(long long a, long long b){
	return a*b / gcd(a, b);
}

long long f(long long x, long long a, long long m){
	if(x == 1) return 0;
	return f(a*x % m, a, m) + 1;
}

unsigned main(){
	while(true){
		long long A, M, ans = 1;
		for(long long i = 0; i < 3; i++){
			cin >> A >> M;
			if(!A || !M) return 0;
			ans = lcm(ans, f( A % M, A, M ) + 1 );
		}
		printf("%d\n", ans);
	}
}

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

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
const int inf=1e8;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
int main(){
	int in[6]={0};
	while(cin>>in[0]>>in[1]>>in[2]>>in[3]>>in[4]>>in[5],in[0]+in[1]+in[2]+in[3]+in[4]+in[5]){
	rep(i,3){
		int a=in[i*2],b=in[i*2+1];
		int co=0;
		int d=1;
		while(1){
			co++;
			d=(a*d)%b;
			if(d==1)break;
		}
		in[i]=co;
	}
	cout<<__lcm(in[0],__lcm(in[1],in[2]))<<endl;
}}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:27: error: '__lcm' was not declared in this scope
   38 |         cout<<__lcm(in[0],__lcm(in[1],in[2]))<<endl;
      |                           ^~~~~
a.cc:38:15: error: '__lcm' was not declared in this scope
   38 |         cout<<__lcm(in[0],__lcm(in[1],in[2]))<<endl;
      |               ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
#define ll long long int
using namespace std;
ll rep(ll s,ll t){
	return (s/__gcd(s,t))*t;
}
ll main(){
	ll a1,a2,a3,x,y,z,m1,m2,m3,now,a,b,c;
	while(cin>>a1>>m1>>a2>>m2>>a3>>m3,a1||m1||a2||m2||a3||m3){
		x=a1%m1;a=-1;b=-1;c=-1;
		y=a2%m2;now=1;
		z=a3%m3;
		while(a==-1||b==-1||c==-1){
			now++;
			x=(a1*x)%m1;
			if(x==1)
			a=now;
			y=(a2*y)%m2;
			if(y==1)
			b=now;
			z=(a3*z)%m3;
			if(z==1)
			c=now;
		}
		cout<<rep(rep(a,b),c)<<endl;
	}
	return 0;
}

Compiler output:
a.cc:3:22: error: '::main' must return 'int'
    3 | #define ll long long int
      |                      ^~~
a.cc:8:1: note: in expansion of macro 'll'
    8 | ll main(){
      | ^~
Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	int a1,a2,a3,m1,m2,m3;
	while(1)
	{
		cin >> a1 >> m1 >> a2 >> m2 >> a3 >> m3;
		if(a1==0&&m1==0&&a2==0&&m2==0&&a3==0&&m3==0)break;
		int c1=1,c2=1,c3=1;
		int res=a1%m1;
		//bool flag=true;
		while(res!=1)
		{
			c1++;
			res=(res*a1)%m1;
		}
		res=a2%m2;
		while(res!=1)
		{
			c2++;
			res=(res*a2)%m2;
		}
		res=a3%m3;
		while(res!=1)
		{
			c3++;
			res=(res*a3)%m3;
		}
		int tmp=__gcd(c1,c2);
		tmp=__gcd(tmp,c3);
		cout << c1*c2/gcd(c1, c2)*c3/gcd(c2,c3)/gcd(c1,c3)*gcd(c1, gcd(c2,c3)) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:31: error: 'gcd' was not declared in this scope
   61 |                 cout << c1*c2/gcd(c1, c2)*c3/gcd(c2,c3)/gcd(c1,c3)*gcd(c1, gcd(c2,c3)) << endl;
      |                               ^~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <queue>
#include <cmath>
#include <stack>
#include <numeric>
#include <ctime>
#include <algorithm>
#include <set>
#include <stdio.h>
#include <map>

using namespace std;
typedef long long int lint;

class Mat3i {
	int a[3][3];
public:
	Mat3i(){
		memset(a, 0, sizeof(int)* 3 * 3);
	}
	Mat3i(int a00, int a01, int a02, int a10, int a11, int a12, int a20, int a21, int a22){
		a[0][0] = a00, a[0][1] = a01, a[0][2] = a02;
		a[1][0] = a10, a[1][1] = a11, a[1][2] = a12;
		a[2][0] = a20, a[2][1] = a21, a[2][2] = a22;
	}
	int det(){
		return a[0][0] * a[1][1] * a[2][2] + a[0][1] * a[1][2] * a[2][0] + a[0][2] * a[1][0] * a[2][1] - a[0][2] * a[1][1] * a[2][0] - a[0][0] * a[1][2] * a[2][1] - a[0][1] * a[1][0] * a[2][2];
	}
};

int main()
{
	int xu, yu, zu;
	int xe, ye, ze;
	int x1, y1, z1, x2, y2, z2, x3, y3, z3;
	
	cin >> xu >> yu >> zu;
	cin >> xe >> ye >> ze;
	cin >> x1 >> y1 >> z1;
	cin >> x2 >> y2 >> z2;
	cin >> x3 >> y3 >> z3;
	
	int d = Mat3i(x2 - x1, x3 - x1, xu - xe, y2 - y1, y3 - y1, yu - ye, z2 - z1, z3 - z1, zu - ze).det();
	double s = (double)Mat3i(xu - x1, x3 - x1, xu - xe, yu - y1, y3 - y1, yu - ye, zu - z1, z3 - z1, zu - ze).det() / d;
	double t = (double)Mat3i(x2 - x1, xu - x1, xu - xe, y2 - y1, yu - y1, yu - ye, z2 - z1, zu - z1, zu - ze).det() / d;
	double k = (double)Mat3i(x2 - x1, x3 - x1, xu - x1, y2 - y1, y3 - y1, yu - y1, z2 - z1, z3 - z1, zu - z1).det() / d;

	if (0 <= s && s <= 1 && 0 <= t && t <= 1 && 0 <= k && k <= 1) cout << "MISS" << endl;
	else cout << "HIT" << endl;

	return 0;
}

Compiler output:
a.cc: In constructor 'Mat3i::Mat3i()':
a.cc:25:17: error: 'memset' was not declared in this scope
   25 |                 memset(a, 0, sizeof(int)* 3 * 3);
      |                 ^~~~~~
a.cc:17:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   16 | #include <map>
  +++ |+#include <cstring>
   17 |
Language: C++

// AOJ 0115
#include<cstdio>
#include<cmath>
#define rep(i,a) for(int i=0;i<(a);++i)

const double EPS = 1e-5;

struct Pt
{
	double x, y, z;

	Pt( double x = 0, double y = 0, double z = 0 )
	:	x(x), y(y), z(z)
	{}

	Pt& operator+= ( const Pt &p )
	{
		x += p.x;
		y += p.y;
		z += p.z;

		return *this;
	}

	Pt& operator-= ( const Pt &p )
	{
		x -= p.x;
		y -= p.y;
		z -= p.z;

		return *this;
	}

	Pt operator+ ( const Pt &p ) const
	{ return Pt( x+p.x, y+p.y, z+p.z ); }

	Pt operator- ( const Pt &p ) const
	{ return Pt( x-p.x, y-p.y, z-p.z ); }

	Pt operator* ( double k ) const
	{ return Pt( k*x, k*y, k*z ); }

	Pt operator/ ( double k ) const
	{ return Pt( x/k, y/k, z/k ); }

	bool operator== ( const Pt &p ) const
	{ return x==p.x && y==p.y && z==p.z; }

	double dot( const Pt &p ) const
	{ return x*p.x+y*p.y; }

	double norm() const
	{ return sqrt(x*x+y*y+z*z); }

	Pt cross( const Pt &p ) const
	{ return Pt( y*p.z-z*p.y, z*p.x-x*p.z, x*p.y-y*p.x ); }
};

struct Tri
{
	Pt p0, p1, p2;

	Tri( Pt a, Pt b, Pt c )
	:	p0(a), p1(b), p2(c)
	{}

	Pt norm()
	{
		Pt n = (p1-p0).cross(p2-p0);
	
		return n/n.norm();
	}

	double area()
	{
		double a = (p1-p0).norm(), b = (p2-p1).norm(), c = (p2-p0).norm();
		double s = (a+b+c)/2;

		return sqrt(s*(s-a)*(s-b)*(s-c));
	}
};

Pt uaz, enemy, v[3];

bool intersect( const Pt &norm, Pt &inr )
{
	Pt &ap = v[0]-uaz, bp = v[0]-enemy;
	double dot_APN = ap.dot(norm), dot_BPN = bp.dot(norm);

	if( fabs(dot_APN) < EPS && fabs(dot_BPN) < EPS )
		return false;
	else if( !(dot_APN <= EPS && dot_BPN >= -EPS) && !(dot_BPN <= EPS && dot_APN >= -EPS) )
		return false;

	Pt ue = enemy-uaz;
	double h = fabs(dot_APN)/(fabs(dot_APN)+fabs(dot_BPN));

	inr.x = uaz.x + ue.x*h;
	inr.y = uaz.y + ue.y*h;
	inr.z = uaz.z + ue.z*h;

	return true;
}

int main()
{
	double x, y, z;
	scanf( "%lf%lf%lf", &x, &y, &z ); uaz = Pt(x,y,z);
	scanf( "%lf%lf%lf", &x, &y, &z ); enemy = Pt(x,y,z);
	rep( i, 3 )
		scanf( "%lf%lf%lf", &x, &y, &z ), v[i] = Pt(x,y,z);

	Tri barrier(v[0],v[1],v[2]);
	Pt norm = barrier.norm();

	bool fl = true;
	if( fabs((uaz-enemy).dot(norm)) >= EPS )
	{
		Pt inr;

		if( intersect( norm, inr ) && 
			Tri(v[0],v[1],inr).area()+Tri(v[1],v[2],inr).area()+Tri(v[2],v[0],inr).area() < barrier.area()+EPS )
			fl = false;
	}

	puts( fl?"HIT":"MISS" );

	return 0;
}

Compiler output:
a.cc: In function 'bool intersect(const Pt&, Pt&)':
a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt'
   87 |         Pt &ap = v[0]-uaz, bp = v[0]-enemy;
      |                  ~~~~^~~~
Language: C++

// AOJ 0115
#include<cstdio>
#include<cmath>
#define rep(i,a) for(int i=0;i<(a);++i)

const double EPS = 1e-5;

struct Pt
{
	double x, y, z;

	Pt( double x = 0, double y = 0, double z = 0 )
	:	x(x), y(y), z(z)
	{}

	Pt& operator+= ( const Pt &p )
	{
		x += p.x;
		y += p.y;
		z += p.z;

		return *this;
	}

	Pt& operator-= ( const Pt &p )
	{
		x -= p.x;
		y -= p.y;
		z -= p.z;

		return *this;
	}

	Pt operator+ ( const Pt &p ) const
	{ return Pt( x+p.x, y+p.y, z+p.z ); }

	Pt operator- ( const Pt &p ) const
	{ return Pt( x-p.x, y-p.y, z-p.z ); }

	Pt operator* ( double k ) const
	{ return Pt( k*x, k*y, k*z ); }

	Pt operator/ ( double k ) const
	{ return Pt( x/k, y/k, z/k ); }

	bool operator== ( const Pt &p ) const
	{ return x==p.x && y==p.y && z==p.z; }

	double dot( const Pt &p ) const
	{ return x*p.x+y*p.y; }

	double norm() const
	{ return sqrt(x*x+y*y+z*z); }

	Pt cross( const Pt &p ) const
	{ return Pt( y*p.z-z*p.y, z*p.x-x*p.z, x*p.y-y*p.x ); }
};

struct Tri
{
	Pt p0, p1, p2;

	Tri( Pt a, Pt b, Pt c )
	:	p0(a), p1(b), p2(c)
	{}

	Pt norm()
	{
		Pt n = (p1-p0).cross(p2-p0);
	
		return n/n.norm();
	}

	double area()
	{
		double a = (p1-p0).norm(), b = (p2-p1).norm(), c = (p2-p0).norm();
		double s = (a+b+c)/2;

		return sqrt(s*(s-a)*(s-b)*(s-c));
	}
};

Pt uaz, enemy, v[3];

bool intersect( const Pt &norm, Pt *inr )
{
	Pt &ap = v[0]-uaz, bp = v[0]-enemy;
	double dot_APN = ap.dot(norm), dot_BPN = bp.dot(norm);

	if( fabs(dot_APN) < EPS && fabs(dot_BPN) < EPS )
		return false;
	else if( !(dot_APN <= EPS && dot_BPN >= -EPS) && !(dot_BPN <= EPS && dot_APN >= -EPS) )
		return false;

	Pt ue = enemy-uaz;
	double h = fabs(dot_APN)/(fabs(dot_APN)+fabs(dot_BPN));

	inr->x = uaz.x + ue.x*h;
	inr->y = uaz.y + ue.y*h;
	inr->z = uaz.z + ue.z*h;

	return true;
}

int main()
{
	double x, y, z;
	scanf( "%lf%lf%lf", &x, &y, &z ); uaz = Pt(x,y,z);
	scanf( "%lf%lf%lf", &x, &y, &z ); enemy = Pt(x,y,z);
	rep( i, 3 )
		scanf( "%lf%lf%lf", &x, &y, &z ), v[i] = Pt(x,y,z);

	Tri barrier(v[0],v[1],v[2]);
	Pt norm = barrier.norm();

	bool fl = true;
	if( fabs((uaz-enemy).dot(norm)) >= EPS )
	{
		Pt inr;

		if( intersect( norm, &inr ) && 
			Tri(v[0],v[1],inr).area()+Tri(v[1],v[2],inr).area()+Tri(v[2],v[0],inr).area() < barrier.area()+EPS )
			fl = false;
	}

	puts( fl?"HIT":"MISS" );

	return 0;
}

Compiler output:
a.cc: In function 'bool intersect(const Pt&, Pt*)':
a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt'
   87 |         Pt &ap = v[0]-uaz, bp = v[0]-enemy;
      |                  ~~~~^~~~
Language: C++

// AOJ 0115
#include<cstdio>
#include<cmath>
#define rep(i,a) for(int i=0;i<(a);++i)

const double EPS = 1e-5;

struct Pt
{
	double x, y, z;

	Pt( double x = 0, double y = 0, double z = 0 )
	:	x(x), y(y), z(z)
	{}

	Pt& operator+= ( const Pt &p )
	{
		x += p.x;
		y += p.y;
		z += p.z;

		return *this;
	}

	Pt& operator-= ( const Pt &p )
	{
		x -= p.x;
		y -= p.y;
		z -= p.z;

		return *this;
	}

	Pt operator+ ( const Pt &p ) const
	{ return Pt( x+p.x, y+p.y, z+p.z ); }

	Pt operator- ( const Pt &p ) const
	{ return Pt( x-p.x, y-p.y, z-p.z ); }

	Pt operator* ( double k ) const
	{ return Pt( k*x, k*y, k*z ); }

	Pt operator/ ( double k ) const
	{ return Pt( x/k, y/k, z/k ); }

	bool operator== ( const Pt &p ) const
	{ return x==p.x && y==p.y && z==p.z; }

	double dot( const Pt &p ) const
	{ return x*p.x+y*p.y; }

	double norm() const
	{ return sqrt(x*x+y*y+z*z); }

	Pt cross( const Pt &p ) const
	{ return Pt( y*p.z-z*p.y, z*p.x-x*p.z, x*p.y-y*p.x ); }
};

struct Tri
{
	Pt p0, p1, p2;

	Tri( Pt a, Pt b, Pt c )
	:	p0(a), p1(b), p2(c)
	{}

	Pt norm()
	{
		Pt n = (p1-p0).cross(p2-p0);
	
		return n/n.norm();
	}

	double area()
	{
		double a = (p1-p0).norm(), b = (p2-p1).norm(), c = (p2-p0).norm();
		double s = (a+b+c)/2;

		return sqrt(s*(s-a)*(s-b)*(s-c));
	}
};

Pt uaz, enemy, v[3];

bool intersect( Pt &norm, Pt &inr )
{
	Pt &ap = v[0]-uaz, bp = v[0]-enemy;
	double dot_APN = ap.dot(norm), dot_BPN = bp.dot(norm);

	if( fabs(dot_APN) < EPS && fabs(dot_BPN) < EPS )
		return false;
	else if( !(dot_APN <= EPS && dot_BPN >= -EPS) && !(dot_BPN <= EPS && dot_APN >= -EPS) )
		return false;

	Pt ue = enemy-uaz;
	double h = fabs(dot_APN)/(fabs(dot_APN)+fabs(dot_BPN));

	inr.x = uaz.x + ue.x*h;
	inr.y = uaz.y + ue.y*h;
	inr.z = uaz.z + ue.z*h;

	return true;
}

int main()
{
	double x, y, z;
	scanf( "%lf%lf%lf", &x, &y, &z ); uaz = Pt(x,y,z);
	scanf( "%lf%lf%lf", &x, &y, &z ); enemy = Pt(x,y,z);
	rep( i, 3 )
		scanf( "%lf%lf%lf", &x, &y, &z ), v[i] = Pt(x,y,z);

	Tri barrier(v[0],v[1],v[2]);
	Pt norm = barrier.norm();

	bool fl = true;
	if( fabs((uaz-enemy).dot(norm)) >= EPS )
	{
		Pt inr;

		if( intersect( norm, inr ) && 
			Tri(v[0],v[1],inr).area()+Tri(v[1],v[2],inr).area()+Tri(v[2],v[0],inr).area() < barrier.area()+EPS )
			fl = false;
	}

	puts( fl?"HIT":"MISS" );

	return 0;
}

Compiler output:
a.cc: In function 'bool intersect(Pt&, Pt&)':
a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt'
   87 |         Pt &ap = v[0]-uaz, bp = v[0]-enemy;
      |                  ~~~~^~~~
Language: C++

// AOJ 0115
#include<cstdio>
#include<cmath>
#define rep(i,a) for(int i=0;i<(a);++i)

const double EPS = 1e-5;

struct Pt
{
	double x, y, z;

	Pt( double x = 0, double y = 0, double z = 0 )
	:	x(x), y(y), z(z)
	{}

	Pt& operator+= ( const Pt &p )
	{
		x += p.x;
		y += p.y;
		z += p.z;

		return *this;
	}

	Pt& operator-= ( const Pt &p )
	{
		x -= p.x;
		y -= p.y;
		z -= p.z;

		return *this;
	}

	Pt operator+ ( const Pt &p ) const
	{ return Pt( x+p.x, y+p.y, z+p.z ); }

	Pt operator- ( const Pt &p ) const
	{ return Pt( x-p.x, y-p.y, z-p.z ); }

	Pt operator* ( double k ) const
	{ return Pt( k*x, k*y, k*z ); }

	Pt operator/ ( double k ) const
	{ return Pt( x/k, y/k, z/k ); }

	bool operator== ( const Pt &p ) const
	{ return x==p.x && y==p.y && z==p.z; }

	double dot( const Pt &p ) const
	{ return x*p.x+y*p.y; }

	double norm() const
	{ return sqrt(x*x+y*y+z*z); }

	Pt cross( const Pt &p ) const
	{ return Pt( y*p.z-z*p.y, z*p.x-x*p.z, x*p.y-y*p.x ); }
};

struct Tri
{
	Pt p0, p1, p2;

	Tri( Pt a, Pt b, Pt c )
	:	p0(a), p1(b), p2(c)
	{}

	Pt norm()
	{
		Pt n = (p1-p0).cross(p2-p0);
	
		return n/n.norm();
	}

	double area()
	{
		double a = (p1-p0).norm(), b = (p2-p1).norm(), c = (p2-p0).norm();
		double s = (a+b+c)/2;

		return sqrt(s*(s-a)*(s-b)*(s-c));
	}
};

Pt uaz, enemy, v[3];

bool intersect( const Pt &n, Pt &inr )
{
	Pt &ap = v[0]-uaz, bp = v[0]-enemy;
	double dot_APN = ap.dot(n), dot_BPN = bp.dot(n);

	if( fabs(dot_APN) < EPS && fabs(dot_BPN) < EPS )
		return false;
	else if( !(dot_APN <= EPS && dot_BPN >= -EPS) && !(dot_BPN <= EPS && dot_APN >= -EPS) )
		return false;

	Pt ue = enemy-uaz;
	double h = fabs(dot_APN)/(fabs(dot_APN)+fabs(dot_BPN));

	inr.x = uaz.x + ue.x*h;
	inr.y = uaz.y + ue.y*h;
	inr.z = uaz.z + ue.z*h;

	return true;
}

int main()
{
	double x, y, z;
	scanf( "%lf%lf%lf", &x, &y, &z ); uaz = Pt(x,y,z);
	scanf( "%lf%lf%lf", &x, &y, &z ); enemy = Pt(x,y,z);
	rep( i, 3 )
		scanf( "%lf%lf%lf", &x, &y, &z ), v[i] = Pt(x,y,z);

	Tri barrier(v[0],v[1],v[2]);
	Pt norm = barrier.norm();

	bool fl = true;
	if( fabs((uaz-enemy).dot(norm)) >= EPS )
	{
		Pt inr;

		if( intersect( norm, inr ) && 
			Tri(v[0],v[1],inr).area()+Tri(v[1],v[2],inr).area()+Tri(v[2],v[0],inr).area() < barrier.area()+EPS )
			fl = false;
	}

	puts( fl?"HIT":"MISS" );

	return 0;
}

Compiler output:
a.cc: In function 'bool intersect(const Pt&, Pt&)':
a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt'
   87 |         Pt &ap = v[0]-uaz, bp = v[0]-enemy;
      |                  ~~~~^~~~
Language: C++

// AOJ 0115
#include<cstdio>
#include<cmath>
#define rep(i,a) for(int i=0;i<(a);++i)

const double EPS = 1e-5;

struct Pt
{
	double x, y, z;

	Pt( double x = 0, double y = 0, double z = 0 )
	:	x(x), y(y), z(z)
	{}

	Pt& operator+= ( const Pt &p )
	{
		x += p.x;
		y += p.y;
		z += p.z;

		return *this;
	}

	Pt& operator-= ( const Pt &p )
	{
		x -= p.x;
		y -= p.y;
		z -= p.z;

		return *this;
	}

	Pt operator+ ( const Pt &p ) const
	{ return Pt( x+p.x, y+p.y, z+p.z ); }

	Pt operator- ( const Pt &p ) const
	{ return Pt( x-p.x, y-p.y, z-p.z ); }

	Pt operator* ( double k ) const
	{ return Pt( k*x, k*y, k*z ); }

	Pt operator/ ( double k ) const
	{ return Pt( x/k, y/k, z/k ); }

	bool operator== ( const Pt &p ) const
	{ return x==p.x && y==p.y && z==p.z; }

	double dot( const Pt &p ) const
	{ return x*p.x+y*p.y; }

	double norm() const
	{ return sqrt(x*x+y*y+z*z); }

	Pt cross( const Pt &p ) const
	{ return Pt( y*p.z-z*p.y, z*p.x-x*p.z, x*p.y-y*p.x ); }
};

struct Tri
{
	Pt p0, p1, p2;

	Tri( Pt a, Pt b, Pt c )
	:	p0(a), p1(b), p2(c)
	{}

	Pt norm()
	{
		Pt n = (p1-p0).cross(p2-p0);
	
		return n/n.norm();
	}

	double area()
	{
		double a = (p1-p0).norm(), b = (p2-p1).norm(), c = (p2-p0).norm();
		double s = (a+b+c)/2;

		return sqrt(s*(s-a)*(s-b)*(s-c));
	}
};

Pt uaz, enemy, v[3];
Pt norm, inr;

bool intersect()
{
	Pt &ap = v[0]-uaz, bp = v[0]-enemy;
	double dot_APN = ap.dot(norm), dot_BPN = bp.dot(norm);

	if( fabs(dot_APN) < EPS && fabs(dot_BPN) < EPS )
		return false;
	else if( !(dot_APN <= EPS && dot_BPN >= -EPS) && !(dot_BPN <= EPS && dot_APN >= -EPS) )
		return false;

	Pt ue = enemy-uaz;
	double h = fabs(dot_APN)/(fabs(dot_APN)+fabs(dot_BPN));

	inr.x = uaz.x + ue.x*h;
	inr.y = uaz.y + ue.y*h;
	inr.z = uaz.z + ue.z*h;

	return true;
}

int main()
{
	double x, y, z;
	scanf( "%lf%lf%lf", &x, &y, &z ); uaz = Pt(x,y,z);
	scanf( "%lf%lf%lf", &x, &y, &z ); enemy = Pt(x,y,z);
	rep( i, 3 )
		scanf( "%lf%lf%lf", &x, &y, &z ), v[i] = Pt(x,y,z);

	Tri barrier(v[0],v[1],v[2]);
	norm = barrier.norm();

	bool fl = true;
	if( fabs((uaz-enemy).dot(norm)) >= EPS )
	{
		if( intersect() && 
			Tri(v[0],v[1],inr).area()+Tri(v[1],v[2],inr).area()+Tri(v[2],v[0],inr).area() < barrier.area()+EPS )
			fl = false;
	}

	puts( fl?"HIT":"MISS" );

	return 0;
}

Compiler output:
a.cc: In function 'bool intersect()':
a.cc:88:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt'
   88 |         Pt &ap = v[0]-uaz, bp = v[0]-enemy;
      |                  ~~~~^~~~
Language: C++

// ?????¬???????????¬??????

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

#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)
#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)
#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)
#define int long long int

template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}

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

int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
constexpr ll INF = 1001001001001001LL;
constexpr ll MOD = 1000000007LL;

// calculate vector x which satisfy Ax = b
// (A is N*N Matrix, b, x is N-dim vector)

template <typename T>
using Matrix = vector< vector<T> >;
constexpr double EPS = 1e-8;

template <typename T>
vector<double> gauss_jordan(const Matrix<T> &A, const vector<T> &b) {
    int N = A.size();
    // B = [A b]
    Matrix<double> B(N, vector<double>(N+1));
    for(int i=0; i<N; i++) {
        for(int j=0; j<=N; j++) {
            if(j < N) B[i][j] = A[i][j];
            else B[i][j] = b[i];
        }
    }

    for(int i=0; i<N; i++) {
        int pivot = i;
        for(int j=i+1; j<N; j++) {
            if(abs(B[j][i]) > abs(B[pivot][i])) pivot = j;
        }
        swap(B[i], B[pivot]);

        // pivot is zero -> No solution or Not unique
        assert(abs(B[i][i]) >= EPS);

        for(int j=i+1; j<=N; j++) B[i][j] /= B[i][i];
        for(int j=0; j<N; j++) {
            if(i != j) {
                for(int k=i+1; k<=N; k++) B[j][k] -= B[j][i] * B[i][k];
            }
        }
    }
    vector<double> x(N);
    for(int i=0; i<N; i++) x[i] = B[i][N];
    return x;
}

double pos[5][3];
signed main() {
    rep(i,0,5) rep(j,0,3) cin >> pos[i][j];

    Matrix<double> mat(3, vector<double>(3));
    vector<double> vec(3);

    rep(i,0,3) {
        mat[i][0] = pos[3][i] - pos[2][i];
        mat[i][1] = pos[4][i] - pos[2][i];
        mat[i][2] = pos[0][i] - pos[1][i];
    }
    rep(i,0,3) vec[i] = pos[0][i] - pos[2][i];

    vector<double> ans = gauss_jordan(mat, vec);
    if(ans[0] < 0 || ans[1] < 0 || ans[0] + ans[1] > 1.0 || k < 0) cout << "HIT" << endl;
    else cout << "MISS" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:102:61: error: 'k' was not declared in this scope
  102 |     if(ans[0] < 0 || ans[1] < 0 || ans[0] + ans[1] > 1.0 || k < 0) cout << "HIT" << endl;
      |                                                             ^
Language: Java

import java.util.Scanner;

public class a {
    public static void main(String[] a) {
        Scanner s = new Scanner(System.in);
        for (;;) {
            int h = s.nextInt() + 1;
            int w = s.nextInt() + 1;
            if (h * w == 1)
                break;
            int[][] l = new int[h][w];
            int[][] t = new int[h][w];
            int m = 0;
            for (int i = 1; i < h; i++) {
                char[] c = s.next().toCharArray();
                for (int j = 1; j < w; j++) {
                    if (c[j - 1] == '.')
                        l[i][j] = l[i][j - 1] + 1;
                    t[i][j] = l[i][j];
                    for (int k = 0; k < i; k++) {
                        t[k][j] = Math.min(t[k][j], l[i][j]);
                        m = Math.max(m, t[k][j] * (i - k + 1));
                    }
                }
            }
            System.out.println(m);
        }
    }
}



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

import java.util.*;
public class Main{
Scanner sc = new Scanner(System.in);
void run(){
for(;;){int h=sc.nextInt();
int w=sc.nextInt();
if(h+w==0)
break;int[][]fl=new int[h+1][w+1];int[][]ft=new int[h+1][w+1];
int m=0;
for(int i=1;i<=h;i++){
char[]c=("*"+sc.next()).toCharArray();for(int j=1;j<=w;j++){fl[i][j]=fl[i][j-1]+1;
if(c[j]=='*')
fl[i][j] = 0;ft[i][j]=fl[i][j];for(int k=0;k<i;k++)ft[k][j]=Math.min(ft[k][j],fl[i][j]);for(int k=0;k<=i;++)m=Math.max(max,ft[k][j]*(i-k+1));
}}System.out.println(m);
}}public static void main(String[] a){
Main m=new Main();
m.run();
}
}

Compiler output:
Main.java:13: error: illegal start of expression
fl[i][j] = 0;ft[i][j]=fl[i][j];for(int k=0;k<i;k++)ft[k][j]=Math.min(ft[k][j],fl[i][j]);for(int k=0;k<=i;++)m=Math.max(max,ft[k][j]*(i-k+1));
                                                                                                           ^
1 error
Language: C

#include <cstdio>
#include <stack>
#include <algorithm>

using namespace std;

struct Rectangle{ int height; int pos;};

int func(int size, int buffer[]){
  stack<Rectangle> S;
  int maxv = 0;
  buffer[size] = 0;

  for(int i = 0; i <= size; ++i){
    Rectangle rect;
    rect.height = buffer[i];
    rect.pos = i;
    if(S.empty()){
      S.push(rect);
    }else{
      if(S.top().height < rect.height){
	S.push(rect);
      }else if(S.top().height > rect.height){
	int target = i;
	while(!S.empty() && S.top().height >= rect.height){
	  Rectangle pre = S.top(); S.pop();
	  int area = pre.height * (i - pre.pos);
	  maxv = max(maxv, area);
	  target = pre.pos;
	}
	rect.pos = target;
	S.push(rect);
      }
    }
  }
  return maxv;
}

int main(){
  int H, W, map[501][501], i, j;
  char in[501];
  while(scanf("%d%d", &H, &W) && H && W){
    for(i = 0; i < H; ++i){
      scanf("%s", in);
      for(j = 0; j < W; ++j) map[i][j] = in[j] == '*' ? 0 : 1;
    }

    for(i = 1; i < H; ++i)
      for(j = 0; j < W; ++j)
	if(map[i][j])
	  map[i][j] = map[i - 1][j] + 1;

    int maxv = 0;
    for(i = 0; i < H; ++i)
      maxv = max(maxv, func(W, map[i]));
		  
    printf("%d\n", maxv);   
  }
  return 0;
}

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

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <utility>
 
#define YNUM(X) ( X < 0 ? X + 3 : X )
 
int h, w;
bool map[502][502];
std::string in;
int data[3][502][502];
int data_max = 0;
int height_sum[502][502], width_sum[502][502];
 
int main(){
    while( std::cin >> h >> w, w + h != 0 ){
        data_max = 0;
 
        memset( height_sum, 0, sizeof(height_sum) );
        memset( width_sum, 0, sizeof(width_sum) );
 
        for( int i = 1; i <= h; ++i ){
            std::cin >> in;
            for( int l = 1; l <= w; ++l ){
                map[i][l] = ( in[l - 1] == '.' );
                if(map[i][l]){
                    width_sum[i][l] = width_sum[i][l - 1] + 1;
                    height_sum[i][l] = height_sum[i - 1][l] + 1;
                }
            }
        }
 
        /*for( int i = 1, n = 1; n <= h; n++, i = n % 3 ){
            for( int l = 1; l <= w; l++ ){
                memset( data[i][l], 0, sizeof(int) * 502 );
                if( map[n][l] ){
                    if( map[n - 1][l] && map[n][l - 1] ){
                        int x_cnt = width_sum[n][l], y_cnt = height_sum[n][l];
 
                        for( int m = 0; m < 502; ++m ){
                            if( data[YNUM(i - 1)][l][m] ){
                            	data[i][l][std::min(m, x_cnt)] = data[YNUM(i - 1)][l][m] + 1;
                            	data_max = std::max( data_max, wh.first * wh.second );
                        	}
                        }
                        for( int m = 0; m < 502; ++m ){
                            if( data[i][l - 1][m] ){
                            	data[i][l][m + 1] = std::min(data[i][l - 1][m], y_cnt);
                            	data_max = std::max( data_max, (m + 1) * data[i][l][m + 1] );
                            }
                        }
                         
                    }else if( map[n - 1][l] ){
                        for( int m = 0; m < 502; ++m ){
                            if( data[YNUM(i - 1)][l] ){
                            	data[i][l][1] = std::max( data[i][l][1], data[YNUM(i - 1)][l][m] + 1 );
                            	data_max = std::max( data_max, wh.first * wh.second );
                        	}
                    	}
 
                    }else if( map[n][l - 1] ){
                        for( int m = 1; m < 502; ++m ){
                            if( data[i][l - 1][m] ){
                            	data[i][l][m + 1] = std::max( data[i][l][m + 1], 1 );
                       	    	data_max = std::max( data_max, (m + 1) * data[i][l][1] );
                        	}
                        }
 
                    }else data[i][l][1] = std::max( data[i][l][1], 1 ), data_max = std::max( data_max, data[i][l][1] );
 
                }   
            }
        }
 
        std::cout << data_max << std::endl;
    }*/
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:81:2: error: expected '}' at end of input
   81 | }
      |  ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

#include <cstdio>
#include <iostream>

using namespace std;

char str[512][512];
int H, W;

int size(int si, int sj)
{
	int max = 0;
	for (int ei = si; ei < H; ei++){
		for (int ej = sj; ej < W; ej++){
			int f = 1;
			for (int i = si; i <= ei; i++){
				for (int j = sj; j <= ej; j++){
					if (str[i][j] != '.'){
						f = 0;
						break;
					}
					if (f == 0){
						break;
					}
				}
			}
			
			if (f && max < (ei - si + 1) * (ej - sj + 1)){
				max = (ei - si + 1) * (ej - sj + 1);
			}
		}
	}
	
	return (max);
}

int main()
{	
	while (1){
		cin >> H >> W;
		
		if (!H && !W){
			break;
		}
		
		for (int i = 0; i < 512; i++){
			strcpy(str[i], "");
		}
		
		for (int i = 0; i < H; i++){
			cin >> str[i];
		}
		
		int max = 0;
		for (int i = 0; i < H; i++){
			for (int j = 0; j < W; j++){
				int s = size(i, j);
				if (max < s){
					max = s;
				}
			}
		}
		
		printf("%d\n", max);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:25: error: 'strcpy' was not declared in this scope
   46 |                         strcpy(str[i], "");
      |                         ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 |