제출 #1014215

#제출 시각아이디문제언어결과실행 시간메모리
1014215Mousa_Aboubaker마술쇼 (APIO24_show)C++17
0 / 100
1 ms344 KiB
#include <bits/stdc++.h> #include "Alice.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(). vector<pair<int,int>> Alice(){ // add your code here // change below into your code long long x = setN(5000); vector<pair<int, int>> p; vector<int> bits; for(int i = 0; i < 60; i++) { if(x & (1ll << i)) { bits.push_back(i+2); } } int l = 0; for(;p.size() < 4999;) { p.push_back({l + 1, bits[l]}); l++; l %= bits.size(); } random_shuffle(p.begin()+1, p.end()); return p; }
#include <bits/stdc++.h> #include "Bob.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(vector<pair<int, int>> V) { // add your code here set<int> bits; for (auto el : V) { if (el.second != 2012) { bits.insert(el.second - 2); } else { bits.insert(el.first - 2); } } long long x = 0; for (int el : bits) { x |= (1ll << el); } return x; // change this into your code }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...