답안 #405985

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
405985 2021-05-17T06:05:56 Z Maqsut_03 자매 도시 (APIO20_swap) C++17
7 / 100
110 ms 6952 KB
#include "swap.h"
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<deque>

#define ll int
#define pl pair<ll, ll> 
#define llv vector<ll>
#define pb push_back
#define ppb(x, y) push_back({x, y})
#define pv vector<pl>
#define sz size()
#define ss second
#define ff first

using namespace std;
const int N = 2 * 1e5 + 3;

bool f = 0;
pv v;
int a[N], b;

void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) 
{
	if (N > 3) f = 1;
	for (int i=0; i<M; i++) v.ppb(W[i], V[i]);
	sort(v.begin(), v.end());
	b = v[2].ff;
	for (int i=0; i<M; i++) a[V[i]] = W[i];
	return ;
}

int getMinimumFuelCapacity(int X, int Y) 
{
	if (f)
	    return max({b, a[X], a[Y]});
	return -1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 106 ms 6692 KB Output is correct
4 Correct 110 ms 6696 KB Output is correct
5 Correct 108 ms 6952 KB Output is correct
6 Correct 105 ms 6660 KB Output is correct
7 Correct 109 ms 6948 KB Output is correct
8 Correct 103 ms 6760 KB Output is correct
9 Correct 108 ms 6812 KB Output is correct
10 Correct 107 ms 6772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -