제출 #1076590

#제출 시각아이디문제언어결과실행 시간메모리
1076590mindiyak기지국 (IOI20_stations)C++14
0 / 100
516 ms940 KiB
#include "stations.h"
#include <vector>
#include <queue>

using namespace std;


std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
	std::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) {
	queue<int> q;
	q.push(c[1]);
	while(!q.empty()){
		int a = q.front();q.pop();
		if(a == t)return c[1];
		if(a > t)continue;
		q.push({2*a+1});
		q.push({2*a+2});
	}
	q.push(c[2]);
	while(!q.empty()){
		int a = q.front();q.pop();
		if(a == t)return c[2];
		if(a > t)continue;
		q.push({2*a+1});
		q.push({2*a+2});
	}
	return c[0];
}
#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...