- 博客(1083)
- 资源 (1)
- 收藏
- 关注
原创 Coderforce 626C Block Towers(脑洞啊)
C. Block Towerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputStudents in a class are making towers of bl
2016-02-14 23:17:58
1288
原创 Codeforce 题目621C Wet Shark and Flowers(期望)
C. Wet Shark and Flowerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n sharks who grow flower
2016-02-01 02:43:29
1091
原创 NOJ 题目1643 阶乘除法(暴力)
[1643] 阶乘除法时间限制: 5000 ms 内存限制: 65535 K问题描述输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 1*2*3*...*n (n>=1)。 比如,若 n=6, m=3,则n!/m!=6!/3!=720/6=120。是不是很简单?现在让我们把问题反过来:输入 k=n!/m!,找到这样的整数二元
2016-01-25 20:18:37
1825
原创 NOJ 题目1645 聊天止于呵呵(模拟)
[1645] 聊天止于呵呵时间限制: 5000 ms 内存限制: 65535 K问题描述(现代版)俗话说:流言止于智者,聊天止于呵呵。输入一段聊天记录,你的任务是数一数有多少段对话“止于呵呵”,即对话的最后一句话包含单词 hehe 或者它的变形。具体来说,我们首先提取出对话的最后一句话,把所有非字母的字符替换成空格,把所有字符 替换成
2016-01-25 20:14:32
1489
原创 NOJ 题目1642 简单的图论问题?(BFS)
[1642] 简单的图论问题?时间限制: 5000 ms 内存限制: 65535 K问题描述给一个 n 行 m 列的迷宫,每个格子要么是障碍物要么是空地。每个空地里都有一个权值。你的 任务是从找一条(r1,c1)到(r2,c2)的路径,使得经过的空地的权值之和最小。每一步可以往上下 左右四个方向之一移动一格,但不能斜着移动,也不能
2016-01-25 20:11:05
1214
原创 蓝桥杯 算法训练 最大的算式(DP)
算法训练 最大的算式 时间限制:1.0s 内存限制:256.0MB 问题描述 题目很简单,给出N个数字,不改变它们的相对位置,在中间加入K个乘号和N-K-1个加号,(括号随便加)使最终结果尽量大。因为乘号和加号一共就是N-1个了,所以恰好每两个相邻数字之间都有一个符号。例如: N=5,K=2,5个数字分别为1、2、3、4、5,可以加成:
2016-01-21 21:55:04
1045
原创 Codeforce 题目614AA. Link/Cut Tree(水题,坑精度啊)
A. Link/Cut Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProgrammer Rostislav got seriously interes
2016-01-15 16:07:49
1056
原创 Codeforce 题目612 D The Union of k-Segments(暴力,排序,技巧)
D. The Union of k-Segmentstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n segments on the
2016-01-10 01:38:53
767
原创 Codeforce 题目337 C. Harmony Analysis(递归)
C. Harmony Analysistime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe semester is already ending, so Dani
2016-01-08 15:21:35
621
原创 UVA 题目10288 Coupons(期望)
Coupons in cereal boxes are numbered 1 to n, and a set of one of each is required for a prize (a cerealbox, of course). With one coupon per box, how many boxes on average are required to make a comp
2016-01-07 22:19:55
542
原创 POJ 题目2992 Divisors(组合数因子个数)
DivisorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11001 Accepted: 3259DescriptionYour task in this problem is to determine the number of divisors
2016-01-06 20:13:04
575
原创 POJ 题目2991 Crane(线段树+计算几何)
CraneTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 4757 Accepted: 1287 Special JudgeDescriptionACM has bought a new crane (crane -- jeřáb) . The c
2016-01-06 17:52:57
559
原创 HDOJ 题目5067 Harry And Dig Machine(状压dp,TSP)
Harry And Dig MachineTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 806 Accepted Submission(s): 315Problem Description As w
2015-12-31 10:34:58
810
原创 Codeforce 题目479E Riding in a Lift(DP)
E. Riding in a Lifttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputImagine that you are in a building that
2015-12-30 21:00:06
578
原创 FZUoj 题目2216 The Longest Straight*(二分)
Problem 2216 The Longest StraightAccept: 22 Submit: 44Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionZB is playing a card game where the goal is to make straigh
2015-12-29 20:35:22
682
原创 蓝桥杯 算法提高 概率计算 (概率DP)
算法提高 概率计算 时间限制:1.0s 内存限制:256.0MB 问题描述 生成n个∈[a,b]的随机整数,输出它们的和为x的概率。输入格式 一行输入四个整数依次为n,a,b,x,用空格分隔。输出格式 输出一行包含一个小数位和为x的概率,小数点后保留四位小数样例输入2 1 3 4样例输
2015-12-24 22:28:34
1343
原创 Codeforce 题目118D. Caesar's Legions(DP背包)
D. Caesar's Legionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGaius Julius Caesar, a famous general,
2015-12-23 22:34:38
728
原创 UVA 题目11089 Fi-binary Number(找规律)
A Fi-binary number is a number that contains only 0 and 1. It does not contain any leading 0. Andalso it does not contain 2 consecutive 1. The first few such number are 1, 10, 100, 101, 1000, 1001,
2015-12-20 21:46:19
875
原创 POJ题目3258 River Hopscotch(二分最小值最大化)
River HopscotchTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 9866 Accepted: 4214DescriptionEvery year the cows hold an event featuring a peculiar vers
2015-12-20 17:47:48
418
原创 POJ 题目3045 Cow Acrobats(贪心)
Cow AcrobatsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3687 Accepted: 1429DescriptionFarmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are pl
2015-12-20 16:59:01
743
原创 POJ 题目3009 Curling 2.0(DFS)
Curling 2.0Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15536 Accepted: 6421DescriptionOn Planet MM-21, after their Olympic games this year, curling
2015-12-20 16:34:12
337
原创 Codeforce 题目264B Good Sequences(DP,相邻两数不互质的LIS)
B. Good Sequencestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSquirrel Liss is interested in sequences.
2015-12-19 20:11:23
685
原创 ZOJ 题目3911 Prime Query(线段树求区间素数个数)
Prime QueryTime Limit: 1 Second Memory Limit: 196608 KBYou are given a simple task. Given a sequence A[i] with N numbers. You have to perform Q operations on the given sequence.Here are
2015-12-18 16:50:36
456
原创 Codeforce 467C. George and Job(DP)
C. George and Jobtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe new ITone 6 has been released recently
2015-12-18 16:35:01
498
原创 UVA 10721 Bar Codes(DP,整数拆分)
A bar-code symbol consists of alternating dark and light bars, startingwith a dark bar on the left. Each bar is a number of units wide.Figure 1 shows a bar-code symbol consisting of 4 bars that ex
2015-12-18 09:34:01
708
原创 UVA 题目10943 How do you add?(DP,整数拆分)
Larry is very bad at math — he usually uses a calculator, whichworked well throughout college. Unforunately, he is now struck ina deserted island with his good buddy Ryan after a snowboardingacc
2015-12-18 09:30:26
774
原创 UVA 题目10910 Marks Distribution(组合数学)
In an examination one student appeared in N subjects and has got total T marks. He has passed inall the N subjects where minimum mark for passing in each subject is P. You have to calculate thenum
2015-12-18 09:25:56
359
原创 HDOJ 题目2266 How Many Equations Can You Find(DFS水)
How Many Equations Can You FindTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 734 Accepted Submission(s): 482Problem Description
2015-12-17 11:14:47
450
原创 HDOJ 题目4553 约会安排(线段树分等级覆盖)
M - 约会安排Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription 寒假来了,又到了小明和女神们约会的季节。 小明虽为�丝级码农,但非常活跃,女神们常常在小明网上的大段发言后热情回复“呵呵”,所以,小
2015-12-10 18:08:44
710
原创 HDOJ 题目4296 Buildings(贪心)
BuildingsTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3006 Accepted Submission(s): 1141Problem Description Have you ever hear
2015-12-09 12:00:32
519
原创 zzulioj 题目1813: good string(水题,要严谨啊)
1813: good stringTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 83 Solved: 13SubmitStatusWeb BoardDescription给定一个字符串,判断它是否是good string。good string定义为:① 字符s是good string,字符p是good st
2015-12-08 21:59:16
890
原创 zzulioj 题目1808: 小d的翻转游戏(水题,,想法)
1808: 小d的翻转游戏Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 69 Solved: 14SubmitStatusWeb BoardDescription小d同学最近在玩翻转棋的游戏,这个棋类游戏的棋子是黑白两面的,他玩这个游戏已经玩了很久了,他觉得没有什么新意了,所以他打算换一种玩法。首先他把这些黑色和白色
2015-12-08 21:47:33
699
原创 FZU Problem 2136 取糖果(线段树离散化,区间合并)
Problem 2136 取糖果Accept: 175 Submit: 499Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description有N个袋子放成一排,每个袋子里有一定数量的糖果,lzs会随机选择连续的几个袋子,然后拿走这些袋子中包含最多糖果的袋子。现问你,在选择x个袋子的情况下
2015-12-07 16:23:26
483
原创 HDOJ 题目1619 Unidirectional TSP(DP输出路径啊)
Unidirectional TSPTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 427 Accepted Submission(s): 212Problem DescriptionProblems
2015-12-06 20:26:52
493
原创 UVA 题目624 CD(01背包输出路径啊)
You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N minutes long. How
2015-12-06 20:18:26
514
原创 FZUOJ Problem 2188 过河I(BFS啊)
Problem 2188 过河IAccept: 103 Submit: 258Time Limit: 3000 mSec Memory Limit : 32768 KB Problem Description一天,小明需要把x只羊和y只狼运输到河对面。船可以容纳n只动物和小明。每次小明划船时,都必须至少有一只动物来陪他,不然他会感到厌倦,不安。不论是船上还是
2015-12-06 17:22:09
620
原创 LightOJ 题目1079 Just another Robbery(01背包)
1079 - Just another RobberyPDF (English)StatisticsForumTime Limit: 4 second(s)Memory Limit: 32 MBAs Harry Potter series is over, Harry has no job. Since
2015-12-05 21:51:36
577
原创 Coderforce 444cDZY Loves Colors(线段树)
C. DZY Loves Colorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves colors, and he enjoys paintin
2015-12-04 22:23:49
401
原创 UVA 题目11258 - String Partition(DP)
John was absurdly busy for preparing a programming contest recently. He wanted to create a ridiculouslyeasy problem for the contest. His problem was not only easy, but also boring: Given a list of
2015-12-03 22:20:49
673
原创 NEUQOJ 题目1490 田鼠 pk 船长(博弈找规律)
1490: 田鼠 pk 船长时间限制: 1 Sec 内存限制: 128 MB提交: 74 解决: 14[提交][状态][讨论版]题目描述船长和田鼠最近在玩一个取石子的游戏,石子共有 n 堆,每堆石子数不超过10^9,两人轮流取石子,每次船长先取,取得石子数只能是质数或一,而且只能取完一堆后才能取下一堆,下一次取得堆编号必须比上一个小,无法再取的人将会输掉比赛
2015-12-01 21:12:08
827
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人