Submission #121214

#TimeUsernameProblemLanguageResultExecution timeMemory
121214_7_7_Triangles (CEOI18_tri)C++14
Compilation error
0 ms0 KiB
#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);
}

Compilation message (stderr)

tri.cpp: In function 'void give_answer(int)':
tri.cpp:14:2: error: 'init' was not declared in this scope
  init();
  ^~~~
tri.cpp:14:2: note: suggested alternative: 'int'
  init();
  ^~~~
  int