摘要:
0 1 背包问题:给定 n 种物品和一个容量为 C 的背包,物品 i 的重量是 wi,其价值为 vi 。 问:应该如何选择装入背包的物品,使得装入背包中的物品的总价值最大? 分析一波,面对每个物品,我们只有选择拿取或者不拿两种选择,不能选择装入某物品的一部分,也不能装入同一物品多次。 解决办法:声明 阅读全文
摘要:
速算24点 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7037 Accepted Submission(s): 1857 Problem D 阅读全文
摘要:
You are given a line of nn colored squares in a row, numbered from 11 to nn from left to right. The ii-th square initially has the color cici. Let's s 阅读全文
摘要:
题意翻译 给定一个 2×n 的矩阵,现从中选择若干数,且任意两个数不上下或左右相邻,求这些数的和最大是多少? 题目描述 Finally, a basketball court has been opened in SIS, so Demid has decided to hold a basketb 阅读全文
摘要:
You are given a picture consisting of nn rows and mm columns. Rows are numbered from 11 to nn from the top to the bottom, columns are numbered from 11 阅读全文
摘要:
You are given three strings ss, tt and pp consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strin 阅读全文
摘要:
用贪心判断当前个数是否成立, 然后二分查找搜答案 阅读全文
摘要:
World CupInput file: Standard InputOutput file: Standard OuptutTime limit: 1 second Here is World Cup again, the top 32 teams come together to fight f 阅读全文
摘要:
Problem A. Number Theory ProblemTime limit: 1 second Mr. Panda is one of the top specialists on number theory all over the world.Now Mr. Panda is inve 阅读全文
摘要:
畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 80850 Accepted Submission(s): 42813 Problem 阅读全文