Submission #1016839

# Submission time Handle Problem Language Result Execution time Memory
1016839 2024-07-08T13:11:33 Z vjudge1 Checker (COCI19_checker) C++17
0 / 110
158 ms 12756 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
    int g, n;
    string s;
    cin >> g >> n >> s;
    vector<vector<int>> vec;
    for (int i = 1; i <= n - 3; i ++){
        int x, y, c;
        cin >> x >> y >> c;

        if (x > y)
            swap(x, y);
        vec.push_back({x, y, i});
    }

    sort(vec.begin(), vec.end());

    bool good = 1;
    for (int i = 1; i < vec.size(); i ++){
        if (vec[i][0] == vec[i - 1][0]) continue;
        if (vec[i][0] >= vec[i - 1][1]) continue;
        if (vec[i][1] <= vec[i - 1][1]) continue;
        good = 0;
    }

    if (!good){
        cout << "neispravna triangulacija" << endl;
        return 0;
    }

    cout << "tocno" << endl;
}

Compilation message

checker.cpp: In function 'int main()':
checker.cpp:21:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |     for (int i = 1; i < vec.size(); i ++){
      |                     ~~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 127 ms 12756 KB Output is correct
2 Correct 158 ms 11748 KB Output is correct
3 Correct 124 ms 12164 KB Output is correct
4 Correct 131 ms 12696 KB Output is correct
5 Correct 133 ms 12680 KB Output is correct
6 Correct 121 ms 12180 KB Output is correct
7 Correct 134 ms 12436 KB Output is correct
8 Incorrect 123 ms 12064 KB Output isn't correct
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 135 ms 12424 KB Output is correct
2 Correct 124 ms 11920 KB Output is correct
3 Incorrect 124 ms 12168 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -