Submission #837775

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8377752023-08-25 16:45:54BaytoroPrisoner Challenge (IOI22_prison)C++17
0 / 100
0 ms212 KiB
#include "prison.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
#define ll long long
#define sc second
#define fr first
#define pb push_back
vector<vector<int>> devise_strategy(int n) {
vector<vector<int>> a(23,vector<int>(n,0));
for(int i=1;i<=n;i++){
int tmp=i;
for(int j=0;j<7;j++) tmp/=3;
a[0][i]=19+tmp%3;
}
for(int i=1;i+1<(int)a.size();i++){
if(((i-1)/3)%2==0){
a[i][0]=1;
for(int j=1;j<=n;j++){
int tmp=j;
for(int k=0;k<=(i-1)/3;k++) tmp/=3;
if(tmp%3>(i-1)%3)
a[i][j]=-1;
else if(tmp%3<(i-1)%3)
a[i][j]=-2;
else{
int tmp=j;
for(int k=0;k<=(i-1)/3-1;k++)
tmp/=3;
if(i<4){//<-
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...