Submission #1174370

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11743702025-03-26 23:20:34ortsacBroken Device (JOI17_broken_device)C++20
0 / 100
1 ms576 KiB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
void Anna(int32_t N, int x, int32_t k, int32_t p[] ){
// N = 150
vector<int> ans(150);
vector<int> broken(150);
for (int i = 0; i < k; i++) broken[p[i]] = 1;
int curr = 0;
for (int i = 0; i < 60; i++) {
int v = (((1LL << i) & x) > 0);
while (broken[curr] || broken[curr + 1]) curr += 2;
broken[curr] = 1;
broken[curr + 1] = v;
curr += 2;
}
for (int i = 0; i < 150; i++) Set(i, ans[i]);
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...