Submission #330324

# Submission time Handle Problem Language Result Execution time Memory
330324 2020-11-24T19:24:01 Z marvenlee Stations (IOI20_stations) C++14
0 / 100
923 ms 880 KB
#include "stations.h"
#include <vector>

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) {
    if(c[0]<c[1]){
        int temp=c[0];
        c[0]=c[1];
        c[1]=c[0];
    }
	return (s<t)?c[0]:c[1];
}

Compilation message

stations.cpp: In function 'int find_next_station(int, int, std::vector<int>)':
stations.cpp:14:13: warning: unused variable 'temp' [-Wunused-variable]
   14 |         int temp=c[0];
      |             ^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 480 ms 764 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 572 ms 756 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 520 ms 756 KB Wrong query response.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 923 ms 756 KB Output is correct
2 Incorrect 782 ms 880 KB Wrong query response.
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 530 ms 756 KB Wrong query response.
2 Halted 0 ms 0 KB -