![](https://img-blog.csdnimg.cn/20190822144220701.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
19暑假集训
19暑假刷题记
大橘为重eleven
每天都因为自己太菜了而自闭
展开
-
Hawk-and-Chicken详解
题目描述:Kids in kindergarten enjoy playing a game called Hawk-and-Chicken. But there always exists a big problem: every kid in this game want to play the role of Hawk.So the teacher came up with an ide...原创 2019-08-24 15:35:49 · 756 阅读 · 0 评论 -
Train Problem II
题目描述: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 ...原创 2019-08-07 11:27:17 · 106 阅读 · 0 评论 -
看病要排队
题目描述:看病要排队这个是地球人都知道的常识。不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面选择一个优先权最高的人进行诊治。如果遇到两个优先权一样的...原创 2019-08-07 19:57:00 · 140 阅读 · 0 评论 -
Stones
题目描述: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 tim...原创 2019-08-07 19:45:01 · 137 阅读 · 0 评论 -
Largest Rectangle in a Histogram
题目描述:A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left ...原创 2019-08-07 19:38:53 · 163 阅读 · 0 评论 -
约瑟夫问题No.2
题目描述:n 个小孩围坐成一圈,并按顺时针编号为1,2,…,n,从编号为 p 的小孩顺时针依次报数,由1报到m ,当报到 m 时,该小孩从圈中出去,然后下一个再从1报数,当报到 m 时再出去。如此反复,直至所有的小孩都从圈中出去。请按出去的先后顺序输出小孩的编号。输入:每行是用空格分开的三个整数,第一个是n,第二个是p,第三个是m (0 < m,n < 300)。最后一行是:0...原创 2019-08-07 19:32:31 · 215 阅读 · 0 评论 -
Bad Hair Day
题目描述:Some of Farmer John’s N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the t...原创 2019-08-07 19:23:34 · 339 阅读 · 0 评论 -
愚人节的礼物
题目描述:四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼物。输入:本题目包含多组测试,请处理到文件结束。每组测...原创 2019-08-07 19:01:11 · 170 阅读 · 0 评论 -
ACboy needs your help again!
题目描述:ACboy was kidnapped!!he miss his mother very much and is very scare now.You can’t image how dark the room he was put into is, so poor原创 2019-08-07 18:54:49 · 147 阅读 · 0 评论 -
简单计算器
题目描述:读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。输入:测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。输出:对每个测试用例输出1行,即该表达式的值,精确到小数点后2位。样例输入:1 + 24 + 2 * 5 - 7 / 110...原创 2019-08-07 11:20:52 · 154 阅读 · 0 评论 -
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 ≤ ...原创 2019-07-31 08:55:07 · 135 阅读 · 0 评论 -
Bound Found
题目描述:Signals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going through a defiant phase: “But I want to use fe...原创 2019-07-26 17:26:21 · 307 阅读 · 0 评论 -
Group
题目描述:There are n men ,every man has an ID(1…n).their ID is unique. Whose ID is i and i-1 are friends, Whose ID is i and i+1 are friends. These n men stand in line. Now we select an interval of men to...原创 2019-07-26 09:30:30 · 122 阅读 · 0 评论 -
Build Tree
题目描述:You 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...原创 2019-08-07 20:29:39 · 1031 阅读 · 2 评论 -
Fence Repair
题目描述:Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1...原创 2019-08-07 20:03:55 · 137 阅读 · 0 评论 -
二分应用
题目描述A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same polygon...原创 2019-07-24 19:33:46 · 139 阅读 · 0 评论 -
Subset
题目描述:Given a list of N integers with absolute values no larger than 10 15, find a non empty subset of these numbers which minimizes the absolute value of the sum of its elements. In case there are mu...原创 2019-07-26 16:19:40 · 278 阅读 · 0 评论 -
组装电脑
题目描述:Recently your team noticed that the computer you use to practice for programming contests is not good enough anymore. Therefore, you decide to buy a new computer.To make the ideal computer for ...原创 2019-07-25 20:11:03 · 548 阅读 · 0 评论 -
Beijing Guards
题目描述Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City Wall, the Inner City Wall, and finally the Outer City Wall. Most of these walls were demolished...原创 2019-07-25 16:53:08 · 217 阅读 · 0 评论 -
Arbitrage
题目描述:Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 ...原创 2019-08-21 20:35:03 · 193 阅读 · 0 评论 -
find the longest of the shortest
题目描述:Marica is very angry with Mirko because he found a new girlfriend and she seeks revenge.Since she doesn’t live in the same city, she started preparing for the long journey.We know for every road...原创 2019-08-21 20:25:32 · 286 阅读 · 0 评论 -
Cow Contest
题目描述:N (1 ≤ N ≤ 100) cows, conveniently numbered 1…N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that ...原创 2019-08-21 19:50:48 · 121 阅读 · 0 评论 -
poj3159 Candies(差分约束,最短路)
题目描述:During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. A...原创 2019-08-21 19:34:09 · 149 阅读 · 0 评论 -
MPI Maelstrom
题目描述:BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee’s researc...原创 2019-08-20 21:11:50 · 114 阅读 · 0 评论 -
Currency Exchange
题目描述:Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. The...原创 2019-08-20 21:07:06 · 350 阅读 · 0 评论 -
Frogger
题目描述:Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourist...原创 2019-08-20 20:55:09 · 101 阅读 · 0 评论 -
Silver Cow Party
题目描述:One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-w...原创 2019-08-20 21:01:46 · 158 阅读 · 0 评论 -
Til the Cows Come Home
又到了最短路径专题呢先来几道基础题,回顾一下题目描述:Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beaut...原创 2019-08-20 20:47:19 · 126 阅读 · 0 评论 -
Information Transmission-3
题目描述:There is n bases in a certain area, numbered 1, 2,. … … , n, the location of base i is represented by coordinates (xi, yi). Dr. Kong is at point (x1, y1), he must send an information to poi...原创 2019-05-29 14:57:03 · 342 阅读 · 0 评论 -
食物链
题目描述:动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动物,用上述两种说法,一句接一句地说出K句...原创 2019-08-13 20:58:34 · 797 阅读 · 0 评论 -
Find them, Catch them
题目描述:The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify w...原创 2019-08-13 20:51:04 · 103 阅读 · 0 评论 -
Wireless Network
题目描述:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in...原创 2019-08-13 20:45:00 · 315 阅读 · 0 评论 -
Zjnu Stadium
题目描述:In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of people. The audience Seats made a...原创 2019-08-13 20:17:22 · 135 阅读 · 0 评论 -
Building Block
题目描述:John are playing with blocks. There are N blocks (1 <= N <= 30000) numbered 1…N。Initially, there are N piles, and each pile contains one block. Then John do some operations P times (1 <...原创 2019-08-13 20:13:17 · 1417 阅读 · 0 评论 -
How Many Answers Are Wrong
题目链接题目描述:TT and FF are … friends. Uh… very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game. To begin with, TT s...原创 2019-08-13 20:07:54 · 111 阅读 · 0 评论 -
Subway
题目描述:You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway. Because you don’t...原创 2019-08-21 20:19:26 · 240 阅读 · 0 评论 -
POJ3169_Layout(差分约束)
题目描述:Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1…N standing along a straight line waiting for feed. The cows ...原创 2019-08-21 19:41:22 · 113 阅读 · 0 评论 -
Elven Postman
题目描述:Elves are very peculiar creatures. As we all know, they can live for a very long time and their magical prowess are not something to be taken lightly. Also, they live on trees. However, there is...原创 2019-08-07 20:22:15 · 209 阅读 · 0 评论 -
Trees on the level
题目描述:Trees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines’ CM-5 are based on fat trees. Quad- and octal-trees are fundamen...原创 2019-08-07 20:10:52 · 134 阅读 · 0 评论 -
Bomb
题目描述:The 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 sequen...原创 2019-08-02 20:56:53 · 161 阅读 · 0 评论