Submission #979757

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9797572024-05-11 10:48:55sleepntsheepPrisoner Challenge (IOI22_prison)C++17
0 / 100
0 ms348 KiB
#include "prison.h"
//#include<cstdio>
#include <vector>
std::vector<std::vector<int>> devise_strategy(int N) {
/*
* compare digits-by-digits
*
* On base B, this happens ln(N)/ln(B) iterations
* each iterations need B place to store the result,
* and another to denotes that one need to check the next bits
* f(B) = (B + 1) * ln(N) / ln (B)
*/
constexpr int B = 4, X = 29;
std::vector<std::vector<int> > s(X+1, std::vector<int>(N+1));
auto get = [&](int x, int i)
{
while(i--) x/=B;
return x%B;
};
for(int read=0;read<=X;++read)
{
auto write = [&](int j,int x) { s[read][j] = x; };
int at=(read)/(B+1);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...