Coldfresh的博客

keeeeeep!~

关于一些函数求前缀和的问题

1.设f(n)f(n)f(n)为n的因子的和,求: ∑i=1nf(i)∑i=1nf(i)\sum_{i=1}^nf(i) 其中n<1012n<1012nans=∑in∑jn[j|i]∗j=∑jnj∑in...

2018-07-24 20:38:55

阅读数:49

评论数:0

Auxiliary Set HDU - 5927(思维题)

Given a rooted tree with n vertices, some of the vertices are important. An auxiliary set is a set containing vertices satisfying at least one of t...

2018-04-30 15:43:55

阅读数:30

评论数:0

Hamiltonian Spanning Tree CodeForces - 618D (思维)

A group of n cities is connected by a network of roads. There is an undirected road between every pair of cities, so there are roads in total. It ta...

2018-03-29 23:03:04

阅读数:27

评论数:0

The Union of k-Segments CodeForces - 612D (思维)

You are given n segments on the coordinate axis Ox and the number k. The point is satisfied if it belongs to at least k segments. Find the smallest (...

2018-03-22 22:40:44

阅读数:36

评论数:0

余数之和 HYSBZ - 1257

给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值 其中k mod i表示k除以i的余数。 例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 5=0+1+0+...

2018-03-20 21:47:53

阅读数:62

评论数:0

Godsend CodeForces - 841B

Leha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two players play the game on the array. Players move one...

2017-11-19 18:30:36

阅读数:85

评论数: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

K-Dominant Character CodeForces - 888C

You are given a string s consisting of lowercase Latin letters. Character c is called k-dominant iff each substring of s with length at least k conta...

2017-11-12 16:33:42

阅读数:243

评论数:0

Short Program CodeForces - 878A

Petya learned a new programming language CALPAS. A program in this language always takes one non-negative integer and returns one non-negative intege...

2017-11-12 16:28:38

阅读数:95

评论数:0

Teacher Bo HDU - 5762 (思维)

Teacher BoBo is a geography teacher in the school.One day in his class,he marked NN points in the map,the ii-th point is at (Xi,Yi)(Xi,Yi).He wonders...

2017-08-31 11:22:20

阅读数:127

评论数:0

Abandoned country HDU - 5723 (???)

An abandoned country has n(n≤100000)n(n≤100000) villages which are numbered from 1 to nn. Since abandoned for a long time, the roads need to be re-bu...

2017-08-30 23:07:38

阅读数:124

评论数:0

TIANKENG’s restaurant HDU - 4883

TIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to have meal because of its delicious dishes. Today...

2017-06-09 13:20:20

阅读数:125

评论数:0

Keep On Movin(HDU-5744)(优化过程)

Professor Zhang has kinds of characters and the quantity of the ii-th character is aiai. Professor Zhang wants to use all the characters build severa...

2017-05-07 13:03:55

阅读数:164

评论数:0

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