![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hdu
bfcx
这个作者很懒,什么都没留下…
展开
-
2050 Programming Competition
【1001】开场白Problem Description来自世界各地的年青人在 https://2050.org.cn 握手团聚, 他们是航空航天的新生代,编程大赛的优胜者,35岁以下的创新者,科技公司的创始人,展望未来的科学家,天马行空的艺术家...... TA们期待在这里与所有人分享交流,给彼此灵感,给未来答案。我们想要用10个题目,大声喊出年青人的声音。我们希望和大家一起用技术创造...原创 2019-04-13 22:38:25 · 269 阅读 · 0 评论 -
【HDU - 2683】TCE-frep number system (完全数)
Number theory is one of the oldest branches of pure mathematics, and one of the largest. Of course, it concerns questions about numbers, usually meaning whole numbers or rational numbers (fractions)...原创 2019-04-21 17:09:32 · 253 阅读 · 0 评论 -
【HDU - 1792】A New Change Problem(推公式、互质数的最大不能表示数)
Now given two kinds of coins A and B,which satisfy that GCD(A,B)=1.Here you can assume that there are enough coins for both kinds.Please calculate the maximal value that you cannot pay and the total n...原创 2019-04-27 22:02:11 · 260 阅读 · 0 评论 -
【HDU - 5245 】Joyful(概率dp)
Sakura has a very magical tool to paint walls. One day, kAc asked Sakura to paint a wall that looks like anM×NM×Nmatrix. The wall hasM×NM×Nsquares in all. In the whole problem we denotes(x,y)(x,y...原创 2019-04-23 22:01:54 · 237 阅读 · 0 评论 -
【HDU - 6300】Triangle Partition (思维+不相交的三角形)
Chiaki has3n3npointsp1,p2,…,p3np1,p2,…,p3n. It is guaranteed that no three points are collinear.Chiaki would like to constructnndisjoint triangles where each vertex comes from the3n3npoints....原创 2019-04-23 22:42:54 · 235 阅读 · 0 评论 -
【HDU - 3579】Hello Kiki(拓展中国剩余定理)
One day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and singing "门前大桥下游过一群鸭,快来快来 数一数,二四六七八". And then the cashier put the counted coins ba...原创 2019-04-28 16:37:11 · 237 阅读 · 0 评论 -
【HDU - 1796】How many integers can you find (容斥原理)
Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers in the set. For example, N=12, and M-integer...原创 2019-04-29 22:11:47 · 169 阅读 · 0 评论 -
【HDU - 6301】Distinct Values(思维+优先队列)
Chiaki has an array ofnnpositive integers. You are told some facts about the array: for every two elementsaiaiandajajin the subarrayal..ral..r(l≤i<j≤rl≤i<j≤r),ai≠ajai≠ajholds.Chiaki ...原创 2019-05-08 19:55:41 · 196 阅读 · 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 be co-prime or relatively prime if they have no com...原创 2019-05-09 16:12:41 · 181 阅读 · 0 评论 -
【HDU - 1166 】敌兵布阵(线段树、树状数组)
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所...原创 2019-05-24 09:10:03 · 156 阅读 · 0 评论 -
【HDU - 4781 】Assignment For Princess (构造)
Long long ago, in the Kingdom Far Far Away, there lived many little animals. And you are the beloved princess who is marrying the prince of a rich neighboring kingdom. The prince, who turns out to b...原创 2019-07-02 21:55:58 · 268 阅读 · 0 评论 -
【HDU - 5884】Sort(二分+数组模拟优先队列)
Recently, Bob has just learnt a naive sorting algorithm: merge sort. Now, Bob receives a task from Alice.Alice will give BobNNsorted sequences, and theii-th sequence includesaiaielements. Bob n...原创 2019-07-06 20:39:28 · 243 阅读 · 0 评论 -
【HDU - 3524】Perfect Squares(找规律,推公式,除法取模)
A number x is called a perfect square if there exists an integer bsatisfying x=b^2. There are many beautiful theorems about perfect squares in mathematics. Among which, Pythagoras Theorem is the mos...原创 2019-04-21 16:26:14 · 269 阅读 · 0 评论 -
【HDU - 2586】How far away ?(LCA最近公共祖先)
There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go from house A to house B"? Usually it hard to...原创 2018-12-20 20:20:14 · 185 阅读 · 0 评论 -
【HDU - 2582】f(n) (找规律+素数筛)
This time I need you to calculate the f(n) . (3<=n<=1000000)f(n)= Gcd(3)+Gcd(4)+…+Gcd(i)+…+Gcd(n).Gcd(n)=gcd(C[n][1],C[n][2],……,C[n][n-1])C[n][k] means the number of way to choose k things...原创 2019-03-20 13:27:02 · 248 阅读 · 0 评论 -
【HDU - 1452】Happy 2004 (约数和+乘法逆元)
Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29 (the rest of the division of S by 29).Take X = 1 for an example. T...原创 2019-03-19 09:38:23 · 163 阅读 · 0 评论 -
【HDU - 1005】Number Sequence (矩阵快速幂)
A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).InputThe input consists of mul...原创 2019-03-19 12:53:10 · 281 阅读 · 0 评论 -
【HDU - 2197】本原串 (数学)
kuangbin大神的博客由0和1组成的串中,不能表示为由几个相同的较小的串连接成的串,称为本原串,有多少个长为n(n<=100000000)的本原串?答案mod2008.例如,100100不是本原串,因为他是由两个100组成,而1101是本原串。Input输入包括多个数据,每个数据一行,包括一个整数n,代表串的长度。Output对于每个测试数据,输出一行,代表...原创 2019-04-02 10:16:53 · 179 阅读 · 0 评论 -
【HDU - 1028】Ignatius and the Princess III(生成函数)
"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem is, given an positive integer N, we define an equation like this:...原创 2019-04-12 10:29:28 · 186 阅读 · 0 评论 -
【HDU - 1398】Square Coins(生成函数)
People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-cre...原创 2019-04-12 10:49:03 · 139 阅读 · 0 评论 -
【HDU - 4497】GCD and LCM (整数分解定理,gcd和lcm)
Given two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L?Note, gcd(x, y, z) means the greatest common d...原创 2019-04-20 20:46:37 · 206 阅读 · 0 评论 -
【HDU - 5019 】Revenge of GCD (第K大的因子+暴力)
In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), highest common factor (hcf), or greatest common measure (gcm), of two or more integers (when at least...原创 2019-04-20 21:08:29 · 292 阅读 · 0 评论 -
【HDU - 3092】Least common multiple(数学+完全背包)
Partychen like to do mathematical problems. One day, when he was doing on a least common multiple(LCM) problem, he suddenly thought of a very interesting question: if given a number of S, and we divid...原创 2019-04-20 22:38:59 · 307 阅读 · 0 评论 -
【HDU - 2620】Ice Rain (数学+分块+取余)
Ice Rain------I was waiting for a girl, or waiting for been addicted to the bitter sea. Love for irrigation in silence. No one considered whether the flowers came out or wither. Love which I am not su...原创 2019-04-21 13:38:48 · 281 阅读 · 0 评论