Submission #822955

#TimeUsernameProblemLanguageResultExecution timeMemory
822955MohamedAhmed04Triangles (CEOI18_tri)C++14
Compilation error
0 ms0 KiB
#include "trilib.c"
#include "trilib.h"
#include <bits/stdc++.h>

using namespace std ;

const int MAX = 50 + 10 ;

mt19937 rng(2023) ;

int N ;

int main()
{
	N = get_n() ;
	int ans = 0 ;
	vector<int>v ;
	for(int i = 1 ; i <= N ; ++i)
	{
		bool flag = false ;
		for(int j = 1 ; j <= N && (!flag) ; ++j)
		{
			v.clear() ;
			for(int k = 1 ; k <= N ; ++k)
			{
				if(i == j || i == k || j == k)
					continue ;
				v.push_back(k) ;
			}
			shuffle(v.begin() , v.end() , rng) ;
			flag = (i != j) ;
			for(auto &k : v)
			{
				if(!flag)
					break ;
				flag &= is_clockwise(i , j , k) ;
			}
		}
		ans += flag ;
	}
	give_answer(ans) ;
	return 0 ;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccHAw8Qp.o: in function `get_n':
tri.cpp:(.text+0x120): multiple definition of `get_n'; /tmp/ccJx4uPn.o:trilib.c:(.text+0x120): first defined here
/usr/bin/ld: /tmp/ccHAw8Qp.o: in function `is_clockwise':
tri.cpp:(.text+0x190): multiple definition of `is_clockwise'; /tmp/ccJx4uPn.o:trilib.c:(.text+0x190): first defined here
/usr/bin/ld: /tmp/ccHAw8Qp.o: in function `give_answer':
tri.cpp:(.text+0x2f0): multiple definition of `give_answer'; /tmp/ccJx4uPn.o:trilib.c:(.text+0x2f0): first defined here
collect2: error: ld returned 1 exit status