# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
764563 | pere_gil | Logičari (COCI21_logicari) | C++14 | 15 ms | 1440 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) a*b/gcd(a,b)
#define ii pair<int,int>
#define vi vector<int>
#define all(x) x.begin(),x.end()
int main(){
int n; scanf("%d",&n);
int u,v;
for(int i=0;i<n;i++) scanf("%d %d",&u,&v);
if(n==2) printf("2\n");
else if(n%4) printf("-1\n");
else printf("%d\n",n/2);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |