随笔分类 -  RMQ

HDU 4123 Bob’s Race(树形DP,rmq)
摘要:Bob’s RaceTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1994Accepted Submission(s): 619Problem DescriptionBob wants to hold a race to encourage people to do sports. He has got trouble in choosing the route. There are N houses and N - 1 roads in h 阅读全文

posted @ 2013-11-08 18:27 kuangbin 阅读(1490) 评论(0) 推荐(0)

HDU 4122 Alice's mooncake shop (RMQ)
摘要:Alice's mooncake shopTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2596Accepted Submission(s): 619Problem DescriptionThe Mid-Autumn Festival, also known as the Moon Festival or Zhongqiu Festival is a popular harvest festival celebrated by Chi 阅读全文

posted @ 2013-11-08 12:22 kuangbin 阅读(731) 评论(0) 推荐(0)

HDU 2888 Check Corners(二维RMQ)
摘要:Check CornersTime Limit: 2000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1362Accepted Submission(s): 503Problem DescriptionPaul draw a big m*n matrix A last month, whose entries Ai,j are all integer numbers ( 1 #include #include #include using namespace std;i 阅读全文

posted @ 2013-07-31 14:25 kuangbin 阅读(698) 评论(0) 推荐(0)

POJ 2019 Cornfields (二维RMQ)
摘要:CornfieldsTime Limit:1000MSMemory Limit:30000KTotal Submissions:4911Accepted:2392DescriptionFJ has decided to grow his own corn hybrid in order to help the cows make the best possible milk. To that end, he's looking to build the cornfield on the flattest piece of land he can find.FJ has, at grea 阅读全文

posted @ 2013-07-31 11:41 kuangbin 阅读(2351) 评论(0) 推荐(0)

POJ 3368 Frequent values (RMQ)
摘要:Frequent valuesTime Limit:2000MSMemory Limit:65536KTotal Submissions:11540Accepted:4206DescriptionYou are given a sequence ofnintegersa1, a2, ... , anin non-decreasing order. In addition to that, you are given several queries consisting of indicesiandj(1 ≤ i ≤ j ≤ n). For each query, determine the m 阅读全文

posted @ 2013-07-31 00:38 kuangbin 阅读(665) 评论(0) 推荐(0)

HDU 3183 A Magic Lamp (双向链表贪心删除 或者是 RMQ取数)
摘要:A Magic LampTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 745Accepted Submission(s): 271Problem DescriptionKiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and 阅读全文

posted @ 2012-09-21 12:36 kuangbin 阅读(620) 评论(0) 推荐(0)

HDU 1806 Frequent values(RMQ)
摘要:Frequent valuesTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 778Accepted Submission(s): 259Problem DescriptionYou are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries co 阅读全文

posted @ 2012-09-20 22:18 kuangbin 阅读(1731) 评论(0) 推荐(1)

POJ 3264 Balanced Lineup(RMQ)
摘要:Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 24349Accepted: 11348Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with som 阅读全文

posted @ 2012-09-16 09:34 kuangbin 阅读(1115) 评论(0) 推荐(0)

导航

JAVASCRIPT: