
ICPC-POJ
文章平均质量分 86
POJ的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
UVA10277 POJ2646 ZOJ1856 Boastin‘ Red Socks【数学】
Boastin’ Red SocksTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2197 Accepted: 556DescriptionYou have a drawer that is full of two kinds of socks: red and black. You know that there are at least 2 socks, and not more than 50000. However,原创 2022-05-08 16:37:26 · 502 阅读 · 0 评论 -
UVA542 POJ2261 ZOJ1950 France ‘98【概率】
France '98Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1318 Accepted: 791DescriptionToday the first round of the Soccer World Championship in France is coming to an end. 16 countries are remaining now, among which the winner is determine原创 2022-05-08 10:42:04 · 244 阅读 · 0 评论 -
POJ2106 LA3094 ZOJ2483 Boolean Expressions【文本处理】
Boolean ExpressionsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7023 Accepted: 2446DescriptionThe objective of the program you are going to produce is to evaluate boolean expressions as the one shown next:Expression: ( V | V ) & F &原创 2022-05-07 19:12:23 · 593 阅读 · 1 评论 -
POJ1603 ZOJ1221 Risk【Floyd算法】
RiskTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3537 Accepted: 1580DescriptionRisk is a board game in which several opposing players attempt to conquer the world. The gameboard consists of a world map broken up into hypothetical countri原创 2022-05-06 12:02:56 · 377 阅读 · 0 评论 -
POJ3615 Cow Hurdles【Floyd算法】
Cow HurdlesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10362 Accepted: 4419DescriptionFarmer John wants the cows to prepare for the county jumping competition, so Bessie and the gang are practicing jumping over hurdles. They are getting原创 2022-05-06 11:31:35 · 240 阅读 · 0 评论 -
HDU1217 POJ2240 ZOJ1092 Arbitrage【Floyd算法】
ArbitrageTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13735 Accepted Submission(s): 6272Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one u原创 2022-05-06 10:59:53 · 305 阅读 · 0 评论 -
HDU1416 POJ1078 UVA653 LA5507 Gizilch【DFS】
GizilchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 497 Accepted Submission(s): 142Problem DescriptionThe game of gizilch has very simple rules. First 100 grapes are labeled, in nontoxic ink原创 2022-05-05 19:21:22 · 333 阅读 · 0 评论 -
POJ1001 HDU1063 UVA748 UVALive5356 Exponentiation【大数】
ExponentiationTime Limit: 500MS Memory Limit: 10000KTotal Submissions: 185108 Accepted: 44559DescriptionProblems involving the computation of exact values of very large magnitude and precision a...原创 2019-02-16 21:56:30 · 598 阅读 · 0 评论 -
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 · 499 阅读 · 1 评论 -
UVA10672 POJ1909 ZOJ2374 Marbles on a tree【BFS】
Marbles on a treeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 1890 Accepted: 885Descriptionn boxes are placed on the vertices of a rooted tree, which are numbered from 1 to n, 1 <= n <= 10000. Each box is either empty or contains a原创 2022-04-25 23:06:26 · 355 阅读 · 0 评论 -
POJ2029 ZOJ1716 Get Many Persimmon Trees【二维树状数组】
Get Many Persimmon TreesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5368 Accepted: 3456DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to原创 2021-08-12 23:47:15 · 240 阅读 · 0 评论 -
POJ1195 Mobile phones【二维树状数组】
Mobile phonesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 25904 Accepted: 11812DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares原创 2021-08-12 23:18:49 · 225 阅读 · 0 评论 -
POJ2777 Count Color【线段树】
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 62027 Accepted: 18419DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There i原创 2021-08-12 22:39:07 · 236 阅读 · 0 评论 -
POJ3370 UVA11237 HDU1808 Halloween treats【鸽笼原理】
Halloween treatsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11017 Accepted: 3823 Special JudgeDescriptionEvery year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets on that原创 2021-08-12 08:08:39 · 239 阅读 · 0 评论 -
POJ3669 Meteor Shower【BFS】
Meteor ShowerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 37006 Accepted: 9463DescriptionBessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit. Anxi原创 2021-08-11 06:29:16 · 237 阅读 · 0 评论 -
POJ3280 Cheapest Palindrome【回文+DP】
Cheapest PalindromeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 17753 Accepted: 8257DescriptionKeeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an elect原创 2021-08-10 23:34:19 · 304 阅读 · 0 评论 -
POJ2750 Potted Flower【线段树】
Potted FlowerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5857 Accepted: 2310DescriptionThe little cat takes over the management of a new park. There is a large circular statue in the center of the park, surrounded by N pots of flowers.原创 2021-08-10 22:59:55 · 265 阅读 · 0 评论 -
POJ2528 UVA10587 Mayor‘s posters【线段树】
Mayor’s postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 99829 Accepted: 28528DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at a原创 2021-08-10 18:48:12 · 224 阅读 · 0 评论 -
POJ2182 HDU2711 Lost Cows【树状数组+线段树】
Lost CowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17113 Accepted: 10664DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1…N. In a spectacular display of poor judgment, they visited the neighborhood ‘watering原创 2021-08-10 11:48:51 · 297 阅读 · 0 评论 -
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 · 430 阅读 · 0 评论 -
HDU1524 POJ2425 A Chess Game【SG函数】
A Chess GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3183 Accepted Submission(s): 1425Problem DescriptionLet’s design a new chess game. There are N positions to hold M chesses in this ga原创 2021-08-09 21:47:52 · 335 阅读 · 0 评论 -
Bailian1835 POJ1835 宇航员【模拟】
宇航员Time Limit: 2000MS Memory Limit: 30000KTotal Submissions: 8900 Accepted: 3629Description问题描述: 宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头顶方向为z轴正方向,则宇航员的初始状态如下图所示:现对六个方向分别标号,x,y,z正方向分别为0,1,2,负方向分别为3,4,5;称它们为绝对方向。宇航员在宇宙中只沿着与绝对坐标系原创 2021-08-06 23:18:31 · 249 阅读 · 0 评论 -
POJ2692 Australian Voting【序列处理】
Australian VotingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1828 Accepted: 436DescriptionAustralian ballots require that the voter rank the candidates in order of choice. Initially only the first choices are counted and if one candidat原创 2021-08-05 00:18:49 · 195 阅读 · 0 评论 -
UVA10202 POJ2466 ZOJ1895 Pairsumonious Numbers【算术计算】
Pairsumonious NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1064 Accepted: 521 Special JudgeDescriptionFor 10 > N > 2 numbers we form N*(N-1)/2 sums by adding every pair of the numbers. Your task is to find the N numbers giv原创 2021-08-03 22:50:24 · 268 阅读 · 0 评论 -
UVA10360 POJ1916 Rat Attack【枚举】
Rat AttackTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 1106 Accepted: 365DescriptionBackgroundBaaaam! Another deadly gas bomb explodes in Manhattan’s underworld. Rats have taken over the sewerage and the city council is doing everything原创 2021-08-03 01:11:54 · 251 阅读 · 0 评论 -
POJ2773 Happy 2006【GCD+枚举】
Happy 2006Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 17883 Accepted: 6261DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9…are all relativ原创 2021-08-03 00:36:53 · 240 阅读 · 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 · 260 阅读 · 0 评论 -
POJ2609 Ferry Loading【DP】
Ferry LoadingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1970 Accepted: 549 Special JudgeDescriptionBefore bridges were common, ferries were used to transport cars across rivers. River ferries, unlike their larger cousins, run on a gui原创 2021-08-02 19:04:13 · 284 阅读 · 0 评论 -
POJ2704 HDU1208 LA3390 Pascal‘s Travels【递推+记忆化搜索】
Pascal’s TravelsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5656 Accepted: 2538DescriptionAn n x n game board is populated with integers, one nonnegative integer per square. The goal is to travel along any legitimate path from the upper原创 2021-08-01 19:55:36 · 368 阅读 · 0 评论 -
UVA1445 LA4636 POJ3802 Cubist Artwork【贪心】
Cubist ArtworkTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 477 Accepted: 308DescriptionInternational Center for Picassonian Cubism is a Spanish national museum of cubist artworks, dedicated to Pablo Picasso. The center held a competition原创 2021-08-01 19:08:51 · 284 阅读 · 0 评论 -
POJ3044 City Skyline【stack】
City SkylineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3631 Accepted: 1633DescriptionThe best part of the day for Farmer John’s cows is when the sun sets. They can see the skyline of the distant city. Bessie wonders how many buildings原创 2021-08-01 01:17:32 · 382 阅读 · 0 评论 -
UVA10998 POJ2857 Flipping Colors【DFS】
Flipping ColorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 749 Accepted: 371DescriptionA rectangle with sides parallel to the x-y axes and its left-lower corner at (0, 0) is being painted. The rectangle may be thought of as a flat-scree原创 2021-06-27 18:04:44 · 255 阅读 · 0 评论 -
UVA10308 POJ2631 Roads in the North【DFS】
Roads in the NorthTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7827 Accepted: 3603DescriptionBuilding and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that the原创 2021-06-24 19:38:07 · 226 阅读 · 0 评论 -
UVA10670 POJ1907 ZOJ2372 Work Reduction【贪心】
Work ReductionTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 1784 Accepted: 631DescriptionPaperwork is beginning to pile up on your desk, and tensions at the workplace are starting to mount. Your boss has threatened to fire you if you don’原创 2021-06-21 10:48:23 · 239 阅读 · 0 评论 -
UVA10081 POJ2537 ZOJ1883 Tight Words【DP】
Tight wordsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2845 Accepted: 1332DescriptionGiven is an alphabet {0, 1, … , k}, 0 <= k <= 9 . We say that a word of length n over this alphabet is tight if any two neighbour digits in the w原创 2021-06-20 18:21:30 · 221 阅读 · 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 · 227 阅读 · 0 评论 -
POJ2033 LA3078 HDU1508 ZOJ2202 Alphacode【DFS+DP】
AlphacodeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 15489 Accepted: 4649DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice: “Let’s just use a very simple code: We原创 2021-05-21 19:52:35 · 220 阅读 · 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 · 220 阅读 · 0 评论 -
POJ2092 LA3157 HDU1347 ZOJ2250 Grandpa is Famous【排序】
Grandpa is FamousTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 11103 Accepted: 5084DescriptionThe whole family was excited by the news. Everyone knew grandpa had been an extremely good bridge player for decades, but when it was announced原创 2021-05-20 19:02:17 · 242 阅读 · 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 · 212 阅读 · 0 评论