| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1073701 | fv3 | Prisoner Challenge (IOI22_prison) | C++17 | 0 ms | 348 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "prison.h"
#include <bits/stdc++.h>
 
using namespace std;
 
vector<vector<int>> devise_strategy(int N) 
{
  vector<vector<int>> p(13 * 2 - 1, vector<int>(N+1, 1));
  int bit = 12;
  
  p[0][0] = 0;
  for (int j = 1; j <= N; j++)
  {
    if (j & (1 << bit))
      p[0][j] = 1;
    else
      p[0][j] = 2;
  }
 
  for (int i = 1; i < 13 * 2 - 1; i++)
  {
    bool A = ((i - 1) / 2) % 2;
    if (A)
      p[i][0] = 0;
 
    if (i % 2)
    {
      bit--;
      for (int j = 1; j <= N; j++)
      {
        if (j & (1 << (bit + 1)))
          p[i][j] = A ? -1 : -2;
        else if (j & (1 << (bit + 1)))
          p[i][j] = i + 2;
        else
          p[i][j] = i + 3;
      }
    }
    else
    {
      for (int j = 1; j <= N; j++)
      {
        if (j & (1 << (bit + 1)) == 0)
          p[i][j] = A ? -2 : -1;
        else if (j & (1 << bit))
          p[i][j] = i + 2;
        else
          p[i][j] = i + 1;
      }
    }
  }
 
  for (auto&n : p[24])
  {
    if (n == 25) n = -1;
    else n = -2;
  }
  for (auto&n : p[23])
  {
    if (n == 25) n = -1;
    else n = -2;
  }
  p[23][0] = 0;
  p[24][0] = 0;
 
  return p;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
