Submission #1069416

# Submission time Handle Problem Language Result Execution time Memory
1069416 2024-08-21T21:49:21 Z pawned Swapping Cities (APIO20_swap) C++17
6 / 100
74 ms 16180 KB
#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops")

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

#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;

#include "swap.h"

const int MAX = 1e5 + 5;

int N, M;

vector<ii> adj[MAX];	// {vertex, dist}

vi wt;

void init(int N_g, int M_g, vi U_g, vi V_g, vi W_g) {
	N = N_g;
	M = M_g;
	for (int i = 0; i < M; i++) {
		adj[U_g[i]].pb({V_g[i], W_g[i]});
		adj[V_g[i]].pb({U_g[i], W_g[i]});
		wt.pb(W_g[i]);
	}
	sort(wt.begin(), wt.end());
}

int getMinimumFuelCapacity(int X, int Y) {
	if (M == N)
		return wt[M - 1];
	return -1;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2652 KB Output is correct
9 Correct 29 ms 7504 KB Output is correct
10 Correct 35 ms 8396 KB Output is correct
11 Correct 35 ms 8224 KB Output is correct
12 Correct 36 ms 8648 KB Output is correct
13 Correct 34 ms 8540 KB Output is correct
14 Correct 29 ms 7516 KB Output is correct
15 Correct 69 ms 14420 KB Output is correct
16 Correct 64 ms 14204 KB Output is correct
17 Correct 71 ms 14640 KB Output is correct
18 Correct 72 ms 14696 KB Output is correct
19 Correct 34 ms 9044 KB Output is correct
20 Correct 72 ms 15436 KB Output is correct
21 Correct 69 ms 15748 KB Output is correct
22 Correct 73 ms 16180 KB Output is correct
23 Correct 74 ms 16112 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Incorrect 58 ms 10600 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2652 KB Output is correct
9 Incorrect 1 ms 2648 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2648 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2652 KB Output is correct
9 Correct 29 ms 7504 KB Output is correct
10 Correct 35 ms 8396 KB Output is correct
11 Correct 35 ms 8224 KB Output is correct
12 Correct 36 ms 8648 KB Output is correct
13 Correct 34 ms 8540 KB Output is correct
14 Correct 29 ms 7516 KB Output is correct
15 Correct 69 ms 14420 KB Output is correct
16 Correct 64 ms 14204 KB Output is correct
17 Correct 71 ms 14640 KB Output is correct
18 Correct 72 ms 14696 KB Output is correct
19 Incorrect 58 ms 10600 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2648 KB Output isn't correct
2 Halted 0 ms 0 KB -