常识:One of the biggest headaches on the guitar is the fact that most of the notes may be played in a variety of different positions. For example, Diagr...
分类:
其他好文 时间:
2014-10-03 21:07:55
阅读次数:
156
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1598思路:通过思路转换,可以看出是求两个点之间最大边权值与最小边权值之差最小的。克鲁斯卡尔算法枚举之~#include #include #include #include #include #incl...
分类:
其他好文 时间:
2014-10-03 15:54:04
阅读次数:
210
有n个人,进行了若干场比赛,每场比赛每个人可以得0分或1分,给出每个人的得分,求至少进行了多少场比赛。就是两两配对,如果最大的比总数的一半还大,那么答案就是最大的数,否则就是总数的一半。#include #include #include using namespace std;int main()...
分类:
其他好文 时间:
2014-10-02 16:16:43
阅读次数:
200
Beautiful People
Time Limit: 5 Seconds Memory Limit: 32768 KB Special Judge
The most prestigious sports club in one city has exactly N members. Each of its members is strong and beauti...
分类:
其他好文 时间:
2014-10-02 14:10:43
阅读次数:
180
题意:求两条路 能从 400.0 -> 789.0 且这两条路不想交(除了端点400,789 )
求只能走一次的网络流需要用到拆点,
将点i 拆成 i 和 i+n i->i+n的容量为经过的次数 (这题为1 )
若i 能到达 j 则连接 i+n-> j
#include
#include
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-10-02 11:11:32
阅读次数:
169
G - Beautiful People
Time Limit: 10000/5000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
Special Judge
SubmitStatus
Problem Description
The most prestigious sport...
分类:
其他好文 时间:
2014-10-02 09:47:52
阅读次数:
181
打开文件
open(name[mode[,buffing])
name: 是强制选项,模式和缓冲是可选的
#如果文件不在,会报下面错误:
[python] view plaincopyprint?
>>> f = open(r'D:\text.txt','r')
Traceback (most recent call last):
File "", line 1, in
IOError: [Errno 2] No such file or direc...
分类:
编程语言 时间:
2014-10-01 03:25:00
阅读次数:
516
Follow up the "remove duplicates",what if duplicates are allowed at most twice?思路一:使用变量numlength记录数组中相同数字出现不超过两次所得到的数组长度;code:class Solution {public: ...
分类:
其他好文 时间:
2014-09-30 23:01:00
阅读次数:
171
Description
You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear n...
分类:
其他好文 时间:
2014-09-30 16:58:17
阅读次数:
182
题目描述:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoint...
分类:
其他好文 时间:
2014-09-30 00:30:11
阅读次数:
211