码迷,mamicode.com
首页 > 2015年07月25日 > 全部分享
leetCode 87.Scramble String (拼凑字符串) 解题思路和方法
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = "great": great / gr ...
分类:其他好文   时间:2015-07-25 10:44:04    阅读次数:128
Hdu 2236 无题II 最大匹配+二分
题目链接: Hdu 2236 解题思路: 将行和列理解为二分图两边的端点,给出的矩阵即为二分图中的所有边, 如果二分图能完全匹配,则说明 不同行 不同列的n个元素 区间为(min_edge,max_edge),这些edge是指构成完全匹配的那些边 题目需要求解最小区间长度 我们 可以 二分区间长度(0~100),每次枚举区间的下界 最后得到的maxl 即为...
分类:其他好文   时间:2015-07-25 10:46:22    阅读次数:142
04-树7. Search in a Binary Search Tree (25)
04-树7. Search in a Binary Search Tree (25) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue To search a key in a binary...
分类:其他好文   时间:2015-07-25 10:44:32    阅读次数:145
leetCode 88.Merge Sorted Array (合并排序数组) 解题思路和方法
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold add...
分类:编程语言   时间:2015-07-25 10:43:49    阅读次数:140
jQuery.noConflict() 解决冲突 原理深入
jQuery.noConflict()函数用于让出jQuery库对变量$(和变量jQuery)的控制权。 一般情况下,在jQuery库中,变量$是变量jQuery的别名,它们之间是等价的,例如jQuery("p")和$("p")是等价的。由于变量$只有一个字符,并且特点鲜明,因此我们更加习惯使用$来操作jQuery库。 不过,其他JS库也可能使用变量$来进行操作,例如Prototype...
分类:Web程序   时间:2015-07-25 10:45:22    阅读次数:130
leetCode 89.Gray Code (格雷码) 解题思路和方法
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:其他好文   时间:2015-07-25 10:45:07    阅读次数:114
hdu 5284 wyh2000 and a string problem(没有算法,只考思维,字符数组得开20万,不然太小了)
代码:#include #include using namespace std; char s[200000]; int main() { int t; scanf("%d",&t); while(t--) { scanf("%s",s); int w=0,y=0,h=0; int len=strlen(s); ...
分类:编程语言   时间:2015-07-25 10:45:00    阅读次数:123
leetCode 90.Subsets II(子集II) 解题思路和方法
Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain du...
分类:其他好文   时间:2015-07-25 10:43:06    阅读次数:113
C语言-数组指针判断回文数
int num[5]={1,9,3,2,1}; int *p=num; int *q=&num[4]; int flag=1; for (; p<q; p++,q--) { if (*p!=*q) { flag=0; break; } } if (flag) {...
分类:编程语言   时间:2015-07-25 10:44:28    阅读次数:136
PHP文件系统
读取文件内容 PHP具有丰富的文件操作函数,最简单的读取文件的函数为file_get_contents,可以将整个文件全部读取到一个字符串中。 $content = file_get_contents('./test.txt'); file_get_contents也可以通过参数控制读取内容的开始点以及长度。 $content = file_get_contents('./...
分类:Web程序   时间:2015-07-25 10:44:24    阅读次数:162
HDU 2473 Junk-Mail Filter (并查集的删除操作)
Problem Description Recognizing junk mails is a tough task. The method used here consists of two steps: 1) Extract the common characteristics from the incoming email. 2) Use a filter matching the...
分类:其他好文   时间:2015-07-25 10:43:57    阅读次数:77
顺序队列的表示
顺序队列的入队操作和出队操作...
分类:其他好文   时间:2015-07-25 10:42:39    阅读次数:93
【Android Studio】深入探究webView的缓存机制
最近一直都在搞webview,搞过Android的人可能会知道,webView本身自带了缓存机制,company的需求是不用webView 的缓存机制,写自己的缓存机制,哇哈哈,有挑战性咯。写这篇博客主要是记录一下我的学习过程。写的不好,勿喷。 首先我们要搞明白webView的缓存机制是什么? webView中有两种缓存: 一是网页数据缓存(即浏览网页中的资源),而是H5缓存(即appCach...
分类:移动开发   时间:2015-07-25 10:43:55    阅读次数:204
北大ACM2104——K-th Number
题目的意思是:给你一个N个数的数组,有M条询问,每一次输入3个数,i, j ,k  意思是数组中从第 i 个到第 j 个中的数从小到大排序,第k个数是哪个?输出来。 题目时间限制是20000MS,相对比较宽松,但是如果你用普通的方法来做,还是超时,没询问一次,你就要排一次序,消耗很多时间。我们可以想另外一种方法,也就是只用排一次序的。 我们可以用这样的方法:每一个数,输入的时候,记录它原本的位...
分类:其他好文   时间:2015-07-25 10:44:15    阅读次数:121
使用JS charts来画图表(二)——饼状图
{CSDN:CODE:jscharts} 如上是一个饼状图: 代码如下: 部门管理 Loading graph... /* var myChart = new JSChart('graph', 'bar'); myChart.setDataXML("data/chart.xml"); myChart.setSize(1100, 800); myCh...
分类:Web程序   时间:2015-07-25 10:43:04    阅读次数:128
动画特效八:渐变动画
本节将为大家介绍的动画效果是渐变动画效果。其实这个例子,大家天天能够看到,就是手机屏幕锁定是,有一句“滑动来解锁”的文字,它上面有一种渐变的动画一直在其上面走过。先看看最终的效果图。 思路分析: 1.  普通UIView不可能有这样的渐变效果,所以我们应该自定义一个UIView来实现这样的效果。 2.  普通UIView没有这样的渐变动画,所以我们可以考虑使用图层动画,并且将...
分类:其他好文   时间:2015-07-25 10:43:00    阅读次数:195
读《沃伦巴菲特》有感
沃伦巴菲特,一个商业界的神话人物。...
分类:其他好文   时间:2015-07-25 10:42:31    阅读次数:164
1643条   上一页 1 ... 74 75 76 77 78 79 80 ... 97 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!