답안 #319445

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
319445 2020-11-05T10:04:32 Z VEGAnn 자매 도시 (APIO20_swap) C++14
6 / 100
127 ms 10704 KB
#include "swap.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int cnt[N], mx = 0;

void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
    mx = 0;

    for (int i = 0; i < M; i++){
        cnt[U[i]]++;
        cnt[V[i]]++;
        mx = max(mx, W[i]);
    }

    for (int i = 0; i < N; i++)
        if (cnt[i] < 2)
            mx = -1;
}

int getMinimumFuelCapacity(int X, int Y) {
    return mx;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 376 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 372 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 30 ms 4196 KB Output is correct
10 Correct 37 ms 4984 KB Output is correct
11 Correct 36 ms 4968 KB Output is correct
12 Correct 40 ms 5220 KB Output is correct
13 Correct 37 ms 5220 KB Output is correct
14 Correct 36 ms 4452 KB Output is correct
15 Correct 127 ms 9072 KB Output is correct
16 Correct 105 ms 9236 KB Output is correct
17 Correct 101 ms 9292 KB Output is correct
18 Correct 102 ms 9292 KB Output is correct
19 Correct 63 ms 6188 KB Output is correct
20 Correct 101 ms 10080 KB Output is correct
21 Correct 105 ms 10400 KB Output is correct
22 Correct 108 ms 10700 KB Output is correct
23 Correct 113 ms 10704 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 376 KB Output is correct
3 Incorrect 95 ms 8456 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 268 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 268 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 376 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 372 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 30 ms 4196 KB Output is correct
10 Correct 37 ms 4984 KB Output is correct
11 Correct 36 ms 4968 KB Output is correct
12 Correct 40 ms 5220 KB Output is correct
13 Correct 37 ms 5220 KB Output is correct
14 Correct 36 ms 4452 KB Output is correct
15 Correct 127 ms 9072 KB Output is correct
16 Correct 105 ms 9236 KB Output is correct
17 Correct 101 ms 9292 KB Output is correct
18 Correct 102 ms 9292 KB Output is correct
19 Incorrect 95 ms 8456 KB Output isn't correct
20 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 268 KB Output isn't correct