Submission #222456

#TimeUsernameProblemLanguageResultExecution timeMemory
222456errorgornChecker (COCI19_checker)C++14
0 / 110
12 ms9856 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ii pair<ll,ll> #define iii pair<ii,ll> //#define endl '\n' int n; string sides; set<int> al[200005]; struct trip{ int a,b,c; trip (int _a,int _b,int _c){ a=_a,b=_b,c=_c; } }; vector<trip> tri; map<ii,char> color; ii start=ii(-1,-1); bool dfs(int i,int j){ //cout<<i<<" "<<j<<endl; //note here that it returns true if triangulation does not exist if ((j+1)%n==i){ al[i].erase(j); al[j].erase(i); return false; } else{ auto curr=al[i].find(j); auto it=(curr==(--al[i].end()))?al[i].begin():next(curr); //cout<<"DEBUG: "<<i<<" "<<*it<<" "<<j<<endl; tri.push_back(trip(i,j,*it)); if (i<j && i<*it && *it<j) return true; if (j<i && (i<*it || *it<j)) return true; al[i].erase(j); al[j].erase(i); if (dfs(i,*it)||dfs(*it,j)) return true; return false; } } int main(){ cout<<"tocno"; } //neispravna triangulacija -2 //neispravno bojenje -1 //tocno 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...