Time Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64u Description Farmer John completed his new barn just last week, complete with a ...
分类:
其他好文 时间:
2016-07-14 02:28:15
阅读次数:
158
LeetCode 第 367 题 (Valid Perfect Square)
Given a positive integer num, write a function which returns True if num is a perfect square else False.
Note: Do not use any built-in library function su...
分类:
其他好文 时间:
2016-07-13 16:28:46
阅读次数:
104
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Given a positive integer n ...
分类:
其他好文 时间:
2016-07-12 06:46:54
阅读次数:
133
转载自:http://blog.csdn.net/pi9nc/article/details/11848327 二分图的最大匹配、完美匹配和匈牙利算法 这篇文章讲无权二分图(unweighted bipartite graph)的最大匹配(maximum matching)和完美匹配(perfect ...
分类:
编程语言 时间:
2016-07-06 21:46:02
阅读次数:
303
可以用双指针(尺取法),也可以枚举起点,二分终点。 ...
分类:
其他好文 时间:
2016-07-03 00:19:43
阅读次数:
118
题目连接 https://leetcode.com/problems/valid-perfect-square/ Valid Perfect Square Description Given a positive integer num, write a function which returns ...
分类:
其他好文 时间:
2016-06-30 22:58:22
阅读次数:
177
Valid Perfect Square
Total Accepted: 1976 Total
Submissions: 5317 Difficulty: Medium
Given a positive integer num, write a function which returns True if num is a perfect squ...
分类:
其他好文 时间:
2016-06-28 11:04:11
阅读次数:
163
题目描述: Given a positive integer num, write a function which returns True if num is a perfect square else False. 解题分析: 这种找数字的题一般都用类似与二分查找的算法。需要注意的是比较平方和 ...
分类:
其他好文 时间:
2016-06-28 00:38:07
阅读次数:
234
Typical binary search.. but take care of data overflow if you are using C++ ...
分类:
其他好文 时间:
2016-06-27 12:03:52
阅读次数:
112