# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
222393 | 2020-04-13T06:22:47 Z | cheeheng | Checker (COCI19_checker) | C++14 | 95 ms | 2544 KB |
#include <bits/stdc++.h> using namespace std; char colour[200005]; int deg[200005]; int main(){ int ST; scanf("%d", &ST); int N; scanf("%d", &N); scanf(" %s", colour); memset(deg, 0, sizeof(deg)); for(int i = 0; i < N-3; i ++){ int a, b, c; scanf("%d%d%d", &a, &b, &c); deg[a-1] ++; deg[b-1] ++; } int temp = 0; for(int i = 0; i < N; i ++){ if(deg[i] > 0){ temp = i; break; } } vector<int> v; for(int i = 0; i < N; i ++){ if(deg[i] > 0){ v.push_back(i); } } v.push_back(temp+N); for(int x: v){ //printf("%d ", x); } if((int)v.size() > N-1){ printf("neispravna triangulacija"); return 0; } //printf("ok "); for(int i = 0; i < (int)v.size()-1; i ++){ if(v[i+1] - v[i] > 2){ printf("neispravna triangulacija"); return 0; } } printf("tocno"); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 1152 KB | Output is correct |
2 | Correct | 5 ms | 1152 KB | Output is correct |
3 | Incorrect | 5 ms | 1152 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 1152 KB | Output is correct |
2 | Correct | 5 ms | 1152 KB | Output is correct |
3 | Incorrect | 5 ms | 1152 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 81 ms | 2396 KB | Output is correct |
2 | Correct | 79 ms | 2416 KB | Output is correct |
3 | Incorrect | 76 ms | 2544 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 78 ms | 2416 KB | Output is correct |
2 | Correct | 74 ms | 2480 KB | Output is correct |
3 | Incorrect | 95 ms | 2416 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 1152 KB | Output is correct |
2 | Correct | 5 ms | 1152 KB | Output is correct |
3 | Incorrect | 5 ms | 1152 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |