Submission #1078476

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10784762024-08-27 18:04:11oscar1fBroken Device (JOI17_broken_device)C++17
85 / 100
31 ms2900 KiB
#include<bits/stdc++.h>
#include "Annalib.h"
using namespace std;
using ll=long long;
static const ll TAILLE_MAX=150+5;
static bool estCache[TAILLE_MAX];
static ll nbVal;
static void envoi(vector<ll> v) {
for (int i=0;i<nbVal;i++) {
Set(i,v[i]);
}
}
void Anna(int N,ll X,int K,int P[]) {
nbVal=N;
ll obj=X;
ll nbCache=K;
for (ll i=0;i<nbVal;i++) {
estCache[i]=false;
}
for (ll i=0;i<nbCache;i++) {
estCache[P[i]]=true;
}
vector<ll> listeTrois;
while (obj>0) {
listeTrois.push_back(obj%3);
obj/=3;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...