秋招模拟赛第38场|2023.08.30-华为秋招第二场
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2023-9-5 19:00
- End at
- 2023-9-5 21:00
- Duration
- 2 hour(s)
- Host
- Partic.
- 43
No testdata at current.
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
一个任务依赖另一个任务表示被依赖的任务是依赖的任务的前置,即如果a[i][j]==1就代表着有一条j指向i的边。如果需要运行时间更小,那么就需要尽量让多的任务并行。那么考虑拓扑排序,每轮将所有入度为0的点的权值求和,即为本轮所消耗的内存。每轮消耗的内存的最大值即为答案。
C++
#include <bits/stdc++.h>
本题属于以下题库,请选择所需题库进行购买