| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 934822 | nguyentunglam | Broken Device 2 (JOI22_device2) | C++17 | 66 ms | 3900 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 "Anna.h"
#include <utility>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
namespace {
int x = 0;
}
int Declare() {
return 180;
}
std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
int m = log2(A) + 1;
vector<int> s, t;
for(int i = 0; i < m; i++) {
s.push_back(A >> i & 1);
s.push_back(A >> i & 1);
s.push_back(A >> i & 1);
}
for(int i = 0, cur = 0; i < 3 * m; i++) {
t.push_back(cur ^= 1);
}
return make_pair(s, t);
}
#include "Bruno.h"
#include <utility>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 0;
}
long long Bruno(std::vector<int> u) {
vector<int> bit;
int real_sum = 0, fake_sum = 0;
for(int &j : u) {
if (j == 0) fake_sum--;
else fake_sum++;
if (fake_sum >= real_sum + 3) {
real_sum += 3;
bit.push_back(1);
}
if (fake_sum <= real_sum - 2) {
real_sum -= 3;
bit.push_back(0);
}
}
long long ans = 0;
for(int j = 0; j < bit.size(); j++) if (bit[j]) ans |= (1LL << j);
return ans;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
