ACM__基础算法
文章平均质量分 76
Spectacules
每一段代码都是艺术品
展开
-
HDU 1757 A Simple Math Problem (矩阵快速幂)
A Simple Math ProblemTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3093 Accepted Submission(s): 1874Problem DescriptionLele now原创 2015-05-07 11:33:56 · 321 阅读 · 0 评论 -
HDU 2604 Queuing (矩阵快速幂)
QueuingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3274 Accepted Submission(s): 1487Problem DescriptionQueues and Priority Q原创 2015-05-07 09:30:37 · 393 阅读 · 0 评论 -
HDU 1717 小数化分数2(数学基本知识)
HDU 1717 小数化分数2Problem DescriptionRay 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他又想到一个问题,如何把一个循环小数化成分数呢?请你写一个程序不但可以将普通小数化成最简分数,也可以把循环小数化成最简分数。 Input第一行是一个整数N,表示有多少组数据。每组数据原创 2015-07-28 21:15:32 · 490 阅读 · 0 评论 -
HDU 2141 Can you find it?(二分查找)
Can you find itProblem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisf原创 2015-07-30 12:18:24 · 502 阅读 · 0 评论 -
HDU 2157 How many ways??(矩阵快速幂)
HDU 2157 How many ways??Problem Description春 天到了, HDU校园里开满了花, 姹紫嫣红, 非常美丽. 葱头是个爱花的人, 看着校花校草竞相开放, 漫步校园, 心情也变得舒畅. 为了多看看这迷人的校园, 葱头决定, 每次上课都走不同的路线去教室, 但是由于时间问题, 每次只能经过k个地方, 比方说, 这次葱头决定经过2个地方, 那他可以先去问鼎原创 2015-07-21 16:22:25 · 418 阅读 · 0 评论 -
HDU 5441 Travel (带权并查集 + 离线操作)
TravelProblem DescriptionJack likes to travel around the world, but he doesn’t like to wait. Now, he is traveling in the Undirected Kingdom. There aren cities and m bidirectional roads con原创 2015-09-15 22:12:30 · 597 阅读 · 0 评论 -
九度OJ 1533 最长上升子序列 (基于贪心和二分查找)
题目描述: 给定一个整型数组, 求这个数组的最长严格递增子序列的长度。 譬如序列1 2 2 4 3 的最长严格递增子序列为1,2,4或1,2,3.他们的长度为3。输入: 输入可能包含多个测试案例。对于每个测试案例,输入的第一行为一个整数n(1输入的第二行包括n个整数,代表这个数组中的数字。整数均在int范围内。输出: 对于每个测试案例,输出其最长严格递增原创 2015-10-06 16:39:10 · 454 阅读 · 0 评论 -
HDU 1950 Bridging signals(LIS)
Bridging signalsProblem Description'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the原创 2015-10-06 17:28:12 · 369 阅读 · 0 评论