当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3028:Robot

题目描述
There are n places (numbered 1,2,...,n), and at any second X, in place A, it will appear k robots. Now you have normal weapons. If at the second X and you are in place A, you will distroy those k robots. Otherwise, you have a special weapon (named O4), if you at second X in the place A and use O4, you will destroy all the robots which appear in the place adjoining to A (OF COUSE include the place A). You move from place A to B (B adjoins to A) must use some second;

Now you have T second ,and ask you two questions:

1. if you have an O4, how many robots can you destroy?(the maximum number);
2. if you don't have O4 but weapons, how many robots can you destroy?(the maximum number);
输入解释
First line: n, m, T. (n is the number of place, m is the number of roads between place, T is the seconds you have), n ≤ 100, m ≤ 2500, t ≤ 1000;

From 2 to m + 1 line: every line contains 3 integers, P, Q, D, indicating that moving from place P to place Q will use D seconds (the roads are undirection);

Next every line contains 3 integers, X, A, K, indicating at the X second, the place A will appear K robots;

The last line contains three "0" indicating that the case is end;
输出解释
The answer to the two question, separate by one space.
输入样例
3 2 10
1 2 1
2 3 2
1 1 1
2 2 2
3 3 3
4 1 4
2 3 3
4 2 2
6 1 4
8 2 3
10 2 2
9 1 1
7 1 5
3 2 2
8 1 8
0 0 0
输出样例
32 29
来自杭电HDUOJ的附加信息
Recommend gaojie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3028

最后修改于 2020-10-25T22:59:22+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)