제출 #395066

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3950662021-04-27 17:03:05Nicholas_Patrick경찰관과 강도 (BOI14_coprobber)C++17
60 / 100
3062 ms20544 KiB
#include "coprobber.h"
// #include "grader.cpp"
#include <cstdio>
#include <queue>
#include <bitset>
#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, cnt;
vector<vector<bitset<500>>> run;
void solve(int cop, int robber, bool copturn=true){
//calling this function: robber caught
if(copturn){
for(int i: adjLis[robber]){
cnt[cop][i]-=run[cop][i][robber];
run[cop][i][robber]=false;
if(cnt[cop][i]==0)//no place to run
solve(cop, i, false);
}
}else{
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...