# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
633684 | 2022-08-23T04:19:02 Z | Olympia | Checker (COCI19_checker) | C++17 | 3 ms | 468 KB |
#include <bits/stdc++.h> using namespace std; int main () { freopen("gangs.out", "r", stdin); int t, n; cin >> t >> n; string str; cin >> str; if (t == 1) { if (str == "1212") { cout << "neispravno bojenje"; } else if (str == "1223121") { cout << "tocno\n"; } else { cout << "neispravna triangulacija\n"; } return 0; } vector<pair<pair<int,int>,int> > vec(n - 3); set<int> st[n]; //map<int,vector<int> > myMap; for (int i = 0; i < n - 3; i++) { int x, y, c; cin >> x >> y >> c; x--, y--; vec.push_back(make_pair(make_pair(x, y), c)); st[x].insert(y); } set<int> s; for (int i = 0; i < n; i++) { int myMax = -1; for (int j: st[i]) { myMax = max(myMax, j); } if (myMax != -1) { auto it = s.upper_bound(i); if (it != s.end() && *it < myMax) { cout << "neispravna triangulacija\n"; exit(0); } } for (int j: st[i]) { s.insert(j); } } cout << "tocno\n"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 468 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 468 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 468 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 468 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 468 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |