Submission #1057481

#TimeUsernameProblemLanguageResultExecution timeMemory
1057481PiokemonCity (JOI17_city)C++17
Compilation error
0 ms0 KiB
#include "Encoder.h" #include <bits/stdc++.h> using namespace std; constexpr ll N = 25e4; vector<ll> graf[N+9]; ll pre[N+9]; ll post[N+9]; ll tajm=1; ll n; void dfs(ll v, ll par){ pre[v]=tajm++; for (ll x:graf[v]){ if (x!=par)dfs(x,v); } ll rozn=tajm-pre[v]; ll temp=1; while(temp<rozn)temp*=2; tajm=pre[v]+temp; post[v]=tajm; } void Encode(ll n_, ll A[], ll B[]){ n=n_; for (ll i = 1; i < n; ++i) { graf[A[i-1]].push_back(B[i-1]); graf[B[i-1]].push_back(A[i-1]); } dfs(0,-1); ll stala=60; for (ll x=0;x<n;x++){ //cerr << pre[x] << ' ' << post[x] << '\n'; Code(x,stala*pre[x]+__lg(post[x]-pre[x])); } }
#include "Device.h" #include <bits/stdc++.h> using namespace std; constexpr ll stala = 60; void InitDevice(){ //uwu } ll Answer(long long S, long long T){ ll pres,is,pret,it; pres=S/stala; is=S%stala; pret=T/stala; it=T%stala; ll posts,postt; posts=pres+(1<<is); postt=pret+(1<<it); if (pres<=pret && postt<=posts)return 1; if (pret<=pres && posts<=postt)return 0; return 2; }

Compilation message (stderr)

Encoder.cpp:5:11: error: 'll' does not name a type
    5 | constexpr ll N = 25e4;
      |           ^~
Encoder.cpp:6:8: error: 'll' was not declared in this scope
    6 | vector<ll> graf[N+9];
      |        ^~
Encoder.cpp:6:10: error: template argument 1 is invalid
    6 | vector<ll> graf[N+9];
      |          ^
Encoder.cpp:6:10: error: template argument 2 is invalid
Encoder.cpp:6:17: error: 'N' was not declared in this scope
    6 | vector<ll> graf[N+9];
      |                 ^
Encoder.cpp:7:1: error: 'll' does not name a type
    7 | ll pre[N+9];
      | ^~
Encoder.cpp:8:1: error: 'll' does not name a type
    8 | ll post[N+9];
      | ^~
Encoder.cpp:9:1: error: 'll' does not name a type
    9 | ll tajm=1;
      | ^~
Encoder.cpp:10:1: error: 'll' does not name a type
   10 | ll n;
      | ^~
Encoder.cpp:12:6: error: variable or field 'dfs' declared void
   12 | void dfs(ll v, ll par){
      |      ^~~
Encoder.cpp:12:10: error: 'll' was not declared in this scope
   12 | void dfs(ll v, ll par){
      |          ^~
Encoder.cpp:12:16: error: 'll' was not declared in this scope
   12 | void dfs(ll v, ll par){
      |                ^~
Encoder.cpp:24:6: error: variable or field 'Encode' declared void
   24 | void Encode(ll n_, ll A[], ll B[]){
      |      ^~~~~~
Encoder.cpp:24:13: error: 'll' was not declared in this scope
   24 | void Encode(ll n_, ll A[], ll B[]){
      |             ^~
Encoder.cpp:24:20: error: 'll' was not declared in this scope
   24 | void Encode(ll n_, ll A[], ll B[]){
      |                    ^~
Encoder.cpp:24:28: error: 'll' was not declared in this scope
   24 | void Encode(ll n_, ll A[], ll B[]){
      |                            ^~

Device.cpp:5:11: error: 'll' does not name a type
    5 | constexpr ll stala = 60;
      |           ^~
Device.cpp:11:1: error: 'll' does not name a type
   11 | ll Answer(long long S, long long T){
      | ^~