Problem Description
You are given N baskets of gold coins. The baskets are numbered from 1 to N. In all except one of the baskets, each gold coin weighs w grams. In the one exceptional basket, each go...
分类:
其他好文 时间:
2016-05-12 23:34:22
阅读次数:
240
??
Pleasant sheep and big big wolf
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2699 Accepted Submission(s): 1114
Problem Descrip...
分类:
其他好文 时间:
2016-05-12 21:51:15
阅读次数:
152
Problem Description
Your current task is to make a ground plan for a residential building located in HZXJHS. So you must determine a way to split the floor building with walls to make apartments in t...
分类:
其他好文 时间:
2016-05-12 21:44:42
阅读次数:
198
Problem DescriptionChen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Internet Meme. Wow.”. Gawker. Retrieved November 22, 2013.Doge is an Internet meme that became popular in 2013. The meme...
分类:
其他好文 时间:
2016-05-12 21:16:07
阅读次数:
207
题意给出n个树和m个种子,求把这m个种子放到n棵树中有多少中方法,可以选择不放。思路因为有可以不放的选择,所以我们可以看成是多加了n棵空树,所以答案就是C(mn+m)C\binom{m}{n+m}
因为n和m都很大,p比较小,所以直接用lucas就可以了。代码#include
#include
#include
#include <a...
分类:
其他好文 时间:
2016-05-12 21:05:58
阅读次数:
208
Problem Description
lin2144是一只小菜鸟,都是笨鸟先飞,lin2144想来个菜鸟先飞,他从0点出发
一开始的飞行速度为1m/s,每过一个单位时间lin2144的飞行速度比上一个单位时间的飞行速度快2m/s,问n (0 < n < 10^5)个单位时间之后lin2144飞了多远?Input
输入一个T表示为有几组数据
每组数据输入一个n,表示lin2144飞行的时间....
分类:
其他好文 时间:
2016-05-12 21:04:41
阅读次数:
256
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2049
Problem Description
国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:
首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一...
分类:
其他好文 时间:
2016-05-12 20:49:10
阅读次数:
158
#include
#include
#include
#include
#define maxn 100005
using namespace std;
typedef long long ll;struct Node{
int ls, rs, sum;
}p[maxn*20];
int a[maxn], b...
分类:
其他好文 时间:
2016-05-12 20:06:33
阅读次数:
177
Problem Description
开学了,杭电又迎来了好多新生。ACMer想为新生准备一个节目。来报名要表演节目的人很多,多达N个,但是只需要从这N个人中选M个就够了,一共有多少种选择方法?Input
数据的第一行包括一个正整数T,接下来有T组数据,每组数据占一行。
每组数据包含两个整数N(来报名的人数,1<=N<=30),M(节目需要的人数0<=M<=30)Output
每组数据输出...
分类:
其他好文 时间:
2016-05-12 18:37:57
阅读次数:
122
题意Gcd(n)=gcd(C[n][1],C[n][2],……,C[n][n-1])
f(n)= Gcd(3)+Gcd(4)+…+Gcd(i)+…+Gcd(n).
求f(n)。思路刚开始在gcd()的地方想消一下公式看看,发现Gcd(n)好像就等于n,然后python算了一下第二个样例发现不对,后来考虑可能有质因子的话会使gcd更小,就打了一个表,然后发现一共有三种情况:
1.如果n是素数,G...
分类:
其他好文 时间:
2016-05-12 17:03:39
阅读次数:
116