自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

K键盘里的青春K

我曾经失去的荣耀,我定加倍夺回

  • 博客(57)
  • 收藏
  • 关注

原创 HDU 1175 连连看(搜索)

连连看Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31805    Accepted Submission(s): 7844Problem Description“连连看”相信很多人都玩过。没玩过也没

2016-10-31 18:34:53 717

原创 HDU 2087 剪花布条(哈希写法)

剪花布条Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16919    Accepted Submission(s): 10694Problem Description一块花布条,里面有些图案,另有一块直接

2016-10-30 16:35:24 571

原创 HDU 5944 Fxx and string && BestCoder Round #89 1001(细节)

Fxx and string  Accepts: 213  Submissions: 1867 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 131072/65536 K (Java/Others)问题描述青年理论计算机科学家Fxx得到了一个只包含小写字母的字符串。字符串的长度

2016-10-29 23:16:43 670

原创 HDU 3544 Alice's Game(贪心博弈)

Alice's GameTime Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 798    Accepted Submission(s): 357Problem DescriptionAlice and Bob h

2016-10-29 23:08:31 926

原创 HDU 2852 KiKi's K-Number(树状数组+二分)

KiKi's K-NumberTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3847    Accepted Submission(s): 1707Problem DescriptionFor the k-

2016-10-28 15:39:37 671

原创 hdu 3015 Disharmony Trees(树状数组)

Disharmony TreesTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 944    Accepted Submission(s): 468Problem DescriptionOne day Sop

2016-10-28 14:01:43 766

原创 poj 1990 MooFest(树状数组变形)

MooFestTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7054 Accepted: 3171DescriptionEvery year, Farmer John's N (1 <= N <= 20,000) cows attend "MooFe

2016-10-28 00:01:27 883

原创 poj 3321 Apple Tree(dfs染色+树状数组)

Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 27212 Accepted: 8073DescriptionThere is an apple tree outside of kaka's house. Every autumn,

2016-10-26 23:38:44 904

原创 poj 3252 Round Numbers(二进制数位DP)

Round NumbersTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 12505 Accepted: 4790DescriptionThe cows, as you know, have no fingers or thumbs and thus

2016-10-25 21:24:34 607

原创 HDU 3652 B-number (数位DP)

B-numberTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5347    Accepted Submission(s): 3087Problem DescriptionA wqb-number, or

2016-10-25 19:44:42 514

原创 HDU 2089 不要62 (数位dp入门题)

不要62Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36331    Accepted Submission(s): 13246Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音

2016-10-25 13:37:18 610

原创 lightoj 1085 All Possible Increasing Subsequences(递推式+离散化+树状数组维护)

1085 - All Possible Increasing Subsequences   PDF (English)StatisticsForumTime Limit: 3 second(s)Memory Limit: 64 MBAn increasing subsequence from a seq

2016-10-25 01:27:23 685

原创 lightoj 1080 - Binary Simulation(区间更新,单点查询)

1080 - Binary Simulation   PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 64 MBGiven a binary number, we are about to do some operatio

2016-10-25 01:08:23 518

原创 LightOJ 1112 Curious Robin Hood && LightOJ 1266 Points in Rectangle(树状数组)

这两个题是一维树状数组跟二维树状数组的模板题,只不过要改变下原始值,或者根据单个值进行一些操作,这时候只需要建一个数组记录原来的值变化就可以,如果改变这个值了,就把原来的值改变。只需要改变一个值所以复杂度很低。。1266 - Points in Rectangle   PDF (English)StatisticsForum

2016-10-25 00:58:28 616

原创 HDU 3555 Bomb 详解(数位DP入门题)

BombTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 16153    Accepted Submission(s): 5902Problem DescriptionThe counter-terrori

2016-10-25 00:30:16 858

转载 数位DP

基础篇数位dp是一种计数用的dp,一般就是要统计一个区间[le,ri]内满足一些条件数的个数。所谓数位dp,字面意思就是在数位上进行dp咯。数位还算是比较好听的名字,数位的含义:一个数有个位、十位、百位、千位......数的每一位就是数位啦!之所以要引入数位的概念完全就是为了dp。数位dp的实质就是换一种暴力枚举的方式,使得新的枚举方式满足dp的性质,然后记忆化就可以了。

2016-10-24 21:49:01 2884

原创 poj 3126 Prime Path(简单bfs)

Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17872 Accepted: 10065DescriptionThe ministers of the cabinet were quite upset by the message

2016-10-20 22:36:39 727

原创 poj 1704 Georgia and Bob (尼姆博奕)

Georgia and BobTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9583 Accepted: 3144DescriptionGeorgia and Bob decide to play a self-invented game. They d

2016-10-19 16:36:43 555

原创 hdu 3951 Coin Game(对称博弈)

Coin GameTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1756    Accepted Submission(s): 1018Problem DescriptionAfter hh has lea

2016-10-19 15:00:57 711

原创 Codeforces Round #377 (Div. 2) D. Exams && codeforce 732 D 详解(贪心+二分)

D. Examstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy has an exam period which will continue for

2016-10-18 22:54:23 1140 6

原创 Codeforces Round #377 (Div. 2) C. Sanatorium(规律乱搞)

C. Sanatoriumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy spent his vacation in a sanatorium, ca

2016-10-18 18:38:12 566

原创 Codeforces Round #376 (Div. 2) C. Socks && 731 C 详解(并查集)

C. Sockstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArseniy is already grown-up and independent. His m

2016-10-17 17:05:18 1270

原创 Codeforces Round #365 (Div. 2) B

B. Mishka and triptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Mishka is a great traveller and she visited

2016-10-17 12:33:47 520

原创 Codeforces Round #376 (Div. 2) A && B

A. Night at the Museumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGrigoriy, like the hero of one famous

2016-10-17 11:10:14 719

原创 HDU 2516 取石子游戏(斐波那契博弈)

取石子游戏Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4517    Accepted Submission(s): 2737Problem Description1堆石子有n个,两人轮流取.先取者第1次

2016-10-16 16:52:07 653

原创 HDU 2177 取(2堆)石子游戏 (威佐夫博弈)

取(2堆)石子游戏Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2280    Accepted Submission(s): 1384Problem Description有两堆石子,数量任意,可以不同。

2016-10-16 16:02:33 789 1

原创 hdu 2897 (巴什博奕)

邂逅明下Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4171    Accepted Submission(s): 1927Problem Description当日遇到月,于是有了明。当我遇到了你,便成

2016-10-15 21:22:27 535

原创 poj 1907 John (反尼姆博奕)

JohnTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4468    Accepted Submission(s): 2557Problem DescriptionLittle John is playin

2016-10-15 17:49:52 492

原创 FZU 1683 纪念SlingShot (简单的矩阵快速幂)

纪念SlingShotDescription已知 F(n)=3 * F(n-1)+2 * F(n-2)+7 * F(n-3),n>=3,其中F(0)=1,F(1)=3,F(2)=5,对于给定的每个n,输出F(0)+ F(1)+ …… + F(n) mod 2009。Input第一行是一整数m,代表总共有m个cases。

2016-10-15 15:15:48 563

原创 hdu 3070 Fibonacci && poj 1575 Tr A(矩阵快速幂模板题)

FibonacciTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13637 Accepted: 9669DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn =

2016-10-15 13:58:32 673

原创 HDU 1850 Being a Good Boy in Spring Festival && hdu 2176 取(m堆)石子游戏 (尼姆博弈)

Being a Good Boy in Spring FestivalTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1850Appoint description: System Crawler  (Oct

2016-10-14 16:31:33 607

转载 尼姆博奕讲解

尼姆博奕(Nimm Game):有三堆各若干个物品,两个人轮流从某一堆取任意多的物品,规定每次至少取一个,多者不限,最后取光者得胜。    这种情况最有意思,它与二进制有密切关系,我们用(a,b,c)表示某种局势,首先(0,0,0)显然是奇异局势,无论谁面对奇异局势,都必然失败。第二种奇异局势是(0,n,n),只要与对手拿走一样多的物品,最后都将导致(0,0,0)。仔细分析一下,(

2016-10-14 16:08:17 952

原创 威佐夫博弈各大博客总结

这篇博客是我摘取网上比较好的博客段落摘取而成的,希望可以让所有人都能看懂,博客出处会在后文贴上~1,有些人可能不知道为什么会奇异局势为什么一定会赢,这一篇博客很详细很清楚的讲解了这个原理问题:首先有两堆石子,博弈双方每次可以取一堆石子中的任意个,不能不取,或者取两堆石子中的相同个。先取完者赢。分析:首先我们根据条件来分析博弈中的奇异局势      第一个(0 ,

2016-10-14 13:02:29 1995

原创 树状数组详解

树状数组求区间和的一些常见模型  树状数组在区间求和问题上有大用,其三种复杂度都比线段树要低很多„„有关区间求和的问题主要有以下三个模型(以下设A[1..N]为一个长为N的序列,初始值为全0): (1)“改点求段”型,即对于序列A有以下操作: 【1】修改操作:将A[x]的值加上c; 【2】求和操作:求此时A[l..r]的和。 这是最容易的模型,不需要任何辅助数组。树状数组中从x开始

2016-10-13 18:08:24 511

原创 POJ 2155 Matrix (二位树状数组)

G - MatrixTime Limit:3000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit Status Practice POJ 2155Appoint description: System Crawler  (Oct 12, 2016 12:35:18 PM)

2016-10-13 13:05:33 532

原创 POJ 3067 Japan(逆序对)

DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <

2016-10-12 23:19:17 633

原创 树状数组各大经典博客初学整合

首先说明,此篇博客是我在初学树状数组时将看到过的所有很好很经典博客里简单易懂或者精彩的部分摘取组合而成的。每一篇博客侧重点不同,有些讲的比较粗略但是另一些博客很详细,所以我觉得将这些精华聚合在一起还是很重要的,每篇博客我都会标明出处。另外有些地方我也会增加一些我自己的见解,如果有不对的地方,希望各位大佬指出。如果您觉得好的话欢迎转载,但请说明出处:第一篇是搜索树状数组第一篇被许多人称赞

2016-10-11 14:53:46 3117 1

转载 ☆ Codeforces 724C Ray Tracing 扩展欧几里得 + 计算几何

转载的,然而我并看不懂。。。希望以后能够看懂,觉得是个好题C. Ray Tracingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere

2016-10-09 14:31:36 1927 2

原创 Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) B(模拟) && codeforce 724B Batch Sort

B. Batch Sorttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a table consisting of n rows an

2016-10-09 12:36:51 629

原创 HDU 1387 && UVa 540 Team Queue(队列应用)

Problem DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday lif

2016-10-08 13:22:32 593

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除