码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
LeetCode: Triangle 题解
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-05-08 21:08:25    阅读次数:407
shell脚本练习题(更新中...)
练习题(这里贴的是自己写的代码, 网上给的题目代码我会附加在最下面)1.编写shell脚本,计算1-100的和; 1 #!/bin/bash 2 #caculate the sum of numbers from 1 to 100 3 4 sum=0 5 for i in `seq 1 100`;....
分类:其他好文   时间:2014-05-07 19:34:54    阅读次数:305
ProjectEuler_P11
Problem:In the 2020 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08...
分类:其他好文   时间:2014-05-06 14:35:55    阅读次数:460
Leetcode: Palindrome Numbers
尝试用两头分别比较的方法,结果发现无法解决1000021这种问题 1 public class Solution { 2 public boolean isPalindrome(int x) { 3 if(x= 10) { 6 div *= 10; 7...
分类:其他好文   时间:2014-05-06 10:39:40    阅读次数:241
SOJ4339 Driving Range 最小生成树 kruskal算法
典型的最小生成树 然后求最大的一条边 附上链接http://cstest.scu.edu.cn/soj/problem.action?id=4339需要注意的是有可能有 "IMPOSSIBLE" 的情况这里用一个flag标记 记录所并的节点 只有flag = n时才能成功 负责就"IMPOSSIBL...
分类:其他好文   时间:2014-05-05 10:11:07    阅读次数:394
codechef Permutation Cycles 题解
We consider permutations of the numbers 1,..., N for some N. By permutation we mean a rearrangment of the number 1,...,N. For example 2  4  5  1  7  6  3  8 is a permutation of 1,2,...,8. Of cours...
分类:其他好文   时间:2014-05-04 18:38:14    阅读次数:341
Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm...
分类:其他好文   时间:2014-05-04 10:20:44    阅读次数:240
codechef Turbo Sort 题解
Input t – the number of numbers in list, then t lines follow [t  Each line contains one integer: N [0 N  Output Output given numbers in non decreasing order. Example Input: 5 5 3 ...
分类:其他好文   时间:2014-05-04 00:04:09    阅读次数:376
codeforces A. Array题解
Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold: The product of all numbers in the first set is less ...
分类:其他好文   时间:2014-05-03 23:51:19    阅读次数:621
codechef Sums in a Triangle题解
Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc. Develop a program which will compute the largest ...
分类:其他好文   时间:2014-05-03 17:32:22    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!