제출 #1370090

#제출 시각아이디문제언어결과실행 시간메모리
1370090Sam_a17마술쇼 (APIO24_show)C++20
0 / 100
1 ms352 KiB
#include "Alice.h"
#include <bits/stdc++.h>
#include <vector>
using namespace std;

// you may define some global variables, but it does not work if you try to transfer any information from function
// Alice() to function Bob() through these variables. you had better not use the same global variables in function
// Alice() and in function Bob().

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

    vector<pair<int, int>> ans;
    for (long long i = 0; i < 5000; i++)
    {
        if (i == x)
        {
            continue;
        }
        ans.push_back({min(i, x), max(i, x)});
    }

    return ans;
}
#include "Bob.h"
#include <bits/stdc++.h>
#include <vector>
using namespace std;

// you may define some global variables, but it does not work if you try to transfer any information from function
// Alice() to function Bob() through these variables. you had better not use the same global variables in function
// Alice() and in function Bob().

long long Bob(std::vector<std::pair<int, int>> V)
{
    map<int, int> mp;
    int ans = 0;
    for (int i = 0; i < V.size(); ++i)
    {
        mp[V[i].first]++;
        mp[V[i].second]++;

        if (mp[V[i].first] > 1)
        {
            ans = V[i].first;
        }
        else if (mp[V[i].second] > 1)
        {
            ans = V[i].second;
        }
    }

    return ans; // change this into your code
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…