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

#include <bits/stdc++.h>

#define int long long
#define double long double

using namespace std;

template<class T> string tostr(T x) { stringstream o; o << x; return o.str(); }
template<class T> T sqr(T x) { return x*x; }
template<class T> T mypow(T x, int n) { T r = 1; while (n > 0) { if (n & 1)r = r*x; x = x*x; n >>= 1; }return r; }

int toint(string s) { int v; stringstream i(s); i >> v; return v; }
bool check(int x, int y, int w, int h) { return x >= 0 && y >= 0 && w > x && h > y; }
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }

#define REP(i,a,b)	for(int (i) = (a);i < (b);(i)++)
#define rep(i,n)	REP(i,0,n)
#define PER(i,a,b)	for(int (i) = (a-1);i >= (b);(i)--)
#define per(i,n)	PER(i,n,0)
#define each(i,n)	for(auto &i : n)
#define clr(a)		memset((a), 0 ,sizeof(a))
#define mclr(a)		memset((a), -1 ,sizeof(a))
#define all(a)		(a).begin(),(a).end()
#define dump(val) 	cerr << #val " = " << val << endl;
#define dum(val)	cerr << #val " = " << val;
#define FILL(a,v)	fill(a,a+sizeof(a)/sizeof(*a),v)

const int dx[8] = { +1,+0,-1,+0,+1,+1,-1,-1 };
const int dy[8] = { +0,-1,+0,+1,-1,+1,-1,+1 };
const int mod = 1e9 + 7;
const int INF = 1e9;

typedef tuple<int,int,int,int> F;
int vis[801][801];

signed main() {

	int h, w, k;
	cin >> h >> w >> k;

	int sy, sx;

	vector<string> s(h);
	rep(y, h){
		cin >> s[y];
		rep(x, w){
			if(s[y][x] == 'S'){
				sy = y;sx = x;
			}
		}
	}

		
	auto ok = [&](int m){
		vector<string> t = s;
		clr(vis);

		queue<F> q;
		q.push(F(sy, sx, 0, 0));
		rep(i, w)rep(j, h){
			vis[j][i] = INF;
		}
		vis[sy][sx] = 0

		while(q.size()){
			auto now = q.front();
			q.pop();

			int y = get<0>(now);
			int x = get<1>(now);
			int mv = get<2>(now);
			int us = get<3>(now);

			if(mv > m * k)continue;
			if(mv && mv % k == 0) us += k;
			if(x == 0 || y == 0 || x == w - 1 || y == h - 1){
				return true;
			}

			rep(i, 4){
				int tx = x + dx[i], ty = y + dy[i];
				if(check(tx, ty, w, h) && vis[ty][tx] > mv + 1){
					if(s[ty][tx] == '#'){
						if(us){
							q.push(F(ty, tx, mv + 1, us - 1));
						}else continue;
					}else{
						q.push(F(ty, tx, mv + 1, us));
					}
					vis[ty][tx] = mv + 1;
				}
			}

			bool ok = false;
			rep(i, 4){
				int tx = x + dx[i], ty = y + dy[i];
				if(check(tx, ty, w, h) && vis[ty][tx] > (mv / k + 1) * k + 1){
					ok = true;
				}
			}
			if(ok){
				q.push(F(y, x, (mv / k + 1) * k , us));
			}

		}

		return false;
	};

	int l = 0, r = INF;
	rep(i, 100) {
		int m = (r + l) / 2.0;
		if (ok(m)) {
			r = m;
		}
		else {
			l = m;
		}
	}

	cout << r << endl;

	return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:64:32: error: expected ';' before 'while'
   64 |                 vis[sy][sx] = 0
      |                                ^
      |                                ;
   65 | 
   66 |                 while(q.size()){
      |                 ~~~~~
Language: C++

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

#define INF (int)1e7
int N, M, K;
vector<vector<int>>Room;
int status[800][800];
int cost[800][800];
int v[] = { -1, 0, 1, 0 };
int h[] = { 0, 1, 0, -1 };

vector<pair<int,int>> dijkstra(pair<int,int>s) {
	vector<pair<int, int>>pos;

	for (int i = 0; i < N; i++) {
		for (int j = 0; j < M; j++) {
			status[i][j] = 0;
			cost[i][j] = INF;
		}
	}
	cost[s.first][s.second] = 0;
	status[s.first][s.second] = 1;

	priority_queue<pair<int, pair<int,int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<int, int>>>>U;
	U.push(make_pair(cost[s.first][s.second], s));
	while (!U.empty()) {
		//探索が終わってない中でコスト最小の点
		pair<int,int>u = U.top().second; U.pop();

		if (status[u.first][u.second] == -1) continue;
		pos.push_back(u);
		status[u.first][u.second] = -1;

		//コスト最少の点を探る
		for (int i = 0; i < 4; i++) {
			if (status[u.first + v[i]][u.second + h[i]] != -1 && u.first + v[i]>= 0 && u.second + h[i]>= 0 && u.first + v[i] < N && u.second + h[i] < M) {
				if (Room[u.first + v[i]][u.second + h[i]])continue;
				if (cost[u.first + v[i]][u.second + h[i]] == K)continue;
				if (cost[u.first + v[i]][u.second + h[i]] > cost[u.first][u.second] + 1) {
					cost[u.first + v[i]][u.second + h[i]] = cost[u.first][u.second] + 1;
					status[u.first + v[i]][u.second + h[i]] = 1;
					U.push(make_pair(cost[u.first + v[i]][u.second + h[i]], make_pair(u.first + v[i], u.second + h[i])));
				}
			}
		}
	}

	return pos;
}

int main()
{
	cin >> N >> M >> K;
	Room.resize(N);
	pair<int, int>pos;
	for (int i = 0; i < N; i++) {
		Room[i].resize(M);
		for (int j = 0; j < M; j++) {
			char c; cin >> c;
			if (c == '#')Room[i][j] = 1;
			else if (c == 'S')pos = make_pair(i, j);
		}
	}

	vector<pair<int,int>>nextpos = dijkstra(pos);
	vector<int>ans;
	for (int k = 0; k < nextpos.size(); k++) {
		int dist = min(min(nextpos[k].first,N - 1 - nextpos[k].first), min(nextpos[k].second, M - 1 - nextpos[k].second));
		ans.push_back(dist);
	}
	sort(ans.begin(), ans.end());

	cout << int(ceil((double)ans[0] / K)) + 1 << endl;

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:79:21: error: 'ceil' was not declared in this scope
   79 |         cout << int(ceil((double)ans[0] / K)) + 1 << endl;
      |                     ^~~~
Language: C++

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
typedef long long LL;
using namespace std;
#define MP make_pair
int n, m, k;
char s[1005][1005];
int vis[1005][1005];
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int main() {
    scanf("%d%d%d", &n, &m, &k);
    int x, y;
    memset(vis, -1, sizeof(vis));
    for (int i = 0; i < n; ++i) {
        scanf("%s", s[i]);
        for (int j = 0; j < m; ++j) {
            if (s[i][j] == 'S') {
                x = i;
                y = j;
                s[i][j] = '.';
            }
        }
    }
    queue<pair<int, int>> q;
    q.push(MP(x, y));
    vis[x][y] = 0;
    while (!q.empty()) {
        auto w = q.front();
        // cout << w.first <<" "<<w.second<<endl;
        q.pop();
        if (vis[w.first][w.second] == k)
            continue;
        for (int i = 0; i < 4; ++i) {
            int nx = w.first + dx[i];
            int ny = w.second + dy[i];
            if (nx < 0 || ny < 0 || nx >= n || ny >= m) {
                printf("1\n");
                return 0;
            }
            if (s[nx][ny] == '#' || vis[nx][ny] != -1)
                continue;
            vis[nx][ny] = vis[w.first][w.second] + 1;
        }
    }
    int ans = 999999;
    // cout << "???"<<endl;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            if (vis[i][j] == -1)
                continue;
            int dis = min(i, j);
            dis = min(dis, n - i - 1);
            dis = min(dis, m - j - 1);
            dis = dis / k + (dis % k != 0);
            ans = min(ans, 1 + dis);
        }
    }
    printf("%d\n", ans);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: 'memset' was not declared in this scope
   31 |     memset(vis, -1, sizeof(vis));
      |     ^~~~~~
a.cc:19:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   18 | #include <utility>
  +++ |+#include <cstring>
   19 | #include <vector>
Language: C++

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

typedef int ll;

#define int long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz(x) ((int)x.size())
#define all(x) x.begin(),x.end()

typedef pair<int,int>pii;
typedef pair<int,pair<int,int> > piii;

const int mod=1e9+7;

int POWER[65];
int power(int a, int b) {int ret=1;while(b) {if(b&1) ret*=a;a*=a;if(ret>=mod) ret%=mod;if(a>=mod) a%=mod;b>>=1;}return ret;}
int inv(int x) {return power(x,mod-2);}

void precompute() {
	POWER[0]=1;
	for(int i=1;i<63;i++) POWER[i]=POWER[i-1]<<1LL;
}

const int maxn=855;
int sr=-1,sc=-1;
bool vis[maxn][maxn];
int h,w,k,dis=100000000;
vector<string>v;

queue<int>xq,yq,le;
bool chk(int x , int y , int z) {
	if(x>=0 && x<h && y>=0 && y<w) {
		if(vis[x][y]==0 && v[x][y]!='#') {
			vis[x][y]=1;
			int d=min(min(x,h-x-1),min(y,w-y-1));
			dis=min(dis,d);
			if(z<=k) {
				xq.push(x);
				yq.push(y);
				le.push(z);
			}
			return 1;
		}
	}
	return 0;
}
void bfs(int i , int j) {
	chk(i,j,0);
	while (!xq.empty()) {
		int a=xq.front(),b=yq.front(),c=le.front();
		chk(a-1,b,c+1);
		chk(a+1,b,c+1);
		chk(a,b-1,c+1);
		chk(a,b+1,c+1);
		xq.pop(),yq.pop(),le.pop();
	}
}

ll main() {
	// freopen("Task.in","r",stdin);freopen("Task.out","w",stdout);

	std:ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>h>>w>>k;

	for (int i=0 ; i<h ; i++) {
		string s;
		cin>>s;

		v.pb(s);
	}

	for (int i=0 ; i<v.size() ; i++) {
		for (int j=0 ; j<v[i].size() ; j++) {
			if(v[i][j]=='S') {
				sr=i,sc=j;
			}
		}
	}

	bfs(sr,sc);
	int ans=dis/k+1;
	int d=min(min(sr,h-sr-1),min(sc,w-sc-1));
	int ans2=d/k;
	if(d%k!=0)
		ans2++;
	if(dis%k!=0)
		ans++;
	ans=min(ans,ans2)
	cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'll main()':
a.cc:94:26: error: expected ';' before 'cout'
   94 |         ans=min(ans,ans2)
      |                          ^
      |                          ;
   95 |         cout<<ans<<endl;
      |         ~~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
#include <cstring>
#include <string>
#include <cctype>
#include <cassert>
#include <stack>

using namespace std;

#define pb push_back
#define mp make_pair
#define rep(i,n) for(int i = 0; i < (n); i++)
#define repr(i,b,e) for(int i = (b); i <= (e); i++)
#define INF (1001001001)
#define EPS (1e-15)

#define pr(x) do{cout << (#x) << " = " << (x) << endl;}while(0)
#define pri(x,i) do{cout << (#x) << "[" << i << "] = " << (x[i]) << endl;}while(0)
#define pra(x,n) rep(__i,n) pri(x,__i);
#define prar(x,b,e) repr(__i,b,e) pri(x,__i);

typedef long long llint;
typedef pair<int, int> pint;
typedef vector<int> vint;

int in() {
	int a;
	scanf("%d ", &a);
	return a;
}

vint v;
int H, W;
int K;

int magic(int i, int k) {
	int ydist = min(i - 1, H - i);
	int xdist = min(k - 1, W - k);
	int dist = min(ydist, xdist);
	return (dist + K - 1) / K;
}

int main() {
	 H = in();
	 W = in();
	 K = in();
	vector<vint> v(810, vint(810, 0));
	for (int i = 0; i < H + 2; i++) v[i][0] = v[i][W + 1] = -1;
	for (int i = 0; i < W + 2; i++) v[0][i] = v[H + 1][i] = -1;
	int y = -1, x = -1;
	for (int i = 1; i <= H; i++) {
		char temp[810];
		gets(temp);
		for (int k = 1; k <= W; k++) {
			char c = temp[k - 1];
			if (c == 'S') {
				y = i;
				x = k;
			}
			else if (c == '#') {
				// solid
				v[i][k] = 99;
			}
		}
	}
	assert(y >= 0 && x >= 0);
	int ans = magic(y, x);
	stack<pint> st;
	st.push(mp(y,x));
	for (int i = 0; i < K + 1; i++) {
		stack<pint> st2;
		while (! st.empty()) {
			pint p = st.top();
			st.pop();
			v[p.first][p.second] = 1;
			ans = min(ans, magic(p.first, p.second));
			for (int dy = -1; dy <= 1; dy++) {
				for (int dx = -1; dx <= 1; dx++) {
					if (dy * dx == 0 && v[p.first + dy][p.second + dx] == 0) {
						st2.push(mp(p.first + dy, p.second + dx));
					}
				}
			}
		}
		st = st2;
	}
	cout << ans + 1 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   62 |                 gets(temp);
      |                 ^~~~
      |                 getw
Language: C++

#include<string>
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
typedef long long int llint;
#define pub push_back
#define mp make_pair
#define fir first
#define sec second
#define res resize
#define mt make_tuple
const int big=((int)1<<30);
int main(void){
	int H,W,K,i,j,n,sx,sy,x,y,ka,sai=big;
	queue<tuple<int,int,int>> que;//x,y,回数
	vector<string> hey;
	vector<vector<bool>>ot;
	cin>>H>>W>>K;
	hey.resize(H);
	ot.resize(H);
	for(i=0;i<H;i++){cin>>hey[i];}
	for(i=0;i<H;i++){ ot[i].resize(W); for(j=0;j<W;j++){ if(hey[i][j]=='S'){ sx=i;sy=j; } } }
	que.push(mt(sx,sy,K));
	while(!que.empty()){
		x=get<0>(que.front());
		y=get<1>(que.front());
		ka=get<2>(que.front());
		que.pop();
		if(ka==-1){break;}
		if(ot[x][y]){ ot[x][y]=true;continue; }
		sai=min(sai,min(min(x,H-x-1),min(y,W-y-1)));
		if(sai==0){ break; }
		if(hey[x+1][y]!='#'){que.push(mt(x+1,y,ka-1));}
		if(hey[x-1][y]!='#'){que.push(mt(x-1,y,ka-1));}
		if(hey[x][y+1]!='#'){que.push(mt(x,y+1,ka-1));}
		if(hey[x][y-1]!='#'){que.push(mt(x,y-1,ka-1));}
	}
	
	cout<<(sai+K-1)/K+1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'queue' was not declared in this scope
   18 |         queue<tuple<int,int,int>> que;//x,y,回数
      |         ^~~~~
a.cc:7:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    6 | #include<functional>
  +++ |+#include <queue>
    7 | using namespace std;
a.cc:18:32: error: expected primary-expression before '>' token
   18 |         queue<tuple<int,int,int>> que;//x,y,回数
      |                                ^~
a.cc:18:35: error: 'que' was not declared in this scope
   18 |         queue<tuple<int,int,int>> que;//x,y,回数
      |                                   ^~~
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define ljc 998244353
using namespace std;
#define gc getchar
inline ll read(){
    register ll x=0,f=1;char ch=gc();
    while (!isdigit(ch)){if (ch=='-') f=-1;ch=gc();}
    while (isdigit(ch)){x=(x<<3)+(x<<1)+ch-'0';ch=gc();}
    return (f==1)?x:-x;
}
int head[1010101],tot,b[1010101];
struct edge{
	int to,nxt;
}g[1010011];
inline void made(int from,int to){
	g[++tot].to=to;g[tot].nxt=head[from];head[from]=tot;
}
int n,indo[1010101];
signed main(){
	n=read();
	if (n&1){
		printf("First");return 0;
	}
	return 1;
	for (int i=1;i<n;i++){
		int x=read(),y=read();
		made(x,y),made(y,x);
	}
	if (ans!=n/2){
		
	}
//	for (int i=1;i<=n;i++){
//		for (int j=head[i];j;j=g[j].nxt){
//			int v=g[j].to;
//			if (indo[v]==1) b[i]++;
//		}
//		if (b[i]>=2){
//			puts("First");return 0;
//		}
//		if (indo[i]>=3){
//			puts("First");return 0;
//		}
//	}
//	puts("Second");
    return 0;
}





Compiler output:
a.cc: In function 'long long int read()':
a.cc:7:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    7 |     register ll x=0,f=1;char ch=gc();
      |                 ^
a.cc:7:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    7 |     register ll x=0,f=1;char ch=gc();
      |                     ^
a.cc: In function 'int main()':
a.cc:30:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |         if (ans!=n/2){
      |             ^~~
      |             abs
Language: C

#include<bits/stdc++.h>

using namespace std;

const int MAXN=1e5+7;

struct side {
	int from,to,nex;
}edge[MAXN<<1];
int head[MAXN],cntm=0;
void link(int from,int to) {
	edge[++cntm].from=from;
	edge[cntm].to=to;
	edge[cntm].nex=head[from];
	head[from]=cntm;
}

int n;
int col[MAXN],siz[MAXN];
int ans=0;

void dfs(int now,int fa) {
	siz[now]=1;
	for(int i=head[now];i;i=edge[i].nex) {
		if(edge[i].to!=fa) {
			dfs(edge[i].to,now);
			siz[now]+=siz[edge[i].to];
		}
	}
	if(siz[now]==1) return;
	int cnt=0;
	for(int i=head[now],v;i;i=edge[i].nex) {
		v=edge[i].to;
		if(v==fa) continue;
		if(!col[v]) cnt++;
	}
	if(cnt==1) col[now]=1;
	if(cnt>1) ans=1;
	if(now==1&&cnt==0) ans=1;
}

int main() {
	cin>>n;
	for(int i=1,i1,i2;i<n;i++) {
		cin>>i1>>i2;
		link(i1,i2);
		link(i2,i1);
	}
	dfs(1,0);
	if(ans) cout<<"First"<<endl;
	else cout<<"Second"<<endl;
}

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

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

const int maxn = 100 * 1000 + 10;
int n;
vector <int> adj[maxn];
bool ans, leaf[maxn];

void dfs(int v, int papa) {
    if (ans)
        return;
    int o = 0, tmp = 0;
    bool f = 1;
    for (int u: adj[v])
        if (u != papa) {
            dfs(u, v); 
            o += (leaf[u]);
            f = 0;
        }   
    if (f) 
        leaf[v] = 1;
    if (o > 1)
        ans = 1;
}

int main() {
    cin >> n;
    for (int i = 0, a, b; i < n - 1; i++) {
        cin >> a >> b;
        adj[--a].push_back(--b);
        adj[b].push_back(a);
    }   
    dfs(0, -1);
    cout << (((n % 2) || ans)? "First\n": "Second\n");
    return 0;
}


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

de<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"

const int N = 1e5 + 10;

int n;
vector <int> adj[N];

int main() {
        cin >> n;
        for (int i = 0; i < n - 1; i++) {
                int u, v;
                cin >> u >> v;
                u--, v--;
                adj[u].push_back(v);
                adj[v].push_back(u);
        }
        bool is = false;
        for (int i = 0; i < n; i++) {
                int cnt = 0;
                for (auto x: adj[i])
                        if (adj[x].size() == 1)
                                cnt++;
                if (cnt >= 2) {
                        is = true;
                        break;
                }
        }
        if (is)
                cout << "First";
        else
                cout << "Second";
}
 

Compiler output:
a.cc:1:1: error: 'de' does not name a type
    1 | de<bits/stdc++.h>
      | ^~
a.cc:9:1: error: 'vector' does not name a type
    9 | vector <int> adj[N];
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> n;
      |         ^~~
a.cc:17:17: error: 'adj' was not declared in this scope
   17 |                 adj[u].push_back(v);
      |                 ^~~
a.cc:23:30: error: 'adj' was not declared in this scope
   23 |                 for (auto x: adj[i])
      |                              ^~~
a.cc:32:17: error: 'cout' was not declared in this scope
   32 |                 cout << "First";
      |                 ^~~~
a.cc:34:17: error: 'cout' was not declared in this scope
   34 |                 cout << "Second";
      |                 ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"

const int N = 1e5 + 10;

int n;
vector <int> adj[N];

int main() {
        cin >> n;
        for (int i = 0; i < n - 1; i++) {
                int u, v;
                cin >> u >> v;
                u--, v--;
                adj[u].push_back(v);
                adj[v].push_back(u);
        }
        bool is = false;
        for (int i = 0; i < n; i++) {
                int cnt = 0;
                for (auto x: adj[i])
                        if (adj[x].size() == 1)
                                cnt++;
                if (cnt >= 2) {
                        is = true;
                        break;
                }
        }
        if (is)
                cout << "First";
        else
                cout << "Second";
}
~                                                                                                                                                                                                                  
~                                                                                                                                                                                                                  
~                                                                                                                                                                                                                  
~                 

Compiler output:
a.cc:37:1: error: expected class-name before '~' token
   37 | ~
      | ^
Language: C++

#include <bits/stdc++.h>
#define N 100034
#define M 256101
using namespace std;

int n, e;
int u, v, i;
int to[M], first[N], next[M];

inline void addedge(int u, int v){
    to[++e] = v; next[e] = first[u]; first[u] = e;
    to[++e] = u; next[e] = first[v]; first[v] = e;
}

int dfs(int x, int px){
    int i, y, scx = 0;
    for(i = first[x]; i; i = next[i])
        if((y = to[i]) != px)
            if((scx += dfs(y, x)) >= 2)
                return 2;
    return !scx;
}

int main(){
    scanf("%d", &n);
    for(i = 1; i < n; ++i){
        scanf("%d%d", &u, &v);
        addedge(u, v);
    }
    puts(dfs(1, 0) ? "First" : "Second");
    return 0;
}

Compiler output:
a.cc: In function 'void addedge(int, int)':
a.cc:11:18: error: reference to 'next' is ambiguous
   11 |     to[++e] = v; next[e] = first[u]; first[u] = e;
      |                  ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
                 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_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:8:22: note:                 'int next [256101]'
    8 | int to[M], first[N], next[M];
      |                      ^~~~
a.cc:12:18: error: reference to 'next' is ambiguous
   12 |     to[++e] = u; next[e] = first[v]; first[v] = e;
      |                  ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:8:22: note:                 'int next [256101]'
    8 | int to[M], first[N], next[M];
      |                      ^~~~
a.cc: In function 'int dfs(int, int)':
a.cc:17:30: error: reference to 'next' is ambiguous
   17 |     for(i = first[x]; i; i = next[i])
      |                              ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:8:22: note:                 'int next [256101]'
    8 | int to[M], first[N], next[M];
      |                      ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
vector<ll> node[100005];
bool matched[100005],used[100005];
void dfs(ll pos){
  for(int i=0;i<node[pos].size();i++){
    ll son=node[pos][i];
    if(!used[to]){
      used[to]=true;
      dfs(to);
      if(!matched[pos]&&!matched[son]){
        matched[pos]=true;
        matched[son]=true;
      }
    }
  }
}
int main(){
  ll n;
  cin>>n;
  for(int i=1;i<n;i++){
    ll s,t;
    cin>>s>>t;
    node[s].push_back(t);
    node[t].push_back(s);
  }
  for(int i=1;i<=n;i++) {
    used[i]=false;
    matched[i]=false;
  }
  used[1]=true;
  dfs(1);
  for(int i=1;i<=n;i++){
    if(!matched[i]){
      cout<<"Second"<<endl;
      return 0;
    }
  }
  cout<<"First"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'void dfs(ll)':
a.cc:12:14: error: 'to' was not declared in this scope; did you mean 'tm'?
   12 |     if(!used[to]){
      |              ^~
      |              tm
Language: C++

nclude<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,now,vi[N],fa[N],vis[N],v[N<<1],deep[N],nex[N<<1],head[N];
void addedges(int x,int y){
	nex[++now]=head[x];
	head[x]=now,v[now]=y;
}
vector<int>b[N];
void dfs(int x){
	deep[x]=deep[fa[x]]+1;
	for(int i=head[x];i;i=nex[i])
		if(v[i]!=fa[x])	fa[v[i]]=x,dfs(v[i]);
	b[deep[x]].push_back(x);
}
int main(){
	scanf("%d",&n);
	for(int i=1;i<n;i++){
		int x,y;
		scanf("%d%d",&x,&y);
		addedges(x,y),addedges(y,x);
	}
	dfs(1);
	for(int i=n;i;i--){
		int si=b[i].size();
		for(int j=0;j<si;j++){
			int k=b[i][j];
			if(!vis[k]){
				if(vis[fa[k]]||k==1){
					puts("First");
					return 0;
				}
				vis[fa[k]]=1;
			}
		}
	}
	puts("Second");
	return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<bits/stdc++.h>
      | ^~~~~~
a.cc:9:1: error: 'vector' does not name a type
    9 | vector<int>b[N];
      | ^~~~~~
a.cc: In function 'void dfs(int)':
a.cc:14:9: error: 'b' was not declared in this scope
   14 |         b[deep[x]].push_back(x);
      |         ^
a.cc: In function 'int main()':
a.cc:17:9: error: 'scanf' was not declared in this scope
   17 |         scanf("%d",&n);
      |         ^~~~~
a.cc:25:24: error: 'b' was not declared in this scope
   25 |                 int si=b[i].size();
      |                        ^
a.cc:30:41: error: 'puts' was not declared in this scope
   30 |                                         puts("First");
      |                                         ^~~~
a.cc:37:9: error: 'puts' was not declared in this scope
   37 |         puts("Second");
      |         ^~~~
Language: C++

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

#define pb push_back

const int MAXN = 1e5 + 10;

int n;
int u ,v;
int dp[MAXN];
vector <int> adj[MAXN];
vector <int> ver;

void dfs(int root) {
    for (auto y: adj[root])
        if (dp[y] == 0)
            dp[y] = dp[root] + 1;
            dfs(y);
}

int main() {
    cin >> n;
    if (n == 1)
        return cout << "First" <<  '\n', 0;
    for (int i = 1; i < n ;i++) {
        cin >> u >> v;
        adj[u].pb(v);
        adj[v].pb(u);
    }

    v = 0;

    for (int i = 1; i <= n; i++) {   
        if (adj[i].size() == 1) {
            v++;
            ver.pb(i);   
        }
    }
    if (v > 2)
        return cout << "First" << '\n', 0;
    else if (v == 2) {
        dp[ver[0]] = 1;
        dfs(ver[0]);
        if (dp[ver[1]] % 2)
            return cout << "First" << '\n', 0;
    }
    cout << "Second" << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:18:17: error: 'y' was not declared in this scope; did you mean 'yn'?
   18 |             dfs(y);
      |                 ^
      |                 yn
Language: C++

#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int MAXN=100000;
vector<int> d[MAXN+5];
int n;
int dfs(int u,int fa)
{
	int res=0,v;
	for(int i=0;i<d[u].size();i++)
	{
		v=d[u][i];
		if(v!=fa)
			res+=dfs(v,u);
	}
	if(res>=2)
	{
		printf("First\n");
		exit(0);
	}
	else if(res==0)
		return 1;
	return 0;
}
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n-1;i++)
	{
		int u,v;
		scanf("%d%d",&u,&v);
		d[u].push_back(v);
		d[v].push_back(u);
	}
	if(dfs(1,0))
		printf("First\n");
	else
		printf("Second\n");
	return 0;
}


Compiler output:
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<int> d[MAXN+5];
      | ^~~~~~
a.cc: In function 'int dfs(int, int)':
a.cc:13:23: error: 'd' was not declared in this scope
   13 |         for(int i=0;i<d[u].size();i++)
      |                       ^
a.cc: In function 'int main()':
a.cc:35:17: error: 'd' was not declared in this scope
   35 |                 d[u].push_back(v);
      |                 ^
Language: C++

/*Lucky_Glass*/
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

const int N=1e5;

struct NODE{int pnt,tag;}nod[N+5];

vector<int> lnk[N+5];
int du[N+5],cnt[2];
bool blg[N+5];
int n;

void DFS(int u,int pre){
	blg[u]=!blg[pre];
	for(auto v : lnk[u]){
		if(v==pre) continue;
		DFS(v,u);
	}
}

int main(){
	scanf("%d",&n);
	for(int i=1;i<n;i++){
		int u,v;scanf("%d%d",&u,&v);
		lnk[u].push_back(v);
		lnk[v].push_back(u);
		du[u]++;du[v]++;
	}
	DFS(1,0);
	for(int u=1;u<=n;u++){
		bool U=false;
		for(auto v : lnk[u])
			if(du[v]==1){
				if(U){printf("First\n");return 0;}
				U=true;
			}
		if(U) cnt[blg[u]]++;
	}
	for(int u=1;u<=n;u++){
		if(du[u]!=1 && cnt[!blg[u]]>=lnk[u].size()){
			printf("First\n");
			return 0;
		}
	}
	printf("Second\n");
	return 0;
}

Compiler output:
a.cc:11:1: error: 'vector' does not name a type
   11 | vector<int> lnk[N+5];
      | ^~~~~~
a.cc: In function 'void DFS(int, int)':
a.cc:18:22: error: 'lnk' was not declared in this scope
   18 |         for(auto v : lnk[u]){
      |                      ^~~
a.cc: In function 'int main()':
a.cc:28:17: error: 'lnk' was not declared in this scope
   28 |                 lnk[u].push_back(v);
      |                 ^~~
a.cc:35:30: error: 'lnk' was not declared in this scope
   35 |                 for(auto v : lnk[u])
      |                              ^~~
a.cc:43:46: error: 'lnk' was not declared in this scope
   43 |                 if(du[u]!=1 && cnt[!blg[u]]>=lnk[u].size()){
      |                                              ^~~
Language: C++

/**
SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAjRXBpYiMraXh4bWl6bWJwI2J3I1BxYSNrem1pYmN6bWEjSWEsI0ptbnd6bSN3eiNJbmJteiN3eiNKbXBxdmwjYnBtdTEjVnd6I2FwaXR0I2JwbXwja3d1eGlhYSNJY29wYiN3biNwcWEjc3Z3ZXRtbG9tI017a214YiNpYSNQbSNlcXR0bWJwMSNQcWEjYnB6d3ZtI2x3YnAjbXtibXZsI1dkbXojYnBtI3BtaWRtdmEjSXZsI3d2I21pemJwLyNpdmwjUG0jbm1tdG1icCNWdyNuaWJxb2NtI3F2I29jaXpscXZvI0l2bCN4em1hbXpkcXZvI2JwbXUvI053eiNQbSNxYSNicG0jVXdhYiNQcW9wMSNCcG0jQWN4em11bSMrcXYjb3R3enwsMQ==
*/
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>

#define F first
#define S second
#define endl '\n'
#define deb(x) cout<<#x<<' '<<x<<endl;
#define pb push_back

const long long MAXN = 1e6 + 1;
using namespace std;

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


long long readInt() {
    bool minus1 = false;
    long long result = 0;
    char ch;
    ch = getchar();
    while (true) {
        if (ch == '-') break;
        if (ch >= '0' && ch <= '9') break;
        ch = getchar();
    }
    if (ch == '-') minus1 = true; else result = ch-'0';
    while (true) {
        ch = getchar();
        if (ch < '0' || ch > '9') break;
        result = result*10 + (ch - '0');
    }
    if (minus1)
        return -result;
    else
        return result;
}

int kek[MAXN];
vector <int> g[MAXN];

int cnt[MAXN];-

void dfs(int v, int par) {
    cnt[g[v].size()] ++;
    for (int i : g[v]) {
        if (g[i].size() == 1) {
            kek[v] ++;
        }
        if (i == par) continue;
        dfs(i, v);
    }
}

main() {
	#ifdef IZI_KATKA
	assert(freopen("input", "r", stdin));
    assert(freopen("output", "w", stdout));
    #endif
    int n = readInt();
    for (int i = 1; i < n; i++) {
        int v = readInt(), u = readInt();
        g[v].pb(u);
        g[u].pb(v);
    }
    dfs(1, 0);
    for (int i = 1; i <= n; i++) {
        if (kek[i] >= 2) {
            cout << "First";
            return 0;
        }
    }
    if (cnt[1] == 2 && cnt[2] == n - 2 && n % 2) {
        cout << "First";
        return 0;
    }
    cout << "Second";
    return 0;
}



Compiler output:
a.cc:64:15: error: expected unqualified-id before '-' token
   64 | int cnt[MAXN];-
      |               ^
a.cc:77:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   77 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:88:5: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   88 |     dfs(1, 0);
      |     ^~~
      |     ffs
Language: C++

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

const int maxn = 1e5 + 5;
int n;
vector<int> g[maxn];
vector<int> cnt[maxn];
bool mark[maxn];

int mod = 0;
int change = 0;
bool is = true;

void dfs(int v, int dis) {
	mark[v] = true;
	if(g[v].size() == 1) {
		if(dis % 2 != 0)	
			is = false;
	}
	for(int i = 0; i < g[v].size(); i++) {
		if(!mark[g[v][i]])
			dfs(g[v][i], dis + 1);
	}
}
bool check() {
	dfs(0, 0);
	if(is)
		return true;
	is = true;
	memset(mark, 0, sizeof mark);
	change = 0;
	mod = 0;
	dfs(g[0][0], 0);
	if(is) {
		return true;
	}
	return false;
}

int main() {
	cin >> n;
	for(int i = 0; i < n - 1; i++) {
		int u, v;
		cin >> u >> v;
		u--, v--;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < g[i].size(); j++) {
			cnt[i].push_back(g[g[i][j]].size());
		}
	}
	for(int i = 0; i < n; i++){
		sort(cnt[i].begin(), cnt[i].end());
	}
	string ans = "Second";
	for(int i = 0; i < n; i++){
		if(cnt[i].size() >= 2)
			if(cnt[i][0] == 1 && cnt[i][1] == 1) {
				ans = "First";
				return4
1 2
2 3
2 4 cout << "First", 0;
			}
	}
	if(check()) {
		ans = "First";
		return cout << "First", 0;
	}

	cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:33: error: 'return4' was not declared in this scope
   62 |                                 return4
      |                                 ^~~~~~~
Language: C++

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

const int maxn = 1e5 + 5;
int n;
vector<int> g[maxn];
vector<int> cnt[maxn];
bool mark[maxn];

int mod = 0;
int change = 0;

void dfs(int v, int dis) {
	mark[v] = true;
	if((int)g[v].size() == 1) {
		if(dis % 2 != mod) {
			change++;
			mod = dis % 2;
		}
	}
	for(int i = 0; i < g[v].size(); i++) {
		if(!mark[g[v][i]]) {
			dfs(g[v][i], dis + 1);
		}
	}
}
bool check() {
	dfs(0, 0);
	if(mod == 0 && change <= 1) {
		return true;
	}
	memset(mark, 0, sizeof mark);
	change = 0;
	mod = 0;
	dfs(g[0][0], 0);
	if(mod == 0 && change <= 1) {
		return true;
	}
	return false;
}

int main() {
	cin >> n;
	for(int i = 0; i < n - 1; i++) {
		int u, v;
		cin >> u >> v;
		u--, v--;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < g[i].size(); j++) {
			cnt[i].push_back(g[g[i][j]].size());
		}
	}
	for(int i = 0; i < n; i++){
		sort(cnt[i].begin(), cnt[i].end());
	}
	return cout << "First", 0;
	string ans = "Second";
	for(int i = 0; i < n; i++){
		if(cnt[i].size() >= 2)
			if(cnt[i][0] == 1 && cnt[i][1] == 1) {
				ans = "First";
				return cout << "First", 0;
			}
	}
	if(check()) {
		ans = "First";
		return cout << "First", 0;
	}
	if()
	cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:12: error: expected primary-expression before ')' token
   72 |         if()
      |            ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
const int MAXn = 1e5 + 10;
vector<int> g[MAXn];
int n, odd[MAXn], even[MAXn];

void dfs(int v, int par) {
	if (g[v].size() == 1 && par != 0)
		even[v] = 1;
	for (int i = 0; i < g[v].size(); i++)
		if (g[v][i] != par) {
			dfs(g[v][i], v);
			odd[v] += (even[g[v][i]]);
			even[v] += (odd[g[v][i]]);
		}
}

void dfs2(int v, int par) {
	if (!par)
		even[v]++;
	for (int i = 0; i < g[v].size(); i++)
		if (g[v][i] != par) {
			if (even[v] - (odd[g[v][i]]) > 0) {
				odd[g[v][i]]+= even[v] - (odd[g[v][i]]);
			}
			if (odd[v] - (even[g[v][i]]) > 0)
				even[g[v][i]]+= odd[v] - (even[g[v][i]]);
			dfs2(g[v][i], v);
		}	
	
}
int main() {
	cin >> n;
	for (int i = 0; i < n - 1; i++) {
		int u, v;
		cin >> u>> v;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	dfs(1, 0);
	dfs2(1, 0);
	for (int i = 1; i<= n; i++)
		leaf += g[i].size() == 1;
	for (int i = 1; i <= n; i++) {
		int cnt = 0;
		for (int j = 0; j < g[i].size(); j++)
			if (g[g[i][j]].size() == 1)
				cnt++;
		if (cnt > 1)
			return cout << "First",0;
	}
	for (int i = 1; i <= n; i++) {
	//cout << i  <<' ' << g[i].size() << ' ' << even[i] << ' ' << odd[i] << endl;
		if ((!even[i] || !even[i]) && g[i].size() > 1) 
			return cout << "First",0;
		
	}
	cout << "Second";
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:17: error: 'leaf' was not declared in this scope
   44 |                 leaf += g[i].size() == 1;
      |                 ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <map>
#include <algorithm>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
vector<int>g[100000];
int dp[100000][2];
void dfs(int s, int p){
    int ma = -1000000;
    for(int x:g[s]){
        if(x == p)continue;
        dfs(x,s);
        dp[s][0] += dp[x][1];
        ma = max(dp[x][0] - dp[x][1]);
    }
    dp[s][1] = dp[s][0] + 1 + ma;
}
int main(){
    int n;
    cin >> n;
    rep(i,n-1){
        int a,b;
        cin >> a >> b;
        a--,b--;
        g[a].push_back(b);
        g[b].push_back(a);
    }
    dfs(0,-1);
    if(n%2==0 and dp[0][1] == n/2){
        cout << "Second" << endl;
    }else{
        cout << "First" << endl;
    }
}

Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:18:17: error: no matching function for call to 'max(int)'
   18 |         ma = max(dp[x][0] - dp[x][1]);
      |              ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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,
                 from a.cc:6:
/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:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   18 |         ma = max(dp[x][0] - dp[x][1]);
      |              ~~~^~~~~~~~~~~~~~~~~~~~~
/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>
using namespace std;
typedef long long ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
vector<int> pathes[100200];
int dist[100200];
bool flag = false;
vector<int> connect;
bool allOdds[100200];

void search(int from, int now, int cost){
    if(dist[now] == INF){
        dist[now] = cost;
        if(pathes[now].size() > 2){
            connect.push_back(now);
            if(cost % 2 == 0){
                allOdds[now] = false;
            }
            return;
        }
        for(int i = 0; i < pathes[now].size(); i++){
            if(pathes[now][i] == from) continue;
            search(now, pathes[now][i], cost + 1);
        }
        return;
    }
    if(dist[now] % 2 == 0){
        if(cost % 2 == 0){
            flag = true;
            return;
        }
        return;
    }
    if(cost % 2 == 0){
        allodds[now] = false;
    }
    dist[now] = cost;
    return;
}

int main() {
    //cout.precision(10);
    int n;
    cin >> n;
    for(int i = 1; i < n; i++){
        int a, b;
        cin >> a >> b;
        pathes[a].push_back(b);
        pathes[b].push_back(a);
    }
    int first = 0;
    bool leaf[100200];
    for(int i = 1; i <= n; i++){
        allOdds[i] = true;
        if(pathes[i].size() == 1){
            leaf[i] = true;
            if(first == 0){
                first = i;
            }
        } else {
            leaf[i] = false;
        }
    }
    for(int i = 1; i <= n; i++){
        dist[i] = INF;
    }
    /*for(int i = 1; i <= n; i++){
        int counter = 0;
        for(int j = 0; j < pathes[i].size(); j++){
            if(leaf[pathes[i][j]]){
                counter++;
            }
        }
        if(counter >= 2){
            cout << "First" << endl;
            return 0;
        }
    }*/
    for(int i = 1; i <= n; i++){
        if(leaf[i]){
            if(dist[i] != INF){
                if(dist[i] % 2 == 1){
                    cout << "First" << endl;
                    return 0;
                }
            }
            search(1000000, i, 1);
            if(flag){
                cout << "First" << endl;
                return 0;
            }
        }
    }
    for(int i = 0; i < connect.size(); i++){
        if(allOdds[i]){
            cout << "First" << endl;
            return 0;
        }
    }
    cout << "Second" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'void search(int, int, int)':
a.cc:39:9: error: 'allodds' was not declared in this scope; did you mean 'allOdds'?
   39 |         allodds[now] = false;
      |         ^~~~~~~
      |         allOdds
Language: C++

#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cassert>
#define ll long long
using namespace std;
inline int read(){
	int re=0,flag=1;char ch=getchar();
	while(ch>'9'||ch<'0'){
		if(ch=='-') flag=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9') re=(re<<1)+(re<<3)+ch-'0',ch=getchar();
	return re*flag;
}
int n,first[100010],dep[100010],cnte=-1,cur[100010];
struct edge{
	int to,next,w;
}a[600010];
inline void add(int u,int v,int w){
	a[++cnte]=(edge){v,first[u],w};first[u]=cnte;
	a[++cnte]=(edge){u,first[v],w};first[v]=cnte;
}
vector<int>e[100010];
void getd(int u,int f){
	int i,v;dep[u]=dep[f]+1;
	if(dep[u]&1){
		add(0,u,1);
		if(f) add(u,f,1);
	}
	else{
		add(u,n+1,1);
		if(f) add(f,u,1);
	}
	for(i=0;i<e[u].size();i++) if((v=e[u][i])!=f) getd(v,u);
}
int q[100010],head,tail;
bool bfs(int s,int t){
	int i,u,v;head=0,tail=1;
	for(i=s;i<=t;i++) dep[i]=-1,cur[i]=first[i];
	dep[s]=0;q[0]=s;
	while(head<tail){
		u=q[head++];
		for(i=first[u];~i;i=a[i].next){
			v=a[i].to;if(~dep[v]||!a[i].w) continue;
			dep[v]=dep[u]+1;q[tail++]=v;
		}
	}
	return ~dep[t];
}
int dfs(int u,int t,int lim){
	if(u==t||!lim) return lim;
	int i,v,f,flow=0;
	for(i=cur[u];~i;i=a[i].next){
		v=a[i].to;cur[u]=i;
		if(dep[v]==dep[u]+1&&(f=dfs(v,t,min(lim,a[i].w)))){
			flow+=f;lim-=f;
			a[i].w-=f;a[i^1].w+=f;
			if(!lim) return flow;
		}
	}
	return flow;
}
int dinic(int s,int t){
	int re=0;
	while(bfs(s,t)) re+=dfs(s,t,1e9);
	return re;
}
int main(){
	memset(first,-1,sizeof(first));
	n=read();int i,t1,t2;
	for(i=1;i<n;i++){
		t1=read();t2=read();
		e[t1].push_back(t2);
		e[t2].push_back(t1);
	}
	getd(1,0);
	if(dinic(0,n+1)*2==n) puts("Second");
	else puts("First");
}

Compiler output:
a.cc:26:1: error: 'vector' does not name a type
   26 | vector<int>e[100010];
      | ^~~~~~
a.cc: In function 'void getd(int, int)':
a.cc:37:19: error: 'e' was not declared in this scope
   37 |         for(i=0;i<e[u].size();i++) if((v=e[u][i])!=f) getd(v,u);
      |                   ^
a.cc: In function 'int main()':
a.cc:76:17: error: 'e' was not declared in this scope
   76 |                 e[t1].push_back(t2);
      |                 ^
Language: C++

#include "bits/stdc++.h"
#define ll long long
#define rep2(i,a,b) for(int i=a;i<=b;++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define pii pair<int,int>
#define tii tuple<int,int,int>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define edge(v,a,b) v[a].pb(b);v[b].pb(a);
ll int MOD=1e9+7;
#define INF 2*1e9
#define N 310000 
using namespace std;
string alphabet("abcdefghijklmnopqrstuvwxyz");
vector<int> v[N];
int used[N];
int dfs(int a){
    int t=0;
    int ans=1;
    Used[a]=1;
    rep(i,v[a].size()){
        int b=v[a][i];
        if(v[b].size()==1) t++;
        if(!used[b]) ans=ans&dfs();
    }
    if(t>1) ans=0;
    return ans;
}
main(){
    int n;
    cin>>n;

    rep(i,n-1){
        int a,b;
        cin>>a>>b;
        v[a].pb(b);
        v[b].pb(a);
    }
    int mem[N]={};
    rep2(i,1,n){
        int t=0;
        rep(j,v[i].size()){
            if(v[v[i][j]].size()==1){
                t++;
            }
        }
        if(t>1){
            cout<<"First";return 0;
        }
        if(t) mem[i]=1;
    }
    rep2(i,1,n){
        bool flag=true;
        rep(j,v[i].size()){
            if(!mem[v[i][j]]) flag=false;
        }
        if(flag){
            cout<<"First"; return 0;
        }
    }
    cout<<"Second";return 0;
}



Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:21:5: error: 'Used' was not declared in this scope; did you mean 'used'?
   21 |     Used[a]=1;
      |     ^~~~
      |     used
a.cc:25:33: error: too few arguments to function 'int dfs(int)'
   25 |         if(!used[b]) ans=ans&dfs();
      |                              ~~~^~
a.cc:18:5: note: declared here
   18 | int dfs(int a){
      |     ^~~
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#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};

vector<int> v[101010];
int n,dp[2][101010];
int dfs(int k,int x,int par){
    if(dp[x][k]!=0)return dp[x][k];
    int ret=0;
    if(x==1){
        ret=1;
        for(auto e:v[k])if(e!=par)ret+=min(dfs(e,1,k),dfs(e,0,k));
    }
    else for(auto e:v[k])if(e!=par)ret+=dfs(e,1,k);
    return dp[x][k]=ret;
}
int main(){
    cin>>n;
    rep(i,n-1){
        int a,b;
        cin>>a>>b;
        a--;
        b--;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    a[0]=1;
    int ans=min(dfs(0,1,-1),dfs(0,0,-1));
    if(2*ans<n)cout<<"First"<<endl;
    else cout<<"Second"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:5: error: 'a' was not declared in this scope
   44 |     a[0]=1;
      |     ^
Language: C++

#include<bits/stdc++.h>
#define N 200005
using namespace std;
int head[N],ver[N],nxt[N],tot;
void add(int a,int b)
{
	tot++;nxt[tot]=head[a];head[a]=tot;ver[tot]=b;return ;
}
int g[N];
bool flag,n;
void dfs(int x,int f)
{
	g[x]=0;
	for(int i=head[x];i;i=nxt[i])
	{
		if(ver[i]==f)continue;
		dfs(ver[i],x);
		if(!g[ver[i]])
		{
			if(!g[x])g[x]=1;
			else flag=1; 
		}
	}
}
int main()
{
	scanf("%d",&n)
	
		tot=0;
		int t1,t2;flag=0;
		for(int i=1;i<n;i++)
		{
			scanf("%d%d",&t1,&t2);
			add(t1,t2);add(t2,t1);
		}
		dfs(1,-1);
		for(int i=1;i<=n;i++)head[i]=0;
		if(flag||!g[1])puts("First");
		else puts("Second");
	
	return 0;	
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before 'tot'
   27 |         scanf("%d",&n)
      |                       ^
      |                       ;
   28 | 
   29 |                 tot=0;
      |                 ~~~