参考《挑战程序设计竞赛》p51 01背包问题 问题描述:有n个重量和价值分别为wi、vi的物品,从这些物品中挑选出总重量不超过W的物品,求所有挑选方案中价值总和的最大值。 input: 45 2 3 1 2 3 4 2 2 output: 7(选择第0、1、 3号物品) 朴素解法: c++版: Ja ...
分类:
其他好文 时间:
2019-02-13 12:29:20
阅读次数:
187
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: Output ...
分类:
其他好文 时间:
2019-02-11 12:26:57
阅读次数:
172
Archlinux安装总结 一、引导 1、BIOS与UEFI 出现“No such file or directory”表明为BIOS引导。 BIOS是英文"Basic Input Output System"缩写,它是一组固化到计算机内主板上一个ROM芯片上的程序,它保存着计算机最重要的基本输入输 ...
分类:
系统相关 时间:
2019-02-11 01:11:16
阅读次数:
235
E. Magic Stones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Magic Stones time limi ...
分类:
其他好文 时间:
2019-02-09 13:26:35
阅读次数:
247
C. Ayoub and Lost Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Ayoub and Lost ...
分类:
其他好文 时间:
2019-02-09 12:08:55
阅读次数:
176
B. Tape time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Tape time limit per test 1 sec ...
分类:
其他好文 时间:
2019-02-08 23:19:01
阅读次数:
189
Your task is to Calculate a + b. Input Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers pe ...
分类:
其他好文 时间:
2019-02-08 15:54:37
阅读次数:
230
E. Magic Stones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Magic Stones time limi ...
分类:
其他好文 时间:
2019-02-08 15:49:51
阅读次数:
217
B. Fox And Two Dots time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Fox And Two Dots ...
分类:
其他好文 时间:
2019-02-05 23:52:55
阅读次数:
175
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Input: 2 Output: 91 Explanation: The answer shoul ...
分类:
其他好文 时间:
2019-02-05 23:49:45
阅读次数:
219