# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
363674 | denkendoemeer | City (JOI17_city) | C++14 | 494 ms | 54164 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Encoder.h"
#include<bits/stdc++.h>
using namespace std;
vector<int>g[250005],r;
int in[250005],t[250005],u;
void dfs(int nod,int ta)
{
in[nod]=u++;
for(auto it:g[nod]){
if (it!=ta)
dfs(it,nod);
}
if (in[nod]==u-1)
return ;
int &ans=t[nod];
while(in[nod]+r[ans]<u-1)
ans++;
u=in[nod]+r[ans]+1;
}
void Encode(int n,int a[],int b[])
{
double d=1.050045;
r.push_back(0);
int i;
for(i=1;i<256;i++){
int aux=d*r.back();
if (r.back()==aux)
++aux;
r.push_back(aux);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |