제출 #1196087

#제출 시각아이디문제언어결과실행 시간메모리
1196087Mousa_Aboubaker마술쇼 (APIO24_show)C++17
5 / 100
2 ms636 KiB
#include <vector> #include "Alice.h" #include <bits/stdc++.h> 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(). std::vector<std::pair<int,int>> Alice(){ // add your code here // change below into your code long long x = setN(5000); vector<pair<int, int>> a; for(int i = 1; i <= 5000; i++) { if(i == x) continue; a.push_back({i, x}); } return a; }
#include <vector> #include "Bob.h" #include <bits/stdc++.h> 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){ // add your code here map<int, int> mp; for(auto [u, v]: V) { mp[u]++; mp[v]++; } int mx = 0, c = 0; for(auto [f, s]: mp) { if(mx < s) { mx = s; c = f; } } return c; // change this into your code }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...