제출 #1041114

#제출 시각아이디문제언어결과실행 시간메모리
1041114HD1기지국 (IOI20_stations)C++14
8 / 100
536 ms48044 KiB
#include "stations.h" #include<bits/stdc++.h> #define ss second #define all(s) s.begin(),s.end() #define sz(s) ll(s.size()) #define pb push_back typedef long long ll; const ll MAX=1e6; using namespace std; ll marc=1; vector<ll> gfo[MAX]; ll m[MAX], tam[MAX]; bool vst[MAX]; // void bfs(int ini){ // queue<ll> q; // q.pb(ini); // m[ini]=mrc; // while(sz(q)){ // ll x=q.front(); // q.pop(); // } // } vector<int> label(int n, int k, vector<int> u, vector<int> v){ vector<int> labels(n); for(int i=0; i<sz(u); i++){ gfo[u[i]].pb(v[i]); gfo[v[i]].pb(u[i]); } // for(int i=0; i<n; i++){ // cout<<i<<"-> "; // for(auto v:gfo[i]){ // cout<<v<<' '; // } // cout<<'\n'; // } for(int i=0; i<n; i++){ labels[i]=i+1; } // for(int i=0; i<n; i++){ // cout<<i<<' '<<labels[i]<<'\n'; // } return labels; } int find_next_station(int s, int t, vector<int> c){ int ant=t; //cout<<s<<'\n'; while(t){ if(t==s){ //cout<<t<<' '<<s<<'\n'; return ant; } ant=t; t/=2; } return s/2; }
#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...