Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- const int sz = 300100;
- int main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- int n;
- cin>>n;
- int a[n];
- int tmp, q, one, two;
- for (int i = 1; i < n+1; i++)
- {
- cin>>tmp;
- a[tmp] = i;
- }
- cin>>q;
- while (q--)
- {
- cin>>one>>two;
- if (a[one]<a[two])
- cout<<"First"<<endl;
- else
- cout<<"Second"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement