题意:有一个n*m的棋盘,要求用1*2的骨牌来覆盖满它,有多少种方案?(n 2 #include 3 #include 4 #include 5 #define pii pair 6 #define INF 0x3f3f3f3f 7 #define LL long long 8 using n...
分类:
其他好文 时间:
2015-09-03 13:59:27
阅读次数:
138
题目链接:zoj 3871 Convex Hull
枚举每条边,计算出有多少情况下为凸包的边界,即有多少点在该边的左边。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef pair pii;
typedef long long ll;
const d...
分类:
其他好文 时间:
2015-09-01 01:51:04
阅读次数:
269
Tmux是一个优秀的终端复用软件,类似GNU Screen,但是对两个软件评价已经是一边倒了,大多数人认为tmux功能更加强大,使用更加方便。Tmux不仅可以提高终端工作效率,是服务器管理工作必不可少的工具,更拉风的是可以做远程的Pair Programming。下面是我的一些.tmux.conf设...
分类:
其他好文 时间:
2015-08-31 23:20:57
阅读次数:
164
思路:最暴力的想法,用一个三重循环去遍历,这道题给出的时间是2秒,而且cf的服务器肯定很好,所以时间上应该是没有压力的,但我心里一直没底,总感觉会超时。
在这里,看了大牛们的代码,学了一个新思路,对于一个三重循环,可以找出他们两两之间有什么关系,用pair, strcut保存下来,题目里的m是4000,远远小于n...
分类:
其他好文 时间:
2015-08-31 11:56:12
阅读次数:
146
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5305Problem DescriptionThere arenpeople andmpairs of friends. For every pair of friends, they can choos...
分类:
其他好文 时间:
2015-08-30 17:26:09
阅读次数:
147
题目如下:
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assign...
分类:
其他好文 时间:
2015-08-29 12:40:42
阅读次数:
244
package com.leegh.parameterization/** * @author Guohui Li */class Pair_Ordering[T: Ordering](val first: T, val second: T) { def bigger(implicit order....
分类:
其他好文 时间:
2015-08-29 09:44:52
阅读次数:
215
本来这个算法在笔者电脑里无人问津过一段时间了,但今天正好做HDU 1007见到了这个问题,今天就来把代码分享出来吧! ????我们首先将所有点按照坐标x排序一下,再做一条直线l当作“分割线”,方便我们...
分类:
编程语言 时间:
2015-08-28 20:00:15
阅读次数:
332
package com.leegh.parameterization/** * @author Guohui Li */class Pair_NotPerfect[T 0) first else second}//class Pair_NotPerfect[T 0) first else sec.....
分类:
其他好文 时间:
2015-08-28 12:24:45
阅读次数:
116
n participants of «crazy tea party» sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time (in minutes...
分类:
其他好文 时间:
2015-08-27 22:27:36
阅读次数:
239