Coldfresh的博客

keeeeeep!~

【51nod 1161】 Partial Sums (组合数学)

题目来源: CodeForces 基准时间限制:2 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 给出一个数组A,经过一次处理,生成一个数组S,数组S中的每个值相当于数组A的累加,比如:A = {1 3 5 6} => S = {1 4 9 15}。...

2018-09-07 15:15:24

阅读数:10

评论数:0

【ZOJ - 2116】Christopher's Christmas Letter(Lucas)

Dashing thro’ the snow, In a one-horse open sleigh, O’er the fields we go, Laughing all the way; Bells on bobtail ring, Making spirits bright; ...

2018-08-24 14:19:56

阅读数:44

评论数:0

【bzoj1284】树的计树(组合数学+prufer数列)

一个有n个结点的树,设它的结点分别为v1, v2, …, vn,已知第i个结点vi的度数为di,问满足这样的条件的不同的树有多少棵。给定n,d1, d2, …, dn,编程需要输出满足d(vi)=di的树的个数。 Input 第一行是一个正整数n,表示树有n个结点。第二行有n个数,第i个数表示...

2018-08-23 16:15:44

阅读数:43

评论数:0

【HDU 5917】Instability(ramsey定理)

Long long ago, there was a prosperous kingdom which consisted of n cities and every two cites were connected by an undirected road. However, one day...

2018-08-16 19:43:12

阅读数:24

评论数:0

Almost Identity Permutations CodeForces - 888D (错排公式)

A permutation p of size n is an array such that every integer from 1 to n occurs exactly once in this array.Let’s call a permutation an almost identi...

2017-11-12 16:40:57

阅读数:325

评论数:0

hannnnah_j’s Biological Test HDU - 5894 (组合数)

hannnnah_j is a teacher in WL High school who teaches biology.One day, she wants to test m students, thus she arranges n different seats around a rou...

2017-09-08 12:16:26

阅读数:133

评论数:0

HDU 4135 Co-prime(容斥原理)

Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two integers are said to...

2017-07-19 14:44:36

阅读数:202

评论数:0

GCD HUD 1695(容斥原理)

Given 5 integers: a, b, c, d, k, you’re to find x in a…b, y in c…d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since ...

2017-07-18 23:18:09

阅读数:118

评论数:0

Astronomy POJ - 3101(LCM 和DCD)

There are n planets in the planetary system of star X. They orbit star X in circular orbits located in the same plane. Their tangent velocities are c...

2017-06-06 11:15:30

阅读数:143

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭