![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
【思维练习】
Mr丶Gao
加油!
展开
-
HDU 1032.The 3n + 1 problem【注意细节】【估计数据不强】【8月21】
The 3n + 1 problemProblem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will原创 2015-08-21 19:34:22 · 1195 阅读 · 0 评论 -
HDU 1028.Ignatius and the Princess III【分析】【8月20】
Ignatius and the Princess IIIProblem Description"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原创 2015-08-20 15:52:50 · 691 阅读 · 0 评论 -
HDU 1005.Number Sequence【很多问题是不能直接求的】【8月15】
Number SequenceProblem DescriptionA 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 v原创 2015-08-15 22:10:28 · 404 阅读 · 0 评论 -
SDNU 1040.导弹拦截【NOIP1999】【8月9】
导弹拦截Description某国为了防御敌国的导弹袭击,研发出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试验阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。Input输入数据只有一行,该行包含若干个数据原创 2015-08-09 19:10:26 · 834 阅读 · 0 评论 -
SDNU 1206.蚂蚁感冒 【代码如此简单,思维练习】【7月29】
蚂蚁感冒Description长100厘米的细长直杆子上有n只蚂蚁。它们的头有的朝左,有的朝右。 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒。 当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行。 这些蚂蚁中,有1只蚂蚁感冒了。并且在和其它蚂蚁碰面时,会把感冒传染给碰到的蚂蚁。 请你计算,当所有蚂蚁都爬离杆子时,有多少只蚂蚁患上了感冒。Input原创 2015-07-29 11:23:44 · 842 阅读 · 0 评论 -
HDU 1046.Gridland【非搜索,找规律】【8月25】
GridlandProblem DescriptionFor years, computer scientists have been trying to find efficient solutions to different computing problems. For some of them efficient algorithms are already avai原创 2015-08-25 17:29:43 · 770 阅读 · 0 评论 -
HDU 1021.Fibonacci Again【规律】【不可直接求】【8月18】【记录】
Fibonacci AgainProblem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). InputInput consists of a sequence of lines,原创 2015-08-18 20:46:48 · 605 阅读 · 0 评论 -
HDU 5491.The Next【2015 ACM/ICPC Asia Regional Hefei Online】【方法】【9月30】
The NextProblem DescriptionLet L denote the number of 1s in integer D’s binary representation. Given two integers S1 and S2, we call D a WYH number if S1≤L≤S2.With a given D, we原创 2015-09-30 21:24:25 · 433 阅读 · 0 评论 -
HDU 1019.Least Common Multiple【多个数的最小公倍数】【自己的算法】【8月18】【8月19更新】
Least Common MultipleProblem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For e原创 2015-08-18 19:28:51 · 823 阅读 · 0 评论 -
HDU 5538.House Building【求表面积】【2015ACM/ICPC亚洲区长春站】【12月30】
House BuildingProblem DescriptionHave you ever played the video game Minecraft? This game has been one of the world's most popular game in recent years. The world of Minecraft is made up of原创 2015-12-30 12:02:14 · 1073 阅读 · 2 评论 -
HDU 1085.Holding Bin-Laden Captive!【用1、2、5凑数】【水】【12月30】
Holding Bin-Laden Captive!Problem DescriptionWe all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang原创 2015-12-30 00:17:59 · 458 阅读 · 0 评论 -
HDU 1022.Train Problem I【栈的应用】【8月19】
Train Problem IProblem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Igna原创 2015-08-19 14:09:40 · 536 阅读 · 0 评论 -
HDU 1042.N!【高精度乘法】【8月24】
N!Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N! InputOne N in one line, process to the end of file. OutputFor each N, out原创 2015-08-24 12:44:17 · 659 阅读 · 0 评论 -
HDU 1030.Delta-wave【找规律、最短路】【3月15】
Delta-waveTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7451 Accepted Submission(s): 2873Problem DescriptionA triangle fiel原创 2016-03-15 19:14:40 · 308 阅读 · 0 评论 -
HDU 1173.采矿【不水的水题】【中位数】【5月26】
采矿Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3696 Accepted Submission(s): 1772Special JudgeProblem Description某天gameboy原创 2016-05-26 18:28:10 · 431 阅读 · 0 评论 -
HDU 5573.Binary Tree【二进制 构造】【8月10】
Binary TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 618 Accepted Submission(s): 355Special JudgeProblem DescriptionThe原创 2016-08-10 16:59:29 · 358 阅读 · 0 评论 -
HDU 1036.Average is not Fast Enough!【精度及格式控制】【8月23】
Average is not Fast Enough!Problem DescriptionA relay is a race for two or more teams of runners. Each member of a team runs one section of the race. Your task is to help to evaluate the res原创 2015-08-23 16:49:02 · 913 阅读 · 0 评论 -
HDU 1061.Rightmost Digit【数论及方法】【8月30】
Rightmost DigitProblem DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of the原创 2015-08-30 13:21:13 · 611 阅读 · 0 评论 -
HDU 1060.Leftmost Digit【重点在分析】【格式【晕】】【8月31】【记录】
Leftmost DigitProblem DescriptionGiven a positive integer N, you should output the leftmost digit of N^N. InputThe input contains several test cases. The first line of the in原创 2015-08-31 19:56:14 · 660 阅读 · 0 评论 -
HDU 1031.Design T-Shirt【结构体二次排序】【8月21】
Design T-ShirtProblem DescriptionSoon after he decided to design a T-shirt for our Algorithm Board on Free-City BBS, XKA found that he was trapped by all kinds of suggestions from everyone o原创 2015-08-21 19:15:03 · 722 阅读 · 0 评论 -
HDU 2178.猜数字【分析能力练习】【读题能力练习】【8月10】
猜数字Problem DescriptionA有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" 。 问B猜n次可以猜到的最大数。 Input第1行是整数T,表示有T组数据,下面有T行 每行一个整数n (1 ≤ n ≤ 30) Output猜n次可以猜到的最大数 S原创 2015-08-10 20:39:57 · 714 阅读 · 0 评论 -
HDU 1870.愚人节的礼物【字符串处理】【思维练习】【8月2】
愚人节的礼物Problem Description四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼原创 2015-08-02 16:54:50 · 764 阅读 · 0 评论 -
SDNU 1141.Greatest Number【山东省第一届ACM】【7月22】
Greatest NumberDescriptionSaya likes math, because she think math can make her cleverer.One day, Kudo invited a very simple game:Given N integers, then the players choose no more tha原创 2015-07-22 20:54:16 · 633 阅读 · 0 评论 -
UVa 699.The Falling Leaves【7月23】
The Falling LeavesEach year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees.原创 2015-07-23 21:57:58 · 650 阅读 · 0 评论 -
VUa 11300.Spreading the Wealth【RujiaLiu随书练习】【10月6】
Spreading the Wealth圆桌旁坐着n个人,没人有一定数量的金币,金币总数能被n整除。每个人可以给他左右相邻的人一些金币,最终使得每个人的金币数目相等。你的任务是求出被转手的金币的最小值。比如,n=4,且4个人的金币数量分别是1,2,5,4时,只需转移4枚金币(第3个人给第2个人两枚金币,第2个人和第4个人分别给第1个人一枚金币)即可实现每人手中的金币数目相等。【样例输入】原创 2015-10-06 21:48:09 · 381 阅读 · 0 评论 -
HDU 1017.A Mathematical Curiosity【细节及转换】【8月18】
A Mathematical CuriosityProblem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 This problem contains multiple test cases!The first lin原创 2015-08-18 19:09:35 · 794 阅读 · 0 评论 -
HDU 1406.完数【筛选法以及特殊方法】【7月27】
完数看来我的心还是不够细啊,这对一个ACMer来说,太致命了!Problem Description完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。本题的任务是判断两个正整数之间完数的个数。 Input输入数据包含多行,第一行是一个正原创 2015-07-27 21:24:47 · 803 阅读 · 0 评论 -
HDU 1215.七夕节【筛选法】【7月26】
七夕节七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!"人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下:数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6.你想知道你的另一半吗? Input输入数据的第一行是一个数字T(原创 2015-07-26 18:07:36 · 857 阅读 · 0 评论 -
HDU 1050 Moving Tables
Moving Tables The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 200 rooms each on the north side an原创 2015-05-28 19:46:44 · 387 阅读 · 0 评论 -
HDU 1006.Tick and Tick【11月12】【很久没写博客了】
Tick and TickProblem DescriptionThe three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and each of them would like原创 2015-11-12 17:30:16 · 1078 阅读 · 0 评论 -
UVa 10881.Piotr's Ants【RuijiaLiu随书练习】【10月7】
Piotr's Ants蚂蚁碰撞,相当于对穿而过。过一段时间以后蚂蚁的相对位置不变。代码:#include#include#includeusing namespace std;const int maxn = 10000 + 10;struct ants { int id, p, d; bool operator < (const ants& a) const原创 2015-10-07 13:14:19 · 337 阅读 · 0 评论 -
HDU 1070.Milk【最优解】【10月5】
MilkProblem DescriptionIgnatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. There are many kinds of milk in the supermarket, so Ignatius wants原创 2015-10-05 22:05:34 · 544 阅读 · 0 评论 -
HDU 5475.An easy problem【思路】【2015 ACM/ICPC Asia Regional Shanghai Online】【9月26】
An easy problemProblem DescriptionOne day, a useless calculator was being built by Kuros. Let's assume that number X is showed on the screen of calculator. At first, X = 1. This calculator o原创 2015-09-26 19:39:21 · 702 阅读 · 0 评论 -
HDU 5461.Largest Point【2015 ACM/ICPC Asia Regional Shenyang Online】【排序】9月19
Largest PointProblem DescriptionGiven the sequence A with n integers t1,t2,⋯,tn. Given the integral coefficients a and b. The fact that select two elements ti and tj of A and i≠j to ma原创 2015-09-19 20:28:41 · 433 阅读 · 0 评论 -
HDU 5842.Lweb and String【最长上升子序列】【思路题】【8月20】
Lweb and StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 596 Accepted Submission(s): 363Problem DescriptionLweb has a s原创 2016-08-20 15:55:57 · 515 阅读 · 0 评论