比较复杂的dfs 注意算好到底需要send多少take back多少时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThere is a public bike service in Hangzhou City which prov...
分类:
其他好文 时间:
2015-12-06 11:22:36
阅读次数:
242
String对象一经创建,不可修改。.String对象存在 堆或者String池中(也就是静态方法区中个人感觉)1.String s=“abc” 在String池中寻找是否有“abc”对象,没有就创建一个,有的话不创建 2.String s=new String(“abc”) 先在堆中创建一个Str...
分类:
其他好文 时间:
2015-12-06 11:24:16
阅读次数:
123
时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe highest building in our city has only one elevator. A request list is made up with N pos...
分类:
其他好文 时间:
2015-12-06 11:22:33
阅读次数:
173
dfs使用vector保存最短路径时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA traveler's map gives the distances between cities along the highways, tog...
分类:
其他好文 时间:
2015-12-06 11:22:44
阅读次数:
327
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mat...
分类:
其他好文 时间:
2015-12-06 11:21:39
阅读次数:
218
http://blog.csdn.net/v_july_v/article/details/7624837斯坦福大学机器学习课程原始讲义 本资源为斯坦福大学机器学习课程原始讲义,为Andrew Ng所讲,共计20个PDF,基本涵盖了机器学习中一些重要的模型、算法、概念,此次一并压缩上传分享给大家,....
分类:
其他好文 时间:
2015-12-06 11:23:19
阅读次数:
302
根据两种遍历方式建立二叉树层遍历二叉树时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tree are distinct positive integers...
分类:
其他好文 时间:
2015-12-06 11:20:08
阅读次数:
168
尽量避免二次循环,很容易运行超时。该算法用printf 用时30ms 使用cout 运行75ms,只差这一句话。所以输出很多的时候不应该使用coutg++ 编译器使用 strcmp 一定要引用 string.h 头Programming Ability Test (PAT) is organized...
分类:
其他好文 时间:
2015-12-06 11:22:37
阅读次数:
201
时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue 去掉非法数据计算账单A long-distance telephone company charges its customers by the following rules:Ma...
分类:
其他好文 时间:
2015-12-06 11:21:15
阅读次数:
167
题目:Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a functi...
分类:
其他好文 时间:
2015-12-06 11:19:26
阅读次数:
124
题目:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like...
分类:
其他好文 时间:
2015-12-06 11:20:11
阅读次数:
103
To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords ...
分类:
其他好文 时间:
2015-12-06 11:19:50
阅读次数:
210
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can...
分类:
其他好文 时间:
2015-12-06 11:20:07
阅读次数:
183
时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue(二叉树建立方法)A Binary Search Tree (BST) is recursively defined as a binary tree which has the fo...
分类:
其他好文 时间:
2015-12-06 11:20:07
阅读次数:
371
image lazyload 原理分析lazyload.js实现图片异步载入
分类:
其他好文 时间:
2015-12-06 11:18:01
阅读次数:
113
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c...
分类:
其他好文 时间:
2015-12-06 11:20:25
阅读次数:
122
public class Solution { public String longestPalindrome(String s) { int length = s.length(); String result = ""; for (int i = ...
分类:
其他好文 时间:
2015-12-06 11:18:57
阅读次数:
119