# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
313394 | Kenzo_1114 | Broken Device (JOI17_broken_device) | C++17 | 55 ms | 3072 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 "Annalib.h"
using namespace std;
const int MAXN = 160;
bool marc[MAXN];
void Anna(int n, long long x, int k, int p[])
{
for(int i = 0; i < k; i++) marc[p[i]] = true;
marc[n] = true;
int bit = 0;
for(int i = 0; i < n; i++)
{
if(bit >= 60 || marc[i] || marc[i + 1]) Set(i, 0);
else
{
Set(i, 1); i++;
Set(i, (int) ((x & (1LL << bit)) > 0)); bit++;
}
}
}
#include<bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
long long Bruno(int n, int a[])
{
long long x = 0;
int bit = 0;
for(int i = 0; i < n; i++)
if(a[i])
{
x += (long long) a[i + 1] << bit;
i++, bit++;
}
return x;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |