Submission #1078383

# Submission time Handle Problem Language Result Execution time Memory
1078383 2024-08-27T16:16:46 Z Trumling Stations (IOI20_stations) C++14
8 / 100
605 ms 688 KB
#include "stations.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std; 

typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
#define INF 99999999999999999
#define MOD 1000000007
#define all(x) x.begin(),x.end()

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+1;
	}
	return labels;
}

int find_next_station(int s, int t, vector<int> c) {
	
	ll curr=t;
	ll save=curr;
	bool tf=0;
	while(curr)
	{
		if(curr==s)
		{
			tf=1;
			break;
		}

		save=curr;
		curr/=2;
	}

	if(tf)
	return save;

	return s/2;

}
# Verdict Execution time Memory Grader output
1 Incorrect 357 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 315 ms 684 KB Output is correct
2 Correct 359 ms 684 KB Output is correct
3 Correct 605 ms 684 KB Output is correct
4 Correct 447 ms 684 KB Output is correct
5 Correct 396 ms 688 KB Output is correct
6 Correct 303 ms 684 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 374 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 594 ms 684 KB Output is correct
2 Incorrect 444 ms 684 KB Wrong query response.
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 371 ms 684 KB Wrong query response.
2 Halted 0 ms 0 KB -