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

#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cstdlib>
#include<cassert>
#include<random>
using namespace std;



int main(){
    random_device r;
    mt19937 mt(r());
    uniform_int_distribution<bool> R(0,1);
    for(int i=0;i<1e7;i++){
        int a=R(mt);
        cout<<a;
    }
    cout<<endl;
    return 0;
}



Compiler output:
In file included from /usr/include/c++/14/bits/stl_algo.h:65,
                 from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/uniform_int_dist.h: In instantiation of 'std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomBitGenerator&, const param_type&) [with _UniformRandomBitGenerator = std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = bool; result_type = bool]':
/usr/include/c++/14/bits/uniform_int_dist.h:204:34:   required from 'std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomBitGenerator&) [with _UniformRandomBitGenerator = std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = bool; result_type = bool]'
  204 |         { return this->operator()(__urng, _M_param); }
      |                  ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
a.cc:23:16:   required from here
   23 |         int a=R(mt);
      |               ~^~~~
/usr/include/c++/14/bits/uniform_int_dist.h:292:59: error: invalid use of incomplete type 'struct std::make_unsigned<bool>'
  292 |         typedef typename make_unsigned<result_type>::type __utype;
      |                                                           ^~~~~~~
In file included from /usr/include/c++/14/bits/move.h:37,
                 from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/type_traits:1932:21: note: declaration of 'struct std::make_unsigned<bool>'
 1932 |   template<> struct make_unsigned<bool>;
      |                     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/uniform_int_dist.h:293:68: error: invalid use of incomplete type 'struct std::make_unsigned<bool>'
  293 |         typedef typename common_type<_Gresult_type, __utype>::type __uctype;
      |                                                                    ^~~~~~~~
/usr/include/c++/14/type_traits:1932:21: note: declaration of 'struct std::make_unsigned<bool>'
 1932 |   template<> struct make_unsigned<bool>;
      |                     ^~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define INF (1<<29)
using namespace std;
typedef long long ll;
int main(){
      int n,a,d,m;
      cin>>n>>a>>d>>m;
      map<int,int> dat;
      for(int i=0;i<m;i++){
            int x,y,z;
            cin>>x>>y>>z;
            if(x==0){
                  int yy=dat[y]?dat[y]:y;
                  int zz=dat[z]?dat[z]:z;
                  dat[y]=zz;
                  dat[z]=yy;
            }else{
                  int zz=dat[z]?dat[z]:z;
                  dat[y]=zz;
            }
      }
      int k;
      cin>>k;
      if(dat[k]){
            printf("%lld\n",a+(dat[k]-1)*d;
      }else{
            printf("%lld\n",a+(k-1)*d);
      }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:43: error: expected ')' before ';' token
   28 |             printf("%lld\n",a+(dat[k]-1)*d;
      |                   ~                       ^
      |                                           )
Language: C++

#include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int a,m,d,n,x[11],y[11],z[11],k;
int main(){
	cin>>n>>a>>d>>m;
	r(i,m)cin>>x[i]>>y[i]>>z[i]:
	cin>>k;
	for(int i=m-1;i>=0;i--){
		if(x[i])if(y[i]==k)k=z[i];
		else{
			if(y[i]==k)k=z[i];
			else if(z[i]==k)k=y[i];
		}
	}
	cout<<k*d+a<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected ';' before ':' token
    7 |         r(i,m)cin>>x[i]>>y[i]>>z[i]:
      |                                    ^
      |                                    ;
Language: C++

#include<iostream>
#include<vector>
using namespace std;
typedef pair<int, int> P;
const int D = 32;
#define REP(i, j) for(int i = 0; i < j; i++)
namespace std{
  bool operator < (const P& a, const P& b) {
    if(a.second != b.second) return a.second < b.second;
    return a.first < b.first;
  }
}

int N;

int solve(int d, vector<P> &v, vector<bool> &used){
  for(int i = 0; i < N; ++i){
    if(used[i]) continue;
    if(v[i].first <= d && v[i].second >= d) {
      used[i] = true;
      return 100;
    }
  }
  return 50;
}

int main(){
  cin >>N;
  vector<P> v(N);
  REP(i, N){
    int a, b; cin >>a >>b;
    v[i] = P(a, b);
  }
  sort(v.begin(), v.end());
  vector<bool> used(N, false);
  int ans = 0;
  for(int d = 1; d <= 31; d++) ans += solve(d, v, used);
  cout <<ans <<endl;
  return 0;
}

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

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef int short;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 100;
const ll LINF = 1e18;

/*
<url:>
問題文============================================================

=================================================================

解説=============================================================

================================================================
*/
struct status{
    int x;
    int y;
    int t;
    int flag;
    status(){}
    status(int x,int y,int t,int flag):x(x),y(y),t(t),flag(flag){}
};

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

int W,H,N;
int sx,sy;

inline bool waku(int x,int y){
    if(x == 0 || y == 0 || x == W+1 || y == H+1) return false;
    else return true;
}

signed main(void) {
	cin.tie(0); ios::sync_with_stdio(false);
    cin >> W >> H >> N;
    cin >> sx >> sy;
    vector<int> L(N);
    vector<vector<pii>> path(N);
    for(int i = 0; i < N;i++){
        cin >> L[i];
        for(int j = 0; j < L[i];j++){
            int px,py; cin >> px >> py;
            path[i].push_back(pii(px,py));
        }
    }
    int ans = INF;
    queue<status> q;
    
    int flag = 0;
    for(int i = 0; i < N;i++){
        if(path[i][0].first == sx && path[i][0].second == sy){
            flag += (1<<i);
        }
    }
    
    q.push(status(sx,sy,0,flag));
    while(!q.empty()){
        auto S = q.front(); q.pop();
        
        if(S.flag == (1<<N)-1){
            ans = min(ans,S.t);
            continue;
        }
        
        bool boom = false;
        for(int i = 0; i < N;i++){
            if((S.flag>>i)&1) continue;
            if(S.t >= L[i] - 1){
                boom = true;
                break;
            }
        }
        if(boom) continue;
        
        int nt = S.t + 1;
        
        for(int k = 0; k < 9;k++){
            int nx = S.x + dx[k], ny = S.y + dy[k];
            if(!waku(nx,ny)) continue;
            // 爆弾
            bool f1 = false;
            for(int j = 0; j < N;j++){
                if(path[j][path[j].size()-1].first == nx && path[j][path[j].size()-1].second == ny){
                    f1 = true; break;
                }
            }
            if(f1) continue;
            
            int nflag = S.flag;
            for(int j = 0; j < N;j++){
                if((nflag>>j)&1) continue;
                if(path[j][nt].first == nx && path[j][nt].second == ny){
                    nflag += (1<<j);
                }
            }
            
            q.push(status(nx,ny,nt,nflag));
        }
    }
    if(ans == INF){
        cout << -1 << endl;
    }else{
        cout << ans << endl;
    }
	return 0;
}



Compiler output:
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | typedef int short;
      |             ^~~~~
Language: C++

/*
N???2??????
t???+-2pi/n
a????????§in space???FFT?????????
*/
typedef double D;
typedef complex<D> P;
D pi=acos(-1);
void FFT(vector<P>& a,int N,double t){
	for(int m=N;m>=2;m/=2){
		int mh=m/2;
		rep(i,mh){
			P w=polar(1.0,t*i);
			for(int j=i;j<N;j+=m){
				int k=j+mh;
				P x=a[j]-a[k];
				a[j]+=a[k];
				a[k]=w*x;
			}
		}
		t*=2;
	}
	int i=0;
	rep1(j,N-2){
		for(int k=N/2;k>(i^=k);k/=2);
		if(j<i) swap(a[i],a[j]);
	}
}
vector<P> conv(vector<P> a,vector<P> b){
	int n=a.size()+b.size();
	int N=1;
	while(N<n) N*=2;
	a.resize(N);
	b.resize(N);
	FFT(a,N,2*pi/N);
	FFT(b,N,2*pi/N);
	rep(i,N) a[i]*=b[i];
	FFT(a,N,-2*pi/N);
	rep(i,N) a[i]/=N;
	return a;
}

Compiler output:
a.cc:7:9: error: 'complex' does not name a type
    7 | typedef complex<D> P;
      |         ^~~~~~~
a.cc:8:6: error: 'acos' was not declared in this scope
    8 | D pi=acos(-1);
      |      ^~~~
a.cc:9:6: error: variable or field 'FFT' declared void
    9 | void FFT(vector<P>& a,int N,double t){
      |      ^~~
a.cc:9:10: error: 'vector' was not declared in this scope
    9 | void FFT(vector<P>& a,int N,double t){
      |          ^~~~~~
a.cc:9:17: error: 'P' was not declared in this scope
    9 | void FFT(vector<P>& a,int N,double t){
      |                 ^
a.cc:9:21: error: 'a' was not declared in this scope
    9 | void FFT(vector<P>& a,int N,double t){
      |                     ^
a.cc:9:23: error: expected primary-expression before 'int'
    9 | void FFT(vector<P>& a,int N,double t){
      |                       ^~~
a.cc:9:29: error: expected primary-expression before 'double'
    9 | void FFT(vector<P>& a,int N,double t){
      |                             ^~~~~~
a.cc:29:1: error: 'vector' does not name a type
   29 | vector<P> conv(vector<P> a,vector<P> b){
      | ^~~~~~
Language: C++

/*
	suffix array
	sa[i]= i??????????°???????suffix???????????????index (sa[0]=N)
	_k,_N?????°????????????????????£?????????(compare???2?????°???????????????)

	RMQ??¨????????° s?????§????????????t?????????????????´??? ???????????????????????????(jag2014summerday4F)

	lcp[i]= len of common prefix of s[sa[i]..],s[sa[i+1]..]
	????§????RMQ???????????°?????????substring???common prefix?????????????????????
*/
const int MAX_N=;
int _k,_N,_rank[MAX_N+1],tmp[MAX_N+1],sa[MAX_N+1],lcp[MAX_N];
bool compare_sa(int i,int j){
	if(_rank[i]!=_rank[j]) return _rank[i]<_rank[j];
	else{
		int ri= i+_k<=_N ? _rank[i+_k] : -1;
		int rj= j+_k<=_N ? _rank[j+_k] : -1;
		return ri<rj;
	}
}
void make_sa(string s){		//(string s,int *sa)
	_N=s.length();
	rep(i,_N+1){
		sa[i]=i;
		_rank[i]= i<_N?s[i]:-1;
	}
	for(_k=1;_k<=_N;_k*=2){
		sort(sa,sa+_N+1,compare_sa);
		tmp[sa[0]]=0;
		rep1(i,_N){
			tmp[sa[i]]=tmp[sa[i-1]]+( compare_sa(sa[i-1],sa[i]) ? 1 : 0 );
		}
		rep(i,_N+1) _rank[i]=tmp[i];
	}
}
void make_lcp(string s){
	int N=s.length();
	rep(i,N+1) _rank[sa[i]]=i;
	int h=0;
	lcp[0]=0;
	rep(i,N){
		int j=sa[_rank[i]-1];
		if(h>0) h--;
		for(;j+h<N&&i+h<N;h++){
			if(s[j+h]!=s[i+h]) break;
		}
		lcp[_rank[i]-1]=h;
	}
}

Compiler output:
a.cc:11:17: error: expected primary-expression before ';' token
   11 | const int MAX_N=;
      |                 ^
a.cc:12:22: error: size of array '_rank' is not an integral constant-expression
   12 | int _k,_N,_rank[MAX_N+1],tmp[MAX_N+1],sa[MAX_N+1],lcp[MAX_N];
      |                 ~~~~~^~
a.cc:12:35: error: size of array 'tmp' is not an integral constant-expression
   12 | int _k,_N,_rank[MAX_N+1],tmp[MAX_N+1],sa[MAX_N+1],lcp[MAX_N];
      |                              ~~~~~^~
a.cc:12:47: error: size of array 'sa' is not an integral constant-expression
   12 | int _k,_N,_rank[MAX_N+1],tmp[MAX_N+1],sa[MAX_N+1],lcp[MAX_N];
      |                                          ~~~~~^~
a.cc:12:55: error: size of array 'lcp' is not an integral constant-expression
   12 | int _k,_N,_rank[MAX_N+1],tmp[MAX_N+1],sa[MAX_N+1],lcp[MAX_N];
      |                                                       ^~~~~
a.cc:21:6: error: variable or field 'make_sa' declared void
   21 | void make_sa(string s){         //(string s,int *sa)
      |      ^~~~~~~
a.cc:21:14: error: 'string' was not declared in this scope
   21 | void make_sa(string s){         //(string s,int *sa)
      |              ^~~~~~
a.cc:36:6: error: variable or field 'make_lcp' declared void
   36 | void make_lcp(string s){
      |      ^~~~~~~~
a.cc:36:15: error: 'string' was not declared in this scope
   36 | void make_lcp(string s){
      |               ^~~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

using namespace std;
int main(void)
{
  int n,m;
  cin >> n >> m;
  vector<int> se;
  se.resize(m);
  REP(i,m) cin >> se[i];
  int answer=0;
  answer=max(answer,se[0]-1);
  REP(i,m-1) answer=max(se[i+1]-se[i]-1)/2;
  answer=max(answer,n-se[m-1]);
  cout << answer << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   18 |   REP(i,m-1) answer=max(se[i+1]-se[i]-1)/2;
      |                     ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:18:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   18 |   REP(i,m-1) answer=max(se[i+1]-se[i]-1)/2;
      |                     ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf = (int)1e9;
const double INF = 1e12, EPS = 1e-9;

int a[100000];

int main(){
	int n, m; cin >> n >> m;
	int ans = 0;
	rep(i, m) cin >> a[i];
	rep(i, m - 1) ans = max(ans, (a[i + 1] - a[i]) / 2);
	ans = max(ans, a[i] - 1);
	ans = max(ans, n - a[i]);
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:26: error: 'i' was not declared in this scope
   25 |         ans = max(ans, a[i] - 1);
      |                          ^
Language: C++

https://www.slideshare.net/cocoa_chan/rupc2016-day2-d?qid=1931cae0-cc15-435b-ba12-0e9bc5aeb296&v=&b=&from_search=1

Compiler output:
a.cc:1:1: error: 'https' does not name a type
    1 | https://www.slideshare.net/cocoa_chan/rupc2016-day2-d?qid=1931cae0-cc15-435b-ba12-0e9bc5aeb296&v=&b=&from_search=1
      | ^~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int W,H,N;
  cin>>W;
  cin>>H;
  cin>>N;
  
  vector<int> row;
  for(int i = 0;i < N;++i){
    int a;
    cin>>a;
    row.push_back(a);
  }

  int o_s = W + H + W - 2;
  int o = W + H + W - 2;
  int i_s = W + H + W - 6;
  int c = 0;
  int ans = 0;

  for(int e : row){
    if(e == 0){
      --o_s;
    }
    else{
      --i_s;
    }

    if(o_s == 0 || i_s == 0){
      break;
    }
    else if(o - (W - 1) < o_s){
      if(o_s == i_s + 4){
        ++ans;
      }
    }
    else if(o - (W - 1) == o_s){
      continue;
    }
    else if(o - (W - 1) > o_s && o_s > o - (W + H - 2)){
      if(o_s == i_s + 2){
        ++ans;
      }
    }
    else if(o_s = o - (W + H - 2){
      continue;
    }
    else if(o_s < o - (W + H - 2)){
      if(o_s == i_s){
        ++ans;
      }
    }
  }

  cout<<ans<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:34: error: expected ')' before '{' token
   48 |     else if(o_s = o - (W + H - 2){
      |            ~                     ^
      |                                  )
a.cc:56:3: error: expected primary-expression before '}' token
   56 |   }
      |   ^
Language: C++

http://jud#include "bits/stdc++.h"
using namespace std;

int H, W;
int a, b;
int main() {
	cin >> W >> H;
	int N; cin >> N;
	a = 0; b = 0;
	int ans = 0;
	while (N--) {
		int p; cin >> p;
		if (!p) {
			a++;
		}
		else {
			b++;
		}
		if (a == W - 1 || a == W + H - 2) {

		}
		else if (a < W-1) {
			if (a == b)ans++;
		}
		else if (a < W + H-2) {
			if (a == b + 2)ans++;
		}
		else {
			if (a == b + 4)ans++;
		}

	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:1:1: error: 'http' does not name a type
    1 | http://jud#include "bits/stdc++.h"
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> W >> H;
      |         ^~~
a.cc:33:9: error: 'cout' was not declared in this scope
   33 |         cout << ans << endl;
      |         ^~~~
a.cc:33:24: error: 'endl' was not declared in this scope
   33 |         cout << ans << endl;
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define FOR(i,s,e) for(int (i)=(s);(i)<(int)(e);(i)++)
#define REP(i,e) FOR(i,0,e)
#define RFOR(i,e,s) for(int (i)=(e)-1;(i)>=(int)(s);(i)--)
#define RREP(i,e) RFOR(i,e,0)

#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))

typedef long long ll;
typedef pair<int, int> PII;
typedef priority_queue<int> PQI;
typedef priority_queue<PII> PQII;

const double EPS = 1e-10;

typedef struct edge_def {
  int from;
  int to;
  int cost;

  edge_def(int _from, int _to, int _cost) {
    from = _from;
    to   = _to;
    cost = _cost;
  };
} edge;

const int INF = 1e+9;
const int V = 1e5;
const int E = V-1;
int nv, ne;
int u, v;
int usd[V];

vector<edge> es[V];
vector<PII> cut_es;

int pick_up_cut_es() {
  cut_es.clear();
  REP(i,nv) {
    if (es[i].size() != 3) continue;
    REP(j,(int)es[i].size()) {
      int nxt = es[i][j].to;
      if (es[nxt].size() != 3) continue;
      if (i < nxt) cut_es.psb(mp(i, nxt));
    }
  }
  return (int)cut_es.size();
}

int dfs_sp(int s, int ng_l, int ng_r) {
  int res = 1;
  usd[s] = 1;
  REP(i,(int)es[s].size()) {
    int nxt = es[s][i].to;
    if (usd[nxt]) continue;
    if ((s==ng_l && nxt==ng_r) || (s==ng_r && nxt==ng_l)) continue;
    res += dfs_sp(nxt, ng_l, ng_r);
    break;
  }
  return res; 
}

int dfs(int s) {
  int res = 1;
  usd[s] = 1;
  REP(i,(int)es[s].size()) {
    int nxt = es[s][i].to;
    if (usd[nxt]) continue;
    res += dfs(nxt);
    break;
  }
  return res; 
}

int main() {
  scanf("%d%d%d ", &nv, &u, &v);
  u--; v--;
  ne = nv-1;
  REP(i,nv) es[i].clear();
  int nbhd = 0;
  REP(i,ne) {
    int a, b;
    scanf("%d%d ", &a, &b);
    a--; b--;
    es[a].psb(edge(a, b, 1));
    es[b].psb(edge(b, a, 1));
    if ((a==u && b==v) || (a==v && b==u)) nbhd = 1;
  }

  int neu = es[u].size(), nev = es[v].size();

  memset(usd, 0, sizeof(usd));
  usd[u] = usd[v] = 1;

  int pu=0, pv=0;
  int res=0;
  if (nbhd) {
    pu = dfs(u);
    pv = dfs(v);
    if (pu==pv && pu+pv==nv) res = 1;
  } else if (neu==1 && nev==1) {
    REP(i,nv) if (es[i].size()>3) break;
    if (pick_up_cut_es()) {

      if (cut_es.size()>1) break;

      REP(i,(int)cut_es.size()) {
        memset(usd, 0, sizeof(usd));
        usd[u] = usd[v] = 1;
        pu = dfs_sp(u, cut_es[i].first, cut_es[i].second);
        pv = dfs_sp(v, cut_es[i].first, cut_es[i].second);
        if (pu==pv && pu+pv==nv) {
          res = 1;
          break;
        }
      }
    } else {
      pu = dfs(u);
      if (pu+1==nv && (pu-1)%2==0) res = 1;
    }
  } else if (neu==1 && nev==2) {
    pu = dfs(u);
    pv = dfs(v);
    if (pu==pv && pu+pv==nv) res = 1;
  } else if (neu==2 && nev==1) {
    pv = dfs(v);
    pu = dfs(u);
    if (pu==pv && pu+pv==nv) res = 1;
  }

  string res_s = res ? "Yes" : "No";
  cout << res_s << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:111:28: error: break statement not within loop or switch
  111 |       if (cut_es.size()>1) break;
      |                            ^~~~~
Language: C++

http://judge.u-aizu.#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

void dfs(const vector<vector<int>>&edges, int now, int pre,int rest,vector<int>&ans,bool flag) {

	ans[now]=true;
	if(rest==0)return;
	for (auto e : edges[now]) {
		if(e==pre)continue;
		else {
			if (flag&&edges[now].size() == 3) {
				flag=false;
				continue;
			}
			dfs(edges,e,now,rest-1,ans,flag);
			return ;
		}
	}
	return;
}

int main() {
	int N,S,T;cin>>N>>S>>T;
	S--;T--;

	vector<vector<int>>edges(N);
	for (int i = 0; i < N-1; ++i) {
		int a,b;cin>>a>>b;
		a--;b--;
		edges[a].push_back(b);
		edges[b].push_back(a);
	}
	bool ok=false;

	if (N == 2) {
		ok=true;
	}
	else if (edges[S].size() > 2 || edges[T].size() > 2) {

	}
	else {
		for (int i = 0; i < edges[S].size()*2; ++i) {
			for (int j = 0; j < edges[T].size()*2; ++j) {
				vector<int>vs,vt;
				vs.resize(N);vt.resize(N);
				vs[S]=true;
				vt[T]=true;
				dfs(edges,edges[S][i/2],S,N/2-2,vs,i%2==0);
				dfs(edges,edges[T][j/2],T,N/2-2,vt,j%2==0);

				bool aok=true;
				for (int k = 0; k < N; ++k) {
					if(!vs[k]&&!vt[k])aok=false;
				}
				if(aok)ok=true;
			}
		}
	}
	cout<<1<<endl;

	if(ok)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;
}


Compiler output:
a.cc:1:1: error: 'http' does not name a type
    1 | http://judge.u-aizu.#include "bits/stdc++.h"
      | ^~~~
In file included from /usr/include/c++/14/unordered_map:40,
                 from a.cc:2:
/usr/include/c++/14/initializer_list:51:15: error: 'size_t' does not name a type
   51 |       typedef size_t            size_type;
      |               ^~~~~~
/usr/include/c++/14/initializer_list:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | // std::initializer_list support -*- C++ -*-
/usr/include/c++/14/initializer_list:57:7: error: 'size_type' does not name a type
   57 |       size_type                 _M_len;
      |       ^~~~~~~~~
/usr/include/c++/14/initializer_list:60:54: error: 'size_type' has not been declared
   60 |       constexpr initializer_list(const_iterator __a, size_type __l)
      |                                                      ^~~~~~~~~
/usr/include/c++/14/initializer_list:68:17: error: 'size_type' does not name a type
   68 |       constexpr size_type
      |                 ^~~~~~~~~
/usr/include/c++/14/initializer_list:45:11: fatal error: definition of 'class std::initializer_list<_E>' does not match '#include <initializer_list>'
   45 |     class initializer_list
      |           ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

typedef pair<int, int> i_i;

int N, x2, y2, z2;
int ans = INT_MAX;

void dfs(int x, int y, int z, int k, map<vector<int>, int>& memo) {
	vector<int> v(3);
	v[0] = x; v[1] = y; v[2] = z;
	if (memo.count(v) && memo[v] <= k) return;
	memo[v] = k;
	ans = min(ans, abs(x2 - x) + abs(y2 - y) + abs(z2 - z) + k);
	int _x, _y, _z;
	if (x != x2) {
		_x = x; _y = z; _z = N - 1 - y; dfs(_x, _y, _z, k + 1, memo);
		_x = x; _y = N - 1 - z; _z = y; dfs(_x, _y, _z, k + 1, memo);
	}
	if (y != y2) {
		_y = y; _z = x; _x = N - 1 - z; dfs(_x, _y, _z, k + 1, memo);
		_y = y; _z = N - 1 - x; _x = z; dfs(_x, _y, _z, k + 1, memo);
	}
	if (z != z2) {
		_z = z; _x = y; _y = N - 1 - x; dfs(_x, _y, _z, k + 1, memo);
		_z = z; _x = N - 1 - y; _y = x; dfs(_x, _y, _z, k + 1, memo);
	}
}

int main() {
	cin >> N;
	int x1, y1, z1; cin >> x1 >> y1 >> z1;
	cin >> x2 >> y2 >> z2;
	map<vector<int>, int> memo;
	dfs(x1, y1, z1, 0, memo);
	cout << ans << endl;
}

Compiler output:
a.cc:9:11: error: 'INT_MAX' was not declared in this scope
    9 | int ans = INT_MAX;
      |           ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <vector>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include<iostream>
#include<queue>
#include<algorithm>
#include<cmath>
#include<utility>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
 
int main(){
    int n,a,d,m,k,ans;
    pair<int,int> alt;
    cin>>n>>a>>d>>m;
    int num[n+1],x[n],y[n],z[n];
    num[0]=a;
    loop(i,1,n+1)num[i]=num[i-1]+d;
    rep(i,m){
        cin>>x[i]>>y[i]>>z[i];
        y[i]--;
        z[i]--;
    }
    cin>>k;
    alt.first=k-1;
    alt.second=num[start];
    rep(i,m){
        if(x[i]==0){
            if(y[i]<=alt.first && alt.first<=z[i])alt.first=y[i]+z[i]-alt.first;
        }
        if(x[i]==1){
            if(y[i]<=alt.first && alt.first<=z[i])alt.second++;
        }
        if(x[i]==2){
            if(y[i]<=alt.first && alt.first<=z[i])alt.second/=2;
        }
    }
    cout<<alt.second<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: 'start' was not declared in this scope
   24 |     alt.second=num[start];
      |                    ^~~~~
Language: Java

= sc.nextInt();
			final int b = sc.nextInt();
			final int c = sc.nextInt();
			final int d = sc.nextInt();
			
			for(int j = a; j <= X_MAX; j++){
				for(int k = 0; k <= 2 * Y_MAX - b; k++){
					if(DP[j][k] < 0){ continue; }
					nextDP[j - a][k + b] = Math.max(DP[j - a][k + b], DP[j][k]);
				}
			}
			
			for(int j = 0; j <= X_MAX; j++){
				for(int k = c; k <= 2 * Y_MAX - c; k++){
					if(DP[j][k] < 0){ continue; }
					
					nextDP[j][k - c] = Math.max(DP[j][k - c], DP[j][k] + d);
				}
			}
			
			{
				int[][] tmp = DP;
				DP = nextDP;
				nextDP = tmp;
			}
		}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
= sc.nextInt();
^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
			final int b = sc.nextInt();
			      ^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
			for(int j = a; j <= X_MAX; j++){
			^
Main.java:6: error: class, interface, enum, or record expected
			for(int j = a; j <= X_MAX; j++){
			               ^
Main.java:6: error: class, interface, enum, or record expected
			for(int j = a; j <= X_MAX; j++){
			                           ^
Main.java:7: error: class, interface, enum, or record expected
				for(int k = 0; k <= 2 * Y_MAX - b; k++){
				               ^
Main.java:7: error: class, interface, enum, or record expected
				for(int k = 0; k <= 2 * Y_MAX - b; k++){
				                                   ^
Main.java:8: error: class, interface, enum, or record expected
					if(DP[j][k] < 0){ continue; }
					                            ^
Main.java:10: error: class, interface, enum, or record expected
				}
				^
Main.java:13: error: class, interface, enum, or record expected
			for(int j = 0; j <= X_MAX; j++){
			               ^
Main.java:13: error: class, interface, enum, or record expected
			for(int j = 0; j <= X_MAX; j++){
			                           ^
Main.java:14: error: class, interface, enum, or record expected
				for(int k = c; k <= 2 * Y_MAX - c; k++){
				               ^
Main.java:14: error: class, interface, enum, or record expected
				for(int k = c; k <= 2 * Y_MAX - c; k++){
				                                   ^
Main.java:15: error: class, interface, enum, or record expected
					if(DP[j][k] < 0){ continue; }
					                            ^
Main.java:18: error: class, interface, enum, or record expected
				}
				^
Main.java:23: error: class, interface, enum, or record expected
				DP = nextDP;
				^
Main.java:24: error: class, interface, enum, or record expected
				nextDP = tmp;
				^
Main.java:25: error: class, interface, enum, or record expected
			}
			^
18 errors
Language: C++

#include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int dp[101][1200][1200];
int main(){
  memset(dp,-1,sizeof(dp));
  int x,y,n;
  cin>>n>>x>>y;
  dp[0][x+600][y+600]=0;
  r(i,n){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    r(A,1200)r(B,1200){
      if(~dp[i][A][B]){c
        dp[i+1][A-a][B+b]=max(dp[i+1][A-a][B+b],dp[i][A][B]);
        dp[i+1][A][B-c]=max(dp[i+1][A][B-c],dp[i][A][B]+d);
      }
    }
  }
  int ans=0;
  r(i,1200)r(j,1200){
    if(i>=600&&j>=600){
      ans=max(ans,dp[n][i][j]);
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before 'dp'
   14 |       if(~dp[i][A][B]){c
      |                         ^
      |                         ;
   15 |         dp[i+1][A-a][B+b]=max(dp[i+1][A-a][B+b],dp[i][A][B]);
      |         ~~
Language: C++

#include <bits/stdc++.h>
 
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
 
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)
 
#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
 
// #define DEBUG
 
#ifdef DEBUG
    #define dump(...) fprintf(stderr, __VA_ARGS__)
#else
    #define dump(...)
#endif
 
template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}
 
using namespace std;
using ll=long long;
using vi=vector<int>;
using vll=vector<ll>;
 
const double EPS = 1e-10;
const double PI = acos(-1.0);
const ll inf =1LL << 62;
const ll mod=1000000007LL;
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
 
 
ll extgcd(ll a,ll b,ll& x,ll& y){x=1,y=0;ll g=a;if(b!=0) g=extgcd(b,a%b,y,x),y-=a/b*x;return g;}
ll ADD(const ll &a, const ll &b,const ll &mod) { return (a+b)%mod;}
ll SUB(const ll &a, const ll &b,const ll &mod) { return (a-b+mod)%mod;}
ll MUL(const ll &a, const ll &b,const ll &mod) { return (1LL*a*b)%mod;}
ll DIV(const ll &a, const ll &b,const ll &mod) {ll x,y; extgcd(b,mod,x,y);return MUL(a,(x+mod)%mod,mod);}
 
random_device rd;
mt19937 mt(rd());
uniform_int_distribution<int> dice(1,6);
uniform_real_distribution<double> score(0.0,10.0);

int main(void){
    int n; cin >> n;
    int x, y; cin >> x >> y;

    map<int, map<int, int>> dp[2];
    dp[0][x][y] = 0;

    int i = 0;
    for(auto & e : in){
        int a, b, c, d; cin >> a >> b >> c >> d;

        int pre = i;
        i = !i;
        dp[i].clear();

        for(auto & e1 : dp[pre]){
            for(auto & e2 : e1.second){
                int tako = e1.first, fuga = e2.first;
                int buta = e2.second;

                chmax(dp[i][tako    ][fuga    ], buta);

                if(fuga - c >= -100)
                chmax(dp[i][tako    ][fuga - c], buta + d);

                if(tako - a >= 0)
                chmax(dp[i][tako - a][fuga + b], buta);
            }
        }
    }

    int res = 0;
    for(auto & e1 : dp[i]){
        for(auto & e2 : e1.second){
            int tako = e1.first, fuga = e2.first;
            int buta = e2.second;

            if(tako >= 0 and fuga >= 0){
                chmax(res, buta);
            }
        }
    }

    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:20: error: 'in' was not declared in this scope; did you mean 'i'?
   61 |     for(auto & e : in){
      |                    ^~
      |                    i
Language: C++

#include<bits/stdc++.h>

using namespace std;

using int64 = long long;

namespace FastFourierTransform
{
  using C = complex< long double >;

  void DiscreteFourierTransform(vector< C > &F, bool rev)
  {
    const int N = (int) F.size();
    const double PI = (rev ? -1 : 1) * acos(-1);
    for(int i = 0, j = 1; j + 1 < N; j++) {
      for(int k = N >> 1; k > (i ^= k); k >>= 1);
      if(i > j) swap(F[i], F[j]);
    }

    C wr, w, s, t;
    for(int i = 1; i < N; i <<= 1) {
      wr = polar(1.0, PI / i);
      for(int j = 0; j < N; j += i * 2) {
        w = 1.0;
        for(int k = 0; k < i; k++) {
          s = F[j + k];
          t = C(F[j + k + i].real() * w.real() - F[j + k + i].imag() * w.imag(), F[j + k + i].real() * w.imag() + F[j + k + i].imag() * w.real());
          F[j + k] = s + t, F[j + k + i] = s - t;
          w *= wr;
        }
      }
    }
    if(rev) {
      long double temp = 1.0ld / N;
      for(int i = 0; i < N; i++) F[i] *= temp;
    }
  }

  vector< int64 > Multiply(const vector< int > &A, const vector< int > &B)
  {
    int sz = 1;
    while(sz <= A.size() + B.size()) sz <<= 1;
    vector< C > F(sz), G(sz);
    for(int i = 0; i < A.size(); i++) F[i] = A[i];
    for(int i = 0; i < B.size(); i++) G[i] = B[i];
    DiscreteFourierTransform(F, false);
    DiscreteFourierTransform(G, false);
    for(int i = 0; i < sz; i++) F[i] *= G[i];
    DiscreteFourierTransform(F, true);
    vector< int64 > X(A.size() + B.size() - 1);
    for(int i = 0; i < A.size() + B.size() - 1; i++) X[i] = F[i].real() + 0.5;
    return (X);
  }
};

int main()
{
  int N, M, Q, A[40001], B[40001], C[100000];
  vector< int > F(200001), G(200001);

  scanf("%d %d %d", &N, &M, &Q);
  for(int i = 0; i < N; i++) scanf("%d", &A[i + 1]), A[i + 1] += A[i];
  for(int i = 0; i < M; i++) scanf("%d", &B[i + 1]), B[i + 1] += B[i];
  for(int i = 0; i < Q; i++) scanf("%d", &C[i]);

  for(int i = 1; i <= N; i++) {
    for(int j = 0; j < i; j++) {
      ++F[A[i] - A[j]];
    }
  }
  for(int i = 1; i <= M; i++) {
    for(int j = 0; j < i; j++) {
      ++G[B[i] - B[j]];
    }
  }
  reverse(begin(G), end(G));
  auto X = FastFourierTransform::Multiply(F, G);
  for(int i = 0; i < Q; i++) {
    if(C[i] == 0) printf("%lld\n", X[200000]);
    else printf("%lld\n", X[200000 - C[i]] + X[200000 + C[i]]);
  }
}

Compiler output:
a.cc: In function 'void FastFourierTransform::DiscreteFourierTransform(std::vector<std::complex<long double> >&, bool)':
a.cc:34:26: error: unable to find numeric literal operator 'operator""ld'
   34 |       long double temp = 1.0ld / N;
      |                          ^~~~~
Language: C++

#include <iostream>
#include <vector>

#define rep(i,a) for(int i = 0 ; i < a ; i ++)
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
using namespace std;

int main(void){
  int n,m,l;
  cin>>n>>m>>l;
  vector<vector<int> > mm(m,vector<int>(4));
  const int d = 1;
  const int a = 2;
  const int k = 3;
  const int t = 0;
  int ary[4];
  rep(i,m){
    rep(j,4){
      cin>>ary[j];
    }
    mm[i][0] = ary[3];
    rep(j,3){
      mm[i][1+j] = ary[j];
    }
  }
  sort(mm.begin(),mm.end());
  reverse(mm.begin(),mm.end());
  /*
  rep(i,m){
    rep(j,4){
      cout<<mm[i][j]<<" ";
    }
    cout<<endl;
  }
  //*/

  int ans = -1;
  rep(i,(1<<m)){
    int ret = 0;
    int ary[5][8] = {0};
    bool f = false;
    int cnt = 0;
    rep(j,m){
      if((i>>j)%2==1){
        for(int i = mm[j][a] ; i < mm[j][a] + mm[j][k] ; i ++){
          if(ary[mm[j][d]][i]){
            f = true;
            break;
          }
          ary[mm[j][d]][i] = 1;
          
        }
        ret += mm[j][t];

        cnt ++;
        if(cnt>l){
          f = true;
          break;
        }
      }
      if(f)break;
    }
    if(f)continue;
    /*
    if(ret>ans){
      rep(j,m)if((i>>j)%2)cout<<mm[j][d]<<" "<<mm[j][a]<<" "<<mm[j][t]<<endl;
      cout<<"ret";cout<<" "<<ret<<" "<<ans<<endl;
    }
    //*/
    ans = max(ans,ret);
    //cout<<endl;
  }
  cout<<ans<<endl;
}

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

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

int dp[301][40]; //?????\,?§??????°,??????->?????????
typedef tuple<int,int,int,int> T;
vector<T> V;

int main(){
    int N,M,L;
    cin>>N>>M>>L;
    for(int i=0;i<M;i++){
        int d,a,k,t;
        cin>>d>>a>>k>>t;
        V.emplace_back(d,a-1,k,t);
    }
    sort(V.begin(),V.end());
    for(auto &v:V){
        int d=get<0>(v),a=get<1>(v)+d*N,k=get<2>(v),t=get<3>(v);
        for(int l=L;l>0;l--){
            dp[l][a+k-1]=max(dp[l][a+k-1],dp[l-1][a]+t);
            for(int aa=a+k;aa<5*N;aa++) dp[l][aa]=max(dp[l][aa],dp[l][aa-1]);
        }
    }
    cout<<dp[L][5*N-1]<<endl;
    return 0;
}

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

#include<iostream>
#include<utility>
#include<algorithm>
using namespace std;
pair<int,pair<int,int> > p[2000000];
int m;
int tansa(int,int);
int main(){
  int n;

  cin >> n >> m;
  for(int i=0;i<m;i++){
    cin>>p[i].second.second>>p[i].first>>p[i].second.first; 
  }
  sort(p,p+m);
  for(int i=m-1;i>=0;i--){
    if(p[i].first==n){
      int ans;
      if(p[i].second.second==1){
	cout << p[i].second.first << endl;
	return 0;
      }
      ans=tansa(p[i].second.second,p[i].second.first);
      if(ans==-1)continue;
      cout << p[i].second.first << endl;
      return 0;
    }
    else{
      cout << -1 << endl;
      return 0;
    }
  }
}
int tansa(int iru,int time){
  int ans;
  c++;
  for(int i=m-1;i>=0;i--){
    if(iru==p[i].first&&time>=p[i].second.first){
      if(p[i].second.second==1)return 1;
      
      ans=tansa(p[i].second.second,p[i].second.first);
      if(ans==1){
	return 1;
      }
      
      else continue;
    }
  }
  // else if(iru>p[i].first){
  return -1;
  //  }
  //}
}

Compiler output:
a.cc: In function 'int tansa(int, int)':
a.cc:36:3: error: 'c' was not declared in this scope
   36 |   c++;
      |   ^
Language: Java

import java.awt.Point;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	static long startTime = System.currentTimeMillis();
	static final int[] DR = { 1, 0, -1, 0 };
	static final int[] DC = { 0, 1, 0, -1 };
	static int H, W, gr, gc;
	static char[][] F;

	public static void main(String[] args) {
		H = sc.nextInt();
		W = sc.nextInt();
		F = new char[H][];
		int stone = 0;
		for (int i = 0; i < H; ++i) {
			F[i] = sc.next().toCharArray();
			for (int j = 0; j < W; ++j) {
				if (F[i][j] == 'o') {
					++stone;
				} else if (F[i][j] == '@') {
					gr = i;
					gc = j;
				}
			}
		}
		boolean ans;
		if (stone >= 3) {
			if (H > 1 && W > 1) {
				ans = true;
			} else {
				ans = search();
			}
		} else if (stone == 2) {
			if (H > 1 && W > 1 && (gr == 0 || gr == H - 1 || gc == 0 || gc == W - 1)) {
				ans = true;
			} else {
				ans = search();
			}
		} else {
			ans = search();
		}
		System.out.println(ans ? "yes" : "no");
	}

	static boolean search() {
		HashSet<ArrayList<Point>> cur = new HashSet<>();
		ArrayList<Point> init = new ArrayList<>();
		for (int i = 0; i < H; ++i) {
			for (int j = 0; j < W; ++j) {
				if (F[i][j] == 'o') init.add(new Point(j, i));
			}
		}
		cur.add(init);
		for (int i = 0;; ++i) {
			HashSet<ArrayList<Point>> next = new HashSet<>();
			for (ArrayList<Point> st : cur) {
				if (System.currentTimeMillis() - startTime > 900) {
					break;
				}
				for (Point p : st) {
					for (int dir = 0; dir < 4; ++dir) {
						ArrayList<Point> moved = new ArrayList<>();
						Point mp = null;
						for (Point np : st) {
							moved.add(new Point(np.x, np.y));
							if (np.equals(p)) mp = moved.get(moved.size() - 1);
						}
						while (true) {
							int nx = mp.x + DC[dir];
							int ny = mp.y + DR[dir];
							if (nx < 0 || nx >= W || ny < 0 || ny >= H) {
								if (mp.x == gc && mp.y == gr) return true;
								break;
							}
							for (Point np : moved) {
								if (np == mp) continue;
								if (np.x == nx && np.y == ny) {
									if (mp.x == gc && mp.y == gr) return true;
									mp = np;
									break;
								}
							}
							mp.x = nx;
							mp.y = ny;
						}
						//						System.out.println(moved);
						Collections.sort(moved, (Point p1, Point p2) -> {
							if (p1.x != p2.x) return Integer.compare(p1.x, p2.x);
							return Integer.compare(p1.y, p2.y);
						});
						next.add(moved);
					}
				}
			}
			cur = next;
		}
		return false;
	}

}

Compiler output:
Main.java:103: error: unreachable statement
		return false;
		^
1 error
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.NoSuchElementException;

import java.util.Arrays;

public class AOJ_1600 {
	
	int N,nMin,nMax;
	public void solve() {
		while(true){
			N = nextInt();
			nMin = nextInt();
			nMax = nextInt();
			
			if(N + nMin + nMax == 0)break;
			
			int[] p = new int[N];
			
			for(int i = 0;i < N;i++){
				p[i] = nextInt();
			}
			
			int gap = 0;
			int num = 0;
			
			for(int i = nMin;i <= nMax;i++){
				if(gap <= p[i - 1] - p[i]){
					gap = p[i - 1] - p[i];
					num = i;
				}
			}
			
			out.println(num);
		}
	}
 
	public static void main(String[] args) {
		out.flush();
		new AOJ_1600().solve();
		out.close();
	}
 
	/* Input */
	private static final InputStream in = System.in;
	private static final PrintWriter out = new PrintWriter(System.out);
	private final byte[] buffer = new byte[2048];
	private int p = 0;
	private int buflen = 0;
 
	private boolean hasNextByte() {
		if (p < buflen)
			return true;
		p = 0;
		try {
			buflen = in.read(buffer);
		} catch (IOException e) {
			e.printStackTrace();
		}
		if (buflen <= 0)
			return false;
		return true;
	}
 
	public boolean hasNext() {
		while (hasNextByte() && !isPrint(buffer[p])) {
			p++;
		}
		return hasNextByte();
	}
 
	private boolean isPrint(int ch) {
		if (ch >= '!' && ch <= '~')
			return true;
		return false;
	}
 
	private int nextByte() {
		if (!hasNextByte())
			return -1;
		return buffer[p++];
	}
 
	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = -1;
		while (isPrint((b = nextByte()))) {
			sb.appendCodePoint(b);
		}
		return sb.toString();
	}
 
	public int nextInt() {
		return Integer.parseInt(next());
	}
 
	public long nextLong() {
		return Long.parseLong(next());
	}
 
	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

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

import java.util.Scanner;
public class Icpc2015A {
	public static void main(String args[]){
		int n,i,max,min,s,m_gap=0,gap=0;
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt();
		int data[] = new int[n];
		min = scan.nextInt();
		max = scan.nextInt();
		for(i=0;i<n;i++){
			data[i] = scan.nextInt();
		}
		for(i=min;i<=max;i++){
			s=data[i]-data[i-1];
			if(s<0){
				s=s*-1;
			}
			if(gap<s){
				gap=s;
				m_gap=i;
			}
		}
		System.out.println(m_gap);
	}
}

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

import java.util.Scanner;
public class Icpc2015A {
	public static void main(String args[]){
		int n,f=0,i,max,min,s,gap=0,m_gap=0;
		int flie[] = new int[10000];
		Scanner scan = new Scanner(System.in);
		while(true){
			gap = 0;
			n = scan.nextInt();
			int data[] = new int[n];
			for(i=0;i<n;i++){
				data[i]=0;
			}
			min = scan.nextInt();
			max = scan.nextInt();
			if(n==max && max==min){
				break;
			}
			for(i=0;i<n;i++){
				data[i] = scan.nextInt();
			}
			for(i=min;i<=max;i++){
				s=data[i]-data[i-1];
				if(s<0){
					s=s*-1;
				}if(gap<s){
					gap=s;
					flie[f]=i;
				}
			}
		f++;
		}
		for(i=0;i<f;i++){
			m_gap=flie[i];
			System.out.println(m_gap);
		}
	}
}

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

import java.util.Scanner;

public class Main2 {

	public static void main(String[] args) {
		solve();

	}

	public static void solve() {
		Scanner sc = new Scanner(System.in);

		while (true) {
			int num = sc.nextInt();
			int min = sc.nextInt();
			int max = sc.nextInt();

			if (num == 0 && min == 0 && max == 0) {
				break;
			}

			int[] Tensu = new int[num];
			for (int i = 0; i < num; i++) {
				Tensu[i] = sc.nextInt();
			}

			int passNum = max - min + 1;
			int[] Gap = new int[passNum];
			int ans = 0;
			int BL = 0;

			for (int j = min; j < max + 1; j++) {
				Gap[j - min] = Tensu[j - 1] - Tensu[j];
			}

			for (int k = 0; k < Gap.length; k++) {
				if (ans <= Gap[k]) {
					ans = Gap[k];
					BL = k;

				}

			}

			System.out.println(BL + min);
		}

	}
}

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

#include<stdio.h>
int main(void){
  int m ,min,max,mmax,i,j;
  int p[200];
  int gyap[200];
  while(1){
  scanf("%d%d%d",&m,&min,&max);
  if(m==0&&min==0&&max==0)
    break;
  for(i=0;i<m;i++)
    scanf("%d",p[i]);
  for(i=0;i<(max-min+1);i++){
    gyap[i]=p[min+i]-p[min+1+i];
  }
  mmax=gyap[0];
  for(i=1;i<(max-min+1);i++){
    for(mmax<gyap[i])
      mmax=gyap[i];
  }
  for(i=0;i<(max-min+1);i++){
    if(mmax==gyap[i])
      j=i;
  }
  printf("%d\n",min+j);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:21: error: expected ';' before ')' token
   17 |     for(mmax<gyap[i])
      |                     ^
      |                     ;
main.c:17:21: error: expected expression before ')' token