- 博客(46)
- 收藏
- 关注
原创 hdoj-【2955 Robberies】
RobberiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21817 Accepted Submission(s): 8063Problem DescriptionThe aspiring Ro
2016-12-29 13:53:21 284
原创 hdoj-【1864 最大报销额】
最大报销额Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23321 Accepted Submission(s): 7083Problem Description现有一笔经费可以报销一定额度的发票。允
2016-12-27 15:31:46 384
原创 hdoj-【 2639 Bone Collector II 】
Bone Collector IITime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4401 Accepted Submission(s): 2286Problem DescriptionThe titl
2016-12-23 12:42:46 287
原创 BC-【Kblack loves flag】
Kblack loves flag Accepts: 422 Submissions: 765 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述kblack喜欢旗帜(flag),他的口袋里有无穷无尽的旗帜。某天,kbl
2016-12-18 12:39:14 435
原创 hdoj-【1171 Big Event in HDU】
Big Event in HDUTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 37766 Accepted Submission(s): 13094Problem DescriptionNowada
2016-12-17 17:28:42 289
原创 hdoj-【2546 饭卡】
饭卡Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 24855 Accepted Submission(s): 8704Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即
2016-12-16 14:27:52 770
原创 完全背包详解
完全背包1、 先知道完全背包和01背包的区别,01背包n个物品,每一个物品有1个,而完全背包每一件物品有无数个,只要求求出在不大于W的情况下求出最大的值2、 那么还是先看一下代码,你比较一下01背包的代码,就会发现只有一个地方不同,看代码:int i,j;for(i=1;i<=n;++i){ for(j=0;j<=W;++j) { if(j<w[i]) dp
2016-12-15 14:08:15 599
原创 01背包状态压缩和记录路径
01背包的状态压缩 当然肯定是看了别人的博客,我再重复一下,大神链接:点击打开链接1、 在看之前希望你已经弄懂了空间复杂度在O(n*w)的算法,空间的压缩到O(w)的状态,其实本质还是一样的,就是从i-1的状态去求解i的状态,在这先看代码:for(int i=1;i<=n;++i){ for(int j=w;j>=c[i];--j) dp[j]=get
2016-12-14 22:55:44 3345 3
原创 01背包详解
01背包看了2天的01背包,感觉现在真的是懂了,记录一下,这样才能记得更加深刻,其实早就接触过01背包,当时一知半解的,今天看了书本和别人的博客,真的很有用:1、 描述一下01背包问题有n个重量和价值分别为wi,vi,的物品,从这些物品中挑选出总重量不超过W的物品,求所有的挑选方案中价值总和的最大值。(这里需要注意的问题每一件物品只有一件)。2、 其实对于每一个物品我们有
2016-12-14 13:11:20 1891
原创 hdoj-【2124 Repair the Wall】
Repair the WallTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3820 Accepted Submission(s): 1909Problem DescriptionLong time
2016-12-13 17:07:52 364
原创 zoj-【2857 Image Transformation 】
Image TransformationTime Limit: 2 Seconds Memory Limit: 65536 KBThe image stored on a computer can be represented as a matrix of pixels. In the RGB (Red-Green-Blue) color system, a pixel
2016-12-13 16:35:49 575
原创 zoj-【2850 】
Beautiful MeadowTom has a meadow in his garden. He divides it into N * M squares. Initially all the squares were covered with grass. He mowed down the grass on some of the squares and thinks the m
2016-12-13 14:36:23 607
原创 hrboj-【2317 Game】
GameTime Limit: 1000 MSMemory Limit: 100000 KTotal Submit: 72(21 users)Total Accepted: 24(15 users)Rating: Special Judge: NoDescriptionKim is
2016-12-12 13:09:00 725
原创 cf-【Young Table 】
Young Table You've got table a, consisting of n rows, numbered from 1 to n. The i-th line of table a contains ci cells, at that for all i (1 i ≤ n) holds ci ≤ ci - 1.Let's denote s as th
2016-12-11 17:39:34 436
原创 cf-【Queue 】
In the Main Berland Bank n people stand in a queue at the cashier, everyone knows his/her height hi, and the heights of the other people in the queue. Each of them keeps in mind number ai — how many
2016-12-11 11:00:09 638
原创 递归算法实现字符串的逆序存储
#includechar s[1000];int i;void rever(){ char ch; i=0; scanf("%c",&ch); if(ch=='.')// . 代表输出结束 return ; else { rever(); s[i++]=ch; } s[i]='\0'; } int main(){ rever(); prin
2016-12-10 22:58:06 4221
原创 hdoj-【2527 Safe Or Unsafe】
Safe Or UnsafeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2394 Accepted Submission(s): 989Problem DescriptionJavac++ 一天在看
2016-12-10 22:38:35 395
原创 .Coin
A.CoinTime Limit: 1000 MSMemory Limit: 100000 KTotal Submit: 966 (579 users)Total Accepted: 622 (573 users)Special Judge: NoDescriptionKim 有一枚硬币
2016-12-10 16:37:26 398
原创 ID
C.IDTime Limit: 1000 MSMemory Limit: 1000000 KTotal Submit: 1421 (405 users)Total Accepted: 264 (247 users)Special Judge: NoDescriptionIt is ver
2016-12-10 16:35:06 306
原创 J.Emirp
J.EmirpTime Limit: 5000 MSMemory Limit: 100000 KTotal Submit: 1195 (392 users)Total Accepted: 275 (264 users)Special Judge: NoDescriptionAn emir
2016-12-10 16:33:21 395
原创 Codeforces -【246C Beauty Pageant】
C. Beauty Pageanttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGeneral Payne has a battalion of n soldie
2016-12-10 16:25:44 437
原创 nyoj-【113 字符串替换】
字符串替换时间限制:3000 ms | 内存限制:65535 KB难度:2描述编写一个程序实现将字符串中的所有"you"替换成"we"输入输入包含多行数据 每行数据是一个字符串,长度不超过1000 数据以EOF结束输出对于输入的每一行,输出替换后的字符串样例输入you are what you do样例输出we
2016-12-09 15:49:37 451
原创 poj-【3617 Best Cow Line】
Best Cow LineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 21138 Accepted: 5776DescriptionFJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual
2016-12-08 22:19:53 306
原创 poj-【2386 Lake Counting】
Lake CountingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31206 Accepted: 15583DescriptionDue to recent rains, water has pooled in various places in
2016-12-07 23:40:01 297
原创 Increase and Decrease
Polycarpus has an array, consisting of n integers a1, a2, ..., an. Polycarpus likes it when numbers in an array match. That's why he wants the array to have as many equal numbers as possible. For th
2016-12-07 22:43:04 642
原创 cf-【Hopscotch】
B. Hopscotchtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSo nearly half of the winter is over and Maria
2016-12-07 17:09:30 330
原创 51nod-【1639 1639 绑鞋带】
1639 绑鞋带基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注有n根鞋带混在一起,现在重复n次以下操作:随机抽出两个鞋带头,把它们绑在一起。可以想象,这n次之后將不再有单独的鞋带头,n条鞋带系成了一些环。那么有多大概率刚好所有这些鞋带只形成了一个环?Input仅一行,
2016-12-07 14:41:24 663
原创 hdoj--【2045 不容易系列之(3)—— LELE的RPG难题】
不容易系列之(3)—— LELE的RPG难题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 48714 Accepted Submission(s): 19470Problem Description人
2016-12-06 20:14:53 335
原创 hdoj-【2049 不容易系列之(4)——考新郎】
不容易系列之(4)——考新郎Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34292 Accepted Submission(s): 12534Problem Description国庆期间,省城HZ
2016-12-06 13:45:27 529
原创 hdoj-【2081 母牛的故事】
母牛的故事Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 75832 Accepted Submission(s): 37629Problem Description有一头母牛,它每年年初生一头小母牛。
2016-12-05 20:26:54 520
原创 hdoj-【1465 不容易系列之一】
不容易系列之一Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20118 Accepted Submission(s): 8532Problem Description大家常常感慨,要做好一件事情真的不
2016-12-05 20:00:24 265
原创 错排
错排我认为它的根本还是容斥定理;(容斥定理还在学习中,以后会发篇博客)错排:给出1,2,3,4,个位置和a,b,c,d,四个字母,a不能放在1的位置,b不能放在2的位置……问一共有多少种组合方式:我讲解的是一个递推的过程;D(n)代表n的位置错排的方案数;这里我们首先放a,a有3个位置可以放;假如a放在了2的位置,那么b放的位置有2种;1、放在1的位置,那么接下来的
2016-12-05 19:58:34 300
原创 hdoj-【2050 折线分割平面】
折线分割平面Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27598 Accepted Submission(s): 18752Problem Description我们看到过很多直线分割平面的题目,
2016-12-05 13:03:57 328
原创 hdoj-【1021 Fibonacci Again】
Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56345 Accepted Submission(s): 26411Problem DescriptionThere ar
2016-12-05 12:44:09 341
原创 hdoj-【1061 Rightmost Digit】
Rightmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51729 Accepted Submission(s): 19570Problem DescriptionGiven a
2016-12-04 19:06:09 259
原创 hdoj-【5597 GTW likes function】
GTW likes functionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 479 Accepted Submission(s): 266Problem DescriptionNow you
2016-12-04 18:47:00 331
原创 hdoj-【2588 GCD】
GCDTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1895 Accepted Submission(s): 949Problem DescriptionThe greatest common div
2016-12-04 00:28:33 286
原创 hdoj-【2824 The Euler function】
The Euler functionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5923 Accepted Submission(s): 2501Problem DescriptionThe Eul
2016-12-03 18:02:32 725
原创 hdoj-【1286 找新朋友】
找新朋友Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11812 Accepted Submission(s): 6307Problem Description新年快到了,“猪头帮协会”准备搞一个聚会
2016-12-03 15:22:22 309
原创 hdoj-【3501 Calculation 2】
Calculation 2Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3791 Accepted Submission(s): 1587Problem DescriptionGiven a posi
2016-12-03 15:11:57 307
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人