Submission #900566

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9005662024-01-08 14:38:33JakobZorzDreaming (IOI13_dreaming)C++17
Compilation error
0 ms0 KiB
#include"dreaming.h"
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
vector<pair<ll,ll>>nodes[100000];
bool vis[100000];
vector<ll>node_list;
void dfs(ll node){
if(vis[node])
return;
vis[node]=true;
node_list.push_back(node);
for(auto ne:nodes[node])
dfs(ne.first);
}
map<pair<ll,ll>,ll>dp;
ll get_max_dist(ll node,ll prev){
if(dp.count({node,prev}))
return dp[{node,prev}];
ll res=0;
for(auto ne:nodes[node]){
if(ne.first==prev)
continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:69:15: error: redeclaration of 'std::vector<long long int> dists'
   69 |     vector<ll>dists;
      |               ^~~~~
dreaming.cpp:54:15: note: 'std::vector<long long int> dists' previously declared here
   54 |     vector<ll>dists;
      |               ^~~~~