# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
764563 | 2023-06-23T15:18:01 Z | pere_gil | Logičari (COCI21_logicari) | C++14 | 15 ms | 1440 KB |
#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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 304 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 304 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 15 ms | 1428 KB | Output is correct |
6 | Correct | 14 ms | 1364 KB | Output is correct |
7 | Correct | 14 ms | 1412 KB | Output is correct |
8 | Correct | 14 ms | 1440 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 304 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 304 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 15 ms | 1428 KB | Output is correct |
6 | Correct | 14 ms | 1364 KB | Output is correct |
7 | Correct | 14 ms | 1412 KB | Output is correct |
8 | Correct | 14 ms | 1440 KB | Output is correct |
9 | Incorrect | 1 ms | 212 KB | Output isn't correct |
10 | Halted | 0 ms | 0 KB | - |