제출 #697438

#제출 시각아이디문제언어결과실행 시간메모리
697438Deepesson경찰관과 강도 (BOI14_coprobber)C++17
0 / 100
184 ms262144 KiB
#include <bits/stdc++.h> using namespace std; #define MAX_N 500 // modify the following functions // you can define global variables and functions std::vector<int> con[MAX_N]; int start(int N, bool A[MAX_N][MAX_N]) { int count=0; for(int i=0;i!=N;++i){ for(int j=0;j!=N;++j){ if(i==j)continue; con[i].push_back(j); } } return 0; } int obj=0; int dfs(int pos,int prev=-1){ if(pos==obj){ return pos; } for(auto&x:con[pos]){ if(x==prev)continue; if(dfs(x,pos)){ return x; } } return -1; } int atual=0; int nextMove(int R) { obj=R; return atual=dfs(atual); }

컴파일 시 표준 에러 (stderr) 메시지

coprobber.cpp: In function 'int start(int, bool (*)[500])':
coprobber.cpp:11:9: warning: unused variable 'count' [-Wunused-variable]
   11 |     int count=0;
      |         ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...