Submission #888699

# Submission time Handle Problem Language Result Execution time Memory
888699 2023-12-18T05:49:02 Z Muhammad_Aneeq Saveit (IOI10_saveit) C++17
Compilation error
0 ms 0 KB
#include "grader.h"
#include "encoder.h"
void qu(int x)
{
	for (int i=0;i<=11;i++)
	{
		if ((1<<i)&x)
			encode_bit(1);
		else
			encode_bit(0);
	}
}
void encode(int N,int H,int P,int v1[1234567],int v2[1234567])
{
	for (int i=0;i<P;i++)
	{
		int a=v1[i],b=v2[i];
		qu(a);qu(b);
	}
	for (int i=0;i<=11;i++)
		encode_bit(1);
}
#include <map>
#include <vector>
#include <set>
#include <cmath>
#include "grader.h"
#incldue "decoder.h"
using namespace std;
int const MAXN=1000+10;
vector<int>nei[MAXN]={};
int dis[MAXN]={};
void bfs(int x)
{
	dis[x]=0;
	set<pair<int,int>>s;
	s.insert({0,x});
	while (s.size())
	{
		int z=(*begin(s)).second;
		s.erase(*begin(s));
		for (auto i:nei[z])
		{
			if (dis[i]>dis[z]+1)
			{
				s.erase({dis[i],i});
				dis[i]=dis[z]+1;
				s.insert({dis[i],i});
			}
		}
	}
}

int q()
{
	int ans=0;
	for (int i=0;i<=11;i++)
	{
		if (decode_bit())
			ans+=(1<<i);
	}
	return ans;
}
void decode(int N,int H)
{
	while (1)
	{
		int an=q();
		if (an==4095)
			break;
		int o=q();
		nei[an].push_back(o);
		nei[o].push_back(an);
	}
	for (int i=0;i<H;i++)
	{
		for (int j=0;j<N;j++)
			dis[j]=1e4;
		bfs(i);
		for (int j=0;j<N;j++)
			hops(i,j,dis[j]);
	}
}

Compilation message

decoder.cpp:6:2: error: invalid preprocessing directive #incldue; did you mean #include?
    6 | #incldue "decoder.h"
      |  ^~~~~~~
      |  include