题目链接:1534 - Taekwondo
题意:两组人比赛,一组n1人,一组n2人,选择min(n1,n2)组出来,要求两两人重量差绝对值之和最小。
思路:首先先预处理让n1变成人少的一组,人少的每个人都必须去匹配,dp[i][j] i表示n1组第i个人,j表示第二组多少人没匹配,于是匹配的时候n1组的第i人就和n2组的第i + j的人去匹配,然后进行状态转移
dp[i][j] = {dp...
分类:
其他好文 时间:
2014-07-22 23:00:15
阅读次数:
289
题目链接:uva 808 - Bee Breeding
题目大意:按照题目中图片的方式将所有的正六边形标上序号,然后给出两个序号,问这两六边形最短要走多少步。
解题思路:将图中的坐标系进行修改
这样,每个位置和周围(除了左上角和右下角)位置相邻,只需要一步。
并且建坐标的方法可以按照6条边的方式
#include
#include
#inclu...
分类:
其他好文 时间:
2014-07-22 22:59:33
阅读次数:
273
【题目】
Problem E
Open Credit System
Input: Standard Input
Output: Standard Output
In an open credit system, the students can choose any course they like, but there is a problem. Some of the stude...
分类:
其他好文 时间:
2014-05-03 00:22:50
阅读次数:
380
二分时间+2sat
边加多了....RE了好久......
Now
or later
Time Limit: 9000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
[Submit] [Go Back] [Status]
D...
分类:
其他好文 时间:
2014-05-02 23:59:02
阅读次数:
712
Excuses, Excuses!
Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time requi...
分类:
其他好文 时间:
2014-05-02 23:54:43
阅读次数:
474
Artificial Intelligence?
Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and underst...
分类:
其他好文 时间:
2014-05-02 23:39:35
阅读次数:
485
【题目】
Your boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on them...
分类:
其他好文 时间:
2014-05-02 23:35:16
阅读次数:
526
题目链接:uva 618 - Doing Windows
题目大意:给出电脑桌面的大小W和H,现在在桌面上有4个窗口,给出窗口的初始大小,问说能不能通过调整各个窗口的大小(长宽比例不能变)使得4个屏幕刚好占满整个屏幕,并且互相不覆盖。
解题思路:其实可以直接暴力出所有情况,不过细节比较多,而且要考虑所有的细节。
我的做法的是先将4个窗口缩小至最小的状态,然后枚举左下角的窗口,...
Problem I
Automatic Poetry
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
“Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
分类:
其他好文 时间:
2014-05-02 22:51:52
阅读次数:
352
我买的书或借的 没看的计算机方面: 深入浅出MFC vc++深入详解 算法入门 算法入门训练指南
大话数据结构 C++ 第6版本图像处理与机器视觉: 机器视觉 张广军 数字图像处理疑难解析 图像处理与计算机视觉算法应用 opencv2 图像配准技术模式识别:
机器学习实战 模式分类 神经网络设计 斯...
分类:
其他好文 时间:
2014-05-02 20:00:42
阅读次数:
323