Submission #1008023

# Submission time Handle Problem Language Result Execution time Memory
1008023 2024-06-26T06:08:15 Z overwatch9 Swapping Cities (APIO20_swap) C++17
0 / 100
2000 ms 11524 KB
#include "swap.h"

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

vector <vector <pair <int, int>>> adj;
int n, m;
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]});
}

int getMinimumFuelCapacity(int X, int Y) {
	if (m < n)
		return -1;
	int mx = 0;
	for (int i = 0; i < n; i++) {
		for (auto j : adj[i])
			mx = max(mx, j.second);
	}
	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 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 20 ms 6744 KB Output is correct
10 Correct 23 ms 8020 KB Output is correct
11 Correct 23 ms 8028 KB Output is correct
12 Correct 26 ms 8328 KB Output is correct
13 Correct 24 ms 8276 KB Output is correct
14 Correct 22 ms 7124 KB Output is correct
15 Correct 56 ms 11048 KB Output is correct
16 Correct 57 ms 10752 KB Output is correct
17 Correct 63 ms 11524 KB Output is correct
18 Correct 57 ms 11360 KB Output is correct
19 Execution timed out 2060 ms 4508 KB Time limit exceeded
20 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 Incorrect 48 ms 9384 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 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Incorrect 0 ms 344 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 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 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 20 ms 6744 KB Output is correct
10 Correct 23 ms 8020 KB Output is correct
11 Correct 23 ms 8028 KB Output is correct
12 Correct 26 ms 8328 KB Output is correct
13 Correct 24 ms 8276 KB Output is correct
14 Correct 22 ms 7124 KB Output is correct
15 Correct 56 ms 11048 KB Output is correct
16 Correct 57 ms 10752 KB Output is correct
17 Correct 63 ms 11524 KB Output is correct
18 Correct 57 ms 11360 KB Output is correct
19 Incorrect 48 ms 9384 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -