自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(99)
  • 收藏
  • 关注

原创 最长回文子串

好久没有写博客了 对于最长 回文子串第一次做 写个 博客纪念一下要求最长回文子串的话 有三种方法 1. 暴力枚举所有的子串然后判断是否回文。 2. 就是把每个字符看成中间的那个字符然后枚举长度 3. 就是DP了 DP[i]=min(DP[id*2-i],mx] id是最长子串的中点 mx是最长点 这是代码自己琢磨吧#include "cstdio" #include "io

2016-11-05 02:12:20 263

转载 什么是离散化?

什么是离散化?     如果说今年这时候OIBH问得最多的问题是二分图,那么去年这时候问得最多的算是离散化了。对于“什么是离散化”,搜索帖子你会发现有各种说法,比如“排序后处理”、“对坐标的近似处理”等等。哪个是对的呢?哪个都对。关键在于,这需要一些例子和不少的讲解才能完全解释清楚。     离散化是程序设计中一个非常常用的技巧,它可以有效的降低时间复杂度。其基本思想就是在众多可能的情况中

2016-10-23 23:45:34 393

原创 C. Ray Tracing

C. Ray Tracing time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There are k sensors located in the rectangular room of size n × m meters. T

2016-10-15 00:15:32 354

原创 Fishhead’s Little Game HDU 4753

Fishhead’s Little GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1122 Accepted Submission(s): 342Problem Description    There is a 3 b

2016-10-12 23:48:13 286

原创 C. Journey

C. Journey time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Recently Irina arrived to one of the most famous cities of Berland — the Berlat

2016-10-07 01:39:05 296

原创 ZZULI 1906: 小火山的幸运数字

1906: 小火山的幸运数字 Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 26  Solved: 11 SubmitStatusWeb Board Description   单纯的小火山特别喜欢单纯的事物, 每看到一些东西都想让他们变得单纯起来。   现在,单纯的小火山开始学数字了, 看到一串串数字, 小火山觉得自己都不

2016-09-20 22:35:30 761

原创 博弈

直接百度就好了   Wythoff Game       点击打开链接 至于 Bash Game 比较好理解就不说明了 后面等待更新

2016-09-18 23:26:36 178

原创 最大流模版

一个最大流Ford-Fulkerson的模版 #include "cstdio" #include "cstring" #include "algorithm" #include "queue" using namespace std; int M[510][510]; int dis[510]; bool BFS(int n){ memset(dis,0,sizeof(dis));

2016-09-18 09:50:52 232

原创 1325 - Distributing Chocolates

1325 - Distributing Chocolates     PDF (English) Statistics Forum Time Limit: 4 second(s) Memory Limit: 32 MB I have bought n chocolates for my young cousins.

2016-09-16 21:15:54 236

转载 组合数学小知识

求,盒子都可以分成是否不能区分,和能区分,还能分成是否能有空箱子,所以一共是8种情况,我们现在来一一讨论。 转自逍遥丶綦 1.球同,盒不同,无空箱 C(n-1,m-1), n>=m 0, n 使用插板法:n个球中间有n-1个间隙,现在要分成m个盒子,而且不能有空箱子,所以只要在n-1个间隙选出m-1个间隙即可 2.球同,盒不同,允许空箱

2016-09-16 15:55:52 289

原创 1307 - Counting Triangles

1307 - Counting Triangles     PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are given N sticks having distinct lengths

2016-08-27 01:40:18 459

原创 poj1006 Biorhythms

Biorhythms Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 129801   Accepted: 41335 Description Some people believe that there are three cycles in a person's

2016-08-25 09:22:20 217

原创 HDU3575 Hello Kiki

Hello Kiki Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3338    Accepted Submission(s): 1234 Problem Description One day I was shopp

2016-08-25 09:19:34 394

原创 find the mincost route

find the mincost route Time Limit: 1000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4289    Accepted Submission(s): 1721 Problem Description 杭州有N个景区

2016-08-24 21:48:20 290

原创 HDU 5636 Shortest Path

Shortest Path Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1591    Accepted Submission(s): 517 Problem Description There is a path

2016-08-24 10:11:51 341

原创 Light-oj 1282 - Leading and Trailing

1282 - Leading and Trailing     PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are given two integers: n and k, your task is to

2016-08-23 21:27:06 207

原创 Light—oj 1045 - Digits of Factorial

1045 - Digits of Factorial     PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Factorial of an integer is defined by the following f

2016-08-23 21:15:29 210

原创 Pythagorean Triples CF #368 div2 C

Pythagorean Triples time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Katya studies in a fifth grade. Recently

2016-08-22 09:55:57 196

原创 NYOJ1289 ABS

ABS 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述Mr.Ha is a famous scientist .He has just not got a kind of magic medicine called Entropy Cracker.The medicine was preserved in V bottles,and the i-th (1≤i≤N

2016-08-21 01:05:30 270

原创 HDU Clarke and points

Clarke and pointsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 429 Accepted Submission(s): 300Problem Description Clarke is a patient wit

2016-08-19 19:56:41 213

原创 POJ Ants

Ants Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14970 Accepted: 6504 DescriptionAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/

2016-08-19 18:03:36 410

原创 ZZULI 1895: 985的0-1串难题

1895: 985的0-1串难题 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 272 Solved: 81SubmitStatusWeb BoardDescription 985有一个长度为n的0-1串,已知他最多可以修改k次(每次修改一个字符即0->1 或者 1->0),他想知道连续的全1子串最长是多少。 Input 第一行输入一个整数t,代表

2016-08-19 16:59:47 288

原创 ZZULI 1912: 小火山的爱情密码

1912: 小火山的爱情密码 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 295 Solved: 89SubmitStatusWeb BoardDescription 小火山获得了一个字符串,然而大火山让小火山从里面截取一段字符串,并且让小火山截取的字符串满足一些字符达到一定数量。 小火山觉得很容易,但是他想要知道他至少得截取多长的字符串。Inp

2016-08-19 16:55:12 291

原创 ZZULI 1902: 985的因子对难题

1902: 985的因子对难题 Time Limit: 2 Sec Memory Limit: 128 MB Submit: 156 Solved: 45SubmitStatusWeb BoardDescription 985有n个正整数,他想知道存在多少个不同的因子对(a[i], a[j])使得 1 <= i, j <= n && i != j && a[j] % a[i] == 0,其中i和

2016-08-19 16:50:11 306

原创 ZZULI 1904: 小火山的股票交易

ZZULI 1904

2016-08-19 09:37:08 333

原创 ZZULI 1917: E

1917: E Time Limit: 1 Sec Memory Limit: 128 MB Submit: 116 Solved: 19SubmitStatusWeb BoardDescription 晴天有非常严重的选择恐惧症,每次吃饭前他都在纠结到底吃什么。。今天又到了吃饭的时候了。重光:我给你一个包含n个不同整数的序列a,如果它所有连续子序列的价值和是素数咱们就吃米,不然就吃面。定

2016-08-18 20:55:39 405

原创 ZZULI 1922: A

1922: A Time Limit: 1 Sec Memory Limit: 128 MB Submit: 77 Solved: 14SubmitStatusWeb BoardDescription 给定一个4*4的01棋盘,1代表棋子,0代表空格,棋子1每次可以移动到相邻上下左右四个位置的空格。 然后再给定你目标棋盘,问你最少在多少步能把当前棋盘变成目标棋盘状态。Input 第一行

2016-08-18 20:19:58 249

原创 ZZULI 1921: B

1921: B Time Limit: 1 Sec Memory Limit: 128 MB Submit: 249 Solved: 22SubmitStatusWeb BoardDescription 给定一个长度为n的数字序列a,从中选取一个长为m的子序列b满足 b[i]&b[i-1]!=0 (2<=i<=m) 求最大的m。Input 第一行输入一个整数t,代表有t组测试数据。

2016-08-18 19:29:50 258

原创 zzuli 1919 F

1916: F Time Limit: 1 Sec Memory Limit: 128 MB Submit: 178 Solved: 8SubmitStatusWeb BoardDescription 给一颗树,有n个结点,编号为1到n,1为根节点,有两种操作,1 x y把x结点权值加y,2 x查询x到根节点所有结点的权值和. 每个结点权值初始化为0。Input 第一行输入一个整数t,

2016-08-18 09:39:27 268

原创 zzuil G

GTime Limit: 1 Sec Memory Limit: 128 MB Submit: 347 Solved: 80SubmitStatusWeb Board Description晴天也来寻宝啦,有一个m层的宝塔,只能从第一层开始一层一层的往上走,每层都有一个门,你需要用钥匙来打开门才能继续走,现在晴天有n把钥匙,编号为0-n-1,然后他要开始寻宝了。没有特殊技能怎么好意思出来寻宝

2016-08-17 19:29:11 700

原创 zzuli D

DTime Limit: 1 Sec Memory Limit: 128 MB Submit: 187 Solved: 42SubmitStatusWeb Board Description晴天想把一个包含n个整数的序列a分成连续的若干段,且和最大的一段的值最小,但他有强迫症,分的段数不能超过m段,然后他就不会分了。。。他想问你这个分出来的和最大的一段的和最小值是多少?Input第一行输入一

2016-08-17 19:26:59 550

原创 HDU5512 Pagodas

Pagodas Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 5512 Description $n$ pagodas were standing erect in Hong Jue Si between the Niushou Mountain

2016-08-17 09:54:26 243

原创 简单KMP Number Sequence

Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 22055 Accepted Submission(s): 9428Problem Description Given two sequences

2016-08-16 15:52:30 209

原创 Wall Painting

Wall Painting Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2557 Accepted Submission(s): 814Problem Description Ms.Fang loves painting

2016-08-16 08:39:00 361

原创 找连续数 HDU5247

找连续数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1429 Accepted Submission(s): 527 Problem Description 小度熊拿到了一个无序的数组,对于这个数组,小度熊想知道是否能找

2016-08-15 16:17:38 257

原创 1058 - Parallelogram Counting

Description There are n distinct points in the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on these points. In other words, find the number of 4-ele

2016-08-15 11:39:41 246

原创 HDU5100 Chessboard

Chessboard Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 799 Accepted Submission(s): 335Problem Description Consider the problem of tili

2016-08-13 09:34:06 242

原创 HDU-5671 Matrix

Matrix Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1378 Accepted Submission(s): 545Problem Description There is a matrix M that has

2016-08-12 20:44:01 202

原创 Conturbatio

Conturbatio Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 944 Accepted Submission(s): 423 Problem Description There are man

2016-08-12 20:18:06 274

原创 Wooden Sticks

Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21785 Accepted: 9296 Description There is a pile of n wooden sticks. The length and w

2016-08-11 19:21:51 187

空空如也

空空如也

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

TA关注的人

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