답안 #981051

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
981051 2024-05-12T18:27:37 Z Abito 자매 도시 (APIO20_swap) C++17
0 / 100
2000 ms 2904 KB
#include "swap.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define ep insert
#define pb push_back
using namespace std;
const int NN=1e5+5;
int n,m,mid,w[NN];
vector<pair<int,int>> adj[NN];
set<int> s;
void init(int N, int M,
          vector<int> U, vector<int> V, vector<int> W) {
    n=N,m=M;
    for (int i=0;i<m;i++) w[V[i]]=W[i],s.ep(W[i]);
    return;
}

int getMinimumFuelCapacity(int X, int Y) {
    if (X && Y){
        s.erase(s.find(w[X]));
        s.erase(s.find(w[Y]));
        int ans=max(*s.begin(),max(w[X],w[Y]));
        s.ep(w[X]);
        s.ep(w[Y]);
        return ans;
    }
    return -1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2904 KB Output is correct
2 Execution timed out 2045 ms 2652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2904 KB Output is correct
2 Execution timed out 2045 ms 2652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2904 KB Output is correct
2 Execution timed out 2045 ms 2652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2904 KB Output is correct
2 Execution timed out 2045 ms 2652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2904 KB Output is correct
2 Execution timed out 2045 ms 2652 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2904 KB Output is correct
2 Execution timed out 2045 ms 2652 KB Time limit exceeded
3 Halted 0 ms 0 KB -