Submission #656232

# Submission time Handle Problem Language Result Execution time Memory
656232 2022-11-06T15:21:18 Z Hydroxic_Acid Logičari (COCI21_logicari) C++17
10 / 110
69 ms 7364 KB
#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
1 Correct 2 ms 3028 KB Output is correct
2 Correct 2 ms 3028 KB Output is correct
3 Correct 2 ms 3028 KB Output is correct
4 Correct 2 ms 3028 KB Output is correct
5 Correct 69 ms 7324 KB Output is correct
6 Correct 66 ms 7292 KB Output is correct
7 Correct 69 ms 7364 KB Output is correct
8 Correct 65 ms 7288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 3028 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 3028 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3028 KB Output is correct
2 Correct 2 ms 3028 KB Output is correct
3 Correct 2 ms 3028 KB Output is correct
4 Correct 2 ms 3028 KB Output is correct
5 Correct 69 ms 7324 KB Output is correct
6 Correct 66 ms 7292 KB Output is correct
7 Correct 69 ms 7364 KB Output is correct
8 Correct 65 ms 7288 KB Output is correct
9 Incorrect 2 ms 3028 KB Output isn't correct
10 Halted 0 ms 0 KB -