![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
文章平均质量分 85
luyuantaolll
o o
展开
-
(2)N - A + B Again
There must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too. Easy ? AC it !...原创 2018-02-19 22:41:48 · 192 阅读 · 0 评论 -
(2)R - 贪心
Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose level below this task’s level yi cannot complete ...原创 2018-02-26 17:07:58 · 172 阅读 · 0 评论 -
(2)S - 贪心
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the s...原创 2018-02-26 17:35:34 · 163 阅读 · 0 评论 -
(2)Q - 贪心
When playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are killed, and you have to fight 1vN. There are two key attributes fo...原创 2018-02-26 16:37:13 · 169 阅读 · 0 评论 -
(2)D - stl 的 map
Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his enemies. His pla原创 2018-01-30 14:00:57 · 165 阅读 · 0 评论 -
(2)C - stl 的 map
夏天来了~~好开心啊,呵呵,好多好多水果~~ Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Input 第一行正整数N(0每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易.其后有M行数据,每行表示一次交易,由水果名称(小写字母组成,长度不超过8原创 2018-01-30 13:50:22 · 140 阅读 · 0 评论 -
(2)B - stl 的 map
gnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want t原创 2018-01-30 13:32:57 · 272 阅读 · 0 评论 -
(2)A - stl 的 map
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will cou原创 2018-01-28 22:16:52 · 111 阅读 · 0 评论 -
Z - A + B Problem II
I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.Input The first line of the input contains an integer T(1<=T<=20) which means the numb原创 2018-01-28 22:13:12 · 132 阅读 · 0 评论 -
Y - A == B ?
Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".Input each test case contains two numbers A and B. Output for each case, if A is equal to B, you should pr原创 2018-01-28 22:11:28 · 175 阅读 · 0 评论 -
X - Specialized Four-Digit Numbers
Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) notation and also原创 2018-01-28 22:02:10 · 248 阅读 · 0 评论 -
W - The Circumference of the Circle
To calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don't?You are given the cartesian coordinates of three non-collinear points原创 2018-01-28 21:56:27 · 961 阅读 · 2 评论 -
(2)T - 贪心
The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly such that it will cost ...原创 2018-02-26 18:21:29 · 109 阅读 · 0 评论 -
(2)U - 贪心
A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the same length l and each item i has length li<=l . We look for a minimal number of bins q such that ...原创 2018-02-26 18:39:17 · 166 阅读 · 0 评论 -
(2)W - stl 的 优先队列
Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time. Th...原创 2018-02-26 19:26:48 · 241 阅读 · 0 评论 -
(2)P - 贪心
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 homework after th...原创 2018-02-19 23:00:17 · 148 阅读 · 0 评论 -
(2)O - Number Sequence
A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of positive integer n...原创 2018-02-19 22:59:08 · 201 阅读 · 0 评论 -
(2)M - Prime Friend
Besides the ordinary Boy Friend and Girl Friend, here we define a more academic kind of friend: Prime Friend. We call a nonnegative integer A is the integer B’s Prime Friend when the sum of A and B is...原创 2018-02-14 00:06:00 · 329 阅读 · 0 评论 -
(3)E - 二分
It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But ...原创 2018-02-27 20:57:55 · 213 阅读 · 0 评论 -
(3)D - 贪心
Given m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of sequences. Th...原创 2018-02-27 20:29:36 · 202 阅读 · 0 评论 -
(3)C - map
You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them. ...原创 2018-02-27 19:56:07 · 504 阅读 · 0 评论 -
(3)B - 优先队列
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs such as Web usage lo...原创 2018-02-27 19:50:32 · 183 阅读 · 0 评论 -
(2)L - 卡特兰数
As we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order, how many orders that all the trains can get out of the railwa...原创 2018-02-13 14:01:48 · 182 阅读 · 0 评论 -
(3)A - 贪心
Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <= A <= B <= 1,000,000), which includes both times ...原创 2018-02-27 11:12:23 · 145 阅读 · 0 评论 -
(2)Z - Bitset
Give you a number on base ten,you should output it on base two.(0 < n < 1000) Input For each case there is a postive number n on base ten, end of file. Output ...原创 2018-02-26 21:20:14 · 128 阅读 · 0 评论 -
(2)X - 栈
As 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 Ignatius Train Station is the fastest all over t...原创 2018-02-26 19:41:05 · 117 阅读 · 0 评论 -
J - 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 t原创 2018-01-20 11:59:47 · 175 阅读 · 0 评论 -
I - 辗转相除法求最大公约数
The 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 example, the LCM of 5, 7 and 15 is 105.Inpu原创 2018-01-20 11:38:02 · 535 阅读 · 0 评论 -
H - 请使用sort
Soon 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 on the board. It is indeed a mission-impossi原创 2018-01-20 11:34:23 · 411 阅读 · 0 评论 -
C - Edge
For products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is folded until its size becomes small enough. We assume that a sheet of paper原创 2018-01-17 12:21:49 · 401 阅读 · 0 评论 -
S - Counterfeit Dollar
Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size make it indistinguishable from the re原创 2018-01-24 23:09:17 · 204 阅读 · 0 评论 -
R - Joseph
The Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle every mth is going to be executed原创 2018-01-23 23:04:49 · 211 阅读 · 0 评论 -
Q - 高精度(大数)n次方
Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.原创 2018-01-23 22:38:05 · 1273 阅读 · 0 评论 -
P - Reduced ID Numbers
T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in the range 0 ≤ s ≤ MaxSIN with MaxSIN = 106-1. T.原创 2018-01-22 13:27:27 · 318 阅读 · 0 评论 -
O - Dirichlet's Theorem on Arithmetic Progressions
If a and d are relatively prime positive integers, the arithmetic sequence beginning witha and increasing by d, i.e., a, a + d, a + 2d,a + 3d, a + 4d, ..., contains infinitely many prime numbers原创 2018-01-22 13:20:48 · 176 阅读 · 0 评论 -
N - Bullseye
A simple dartboard consists of a flat, circular piece of cork with concentric rings drawn on it. Darts are thrown at the board by players in an attempt to hit the center of the dartboard (the Bullseye原创 2018-01-21 22:20:50 · 239 阅读 · 0 评论 -
M - 枚举答案能不能做?
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two原创 2018-01-21 18:16:48 · 181 阅读 · 0 评论 -
L - Delta-wave
A triangle field is numbered with successive integers in the way shown on the picture below.The traveller needs to go from the cell with number M to the cell with number N. The traveller原创 2018-01-21 14:25:57 · 201 阅读 · 0 评论 -
K - next_permutation
Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first. feng5166 says, "I ha原创 2018-01-21 13:54:28 · 213 阅读 · 0 评论 -
八数码
时限:5000ms 内存限制:20000K 总时限:10000ms描述在九宫格里放在1到8共8个数字还有一个是空格,与空格相邻的数字可以移动到空格的位置,问给定的状态最少需要几步能到达目标状态(用0表示空格):1 2 34 5 67 8 0 输入输入一个给定的状态。 输出输出到达目标状态的最小步数。不能到达时输出-1。 输入样例1 2 3原创 2017-11-09 13:17:14 · 339 阅读 · 0 评论