Submission #463528

#TimeUsernameProblemLanguageResultExecution timeMemory
463528fuad27Triangles (CEOI18_tri)C++14
35 / 100
413 ms300 KiB
#include<bits/stdc++.h>
#include"trilib.h"
typedef long long ll;
typedef long double ld;
#define vii vector<pair<int, int>>
#define vi vector<int>
#define vl vector<long long>
#define vll vector<pair<long long, long long>>
#define mp make_pair
#define pb push_back
#define rep(i, a, b) for(int i = a;i<=b;i++)
#define f first
#define s second
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);
#define start int tt;cin>>tt;rep(testcase, 1, tt)
#define print(k) cout<<"Case #"<<testcase<<": "<<k<<"\n";
#define endl "\n"
#define DEBUG(k) cerr<<k<<"\n";

int main () {
	int n = get_n(), ans = 0;
	rep(i, 1, n) {
		rep(j, i+1, n) {
			bool check = true, check2 = true;
			rep(k, 1, n) {
				if(k == i or k == j)continue;
				
				bool d= !is_clockwise(i, j, k);
				check&=d;
				check2&=!d;
			}
			ans+=check;
			ans+=check2;
		}
	}
	give_answer(ans);
}
#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...