| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1310949 | hmms127 | 기지국 (IOI20_stations) | C++20 | 373 ms | 432 KiB |
//#include "stations.h"
#include <vector>
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
vector<int>labels(n);
for(int i=0;i<n;i++)labels[i]=i;
return labels;
}
int find_next_station(int s, int t, std::vector<int> c) {
auto can=[&](int node,int par){
if(par==node)return 1;
while(par>=node){
par-=1;par/=2;
if(par==node)return 1;
}
return 0;
};
if(s==0){
if(can(c[0],t))return c[0];
return c[1];
}
for(auto it:c){
if(can(it,t))return it;
}
return c[0];
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
