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 Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.io.*;
import java.util.*;


class Main {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        int n=sc.nextInt();
        long[]a=new long[n];
        for(int i=0;i<n;++i)a[i]=sc.nextLong();
        Arrays.sort(a);
        int p=0;
        Map<Long,Integer>hm=new HashMap<Long,Integer>();
        for(int i=0;i<n;++i)
            if(i<=0||a[i]!=a[i-1])hm.put(a[i],p++);
        int[]f=new int[p];
        long[]c=new long[p];
        p=0;
        for(int i=0;i<n;++i)
            if(i<=0||a[i]!=a[i-1])c[p++]=a[i];
        for(int i=0;i<n;++i)f[hm.get(a[i])]++;
        for(int i=0;i<p;++i)if(f[i]>1)throw new Error();
        int e=0,o=0;
        for(int i=0;i<p;++i){
            if(f[i]%2==1)
                if(c[i]%2==1)e++;
                else o++;
        }
        int cons=p;
        for(int i=0;i<p;++i)
            if(c[i]!=i+1){
                cons=i;
                break;
            }
        boolean snd=(e>o&&(e-o)%2==1)||(e<o&&(o-e)%2==0);
        e-=(cons+1)/2;
        o-=cons/2;
        if(cons%2==1){
            int t=e;
            e=o;
            o=t;
        }
        boolean red=(e>o&&(e-o)%2==1)||(e<o&&(o-e)%2==0);
        snd&=cons%2==0?red:!red;
        out.println(snd?"Second":"First");
        out.close();
    }
    // http://codeforces.com/blog/entry/7018
    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;
    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}