답안 #633685

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
633685 2022-08-23T04:19:14 Z Olympia Checker (COCI19_checker) C++17
23 / 110
263 ms 32372 KB
#include <bits/stdc++.h>


using namespace std;

int main () {
    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";

}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 263 ms 29164 KB Output is correct
2 Correct 259 ms 32340 KB Output is correct
3 Correct 184 ms 27152 KB Output is correct
4 Correct 179 ms 27200 KB Output is correct
5 Correct 179 ms 27056 KB Output is correct
6 Correct 242 ms 31744 KB Output is correct
7 Correct 261 ms 31888 KB Output is correct
8 Correct 188 ms 27100 KB Output is correct
9 Correct 205 ms 27032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 235 ms 29256 KB Output is correct
2 Correct 236 ms 32372 KB Output is correct
3 Incorrect 248 ms 32272 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -