# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
121224 | _7_7_ | Triangles (CEOI18_tri) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "trilib.h"
using namespace std;
const int N = 1e5 + 11;
int n, is_inited;
long long x[N], y[N];
int queries=0;
bool was[N];
void give_answer(int s) {
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);
}
int main () {
give_answer(0);
return 0;
}