Language: Java

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define pii pair<int, int>
#define p3i pair<pii, int>
#define pll pair<ll, ll>
#define p3l pair<pll, ll>
#define vi vector<int>
#define vpii vector<pii>
#define vp3i vector<p3i>
#define vpll vector<pll>
#define vp3l vector<p3l>
#define lseg L, (L+R)/2, N*2+1
#define rseg (L+R)/2+1, R, N*2+2
#define ub upper_bound
#define lb lower_bound
#define pq priority_queue
#define MN 1000000007
#define fox(k, x) for (int k=0; k<x; ++k)
#define fox1(k, x) for (int k=1; k<=x; ++k)
#define foxr(k, x) for (int k=x-1; k>=0; --k)
#define fox1r(k, x) for (int k=x; k>0; --k)
#define ms multiset
#define flood(x) memset(x, 0x3f3f3f3f, sizeof x)
#define drain(x) memset(x, 0, sizeof x)
#define rng() ((rand() << 14)+rand())
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
char _;
#define pi 3.14159265358979323846

int n, x, y;
pii ed;
vector<int> v[200005];
void dfs(int N, int P, int D){
  ed = max(mp(D, N), ed);
  fox(l, v[N].size()){
    if (v[N][l]==P) continue;
    dfs(v[N][l], N, D+1);
  }
}
int32_t main(){
  scanf("%i", &n);
  fox(l, n-1){
    scanf("%i%i", &x, &y);
    v[x].pb(y);
    v[y].pb(x);
  }
  ed = mp(-1, -1);
  dfs(1, -1, 1);
  ed.x = -1;
  dfs(ed.y, -1, 1);
  if (ed.x%3 == 2) printf("Second");
  else printf("First");
  return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:3: error: illegal character: '#'
#define ll long long
^
Main.java:3: error: class, interface, enum, or record expected
#define ll long long
        ^
Main.java:4: error: illegal character: '#'
#define mp make_pair
^
Main.java:5: error: illegal character: '#'
#define pb push_back
^
Main.java:6: error: illegal character: '#'
#define x first
^
Main.java:7: error: illegal character: '#'
#define y second
^
Main.java:8: error: illegal character: '#'
#define pii pair<int, int>
^
Main.java:9: error: illegal character: '#'
#define p3i pair<pii, int>
^
Main.java:10: error: illegal character: '#'
#define pll pair<ll, ll>
^
Main.java:11: error: illegal character: '#'
#define p3l pair<pll, ll>
^
Main.java:12: error: illegal character: '#'
#define vi vector<int>
^
Main.java:13: error: illegal character: '#'
#define vpii vector<pii>
^
Main.java:14: error: illegal character: '#'
#define vp3i vector<p3i>
^
Main.java:15: error: illegal character: '#'
#define vpll vector<pll>
^
Main.java:16: error: illegal character: '#'
#define vp3l vector<p3l>
^
Main.java:17: error: illegal character: '#'
#define lseg L, (L+R)/2, N*2+1
^
Main.java:18: error: illegal character: '#'
#define rseg (L+R)/2+1, R, N*2+2
^
Main.java:19: error: illegal character: '#'
#define ub upper_bound
^
Main.java:20: error: illegal character: '#'
#define lb lower_bound
^
Main.java:21: error: illegal character: '#'
#define pq priority_queue
^
Main.java:22: error: illegal character: '#'
#define MN 1000000007
^
Main.java:23: error: illegal character: '#'
#define fox(k, x) for (int k=0; k<x; ++k)
^
Main.java:23: error: class, interface, enum, or record expected
#define fox(k, x) for (int k=0; k<x; ++k)
                                ^
Main.java:23: error: class, interface, enum, or record expected
#define fox(k, x) for (int k=0; k<x; ++k)
                                     ^
Main.java:24: error: illegal character: '#'
#define fox1(k, x) for (int k=1; k<=x; ++k)
^
Main.java:24: error: class, interface, enum, or record expected
#define fox1(k, x) for (int k=1; k<=x; ++k)
                                 ^
Main.java:24: error: class, interface, enum, or record expected
#define fox1(k, x) for (int k=1; k<=x; ++k)
                                       ^
Main.java:25: error: illegal character: '#'
#define foxr(k, x) for (int k=x-1; k>=0; --k)
^
Main.java:25: error: class, interface, enum, or record expected
#define foxr(k, x) for (int k=x-1; k>=0; --k)
                                   ^
Main.java:25: error: class, interface, enum, or record expected
#define foxr(k, x) for (int k=x-1; k>=0; --k)
                                         ^
Main.java:26: error: illegal character: '#'
#define fox1r(k, x) for (int k=x; k>0; --k)
^
Main.java:26: error: class, interface, enum, or record expected
#define fox1r(k, x) for (int k=x; k>0; --k)
                                  ^
Main.java:26: error: class, interface, enum, or record expected
#define fox1r(k, x) for (int k=x; k>0; --k)
                                       ^
Main.java:27: error: illegal character: '#'
#define ms multiset
^
Main.java:28: error: illegal character: '#'
#define flood(x) memset(x, 0x3f3f3f3f, sizeof x)
^
Main.java:29: error: illegal character: '#'
#define drain(x) memset(x, 0, sizeof x)
^
Main.java:30: error: illegal character: '#'
#define rng() ((rand() << 14)+rand())
^
Main.java:31: error: illegal character: '#'
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
^
Main.java:31: error: class, interface, enum, or record expected
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
                                             ^
Main.java:31: error: class, interface, enum, or record expected
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
                                                         ^
Main.java:31: error: class, interface, enum, or record expected
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
                                                                             ^
Main.java:31: error: class, interface, enum, or record expected
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
                                                                                                    ^
Main.java:33: error: illegal character: '#'
#define pi 3.14159265358979323846
^
Main.java:33: error: class, interface, enum, or record expected
#define pi 3.14159265358979323846
        ^
Main.java:36: error: unnamed classes are a preview feature and are disabled by default.
pii ed;
^
  (use --enable-preview to enable unnamed classes)
Main.java:37: error: class, interface, enum, or record expected
vector<int> v[200005];
^
Main.java:40: error: ';' expected
  fox(l, v[N].size()){
                     ^
Main.java:46: error: illegal start of expression
  scanf("%i", &n);
              ^
Main.java:47: error: ';' expected
  fox(l, n-1){
             ^
Main.java:48: error: illegal start of expression
    scanf("%i%i", &x, &y);
                  ^
Main.java:48: error: illegal start of expression
    scanf("%i%i", &x, &y);
                      ^
53 errors