
2021hnu寒假训练
文章平均质量分 50
出尘呢
广告位招租!
展开
-
(复习次数:1)HDU 1160 FatMouse‘s Speed【C++练习题】
FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence so that the weights are increasing, but the speeds are原创 2021-02-22 21:03:48 · 145 阅读 · 0 评论 -
(复习次数:1)HDU1257-最少拦截系统
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统.Input输入若干组数据.每组数据包括:导弹总个数(正整数),导弹依此飞来的高度(雷达给出的高度数据是不大于原创 2021-02-22 18:56:10 · 136 阅读 · 0 评论 -
(复习次数:1)HDU 1260 Tickets【线性dp】
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as possible.A good approach, reducing the total time of t原创 2021-02-22 18:03:24 · 125 阅读 · 0 评论 -
(复习次数:1)HDJ 1176 免费馅饼 -- 动态规划
Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝,每秒种只有在移动不超过一米的范围内接住坠落的馅饼。现在给这条小径如图标原创 2021-02-21 00:06:29 · 139 阅读 · 0 评论 -
(复习次数:1)HDU 1114 piggy-bank【完全背包】
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple. Whenever some ACM member has any small money, he takes原创 2021-02-19 21:21:29 · 122 阅读 · 0 评论 -
(复习次数:1——参考了题解)Doing Homework HDU - 1074【状压dp】
来自:https://blog.youkuaiyun.com/lpeaceminusone/article/details/81383182添加了注释Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the ho转载 2021-02-19 17:41:48 · 133 阅读 · 0 评论 -
(复习次数:1)D - Permutation Transformation——Codeforces Round #702 (Div. 3)
D. Permutation Transformationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA permutation — is a sequence of length n integers from 1 to n, in which all the numbers occur exactly once. For example原创 2021-02-17 01:48:06 · 646 阅读 · 0 评论 -
(复习次数:1)【HDU 1029】Ignatius and the Princess IV
“OK, you are not too bad, em… But you can never pass the next test.” feng5166 says.“I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell me which integer is the special one after I tell you all原创 2021-02-15 22:26:28 · 99 阅读 · 0 评论 -
(复习次数:1——看题解)hdu1024 max sum plus plus
Now I think you have got an AC in Ignatius.L’s “Max Sum” problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem.Given a consecutive number sequence S1, S2, S3, S4 … Sx, … Sn原创 2021-02-15 21:11:32 · 117 阅读 · 0 评论 -
(复习次数:1)XOR Game——Noobs Round #2 (Div. 4) by Rudro25
D. XOR Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob are playing a game.First Alice will choose two integers a and b (a≤b). Then Bob will take two integers c and d (1≤c≤a,1≤d≤b)原创 2021-02-11 02:04:31 · 366 阅读 · 0 评论 -
(复习次数:1——吃力AC)POJ - 3414 pots
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i) empty the pot i to the drain;POUR(i,j) pour from pot i to pot j; a原创 2021-02-10 04:18:09 · 200 阅读 · 0 评论 -
(复习次数:1)Prime Path POJ3126
Language:DefaultPrime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 42787 Accepted: 22547DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change t原创 2021-02-10 00:41:57 · 121 阅读 · 0 评论 -
(复习次数:1——递归混乱)Find The Multiple
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 64632 Accepted: 26239 Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the原创 2021-02-09 20:50:00 · 138 阅读 · 0 评论 -
(复习次数:1——参考题解)POJ3279_Fliptile_奶牛踩方块
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 15) of square tiles, each of which is colored black on one原创 2021-02-09 20:01:57 · 121 阅读 · 0 评论 -
POJ3278抓牛Catch That Cow
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes o原创 2021-02-09 16:25:06 · 133 阅读 · 0 评论 -
棋盘问题
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n当为-1 -1时表示输入结束。随后的n行描述了棋盘的形状:每行有n个字符,其中 # 表示棋盘区域, . 表示空白区原创 2021-02-08 18:42:01 · 154 阅读 · 0 评论 -
V - Binary Tree Traversals HDU - 1710
A binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most important ways in which the vertices of a binary tree can be systematically traver原创 2021-02-08 14:34:18 · 145 阅读 · 1 评论 -
E - Just a Hook
In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.Now Pudge wants to do some operations on the hook.Let us number the原创 2021-02-08 11:19:10 · 120 阅读 · 0 评论 -
C - A Simple Problem with Integers
C - A Simple Problem with IntegersYou have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a giv原创 2021-02-08 01:43:11 · 305 阅读 · 0 评论 -
I Hate It
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5000 ),分别代表学生的数目和操作的数目。学生ID编号分别从1编到N。第二行包含N个整数,代表这N个学生的初始成绩,原创 2021-02-08 00:45:25 · 391 阅读 · 1 评论 -
敌兵布阵
敌兵布阵C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如Derek问:“Tidy,马上汇报转载 2021-02-08 00:43:58 · 98 阅读 · 0 评论 -
E. Lynyrd Skynyrd判断子列是否符合
E. Lynyrd Skynyrdtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Lynyrd and Skynyrd went to a shop where Lynyrd bought a permutation p of length n, and Skynyrd bought an array a of length原创 2021-02-07 02:08:57 · 122 阅读 · 0 评论 -
D - The Beatles CodeForces - 1143D
D - The Beatles CodeForces - 1143DRecently a Golden Circle of Beetlovers was found in Byteland. It is a circle route going through n⋅k cities. The cities are numerated from 1 to n⋅k, the distance between the neighboring cities is exactly 1 km.Sergey does原创 2021-02-06 22:56:06 · 177 阅读 · 0 评论 -
queen解析
C. Queentime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree with vertices numerated from 1 to n. A tree is a connected graph without cycles. A rooted tree has a special verte原创 2021-02-06 20:33:42 · 339 阅读 · 0 评论