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

#include <iostream>
#include <iomanip>
#include <cmath>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
double M_PI = acos(-1);
const double EPS = 1e-10;
const double INF = 1e9;
using namespace std;

int N,M,L;

struct Point{
    double x,y;
    Point operator - (const Point& p){ return Point{x-p.x,y-p.y};}
};

struct Segment{
    Point p1,p2;
};

double norm(Point a){return a.x*a.x+a.y*a.y;}
double abs(Point a){return sqrt(norm(a));}
double dot(Point a, Point b){return a.x * b.x + a.y * b.y;}
double cross(Point a,Point b){return a.x*b.y - a.y*b.x;}

int ccw(Point p1,Point p2,Point p3){
    Point a = {p2.x-p1.x, p2.y - p1.y};
    Point b = {p3.x-p1.x, p3.y - p1.y};
    if(cross(a,b) > EPS) return 1;
    if(cross(a,b) < -EPS) return -1;
    if(dot(a,b) < -EPS) return 2;
    if(norm(a) < norm(b)) return -2;
    return 0;
}

bool intersect(Point p1, Point p2, Point p3, Point p4){
    return ccw(p1,p2,p3)*ccw(p1,p2,p4) <= 0 && ccw(p3,p4,p1)*ccw(p3,p4,p2) <= 0;
}

bool intersect(Segment s1, Segment s2){
    return intersect(s1.p1,s1.p2, s2.p1, s2.p2);
}

double getDistSP(Segment s, Point p){
    if(dot(s.p2 - s.p1, p - s.p1) < -EPS) return abs(p - s.p1);
    if(dot(s.p1 - s.p2, p - s.p2) < -EPS) return abs(p - s.p2);
    return abs(cross(s.p2 - s.p1, p - s.p1) / abs(s.p2 - s.p1));
}
    

Segment star[102][5];
double mindist[102][102];



double getdist(int u, int v){
    REP(i,5){
        REP(j,5){
            if(intersect(star[u][i],star[v][j])){
                    return 0;
            }
        }
    }
    double ans = INF;
    REP(k,2){
        if(k) swap(u,v);
        REP(i,5){
            REP(j,5){
                ans = min(getDistSP(star[u][i],star[v][j].p1),ans);
            }
        }
    }
    return ans;
}

int main(){
    while(cin>>N>>M>>L,N){
        REP(i,N){
            int x,y,a,r;
            cin>>x>>y>>a>>r;
            Point p[5];
            REP(j,5) p[j] = Point{x + r*sin((double)(72*j - a)/180*M_PI), y + r*cos((double)(72*j - a)/180*M_PI)};//star's vertex
            REP(j,5){
                star[i][j] = Segment{p[j], p[(j+2)%5]};
            }
        }

        //caluculate min distance
        REP(i,N){
            FOR(j,i,N){
                mindist[i][j] = mindist[j][i] = getdist(i,j);
            }
        }

        //WF        
        REP(k,N){
            REP(i,N){
                REP(j,N){
                    mindist[i][j] = min(mindist[i][j], mindist[i][k] + mindist[k][j]);
                }
            }
        }
        cout << fixed << setprecision(8) << mindist[M-1][L-1] << endl;
    }
}

Compiler output:
In file included from /usr/include/c++/14/cmath:47,
                 from a.cc:3:
a.cc:6:8: error: expected unqualified-id before numeric constant
    6 | double M_PI = acos(-1);
      |        ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; i++ )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
int dx[4]={1,0,-1,0} , dy[4]={0,1,0,-1} ;

const double eps=1e-10;
double add(double a,double b){
    if(abs(a+b)<eps*(abs(a)+abs(b)))return 0;
    return a+b;
}

typedef pair<double,double> P;
P operator+(const P& x,const P& y){
    return {add(x.first,y.first),add(x.second,y.second)};
}

P operator-(const P& x,const P& y){
    return {add(x.first,-y.first),add(x.second,-y.second)};

}

P operator*(const P& x,const double& y){
    return {x.first*y,x.second*y};
}
double dot(P x,P y){
    return add(x.first*y.first,x.second*y.second);


}

double det(P x,P y){
    return add(x.first*y.second,-x.second*y.first);
}

bool onseg(P p1,P p2,P q){
    return det(p1-q,p2-q)==0 &&dot(p1-q,p2-q)<=0; 
}

P intersection(P p1,P p2,P q1,P q2){
    return p1+(p2-p1)*(det(q2-q1,q1-p1)/det(q2-q1,p2-p1));
}

bool cross(P p1,P p2,P q1,P q2){
    if(det(p1-p2,q1-q2)==0)return onseg(p1,p2,q1)||onseg(p1,p2,q2)||onseg(q1,q2,p1)||onseg(q1,q2,p2);
    P ret=intersection(p1,p2,q1,q2);
    return onseg(p1,p2,ret)&&onseg(q1,q2,ret);
}

double dist(P p1,P p2,P q){
    if(dot(q-p1,p2-p1)<=0)return sqrt(dot(q-p1,q-p1));
    if(dot(q-p2,p1-p2)<=0)return sqrt(dot(q-p2,q-p2));
    P d=p1-p2;
    P ret=q+P{d.second,-d.first};
    P h=intersection(p1, p2, q, ret);
    return sqrt(dot(q-h,q-h));
}

const double pi=acos(-1);
int main(){
    int n,s,t;
    vector<double> ans;
    while(cin>>n>>s>>t){
        if(n==0)break;
        P x[n][5];
        rep(i,n){
            P c;
            cin>>c.first>>c.second;
            double a,b;
            cin>>a>>b;
            a*=pi/180;
            rep(j,5){
                P y;
                y={-sin(a+2.0/5.0*j*pi),cos(a+2.0/5.0*j*pi)};
                x[i][j]=c+y*b;
            }
        }
        double d[n][n];
        rep(i,n)rep(j,n)d[i][j]=inf;
        rep(i,n)d[i][i]=0;
        rep(i,n)rep(j,n){
            if(i==j)continue;
            rep(k,5)rep(l,5){
                d[i][j]=min(d[i][j],dist(x[i][k],x[i][(k+2)%5],x[j][l]));
                if(cross(x[i][k],x[i][(k+2)%5],x[j][l],x[j][(l+2)%5]))d[i][j]=0;
            }
        }
        rep(i,n)rep(j,n)d[i][j]=min(d[i][j],d[j][i]);
        rep(i,n)rep(j,n)rep(k,n)d[j][k]=min(d[j][k],d[i][j]+d[i][k]);
        cout<<fixed<<setprecision(12)<<d[m-1][l-1]<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:106:42: error: 'm' was not declared in this scope
  106 |         cout<<fixed<<setprecision(12)<<d[m-1][l-1]<<endl;
      |                                          ^
a.cc:106:47: error: 'l' was not declared in this scope
  106 |         cout<<fixed<<setprecision(12)<<d[m-1][l-1]<<endl;
      |                                               ^
Language: C++

#include <cstdio>
#include <iostream>
#include <vector>
#include <functional>
#include <numeric>
#include <string>
#include <iterator>
#include <sstream>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <complex>
#include <cmath>

using namespace std;

int N,M,L;

typedef complex<double> P;

P pt[101][5];
double dp[101][101];

const double pi = 3.1415926535897932384626;

double cross(P x, P y){
	return x.real() * y.imag() - x.imag() * y.real();
}

double dot(P x, P y){
	return x.real() * y.real() + x.imag() * y.imag();
}

bool intersep(P l1,P l2,P r1, P r2){
	if(cross(l2 - l1,r1 - l1) * cross(l2 - l1,r2 - l1) < 0){
		if(cross(r2 - r1,l1 - r1) * cross(r2 - r1, l2 - r1) < 0)
			return true;
	}

	return false;
}

double get_len(P p, P l1, P l2){
	if(dot(p-l1,l2-l1) <= 0) return abs(p - l1);
	if(dot(p-l2,l1-l2) <= 0) return abs(p - l2);
	double cr = cross(p-l1,l2-l1);
	return (abs(cr) / abs(l2-l1));
}

double get_min(int m,int n){
	if(m==n) return 0;
	double mn = INT_MAX;
	for (int i = 0; i < 5; i++){
		for (int j = 0; j < 5; j++){
			if(intersep(pt[m][i],pt[m][(i + 2)% 5], pt[n][j], pt[n][(j + 2) % 5])){
				return 0.0;
			}
			mn = min(mn,get_len(pt[n][j],pt[m][i],pt[m][(i + 2)% 5]));
			mn = min(mn,get_len(pt[m][i],pt[n][j], pt[n][(j + 2) % 5]));
		}
	}
	return mn;
}

int main()
{
	while(cin>>N>>M>>L,(N||M||L)){
		for (int i = 0; i < N; i++){
			double x,y,a,r;cin>>x>>y>>a>>r;
			for (int j = 0; j < 5; j++){
				double alpha = (18 + a + 72 * j)/ 180.0 * pi;
				double s = sin(alpha);
				double c = cos(alpha);
				P add = P(r,0.0) * P(c,s);
				pt[i][j] = P(x,y) + add;
			}
		}

		for(int i = 0; i < N; i++){
			for (int j = 0; j < N; j++){
				dp[i][j] = get_min(i,j);
			}
		}

		for (int i = 0; i < N; i++){
			for (int j = 0; j < N; j++){
				for (int k = 0; k < N; k++){
					dp[i][j] = min(dp[i][j],dp[i][k] + dp[k][j]);
				}
			}
		}

		printf("%.20lf\n",dp[M - 1][L - 1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'double get_min(int, int)':
a.cc:53:21: error: 'INT_MAX' was not declared in this scope
   53 |         double mn = INT_MAX;
      |                     ^~~~~~~
a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   14 | #include <cmath>
  +++ |+#include <climits>
   15 |
Language: C++

#include <iostream>
#include<string>
#include <complex>
#include<list>
#include<float.h>
#include <functional>
#include <vector>
#include <map>
#include <queue>
#include <pair.h>

using namespace std;
typedef complex<double> P;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define REP0(i,n)   REP(i,0,n)
#define foreach(it,o) for(__typeof((o).begin()) it=(o).begin(); it!=(o).end(); ++it)
bool operator <(const P& a, const P& b) {
	return abs(a) < abs(b);
}

int N, M, L;

double dot(P a, P b) {
	return real(conj(a) * b);
}
double cross(P a, P b) {
	return imag(conj(a) * b);
}

int ccw(P a, P b, P c) {
	b -= a;
	c -= a;
	if (cross(b, c) > DBL_EPSILON)
		return 1;
	if (cross(b, c) < -DBL_EPSILON)
		return -1;
	if (dot(b, c) < -DBL_EPSILON)
		return 2;
	if (norm(b) < norm(c) - DBL_EPSILON)
		return 2;
	return 0;
}

bool isIntersectSS(P a1, P a2, P b1, P b2) {
	return ccw(a1, a2, b1) * ccw(a1, a2, b2) <= 0
			&& ccw(b1, b2, a1) * ccw(b1, b2, a2) <= 0;
}

double DistanceSP(P a, P b, P c) {
	if (dot(b - a, c - a) < DBL_EPSILON)
		return abs(c - a);
	if (dot(a - b, c - b) < DBL_EPSILON)
		return abs(c - b);
	return abs(cross(b - a, c - a));
}
double DistaiceSS(P a, P b, P c, P d) {
	if (isIntersectSS(a, b, c, d)) {
		return 0.0;
	}
	return min(min(DistanceSP(a, b, c), DistanceSP(a, b, d)),
			min(DistanceSP(c, d, a), DistanceSP(c, d, b)));
}

vector<vector<double> > links;

struct Star {
	P p;
	int a;
	int r;
	Star(P p, int a, int r) :
			p(p), a(a), r(r) {
		initVertex();
	}
	vector<P> vertex;
private:
	void initVertex() {
		for (int i = 0; i < 5; i++) {
			double theta = M_PI / 2 + 2 * i * M_PI / 5 + a * M_PI / 180;
			vertex.push_back(
					P(p.real() + r * cos(theta), p.imag() + r * sin(theta)));
		}
	}
};

double getLength(Star p1, Star p2) {
	double m = DBL_MAX;
	foreach(a1,p1.vertex)
		foreach(a2,p1.vertex)
			foreach(b1,p2.vertex)
				foreach(b2,p2.vertex) {
					m = min(m, DistaiceSS(*a1, *a2, *b1, *b2));
				}
	return m;
}
int x, y, a, r;

double dijk(int start, int goal) {
	vector<double> memo(N, DBL_MAX);
	priority_queue<pair<double,int> > up;
	up.push(make_pair(0, start));
	memo[start] = 0;
	while (!up.empty()) {
		double cost = -up.top().first;
		int pos = up.top().second;

		up.pop();
		if (memo[pos] < cost)
			continue;
		if (pos == goal)
			return cost;
		REP0(next,N) {
			if (links[pos][next] >= 0) {
				double ncost = cost + links[pos][next];
				if (memo[next] > ncost) {
					memo[next] = ncost;
					up.push(make_pair(-ncost, next));
				}
			}
		}
	}
	return -1;
}

int main() {
	while (true) {
		cin >> N >> M >> L;
		if (N == 0 && M == 0 && L == 0) {
			break;
		}
		links.clear();
		vector<Star> stars;

		for (int i = 0; i < N; i++) {
			cin >> x >> y >> a >> r;
			stars.push_back(Star(P(x, y), a, r));
		}
		for (int i = 0; i < N; i++) {
			vector<double> ld;
			for (int j = 0; j < N; j++) {
				ld.push_back(getLength(stars[i], stars[j]));
			}
			links.push_back(ld);
		}
		cout << dijk(M - 1, L - 1) << endl;
	}
}

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

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
#include<numeric>
#include<queue>
#include<stack>
#include<cmath>
#include<complex>
#define INF 10000000.0
#define pb push_back
using namespace std;
#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0; i<(int)(n); i++)
typedef __int64 ll;
typedef complex<double> Point;
typedef pair<double ,int > P;
const double PI=4*atan(1);
vector<vector<Point> > p;
int n,s,g;
double dot(Point a, Point b){
    return real( conj(a) * b );
}
double cross(Point a, Point b){
    return imag( conj(a) * b );
}
double distance_ls_p(Point a, Point b, Point c) {
  if ( dot(b-a, c-a)<=0 ) return abs(c-a);
  if ( dot(a-b, c-b)<=0 ) return abs(c-b);
  return abs(cross(b-a, c-a)) / abs(b-a);
}
double cal(int a,int b){
	double ret=INF;
	for(int i=0;i<5;i++){
		for(int j=i+1;j<5;j++){
			for(int k=0;k<5;k++){
				//cout<<distance_ls_p(p[a][i],p[a][j],p[b][k])<<endl;
				//cout<<distance_ls_p(p[b][i],p[b][j],p[a][k])<<endl;
				double u=distance_ls_p(p[a][i],p[a][j],p[b][k]),v=distance_ls_p(p[b][i],p[b][j],p[a][k]);
				if(ret>u)
				ret=u;
				if(ret>v)
				ret=v;
			}
		}
	}
	//cout<<ret<<endl;
	return ret;
}



int main(){
	while(cin>>n>>s>>g,n||s||g){
		p.clear();
		p.resize(n);
		for(int i=0;i<n;i++){
			double x,y,a,r;
			Point pot;
			cin>>x>>y>>a>>r;
			Point c=Point(x,y);
			for(int j=0;j<5;j++){
				p[i].pb(c+polar(r,PI*(a+(double)j*72.0+90.0)/180.0));
			}
		}
		//cout<<"      "<<distance_ls_p(p[0][4],p[0][1],p[2][2])<<endl;

		
		vector<vector<double> > cost(n,vector<double>(n,INF));
		
		for(int i=0;i<n;i++){
			for(int j=i+1;j<n;j++){
				double a=cal(i,j);
				cost[i][j]=a;
				cost[j][i]=a;
			}
		}
		/*
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				cout<<cost[i][j]<<" ";
			}
			cout<<endl;
		}*/
		
		priority_queue<P,vector<P>,greater<P> > que;
		que.push(P(0,s-1));
		vector<double> d(n,INF);
		d[s-1]=0;
		while(!que.empty()){
			P q=que.top();
			int pos=q.second;
			double dist=q.first;
			que.pop();
			if(pos==g-1){
				printf("%.8lf\n",dist);
				break;
			}
			if(dist>d[pos]){
				continue;
			}
			for(int i=0;i<n;i++){
				
				if(cost[pos][i]==INF){
					continue;
				}
				if(cost[pos][i]+dist<d[i]){
					que.push(P(cost[pos][i]+dist,i));
					d[i]=cost[pos][i]+dist;
				}
				
				
			}
		}
		
	}
	return 0;
}

Compiler output:
a.cc:16:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   16 | typedef __int64 ll;
      |         ^~~~~~~
      |         __int64_t
Language: Java

public class Main {

	int n;

	class Country{
		int id;
		int string;
		long enemy;
		List<String> Node=new ArrayList<String>();

		public void parseNode(){
			enemy=0L;
			for(String node:Node){
				enemy+=(1<<nametoId.get(node));
			}
		}
	}

	HashMap<String,Integer> nametoId;

	public void run(){
		Scanner sc=new Scanner(System.in);
		while(true){
			n=sc.nextInt();
			nametoId=new HashMap<String, Integer>();
			if(n==0){
				break;
			}
			Country[] colist=new Country[n];


			for(int i=0;i<n;i++){
				colist[i]=new Country();
				String name=sc.next();
				int string=sc.nextInt();
				if(!nametoId.containsKey(name)){
					nametoId.put(name,nametoId.size());
				}
				colist[i].id=i;
				colist[i].string=string;

				int links=sc.nextInt();

				for(int j=0;j<links;j++){
					String name1=sc.next();
					colist[i].Node.add(name1);
				}
			}

			for(Country c :colist){
				c.parseNode();
			}
			//BitSet dp=new BitSet(n);

			Set<Long> dp=new HashSet<Long>();
			dp.add(1L);
			int res=0;
			for(int i=0;i<n;i++){
				if(colist[i].enemy==0){
					res+=colist[i].string;
					continue;
				}
				Set<Long> tmp=new HashSet<Long>();
				for(long d:dp){
					long nxtmap=d+(1<<i);
					if((colist[i].enemy & nxtmap)==0){
						tmp.add(nxtmap);
					}else{
					}
				}
				dp.addAll(tmp);
			}
			int max=0;
			for(long d:dp){
				int i=0;
				int val=0;
				while(d>0){
					if(d%2==1){
						val+=colist[i].string;
					}
					d/=2;
					i++;
				}
				max=Math.max(val,max);
			}
			pr(max+res);
		}
	}




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

	public static void pr(Object o) {
		System.out.println(o);
	}
}

Compiler output:
Main.java:93: error: as of release 9, '_' is a keyword, and may not be used as an identifier
	public static void main(String[] _) throws Exception {
	                                 ^
1 error
Language: C++

//#include"bits/stdc++.h"

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

using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
//#define int long long
using vi=vector<int>;
using vvi=vector<vi>;

//#define INF 0x3f3f3f3f


const int MAX = 1 << 21;
int cost[MAX], dp[MAX];
bool indx[MAX], indy[MAX];

bool E[41][41];

signed main() {

	for (int N; cin >> N && N;) {
		vector<string> A(N);
		vector<int> B(N), C(N);
		vector<vector<string>> D(N);
		memset(E, 0, sizeof(E));

		rep(i, 0, N) {
			cin >> A[i] >> B[i] >> C[i];
			D[i].assign(C[i], "");
			rep(j, 0, C[i]) {
				cin >> D[i][j];
			}
		}

		map<string, int> id;
		rep(i, 0, N)id[A[i]] = i;

		rep(i, 0, N)rep(j, 0, C[i]) {
			E[i][id[D[i][j]]] = true;
		}

		//rep(i, 0, N)rep(j, 0, N) {
		//	cerr << i << " " << j << " E:" << E[i][j] << endl;
		//}

		if (N == 1) {
			cout << B[0] << endl;
		}
		else {
			int n = N / 2;
			int NX = 1 << n;
			int NY = 1 << (N - n);

			memset(indx, 1, sizeof(indx));
			memset(indy, 1, sizeof(indy));

			rep(i, 0, n)rep(j, 0, n) {
				if (E[i][j]) {
					indx[(1 << i) | (1 << j)] = false;
				}
			}
			rep(mask, 0, NX) {
				if (indx[mask])continue;
				rep(i, 0, n) {
					indx[mask | (1 << i)] = false;
				}
			}
			rep(i, 0, N - n)rep(j, 0, N - n) {
				if (E[i + n][j + n]) {
					indy[(1 << i) | (1 << j)] = false;
				}
			}
			rep(mask, 0, NY) {
				if (indy[mask])continue;
				rep(i, 0, N - n) {
					indy[mask | (1 << i)] = false;
				}
			}

			memset(cost, 0, sizeof(cost));
			rep(mask, 0, NY) {
				// ある頂点を追加して
				rep(i, 0, N - n) {
					if ((mask >> i) & 1)
						continue;

					int nmask = mask | (1 << i);

					if (indy[nmask])
						cost[nmask] = max(cost[nmask], cost[mask] + B[i + n]);
					else
						cost[nmask] = max(cost[nmask], cost[mask]);
				}
			}

			memset(dp, 0, sizeof(dp));
			rep(i, 0, n) {
				int maska = 1 << i;
				int maskb = 0;
				rep(j, 0, N - n) {
					if (E[i][j + n])
						maskb |= 1 << j;
				}
				dp[maska] = maskb;
			}
			rep(mask, 0, NX) {
				rep(i, 0, n) {
					if ((mask >> i) & 1)
						continue;
					dp[mask | (1 << i)] |= dp[mask];
				}
				//cerr << bitset<4>(mask) << " " << bitset<4>(dp[mask]) << endl;
			}

			int ans = 0;
			rep(mask, 0, NX) {
				if (!indx[mask])continue;
				if (!(mask & 1))continue; // 自国

				int cost_a = 0;
				int x = (1 << (N - n)) - 1;
				x -= dp[mask];

				rep(i, 0, n) {
					if ((mask >> i) & 1) {
						cost_a += B[i];
					}
				}

				ans = max(ans, cost_a + cost[x]);

			}

			cout << ans << endl;
		}
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'memset' was not declared in this scope
   31 |                 memset(E, 0, sizeof(E));
      |                 ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include<algorithm>
  +++ |+#include <cstring>
    8 |
Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"

int ans = 0;
int N;
vector<int>rests;

void getans(const int sum,const int now, const vector < pair<int, vector<int>>>&connects, vector<int>&oks) {
	if (now == N)ans =max(ans, sum);
	else {
		//if (sum + rests[now] < ans)return;
		if (oks[now]) {
			vector<int>preoks(oks);
			preoks[now] = false;
			for (auto e : connects[now].second) {
				preoks[e] = false;
			}
			getans(sum + connects[now].first, now+1, connects, preoks);
			
		}
		if (now) {

			getans(sum, now + 1, connects, oks);
		}
	}
}
int main() {
	while (1) {
		cin >> N;
		if (!N)break;
		ans = 0;
		rests.clear();
		rests.resize(N);
		if (!N)break;
		map<string, int>mp;
		vector<pair<int,vector<int>>>connects(N);
		int num = 0;
		for (int i = 0; i < N; ++i) {
			string name; int b, c; cin >> name >> b >> c;
			if (mp.find(name) == mp.end()) {
				mp[name] = num;
				num++;
			}
			int myid = mp[name];
			connects[myid].first = b;a
			for (int j = 0; j < c; ++j) {
				string st; cin >> st;
				if (mp.find(st) == mp.end()) {
					mp[st] = num;
					num++;
				}
				int opid = mp[st];

				connects[mp[name]].second.emplace_back(opid);
			}
		}
		//sort(connects.begin(), connects.end());
		//reverse(connects.begin(), connects.end());
		rests[N - 1] = connects[N - 1].first;
		for (int i = N - 2; i >= 0; --i) {
			rests[i] = rests[i + 1] + connects[i].first;
		}

		vector<int>oks(N, true);
		getans(0, 0, connects, oks);
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:50: error: 'a' was not declared in this scope
   54 |                         connects[myid].first = b;a
      |                                                  ^
a.cc:55:41: error: 'j' was not declared in this scope
   55 |                         for (int j = 0; j < c; ++j) {
      |                                         ^
Language: C++

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

int n;
int ans;
int bs[114514];
int cs[114514];
char buf[114514];
bool used[114514];
string as[114514];
vector<int> es[114514];
vector<string> ds[114514];
map<string, int> rev;

void calc(int v, int sum) {
  if (v >= n) {
    ans = max(ans, sum);
    return;
  }

  if (!used[v]) {
    vector<int> restores;
    used[v] = true;
    for (int i=0; i<cs[v]; i++) {
      int u = es[v][i];
      if (!used[u]) {
        used[u] = true;
        restores.emplace_back(u);
      }
    }
    calc(v+1, sum+bs[v]);
    for (int u : restores) used[u] = false;
  } 
  calc(v+1, sum);
}

int main() {
  while (1) {
    scanf("%d", &n);
    if (n == 0) return 0;
    rev.clear();
    for (int i=0; i<n; i++) {
      scanf(" %s", buf);
      as[i] = buf;
      rev[as[i]] = i;
      scanf("%d", &bs[i]);
      scanf("%d", &cs[i]);
      ds[i].resize(cs[i]);
      for (int j=0; j<cs[i]; j++) {
        scanf(" %s", buf);
        ds[i][j] = buf;
      }
    }
  
    for (int i=0; i<n; i++) {
      es[i].resize(cs[i]);
      for (int j=0; j<cs[i]; j++) {
        es[i][j] = rev[ds[i][j]];
      }
    }

    int pre = bs[0];
    used[0] = true;
    for (int u : es[0]) {
      vs.erase(u)
      used[u] = true;
    }

    for (int i=1; i<n; i++) {
      if (used[u]) continue;
      if (cs[i] == 0 || (cs[i] == 1 && bs[i] >= bs[es[i][0]])) {
        pre += bs[i];
        used[i] = true;
        for (int u : es[i]) {
          used[u] = true;
        }
      }
    }
  
    ans = 0;
    calc(vs, pre);
    printf("%d\n", ans);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:7: error: 'vs' was not declared in this scope; did you mean 'es'?
   65 |       vs.erase(u)
      |       ^~
      |       es
a.cc:70:16: error: 'u' was not declared in this scope
   70 |       if (used[u]) continue;
      |                ^
a.cc:81:10: error: 'vs' was not declared in this scope; did you mean 'es'?
   81 |     calc(vs, pre);
      |          ^~
      |          es
Language: C++

7
INTERCAL 10 3 Chef Piet COW
Chef 7 3 INTERCAL Piet COW
Piet 6 2 INTERCAL Chef
COW 7 2 INTERCAL Chef
J 6 1 A
A 12 1 J
Grass 0 0
7
Qin 105 4 Zhao Wei Han Chu
Zhao 81 4 Qin Wei Qi Yan
Wei 70 5 Qin Zhao Han Qi Chu
Han 45 3 Qin Wei Chu
Qi 79 4 Zhao Wei Chu Yan
Chu 102 4 Qin Wei Han Qi
Yan 53 2 Zhao Qi
14
Magadha 98 8 Macedonia Kalinga Surashtra Ashmaka Kantala Andhra Gangaridai Kamapura
Macedonia 79 2 Magadha Surashtra
Kalinga 51 2 Magadha Andhra
Surashtra 13 3 Magadha Macedonia Ashmaka
Ashmaka 11 3 Magadha Surashtra Kantala
Kantala 12 3 Magadha Ashmaka Andhra
Andhra 14 3 Magadha Kantala Kalinga
Cholas 15 3 Cheras Pandyas Anuradhapuras
Cheras 8 2 Cholas Pandyas
Pandyas 10 3 Cholas Cheras Anuradhapuras
Anuradhapuras 7 2 Cholas Pandyas
Gangaridai 20 3 Magadha Kamapura Arakan
Kamapura 18 2 Magadha Gangaridai
Arakan 7 1 Gangaridai
0


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

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

typedef long long ll;

int pw[50],N;

class UnionFind {
public:
  vector<int> data;
  UnionFind(int size) : data(size, -1) { }
  bool unionSet(int x, int y) {
    x = root(x); y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y]; data[y] = x;
    }
    return x != y;
  }
  bool findSet(int x, int y) {
    return root(x) == root(y);
  }
  int root(int x) {
    return data[x] < 0 ? x : data[x] = root(data[x]);
  }
  int size(int x) {
    return -data[root(x)];
  }
};

class Edge
{
public:
	int src, dst;
	Edge(int src, int dst)
	:src(src),dst(dst)
	{}
};

typedef vector<vector<Edge> > Graph;

ll paint[40], rest[40];
ll relt;

ll dfs(int p, ll used, ll score, Graph& g, vector<int>& group)
{	
	if(p==group.size()) return score;
	if(used >> group[p] & 1) return dfs(p+1, used, score, g, group);
	if(score + rest[group[p]] <= relt) return 0;

	ll res = score;
	ll tmp = used | paint[group[p]];
	res = max(res, dfs(p+1, tmp, score+pw[group[p]], g, group));
	res = max(res, dfs(p+1, used, score, g, group));
	
	relt = max(res, relt);
	return res;
}

int main()
{
	while(cin >> N, N) {
		memset(rest, 0, sizeof(rest));

		cerr << N << endl;
		int gcnt = 0;
		map<string, int> dic;
		Graph graph(N);
		UnionFind uf(N);

		for(int i=0; i<N; i++) {
			string src;
			cin >> src;

			if(!dic.count(src)) dic[src] = gcnt++;
			int s = dic[src];

			cin >> pw[s];
	
			int M;
			cin >> M;
			
			for(int i=0; i<M; i++) {
				string dst;
				cin >> dst;
				
				if(!dic.count(dst)) dic[dst] = gcnt++;
				int t = dic[dst];

				graph[s].push_back(Edge(s,t));
				uf.unionSet(s,t);
			}
		}

		for(int i=0; i<N; i++) {
			paint[i] = (1LL << i);
			for(int j=0; j<graph[i].size(); j++) {
				paint[i] |= (1LL << graph[i][j].dst);
			}
		}

		vector<vector<int> > groups(N);

		for(int i=0; i<N; i++) {
			groups[uf.root(i)].push_back(i);
			rest[uf.root(i)] += pw[i];
		}

		for(int i=0; i<groups.size(); i++) {
			for(int j=1; j<groups[i].size(); j++) {
				rest[groups[i][j]] = rest[groups[i][j-1]] - pw[groups[i][j-1]];
			}
		} 

		ll res = pw[0];
		ll init = paint[0];
		for(int i=0; i<groups.size(); i++) {
			if(groups[i].size() == 0) continue;
			relt = 0;
			res += dfs(0, init, 0, graph, groups[i]);
		} 

		cout << res << endl;
	}
}

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

#include <iostream>
#include <queue>
#include <cstring>
#include <cstdlib>
#include <algorithm>

using namespace std;

int N, G[42][42];
string C[42];

#define UNION 1
#define NEIGHBOR 2

struct Union{
	string A;
	int B,C;
	int D[42];
	queue<string> S;
} 	U[42];

class UnionSearch{
public:
	int State[42], B;
	UnionSearch::UnionSearch();
	void UnionSearch::AddUnion(int u);
};

UnionSearch::UnionSearch(){
	B=0;
	for(int i=1;i<=N;i++) State[i]=0;
}

void UnionSearch::AddUnion(int u){
	State[u] = UNION;
	for(int i=0;i<U[u].C;i++) State[ U[u].D[i] ] = NEIGHBOR;
	B += U[u].B;
}


queue <UnionSearch> US;


int Find(string s){
	for(int i=1;i<=N;i++) if(s==U[i].A) return i;
	printf("error");
	return 0;
}

main(){
	int i,j,k,c,Max;
	string s;
	while(cin>>N,N){
	//	US.clear();
		Max = 0;
		for(i=1;i<=N;i++){
			cin>>U[i].A>>U[i].B>>c;
			while(c--){
				cin>>s;
				U[i].S.push(s);
			}
		}

		for(i=1;i<=N;i++){
			while(!U[i].S.empty()){
				U[i].D[U[i].C++] = Find(U[i].S.front());
				U[i].S.pop();
			}
		}
		

		UnionSearch q;
		q.AddUnion(1);
		US.push(q);
		while(!US.empty()){
			q = US.front();
			US.pop();
			int t;
			for(t=1;t<=N;t++){
				if(!q.State[t])break;
			
			}
			if(t>N){
				Max = max(Max, q.B);
				continue;
			}
			for(i=0;i<U[t].C;i++){
				UnionSearch p = q;
				if(p.State[U[t].D[i]]) continue;
				p.AddUnion(U[t].D[i]);
				US.push(p);
			}
			q.AddUnion(t);
			US.push(q);
		}
		cout << Max << endl;
	}
}

Compiler output:
a.cc:25:9: error: extra qualification 'UnionSearch::' on member 'UnionSearch' [-fpermissive]
   25 |         UnionSearch::UnionSearch();
      |         ^~~~~~~~~~~
a.cc:26:14: error: extra qualification 'UnionSearch::' on member 'AddUnion' [-fpermissive]
   26 |         void UnionSearch::AddUnion(int u);
      |              ^~~~~~~~~~~
a.cc:50:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   50 | main(){
      | ^~~~
Language: C++

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

int Cc;

char Name[40][20];
char NearS[40][40][20];
bool Near[40][40];
bool ally[40];
int Power[40];
int n, t;
int Max_Power;

void make_ally(bool ally1[40], int name, int power){
	int i,j;
	bool ally2[40];
	memcpy(ally2,ally1,sizeof(ally));

	ally2[name] = 1;
	power += Power[name];

	for(i=0;i<n;i++){
		if(Near[name][i]){
			ally2[i]=1;
		}
	}

 for(i=name;i<n;i++){
		if(!ally2[i]){
			for(j=name;j<n;j++){
				if(!ally2[j] && Near[j][i]) break;
			}
			if(j==n){
				ally2[i] = 1;
				power += Power[i];
			}
		}
	}

	if(power > Max_Power) Max_Power = power;

	for(i=name;i<n;i++)
		if(!ally2[i]) make_ally(ally2, i, power);

	return;
}
int search(char *name){
	int i;
	for(i=0;i<Cc;i++) if(!strcmp(name, Name[i])) return i;
	printf("%s\n", name);
	return 0;
}

int main(){
	int j, i;
	while(cin >> n, n){
		memset(Name, 0, sizeof(Name));
		memset(Near, 0, sizeof(Near));
		memset(NearS, 0, sizeof(NearS));
		memset(Power, 0, sizeof(Power));
		memset(ally, 0, sizeof(ally));
		Max_Power=0; Remain_Power=0;

		for(Cc=0;Cc<n;Cc++){
			cin >> Name[Cc] >> Power[Cc] >> t;
			Remain_Power += Power[Cc];

			for(i=0;i<t;i++) cin >> NearS[Cc][i];
		}
		for(i=0;i<n;i++){
			for(j=0;NearS[i][j][0];j++){
				Near[i][search(NearS[i][j])] = 1;
//				printf("%d-%d\n", i, search(NearS[i][j]));
			}
		}
		make_ally(ally, 0, 0);
		cout<<Max_Power<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:30: error: 'Remain_Power' was not declared in this scope; did you mean 'Max_Power'?
   63 |                 Max_Power=0; Remain_Power=0;
      |                              ^~~~~~~~~~~~
      |                              Max_Power
Language: C++

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

map<string,int> dictionary;

int dic(string name){
	if( dictionary.count(name) ) return dictionary[name];
	else{
		int t = dictionary.size();
		return dictionary[name] = t;
	}
}

vector<int> g[40];
int P[40];

int dmg[40]={};
int deg[40]={};
int cover[40] = {};

void cCover(int x,int v){
	cover[x]+= v;
	for(int i = 0; i < g[x].size() ; i++){
		if( cover[g[x][i]] == 0 ){
			deg[g[x][i]]--;
			deg[x]--;
			dmg[g[x][i]] -= P[x];
			dmg[x] -= P[g[x][i]];
		}
		cover[g[x][i]] += v;
		if( cover[g[x][i]] == 0 ){
			deg[g[x][i]]++;
			deg[x]++;
			dmg[g[x][i]] += P[x];
			dmg[x] += P[g[x][i]];			
		}
	}
}

int n;
int maximum = 0;
int current = 0;

int dfs(){
	int allsum = 0;
	vector< pair<int,int> > good;
	for(int i = 0 ; i < n ; i++){		
		if( cover[i] == 0 ){
			allsum += P[i];
			good.push_back(make_pair(dmg[i],i));
		}
	}
	
	if( current+allsum <= maximum ){
		return 0;
	}else{
		maximum = max(current,maximum);
	}
	sort(good.begin(),good.end());
	for(int i = 0 ; i < good.size() ; i++){
		cCover(good[i].second,1);
		current += P[good[i].second];
		dfs();
		current -= P[good[i].second];
		cCover(good[i].second,-1);
	}
	
}

int main(){
	while(cin >> n && n){
		dictionary.clear();
		for(int i = 0 ; i < 40 ; i++){
			g[i].clear();
			dmg[i] = 0;
			deg[i] = 0;
		}
		
		for(int i = 0 ; i < n ; i++){
			string name;
			int power,num;
			cin >> name >> power >> num;
			P[dic(name)] = power;
			deg[dic(name)] = num;
			for(int j = 0 ; j < num ; j++){
				string connect;
				cin >> connect;
				g[dic(name)].push_back(dic(connect));
			}
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < g[i].size() ; j++){
				dmg[i] += P[g[i][j]];
			}
		}
		
		maximum = 0;
		current = P[0];
		
		cCover(0,1);
		dfs();
		cCover(0,-1);
		

		
		cout << maximum << endl;	
	}
}

Compiler output:
a.cc: In function 'int dfs()':
a.cc:61:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   61 |         sort(good.begin(),good.end());
      |         ^~~~
      |         short
a.cc:70:1: warning: control reaches end of non-void function [-Wreturn-type]
   70 | }
      | ^
Language: C++

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

using namespace std;
#define REP(i, n) for(int i=0;i<(int)(n);i++)
typedef long long ll;
typedef vector<int> vi;
const int MOD = 1000003;
int n, m;
vector<vi> g;

vi solve(int l, int r, int gi){
	vi res({1, 1});
	for(int i=l;i<r;i++){
		if(gi < g[i].size()){
			vi ret = solve(i, g[i][gi], gi+1);
			REP(j, 2) res[j] = (ll)res[j]*ret[j]%MOD;
			i = g[i][gi]-1;
		}
		swap(res[0], res[1]);
		gi = 0;
	}
	swap(res[0], res[1]);
	if(r-l > 1) res[1] -= ((res[1] = res[1] + res[0]) >= MOD) ? MOD : 0;
	return res;
}

int main(){
	while(~scanf("%d%d", &n, &m), n){
		g = vector<vi>(n);
		REP(i, m){
			int u, v;
			scanf("%d%d", &u, &v);u--; v--;
			if(v < u) swap(u, v);
			if(((u^v)&1)) g[u].push_back(v);
		}
		REP(i, n) sort(g[i].rbegin(), g[i].rend());
		printf("%d\n", n%2 ? 0 : (int)solve(0, n-1, 0)[1]);
	}
	return 0;
}

long long esp_org, esp_new;

int main_(){
    //  新しいスタック領域を確保する
    const int size = 50*1024*1024;
    void *p = malloc(size);
    esp_new = (long long)p + size - 1;

    //  スタックを置き換える
    __asm__("mov %rsp, esp_org");
    __asm__("mov esp_new, %rsp");
    
    //  メインの処理
    main_();
    //  スタックを元に戻す
   __asm__("mov esp_org, %rsp");

    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccpgQu64.o: relocation R_X86_64_32S against symbol `esp_org' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include<string>
#include <complex>
#include<list>
#include<float.h>
#include <functional>
#include <hash_map.h>
//lib
using namespace std;

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

#define foreach(it,o) for(__typeof((o).begin()) it=(o).begin(); it!=(o).end(); ++it)

int n,m;

int a,b;

hash_map<int,list<int> >nodes;


vector<bool> passed;
int search(int i){//パターン数の出力
	if(passed[i] ||nodes[i].size()==0){
		return 0;
	}
	passed[i]=true;

	int val=nodes[i].size();
	foreach(node,nodes[i]){
		int v=search(*node);
		val*=v>0?v:1;
	}
	cout<<"("<< i << ","<<nodes[i].size()<< ","<<val<<")"<<endl;
	return val;
}
void solve(){
	//与えられたノードのONOFF判定のみすればよい。
	int val=1;
	int graphs=0;
	REP(i,1,n+1){
		int s=search(i)+1;
		val*=s;
		if(s>1){
			graphs++;
		}
	}
	cout <<val+1<<endl;
}
//データ整形
int main() {
	while (true) {
		cin >> n>>m;
		if (n == 0&& m==0) {
			break;
		}
		if(n%2==1){
			cout <<0<<endl;
			continue;
		}
		passed.clear();
		nodes.clear();

		REP0(p,m){
			cin >>a>>b;
			if((b-a+2*n)%2==1){
			nodes[a].push_back(b);
			nodes[b].push_back(a);
			}
		}
		REP(i,0,n+1){
			passed.push_back(false);
		}
		solve();
	}
}

Compiler output:
a.cc:7:10: fatal error: hash_map.h: No such file or directory
    7 | #include <hash_map.h>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int road[5000][5000];
int n,m;

int solve(int start, int end, int now){
	int i,j,sum=0;
//	for(j=now;j--;)printf(" ");
	if(start+1==end){
//		for(j=now;j--;)printf(" ");
//		printf("set %d %d\n", start, end);
		return 1;
	}
	for(i=start;i<=end;i++){
		int ret=1;
		if(!road[start][i] || !((start+i)%2)) continue;
//		for(j=now;j--;)printf(" ");
//		printf("set %d %d\n", start, i);
		if(start+1!=i) ret=solve(start+1, i-1, now+1);
		if(i!=end) ret*=solve(i+1, end, now+1);
		sum+=ret;
	}
	return sum;
}

int main(){
	int i,j,a,b;
	while(cin>>n>>m,n){
		memset(road,0,sizeof(road));
		for(i=1;i<=m;i++){
			cin>>a>>b;
			road[a][b]=road[b][a]=1;
		}
		for(i=1;i<n;i++){
			road[i][i+1]=road[i+1][i]=1;
		}	road[1][n]=road[n][1]=1;
		if(n%2) cout<<"0"<<endl;
		else cout<<solve(1,n,0)<<endl;
	}
}

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

#include <iostream>
#include <cstring>

using namespace std;

char road[50050][50050];
int n,m;

int solve(int start, int end){
	int i,sum=0;
//	for(j=now;j--;)printf(" ");
	if(start+1==end){
//		for(j=now;j--;)printf(" ");
//		printf("set %d %d\n", start, end);
		return 1;
	}
	for(i=start;i<=end;i++){
		int ret=1;
		if(!road[start][i] || !((start+i)%2)) continue;
//		for(j=now;j--;)printf(" ");
//		printf("set %d %d\n", start, i);
		if(start+1!=i) ret=solve(start+1, i-1)%1000003;
		if(i!=end) ret*=solve(i+1, end)%1000003;
		sum+=ret%1000003;
	}
	return sum;
}

int main(){
	int i,j,a,b;
	while(cin>>n>>m,n){
		memset(road,0,sizeof(road));
		for(i=1;i<=m;i++){
			cin>>a>>b;
			road[a][b]=road[b][a]=1;
		}
		for(i=1;i<n;i++){
			road[i][i+1]=road[i+1][i]=1;
		}	road[1][n]=road[n][1]=1;
		if(n%2) cout<<"0"<<endl;
		else cout<<solve(1,n)<<endl;
	}
}

Compiler output:
/tmp/cccCdc2O.o: in function `main':
a.cc:(.text+0x211): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x297): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x2a2): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x2bd): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x2e4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x31e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x354): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x370): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cccCdc2O.o
a.cc:(.text+0x381): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o
collect2: error: ld returned 1 exit status
Language: C

n,t,e,x,r=-1;
main(){
scanf("%d%d%d",&n,&t,&e);
for(;i<n;t-e<=(t+e)/x*x&&r=i+1;i++)scanf("%d",&x);
printf("%d\n",r);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n,t,e,x,r=-1;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'e' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |       ^
main.c:1:9: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |         ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d%d%d",&n,&t,&e);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n,t,e,x,r=-1;
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d%d%d",&n,&t,&e);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:6: error: 'i' undeclared (first use in this function)
    4 | for(;i<n;t-e<=(t+e)/x*x&&r=i+1;i++)scanf("%d",&x);
      |      ^
main.c:4:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:31: error: expected ')' before ';' token
    4 | for(;i<n;t-e<=(t+e)/x*x&&r=i+1;i++)scanf("%d",&x);
      |    ~                          ^
      |                               )
main.c:5:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 | printf("%d\n",r);
      | ^~~~~~
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

n,t,e,x,r=-1;
main(){
scanf("%d%d%d",&n,&t,&e);
for(;i<n;t-e<=(t+e)/x*x&&r=i+1,i++)scanf("%d",&x);
printf("%d\n",r);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n,t,e,x,r=-1;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'e' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |       ^
main.c:1:9: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
    1 | n,t,e,x,r=-1;
      |         ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d%d%d",&n,&t,&e);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n,t,e,x,r=-1;
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d%d%d",&n,&t,&e);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:6: error: 'i' undeclared (first use in this function)
    4 | for(;i<n;t-e<=(t+e)/x*x&&r=i+1,i++)scanf("%d",&x);
      |      ^
main.c:4:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 | printf("%d\n",r);
      | ^~~~~~
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

n,i,t,e,x,r=-1;
main(){
scanf("%d%d%d",&n,&t,&e);
for(;i<n;t-e<=(t+e)/x*x&&r=i+1,i++)scanf("%d",&x);
printf("%d\n",r);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n,i,t,e,x,r=-1;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    1 | n,i,t,e,x,r=-1;
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | n,i,t,e,x,r=-1;
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 'e' [-Wimplicit-int]
    1 | n,i,t,e,x,r=-1;
      |       ^
main.c:1:9: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    1 | n,i,t,e,x,r=-1;
      |         ^
main.c:1:11: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
    1 | n,i,t,e,x,r=-1;
      |           ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d%d%d",&n,&t,&e);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n,i,t,e,x,r=-1;
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d%d%d",&n,&t,&e);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:27: error: lvalue required as left operand of assignment
    4 | for(;i<n;t-e<=(t+e)/x*x&&r=i+1,i++)scanf("%d",&x);
      |                           ^
main.c:5:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 | printf("%d\n",r);
      | ^~~~~~
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      |   ^
main.c:1:8: error: return type defaults to 'int' [-Wimplicit-int]
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      |        ^~~~
main.c: In function 'main':
main.c:1:8: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:8: error: type of 't' defaults to 'int' [-Wimplicit-int]
main.c:1:8: error: type of 'e' defaults to 'int' [-Wimplicit-int]
main.c:1:8: error: type of 'x' defaults to 'int' [-Wimplicit-int]
main.c:1:26: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      |                          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
main.c:1:26: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      |                          ^~~~~
main.c:1:26: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:74: error: lvalue required as left operand of assignment
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      |                                                                          ^
main.c:1:101: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
      |                                                                                                     ^~~~~~
main.c:1:101: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:101: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:101: note: include '<stdio.h>' or provide a declaration of 'printf'