Submission #656231

# Submission time Handle Problem Language Result Execution time Memory
656231 2022-11-06T15:20:56 Z Hydroxic_Acid Logičari (COCI21_logicari) C++17
0 / 110
3 ms 3028 KB
#include <iostream>
#include <cstring>
#include <vector>
using namespace std;

int N;
vector<int> adjl[100005];
bool visited[100005];
int see[100005];

int main(){
    freopen("test.txt", "r", stdin);
    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;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:12:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |     freopen("test.txt", "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# 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 3 ms 3028 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 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 -