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 <cstring>
#include <vector>
using namespace std;
int N;
vector<int> adjl[100005];
bool visited[100005];
int see[100005];
int main(){
cin >> N;
for(int i = 0; i < N; i++){
int a, b; cin >> a >> b;
adjl[a].push_back(b);
adjl[b].push_back(a);
}
memset(visited, false, sizeof(visited));
memset(see, 0, sizeof(see));
if(N % 4) cout << -1;
else cout << N /2;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |