# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97561 | shoemakerjo | Broken Device (JOI17_broken_device) | C++14 | 64 ms | 3328 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 "Annalib.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
bool marked[200];
void Anna( int N, ll X, int K, int P[] ){
for (int i = 0; i < N; i++) marked[i] = false;
for (int i = 0; i < K; i++) {
marked[P[i]] = true;
}
int a, b, c;
for (int i = 0; i < N; i += 3) {
a = i; b = i+1; c = i+2;
int ct = 0;
if (marked[a]) ct++;
if (marked[b]) ct++;
if (marked[c]) ct++;
if (ct >= 2) {
Set(a, 0); Set(b, 0); Set(c, 0);
continue;
}
if (ct == 0) {
//set all to 1 for a 1 bit
if (X % 4 == 0) {
Set(a, 0); Set(b, 1); Set(c, 1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |