![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OJ
文章平均质量分 83
Novel_Youn_Dong
A MUGGLE
展开
-
蓝桥杯 历年真题 观光铁路(JAVA实现非正解瞎写骗分)
问题描述 跳蚤国正在大力发展旅游业,每个城市都被打造成了旅游景点。 许多跳蚤想去其他城市旅游,但是由于跳得比较慢,它们的愿望难以实现。这时,小C听说有一种叫做火车的交通工具,在铁路上跑得很快,便抓住了商机,创立了一家铁路公司,向跳蚤国王请示在每两个城市之间都修建铁路。 然而,由于小C不会扳道岔,火车到一个城市以后只能保证不原路返回,而会随机等概率地驶向与这个城市有铁路连接的另外一个城...原创 2019-03-23 15:38:03 · 2283 阅读 · 1 评论 -
POJ 3617 Best Cow Line
Description:FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the jud原创 2017-12-27 23:27:50 · 222 阅读 · 0 评论 -
POJ 3468 A Simple Problem with Integers
Description:You 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 oth原创 2017-12-18 23:07:32 · 146 阅读 · 0 评论 -
HDU 1754 I Hate It
题目描述:很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0学生ID编号分别从1原创 2017-12-18 22:47:45 · 177 阅读 · 0 评论 -
HDU 1166 敌兵布阵
题目描述:C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究原创 2017-12-18 22:43:14 · 233 阅读 · 0 评论 -
CodeForces 883E Field of Wonders
Description:Polycarpus takes part in the "Field of Wonders" TV show. The participants of the show have to guess a hidden word as fast as possible. Initially all the letters of the word are hid原创 2017-11-26 20:56:17 · 448 阅读 · 0 评论 -
HDU 1875 畅通工程再续
题目描述:相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只原创 2017-11-26 20:47:29 · 212 阅读 · 0 评论 -
CodeForces 892B Wrath
Description:Hands that shed innocent blood!There are n guilty people in a line, thei-th of them holds a claw with length Li. The bell rings and every person kills some of people in front原创 2017-11-25 18:58:11 · 284 阅读 · 0 评论 -
CodeForces 893C Rumor
Description:Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and原创 2017-11-25 18:15:46 · 286 阅读 · 0 评论 -
ZOJ 1586 QS Network
Description:Sunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00 Problem E: QS NetworkIn the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommun原创 2017-11-25 17:51:36 · 180 阅读 · 0 评论 -
POJ 2421 Constructing Roads
Description:There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected原创 2017-11-25 17:27:34 · 323 阅读 · 0 评论 -
POJ 3026 Borg Maze
Chat: 最近进入考试周了。。。 写题速度越来越慢, 考完试之后准备继续投入战斗~ Description:The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used原创 2018-01-09 11:41:22 · 261 阅读 · 0 评论 -
ZOJ 3261 Connections in Galaxy War
Description: In order to strengthen the defense ability, many stars in galaxy allied together and built many bidirectional tunnels to exchange messages. However, when the Galaxy War began, some tunnel...原创 2018-02-27 22:50:46 · 242 阅读 · 0 评论 -
AIZU 2170 Marked Ancestor
Problem F:You are given a tree T that consists of N nodes. Each node is numbered from 1 to N, and node 1 is always the root node of T. Consider the following two operations on T:M v: (Mark) Mark n...原创 2018-08-29 16:21:59 · 277 阅读 · 0 评论 -
【转】AIZU 0121 Seven Puzzle
原博链接 https://blog.csdn.net/acm_10000h/article/details/40896075题目链接 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0121题意:7数码问题。在2×4的棋盘上,摆有7个棋子,每个棋子上标有1至7的某一数字,不同棋子上标的数字不相同。棋盘上还有一个空格(用0表示...转载 2018-08-11 11:39:10 · 287 阅读 · 0 评论 -
Codeforces Round #499 (Div. 2) C Fly
Chat: 本来想随便看看题写一下, 发现自己现在理解能力跌倒谷底orz。 看了好久才看懂这个题是个什么意思。。。Description:Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n−2n−2 intermediate...原创 2018-07-27 16:58:17 · 253 阅读 · 0 评论 -
Aizu 0033 Ball
题面:玉図のように二股に分かれている容器があります。1 から 10 までの番号が付けられた10 個の玉を容器の開口部 A から落とし、左の筒 B か右の筒 C に玉を入れます。板 D は支点 E を中心に左右に回転できるので、板 D を動かすことで筒 B と筒 C のどちらに入れるか決めることができます。開口部 A から落とす玉の並びを与えます。それらを順番に筒 B 又は筒 Cに入れて...原创 2018-08-03 17:00:38 · 196 阅读 · 0 评论 -
CodeForces 976B Lara Croft and the New Game
Description:You might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely missed the main idea about its plot, so l...原创 2018-05-04 23:38:03 · 796 阅读 · 0 评论 -
CodeForces 975C Valhalla Siege
Description:Ivar the Boneless is a great leader. He is trying to capture Kattegat from Lagertha. The war has begun and wave after wave Ivar's warriors are falling in battle.Ivar has nn warriors, he pl...原创 2018-05-04 23:29:29 · 427 阅读 · 0 评论 -
CodeForces 975A Aramic script
Description:In Aramic language words can only represent objects.Words in Aramic have special properties: A word is a root if it does not contain the same letter more than once. A root and all its pe...原创 2018-05-04 23:17:06 · 264 阅读 · 0 评论 -
CodeForces 964B Messages
题目大意:已知你会收到n封信。在某时刻t时会来一封或多封,每封信初始价值为a,从第t+1开始每时刻的价值减少b(最终价值可以为负数)。 同时银行有一种收益为c * 收到但是没有读过的信的数目。我们可以选择每封信何时读只要保证收益最大即可。解题思路:一开始思路想的是比较c和b的大小, c大的话就全部放在最后读,否则就立即读。 但是这样写全部最后读就很麻烦。 我们可以换一种思路, 反正要么是立即读要么...原创 2018-05-04 23:01:34 · 202 阅读 · 0 评论 -
Codeforces 964A Splits
最近写了几场cf的题, 各种浑水摸鱼过一道就跑导致分数低到令人发指,也并不知道自己都写了些什么, 遂总结一下这几次的题目回忆一下。 ...原创 2018-05-04 22:48:56 · 291 阅读 · 0 评论 -
HDU 2896 病毒侵袭
Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~ 但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气,他决定要把世界上所有带病毒的网站都找出来。当然,谁都知道这是不...原创 2018-03-22 00:01:48 · 280 阅读 · 0 评论 -
CodeForces 893B Beautiful Divisors
Description:Recently Luba learned about a special kind of numbers that she calls beautiful numbers. The number is called beautiful iff its binary representation consists ofk + 1 consecutiv原创 2017-11-25 16:49:56 · 364 阅读 · 0 评论 -
CodeForces 893A Chess For Three
Description:Alex, Bob and Carl will soon participate in a team chess tournament. Since they are all in the same team, they have decided to practise really hard before the tournament. But it's原创 2017-11-25 11:50:26 · 429 阅读 · 0 评论 -
EOJ 3441 唐纳德与子串 (Easy)
题目大意:子串的定义是在一个字符串中连续出现的一段字符。这里,我们使用 s[l…r] 来表示 s 字符串从 l 到 r(闭区间)的子串。在本题中,字符串下标从0 开始。显然,对于长度为 n 的字符串共有 n(n+1)2 个子串。对于一个给定的字符串 s,唐纳德给出q 次询问,第 i 次询问包括三个参数 li,ri,zi原创 2017-12-10 11:48:38 · 307 阅读 · 0 评论 -
POJ 1287 Networking
Description:You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may原创 2017-11-18 23:16:50 · 192 阅读 · 0 评论 -
POJ 3126 Prime Path
Description:The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It i原创 2017-11-18 20:22:14 · 149 阅读 · 0 评论 -
ZOJ 3983 Crusaders Quest
DescriptionCrusaders Quest is an interesting mobile game. A mysterious witch has brought great darkness to the game world, and the only hope for your kingdom is to save the Goddesses so that they原创 2017-11-12 21:39:14 · 477 阅读 · 0 评论 -
ZOJ 3985 String of CCPC
DescriptionBaoBao has just found a string s of length n consisting of 'C' and 'P' in his pocket. As a big fan of the China Collegiate Programming Contest, BaoBao thinks a substringsisi+1si+2原创 2017-11-12 19:48:05 · 270 阅读 · 0 评论 -
POJ 3279 Fliptile
DescriptionFarmer 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 anM × N grid (1 ≤ M ≤原创 2017-10-31 18:44:56 · 138 阅读 · 0 评论 -
POJ 2559 Largest Rectangle in a Histogram
Description: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 t原创 2017-11-08 22:28:01 · 158 阅读 · 0 评论 -
POJ 3494 Largest Submatrix of All 1’s
DescriptionGiven a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? Bylargest we mean that the submatrix has the most elements.InputThe input contains multiple原创 2017-11-08 22:16:48 · 200 阅读 · 0 评论 -
FZU 2150 Fire Game
DescriptionFat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and原创 2017-10-30 20:09:46 · 295 阅读 · 0 评论 -
POJ 3268 Silver Cow Party
DescriptionOne 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) unidirecti原创 2017-11-07 13:11:42 · 139 阅读 · 0 评论 -
POJ 2031 Building a Space Station
Description:You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete t原创 2017-11-18 23:41:50 · 168 阅读 · 0 评论 -
CodeForces 888A Local Extrema
Description:You are given an array a. Some element of this arrayai is alocal minimum iff it is strictly less than both of its neighbours (that is,ai ai - 1 andai ai + 1). Also the elem原创 2017-11-19 21:32:18 · 400 阅读 · 0 评论 -
EOJ 3452 唐纳德先生和假骰子
题目描述:在进行某些桌游,例如 UNO 或者麻将的时候,常常会需要随机决定从谁开始。骰子是一种好方案。普通的骰子有六个面,分别是一点、二点、三点、四点、五点、六点,六面向上的概率相同。由于骰子只能产生六种情况,而实际桌游时,却常常有三到四人,所以,我们在掷骰子时,常常采用两颗骰子,这个「随机的选择」就由骰子向上点数之和直接决定。我们采用这么一种方案,将向上点数之和对 p(人数)原创 2017-12-10 11:42:38 · 929 阅读 · 0 评论 -
POJ 2386 Lake Counting
Description:Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square conta原创 2017-12-10 11:32:21 · 175 阅读 · 0 评论 -
POJ 1852 Ants
Description:An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two原创 2017-12-10 10:58:32 · 176 阅读 · 0 评论