제출 #468146

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4681462021-08-26 22:32:38ivan_tudorTriangles (CEOI18_tri)C++14
75 / 100
27 ms2668 KiB
#include<bits/stdc++.h>
#include"trilib.h"
using namespace std;
int root;
bool cmp(int x, int y){
return is_clockwise(root, x, y);
}
vector<int> getstv(vector<int> v, int st, int en){
root = st;
sort(v.begin(), v.end(), cmp);
vector<int> stv;
stv.push_back(st);
for(auto x: v){
while(stv.size() > 1 && is_clockwise(stv.end()[-2], stv.end()[-1], x) == false)
stv.pop_back();
stv.push_back(x);
}
return stv;
}
mt19937 rng(time(0));
int main(){
int n = get_n();
int a = rng()%(n - 1) + 1;
int b = rng()%(n - 1) + 1;
while(b == a)
b = rng()%(n - 1) + 1;
vector<int> l, r;
for(int i = 1; i<= n; i++){
if(i == a)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...