Submission #1008024

# Submission time Handle Problem Language Result Execution time Memory
1008024 2024-06-26T06:09:00 Z overwatch9 Swapping Cities (APIO20_swap) C++17
6 / 100
70 ms 14780 KB
#include "swap.h"

#include <bits/stdc++.h>
using namespace std;

vector <vector <pair <int, int>>> adj;
int n, m, mx = 0;
void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
    adj.resize(N+1);
	n = N;
	m = M;
    for (int i = 0; i < M; i++) {
        adj[U[i]].push_back({V[i], W[i]});
		mx = max(mx, W[i]);
	}
}

int getMinimumFuelCapacity(int X, int Y) {
	if (m < n)
		return -1;
	return mx;
}
// int main() {
// 	int N, M;
// 	cin >> N >> M;
// 	vector <int> u(M), v(M), w(M);
// 	for (int i = 0; i < M; i++)
// 		cin >> u[i] >> v[i] >> w[i];
// 	init(N, M, u, v, w);
// 	int q;
// 	cin >> q;
// 	while (q--) {
// 		int x, y;
// 		cin >> x >> y;
// 		cout << getMinimumFuelCapacity(x, y) << '\n';
// 	}
// }
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 424 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 18 ms 5716 KB Output is correct
10 Correct 22 ms 6748 KB Output is correct
11 Correct 24 ms 6748 KB Output is correct
12 Correct 27 ms 7196 KB Output is correct
13 Correct 25 ms 7012 KB Output is correct
14 Correct 24 ms 5720 KB Output is correct
15 Correct 63 ms 8788 KB Output is correct
16 Correct 56 ms 8644 KB Output is correct
17 Correct 57 ms 8892 KB Output is correct
18 Correct 56 ms 8892 KB Output is correct
19 Correct 36 ms 4940 KB Output is correct
20 Correct 67 ms 14032 KB Output is correct
21 Correct 56 ms 14136 KB Output is correct
22 Correct 63 ms 14780 KB Output is correct
23 Correct 70 ms 14612 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 46 ms 7368 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 424 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Incorrect 0 ms 348 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 424 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 18 ms 5716 KB Output is correct
10 Correct 22 ms 6748 KB Output is correct
11 Correct 24 ms 6748 KB Output is correct
12 Correct 27 ms 7196 KB Output is correct
13 Correct 25 ms 7012 KB Output is correct
14 Correct 24 ms 5720 KB Output is correct
15 Correct 63 ms 8788 KB Output is correct
16 Correct 56 ms 8644 KB Output is correct
17 Correct 57 ms 8892 KB Output is correct
18 Correct 56 ms 8892 KB Output is correct
19 Incorrect 46 ms 7368 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -