题目传送门 1 /* 2 题意:三种人,statements,testdata,anthing。要求两个人能完成s和t两个工作,且rank相差2 3 二分图匹配:此题学习建图技巧,两个集和内部一定没有边相连,rank模4小于2和大于等于2的人才能搭配,并且相差正好2, 4 ...
分类:
编程语言 时间:
2015-07-18 16:57:17
阅读次数:
116
硬币找零&&爬楼梯&&猴子摘香蕉 假设有几种硬币,如1、3、5,并且数量无限。请找出能够组成某个数目的找零所使用最少的硬币数。 #include"CoinProblem.h"#includeint countNum=MAX;void CoinProblem(int *coin,int Length,...
分类:
其他好文 时间:
2015-07-17 20:41:08
阅读次数:
137
Problem Description
Alice and Bob are playing a kind of special game on an N*M board (N rows, M columns). At the beginning, there are N*M coins in this board with one in each grid and every coin ma...
分类:
其他好文 时间:
2015-07-14 13:37:50
阅读次数:
135
First I was stuck at how to represent state of "add all except i".. but after checking editorial, it is simply inverted Coin Change problem..#include ...
分类:
其他好文 时间:
2015-07-07 07:03:50
阅读次数:
120
Destroy不是立即发生作用,而是推迟到帧末,所以下面代码是错误的:voidOnTriggerEnter(Colliderother){ if(other.gameObject.tag=="coin"){ m_score++; Destroy(other.gameObject); }...
分类:
编程语言 时间:
2015-07-05 13:37:28
阅读次数:
631
地址: http://acm.nyist.net/JudgeOnline/problem.php?pid=204
分类:
其他好文 时间:
2015-07-02 19:16:46
阅读次数:
130
If coin order matters, that is, each sequence is unique, the DP function is simple enough to make it 1D DP. But key is that order DOESN'T matter, so w...
分类:
其他好文 时间:
2015-06-30 06:34:05
阅读次数:
125
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1232
题意:每个物品价值为val[i] (>=1),每个物品有k种,组成价值为k的方案数。完全背包。
解法:完全背包计数。
代码:#include
#include
#include
#include <limits.h...
分类:
其他好文 时间:
2015-06-16 13:09:40
阅读次数:
131
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1231
题意:多重部分和的解法有几种。
代码:#include
#include
#include
#include
#include
#include
#incl...
分类:
其他好文 时间:
2015-06-16 09:23:33
阅读次数:
230
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
It is possible to make £2 in the...
分类:
其他好文 时间:
2015-06-03 12:00:39
阅读次数:
114