自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(408)
  • 资源 (6)
  • 论坛 (1)
  • 收藏
  • 关注

原创 P1296 奶牛的耳语 (快排+二分查找)

题目链接:https://www.luogu.com.cn/problem/P1296解题思路:朴素的想法,枚举每一头牛,假设位置为 x ,可以与这头牛交流的牛的数量为:在区间[x - d, x + d] 内的牛。于是问题转变为,如何快速求出给定区间内有多少头牛。先将所有牛排个序,然后二分查找,找到大于等于 x-d 最左边的牛编号,小于等于 x+d的最右边的牛的编号,即可得出区间内有多少头牛。时间复杂度:nlogn 空间复杂度:o(n)#include<cstdio&gt...

2020-07-12 23:40:38 51

原创 洛谷1146 硬币翻转

题目描述在桌面上有一排硬币,共NN枚,每一枚硬币均为正面朝上。现在要把所有的硬币翻转成反面朝上,规则是每次可翻转任意N-1N−1枚硬币(正面向上的被翻转为反面向上,反之亦然)。求一个最短的操作序列(将每次翻转N-1枚硬币成为一次操作)。输入格式一个自然数NN(NN为不大于100100的偶数)。输出格式第一行包含一个整数SS,表示最少需要的操作次数。接下来的SS行每行分别表示每次操作后桌上硬币的状态(一行包含NN个整数(00或11),表示每个硬币的状态:00――正面向上,和11――反面向上

2020-07-11 01:23:57 148

原创 poj3682 King Arthur's Birthday Celebration (概率)

King Arthur's Birthday CelebrationTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2886 Accepted: 905DescriptionKing Arthur is an narcissist who intend

2016-02-11 11:49:04 769

原创 hdu3790 最短路径问题 (dijkstra,双关键值最短路)

最短路径问题Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19606    Accepted Submission(s): 5837Problem Description给你n个点,m条无向边,每条

2016-02-09 20:05:15 622

原创 hdu3339 In Action (dijkstra+01背包)

In ActionTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4954    Accepted Submission(s): 1640Problem DescriptionSince 1945

2016-02-09 19:33:21 595

原创 hdu2680 Choose the best route (dijkstra)

Choose the best routeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11571    Accepted Submission(s): 3762Problem Description

2016-02-09 14:11:24 394

原创 hdu2544 最短路 (floyd)

最短路Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 47151    Accepted Submission(s): 20811Problem Description在每年的校赛里,所有进入决赛的同

2016-02-09 13:36:07 490

原创 hdu2112 HDU Today (floyd+stl-map)

HDU TodayTime Limit: 15000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21822    Accepted Submission(s): 5230Problem Description经过锦囊相助,海东集

2016-02-09 13:10:39 415

原创 hdu2066 一个人的旅行 (floyd)

一个人的旅行Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27565    Accepted Submission(s): 9565Problem Description虽然草儿是个路痴(就是在杭电

2016-02-09 10:03:20 475

原创 hdu1874 畅通工程续 (floyd)

畅通工程续Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 39917    Accepted Submission(s): 14755Problem Description某省自从实行了很多年的畅通工

2016-02-09 09:36:07 355

原创 hdu1869 六度分离 (floyd)

六度分离Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7233    Accepted Submission(s): 2935Problem Description1967年,美国著名的社会学家斯坦

2016-02-09 08:46:32 399

原创 hdu1385 Minimum Transport Cost (floyd输出字典序最小的路径)

Minimum Transport CostTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9313    Accepted Submission(s): 2480Problem Description

2016-02-08 21:52:55 494

原创 hdu1224 Free DIY Tour (dp)

Free DIY TourTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5581    Accepted Submission(s): 1782Problem DescriptionWeiwei i

2016-02-06 16:06:37 415

原创 hdu1217 Arbitrage (floyd)

ArbitrageTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6054    Accepted Submission(s): 2803Problem DescriptionArbitrage is

2016-02-06 13:15:04 400

原创 zoj3497 Mistwald (矩阵快速幂+图论)

MistwaldTime Limit: 2 Seconds      Memory Limit: 65536 KBIn chapter 4 of the game Trails in the Sky SC, Estelle Bright and her friends are crossing Mistwald to meet their final enemy, Luccio

2016-02-05 18:59:38 401

原创 hdu1757 A Simple Math Problem (矩阵快速幂)

A Simple Math ProblemTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3762    Accepted Submission(s): 2269Problem Description

2016-02-05 16:34:32 443

原创 hdu2604 Queuing (矩阵快速幂+动态规划)

QueuingTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4022    Accepted Submission(s): 1782Problem DescriptionQueues and Pr

2016-02-05 15:59:16 724

原创 poj3233 Matrix Power Series (矩阵快速幂+二分)

Matrix Power SeriesTime Limit: 3000MS Memory Limit: 131072KTotal Submissions: 18889 Accepted: 7982DescriptionGiven a n × n matrix A and a positive integer k,

2016-02-05 12:40:40 401

原创 hdu1575 Tr A (矩阵快速幂)

Tr ATime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3905    Accepted Submission(s): 2916Problem DescriptionA为一个方阵,则Tr A表示A

2016-02-05 09:28:32 698

原创 poj3070 Fibonacci (矩阵快速幂)

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

2016-02-05 09:05:53 465

原创 hdu2846 Repository

RepositoryTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3735    Accepted Submission(s): 1366Problem DescriptionWhen you go

2016-02-04 18:26:05 437

原创 hdu1247 Hat’s Words

Hat’s WordsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11867    Accepted Submission(s): 4225Problem DescriptionA hat’s

2016-02-04 16:58:20 390

原创 hdu2072 单词数

单词数Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 40092    Accepted Submission(s): 9622Problem Descriptionlily的好朋友xiaoou333

2016-02-04 14:59:05 508

原创 hdu3460 Ancient Printer

Ancient PrinterTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1664    Accepted Submission(s): 807Problem DescriptionThe co

2016-01-31 22:48:16 336

原创 hdu1075 What Are You Talking About (字典树)

What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 18389    Accepted Submission(s): 6005Problem Descri

2016-01-29 23:18:36 340

原创 hdu1671 Phone List (字典树)

Phone ListTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15853    Accepted Submission(s): 5326Problem DescriptionGiven a li

2016-01-29 17:33:43 312

原创 hdu1251 统计难题 (26分支-字典树)

统计难题Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 27617    Accepted Submission(s): 11050Problem DescriptionIgnatius最近遇到一个

2016-01-29 11:45:34 310

原创 hdu1305 Immediate Decodability (判断一串是否是另一串的前缀,暴力)

Immediate DecodabilityTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2499    Accepted Submission(s): 1294Problem Description

2016-01-28 22:32:09 389

原创 hdu1709 The Balance (放入+取出 01背包)

The BalanceTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6973    Accepted Submission(s): 2874Problem DescriptionNow you ar

2015-12-24 15:20:38 459

转载 欧拉函数

原文链接:https://zh.m.wikipedia.org/zh/%E6%AC%A7%E6%8B%89%E5%87%BD%E6%95%B0欧拉函数本文介绍的是小于或等于n的正整数中与n 互质的数的数目。关于形式为的函数,详见「欧拉函数(复变函数)」。当n为1至1000的整数时的值在数论中,对正整数n,欧

2015-12-23 22:01:53 6326

转载 RMQ问题 (st+线段树)

RMQ问题博客分类: 算法J#算法 RMQ (Range Minimum/Maximum Query)问题是指:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j主要方法及复杂度(处理复杂度和查询复杂度)如下: 1.朴素(即搜索) O(n)-O(n) 2.线段树(segment tree) O(n)-O(qlogn) 3.ST(实质是

2015-12-22 19:45:15 563

原创 hdu2152 Fruit (背包dp)

FruitTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4076    Accepted Submission(s): 2319Problem Description转眼到了收获的季节,由于有TT的

2015-12-18 21:31:52 504

原创 hdu2082 找单词 (背包dp)

找单词Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5384    Accepted Submission(s): 3813Problem Description假设有x1个字母A, x2个字母B,

2015-12-18 20:37:05 467

原创 hdu1171 Big Event in HDU (多重背包)

Big Event in HDUTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31013    Accepted Submission(s): 10873Problem DescriptionNo

2015-12-18 19:55:03 471

原创 hdu1085 Holding Bin-Laden Captive! (多重背包)

Holding Bin-Laden Captive!Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18710    Accepted Submission(s): 8329Problem Descrip

2015-12-18 17:25:36 697

原创 hdu1398 Square Coins (完全背包)

Square CoinsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10146    Accepted Submission(s): 6944Problem DescriptionPeople i

2015-12-18 17:07:36 396

原创 hdu1028 Ignatius and the Princess III (完全背包)

Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16474    Accepted Submission(s): 11609Problem Descr

2015-12-18 17:00:13 538

原创 [HNOI2008]越狱 (快速幂模)

1008: [HNOI2008]越狱Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 6179  Solved: 2630[Submit][Status][Discuss]Description监狱有连续编号为1...N的N个房间,每个房间关押一个犯人,有M种宗教,每个犯人可能信仰其中一种。如果相邻房间的犯人的宗教相同,就可能发生

2015-12-14 20:41:59 426

原创 poj3253 Fence Repair (优先队列)

Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 34695 Accepted: 11177DescriptionFarmer John wants to repair a small length of the fence arou

2015-12-13 17:56:28 397

原创 poj3069 Saruman's Army (贪心)

Saruman's ArmyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6049 Accepted: 3085DescriptionSaruman the White must lead his army along a straight path

2015-12-13 17:41:18 366

hotel测试数据

一道字符串的简单题hotel的测试数据。

2013-05-22

试题安排数据

一道最大费用最大流的题---试题安排的测试数据。

2013-05-15

sbt学习资料

sbt学习资料

2013-05-09

scoi2006动态最值minmax测试数据

scoi2006动态最值minmax测试数据

2013-04-25

easy评测数据

重庆2006省选 简单题(easy) 数据

2013-04-13

奶牛分配测试数据

图匹配入门题奶牛分配的测试数据,一共有十组。

2013-04-13

yuyanggo的留言板

发表于 2020-01-02 最后回复 2020-01-02

空空如也

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

TA关注的人 TA的粉丝

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