#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 |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
856 KB |
Output isn't correct |
5 |
Incorrect |
20 ms |
5472 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
736 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
992 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
11 |
Incorrect |
3 ms |
988 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
13 |
Incorrect |
19 ms |
2580 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
15 |
Incorrect |
4 ms |
1024 KB |
Output isn't correct |
16 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
17 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
18 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
19 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
20 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
21 |
Incorrect |
2 ms |
964 KB |
Output isn't correct |
22 |
Incorrect |
3 ms |
992 KB |
Output isn't correct |
23 |
Incorrect |
25 ms |
5844 KB |
Output isn't correct |
24 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
25 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
26 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
27 |
Incorrect |
3 ms |
992 KB |
Output isn't correct |
28 |
Incorrect |
20 ms |
2608 KB |
Output isn't correct |
29 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
30 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
31 |
Incorrect |
3 ms |
988 KB |
Output isn't correct |
32 |
Incorrect |
25 ms |
5072 KB |
Output isn't correct |
33 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
34 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
35 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
36 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
37 |
Incorrect |
2 ms |
992 KB |
Output isn't correct |
38 |
Incorrect |
3 ms |
992 KB |
Output isn't correct |
39 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
40 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
41 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
42 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
43 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
44 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
45 |
Incorrect |
2 ms |
1244 KB |
Output isn't correct |
46 |
Incorrect |
3 ms |
992 KB |
Output isn't correct |
47 |
Incorrect |
22 ms |
4724 KB |
Output isn't correct |