답안 #619861

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
619861 2022-08-02T16:39:26 Z sokratisi 기지국 (IOI20_stations) C++17
8 / 100
858 ms 496 KB
#include "stations.h"
#include <vector>

using namespace std;

vector<int> label(int n, int k, vector<int> u, 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, vector<int> c) {
    int prt;
    while (t > s) {
        prt = t;
        t--;
        t /= 2;
    }
    if (t == s) {
        return prt;
    }
	s--;
    s/=2;
    return s;
}

Compilation message

stations.cpp: In function 'int find_next_station(int, int, std::vector<int>)':
stations.cpp:15:9: warning: 'prt' may be used uninitialized in this function [-Wmaybe-uninitialized]
   15 |     int prt;
      |         ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 539 ms 416 KB Wrong query response.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 450 ms 416 KB Output is correct
2 Correct 493 ms 492 KB Output is correct
3 Correct 858 ms 492 KB Output is correct
4 Correct 645 ms 420 KB Output is correct
5 Correct 547 ms 416 KB Output is correct
6 Correct 433 ms 492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 553 ms 496 KB Wrong query response.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 807 ms 496 KB Output is correct
2 Incorrect 652 ms 420 KB Wrong query response.
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 482 ms 484 KB Wrong query response.
2 Halted 0 ms 0 KB -