Problem:
Problem Statement

There are N piles of candies on the table. The piles are numbered 1 through N. At first, pile i contains a_i candies.

Snuke and Ciel are playing a game. They take alternating turns. Snuke goes first. In each turn, the current player must perform one of the following two operations:

Choose a pile with the largest number of candies remaining, then eat all candies of that pile.

From each pile with one or more candies remaining, eat one candy.

The player who eats the last candy on the table, loses the game. Determine which player will win if both players play the game optimally.

Constraints

1≤N≤10^5

1≤a_i≤10^9

Input

The input is given from Standard Input in the following format:

N
a_1 a_2 … a_N

Output

If Snuke will win, print First. If Ciel will win, print Second.

Sample Input 1

2
1 3

Sample Output 1

First

At the beginning of the game, pile 2 contains the most candies. If Snuke eats all candies of this pile, Ciel has no choice but to eat the last candy.

Sample Input 2

3
1 2 1

Sample Output 2

First

If Snuke eats one candy from each pile, Ciel is again left with the last candy.

Sample Input 3

3
1 2 3

Sample Output 3

Second

Solution in C++14 (Clang 3.8.0) (judge verdict: Wrong Answer)

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>
#include <deque>
#include <iomanip>
#include <cstdio>
#include <stack>
#include <numeric>
#include <cassert>
using namespace std;
typedef  long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define  MP make_pair
#define  PB push_back
#define inf 1000000007
#define mod 1000000007
#define rep(i,n) for(int i=0;i<(int)(n);++i)

int main(){
    int n;
    cin >> n;
    vector<int>a(n);
    rep(i,n){
        cin >> a[i];
    }
    sort(a.begin(),a.end());
    int h = a[0];
    bool p = 0;
    bool ok = 0;
    for(int i=1;i<n;i++){
        if(a[i]==a[i-1]){
            p = !p;
        }else{
            bool q = (a[i]-h)%2;
            if(q){
                if(p){
                    if(h+i==n||h+i-1==n){
                        ok = 1;
                    }else if(h+i-1>n){
                        int k = h-2+i-n+1;
                        if(k%2==1){
                            cout << "Second" << endl;
                        }else{
                            cout << "First" << endl;
                        }
                        return 0;
                    }
                }
            }else{
                if(!p){
                    if(h+i==n||h+i+1==n){
                        ok = 1;
                    }else if(h+i>n){
                        int k = h-1+i-n+1;
                        if(k%2==1){
                            cout << "Second" << endl;
                        }else{
                            cout << "First" << endl;
                        }
                        return 0;
                    }
                }
            }
            h = a[i];
            p = 0;
        }
    }
    if(ok||((a[n-1]%2==0)^p)){
        cout << "First" << endl;
    }else{
        cout << "Second" << endl;
    }

    return 0;
}