Submission #424979

#TimeUsernameProblemLanguageResultExecution timeMemory
424979Runtime_error_Triangles (CEOI18_tri)C++14
0 / 100
1 ms332 KiB
#include "trilib.h" #include <bits/stdc++.h> using namespace std; int n; set<int> s; int go(int x){ int y = n; if(y == n) y = 1; for(int j=1;j<=n;j++){ if(j == x || j == y) continue; if(is_clockwise(x,y,j)) y = j; } return y; } int main(){ s.clear(); n = get_n(); for(int i=1;i<=n;i++){ int neighbour = go(i); if(s.count(neighbour)){ give_answer(n-1); return 0; } s.insert(neighbour); } give_answer(n); } /* 6 1 1 4 3 2 2 1 4 5 1 3 2 */
#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...