#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
int n;
cin >> n;
for(int i=0; i<n; i++){
int u, v;
cin >> u >> v;
}
if(n % 4)
cout << -1 << endl;
else cout << n/2 << endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
15 ms |
1456 KB |
Output is correct |
6 |
Correct |
15 ms |
1460 KB |
Output is correct |
7 |
Correct |
15 ms |
1484 KB |
Output is correct |
8 |
Correct |
14 ms |
1464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
15 ms |
1456 KB |
Output is correct |
6 |
Correct |
15 ms |
1460 KB |
Output is correct |
7 |
Correct |
15 ms |
1484 KB |
Output is correct |
8 |
Correct |
14 ms |
1464 KB |
Output is correct |
9 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |