
HDUOJ
文章平均质量分 64
旺 崽
这个作者很懒,什么都没留下…
展开
-
HDUOJ 3652 B-number
题目链接Problem DescriptionA wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 130 and 2613 are wqb-numbers, but 143 and 2639 are not. Your task is to calculat原创 2021-05-13 21:28:52 · 1926 阅读 · 0 评论 -
HDUOJ 3555 Bomb
题目链接Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence includes the sub-sequence “49”, th原创 2021-05-13 20:54:27 · 1996 阅读 · 0 评论 -
ZOJ 1484 Minimum Inversion Number
ZOJ 1484 Minimum Inversion Number题目链接The inversion number of a given number sequence a1, a2, …, an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, …, an, if we move the first m >= 0 numbers原创 2020-07-11 10:16:43 · 2366 阅读 · 0 评论 -
HDUOJ 6555 The Fool
HDUOJ 6555 The Fool题目链接Problem DescriptionThe Fool is numbered 0 – the number of unlimited potential –and therefore does not have a specific place in the sequence of the Tarot cards. The Fool can be placed either at the beginning of the Major Arcana or原创 2020-10-07 10:25:51 · 3485 阅读 · 0 评论 -
HDUOJ 6533 Build Tree
HDUOJ 6533 Build Tree题目链接Problem DescriptionYou need to construct a full n-ary tree(n叉树) with m layers.All the edges in this tree have a weight.But this weight cannot be chosen arbitrarily you can only choose from set S,the size of S is k,each element i原创 2020-09-23 18:44:27 · 2547 阅读 · 0 评论 -
HDUOJ 6536 Hello XTCPC
HDUOJ 6536 Hello XTCPC题目链接Problem DescriptionYou have a string of lowercase letters.You need to find as many sequence “xtCpc” as possible.But letters in the same position can only be used once。InputThe input file contains two lines.The first line is原创 2020-09-22 21:37:15 · 2447 阅读 · 0 评论 -
HDUOJ 6825 Set1
HDUOJ 6825 Set1题目链接Problem DescriptionYou are given a set S={1…n}. It guarantees that n is odd. You have to do the following operations until there is only 1 element in the set:Firstly, delete the smallest element of S. Then randomly delete another ele原创 2020-09-21 20:26:04 · 2334 阅读 · 0 评论 -
2020中国大学生程序设计竞赛(CCPC) - 网络选拔赛 1005 Lunch
HDUOJ 6892 Lunch题目链接Problem DescriptionNow it’s time for lunch. Today’s menu is chocolate!Though every baby likes chocolate, the appetites of babies are little. After lunch, there are still n pieces of chocolate remained: The length of the ith piece is原创 2020-09-21 12:44:42 · 11094 阅读 · 2 评论 -
2020中国大学生程序设计竞赛(CCPC)- 网络选拔赛 1002 Graph Theory Class
HDUOJ 6889 A.Graph Theory Class题目链接Problem DescriptionThis class is on graph theory. Mr. Kruskal teaches babies the concept of minimal spanning tree, and how to calculate the minimal spanning tree of a given graph.Now, it’s time for an in-class quizz.原创 2020-09-21 11:43:52 · 5305 阅读 · 3 评论 -
HDUOJ 6852 Increasing and Decreasing
HDUOJ 6852 Increasing and Decreasing题目链接Problem DescriptionNotice:Don’t output extra spaces at the end of one line.Given n,x,y, please construct a permutation of length n, satisfying that:The length of LIS(Longest Increasing Subsequence) is equal to原创 2020-09-19 10:28:36 · 2538 阅读 · 0 评论 -
HDUOJ 6709 Fishing Master
HDUOJ 6709 Fishing Master题目链接Problem DescriptionHeard that eom is a fishing MASTER, you want to acknowledge him as your mentor. As everybody knows, if you want to be a MASTER’s apprentice, you should pass the trial. So when you find fishing MASTER eom,原创 2020-09-18 20:14:28 · 2399 阅读 · 0 评论 -
HDUOJ 6438 Buy and Resell
HDUOJ 6438 Buy and Resell题目链接Problem DescriptionThe Power Cube is used as a stash of Exotic Power. There are n cities numbered 1,2,…,n where allowed to trade it. The trading price of the Power Cube in the i-th city is ai dollars per cube. Noswal is a fo原创 2020-09-18 19:57:16 · 2412 阅读 · 0 评论 -
HDUOJ 6441 Find Integer
HDUOJ 6441 Find Integer题目链接Problem Descriptionpeople in USSS love math very much, and there is a famous math problem .give you two integers n,a,you are required to find 2 integers b,c such that an+bn=cna^n+b^n=c^nan+bn=cn.Inputone line contains one i原创 2020-09-18 18:19:02 · 2785 阅读 · 2 评论 -
HDUOJ 6703 array
HDUOJ 6703 array题目链接Problem DescriptionYou are given an array a1,a2,…,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is unique.Moreover, there are m instructions.Each instruction is in one of the following two formats:(1,pos),indicating t原创 2020-09-18 10:27:10 · 2485 阅读 · 0 评论 -
HDUOJ 6609 Find the answer
HDUOJ 6609 Find the answer题目链接Problem DescriptionGiven a sequence of n integers called W and an integer m. For each i (1 <= i <= n), you can choose some elements Wk (1 <= k < i), and change them to zero to make ∑ij=1Wj<=m. So what’s the m原创 2020-09-17 20:09:44 · 2489 阅读 · 0 评论 -
HDUOJ 4217 Data Structure?
HDUOJ 4217 Data Structure?题目链接Problem DescriptionData structure is one of the basic skills for Computer Science students, which is a particular way of storing and organizing data in a computer so that it can be used efficiently. Today let me introduce a原创 2020-09-16 12:19:04 · 2405 阅读 · 0 评论 -
HDUOJ 1166 敌兵布阵
HDUOJ 1166 敌兵布阵题目链接Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报原创 2020-09-13 16:34:38 · 2418 阅读 · 0 评论 -
HDUOJ 4027 Can you answer these queries?
HDUOJ 4027 Can you answer these queries?题目链接Problem DescriptionA lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a va原创 2020-09-13 15:39:19 · 2458 阅读 · 0 评论 -
HDUOJ 6570 Wave
HDOUJ 6570 Wave题目链接 Problem DescriptionAvin is studying series. A series is called “wave” if the following conditions are satisfied:1) It contains at least two elements;2) All elements at odd positions are the same;3) All elements at even positions a原创 2020-09-11 11:32:14 · 2477 阅读 · 0 评论 -
HDUOJ 6575 Budget
HDUOJ 6575 Budget题目链接Problem DescriptionAvin’s company has many ongoing projects with different budgets. His company records the budgets using numbers rounded to 3 digits after the decimal place. However, the company is updating the system and all budge原创 2020-09-01 17:42:26 · 2343 阅读 · 0 评论 -
HDUOJ 6576 Worker
HDUOJ 6576 Worker题目链接Problem DescriptionAvin meets a rich customer today. He will earn 1 million dollars if he can solve a hard problem. There are n warehouses and m workers. Any worker in the i-th warehouse can handle ai orders per day. The customer wo原创 2020-09-01 10:59:04 · 2382 阅读 · 0 评论 -
HDUOJ 6573 Traffic
HDUOJ 6573 Traffic题目链接Problem DescriptionAvin is observing the cars at a crossroads. He finds that there are n cars running in the east-west direction with the i-th car passing the intersection at time ai . There are another m cars running in the north-原创 2020-08-31 15:14:28 · 2405 阅读 · 0 评论 -
HDUOJ 6707 Shuffle Card
HDUOJ 6707 Shuffle Card题目链接Problem DescriptionA deck of card consists of n cards. Each card is different, numbered from 1 to n. At first, the cards were ordered from 1 to n. We complete the shuffle process in the following way, In each operation, we wil原创 2020-08-31 10:15:04 · 2381 阅读 · 0 评论 -
HDUOJ 6702 ^&^
HDUOJ 6702 ^&^Problem DescriptionBit operation is a common computing method in computer science ,Now we have two positive integers A and B ,Please find a positive integer C that minimize the value of the formula (A xor C) & (B xor C) .Somet原创 2020-08-31 09:43:05 · 2469 阅读 · 0 评论 -
HDUOJ 6839 Binary Addition
HDUOJ 6839 Binary Addition题目链接Problem Description你有两个无限长01串S,T,分别记作S0S1…和T0T1…。其中S和T从n位之后都是0,也就是当i≥n,有Si=Ti=0。你可以对S串进行操作:修改S串的某一位,从0变成1或者从1变成0。将S当成二进制数加1,也就是记s=∑i≥0Si2i,将S变成s+1二进制表示的形式,其中低位在最前面。问最少的步数将S变成T。Input第一行一个正整数T(1≤T≤1e4)表示数据组数。对于每组数据,第原创 2020-08-12 10:04:53 · 2414 阅读 · 0 评论 -
HDUOJ 6838 Battle for Wosneth
HDUOJ 6838 Battle for Wosneth题目链接Problem Description你在打游戏的时候碰到了如下问题:有两个人记作Alice和Bob,Bob的生命值为m,Alice的生命值很高,所以可以认为是无限的。两个人的攻击命中率分别为p%,q%。两个人轮流攻击对方。从Alice开始攻击,每次攻击的时候,如果Alice命中,那么能让对方的生命值减低1,同时自己的生命值能恢复1,如果Bob命中,那么能让对方的生命值减低1,注意Bob不会自己回血。直到Bob的血量变为0,游戏结束原创 2020-08-10 21:12:30 · 2469 阅读 · 0 评论 -
HDUOJ 6827 Road To The 3rd Building
HDUOJ 6827 Road To The 3rd Building题目链接Problem DescriptionBecause of the thriller adventure game The 3rd Building, there are fewer and fewer students who would like to go to the 3rd Building. So few students are working in the studio in the 3rd Building原创 2020-08-06 20:01:36 · 2378 阅读 · 0 评论 -
HDUOJ 6816 Boring Game
HDUOJ 6816 Boring Game题目链接Problem DescriptionGiven n sheets of paper, place them on the table in pile and fold them in half k times from left to right.Now from top to bottom, mark a number on paper at each side of the front and back. So there are 2×n×2原创 2020-08-06 11:13:17 · 2358 阅读 · 0 评论 -
HDUOJ 6623 Minimal Power of Prime
HDUOJ 6623 Minimal Power of Prime题目链接Problem DescriptionYou are given a positive integer n > 1. Consider all the different prime divisors of n. Each of them is included in the expansion n into prime factors in some degree. Required to find among the原创 2020-08-04 17:31:35 · 2342 阅读 · 0 评论 -
HDUOJ 6806 Equal Sentences
HDUOJ 6806 Equal Sentences题目链接Problem DescriptionSometimes, changing the order of the words in a sentence doesn’t influence understanding. For example, if we change “what time is it”, into “what time it is”; or change “orz zhang three ak world final”, i原创 2020-08-02 18:50:38 · 2364 阅读 · 0 评论 -
HDUOJ 6795 Little W and Contest
HDUOJ 6795 Little W and Contest题目链接Problem DescriptionThere are n members in our ACM club. Little W wants to select three persons from our club to form a new team taking part in provincial ACM contests, as it is known by all of us that any ACM contest r原创 2020-07-31 19:12:22 · 2353 阅读 · 0 评论 -
HDUOJ 6803 Blow up the Enemy
HDUOJ 6803 Blow up the Enemy题目链接Problem DescriptionZhang3 is playing a shooting game with Father. In the game there are two players trying to kill each other to win the game.The game provides n weapons, each has two properties: Damage and Delay. The it原创 2020-07-30 20:19:41 · 2394 阅读 · 0 评论 -
HDUOJ 6794 Tokitsukaze and Multiple
HDUOJ 6794 Tokitsukaze and Multiple题目链接Problem DescriptionTokitsukaze has a sequence of length n, denoted by a.Tokitsukaze can merge two consecutive elements of a as many times as she wants. After each operation, a new element that equals to the sum of原创 2020-07-29 10:27:36 · 2617 阅读 · 0 评论 -
HDUOJ 6789 Fight
HDUOJ 6789 Fight题目链接Problem DescriptionMr Left,Mr Mid,Mr Right 正在玩游戏。他们初始都有 1000 血,Mr Left,Mr Mid,Mr Right 的攻击力分别为 x,y,z。对于每一轮,假设仍然剩下至少两个人的血量大于 0,那么选出两个血量大于 0 的人对打,他们的血量分别扣除和他们对打的另一个人的攻击力。当有至少两个人的血量小于等于 0 时,游戏结束。请问在最优情况下,这个游戏最少多少轮结束?Input第一行一个正整数 t原创 2020-07-28 19:03:08 · 2463 阅读 · 0 评论 -
HDUOJ 6787 Chess
HDUOJ 6787 Chess题目链接Problem Description你现在有一个棋盘,上面有 n 个格子,格子从左往右,1,…,n 进行标号。你可以在棋盘上放置恰好 m 个传送器,并且对于每个传送器设置传送位置。传送位置需满足:对于在 i 号格子上的传送器,传送目标位置 j 满足 j<i。1 号格子不能放置传送器。现在有一名玩家,拿着一枚 1,…,11 的骰子(骰子每次等概率地投出 1 到 11 中的一个数字),从位置 1 开始,用骰子决定前进步数,即如果当前在位置 y 且投出数原创 2020-07-28 18:16:38 · 2379 阅读 · 0 评论 -
HDUOJ 6786 Intersection
HDUOJ 6786 Intersection题目链接Problem DescriptionMr. Left 来到了一个路口,这个路口只能右转,并且都是两车道。现在在南北向车道上有 n 辆车,他们都在线 x 南边,这些车想要通过这个路口,到东边去,具体地说,他们要开到线 y 东边。一辆车一个时刻可以从东南西北中选一个方向移动一个位置,或者呆在原地不动。同一时刻同一位置不能有超过一辆车。车不能开到路外面。在任意时刻,所有车都同时移动。两辆相邻的车不能都移动到对方的格子上。在此基础上,只要所有车原创 2020-07-26 19:54:13 · 2407 阅读 · 0 评论 -
HDUOJ 6755 Fibonacci Sum
HDUOJ 6755 Fibonacci Sum题目链接 Problem Description The Fibonacci numbers are defined as below: Given three integers N, C and K, calculate the following summation: Since the answer can be huge, output it modulo 1000000009 (1e9+9). Input The first li.原创 2020-07-24 19:32:54 · 2417 阅读 · 0 评论 -
HDUOJ 6763 Total Eclipse
HDUOJ 6763 Total Eclipse题目链接Problem DescriptionThere are n cities and m bidirectional roads in Byteland. These cities are labeled by 1,2,…,n, the brightness of the i-th city is bi.Magician Sunset wants to play a joke on Byteland by making a total eclip原创 2020-07-24 10:07:19 · 2482 阅读 · 0 评论 -
HDUOJ 6772 Lead of Wisdom
HDUOJ 6772 Lead of Wisdom题目链接Problem DescriptionIn an online game, “Lead of Wisdom” is a place where the lucky player can randomly get powerful items.There are k types of items, a player can wear at most one item for each type. For the i-th item, it h原创 2020-07-23 19:40:28 · 2778 阅读 · 0 评论 -
HDUOJ 6747 Rotate
HDUOJ 6747 Rotate题目链接Problem Description我们有一个圈,从内到外一共被分成了 n 个环,中间是空的。我们把从外到内第 i 层环平分成 a[i] 份,其中 a[i] 是偶数,我们把这 a[i] 份黑白染色,第奇数个染成黑色,第偶数个染成白色。现在我们旋转每一层,每一层都会等概率随机到一个中止位置。问黑色的联通块数目的期望。两块黑色的区域有交点即算联通。层之间的旋转是相互独立的。Input第一行一个正整数 test(1≤test≤10) 表示数据组数。对于原创 2020-07-20 10:38:53 · 2337 阅读 · 0 评论