UESTC--1548】的更多相关文章

  UESTC - 649  括号配对问题 Time Limit: 1000MS   Memory Limit: 65535KB   64bit IO Format: %lld & %llu Description 大家都知道算术表达式中,括号必须配对,现在任意给出一个算术表达式,判断其括号是否配对.如果配对,输出Yes,否则输出No. Input 含多组测试数据,输入首先是一个整数T表示测试数据组数(0<T≤300).随后有T行测试数据,长度不超过1000个字符,字符串间不含空格. Out…
题意: n种食物,每种含花椒的概率为Pi,现在已经选择了[L,R]这个区间(下标)的食物,要再选一个,使总的食物只有一种含花椒的概率最大,问选哪个最好,相同的选下标小的. 解法: 就不写解法了.此处有官方题解: http://acm.uestc.edu.cn/bbs/read.php?tid=5835 维护一个前缀后缀的最值即可. 代码: #include <iostream> #include <cstdio> #include <cstring> #include…
找规律水题... Traveling Cellsperson Time Limit: 1000ms Memory Limit: 65535KB This problem will be judged on UESTC. Original ID: 185264-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Type:  …
状压DP... Kings on a Chessboard Time Limit: 10000ms Memory Limit: 65535KB This problem will be judged on UESTC. Original ID: 185164-bit integer IO format: %lld      Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Type:  …
最短路 Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Status 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的T-shirt.但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据. 每组数据第一行是两个整数NN,MM(N≤100N≤10…
http://acm.hdu.edu.cn/showproblem.php?pid=1548 Online Judge Online Exercise Online Teaching Online Contests Exercise Author F.A.QHand In HandOnline Acmers Forum |DiscussStatistical Charts Problem ArchiveRealtime Judge StatusAuthors Ranklist       C/C…
Design road Problem's Link:   http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1548 Mean: 目的:从(0,0)到达(x,y).但是在0~x之间有n条平行于y轴的河,每条河位于xi处,无限长,wi宽,并分别给出了建立路和桥每公里的单价 求:到达目标的最小费用. analyse: 比赛的时候一直没想到思路,第二个样列怎么算都算不对,赛后才知道是三分. 首先把所有的桥移到最右端,然后三分枚举路和河的交点. Time…
题目链接:http://poj.org/problem?id=1548 题目大意:给出一张地图上的垃圾,以及一堆机器人.每个机器人可以从左->右,上->下.走完就废.问最少派出多少个机器人才能捡完所有垃圾. 解题思路: 本题原本是个LIS题.但是有二分图匹配解法. 类似POJ 3020的覆盖题,先不管机器人.把每个点都看作一个中心点.然后从这个点出发,向右.下方向连边,这样这个点就可以看作派出的机器人了. 由于方向固定,怎么连都不会连出反向边,所以是个天然有向图. 跑一遍Hungry,ans=…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1548 A strange lift Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number $K_i(0 \leq K_i \leq N)$ on every floor.The lift have just two buttons: up…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1548 There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if yo…