Submission #711676

# Submission time Handle Problem Language Result Execution time Memory
711676 2023-03-17T11:03:48 Z pcc Checker (COCI19_checker) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

#define pii pair<int,int>
#define fs first
#define sc second
set<int> st;
int main(){
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n;
    cin>>n>>n;
    string col;
    int far[n+1];
    cin>>col;
    for(int i = 0;i<n-3;i++){
        v.push_back({{0,0},0});
        cin>>v[i].fs.fs>>v[i].fs.sc>>v[i].sc;
        if(v[i].fs.fs>v[i].fs.sc)swap(v[i].fs.fs,v[i].fs.sc);
    }
    sort(v.begin(),v.end());
    st.insert(v[0].fs.fs);
    st.insert(v[0].fs.sc);
    for(auto &i:v){
        auto lit = st.upper_bound(i.fs.fs);
        auto rit = st.lower_bound(i.fs.sc);
        if(lit != rit){
            cout<<"neispravna triangulacija\n";
            return 0;
        }
        st.insert(i.fs.fs);
        st.insert(i.fs.sc);
    }
    cout<<"tocno\n";
    return 0;
}

Compilation message

checker.cpp: In function 'int main()':
checker.cpp:16:9: error: 'v' was not declared in this scope
   16 |         v.push_back({{0,0},0});
      |         ^
checker.cpp:20:10: error: 'v' was not declared in this scope
   20 |     sort(v.begin(),v.end());
      |          ^
checker.cpp:13:9: warning: unused variable 'far' [-Wunused-variable]
   13 |     int far[n+1];
      |         ^~~