답안 #938357

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
938357 2024-03-05T05:04:09 Z Sir_Ahmed_Imran 경찰관과 강도 (BOI14_coprobber) C++17
0 / 100
1 ms 344 KB
                              ///~~~LOTA~~~///
#include "coprobber.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define append push_back
#define add insert
#define nl "\n"
#define ff first
#define ss second
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL)
#define N 500
int r;
int dept[N];
vector<int> g[N];
void dfs(int v){
    for(auto& i:g[v]){
        if(dept[i])
            r=max(r,dept[v]-dept[i]);
        else{
            dept[i]=dept[v]+1;
            dfs(i);
        }
    }
}
int start(int n, bool a[N][N]){
    for(int i=0;i<n;i++)
        for(int j=r=0;j<n;j++)
            if(a[i][j]) g[i].append(j);
    dept[0]=1;
    dfs(0);
    if(r>3) return -1;
    return 0;
}
int nextMove(int v){
    return -1;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
2 Halted 0 ms 0 KB -