Submission #717464

# Submission time Handle Problem Language Result Execution time Memory
717464 2023-04-02T00:21:36 Z 1ne Swapping Cities (APIO20_swap) C++14
7 / 100
100 ms 10140 KB
#include "swap.h"

#include <vector>
#include <bits/stdc++.h>
using namespace std;
int n,m,maxxy = 0;
vector<int>order;
vector<int>cost;
void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
	n = N;
	m = M;	
	cost.resize(N);
	for (int i = 0;i<n;++i){
		cost[V[i]] = W[i];
	}	
	order = W;
	sort(order.begin(),order.end());
}

int getMinimumFuelCapacity(int X, int Y) {
   if (n <= 3){
   	return -1;	
   }
   if (X == 0){
   	return max({order[2],cost[X],cost[Y]});
   }
   else{
 		return max({order[2],cost[X],cost[Y]});  
   }
}
                               
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 84 ms 6256 KB Output is correct
4 Correct 82 ms 6196 KB Output is correct
5 Correct 84 ms 6436 KB Output is correct
6 Correct 84 ms 6196 KB Output is correct
7 Correct 82 ms 6392 KB Output is correct
8 Correct 82 ms 10140 KB Output is correct
9 Correct 90 ms 10128 KB Output is correct
10 Correct 100 ms 10120 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -