Submission #711676

#TimeUsernameProblemLanguageResultExecution timeMemory
711676pccChecker (COCI19_checker)C++14
Compilation error
0 ms0 KiB
#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 (stderr)

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];
      |         ^~~