题目链接:http://acm.fzu.edu.cn/problem.php?pid=2212 题目大意: 现在有n个手机,一个电量为m%(百分之m)的万能充电宝 然后输入n个手机的现有电量(百分之a[i]),现在问你这个万能充电宝能把几个手机充满(电量为百分之百). //思路: 将n个手机的电量进行一个排序,从最满的开始充,每充满一个手机,充电宝的电就要减去消耗的电量,如果充电还有电则代表此手机充电成功,如此一来,就可以计算充电宝能将几个手机充满了 AC代码: #include <cstdio…
 Problem 2212 Super Mobile Charger Accept: 1033    Submit: 1944Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description While HIT ACM Group finished their contest in Shanghai and is heading back Harbin, their train was delayed due to the…
[Description] [题目描述] While HIT ACM Group finished their contest in Shanghai and is heading back Harbin, their train was delayed due to the heavy snow. Their mobile phones are all running out of battery very quick. Luckily, zb has a super mobile charg…
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2213 题目大意:两个圆,并且知道两个圆的圆心和半径,求这两个圆共同的切线有多少条,若有无数条,输出-1,其他条如数输出 解题思路:这道题只需要判断两圆心的距离与半径的距离即可,代码里面有详细解释 AC代码 #include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #incl…
B - Super Mobile Charger Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Practice FZU 2212 Description While HIT ACM Group finished their contest in Shanghai and is heading back Harbin, their train was delayed due to the…
Biggest Number 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 You have a maze with obstacles and non-zero digits in it: You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of the four neighb…
from:piaocoder Common Tangents(两圆之间的公公切线) 题目链接: http://acm.fzu.edu.cn/problem.php?pid=2213 解题思路: 告诉你两个圆的圆心与半径,要你找出他们的公共切线的个数. 套模板即可. http://blog.csdn.net/piaocoder/article/details/41649089 #include <iostream> #include <cstdio> #include <cma…
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2214 题目大意:给你T组数据,每组有n个物品,一个背包容量B,每件有体积和价值.问你这个背包容纳的物品最大价值是多少.每个物品只能放入一次背包.  解题思路:首先这个很清楚看出来是个01背包.但是这个背包容量特别大,同时物品的体积很大,总的价值却很少.寻常意义上d[i]表示背包容量为i时的最大价值,那么我们把这个d[]数组的含义改变一下,d[i]表示装价值为i时所需的最小容量. AC代码: #include…
http://acm.fzu.edu.cn/problem.php?pid=2271 [题意] 给定一个n个点和m条边的无向连通图,问最多可以删去多少条边,使得每两个点之间的距离(最短路长度)不变. [思路] 首先对于多重边可以只保留最短的边,剩下的都删去 跑一次Floyd,用vis数组记录哪些边可以被松弛(注意map[i][k]+map[k][j]==map[i][j]时,i-j这条边如果在原图,也可以被删去) 最后遍历一下所有的原图的边,可以被松弛的就可以被删去 [Accepted] #in…
题目链接:http://acm.hust.edu.cn/vjudge/contest/127149#problem/J 题目大意: 因为总共就分三个队,因为两个队都要选取最优的策略,不论B队咋放,要使A队赢 . 设A队N人,B队M人. 设A第一次排a人,如果B这次要赢,根据最优就派(a+1)人,所以A下两场必需赢就可以得到(N-a)/2>=(M-a-1);因为B队已经赢了一次所以,可以把剩下的都放在一个队上. 假如B这次选择输,那他就在这次不派人,那么在下两场中A必须在赢一次,那么A只要在一次中…