제출 #879629

#제출 시각아이디문제언어결과실행 시간메모리
879629SzypkiBillPrisoner Challenge (IOI22_prison)C++17
5 / 100
21 ms19112 KiB
#include "prison.h"

#include <vector>

std::vector<std::vector<int>> devise_strategy(int N) {
  //return {std::vector<int>(N + 1, 0)};
  std::vector<std::vector<int>> V(N+1);
  for(auto &w : V) w.resize(N+1);
  for(int i=1; i<=N; i++)V[i][0] = 1;
  for(int j=1; j<=N; j++) V[0][j] = j;
  for(int i=1; i<=N; i++){
    for(int j=1; j<=N; j++){
        if(j>i)V[i][j] = -1;
        if(i>j)V[i][j] = -2;
    }
  }
  return V;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...