Submission #711677

#TimeUsernameProblemLanguageResultExecution timeMemory
711677pccChecker (COCI19_checker)C++14
0 / 110
73 ms5344 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; vector<pair<pii,int>> v(n-3); 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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...