1013 Battle Over Cities
更多...
|
void | dfs (int i, const vector< unordered_set< int > > &g, int occupied, unordered_set< int > &marked) |
|
int | main (istream &cin, ostream &cout) |
|
| TEST (a1013, case1) |
|
◆ dfs()
void pat::a::a1013::dfs |
( |
int |
i, |
|
|
const vector< unordered_set< int > > & |
g, |
|
|
int |
occupied, |
|
|
unordered_set< int > & |
marked |
|
) |
| |
在文件 pat.cpp 第 4296 行定义.
4298 for(
auto nxt: g[i]) {
4299 if(!marked.contains(nxt) && nxt != occupied) {
4300 dfs(nxt, g, occupied, marked);
int dfs(const vector< unordered_set< int > > &g, int father, int nd)
引用了 dfs().
被这些函数引用 dfs() , 以及 main().
◆ main()
int pat::a::a1013::main |
( |
istream & |
cin, |
|
|
ostream & |
cout |
|
) |
| |
在文件 pat.cpp 第 4264 行定义.
4267 unordered_map<int, int> ans;
4268 vector<unordered_set<int>> g(n + 1);
4269 for(
int i = 0; i < m; i++) {
4275 for(
int i = 0; i < k; i++) {
4278 if(ans.contains(a)) {
4279 cout << ans[a] << endl;
4282 unordered_set<int> marked;
4284 for(
int j = 1; j <= n; j++) {
4285 if(j != a && !marked.contains(j)) {
4287 dfs(j, g, a, marked);
4290 cout << cnt - 1 << endl;
引用了 dfs().
被这些函数引用 TEST().
◆ TEST()
pat::a::a1013::TEST |
( |
a1013 |
, |
|
|
case1 |
|
|
) |
| |
在文件 pat_test.cpp 第 2044 行定义.
2045 istringstream in(
"3 2 3\n"
2049 auto out = ostringstream();
int main(int argc, char **argv)
引用了 main().