Submission #1170208

#TimeUsernameProblemLanguageResultExecution timeMemory
1170208TobCity (JOI17_city)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#incldue "Encoder.h"

#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

using namespace std;

typedef long long ll;
typedef pair <ll, ll> pii;

const int maxn = 25e4 + 7;

int tim;
vector <int> adj[maxn];
ll st[maxn], siz[maxn];
vector <ll> v;

void dfs(int x, int p = -1) {
	st[x] = tim++;
	siz[x] = 1;
	for (int y : adj[x]) if (y != p) {
		dfs(y, x);
		siz[x] += siz[y];
	}
	int pp = lower_bound(all(v), siz[x]) - v.begin();
	siz[x] = v[pp];
	tim = st[x] + siz[x];
	Code(x, (st[x] << 9) + pp);
}

void Encode(int n, int a[], int b[]) {
	v = {1};
	for (int i = 0; i <= 400; i++) v.pb((v[i]*21+19)/20);
	for (int i = 0; i < n-1; i++) adj[a[i]].pb(b[i]), adj[b[i]].pb(a[i]);
	dfs(0);
	
}
#include <bits/stdc++.h>
#include "Decoder.h"

#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

using namespace std;

typedef long long ll;
typedef pair <ll, ll> pii;

vector <ll> v;

void InitDevice() {
	v = {1};
	for (int i = 0; i <= 400; i++) v.pb((v[i]*21+19)/20);
}

int Answer(ll S, ll T) {
	int o = 1;
	ll sta = (S >> 9), stb = (T >> 9);
	if (sta > stb) swap(S, T), swap(sta, stb), o = 0;
	ll siza = (S & (1 << 9)-1);
	if (sta+v[siza] <= stb) return 2;
	return o;
}

Compilation message (stderr)

# 1번째 컴파일 단계

Encoder.cpp:2:2: error: invalid preprocessing directive #incldue; did you mean #include?
    2 | #incldue "Encoder.h"
      |  ^~~~~~~
      |  include
Encoder.cpp: In function 'void dfs(int, int)':
Encoder.cpp:30:9: error: 'Code' was not declared in this scope
   30 |         Code(x, (st[x] << 9) + pp);
      |         ^~~~