# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
222392 | 2020-04-13T06:22:10 Z | cheeheng | Checker (COCI19_checker) | C++14 | 5 ms | 768 KB |
#include <bits/stdc++.h> using namespace std; char colour[100005]; int deg[100005]; 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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 768 KB | Output is correct |
2 | Correct | 5 ms | 768 KB | Output is correct |
3 | Incorrect | 5 ms | 768 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 768 KB | Output is correct |
2 | Correct | 5 ms | 768 KB | Output is correct |
3 | Incorrect | 5 ms | 768 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 640 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 768 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 768 KB | Output is correct |
2 | Correct | 5 ms | 768 KB | Output is correct |
3 | Incorrect | 5 ms | 768 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |