stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>

#include <sstream>

#include <iomanip>

#include <algorithm>

#include <cmath>

#include <string>

#include <vector>

#include <list>

#include <queue>

#include <stack>

#include <set>

#include <map>

#include <bitset>

#include <numeric>

#include <climits>

#include <cfloat>

using namespace std;



int n;

vector<int> w, s;

vector<bool> used;

vector<int> bestIndex;

int bestG;



void solve(int k, vector<int>& index, int g, int sumW)

{

    if(k == n){

        if(g < bestG){

            bestG = g;

            bestIndex = index;

        }

        return;

    }



    for(int i=0; i<n; ++i){

        if(used[i])

            continue;

        used[i] = true;

        if(s[i] >= sumW){

            index[k] = i;

            solve(k+1, index, g+(n-k)*w[i], sumW+w[i]);

        }

        used[i] = false;

    }

}



int main()

{

    for(;;){

        cin >> n;

        if(n == 0)

            return 0;



        vector<string> name(n);

        w.resize(n);

        s.resize(n);

        for(int i=0; i<n; ++i)

            cin >> name[i] >> w[i] >> s[i];



        bestG = INT_MAX;

        used.assign(n, false);

        vector<int> index(n);

        solve(0, index, 0, 0);

        for(int i=n-1; i>=0; --i)

            cout << name[bestIndex[i]] << endl;

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.7757591997553381x):
#include <iostream>

#include <sstream>

#include <iomanip>

#include <algorithm>

#include <cmath>

#include <string>

#include <vector>

#include <list>

#include <queue>

#include <stack>

#include <set>

#include <map>

#include <bitset>

#include <numeric>

#include <climits>

#include <cfloat>

using namespace std;



class Data

{

public:

    int w, s;

    string name;

    bool operator<(const Data& d) const{

        return s < d.s;

    }

};



int n;

vector<Data> d;

vector<bool> used;

vector<int> bestIndex;

int bestG;



void solve(int k, vector<int>& index, int g, int sumW)

{

    if(k == n){

        if(g < bestG){

            bestG = g;

            bestIndex = index;

        }

        return;

    }



    for(int i=0; i<n; ++i){

        if(used[i])

            continue;

        if(d[i].s >= sumW){

            used[i] = true;

            index[k] = i;

            solve(k+1, index, g+(n-k)*d[i].w, sumW+d[i].w);

            used[i] = false;

        }else{

            return;

        }

    }

}



int main()

{

    for(;;){

        cin >> n;

        if(n == 0)

            return 0;



        d.resize(n);

        for(int i=0; i<n; ++i)

            cin >> d[i].name >> d[i].w >> d[i].s;

        sort(d.begin(), d.end());



        bestG = INT_MAX;

        used.assign(n, false);

        vector<int> index(n);

        solve(0, index, 0, 0);

        for(int i=n-1; i>=0; --i)

            cout << d[bestIndex[i]].name << endl;

    }

}
// Slower C++ solution:
#include <cstdio>

#include <cfloat>

using namespace std;



char f[10][21];

int n, w[10], s[10], a[10], b[10];

bool u[10];

double maxg;



void dfs(int x, int tw, int m, double g) {

  if (m == n) {

    if (maxg < g) {

      maxg = g;

      for (int i=0; i<n; i++) {

        b[i] = a[i];

      }

    }

    return;

  }

  if (x>=n) {

    return;

  }

  if (!u[x] && tw <= s[x]) {

    u[x] = true;

    tw += w[x];

    a[m] = x;

    dfs(0, tw, m+1, g + w[x]*(m+1));

    tw -= w[x];

    u[x] = false;

  }

  dfs(x+1, tw, m, g);

}



int main() {

  while (1) {

    scanf("%d", &n);

    if (!n) break;

    for (int i=0; i<n; i++) {

      scanf("%s %d %d", f[i], &w[i], &s[i]);

    }

    for (int i=0; i<n; i++) {

      u[i] = false;

    }

    maxg = -DBL_MAX;

    dfs(0, 0, 0, 0.);

    for (int i=n-1; i>=0; i--) {

      printf("%s\n", f[b[i]]);

    }

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.020781216530461x):
#include <cstdio>

#include <algorithm>

using namespace std;



struct C {

  int id;

  int w;

  int s;

  static bool compare(const C &l, const C &r) {

    if (l.w > r.w) {

      return true;

    } else if (l.w < r.w) {

      return false;

    } else {

      return (l.s > r.s);

    }

  }

};



int main() {

  C c[10];

  char f[10][21];

  int n, tw, a[10];

  bool u[10];

  while (1) {

    scanf("%d", &n);

    if (!n) break;

    for (int i=0; i<n; i++) {

      c[i].id = i;

      scanf("%s %d %d", f[i], &c[i].w, &c[i].s);

    }

    sort(c, c+n, C::compare);

    tw = 0;

    for (int i=0; i<n; i++) {

      tw += c[i].w;

    }

    for (int i=0; i<n; i++) {

      u[i] = false;

    }

    for (int i=0; i<n; i++) {

      for (int j=0; j<n; j++) {

        if (!u[j] && tw - c[j].w <= c[j].s) {

          tw -= c[j].w;

          a[i] = c[j].id;

          u[j] = true;

          break;

        }

      }

    }

    for (int i=0; i<n; i++) {

      printf("%s\n", f[a[i]]);

    }

  }

  return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <sstream>

#include <string>

#include <algorithm>

using namespace std;



template <class F, class T>

void convert(const F &f, T &t){

	stringstream ss;

	ss << f;

	ss >> t;

}



int main(){

	int x, a, b;

	string s;

	while(scanf("%d", &x), x){

		if(x % 1111 == 0){

			puts("NA");

		}

		else{

			int ans;

			for(ans = 0; x != 6174; ++ans){

				convert(x, s);

				s.resize(4, '0');

				sort(s.begin(), s.end());

				convert(s, a);

				reverse(s.begin(), s.end());

				convert(s, b);

				x = b - a;

			}

			printf("%d\n", ans);

		}

	}

}

// Faster C++ solution for the same problem (measured speedup: 4.291335966803987x):
#include <cstdio>

#include <algorithm>

#include <cstdlib>

#include <climits>

using namespace std;



int ans[10010];

char tmp[8];



int dfs(int x){

	if(ans[x] >= 0){

		return ans[x];

	}

	if(ans[x] != -1){

		return INT_MIN;

	}

	ans[x] = INT_MIN;



	sprintf(tmp, "%04d", x);

	sort(tmp, tmp + 4);

	int b = strtol(tmp, 0, 10);

	reverse(tmp, tmp + 4);

	int a = strtol(tmp, 0, 10);

	ans[x] = dfs(a - b) + 1;

	return ans[x];

}





int main(){

	for(int i = 0; i < 10005; ++i){

		ans[i] = -1;

	}

	ans[6174] = 0;



	int n;

	while(scanf("%d", &n), n){

		int a = dfs(n);

		printf(a < 0 ? "NA\n" : "%d\n", a);

	}

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.534228195529552x):
#include <bits/stdc++.h>

#define _ ios_base::sync_with_stdio(0);cin.tie(0);

using namespace std;

long long int poo(int,int);

int main(){

	long long int a,b;

	cin>>a>>b;

	long long int c=b/a;

	for(int i=0;;i++){

		if(c<poo(2,i)){

			cout<<i<<endl;

			break;

		}

	}

}

long long int poo(int a,int b){

	long long int c=a;

	for(int i=1;i<b;i++){

		c*=a;

	}

	if(b==0){

		c=1;

	}

	return c;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.537972932559971x):
#include<iostream>

using namespace std;



int main() {

    long long int x, y;

    cin >> x >> y;

    int cnt = 1;

    long long int n = y/x + 1;

    for(int i = 0; i < n; i++){

        if(x * 2 > y){

            break;

        }else{

            x *= 2;

            cnt++;

        }

    }

    cout << cnt << '\n';

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.4925061775890898x):
#include <bits/stdc++.h>

#define IOS ios_base::sync_with_stdio(false); cin.tie(0);

#define endl '\n'

#define ll long long int

using namespace std;



ll a, b, ans;



int main(){

    IOS;

    cin >> a >> b;

    for(ll i=a; i<=b; i*=2){

        ans++;

    }

    cout << ans << endl;

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.5395428847340713x):
#include <bits/stdc++.h>

using namespace std;



#define      ll     long long int



int main()

{

    ll x, y, c = 0;

    cin >> x >> y;

    while (x <= y) {

        c++;

        x = x * 2;

    }

    cout << c << '\n';

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.537075013375191x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

long long int a,b,c,d,e,i,j,k=0;

vector<long long>v;

cin>>a>>b;

while(1)

{

        if(a>b)break;

   // cout<<a<<endl;   

        

a=a*2;k++;

       

}

cout<<k<<endl;



}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.543233006904606x):
#include <iostream>

using namespace std;

int main() {

   long long x,y,answer=0;

   cin>>x>>y;

   for(long long i=x;i<=y;i*=2)

   answer++;

   cout<<answer;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.4943726426558808x):
#include <bits/stdc++.h>

using namespace std;



long long x, y, tmp=1, arr[60], ans=1;



int main () {

	ios_base::sync_with_stdio(false);

	cin>>x>>y;

	

	for(long long i=0; true; i++){

		if(x>y){

			cout<<i<<endl;

			break;

		}

		else x*=2;

	}

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.5278711039042028x):
#include <iostream>

#include <cmath>

using namespace std;

long long x,y,maks;

int main() {

cin>>x>>y;

for(long long i=1;i<100;i++) {

	maks=pow(2,i-1)*x;

	if(maks>y) {

		cout<<i-1<<endl;

		break;

	}

}

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define pb push_back

#define rep(i,n) for(int i=0;i<n;i++)

#define rep1(i,n) for(int i=1;i<=n;i++)

#define mp make_pair

#define F first

#define S second

#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

typedef long long ll;

vector<int> g[100005];

ll q,n;

ll a[1500005];

int main()

{

    //IOS;

    ll x,y;

    while(cin>>x>>y)

    {

        ll sum=0;

        for(sum=0;x<=y;x=x*2,sum++);

        cout<<sum<<"\n";

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.5379165499309866x):
#include <iostream>

using namespace std;



long long X, Y, A, Z;



int main() {

    cin>>X>>Y;

    long long i = X;

    while(i<=Y) {

        Z++;

        i=i*2;

    }

    cout<<Z<<endl;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<algorithm>

using namespace std;



long long read(){

    long long x=0,f=1;

    char ch;

    do{ch=getchar();if(ch=='-')f=-1;}while(ch<'0'||ch>'9');

    do{x=x*10+ch-'0';ch=getchar();}while(ch>='0'&&ch<='9');

    return x*f;

}



long long x,y,ans=0;

int main(){

    x=read();

    y=read();

    while(x<=y){

        ans++;

        x*=2;

    }

    printf("%lld\n",ans);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.189202968437501x):
#include<stdio.h>

long long x,y,res;

int main()

{

	scanf("%lld%lld",&x,&y,&res);

	long long i=x;

	while(i<=y)

	{

		res++;

		i<<=1;

	}

	printf("%d\n",res);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

long long x,y,ans,sum;

int main(){   

    cin>>x>>y;

    ans=(y/x);

    while(ans)ans/=2,sum++;

    cout<<sum;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.216086198438716x):
#include<stdio.h>

long long x,y,res;

int main()

{

	scanf("%lld%lld",&x,&y,&res);

	long long i=x;

	while(i<=y)

	{

		res++;

		i<<=1;

	}

	printf("%d\n",res);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    long long int a,b;

    long long int res=0;

    cin>>a>>b;

    while(a<=b)

    {

        a=a*2;

        res++;

    }

    cout<<res<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261408886569925x):
#include <stdio.h>





int main()

{	 

	long long x, y;

	int ans = 0;

	

	scanf("%lld%lld", &x, &y);

	while(x <= y){

		ans++;

		x <<= 1;

	}

	printf("%d\n", ans);	

		

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main() {

    long long x, y;

    cin >> x >> y;

    int res = 0;

    for (long long i = x; i <= y; i *= 2) {

        res++;

    }

    cout << res;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.254622024789446x):
#include <stdio.h>





int main()

{	 

	long long x, y;

	int ans = 0;

	

	scanf("%lld%lld", &x, &y);

	while(x <= y){

		ans++;

		x <<= 1;

	}

	printf("%d\n", ans);	

		

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define mp make_pair

#define X first

#define Y second

#define pii pair<ll,ll>

#define x1 dlfjl

#define x2 dkfj

#define x3 dflgkg

#define y1 dskgj

#define y2 dskfj

#define y3 dfhgdh

#define SQ 320

#define PI 3.14159265359

#define MOD 1000000007

typedef int ll;

using namespace std;

ll n,i,j,k,z,m,q,r,timer,v,tot,x,y,xx, yy,INF, sz;

ll a[100500], cnt[100500], col[100500];

ll dp[105][105][105];

void ass(ll i, ll j, ll k, ll val) {

    dp[i][j][k] = dp[i][k][j] = dp[j][i][k] = dp[j][k][i] = dp[k][i][j] = dp[k][j][i] = val;

}

bool ss(ll x, ll y) {

    if (min(x,y) == 0 && (x != 0 || y != 0))

        return false;

    return true;

}

int main() {

    //freopen("input.txt","r",stdin);

    cin >> n;

    for (int i = 0; i < n; i++)

        cin >> a[i];

    sort(a, a+n);

    reverse(a, a+n);

    int i = 0, j = 0;

    while (i+1 < n && j+1 < a[i+1])

        i++, j++;

        ll x = a[i]-j;

        ll y = 0;

        while (i+1 < n && j < a[i+1])

            y++, i++;

        //cout << x << " " << y << endl;

        if (x%2 && y % 2 == 0)

            cout << "Second" << endl;

        else

            cout << "First" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.306406357574008x):
#include<cstdio>

#include<algorithm>

#include<functional>

using namespace std;

int n,a[110000];

int main(){

    scanf("%d",&n);

    for (int i=1;i<=n;i++) scanf("%d",&a[i]);

    sort(a+1,a+n+1,greater<int>());

    a[0]=a[1];

    for (int i=0;i<=n;i++)

        if (a[i+1]<=i){

            int j=i+1;

            while (j<=n&&a[j]==i) j++;

            if ((j-i+1)&1||(a[i]-i)&1) puts("First");

            else puts("Second");

            break;

        } 

    return 0;

}

//atcoder 1999
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

const int maxn=100000+10;

int n,a[maxn],ans;

bool cmp(int a,int b){return a>b;}



int main()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++)

		scanf("%d",&a[i]);

	sort(a+1,a+n+1,cmp);

	for(int i=1;i<=n;i++){

		if(i+1>a[i+1]){

			for(int j=i+1;a[j]==i;j++)

				ans^=1;

			ans|=(a[i]-i)&1;

			if(ans&1) printf("First\n");

			else printf("Second\n");

			return 0;

		}

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.237094948429269x):
#include<cstdio>

#include<algorithm>

#include<functional>

using namespace std;

int n,a[110000];

int main(){

    scanf("%d",&n);

    for (int i=1;i<=n;i++) scanf("%d",&a[i]);

    sort(a+1,a+n+1,greater<int>());

    a[0]=a[1];

    for (int i=0;i<=n;i++)

        if (a[i+1]<=i){

            int j=i+1;

            while (j<=n&&a[j]==i) j++;

            if ((j-i+1)&1||(a[i]-i)&1) puts("First");

            else puts("Second");

            break;

        } 

    return 0;

}

//atcoder 1999
// Slower C++ solution:
#include <bits/stdc++.h>

#define res register int

#define N 100005

using namespace std;

int n,ans,a[100100];

inline int read()

{

  int X=0,w=0;

  char ch=0;

  while(!isdigit(ch))

  {

    w|=ch=='-';

    ch=getchar();

  }

  while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();

  return w?-X:X;

}

inline bool cmp(int x,int y)

{

  return x>y;

}

int main()

{

  n=read();

  for(res i=1; i<=n; i++)

    a[i]=read();

  sort(a+1,a+n+1,cmp);

  for(res i=1; i<=n; i++)

    if(i+1>a[i+1])

    {

      for(res j=i+1; a[j]==i; j++) ans^=1;

      ans|=(a[i]-i)&1;

      puts(ans? "First":"Second");

      return 0;

    }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.21901555912585x):
#include<cstdio>

#include<algorithm>

#include<functional>

using namespace std;

int n,a[110000];

int main(){

    scanf("%d",&n);

    for (int i=1;i<=n;i++) scanf("%d",&a[i]);

    sort(a+1,a+n+1,greater<int>());

    a[0]=a[1];

    for (int i=0;i<=n;i++)

        if (a[i+1]<=i){

            int j=i+1;

            while (j<=n&&a[j]==i) j++;

            if ((j-i+1)&1||(a[i]-i)&1) puts("First");

            else puts("Second");

            break;

        } 

    return 0;

}

//atcoder 1999
// Slower C++ solution:
#include <cstdio>

#include <cstring>

#include <iostream>

#include <algorithm>

using namespace std;

#define N 100005

int A[N], n;

bool cmp(int a, int b){return a > b;}

int main()

{

	scanf("%d", &n);

	for (int i = 1; i <= n; i++)

		scanf("%d", &A[i]);

	sort(A + 1, A + n + 1, cmp);

	for (int i = 1; i <= n; i++)

	{

		if (i <= A[i] && A[i + 1] < i + 1)

		{

			int j = 0;

			while (A[i + j + 1] == i)

				j++;

			if ((A[i] - i) % 2 == 0 && j % 2 == 0)

				puts("Second");

			else

				puts("First");

			return 0;

		}

	}

}


// Faster C++ solution for the same problem (measured speedup: 5.23325254184514x):
#include<cstdio>

#include<algorithm>

#include<functional>

using namespace std;

int n,a[110000];

int main(){

    scanf("%d",&n);

    for (int i=1;i<=n;i++) scanf("%d",&a[i]);

    sort(a+1,a+n+1,greater<int>());

    a[0]=a[1];

    for (int i=0;i<=n;i++)

        if (a[i+1]<=i){

            int j=i+1;

            while (j<=n&&a[j]==i) j++;

            if ((j-i+1)&1||(a[i]-i)&1) puts("First");

            else puts("Second");

            break;

        } 

    return 0;

}

//atcoder 1999
// Slower C++ solution:
#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 <cmath>

#include <cstdlib>

#include <ctime>

#include <memory.h>



using namespace std;



int n, ar[1000001];



int main()

{

    cin >> n;

    for(int i = 1; i <= n; i++)

        scanf("%d", &ar[i]);



    sort(ar + 1, ar + n + 1, greater<int>());



    int a = 1, b = 1;

    while(ar[b] >= a)

    {

        b++;

        a++;

    }

    b--;

    a--;



    int t1 = 1, t2 = 1;



    if((ar[b] - a) % 2 == 1)

        t1 = 0;



    int q = 0;

    for(int i = 1; i <= n; i++)

        if(ar[i] >= a)

            q++;



    if((q - a) % 2 == 1)

        t2 = 0;



    if(t2 + t1 != 2)

    {

        cout << "First" << endl;

    }else

    {

        cout << "Second" << endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.312973674029452x):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

int n,ans,a[100100];

int main(){

    scanf("%d",&n);

    for(int i=1;i<=n;i++) scanf("%d",&a[i]);

    sort(a+1,a+n+1);

    reverse(a+1,a+n+1);

    for(int i=1;i<=n;i++){

        if(i+1>a[i+1]){

               for(int j=i+1;a[j]==i;j++) ans^=1;

               ans|=(a[i]-i)&1;

               puts(ans? "First":"Second");

               return 0;

           }    

    }    

}