Problem Description
简单的背包问题。设有一个背包,可以放入的重量为s。现有n(n<=10)件物品,重量分别为w1,w2,...,wn,均为正整数,从n件物品中挑选若干件,使得放入背包的重量之和正好为s。找到一组解即可。如果找不到输出“not found”。
Input
输入有多组数据,每组数据的第1行是物品总件数和背包的载重量,第2行为各物品的重量。
Output...
分类:
其他好文 时间:
2014-07-28 16:00:43
阅读次数:
227
归并排序(merge sort)是一个时间复杂度为O(nlogn)的基于比较的排序算法(comparison based sorting algorithm)。 归并排序大多数实现(implementation)都将其实现成了一个stable sort, 所谓的stable sort的意思就是the implementation preserves the input order of equal...
分类:
编程语言 时间:
2014-07-28 15:55:43
阅读次数:
392
快速幂
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit
Status
Description
Given a positive integer N, you should output the most right digit of N^N.
Input...
分类:
其他好文 时间:
2014-07-28 15:49:53
阅读次数:
262
安装的时候没有设置,现在找到之后记录下: (我这个是已经设置完后的截图,所以,Input Sources中,有拼音输入选项) Applications -- System Tools -- Setting -- Regin & Language点击左下角的 “+”号。找到Chinese(China)...
分类:
其他好文 时间:
2014-07-28 14:49:33
阅读次数:
313
数组乘积(15分)输入:一个长度为n的整数数组input输出:一个长度为n的整数数组result,满足result[i] = input数组中除了input[i]之外所有数的乘积(假设不会溢出)。比如输入:input ={2,3,4,5},输出result = {60,40,30,24}程序时间和空...
分类:
移动开发 时间:
2014-07-28 14:35:13
阅读次数:
187
Available pacaagess里找了coreutils-nohup包,安装好就行了运行nohup自己的程序的时候可能会出现一下:root@OpenWrt:~# nohup: ignoring input and appending output to 'nohup.out'但是这个不影响运行...
分类:
其他好文 时间:
2014-07-28 14:33:03
阅读次数:
1472
LeetCode: Reverse Words in a StringGiven an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky...
分类:
其他好文 时间:
2014-07-27 23:33:19
阅读次数:
173
HTML代码: 返回 ios下载 Android下载 CSS代码(reset):body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,te...
分类:
移动开发 时间:
2014-07-27 23:25:59
阅读次数:
414
1单闭合标签: input area frame col param2/img是inline还是block元素, inline不能设置宽和高,但img可以 block要单独一行,但img又不是。另外img可以设置宽和高,可以设置margin值。而img自身带有一定的margin值,所以其与下方...
分类:
Web程序 时间:
2014-07-27 22:45:59
阅读次数:
297
Problem Description输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下:90~100为A;80~89为B;70~79为C;60~69为D;0~59为E;Input输入数据有多组,每组占一行,由一个整数组成。Output对于每组输入数据,输出一行。如果输入数据不在0~10...
分类:
其他好文 时间:
2014-07-27 22:36:09
阅读次数:
176