답안 #658378

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
658378 2022-11-13T03:53:39 Z sam571128 Logičari (COCI21_logicari) C++17
10 / 110
33 ms 6928 KB
#include <bits/stdc++.h>

#define fastio ios_base::sync_with_stdio(0); cin.tie(0);
#define int long long

using namespace std;

const int N = 1e5+5;
vector<int> adj[N];

signed main(){
	fastio
	int n;
	cin >> n;
	for(int i = 1;i <= n;i++){
		int u,v;
		cin >> u >> v;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	cout << (n%4==0 ? 2*n/4 : -1) << "\n";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2672 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 33 ms 6928 KB Output is correct
6 Correct 31 ms 6924 KB Output is correct
7 Correct 31 ms 6860 KB Output is correct
8 Correct 30 ms 6856 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2644 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 2 ms 2672 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 33 ms 6928 KB Output is correct
6 Correct 31 ms 6924 KB Output is correct
7 Correct 31 ms 6860 KB Output is correct
8 Correct 30 ms 6856 KB Output is correct
9 Incorrect 1 ms 2644 KB Output isn't correct
10 Halted 0 ms 0 KB -