제출 #405359

#제출 시각아이디문제언어결과실행 시간메모리
405359ollelTriangles (CEOI18_tri)C++14
35 / 100
9 ms312 KiB
#include <bits/stdc++.h> #include <iostream> #include "trilib.h" using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; #define rep(i,a,b) for(int i = a; i < b; i++) #define pb push_back int n; bool hull(int a, int b) { rep(c, 1, n + 1) { if (c == a || c == b) continue; if (!is_clockwise(a, b, c)) return false; } return true; } int main() { n = get_n(); set<int> h; rep(i, 1, n + 1) { rep(j, i + 1, n + 1) { if (hull(i, j) || hull(j, i)) {h.insert(i); h.insert(j);} } } cout << h.size() << endl; }
#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...