Submission #1076590

# Submission time Handle Problem Language Result Execution time Memory
1076590 2024-08-26T14:52:16 Z mindiyak Stations (IOI20_stations) C++14
0 / 100
516 ms 940 KB
#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 time Memory Grader output
1 Incorrect 462 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 385 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 487 ms 940 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 516 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 417 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -