- 博客(16)
- 收藏
- 关注
原创 poj 3320 A - Jessica's Reading Problem
前几天才了解的一个小技巧取尺法,然后就找了一部分题练习一下,这里我按自己的理解总结一下取尺法(如果有错误或者蹩脚的地方欢迎找茬)取尺法主要解决在一串数或字符中求能满足一定条件的最短的长度,首先从串头开始找到第一个满足所给条件的子串,然后让左端点逐渐向右移动,在搜索的过程中能找到所有满足条件的情况并找到最小值就可以了,注意要正确找到循环跳出的条件DescriptionJe
2016-09-28 20:30:26 285
原创 cf--B - Anatoly and Cockroaches
Anatoly lives in the university dorm as many other students do. As you know, cockroaches are also living there together with students. Cockroaches might be of two colors: black and red. There are n co
2016-09-28 10:32:48 444
原创 hdu--1863畅通工程2(典型的最小生成树)prim算法
畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 26507 Accepted Submission(s): 11583Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间
2016-09-26 10:58:26 462
原创 poj 1258 Sum It Up(典型最小生成树)
DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John or
2016-09-23 13:26:43 321
原创 汇编小结 3.3 8086的指令系统
一:数据传递指令1.通用数据传递(1)mov DST SRC(DST目的操作数,SRC源操作数)mov可传递的类型有:寄存器与内存,常数给内存。。举例:mov al 6mov ax 5A98Hmov ax 0BCD9H(B>9所以前边加一个前导0,不占位置只供识别)mov bx cxmov ax sImov AH cI当时这些类型时前后操
2016-09-22 23:23:55 324
原创 B - Little Pony and Sort by Shift
Submit Status Practice CodeForces 454BDescriptionOne day, Twilight Sparkle is interested in how to sort a sequence of integers a1, a2, ..., an in non-decreasing order. Being a youn
2016-09-22 23:04:08 368
原创 C - Little Pony and Expected Maximum
C - Little Pony and Expected MaximumTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 454CDescriptionTwilight Spark
2016-09-22 22:56:13 361
原创 hdu--1233(最小生成树)
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40974 Accepted Submission(s): 18685Problem Description某省调查乡村交通状况,得到的统计表中列出了
2016-09-22 14:57:16 288
原创 cf--E. The Values You Can Make(dp)
Today Pari and Arya are playing a game called Remainders.Pari chooses two positive integer x and k, and tells Arya k but not x. Arya have to find the value . There are n ancient numbersc1, c2, .
2016-09-21 19:51:56 255
原创 cf----D - Remainders Game(中国剩余定理)
Today Pari and Arya are playing a game called Remainders.Pari chooses two positive integer x and k, and tells Arya k but not x. Arya have to find the value . There are n ancient numbersc1, c2, .
2016-09-20 20:12:43 320
原创 01分数规划问题,poj2976
最近遇到了一类问题在翻阅大神博客后方知是01分数规划问题感谢大神博客:http://blog.csdn.net/hhaile/article/details/8883652解题思路:将公式化简F(L)=sigma(a[i]*x[i])-L*sigma(b[i]*x[i]),当确定一个L时,如果还有符合条件的L并且比原来的大,此时f》0,由于结果是1--100之内的数,所以最多需要找100次
2016-09-18 19:00:54 272
原创 hdu--5878(hdu 5878 I Count Two Three (2016 ACM/ICPC Asia Regional Qingdao Online 1001))
题目大意:一种数=2^a*3^b*5^c*7^d
2016-09-18 13:59:13 362
原创 青岛亚洲赛网络赛--1005(超级水)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5882Problem DescriptionRock-paper-scissors is a zero-sum hand game usually played between two people, in which each player simultaneously for
2016-09-18 10:43:39 442
原创 poj 1961kmp next的再理解
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 16679 Accepted: 8021DescriptionFor each prefix of a given string S with N characters (each charact
2016-09-12 12:08:31 199
原创 poj2406--kmp next的应用
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 44606 Accepted: 18632DescriptionGiven two strings a and b we define a*b to be their concate
2016-09-12 11:26:19 232
原创 简单的几何签到--能否组成四边形
N年一度的选拔大赛又开始了,ACfun在现场遇到了这样的一道考查智力的题目:考官给出4根不同长度的木棒,他想知道用这四根木棒能否组成一个四边形。但是ACfun是个数学渣,这道题他并不知道该怎么做,亲爱的ACMer们,请你们帮助他。Input测试数据有多组。第一行是一个正整数T(1<=T<=100),表示多组测试数据。接下来是T行,每行一组测试数据,
2016-09-07 20:01:21 468
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人