Submission #826615

#TimeUsernameProblemLanguageResultExecution timeMemory
826615Marco_EscandonStations (IOI20_stations)C++17
0 / 100
3 ms576 KiB
#include <vector> #include <bits/stdc++.h> using namespace std; typedef long long ll; ll vis=0; vector<int> sol; vector<ll> cad[1001]; void dfs(ll node,ll p, ll p2) { if(p2%2==0) { sol[node]=vis; vis++; } for(auto i:cad[node]) { if(i!=p) { dfs(i,node,p2+1); } } if(p2%2==1) { sol[node]=vis; vis++; } } std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { for(int i=0; i<u.size(); i++) { cad[u[i]].push_back(v[i]); cad[v[i]].push_back(u[i]); } sol.resize(n); //dfs(0,-1,0); return sol; } int find_next_station(int s, int t, std::vector<int> c) { return 0; }

Compilation message (stderr)

stations.cpp: In function 'std::vector<int> label(int, int, std::vector<int>, std::vector<int>)':
stations.cpp:30:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |     for(int i=0; i<u.size(); i++)
      |                  ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...