# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1014179 | Mousa_Aboubaker | Magic Show (APIO24_show) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 < 62; i++)
{
if((x >> i) & 1)
{
bits.push_back(i);
}
}
int l = 0;
for(int i = 2; i <= 5000; i++)
{
p.push_back({1, bits[l % b.size()]});
l++;
}
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)
{
bits.insert(el.second);
}
long long x = 0;
for(int el: bits)
{
x |= (1ll << el);
}
return x; // change this into your code
}