码迷,mamicode.com
首页 >  
搜索关键字:hdu 1394 minimum inv    ( 34217个结果
hdu 4841 用stl::vector解决约瑟夫问题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4841 约瑟夫问题,确定一个数m,共有n个人,循环报数,数到m就出队,后面的数跟在其后,这是一个典型的链表删除操作的应用,我先用vector写了一中操作方案,vector对于随机访问元素的时间复杂度是O( ...
分类:其他好文   时间:2020-03-31 23:19:36    阅读次数:137
155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov ...
分类:其他好文   时间:2020-03-31 22:46:01    阅读次数:62
hdu1276STL链表的应用
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1276 题目给出一个数n,表示序列长度是n,且第i位为i,操作是从中删除二的倍数,然后重新组数,再删除三的倍数,然后重新组数,这样循环迭代,直到数的数量小于三。因为只有删除操作,而且每次删除之后的数都要重 ...
分类:其他好文   时间:2020-03-31 20:49:08    阅读次数:47
最短编辑距离 72.EditDistance.md
题目描述 Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations pe ...
分类:其他好文   时间:2020-03-31 18:48:00    阅读次数:81
HDU - 1241 Oil Deposits
"HDU 1241 链接" 连通块个数统计问题 选对一块油田八个方向进行dfs。 dfs的次数就是连通块的个数了,极度水题 ...
分类:其他好文   时间:2020-03-31 14:16:20    阅读次数:50
HDU Count the string (KMP)
题面见http://acm.hdu.edu.cn/showproblem.php?pid=3336 给你一个字符串,让你找它的前缀在整个字符串出现的次数。 作为一个不会思考的笨比,直接用kmp去一个个计数,果不其然,t了 找了博客来看,大概就是kmp+dp,要用到kmp中的pret数组(有的人习惯叫 ...
分类:其他好文   时间:2020-03-30 23:02:03    阅读次数:65
[FatMouse's Speed] LIS
Description "HDU 1160" FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection o ...
分类:其他好文   时间:2020-03-30 19:29:07    阅读次数:76
[刷题] LeetCode 209 Minimum Size Subarray Sum
要求 给定一个含有 n 个正整数的数组和一个正整数 s 找出该数组中满足其和 ≥ s 的长度最小的连续子数组 如果不存在符合条件的连续子数组,返回 0 示例 输入:s = 7, nums = [2,3,1,2,4,3] 输出:2 解释:子数组 [4,3] 是该条件下的长度最小的连续子数组 思路 暴力 ...
分类:其他好文   时间:2020-03-30 09:40:08    阅读次数:94
hdu2732 最大流+拆点
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2732 题目给定一个场景,有n*m个方格,每个方格代表一个柱子,一个柱子可以承受不同次数的跳跃,开始时图中给定一些地方有蜥蜴,并且给定蜥蜴最多跳跃的步长,只要跳到方格之外就能安全,而且每只蜥蜴不能在同一个 ...
分类:其他好文   时间:2020-03-29 21:17:14    阅读次数:77
452. Minimum Number of Arrows to Burst Balloons
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor ...
分类:其他好文   时间:2020-03-29 12:34:44    阅读次数:57
34217条   上一页 1 ... 44 45 46 47 48 ... 3422 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!