ICPC-水题题解一
文章平均质量分 84
ICPC水题题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
UVA10205 POJ2469 ZOJ1896 Stack ‘em Up【水题】
Stack 'em UpTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1130 Accepted: 411DescriptionA standard playing card deck contains 52 cards, 13 values in each of four suits. The values are named 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ac原创 2022-04-26 14:34:40 · 470 阅读 · 1 评论 -
POJ2805 Inversion【水题】
InversionTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 4641 Accepted: 2034DescriptionThe inversion number of an integer sequence a1, a2, . . . , an is the number of pairs (ai, aj) that satisfy i < j and ai > aj . Given n and the inv原创 2021-08-10 11:14:18 · 379 阅读 · 0 评论 -
POJ3251 Big Square【水题】
Big SquareTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6173 Accepted: 1188DescriptionFarmer John’s cows have entered into a competition with Farmer Bob’s cows. They have drawn lines on the field so it is a square grid with N × N points (原创 2021-08-03 00:16:41 · 240 阅读 · 0 评论 -
UVA11371 Number Theory for Newbies【水题】
Given any positive integer, if we permute its digits, the difference between the number we get and the given number will always be divisible by 9.For example, if the given number is 123, we may rearrange the digits to get 321. The difference = 321 - 123 =原创 2021-06-19 18:49:39 · 203 阅读 · 0 评论 -
UVA10144 ZOJ2044 Expression
ExpressionTime Limit: 2000 msMemory Limit: 65536 KBIt is known that Sheffer stroke function (NOT-AND) can be used to construct any Boolean function. The truth table for this function is given below:Truth table for Sheffer stroke functionx y x|y0 0 10原创 2021-06-14 23:55:55 · 160 阅读 · 0 评论 -
POJ1747 Expression【水题】
ExpressionTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 917 Accepted: 530DescriptionIt is known that Sheffer stroke function (NOT-AND) can be used to construct any Boolean function. The truth table for this function is given below:Truth原创 2021-06-14 23:50:58 · 195 阅读 · 0 评论 -
UVA10502 Counting Rectangles【水题】
In some tests there appears the problem of finding the number of rectangles (or circles, or triangles, …) of different sizes in a figure. We consider the problem of counting rectangles (including squares) in a rectangular board. Giv原创 2021-05-30 05:41:50 · 207 阅读 · 0 评论 -
POJ2579 LA2858 HDU1218 Blurred Vision【水题】
Blurred VisionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2269 Accepted: 1624DescriptionAliasing is the stair-step effect achieved when attempting to represent a smooth curve using a finite number of discrete pixels. Of course, all comp原创 2021-05-20 19:44:02 · 202 阅读 · 0 评论 -
POJ1323 LA2521 HDU1338 ZOJ1362 Game Prediction【贪心】
Game PredictionTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12596 Accepted: 6053DescriptionSuppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a pos原创 2021-05-20 13:13:24 · 189 阅读 · 0 评论 -
HDU1328 ZOJ1240 IBM Minus One【水题】
IBM Minus OneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9704 Accepted Submission(s): 4643Problem DescriptionYou may have heard of the book ‘2001 - A Space Odyssey’ by Arthur C. Clarke, or原创 2021-05-20 12:46:55 · 268 阅读 · 0 评论 -
POJ2460 HDU1152 Brownie Points I【水题】
Brownie Points ITime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1438 Accepted: 903DescriptionStan and Ollie play the game of Odd Brownie Points. Some brownie points are located in the plane, at integer coordinates. Stan plays first and plac原创 2021-05-20 11:52:07 · 181 阅读 · 0 评论 -
POJ2183 Bovine Math Geniuses【水题】
Bovine Math GeniusesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3261 Accepted: 1994DescriptionFarmer John loves to help the cows further their mathematical skills. He has promised them Hay-flavored ice cream if they can solve various ma原创 2021-05-09 23:10:15 · 273 阅读 · 0 评论 -
UVA12555 Baby Me【水题】
When I was born, I was 5 斤 2 两。Sorry for non-Chinese people. Here’s what it means:1 斤 =0.5kg1 两 =0.05kg So 5 斤 2 两 means 0.55+0.052=2.6kg. Given similar information for other babies, your task is to find ou原创 2021-04-29 09:59:18 · 246 阅读 · 0 评论 -
UVA11780 Miles 2 Km【水题】
It is a well known fact that you can use Fibonacci numbers to convert distances from miles 2 kilometers. Well, it’s actually not a well known fact. It is, however, a well known fact that one mile is 1.6 km. Now let me explain how you can use Fibonacci numb原创 2021-04-22 05:47:34 · 255 阅读 · 0 评论 -
UVA11074 Draw Grid【水题】
It is very easy to draw grids with ASCII characters. For example look at the picture on the right. It shows a (4 × 4) grid, where each smallest square is of size 3 and the thickness of drawing line is 2. In this problem your job is原创 2021-04-21 21:05:59 · 215 阅读 · 0 评论 -
UVA11207 The easiest way【水题】
As a participant in the Programming Olympiads in Murcia, your purpose is to win as many paper birds as possible. Butthis year the problems are so difficult. . . So you decide to take the easiest way: to make the paper birds yourself. &n原创 2021-04-21 19:15:03 · 196 阅读 · 0 评论 -
UVA11777 Automate the Grades【水题】
The teachers of “Anguri Begam Uccha Biddalya”, a school located in the western region of Sylhet, currently follows a manual system for grading their students. The manual process is very time consuming and error prone. From the next semester they have decid原创 2021-04-21 13:16:23 · 213 阅读 · 0 评论 -
UVA11713 Abstract Names【水题】
Some of you may have noticed that in certain computer games, particularly the ones based on sports, the spelling of names are mutated so that they are not an exact duplicate of the real entity. This is done to avoid hassles of taking permission from each p原创 2021-04-21 12:52:52 · 228 阅读 · 0 评论 -
UVA12646 Zero or One【水题】
Everyone probably knows the game Zero or One (in some regions in Brazil also known as Two or One), used to determine a winner among three or more players. For those unfamiliar, the game works as follows. Each player chooses a value between zero or one; pro原创 2021-04-21 10:28:00 · 212 阅读 · 0 评论 -
UVA12700 Banglawash【水题】
Banglawash! It’s a popular term used by the fans of Bangladesh cricket team when their team achieved a rare but much expected clean sweep over their opponent. In this November, 2013, the touring New Zealand cricket team is once again Banglawased in the 3-m原创 2021-04-21 00:37:16 · 163 阅读 · 0 评论 -
UVA12696 Cabin Baggage【水题】
Cabin baggage (also called carry on or hand baggage) is a bag that a passenger is allowed to bring into an aircraft. For safety purpose, cabin baggage must not be too heavy or too big. Every airline company can set its own size and weight limits of cabin b原创 2021-04-19 00:52:28 · 252 阅读 · 0 评论 -
UVA12210 LA4496 A Match Making Problem【最值】
Match-making is a tough job and even then its long term success (A happy family) depends on two people who are often not involved in the match making process. But now, sites like facebook, twitter and communication devices/software like mobile phones, mess原创 2021-04-18 23:55:05 · 181 阅读 · 0 评论 -
UVA12541 LA6148 Birthdates【最值】
Write a program to identify the youngest person and the oldest person in a class.InputThe number n (1 ≤ n ≤ 100) in the first line determines the number of people in a class. The following n lines contain person’s name and his/her birthdate.原创 2021-04-18 22:55:21 · 211 阅读 · 0 评论 -
UVA11839 Optical Reader【水题】
Professor John decided to apply only multiple-choice tests to his students. In each test, each question will have five alternatives (A, B, C, D and E), and the teacher will distribute one answer sheet for each student. At the end of the test, the answer sh原创 2021-04-18 13:40:16 · 181 阅读 · 0 评论 -
UVA13012 LA7211 Identifying tea【水题】
Blind tea tasting is the skill of identifying a tea by using only your senses of smell and taste. As part of the Ideal Challenge of Pure-Tea Consumers (ICPC), a local TV show is organized. During the show, a full teapot is prepared原创 2021-04-16 23:05:03 · 327 阅读 · 0 评论 -
UVA12854 LA6821 Automated Checking Machine【水题】
The Internet Computer Parts Company (ICPC) is an on-line shop that sells computer parts. Pairs of in-line electrical connectors are among the most popular parts that ICPC sells. However, they are also one of the parts that are returned more often by unsati原创 2021-04-16 22:50:00 · 402 阅读 · 0 评论 -
UVA12614 Earn For Future【水题+最值】
In a lazy afternoon the great Froogrammer came to realize that, to make his future plans successful he needs a lot of money. To make some quick cash he decided to go to the casino to play a game. The rule of the game is the following:• The player is given原创 2021-04-16 22:28:42 · 208 阅读 · 0 评论 -
UVA13025 Back to the Past【水题】
Dr. James, the only PhD holder of our country in Competitive Programming (CP), has recently joined the Department of Competitive Programming in St. John Snow University as a professor. He has passed a lot of memorable times in this institute as a student.原创 2021-04-16 22:04:16 · 182 阅读 · 0 评论 -
UVA12205 LA4512 POJ3881 HDU4079 ZOJ3394 Happy Telephones【水题】
Happy TelephonesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 304 Accepted: 181DescriptionIn the land of Eden, all phone conversations are happy ones. People complaining on the phone are immediately put in jail. To enforce this law, the p原创 2021-04-16 00:43:39 · 211 阅读 · 0 评论 -
POJ2586 Y2K Accounting Bug【水题】
Y2K Accounting BugTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20038 Accepted: 10112DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc.All w原创 2021-03-09 19:49:00 · 248 阅读 · 0 评论 -
POJ3619 Speed Reading【水题】
Speed ReadingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9878 Accepted: 4654DescriptionAll K (1 ≤ K ≤ 1,000) of the cows are participating in Farmer John’s annual reading contest. The competition consists of reading a single book with N原创 2021-02-22 06:00:20 · 239 阅读 · 0 评论 -
POJ3673 Cow Multiplication【水题】
Cow MultiplicationTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14335 Accepted: 9932DescriptionBessie is tired of multiplying pairs of numbers the usual way, so she invented her own style of multiplication. In her style, AB is equal to th原创 2021-02-20 08:03:58 · 245 阅读 · 0 评论 -
HDU1898 Sempr == The Best Problem Solver?【水题】
Sempr == The Best Problem Solver?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2684 Accepted Submission(s): 1761Problem DescriptionAs is known to all, Sempr(Liangjing Wang) had solved more th原创 2021-02-20 00:08:28 · 216 阅读 · 0 评论 -
HDU4505 小Q系列故事——电梯里的爱情【水题】
小Q系列故事——电梯里的爱情Time Limit: 300/100 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 5040 Accepted Submission(s): 3093Problem Description 细心的同事发现,小Q最近喜欢乘电梯上上下下,究其原因,也许只有小Q自己知道:在电梯里经常可以遇到他心中的女神HR。 电梯其实是个很暧昧的地方,只有在电梯里原创 2021-02-20 00:06:16 · 268 阅读 · 0 评论 -
POJ2363 Blocks
BlocksTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8281 Accepted: 4006DescriptionDonald wishes to send a gift to his new nephew, Fooey. Donald is a bit of a traditionalist, so he has chosen to send a set of N classic baby blocks. Each bl原创 2021-02-20 00:05:09 · 194 阅读 · 0 评论 -
HDU2081 手机短号【水题】
手机短号Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36652 Accepted Submission(s): 22281Problem Description大家都知道,手机号是一个11位长的数字串,同时,作为学生,还可以申请加...原创 2018-06-30 22:49:39 · 2118 阅读 · 0 评论 -
POJ1657 Bailian1657 Distance on Chessboard【基础】
1657:Distance on Chessboard描述国际象棋的棋盘是黑白相间的8 * 8的方格,棋子放在格子中间。如下图所示:王、后、车、象的走子规则如下:王:横、直、斜都可以走,但每步限走一格。后:横、直、斜都可以走,每步格数不受限制。车:横、竖均可以走,不能斜走,格数不限。象:只能斜走,格数不限。写一个程序,给定起始位置和目标位置,计算王、后、车、象从起始位置走到目标位...原创 2018-11-12 22:07:18 · 1018 阅读 · 0 评论 -
POJ3981 字符串替换【水题】
字符串替换Description编写一个C程序实现将字符串中的所有"you"替换成"we"Input输入包含多行数据每行数据是一个字符串,长度不超过1000数据以EOF结束Output对于输入的每一行,输出替换后的字符串Sample Inputyou are what you doSample Outputwe are what we do问题链接:POJ3981 字符串...原创 2018-12-10 09:51:06 · 782 阅读 · 0 评论 -
POJ3980 取模运算【水题】
取模运算Description编写一个C函数mod(int n, int m),实现取模运算%Input输入包含多行数据每行数据是两个整数a, b (1 &lt;= a, b &lt;= 32767)数据以EOF结束Output于输入的每一行输出a%bSample Input5 3100 2Sample Output20问题链接:POJ3980 取模运算问题描述:(...原创 2018-12-10 10:02:33 · 892 阅读 · 1 评论 -
HDU6292 赛题分析【水题】
赛题分析Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1506 Accepted Submission(s): 637Problem Description著名出题人小Q每次比赛后都会写一份《赛题分析》,包含比赛概况、每...原创 2018-12-22 16:53:45 · 475 阅读 · 0 评论