제출 #395059

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3950592021-04-27 16:52:57Nicholas_Patrick경찰관과 강도 (BOI14_coprobber)C++17
30 / 100
77 ms4032 KiB
#include "coprobber.h"
// #include "grader.cpp"
#include <cstdio>
#include <queue>
#include <algorithm>
using namespace std;
int cop;
bool a[MAX_N][MAX_N];
vector<int> adjLis[MAX_N];
//sub2
int sidelength;
vector<vector<int>> solved, run;
void solve(int cop, int robber, bool copturn=true){
//calling this function: robber caught
if(copturn){
for(int i: adjLis[robber]){
run[cop][i]--;
if(run[cop][i]==0)//no place to run
solve(cop, i, false);
}
}else{
if(cop==robber)
return;
for(int i: adjLis[cop]){
if(solved[i][robber]==-1){
solved[i][robber]=cop;
solve(i, robber, true);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...