| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 677319 | Truitadepatates | 경찰관과 강도 (BOI14_coprobber) | C++14 | 50 ms | 1740 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
//subtask 2
vector<int> adj[501];
int cop = 1;
int vertex2;
int start(int n, bool a[500][500]){
  for (int i = 0; i < n; i++){
    for (int j = 0; j < n; j++){
      if (a[i][j] == 1){
        adj[i+1].push_back(j+1);
      }
    }
  }
  for (int i = 2; i < n; i++){
    if (adj[i].size() == 2) {
      vertex2 = i;
      break;
    }
  }
  return 0;
}
int nextMove(int r){
  int m = cop%vertex2;
  r++;
  if (r == cop) return r-1;
  if ((r == cop+1 && m != 0) /*or (r = cop-1 && m != 1)*/ or (r == cop+vertex2) /*or (r == cop-vertex2)*/){
    cop = r;
    return r-1;
  }
  if ((r == cop+vertex2+1 && m != 0) or (r == cop+vertex2-1 && m != 1) or (r == cop-vertex2-1 && m != 1) or (r == cop-vertex2+1 && m != 0)){
    return cop-1;
  }
  if (r > cop){
    /*if (r <= cop+(vertex2-(m)) && m != 0){
      cop++;
      return cop-1;
    }
    if (r < cop+vertex2){
      cop--;
      return cop-1;
    }*/
    if (r <= cop+vertex2+(vertex2-(m)) && m != 0){
      cop++;
      return cop-1;
    }
    cop+=vertex2;
    return cop-1;
  }
  /*else{
    if (r > cop-(m) && m != 0){
      cop--;
      return cop-1;
    }
    if (r > cop-vertex2 && m == 0){
      cop--;
      return cop-1;
    }
    if (r > cop-vertex2){
      cop++;
      return cop-1;
    }
    if (r > cop-vertex2-(m) && m != 0){
      cop--;
      return cop-1;
    }
    if (r > cop-(2*vertex2) && m == 0){
      cop--;
      return cop-1;
    }
    cop-=vertex2;
    return cop-1;
  }*/
}
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
