Submission #1359193

#TimeUsernameProblemLanguageResultExecution timeMemory
1359193sim_pleMagic Show (APIO24_show)C++20
5 / 100
2 ms1092 KiB
#include "Alice.h"
#include<bits/stdc++.h>
using namespace std;

#define all(x) x.begin() , x.end()

long long setN(int n);

vector<pair<int,int>> Alice(){
    vector<pair<int , int>> ans;
    int x = setN(5000);
    for(int i = 1; i <= 5000; i++){
        if(i == x) continue;
        ans.push_back({i , x});
    }   
    return ans;
}
#include "Bob.h"
#include<bits/stdc++.h>
using namespace std;

#define all(x) x.begin() , x.end()
long long vis[5009];

long long Bob(vector<pair<int,int>> V){
    for(int i = 0; i < (int)V.size(); i++){
        vis[V[i].first]++;
        vis[V[i].second]++;
    }
    long long mx = 0 , ans = 0;
    for(int i = 1; i <= 5000; i++){
        if(mx < vis[i]){
            mx = max(mx , vis[i]);
            ans = i;
        }
    }
    return ans;
}
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...