自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

希望的专栏

有梦的地方就有希望

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

原创 Hdu 1501 Zipper【dfs】

ZipperTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9212 Accepted Submission(s): 3263Problem DescriptionGiven three strings,

2016-05-31 19:52:54 358

原创 Poj 1986 Distance Queries【LCA】

Distance QueriesTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 11686 Accepted: 4131Case Time Limit: 1000MSDescriptionFarmer John's cows refused

2016-05-23 22:31:19 425

原创 Hdu 2586 How far away ?【lca】

How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11393 Accepted Submission(s): 4160Problem DescriptionThere are n ho

2016-05-23 22:26:29 290

原创 Hdu 5698 瞬间移动【组合+逆元】

瞬间移动Problem Description有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第nn行第mm列的格子有几种方案,答案对10000000071000000007取模。Input多组测试数据。两个整数n,m(2\leq

2016-05-22 20:35:05 517

原创 Light oj 1261 - K-SAT Problem【模拟】

1261 - K-SAT Problem   PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBSAT was the first known NP-complete problem. The problem re

2016-05-22 13:57:37 454

原创 Light oj 1249 - Chocolate Thief【水】

1249 - Chocolate Thief   PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBI gave some chocolates to students for their extraordinar

2016-05-22 10:20:20 372

原创 Light oj 1241 - Pinocchio【水】

1241 - Pinocchio   PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBYou must have heard the name of Pinocchio. If you never heard

2016-05-22 09:44:51 328

原创 CodeForces 246D. Colorful Graph【STL】

D. Colorful Graphtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got an undirected graph, consistin

2016-05-22 09:25:40 439

原创 CodeForces 246A. Buggy Sorting【思维】

A. Buggy Sortingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle boy Valera studies an algorithm of

2016-05-21 22:14:01 272

原创 CodeForces 246B B. Increase and Decrease【思维】

B. Increase and Decreasetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus has an array, consistin

2016-05-21 22:03:52 384

原创 Light 1305 - Area of a Parallelogram【向量求解】

1305 - Area of a Parallelogram   PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBA parallelogram is a quadrilateral with two pairs

2016-05-21 21:54:46 333

原创 Light oj 1433 - Minimum Arc Distance【计算几何(坑精度!)】

1433 - Minimum Arc Distance   PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBYou all probably know how to calculate the distance

2016-05-21 21:15:59 509

原创 Light oj 1414 - February 29【容斥原理】

1414 - February 29   PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBIt is 2012, and it's a leap year. So there is a "February 29"

2016-05-21 20:39:59 470 2

原创 Light oj 1387 - Setu【字符串】

1387 - Setu   PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBRahaduzzaman Setu, (Roll - 12) of 13th batch, CSE, University of Dha

2016-05-21 19:39:03 318

原创 Light oj 1338 - Hidden Secret!【字符串】

1338 - Hidden Secret!   PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBIn this problem you are given two names, you have to find

2016-05-21 19:29:41 354

原创 hdu 1115 Lifting the Stone【多边形重心】

Lifting the StoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7048 Accepted Submission(s): 2967Problem DescriptionThere are

2016-05-21 17:02:55 252

原创 nyoj 3 多边形重心问题

多边形重心问题时间限制:3000 ms  |  内存限制:65535 KB难度:5描述在某个多边形上,取n个点,这n个点顺序给出,按照给出顺序将相邻的点用直线连接, (第一个和最后一个连接),所有线段不和其他线段相交,但是可以重合,可得到一个多边形或一条线段或一个多边形和一个线段的连接后的图形; 如果是一条线段,我们定义面积为0,重心坐标为(0,0).现在求给出

2016-05-17 21:23:07 968

原创 nyoj 7 街区最短路径问题【大水】

街区最短路径问题时间限制:3000 ms  |  内存限制:65535 KB难度:4描述一个街区有很多住户,街区的街道只能为东西、南北两种方向。住户只可以沿着街道行走。各个街道之间的间隔相等。用(x,y)来表示住户坐在的街区。例如(4,20),表示用户在东西方向第4个街道,南北方向第20个街道。现在要建一个邮局,使得各个住户到

2016-05-17 18:41:02 296

原创 hdu 5685 Problem A【逆元】

Problem Description度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到:H(s)=\prod_{i=1}^{i\leq len(s)}(S_{i}-28)\ (mod\ 9973)H(s)=∏​i=1​i≤l

2016-05-14 22:12:28 1422

原创 百度之星2015 资格赛 IP聚合【水坑】

IP聚合  Accepts: 371  Submissions: 920 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others)Problem Description当今世界,网络已经无处不在了,小度熊由于犯

2016-05-11 22:32:57 283

原创 百度之星 2015资格赛 列变位法解密【字符串】

列变位法解密  Accepts: 335  Submissions: 1017 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others)Problem Description列变位法是古典密码算法中变位加密的一

2016-05-11 21:11:29 438

原创 百度之星2015 资格赛:大搬家

大搬家  Accepts: 216  Submissions: 756 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others)Problem Description近期B厂组织了一次大搬家,所有人都要按照指示换到指定

2016-05-11 19:39:05 461

原创 NJUST 1922 count_prime【容斥原理】

count_primeTime Limit: 1000msMemory Limit: 65536KB[显示标签]Description给定你一个数n,请你统计出在[a,b]这个区间中和n互质的数的个数。两个数互质当且仅当他们除了1之外没有其他的公共因子或者他们最大的公共因子是1。1和任何数是互素的。Input第一行输入一个整数T(

2016-05-09 21:08:36 310

原创 Hdu 4009 Transfer water【最小树形图】

Transfer waterTime Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 4702 Accepted Submission(s): 1665Problem DescriptionXiaoA lives in

2016-05-08 22:03:45 563

原创 Poj 3164 Command Network【最小树形图】

Command NetworkTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 15914 Accepted: 4583DescriptionAfter a long lasting war on words, a war on arms fina

2016-05-08 17:24:22 1336

原创 NJUST 1920 偷吃糖果【水】

偷吃糖果Time Limit: 1000MsMemory Limit: 65536KB[显示标签]Description小鱼喜欢吃糖果。他有两盒糖果,两盒糖果分别仅由小写字母组成的字符串s和字符串t构成。其中'a'到'z'表示具体的某种糖果类别。他原本打算送给他喜欢的女生,但是要送给女孩子的话两盒糖果不能有差别(即字符串s和t完全相同)。所以,他决定偷吃几块,他

2016-05-08 08:31:42 557

原创 nyoj 118 修路方案【次小生成树】

修路方案时间限制:3000 ms  |  内存限制:65535 KB难度:5描述南将军率领着许多部队,它们分别驻扎在N个不同的城市里,这些城市分别编号1~N,由于交通不太便利,南将军准备修路。现在已经知道哪些城市之间可以修路,如果修路,花费是多少。现在,军师小工已经找到了一种修路的方案,能够使各个城市都联通起来,而且花费最少。但是,南

2016-05-07 16:17:38 766

原创 URAl 1416 Confidential【次小生成树】

1416. ConfidentialTime limit: 2.0 secondMemory limit: 64 MBZaphod Beeblebrox — President of the Imperial Galactic Government. And by chance he is an owner of enterprises that trade in se

2016-05-07 14:55:44 570

原创 Poj 1679 The Unique MST【次小生成树】

The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26434 Accepted: 9450DescriptionGiven a connected undirected graph, tell if its minimum s

2016-05-07 12:45:13 455

原创 Light oj 1112 - Curious Robin Hood【单点更新】

1112 - Curious Robin Hood   PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 64 MBRobin Hood likes to loot rich people since he helps th

2016-05-06 19:26:12 505

原创 Light oj 1331 - Agent J【计算】

1331 - Agent J   PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBAgent J is preparing to steal an antique diamond piece from a mus

2016-05-05 22:37:05 320

原创 BZoj 1016: [JSOI2008]最小生成树计数【最小生成树】

1016: [JSOI2008]最小生成树计数时间限制: 1 Sec  内存限制: 162 MB提交: 4446  解决: 1797[提交][][]题目描述  现在给出了一个简单无向加权图。你不满足于求出这个图的最小生成树,而希望知道这个图中有多少个不同的最小生成树。(如果两颗最小生成树中至少有一条边不同,则这两个最小生成树就是不同的)。由于不同的最小生成树可能很多

2016-05-02 22:00:59 418

原创 最后一个单词的长度【格式控制】

原题网址:http://nanti.jisuanke.com/t/12给定由大写,小写字母和空格组成的字符串,返回最后一个单词的长度。如果不存在最后一个单词,返回0注意:   “单词”是指不包含空格符号的字符串例如:   s = “hello World”, 那么返回的结果是5格式:   第一行输入字符串s,然后输出s中最后一个单词的长度。样例1

2016-05-02 17:27:47 1181

原创 大钉骑马走江湖【bfs】

原题网址:http://nanti.jisuanke.com/t/11064江湖是什么,对于在象棋界厮杀的大钉来说,江湖就是一个矩阵,他的目标,就是在江湖之中骑着马,从他的位置出发,走到终点。当然,大钉的马也遵从中国象棋中的“马走日”的规则,而且在矩阵中,也会有一些障碍物,马不能跳到障碍物上;如果大钉的马面前有障碍物,即被“别马腿”,那么他将不能跳向有障碍物的左前和右前这两个方向。请问

2016-05-02 17:16:59 652

原创 Zoj 3947 Very Happy Great BG【水】

Very Happy Great BGTime Limit: 2 Seconds      Memory Limit: 65536 KBThe summer training of ZJU ICPC in July is about to end. To celebrate this great and happy day, the coach of ZJU ICPC Team

2016-05-02 11:29:06 379

原创 Zoj 3936 Apples and Ideas【水】

Apples and IdeasTime Limit: 2 Seconds      Memory Limit: 65536 KB"If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if

2016-05-02 11:14:53 394

原创 Light oj 1094 - Farthest Nodes in a Tree【树的直径】

1094 - Farthest Nodes in a Tree   PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBGiven a tree (a connected graph with no cycles),

2016-05-02 10:00:53 558

原创 Poj 2891 Strange Way to Express Integers【crt】

Strange Way to Express IntegersTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 12923 Accepted: 4126DescriptionElina is reading a book written by Ru

2016-05-01 22:47:54 291

原创 Poj 2255 Tree Recovery【dfs遍历树】

Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13448 Accepted: 8393DescriptionLittle Valentine liked playing with binary trees very much

2016-05-01 21:31:05 861

原创 Poj 2907 Collecting Beepers【枚举+最短路径】

Collecting BeepersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2534 Accepted: 1369DescriptionKarel is a robot who lives in a rectangular coordina

2016-05-01 17:02:59 390

空空如也

空空如也

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

TA关注的人

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