Submission #310982

# Submission time Handle Problem Language Result Execution time Memory
310982 2020-10-09T00:44:21 Z Lawliet Broken Device (JOI17_broken_device) C++17
Compilation error
0 ms 0 KB
#include "Annalib.h"
#include <bits/stdc++.h>
 
using namespace std;
 
const int MAXN = 200;
 
int ord[MAXN];

bool blocked[MAXN];
 
void Anna(int N, long long X, int K, int P[])
{
	srand( 43278432 );

	iota( ord , ord + N , 0 );
	random_shuffle( ord , ord + N );

	memset( blocked , false , sizeof(blocked) );
	
	for(int i = 0 ; i < K ; i++)
		blocked[ P[i] ] = true;
 
	for(int i = 0 ; i < N ; i += 2)
	{
		if( blocked[ ord[i] ] ) 
		{
			Set( ord[i] , 0 ); Set( ord[i + 1] , 0 );
			continue;
		}

		if( X%2 == 1 && blocked[ ord[i + 1] ] )
		{
			Set( ord[i] , 0 ); Set( ord[i + 1] , 0 );
			continue;
		}

		Set( ord[i] , 1 ); Set( ord[i + 1] , X%2 ); X /= 2;
	}
}



    

Compilation message

/tmp/ccd2ePiN.o: In function `main':
grader_bruno.cpp:(.text.startup+0x115): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status