# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
979638 | 2024-05-11T09:15:25 Z | vjudge1 | 자매 도시 (APIO20_swap) | C++17 | 97 ms | 15928 KB |
#include "swap.h" #include <cassert> #include <cstdio> #include <string> #include <vector> #include <map> #include <set> using namespace std; vector<pair<int, int>> g[200005]; pair<int, int> p[200005]; map<pair<int, int>, int> mp, pos; set<pair<int, int>> st; int x, y, mx; void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) { x = N; y = M; for(int i = 0; i < M; i++){ int a = U[i] + 1, b = V[i] + 1, c = W[i] + 1; // g[a].push_back({b, c}); // g[b].push_back({a, c}); // mp[{a, b}] = c; // mp[{b, a}] = c; // pos[{a, b}] = i + 1; // pos[{b, a}] = i + 1; mx = max(mx, W[i]); st.insert({c, i + 1}); } } int getMinimumFuelCapacity(int X, int Y) { X++; Y++; if(x - 1 == y) return -1; else return mx; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 5468 KB | Output is correct |
2 | Correct | 2 ms | 5548 KB | Output is correct |
3 | Correct | 1 ms | 5468 KB | Output is correct |
4 | Correct | 2 ms | 5468 KB | Output is correct |
5 | Correct | 2 ms | 5720 KB | Output is correct |
6 | Correct | 2 ms | 5724 KB | Output is correct |
7 | Correct | 2 ms | 5724 KB | Output is correct |
8 | Correct | 2 ms | 5724 KB | Output is correct |
9 | Correct | 35 ms | 11096 KB | Output is correct |
10 | Correct | 43 ms | 12380 KB | Output is correct |
11 | Correct | 42 ms | 12320 KB | Output is correct |
12 | Correct | 55 ms | 12628 KB | Output is correct |
13 | Correct | 45 ms | 12628 KB | Output is correct |
14 | Correct | 37 ms | 11100 KB | Output is correct |
15 | Correct | 78 ms | 14144 KB | Output is correct |
16 | Correct | 76 ms | 14100 KB | Output is correct |
17 | Correct | 82 ms | 14268 KB | Output is correct |
18 | Correct | 80 ms | 14332 KB | Output is correct |
19 | Correct | 39 ms | 10064 KB | Output is correct |
20 | Correct | 79 ms | 15320 KB | Output is correct |
21 | Correct | 88 ms | 15632 KB | Output is correct |
22 | Correct | 84 ms | 15928 KB | Output is correct |
23 | Correct | 84 ms | 15692 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 5468 KB | Output is correct |
2 | Correct | 2 ms | 5548 KB | Output is correct |
3 | Incorrect | 97 ms | 13904 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 5468 KB | Output is correct |
2 | Correct | 2 ms | 5548 KB | Output is correct |
3 | Correct | 1 ms | 5468 KB | Output is correct |
4 | Correct | 2 ms | 5468 KB | Output is correct |
5 | Correct | 2 ms | 5720 KB | Output is correct |
6 | Correct | 2 ms | 5724 KB | Output is correct |
7 | Correct | 2 ms | 5724 KB | Output is correct |
8 | Correct | 2 ms | 5724 KB | Output is correct |
9 | Incorrect | 1 ms | 5464 KB | Output isn't correct |
10 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 5464 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 5468 KB | Output is correct |
2 | Correct | 2 ms | 5548 KB | Output is correct |
3 | Correct | 1 ms | 5468 KB | Output is correct |
4 | Correct | 2 ms | 5468 KB | Output is correct |
5 | Correct | 2 ms | 5720 KB | Output is correct |
6 | Correct | 2 ms | 5724 KB | Output is correct |
7 | Correct | 2 ms | 5724 KB | Output is correct |
8 | Correct | 2 ms | 5724 KB | Output is correct |
9 | Correct | 35 ms | 11096 KB | Output is correct |
10 | Correct | 43 ms | 12380 KB | Output is correct |
11 | Correct | 42 ms | 12320 KB | Output is correct |
12 | Correct | 55 ms | 12628 KB | Output is correct |
13 | Correct | 45 ms | 12628 KB | Output is correct |
14 | Correct | 37 ms | 11100 KB | Output is correct |
15 | Correct | 78 ms | 14144 KB | Output is correct |
16 | Correct | 76 ms | 14100 KB | Output is correct |
17 | Correct | 82 ms | 14268 KB | Output is correct |
18 | Correct | 80 ms | 14332 KB | Output is correct |
19 | Incorrect | 97 ms | 13904 KB | Output isn't correct |
20 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 5464 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |