Submission #121224

#TimeUsernameProblemLanguageResultExecution timeMemory
121224_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, 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;
}
 
 

Compilation message (stderr)

/tmp/ccY0HQwQ.o: In function `give_answer':
tri.cpp:(.text+0x0): multiple definition of `give_answer'
/tmp/ccmy5LtW.o:trilib.c:(.text+0x280): first defined here
collect2: error: ld returned 1 exit status