码迷,mamicode.com
首页 >  
搜索关键字:time    ( 52982个结果
leetcode----------Climbing Stairs
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:其他好文   时间:2015-01-08 13:14:25    阅读次数:119
[LeetCode] 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() -- Removes...
分类:其他好文   时间:2015-01-08 12:51:24    阅读次数:114
[C++]LeetCode: 77 Best Time to Buy and Sell Stock II (贪心算法)
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie,...
分类:编程语言   时间:2015-01-08 11:21:57    阅读次数:239
HDOJ 4720 Naive and Silly Muggles 三角形外接圆
当是钝角三角形时,就是最长边为直径的圆最小. 否则,求三角形的外接圆 Naive and Silly Muggles Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 700    Accepted Submission(s...
分类:其他好文   时间:2015-01-08 11:21:38    阅读次数:102
Fast algorithm to compute minimum volume oriented bounding box
Computing minimum volume bounding box is a hard problem in computer science. Exact algorithm costs O(n3) time complexity.However, for lots of applicat...
分类:其他好文   时间:2015-01-08 10:58:58    阅读次数:239
网络流 [HDU 1565] 方格取数(1)
方格取数(1)Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5961Accepted Submission(s): 2268Problem De...
分类:其他好文   时间:2015-01-08 00:56:37    阅读次数:231
raw socket
一个很newbee的例子,可惜还得改 1 import sys 2 import time 3 4 import socket 5 import struct 6 7 import random 8 9 def SendPacketData (Buffer = None , DestIP = ...
分类:其他好文   时间:2015-01-08 00:50:01    阅读次数:339
Java-Factorial Trailing Zeroes
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. Credits: Special thanks to @ts for adding this problem and creating all...
分类:编程语言   时间:2015-01-07 23:42:23    阅读次数:401
leetcode----------------Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). 分析 这是一道非常经典的题。这题更通用的形式是,给定两个已经排序...
分类:其他好文   时间:2015-01-07 23:39:15    阅读次数:345
CF 19C 思维题STL应用
http://codeforces.com/problemset/problem/19/C Once Bob saw a string. It contained so many different letters, that the letters were marked by numbers, but at the same time each letter ...
分类:其他好文   时间:2015-01-07 23:36:29    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!