ZOJ Problem Set - 3598Spherical TriangleTime Limit:2 Seconds Memory Limit:65536 KBAs everybody knows, the sum of the interior angles of a triangle on ...
分类:
其他好文 时间:
2015-05-07 21:50:15
阅读次数:
139
每年省赛必有的一道模拟题,描述都是非常的长,题目都是蛮好写的...sigh... 比赛的时候没有写出这道题目 :(题意:首先输入4个数,n,q,p,c代表有n个队伍,q个服务器,每支队伍的初始分数p,还有c次操作对于每次操作,首先输入一个k,代表k次攻击每次攻击有三个数,a,b,c,代表a通过c服务...
分类:
其他好文 时间:
2015-05-07 16:27:30
阅读次数:
127
Digit NumberTime Limit:10 Seconds Memory Limit:65536 KBGiven an integernand an integerm, please calculate the minimal multiple ofnwhich consists of ex...
分类:
其他好文 时间:
2015-05-07 06:22:22
阅读次数:
90
NimTime Limit:3 Seconds Memory Limit:65536 KBNim is a mathematical game of strategy in which two players take turns removing objects from distinct hea...
分类:
其他好文 时间:
2015-05-07 06:17:50
阅读次数:
241
最小生成树,刚刚学了Prim算法。对每条边变的权值进行预处理,c[i][j] = c[i][j] + p[i] + p[j] 其中c[i][j]为输入的权值,p[i],p[j]为连接这两个节点所需的费用。#include#include#include#includeusing namespace ...
分类:
Web程序 时间:
2015-05-07 00:23:01
阅读次数:
187
Number PuzzleTime Limit: 2 Seconds Memory Limit: 65536 KBGiven a list of integers (A1, A2, ..., An), and a positive integer M, please find the number ...
分类:
其他好文 时间:
2015-05-06 19:31:00
阅读次数:
106
最小生成树,用了Kruskal算法。POJ上C++能过,G++不能过。。。 算出每两个圆心之间的距离,如果距离小于两半径之和,那么这两个圆心之间的距离直接等于0,否则等于距离-R[i]-R[j]。#include#include#include#includeusing namespace std;...
分类:
其他好文 时间:
2015-05-06 17:18:04
阅读次数:
99
题意:0~n-1的数组,初始值为0;执行m个操作,每次操作执行后输出当前值为0的连续段的段数。操作1: pi j : i~j区间的每个元素值减1操作2: r i j:i~j区间的每个元素值加1,每个r操作之前,一定有个相应的p操作数据范围:1 #include using namespace std...
分类:
系统相关 时间:
2015-05-06 12:46:12
阅读次数:
130
题意:猴子们打架 认识的猴子不会打架 两仅仅猴子打完以后就认识了 A认识B B认识C A也认识C 每次打架由两伙猴子进行 分别选出自己的最高战斗力 在战斗之后两仅仅猴子战斗力减半 给出m次打架 输出打架后这一伙猴子里的最强战斗力思路:推断两仅仅猴子是不是一伙的 用到并查集高速找出一伙猴子中的最强战斗...
分类:
其他好文 时间:
2015-05-05 12:20:46
阅读次数:
150
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3754本题分数为0的概率不确定,所以不能从0这端出发.设E[i]为到达成功所需的步数,明显i>n时E[i]=0,当0#include #include using namespac...
分类:
其他好文 时间:
2015-05-05 12:18:31
阅读次数:
130