Submission #864961

# Submission time Handle Problem Language Result Execution time Memory
864961 2023-10-23T19:30:58 Z epicci23 Logičari (COCI21_logicari) C++17
10 / 110
18 ms 1576 KB
#include "bits/stdc++.h"
using namespace std;
#define int long long
#define endl '\n'
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define sz(x) ((int)(x).size())

void solve(){
  int n;
  cin >> n;
  
  for(int i=1;i<=n;i++){
    int a,b;
    cin >> a >> b;
  }

  if(n&1){
    cout << -1 << endl;
    return;
  }

  if((n/2)&1){
    cout << -1 << endl;
    return;
  }

  cout << n/2 << endl;
}


int32_t main(){

  ios::sync_with_stdio(0);
  cin.tie(0);

  int t=1;//cin >> t;
  while(t--) solve();
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 18 ms 1460 KB Output is correct
6 Correct 13 ms 1372 KB Output is correct
7 Correct 18 ms 1576 KB Output is correct
8 Correct 13 ms 1368 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 18 ms 1460 KB Output is correct
6 Correct 13 ms 1372 KB Output is correct
7 Correct 18 ms 1576 KB Output is correct
8 Correct 13 ms 1368 KB Output is correct
9 Incorrect 1 ms 348 KB Output isn't correct
10 Halted 0 ms 0 KB -