- 博客(31)
- 收藏
- 关注
原创 Codeforces Round #346 (Div. 2) F bfs+并查集
链接:戳这里F. Polycarp and Haytime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThe farmer Polycarp has a warehouse with hay, which c
2016-03-31 21:51:41 389
原创 Codeforces Round #346 (Div. 2) A B C D E
链接:戳这里A. Round Housetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya lives in a round building, whose entrances are number
2016-03-31 19:05:56 928
原创 CROC 2016 - Elimination Round C 二分
链接:戳这里C. Enduring Exodustime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn an attempt to escape the Mischievous Mess Makers' a
2016-03-30 23:55:44 351
原创 CROC 2016 - Elimination Round B 树状数组处理逆序对个数
链接:戳这里B. Mischievous Mess Makerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt is a balmy spring afternoon, and Farmer John
2016-03-30 23:49:53 433
原创 bzoj 2820 莫比乌斯反演
链接:戳这里2820: YY的GCDTime Limit: 10 Sec Memory Limit: 512 MB[Submit][Status][Discuss]Description神犇YY虐完数论后给傻×kAc出了一题给定N, M,求1kAc这种傻×必然不会了,于是向你来请教……多组输入Input第一行一个整数T 表述
2016-03-29 16:08:45 333
原创 hdu 1695 莫比乌斯反演
链接:戳这里GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionGiven 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...
2016-03-28 21:49:24 282
原创 bzoj 2301 莫比乌斯反演
链接:戳这里2301: [HAOI2011]Problem bTime Limit: 50 Sec Memory Limit: 256 MB[Submit][Status][Discuss]Description对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数
2016-03-28 20:48:35 347
原创 rqnoj 607 莫比乌斯反演应用
链接:戳这里PID607 / [NOI2010]能量采集 ☆题目标签类型数论 / 数值 来源NOI2001 题目描述栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量。在这些植物采集能量后,栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起。 栋栋的植物种得非常整齐,一共有n列,每列有m棵,植物的横竖间距都
2016-03-28 18:56:37 333
原创 bzoj 2440 莫比乌斯反演应用
链接:戳这里2440: [中山市选2011]完全平方数Time Limit: 10 Sec Memory Limit: 128 MB[Submit][Status][Discuss]Description小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。
2016-03-28 15:55:13 351
原创 bzoj 1485 卡特兰数
链接:戳这里1485: [HNOI2009]有趣的数列Time Limit: 10 Sec Memory Limit: 64 MB[Submit][Status][Discuss]Description 我们称一个长度为2n的数列是有趣的,当且仅当该数列满足以下三个条件: (1)它是从1到2n共2n个整数的一个排列{ai};
2016-03-27 21:17:24 697
原创 2016 [Offer收割]编程练习赛3 A B
链接:戳这里#1283 : hiho密码时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho根据最近在密码学课上学习到的知识,开发出了一款hiho密码,这款密码的秘钥是这样生成的:对于一种有N个字母的语言,选择一个长度为M的单词;将组成这个单词的所有字母按照顺序不重复的写出(即遇到相同字母时跳过);然后将字母表剩下的没有使用过的字母按
2016-03-27 19:53:26 589
原创 BestCoder Round #77 (div.2) A B C D
链接:戳这里so easy Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述已知一个包含 nn 个元素的正整数集合 SS,设 f(S)为集合 S 中所有元素的异或(XOR)的结果。如:S={1,2,3}, 则 f(S) = 0。
2016-03-26 22:59:05 442
原创 hdu 5249 KPI 离线+树状数组求第k大
链接:戳这里KPITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description你工作以后, KPI 就是你的全部了. 我开发了一个服务,取得了很大的知名度。数十亿的请求被推到一个大管道后同时服
2016-03-26 16:46:34 363
原创 Poj 2985 树状数组求第k大
链接:戳这里The k-th Largest GroupTime Limit: 2000MS Memory Limit: 131072KDescriptionNewman likes playing with cats. He possesses lots of cats in his home. Because the number of cats i
2016-03-26 15:48:03 430
原创 Uva 11426 - GCD - Extreme (II) 欧拉函数
链接:戳这里Given the value of N, you will have to find the value of G. The definition of G is given below:ij≤N G = ∑ ∑ GCD(i, j)i=1 j=i+1Here GCD(i, j) mean
2016-03-25 21:52:30 414
原创 poj-3461 Oulipo KMP
链接:戳这里OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 32550Accepted: 13161DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La dispa
2016-03-24 21:36:20 342
原创 Uva 10891 dp
链接:戳这里This is a two player game. Initially there are n integer numbers in an array and players A and B getchance to take them alternatively. Each player can take one or more numbers from the l
2016-03-24 21:23:40 329
原创 Uva 10635 简单dp
链接:戳这里Problem EPrince and PrincessInput: Standard InputOutput: Standard OutputTime Limit: 3 SecondsIn an n x n chessboard, Prince and Princess plays a game. The squares in
2016-03-24 21:01:21 442
原创 hdu 5572 An Easy Physics Problem
链接:戳这里An Easy Physics ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 697 Accepted Submission(s): 120Probl
2016-03-24 19:50:43 942
原创 hdu 1711 && Codeforces Round #344 (Div. 2) D 【KMP】
链接:戳这里Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18633 Accepted Submission(s): 8073Probl
2016-03-24 19:34:24 479
原创 IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) A B C
链接:戳这里A. Bear and Three Ballstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLimak is a little polar bear. He has n balls, the i-t
2016-03-21 22:11:39 1275
原创 BestCoder Round #76 (div.2) A B C
链接:戳这里DZY Loves Balls Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)问题描述DZY喜欢玩球。他有n个球,装进一个大盒子里。每个球上面都写着一个整数。有一天他打算从盒子中挑两个球出来。他先均匀随机地从盒子中挑
2016-03-20 22:34:01 427
原创 Codeforces Round #343 (Div. 2) A B C D
链接:戳这里A. Far Relative’s Birthday Caketime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDoor's family is going celebrate Famil Doors's
2016-03-20 22:05:25 679
原创 Educational Codeforces Round 9 A B C D F
链接:戳这里A. Grandma Laura and Applestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGrandma Laura came to the market to sell some apples
2016-03-18 22:12:27 674
原创 蓝桥杯 MST 和 搜索
链接:戳这里 历届试题 兰顿蚂蚁 时间限制:1.0s 内存限制:256.0MB 问题描述 兰顿蚂蚁,是于1986年,由克里斯·兰顿提出来的,属于细胞自动机的一种。 平面上的正方形格子被填上黑色或白色。在其中一格正方形内有一只“蚂蚁”。 蚂蚁的头部朝向为:上下左右其中一方。 蚂蚁的移动规则十分简单:
2016-03-16 22:22:30 426
原创 Codeforces Round #334 (Div. 2) B C D
B. More Cowbell题意:给定N表示铃铛的个数,和k表示箱子的个数,牛铃铛要放在箱子里运输,要求每个箱子放1个或者2个牛铃铛,且每个箱子都要放铃铛,箱子的大小相等,老板为了省钱,希望箱子越小越好( smallest ),求满足条件的箱子的尺寸。给定的n个铃铛的尺寸依次从小到大。样例:6 41 2 3 101 102 103{1 101} {2 3}
2016-03-16 21:14:14 330
原创 BestCoder Round #65 B C D || HDU 5591 5592 5593
B 题意:ZYB在远足中,和同学们玩了一个“数字炸弹”游戏:由主持人心里想一个在[1,N][1,N]中的数字XX,然后玩家们轮流猜一个数字,如果一个玩家恰好猜中XX则算负,否则主持人将告诉全场的人当前的数和XX比是偏大还是偏小,然后猜测的范围就会相应减小,一开始的范围是[1,N][1,N].每个玩家只能在合法的范围中猜测. 现在假设只有两个人在玩这个游戏,并且两个人都已经知道了最后的XX,若两个人
2016-03-16 21:10:43 368
原创 tyvj 2075 差分数组+二分
链接:戳这里P2075 [NOIP2012T5]借教室时间: 1000ms / 空间: 131072KiB / Java类名: Main背景noip2012-tg描述在大学期间,经常需要租借教室。大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室。教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样。面对海量租借教室的信息,我们自然希
2016-03-16 21:02:42 1118
原创 BestCoder Round #75
题目链接:戳这里King's Cake Accepts: 960 Submissions: 1572 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述阅兵式前一天,是国王的生日,大臣们为他准备了一个n×m(1≤n,m≤10000) 的蛋糕。他准备
2016-03-13 19:26:25 341
原创 codeforces #345(div2)
链接:戳这里A. Joystickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFriends are going to play
2016-03-10 21:57:33 594
原创 BestCoder 74
链接:戳这里A:LCP Array题意:给定一个字符串s=s1s2s3s4...s5,si代表字符(小写字母),知道任意两个相邻的后缀的最长公共前缀长度为一个整数ai,这个意思就是相邻字符相等的个数为ai。问满足该字符串s的种数。思路:样例43 2 1aaaa aaa aa a显然这样的字符串必须是 aaaa (26字符任意一个) 才能满足
2016-03-07 16:57:51 287
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人