码迷,mamicode.com
首页 >  
搜索关键字:input 随表格 自动增大    ( 33503个结果
LeetCode: Remove Duplicates from Sorted Array [025]
【题目】 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. For example, Given input array A ...
分类:其他好文   时间:2014-05-18 18:25:19    阅读次数:272
XDU1160 - 科协的数字游戏I
Description  科协里最近很流行数字游戏。某人命名了一种不降数,这种数字必须满足从左到右各位数字成大于等于的关系,如123,446。现在大家决定玩一个游戏,指定一个整数闭区间[a,b],问这个区间内有多少个不降数。 Input 题目有多组测试数据。每组只含2个数字a, b (1 Output 每行给出一个测试数据的答案,即[a, b]之间有多少阶梯数。...
分类:其他好文   时间:2014-05-18 15:09:13    阅读次数:355
ACdream 1067:Triangles
Problem Description 已知一个圆的圆周被N个点分成了N段等长圆弧,求任意取三个点,组成锐角三角形的个数。 Input 多组数据,每组数据一个N(N Output 对于每组数据,输出不同锐角三角形的个数。 Sample Input 3 4 5 Sample Output 1 0 5 分析:当3个点组成锐角三角形A...
分类:其他好文   时间:2014-05-18 14:51:50    阅读次数:220
UESTC-1307-windy数
windy定义了一种windy数。 不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间,包括A和B,总共有多少个windy数? Input 包含两个整数,A B。 满足 1 Output 包含一个整数:闭区间[A,B]上windy数的个数。 Sample Input 1 10 ...
分类:Windows程序   时间:2014-05-18 10:58:32    阅读次数:372
LeetCode 016 3Sum Closest
【题目】 Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. For example, given array S = {...
分类:其他好文   时间:2014-05-18 10:37:57    阅读次数:269
LeetCode: Valid Parentheses [020]
【题目】 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not. 【题意】 判断给定的字符串是否是合法的...
分类:其他好文   时间:2014-05-18 10:08:11    阅读次数:327
python中创建和遍历二叉树
python创建二叉树,源代码如下: #!/usr/bin/python class node(): def __init__(self,k=None,l=None,r=None): self.key=k; self.left=l; self.right=r; def create(root): a=raw_input('enter a key:'); if a is '#...
分类:编程语言   时间:2014-05-18 09:27:13    阅读次数:384
LeetCode: Letter Combinations of a Phone Number [018]
【题目】 Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit string "23" Output: ["ad", "ae", "af", "bd", "be", "bf",...
分类:其他好文   时间:2014-05-18 07:30:12    阅读次数:340
[LeetCode]3Sum Closest
3SumClosest Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution....
分类:其他好文   时间:2014-05-18 05:57:48    阅读次数:244
LeetCode:Reverse Words in a String
题目: Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Clarification: What constitutes a word? A sequence of non-spa...
分类:其他好文   时间:2014-05-18 04:12:07    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!