
好玩
文章平均质量分 84
2997ms
这个作者很懒,什么都没留下…
展开
-
Topcoder srm div2 500
Problem Statement Hero has just constructed a very specific graph. He started with n isolated vertices, labeled 0 through n-1. For each vertex i Hero then chose a vertex a[i] (other than i)原创 2016-06-01 22:07:00 · 546 阅读 · 0 评论 -
Codeforces 653D:Delivery Bears 二分+网络流
D. Delivery Bearstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNiwel is a little golden bear. As everyon原创 2016-03-20 21:59:09 · 932 阅读 · 0 评论 -
Codeforces 631C:Report
C. Reporttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEach month Blake gets the report containing main原创 2016-03-07 23:41:06 · 824 阅读 · 0 评论 -
51nod 1487:占领资源 很好玩很痛苦
1487 占领资源题目来源: TopCoder基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注有一个矩形区域被划分为N行M列的网格,每个格子里有一定数量的资源并记录在矩阵val中,坐标(x,y)位置上资源量为val[x][y],其val中每个元素的值为0~9的整数。如果你在某个网格(a原创 2016-02-18 13:37:03 · 805 阅读 · 0 评论 -
POJ 1731:Orders next_permutation
OrdersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9940 Accepted: 6048DescriptionThe stores manager has sorted all kinds of goods in an alphabetica原创 2015-09-08 20:51:55 · 396 阅读 · 0 评论 -
51nod 1358:浮波那契 构造矩阵
1358 浮波那契基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注TengBieBie已经学习了很多关于斐波那切数列的性质,所以他感到一些些厌烦。现在他遇到了一个新的数列,这个数列叫做Float-Bonacci。这里有一个关于Float-Bonacci的定义。对于一个具原创 2016-01-29 20:04:13 · 796 阅读 · 0 评论 -
POJ 1700:Crossing River
Crossing RiverTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12537 Accepted: 4766DescriptionA group of N people wishes to go across a river with only原创 2016-01-25 14:40:25 · 495 阅读 · 0 评论 -
Codeforces 607C:Marbles 纯脑洞。。。。
C. Marblestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the spirit of the holidays, Saitama has given原创 2015-12-27 17:38:00 · 1156 阅读 · 0 评论 -
HDU 5601:N*M bulbs
N*M bulbs Accepts: 71 Submissions: 249 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述N*M个灯泡排成一片,也就是排成一个N*M的矩形,有些开着,有些关着,为了节约用电,你要关上所原创 2015-12-27 16:54:13 · 563 阅读 · 0 评论 -
HDU 5600:N bulbs
N bulbs Accepts: 275 Submissions: 1237 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述N个灯泡从左到右排成一排,左边的是第一个,右边的最后一个,下标从1到n。有些开着,有些关着,为原创 2015-12-27 16:35:46 · 526 阅读 · 0 评论 -
Codeforces 651E:Table Compression
E. Table Compressiontime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya is now fond of data compr原创 2016-03-09 18:10:01 · 908 阅读 · 0 评论 -
Codeforces 631E:Product Sum
E. Product Sumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBlake is the boss of Kris, however, this does原创 2016-03-09 19:56:27 · 1116 阅读 · 0 评论 -
buptoj 942:Lettree's Math Homework
942. Lettree's Math Homework时间限制 1000 ms 内存限制 65536 KB题目描述Little lettree is a middle school student who is clever but hates doing homework very much.However, on this Qingming holid原创 2016-03-22 12:15:43 · 461 阅读 · 0 评论 -
Codeforces 664C:International Olympiad
C. International Olympiadtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputInternational Abbreviation Olympia原创 2016-04-24 13:46:34 · 936 阅读 · 0 评论 -
HDU 5681:zxa and wifi
zxa and wifi Accepts: 13 Submissions: 299 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述zxa来到Q镇做义工,镇长希望给住在Q镇中轴线上的nn户人家实现网络覆盖。这nn户人家可以原创 2016-05-18 19:43:23 · 757 阅读 · 0 评论 -
POJ 1920 :Towers of Hanoi
Towers of HanoiTime Limit: 3000MS Memory Limit: 16000KTotal Submissions: 2239 Accepted: 999Case Time Limit: 1000MSDescriptionSurely you have already come原创 2016-05-01 18:14:13 · 764 阅读 · 0 评论 -
Hackerrank:Yet Another KMP Problem
Yet Another KMP Problemlockedby StonefeangProblemSubmissionsLeaderboardDiscussionsEditorialThis challenge uses the famous KMP algorithm. I原创 2016-05-01 17:45:06 · 1918 阅读 · 0 评论 -
POJ 3601:Tower of Hanoi
Tower of HanoiTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 1903 Accepted: 651DescriptionThe Tower of Hanoi is a puzzle consisting of three pegs an原创 2016-05-11 19:08:57 · 813 阅读 · 0 评论 -
buptoj:Study sister's dragon
A. Study sister's dragon 第十届北京邮电大学程序设计竞赛 - 热身赛 (3)时间限制 1000 ms 内存限制 65536 KB题目描述Study sister plays the game coc everyday. One day, she asked Study brother to donate a dragon into her原创 2016-03-27 08:40:58 · 811 阅读 · 0 评论 -
HDU 5643:King's Game 约瑟夫问题
King's Game Accepts: 249 Submissions: 671 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述为了铭记历史,国王准备在阅兵的间隙玩约瑟夫游戏。它召来了 n(1\le n\le 5000原创 2016-03-14 10:40:23 · 974 阅读 · 0 评论 -
bnu 49100:超级线段树
超级线段树Time Limit: 5000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainPrev Submit Status Statistics Discuss NextType: None原创 2016-04-07 22:18:18 · 406 阅读 · 0 评论 -
Codeforces 653E:Bear and Forgotten Tree 2
E. Bear and Forgotten Tree 2time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is a connected undirect原创 2016-03-22 23:28:33 · 705 阅读 · 0 评论 -
51nod 1288:汽油补给
1288 汽油补给题目来源: Codility基准时间限制:1 秒 空间限制:131072 KB 分值: 160 难度:6级算法题 收藏 取消关注有(N+1)个城市,0是起点N是终点,开车从0 -> 1 - > 2...... -> N,车每走1个单位距离消耗1个单位的汽油,油箱的容量是T。给出每个城市到下一个城市的距离D,以及当原创 2015-12-07 22:13:27 · 919 阅读 · 0 评论 -
Codeforces 617C:Watering Flowers
C. Watering Flowerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA flowerbed has many flowers and two fo原创 2016-01-24 17:33:13 · 1070 阅读 · 0 评论 -
HDU 5596:GTW likes gt
GTW likes gt Accepts: 54 Submissions: 782 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)问题描述从前,有nn只萌萌的GT,他们分成了两组在一起玩游戏。他们会排列成一排,第ii只GT会原创 2015-12-12 22:49:52 · 670 阅读 · 0 评论 -
51nod 1449:砝码称重
1449 砝码称重题目来源: CodeForces基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 取消关注现在有好多种砝码,他们的重量是 w0,w1,w2,... 每种各一个。问用这些砝码能不能表示一个重量为m的东西。样例解释:可以将重物和3放到一个托盘中,9和1放到另外一个原创 2015-11-25 14:10:33 · 831 阅读 · 0 评论 -
51nod 1241:特殊的排序
1241 特殊的排序题目来源: 摩根斯坦利的比赛题基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注一个数组的元素为1至N的整数,现在要对这个数组进行排序,在排序时只能将元素放在数组的头部或尾部,问至少需要移动多少个数字,才能完成整个排序过程?例如:2 5 3 4 1 将1移原创 2015-12-10 20:44:33 · 830 阅读 · 0 评论 -
HihoCoder 1246:王胖浩与环
#1246 : 王胖浩与环时间限制:6000ms单点时限:1000ms内存限制:256MB描述王胖浩有一个环,环上有n个正整数。他有特殊的能力,能将环切成k段,每段包含一个或者多个数字。对于一个切分方案,王胖浩将以如下方式计算优美程度,首先对于每一段,求出他们的数字和。然后对于每段的和,求出他们的最大公约数,即为优美程度。他想原创 2015-11-02 11:24:56 · 1114 阅读 · 0 评论 -
Codestorm:Counting Triangles 查各种三角形的个数
题目链接:https://www.hackerrank.com/contests/codestorm/challenges/ilia这周六玩了一天的Codestorm,这个题目是真的很好玩,无奈只做出了四道题,自己太菜,difficult的题目一道题都没出,把moderate的题目拿出来总结一下吧。给了一些棍子,每根棍子的长度各不相同,然后问这些棍子组成的锐角三角形的个数、直角原创 2015-11-01 16:28:06 · 890 阅读 · 0 评论 -
Codestorm:Game with a Boomerang
题目连接:https://www.hackerrank.com/contests/codestorm/challenges/game-with-a-boomerang上一篇博客不知怎么复制过来题目,排版惨不忍睹。。。所以这个只好直接放链接吧题意是n个土著人,编号1~n。围成一圈,然后从1号开始扔飞镖,如果是奇数个人的圈的话,那这个扔飞镖的人没有对应的人,扔飞镖的人淘汰。如果是偶数个人的圈的原创 2015-11-01 15:19:21 · 356 阅读 · 0 评论 -
HDU 5565:Clarke and baton
Clarke and baton Accepts: 14 Submissions: 79 Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)问题描述克拉克是一名人格分裂患者。某一天,克拉克fork出了nn个自己,序号从11到n原创 2015-11-20 16:34:03 · 512 阅读 · 0 评论 -
POJ 3579:Median 差值的中位数
MedianTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4680 Accepted: 1452DescriptionGiven N numbers, X1, X2, ... , XN, let us calculate the difference原创 2015-10-27 20:16:52 · 1094 阅读 · 0 评论 -
51nod 1378:夹克老爷的愤怒 很好玩的一道树状dp
1378 夹克老爷的愤怒基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 取消关注夹克老爷逢三抽一之后,由于采用了新师爷的策略,乡民们叫苦不堪,开始组织起来暴力抗租。夹克老爷很愤怒,他决定派家丁常驻村中进行镇压。诺德县 有N个村庄,编号0 至 N-1,这些村庄之间用N - 1条道路连接起来。原创 2015-11-04 21:19:02 · 1135 阅读 · 0 评论 -
HDU 5564:Clarke and digits 收获颇多的矩阵快速幂 + 前缀和
Clarke and digits Accepts: 16 Submissions: 29 Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述克拉克是一名人格分裂患者。某一天,克拉克变成了一个研究人员,在研究数字。 他想原创 2015-11-19 23:40:36 · 1027 阅读 · 0 评论 -
HDU 5506:GT and set bitset+暴力
GT and set Accepts: 35 Submissions: 194 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述有NN个集合,每个集合中有A_iAi个数。你要将这NN个集合划成LL个部分,使得每个部原创 2015-11-18 23:45:34 · 514 阅读 · 0 评论 -
Codeforces 610C:Harmony Analysis 递归
C. Harmony Analysistime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe semester is already ending, so Dani原创 2015-12-27 23:46:43 · 1023 阅读 · 2 评论 -
HDU 5613:Baby Ming and Binary image
Baby Ming and Binary image Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述铭宝宝很喜欢像素图,所以,他喜欢把像素图都做如下的处理:首先,把像素图变换成二值图(用0101表示),然后,在二值图中,把每个点以及原创 2016-01-24 13:10:22 · 490 阅读 · 0 评论 -
HDU 5602:Black Jack 概率
Black Jack Accepts: 7 Submissions: 122 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述21点又名黑杰克(英文:Blackjack),起源于法国,已流传到世界各地。21点,是一种使用原创 2016-01-03 16:52:27 · 2088 阅读 · 2 评论 -
51nod 1495:中国好区间
1495 中国好区间基准时间限制:0.7 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注阿尔法在玩一个游戏,阿尔法给出了一个长度为n的序列,他认为,一段好的区间,它的长度是>=k的,且该区间的第k大的那个数,一定大于等于T。那么问题来了,阿尔法想知道有多少好的区间。由于阿尔法的序列长度实在是太大了原创 2015-12-31 17:42:22 · 646 阅读 · 0 评论 -
Codeforces 611C:New Year and Domino 二维前缀和
C. New Year and Dominotime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThey say "years are like dominoes, t原创 2015-12-31 17:37:43 · 1493 阅读 · 0 评论