Codeforces Round #363 (Div. 2)E. LRU
摘要:E. LRU time limit per test 2 seconds time limit per test memory limit per test 256 megabytes memory limit per test input standard input input output s
阅读全文
posted @
2016-07-26 10:56
Beserious
阅读(309)
推荐(0) 编辑
Codeforces Round #362 (Div. 2) D. Puzzles
摘要:D. Puzzles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Puzzles time limit per test
阅读全文
posted @
2016-07-24 20:59
Beserious
阅读(303)
推荐(0) 编辑
Codeforces Round #363 (Div. 2) C. Vacations
摘要:C. Vacations time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input out
阅读全文
posted @
2016-07-22 21:27
Beserious
阅读(226)
推荐(0) 编辑
Lightoj 1030 - Discovering Gold
摘要:题目大意:一个人走n个格子到终点。通过骰子确定每次走几步。每个格子上有黄金,问最后得到黄金数量的期望。 假设dp[i]为到第i个格子的概率。 a[i]为第i个格子的黄金数量。 那么期望就是 Σa[i]*dp[i] 重点是怎么求概率。 拿样例举例。 3 3 6 9 dp[1]=1;没毛病 dp[2]=
阅读全文
posted @
2016-07-10 21:02
Beserious
阅读(311)
推荐(0) 编辑
Lightoj 1018 - Brush (IV)
摘要:1018 - Brush (IV) PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Mubashwir returned home from the contest and got angry af
阅读全文
posted @
2016-06-22 21:40
Beserious
阅读(298)
推荐(0) 编辑
Lightoj 1017 - Brush (III)
摘要:1017 - Brush (III) PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Samir returned home from the contest and got angry after
阅读全文
posted @
2016-06-20 21:27
Beserious
阅读(241)
推荐(0) 编辑
Lightoj 1011 - Marriage Ceremonies
摘要:You work in a company which organizes marriages. Marriages are not that easy to be made, so, the job is quite hard for you. The job gets more difficul
阅读全文
posted @
2016-06-15 07:38
Beserious
阅读(442)
推荐(0) 编辑
HDU 2512 一卡通大冒险(dp)
摘要:一卡通大冒险 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2137 Accepted Submission(s): 1430 Problem
阅读全文
posted @
2016-06-12 21:27
Beserious
阅读(251)
推荐(0) 编辑
Lightoj 1006 Hex-a-bonacci
摘要:Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows: int a, b, c, d, e,
阅读全文
posted @
2016-06-10 11:05
Beserious
阅读(311)
推荐(0) 编辑
Lightoj 1005 Rooks(DP)
摘要:A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its curre
阅读全文
posted @
2016-06-09 16:18
Beserious
阅读(440)
推荐(0) 编辑
Lightoj 1004 - Monkey Banana Problem
摘要:1004 - Monkey Banana Problem PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are in the world of mathematics to solve t
阅读全文
posted @
2016-06-08 11:17
Beserious
阅读(597)
推荐(0) 编辑
Lightoj 1422 - Halloween Costumes
摘要:1422 - Halloween Costumes PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Gappu has a very busy weekend ahead of him. Becau
阅读全文
posted @
2016-05-30 11:50
Beserious
阅读(445)
推荐(0) 编辑
codevs 1048 石子归并
摘要:题目描述 Description 有n堆石子排成一列,每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子,一次合并的代价为两堆石子的重量和w[i]+w[i+1]。问安排怎样的合并顺序,能够使得总合并代价达到最小。 题目描述 Description 有n堆石子排成一列,每堆石子有一个重量w[
阅读全文
posted @
2016-05-30 11:17
Beserious
阅读(196)
推荐(0) 编辑
123. Best Time to Buy and Sell Stock III
摘要:Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple
阅读全文
posted @
2016-05-25 10:45
Beserious
阅读(126)
推荐(0) 编辑
139. Word Break
摘要:Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For
阅读全文
posted @
2016-04-05 18:25
Beserious
阅读(241)
推荐(0) 编辑
HDU 5651xiaoxin juju needs help
摘要:xiaoxin juju needs help Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1310 Accepted Submission(
阅读全文
posted @
2016-03-30 20:40
Beserious
阅读(276)
推荐(0) 编辑
#1241 : Best Route in a Grid
摘要:时间限制:10000ms 单点时限:1000ms 内存限制:256MB 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个N行N列的非负整数方阵,从左上角(1,1)出发,只能向下或向右走,且不能到达值为0的方格,求出一条到达右下角的最佳路径。所谓最佳路径是指途经的
阅读全文
posted @
2016-03-25 20:21
Beserious
阅读(209)
推荐(0) 编辑
POJ 1159 Palindrome
摘要:PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:56756Accepted:19631DescriptionA palindrome is a symmetrical string, that is, a string ...
阅读全文
posted @
2015-08-27 14:06
Beserious
阅读(175)
推荐(0) 编辑
LIS n^2&nlogn模板
摘要:LIS nlogn模板http://acm.hdu.edu.cn/showproblem.php?pid=1950#include #include #include #include #include #include #define maxn 40000+10using namespace st...
阅读全文
posted @
2015-08-26 20:45
Beserious
阅读(241)
推荐(0) 编辑