CSU 1684-Disastrous Downtime】的更多相关文章

You're investigating what happened when one of your computer systems recently broke down. So far you've concluded that the system was overloaded; it looks like it couldn't handle the hailstorm of incoming requests. Since the incident, you have had am…
NCPC 2015Problem DDisastrous DowntimeProblem ID: downtimeClaus Rebler, cc-by-saYou’re investigating what happened when one ofyour computer systems recently broke down. So faryou’ve concluded that the system was overloaded; itlooks like it couldn’t ha…
A:Adjoin the Networks One day your boss explains to you that he has a bunch of computer networks that are currently unreachable from each other, and he asks you, the cable expert's assistant, to adjoin the networks to each other using new cables. Exi…
题目链接:https://nanti.jisuanke.com/t/28879 思路:贪心,从最早收到请求的时刻开始,统计每个相差1000毫秒的时间段内接收的请求数量再计算该时间段内所需机器数目,答案就是所有时间段中最大的机器数目 #include<iostream> #define inf 0x3f3f3f3f using namespace std; ]; int main() { ,minn=inf; cin>>n>>k; ;i<;i++) a[i]=; ;…
传送门:csu 1812: 三角形和矩形 思路:首先,求出三角形的在矩形区域的顶点,矩形在三角形区域的顶点.然后求出所有的交点.这些点构成一个凸包,求凸包面积就OK了. /************************************************************** Problem: User: youmi Language: C++ Result: Accepted Time: Memory: ***********************************…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1503 解题报告:分两种情况就可以了,第一种是那个点跟圆心的连线在那段扇形的圆弧范围内,这样的话点到圆弧的最短距离就是点到圆心的距离减去半径然后再取绝对值就可以了,第二种情况是那个点跟圆心的连线不在那段扇形的圆弧范围内,这样的话,最短的距离就是到这段圆弧的端点的最小值. 接下来的第一步就是求圆心的坐标跟圆的半径,只要求出圆心坐标半径就好说了,求圆心坐标我用的方法是: 设圆心坐标是(a,b…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1120 解题报告:dp,用一个串去更新另一个串,递推方程是: if(b[i] > a[j]) m = max(m,dp[j]); else if(b[i] == a[j]) dp[j] = m + 1; #include<cstdio> #include<cstring> #include<iostream> #include<algorithm&g…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1116 解题报告:一个国家有n个城市,有m条路可以修,修每条路要一定的金币,现在这个国家只有K个金币,每个城市有一些人,要你求怎么修路使得总的费用在K的范围内,同时使得跟首都连接的城市的人口(包括首都的人口)要最多,问最多的人口是多少. 枚举连接哪些城市,然后分别构造最小生成树. #include<cstdio> #include<cstring> #include<…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1113 解题报告:输入两个字符串,第一个是原来的字典,第二个是新字典,字典中的元素的格式为一个关键字对应一个值,输入格式如下: {a:3,b:4,c:10,f:6} {a:3,c:5,d:10,ee:4}冒号前面的表示关键字,冒号后面的数字表示值,关键字由小写字母组成.现在让你判断,如果新的字典相对于原来的字典有新增的关键字以以下格式输出 :+key1,key2,....如果新的字典相对…
题目链接: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1333 解题报告:一个图里面有n个点和m条单向边,注意是单向边,然后每条路开a秒关闭b秒,问从s点到t点的最短时间.一个简单的最短路稍微变了一下. 卡了很久就因为没看到边是单向边,无语.可以用队列优化. #include<cstdio> #include<cstring> #include<iostream> #include<algorithm>…