Submission #1167372

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11673722025-03-16 04:20:33trandangquangBroken Device (JOI17_broken_device)C++20
0 / 100
19 ms1392 KiB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;
void Set(int pos, int bit);
void hihi(int p, int val){
for(int i=0; i<3; ++i){
Set(p+i,val>>i&1);
}
}
void Anna(int N, long long X, int K, int P[]){
vector<int>A(N,0);
for(int i=0; i<K; ++i) A[P[i]]=1;
deque<int> dq;
for(int i=0; i<60; ++i){
dq.push_back(X>>i&1);
}
for(int i=0; i<120; ++i) dq.push_back(0);
for(int i=0; i<N; i+=3){
int t=A[i]+A[i+1]+A[i+2];
if(t>=2){
Set(i,0), Set(i+1,0), Set(i+2,0);
}
else if(t==1){
if(A[i]==1){
if(dq[0]) hihi(i,6);
else hihi(i,2);
dq.pop_front();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...