제출 #142899

#제출 시각아이디문제언어결과실행 시간메모리
142899shayan_pTriangles (CEOI18_tri)C++14
35 / 100
1845 ms604 KiB
// only miss the sun when it starts to snow

#include<bits/stdc++.h>

#include "trilib.h"

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn=1e5+10,mod=1e9+7;
const ll inf=1e18;

int arr[maxn];

int main(){
    int n=get_n(), ans=0;

    srand(time(0));
    iota(arr,arr+n,1);
    
    for(int i=1;i<=n;i++){
	for(int j=i+1;j<=n;j++){
	    random_shuffle(arr,arr+n);
	    int A=0, B=0;
	    for(int K=1;K<=n;K++){
		int k=arr[K-1];
		if(k==i || k==j) continue;
		(is_clockwise(i,j,k) ? A : B) ++;
		if(A>0 && B>0) goto Hell;
	    }
	    ans++;
	Hell:;
	}
    }
    give_answer(ans);
    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...