답안 #647674

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
647674 2022-10-03T14:46:14 Z GudStonks Logičari (COCI21_logicari) C++17
10 / 110
76 ms 6892 KB
#include<bits/stdc++.h>
using namespace std;
int n;
vector<int>g[100005];
void fun()
{
	cin>>n;
	for(int i = 1, a, b; i <= n; i++)
	{
		cin>>a>>b;
		g[a].push_back(b);
		g[b].push_back(a);
	}
	cout<<((n % 4 == 0) ? n / 2 : -1);
}

int main()
{
	int ttt = 1;
	//cin>>ttt;
	while(ttt--)
		fun();
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2656 KB Output is correct
3 Correct 3 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 75 ms 6796 KB Output is correct
6 Correct 74 ms 6808 KB Output is correct
7 Correct 76 ms 6892 KB Output is correct
8 Correct 76 ms 6796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Correct 2 ms 2656 KB Output is correct
3 Correct 3 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 75 ms 6796 KB Output is correct
6 Correct 74 ms 6808 KB Output is correct
7 Correct 76 ms 6892 KB Output is correct
8 Correct 76 ms 6796 KB Output is correct
9 Incorrect 2 ms 2644 KB Output isn't correct
10 Halted 0 ms 0 KB -