Marriage Match II
Time Limit: 2000/1000 MS (Java/Others) Memory Limit:
32768/32768 K (Java/Others)
Problem Descript...
分类:
其他好文 时间:
2014-05-26 04:40:15
阅读次数:
228
http://acm.hdu.edu.cn/showproblem.php?pid=1115思路:转换为求三角形的重心。从第一个顶点出发,分别链接i,i+1形成三角形,分别求出每个三角形的面积,总面积之和为各部分之和。根据物理公式n个点的质量是mi,则重心是:X=(x1*m1+x2*m2+...xn...
分类:
其他好文 时间:
2014-05-26 04:04:18
阅读次数:
232
Problem Description
In a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes of the regular polygon, can you calculate t...
分类:
其他好文 时间:
2014-05-26 03:50:40
阅读次数:
252
http://acm.hdu.edu.cn/showproblem.php?pid=1071#include#includeint
main(){ //freopen("in.txt","r",stdin); int t; scanf("%d",&t); while(t--)...
分类:
其他好文 时间:
2014-05-26 02:14:56
阅读次数:
222
http://acm.hdu.edu.cn/showproblem.php?pid=1086跨立实验算法#include#include#include#includeusing
namespace std;struct Point{ double x,y;} ;struct Line{ ...
分类:
其他好文 时间:
2014-05-26 02:10:52
阅读次数:
224
Higher MathTime Limit: 2000/1000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
2219Accepted Submission(s): 1219Problem...
分类:
其他好文 时间:
2014-05-26 01:48:52
阅读次数:
337
Problem
Description度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,且只能向上向下向右走以前没有走过的格子,每一个格子中都有一些金币(或正或负,有可能遇到强盗拦路抢劫,度...
分类:
其他好文 时间:
2014-05-25 23:41:38
阅读次数:
267
这道题可以用线段树或者树状数组,我在网上看有些大神竟然没用线段树和树状数组就把这道题搞出来了。。汗。。。线段树:线段树不能更新到叶子,否则超时。代码:
1 #include 2 #include 3 #include 4 #include 5 #define N 100005 6 using...
分类:
其他好文 时间:
2014-05-25 23:17:40
阅读次数:
287
题目:
链接:点击打开链接
题意:
n个课程m天完成,a[i][j]表示用j天完成第i个课程得到的价值,求最大价值。
算法:
分组背包。
思路:
m天是总容量,n是组数。
代码:
#include
#include
#include
using namespace std;
int n,m;
int a[110][...
分类:
其他好文 时间:
2014-05-25 18:16:18
阅读次数:
223
sg[0]=0;sg[i]=mex{sg[i-2^(j)]}
(i>=2^j)mex()为不在此集合的最小非负整数#include #include #include #include using namespace
std;using namespace std;int main(){ in...
分类:
其他好文 时间:
2014-05-25 03:27:01
阅读次数:
170