# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1061556 | MarwenElarbi | Prisoner Challenge (IOI22_prison) | C++17 | 34 ms | 1364 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 <bits/stdc++.h>
#include "prison.h"
using namespace std;
#define pb push_back
#define ll long long
#define fi first
#define se second
std::vector<std::vector<int>> devise_strategy(int N) {
vector<vector<int>> tab(32,vector<int> (N+1,0));
int n=N;
tab[0][0]=0;
for (int i = 1; i < n+1; ++i)
{
if(i>=2*pow(3,7)){
tab[0][i]=3;
}else if(i>=pow(3,7)){
tab[0][i]=2;
}else{
tab[0][i]=1;
}
}
for (int i = 25; i <= 31; ++i)
{
tab[i][0]=0;
}
for (int j = 1; j < n+1; ++j)
{
int cnt=j;
while(cnt>=pow(3,7)) cnt-=pow(3,7);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |