![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
还需思考
文章平均质量分 81
_OTTFF
这个作者很懒,什么都没留下…
展开
-
CSU_1660_K-Cycle
1660: K-CycleTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 124 Solved: 31[Submit][Status][Web Board]DescriptionA simple cycle is a closed simple path, with no other repeated vertic原创 2015-08-09 17:34:49 · 508 阅读 · 0 评论 -
POJ_3104_Drying
二分查找的问题题意为n衣服有a滴水,烘干每分钟为k滴 不烘干为每分钟1滴问衣服干的最短时间。注意一个是这个题最后求得是整数分钟,因此过程中要用ceil来向上取整求衣服烘所需要的时间另外问题要用long long 不然会wa#include #include #include using namespace std;typedef long long LL;co原创 2015-07-23 14:17:01 · 279 阅读 · 0 评论 -
SGU_495_KidsAndPrizes
这个问题不是很难想虽然是期望dp,但是这个问题感觉当做概率dp做更容易首先求每个盒子的东西被拿走了,那概率很难求但是反过来,求每个盒子东西没有被拿走的概率就很容易因为每个盒子都是1,因此拿走的期望也就是这些概率的和第二种想法就是逐个的推概率第一次一定可以拿走东西dp[1]=1;之后就分两种情况,又拿走了一个,和没有拿走没有拿走的话,概率同上一个人,拿走了的话原创 2015-08-04 23:06:12 · 309 阅读 · 0 评论 -
HDU_4004_TheFrog'sGames
二分搜索,在二分搜索调用的函数上花了很多时间#include #include #include #include using namespace std;const int M=500005;int st[M];bool isj(int mi,int n,int m) //能不能跳过去{ int p=0,i=1; int co=0;原创 2015-07-25 17:06:53 · 309 阅读 · 0 评论 -
UVA_11258_StringPartition
String PartitionDescriptionJohn was absurdly busy for preparing a programming contest recently. He wanted to create a ridiculously easy problem for the contest. His problem was not only easy, but原创 2015-08-06 23:36:38 · 336 阅读 · 0 评论 -
CF_229D_Towers
D. Towerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe city of D consists of n towers, built consecutively on原创 2015-08-06 23:43:29 · 486 阅读 · 0 评论 -
LA_6439_PastiPas!
Regionals 2013 >> Asia - Jakarta6439 - Pasti Pas!Time limit: 2.000 secondsPertamina is an Indonesian government-owned oil and gas corporation based on Jakarta. It has by farthe largest原创 2015-08-24 15:51:21 · 455 阅读 · 0 评论 -
CF_6D_LizardsAndBasements_2
D. Lizards and Basements 2time limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThis is simplified version of the原创 2016-03-30 21:00:27 · 647 阅读 · 0 评论 -
LA_3026_HDU_1358_Period
这个题目问一个串的所有可能的重复单元长度及重复的次数枚举串匹配好像并不能过这个题目的数据这个题目其实要对KMP的next数组有一定的理解123123123这样的串会在next数组形成怎样的形式其实是解决这个题目的关键#include #include using namespace std;const int MN=1e6+5;char s1[MN];int原创 2016-02-21 22:02:48 · 401 阅读 · 0 评论 -
POJ_3258_RiverHopscotch
这个问题最开始没看出是二分的问题。启发就是很多需要搜索答案的问题可能是用二分的方法来求解。答案所求就是二分的量。拿掉石子时优先从一侧挨着拿直到符合条件。#include #include #include using namespace std;const int M=50005;int d[M];int ns(int k,int n){ int co原创 2015-07-23 11:06:54 · 318 阅读 · 0 评论 -
CSU_1078_“最长公共子序列”
1078: “最长公共子序列”Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 304 Solved: 61[Submit][Status][Web Board]Description 现有N个整数序列,每个序列均包含有M个不同的非负整数,你能求出这个N个序列的最长公共子序列一共包含多少个整数吗?(最长公原创 2015-08-02 17:22:27 · 893 阅读 · 0 评论 -
CSU_1120_病毒
1120: 病毒Time Limit: 3 Sec Memory Limit: 128 MBSubmit: 671 Solved: 274[Submit][Status][Web Board]Description你有一个日志文件,里面记录着各种系统事件的详细信息。自然的,事件的时间戳按照严格递增顺序排列(不会有两个事件在完全相同的时刻发生)。遗憾的是,你的原创 2015-08-02 17:10:25 · 524 阅读 · 0 评论 -
HDU_5384_Danganronpa
DanganronpaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 745 Accepted Submission(s): 403Problem DescriptionDanganronpa is原创 2015-08-24 15:59:23 · 389 阅读 · 0 评论 -
UVA_10271_Chopsticks
10271 - ChopsticksTime limit: 3.000 secondsIn China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit different. He usesa set of three chopsticks { one pair, plus an原创 2015-08-24 16:28:50 · 385 阅读 · 0 评论 -
POJ_1426_FindTheMultiple
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 21478 Accepted: 8797 Special JudgeDescriptionGiven a positive integer n, write a pr原创 2015-07-29 08:44:26 · 332 阅读 · 0 评论 -
POJ_1470_ClosestCommonAncestors
Closest Common AncestorsTime Limit: 2000MS Memory Limit: 10000KTotal Submissions: 17232 Accepted: 5525DescriptionWrite a program that takes as input a rooted tree a原创 2015-08-10 00:25:34 · 380 阅读 · 0 评论 -
POJ_2752_SeekTheName,SeekTheFame
Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14394 Accepted: 7186DescriptionThe little cat is so famous, that many coup原创 2015-08-24 16:14:00 · 355 阅读 · 0 评论 -
HDU_1829_ABug'sLife
A Bug's LifeTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11844 Accepted Submission(s): 3859Problem DescriptionBackground原创 2015-08-11 11:13:41 · 520 阅读 · 0 评论 -
POJ_1182_食物链
食物链Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 53514 Accepted: 15677Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动原创 2015-08-11 16:14:27 · 330 阅读 · 0 评论 -
LightOJ_1422_HalloweenCostumes
Halloween CostumesTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1422DescriptionGappu has a very busy weekend ahead of him.原创 2015-08-02 16:40:49 · 525 阅读 · 0 评论 -
HDU_3335_Divisibility(DancingLinksX重复覆盖||dfs||暴力)
题意给一个数组让从中选出尽可能多的数字,他们之间两两不存在整除关系这题目貌似正经做法应该是最小路径覆盖但是这题DancingLinksX甚至DFS甚至直接for循环暴力都可以过……原创 2016-05-02 20:26:36 · 795 阅读 · 0 评论