This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <vector>
#include <set>
typedef long long ll;
using namespace std;
const ll S = 500; //5e5 + 8
class Solution {
public:
ll N, R, mainRank;
vector<ll> rank;
ll help(){
cin >> N >> R >> mainRank;
for (int i = 1; i < 2 * N; i++){
ll R; cin >> R; rank.push_back(R);
}
if (mainRank == 1) return 1;
if (mainRank == 2 * N) return (N == 1? 1 : 2);
return -1;
}
};
int main(){
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
Solution p;
cout << p.help() << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |