bzoj1379 [Baltic2001]Postman
来源:互联网 发布:wifi网络调试助手 编辑:程序博客网 时间:2024/06/05 00:16
Description
邮递员每天给N个村子的人送信,每个村子可能在某个十字路口上,或一条路的中央. 村子里的人都希望早点收到信,因此与邮递员达成一个协议:每个村子都有一个期望值Wi,如果这个村子是邮递员经过的第K个不同的村子,那么如果K<=Wi,则村子给他Wi-K元,反之他给村子K-Wi元.别外每经过一条不同的路,邮局会给他1元钱,而邮局的规定是每条路(共M条路)都至少经过一次,邮递员要怎么走才能拿到最多的钱.
Input
第一行给出N,M代表有多少个点,多少条边. 下面N个数,代表Wi,Wi在[1,1000] 下面M行,代表图的结构.
Output
最多可以赚到多少钱....
Sample Input
6 7
1
7
4
10
20
5
2 4
1 5
2 1
4 5
3 6
1 6
1 3
1
7
4
10
20
5
2 4
1 5
2 1
4 5
3 6
1 6
1 3
Sample Output
7
HINT
ccy神犇指出这题翻译有错,因为拿样例去试都不对
其实只要输出m就可以
#include<cstdio>int n,m;int main(){scanf("%d%d",&n,&m);printf("%d",m);}
0 0
- bzoj1379 [Baltic2001]Postman
- 1379: [Baltic2001]Postman
- BZOJ 1379: [Baltic2001]Postman 题解
- Postman
- PostMan
- Postman
- postman
- postman
- Postman
- PostMan
- postman
- postman
- PostMan
- postman
- PostMan
- postman
- PostMan
- 【POSTMAN】postman使用手册
- C语言运算符的优先级表
- adb shell查看文件夹大小
- Linux命令小记-uptime、lsof、last、source
- 常用的正则表达式
- CentoOS 6.5 Eclipse+Qemu搭建linux内核源码级调试环境
- bzoj1379 [Baltic2001]Postman
- HTML空白处理
- ubuntu desktop environment
- CentOS下出现Clock skew detected. Your build may be incomplete如何解决
- Cocos2d-x教程(28)-ttf 字体库的使用
- bzoj2001: [Hnoi2010]City 城市建设 wikioi2332
- HTTP 错误 500.19 - Internal Server Error
- Linux环境变量
- Construct Binary Tree from Preorder and Inorder Traversal