很灵活的题目,题意简单,看到又是钱币问题,类似于那种给了一定数目T,有n种钱币,每种的价值,让你组合成总价值为T的方案数,但是加了一些限制条件,那就是某些种类钱币数量必须大于另一些种类的,加了个限制条件 我就脑残了,唉智商看来是真不够啊 ,后来看了别人的分析
倘若种类a的钱币数量必须要大于种类b的数量,那么如果我要 去 m张b种类的钱币,其实同时也是相当于已经取了m张a种类的,因为a必须大于b的...
分类:
其他好文 时间:
2014-07-29 14:34:58
阅读次数:
295
Description
Asterix, Obelix and their temporary buddies Suffix and Prefix has finally found the Harmony temple. However, its doors were firmly locked and even Obelix had no luck opening them.
A li...
分类:
其他好文 时间:
2014-07-29 14:22:28
阅读次数:
316
#include
using namespace std;
string m[]={"vaporeon","jolteon","flareon","espeon","umbreon","leafeon","glaceon","sylveon"};
int len[]={8,7,7,6,7,7,7,7};
int main()
{
int n,ans;
char s[20];
...
分类:
其他好文 时间:
2014-07-29 13:09:27
阅读次数:
200
Description An IPv6-address is a 128-bit number. For convenience, this number is recorded in blocks of 16 bits in hexadecimal record, the blocks ar...
分类:
其他好文 时间:
2014-07-29 12:15:46
阅读次数:
289
题目:DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that ha...
分类:
其他好文 时间:
2014-07-29 10:25:58
阅读次数:
395
A. Eeveehttp://codeforces.com/contest/452/problem/A字符串水题 1 #include 2 #include 3 using namespace std; 4 const int M=16; 5 char a[16][M]={"vaporeon", "...
分类:
数据库 时间:
2014-07-28 14:36:33
阅读次数:
382
Descriptionnfish, numbered from1ton, live in a lake. Every day right one pair of fish meet, and the probability of each other pair meeting is the same...
分类:
其他好文 时间:
2014-07-28 11:30:30
阅读次数:
367
大致题意:
从n个盒子里面取出s多花,每个盒子里面的花都相同,并且每个盒子里面花的多数为f[i],求取法总数。
解题思路:
我们知道如果n个盒子里面花的数量无限,那么取法总数为:C(s+n-1, n-1) = C(s+n-1, s)。
可以将问题抽象成:x1+x2+...+xn = s, 其中0
两种方法可以解决这个问题:
方法一:这个问题的解可以等价于:mul = (1+x+x^2+...
分类:
其他好文 时间:
2014-07-28 00:15:49
阅读次数:
184
题目链接:点击打开链接
== 难得的y出了一道计算几何
#include
#include
#include
#include
#include
using namespace std;
#define INF 999999999.9
#define PI acos(-1.0)
#define ll long long
struct Point
{
ll x, y,...
分类:
移动开发 时间:
2014-07-28 00:15:29
阅读次数:
326
Time Limit:2000MS Memory Limit:262144KB
64bit IO Format:%I64d & %I64u
Submit
Status
Practice
CodeForces 424C
Description
People in the Tomskaya region like magic formulas ve...
分类:
其他好文 时间:
2014-07-28 00:08:19
阅读次数:
264