답안 #1083385

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1083385 2024-09-03T04:13:19 Z Namkhing 마술쇼 (APIO24_show) C++17
5 / 100
3 ms 864 KB
#include "Alice.h"
#include <bits/stdc++.h>
using namespace std;


vector<pair<int, int>> Alice() {
    int n = 5000;
    long long x = setN(n);

    vector<pair<int, int>> edges;

    for (int i = 1; i <= n; i++) {
        if (i == x) continue;
        edges.push_back({x, i});
    }
    return edges;
}
#include "Bob.h"
#include <bits/stdc++.h>
using namespace std;


long long Bob(vector<pair<int, int>> V) {
    int n = 5000;
    vector<int> cnt(n + 1);

    for (auto [u, v] : V) {
        cnt[u]++, cnt[v]++;
    }

    int mx = 0, ans = -1;

    for (int i = 1; i <= n; i++) {
        if (cnt[i] > mx) {
            mx = cnt[i], ans = i;
        }
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 820 KB Correct.
2 Correct 1 ms 824 KB Correct.
3 Correct 1 ms 824 KB Correct.
4 Correct 1 ms 820 KB Correct.
5 Correct 2 ms 816 KB Correct.
6 Correct 2 ms 820 KB Correct.
7 Correct 2 ms 832 KB Correct.
8 Correct 2 ms 828 KB Correct.
9 Correct 2 ms 864 KB Correct.
10 Correct 3 ms 824 KB Correct.
11 Correct 2 ms 816 KB Correct.
12 Correct 2 ms 816 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 820 KB Correct.
2 Correct 1 ms 824 KB Correct.
3 Correct 1 ms 824 KB Correct.
4 Correct 1 ms 820 KB Correct.
5 Correct 2 ms 816 KB Correct.
6 Correct 2 ms 820 KB Correct.
7 Correct 2 ms 832 KB Correct.
8 Correct 2 ms 828 KB Correct.
9 Correct 2 ms 864 KB Correct.
10 Correct 3 ms 824 KB Correct.
11 Correct 2 ms 816 KB Correct.
12 Correct 2 ms 816 KB Correct.
13 Incorrect 1 ms 344 KB Output isn't correct
14 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 820 KB Correct.
2 Correct 1 ms 824 KB Correct.
3 Correct 1 ms 824 KB Correct.
4 Correct 1 ms 820 KB Correct.
5 Correct 2 ms 816 KB Correct.
6 Correct 2 ms 820 KB Correct.
7 Correct 2 ms 832 KB Correct.
8 Correct 2 ms 828 KB Correct.
9 Correct 2 ms 864 KB Correct.
10 Correct 3 ms 824 KB Correct.
11 Correct 2 ms 816 KB Correct.
12 Correct 2 ms 816 KB Correct.
13 Incorrect 1 ms 344 KB Output isn't correct
14 Halted 0 ms 0 KB -