# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
121214 | _7_7_ | Triangles (CEOI18_tri) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "trilib.h"
using namespace std;
const int N = 1e5 + 11;
int n;
long long x[N], y[N];
int queries=0;
bool was[N];
void give_answer(int s) {
init();
n = get_n();
s = 0;
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= n; ++j) {
if (i == j)
continue;
bool ok = 1;
for (int x = 1; x <= n; ++x) {
if (i == x || j == x)
continue;
if (!is_clockwise(i, j, x)) {
ok = 0;
break;
}
}
if (ok) {
if (!was[i]) {
++s;
was[i] = 1;
}
if (!was[j]) {
was[j] = 1;
++s;
}
}
}
printf("%d\n", s);
}