自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

NITjianbagengmu的博客

我只是用算法活跃我生锈的大脑

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

原创 hdu_3342_拓扑排序判断是否有环

ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like HH, hh, AC, ZT, lcc, BF, Qinz and so on chat on-line to ex

2017-08-28 21:28:48 381

原创 hdu_1285_拓扑排序入门_数组模拟_队列优化

确定比赛名次有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input 输入有若干组,每组中的第一行为二个数N(1<=N<=500),M;其中N表示队伍的个数,

2017-08-28 18:21:29 428

原创 hdu_3400_三分_求两条直线间的最小距离_经典二重三分

Line beltIn a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww’s speed on AB is P and on CD is Q, he can move with the speed R on other area on the plane. How l

2017-08-24 20:53:15 281

原创 hdu_4717_三分_题意理解偏差

The Moving Points Prev Submit Status Statistics Next There are N points in total. Every point moves in certain direction and certain speed. We want to know at what time that the largest distance bet

2017-08-23 11:01:17 225

原创 poj_3301_三分_凹函数_求能覆盖N个点的最小正方形_对坐标系旋转_求新坐标

Texas TripAfter a day trip with his friend Dick, Harry noticed a strange pattern of tiny holes in the door of his SUV. The local American Tire store sells fiberglass patching material only in square sh

2017-08-22 10:57:55 394

原创 hdu_2348_三分求解最值方程_数学题_少用tan

Turn the cornerMr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to has a wi

2017-08-21 20:52:13 298

原创 hdu_2187_水

悼念512汶川大地震遇难同胞——老人是真饿了时间:2008年5月16日(震后第4天) 地点:汶川县牛脑寨 人物:羌族老奶奶【转载整理】牛脑寨是一个全村600多人的羌族寨子,震后几天,这里依然能常常听到隆隆的声音,那是对面山上石头不断滑落的声音。在完成整个突击队的抢修移动基站的任务后,我提着相机开始记录这里的受创情况。 突然,我的视线里出现一个羌族老人,这让我无比的震惊,要知道,那是一个极陡的坡

2017-08-21 15:43:04 184

原创 hdu_4355_三分_学习笔记

三分求解的问题: 一元二次方函数图形的极值,或者解的分布类似于一元二次方函数图形的样子. 凸的和凹的处理是不一样的 1. 如果f(mid) > f(mmid)可推出 ans在mmid 的左边 2. 如果f(mid) < f(mmid)可推出 ans在mid 的右边原因看图 凹就反过来 例题 hud 4355 Party All t

2017-08-21 15:16:20 204

原创 hdu_4350_数组模拟_函数调用数组

Card Bearchild is playing a card game with himself. But first of all, he needs to shuffle the cards. His strategy is very simple: After putting all the cards into a single stack, he takes out some ca

2017-08-20 21:51:03 209

原创 hdu_4357_找字符串规律

String changeIn this problem you will receive two strings S1 and S2 that contain only lowercase letters. Each time you can swap any two characters of S1. After swap,both of the two letters will increa

2017-08-20 20:38:06 266

原创 hdu_1087_和做的上一个递推一样_简单_不必复习

Super Jumping! Jumping! Jumping!Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduc

2017-08-19 10:16:41 192

原创 poj_1611_直接模拟

The SuspectsSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strat

2017-08-17 16:45:26 171

原创 poj_1611_模拟递推_刚做过类似

The SuspectsSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strat

2017-08-17 16:35:58 202

原创 codeforce_Diplomas and Certificates_水

A. Diplomas and CertificatesThere are n students who have taken part in an olympiad. Now it’s time to award the students.Some of them will receive diplomas, some wiil get certificates, and others won’t

2017-08-17 16:26:36 284

原创 hdu_1078_FatMouse and Cheese_神奇的贪心_动态规划_算不上是dp

FatMouse and Cheese FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each

2017-08-16 22:03:27 238

原创 数学_几何模板

计算几何模板总结 :精度控制尽量不要用除法,三角函数,强制类型转换(尤其是double转int)等操作,否则精度损失比较大 。 const double PI = acos(-1.0); const double EPS = 1e-8; 对小数点后1位 取整 的方法为 ±1 (+1位进位 -1为退位) eg:8(double)=7.9999999999….;

2017-08-16 19:32:20 528

原创 hdu_5104_素数表的应用

Primes ProblemGiven a number n, please count how many tuple(p1, p2, p3) satisfied that p1<=p2<=p3, p1,p2,p3 are primes and p1 + p2 + p3 = n. Input Multiple test cases(less than 100), for each test ca

2017-08-16 16:42:57 364

转载 KMP

字符串匹配是计算机的基本任务之一。  举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD"?  许多算法可以完成这个任务,Knuth-Morris-Pratt算法(简称KMP)是最常用的之一。它以三个发明者命名,起头的那个K就是著名科学家Donald Knuth。  这种算法不太容

2017-08-16 13:54:20 273

转载 计算机专业是否该读研

日子在不断地往前行着,不知不觉之间,我们已经步入大三了,现在每过去的一天,都只是意味着我们离毕业更近一步而已,到了这个特殊的时期,我们或多或少都应该为自己将来的道路而打算了,像我周围的同学,有的人已经打算就业了,他就去参加了一个Java培训班,有的人仍然打算在学业上有所成就,于是就着手考研了,情形最坏的莫过于这些两边摇摆不定,不知道应该考研还是出去工作的家伙,担心这担心那的,浪费着宝贵的准备时间,

2017-08-16 13:28:34 649

原创 hdu_2137_字符串旋转

circumgyrate the stringGive you a string, just circumgyrate. The number N means you just circumgyrate the string N times, and each time you circumgyrate the string for 45 degree anticlockwise. Input

2017-08-15 20:30:10 219

原创 hdu_6124_打表_找规律

Euler theoremPrev Submit Status Statistics Next HazelFan is given two positive integers a,b, and he wants to calculate amodb. But now he forgets the value of b and only remember the value of a, pleas

2017-08-15 19:49:39 624

原创 hdu 6130 _数学规律

KolakoskiThis is Kolakosiki sequence: 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1……. This sequence consists of 1 and 2, and its first term equals 1. Besides, if you see adjacent and equal terms as one grou

2017-08-15 19:43:18 280

原创 Codeforce_832B_Petya and Exam_字符串模拟

B. Petya and ExamIt’s hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help wit

2017-08-14 22:26:11 631

原创 Codeforce_828C_String Reconstruction_字符串处理

String ReconstructionIvan had string s consisting of small English letters. However, his friend Julia decided to make fun of him and hid the string s. Ivan preferred making a new string to finding the

2017-08-14 14:39:15 368

原创 hdu_6016

Classes The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in these courses. Now the school wants to count the number of students who en

2017-08-12 21:29:10 223

原创 Codeforce_837B - Flag of Berland

B. Flag of Berland time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The flag of Berland is such rectangular field n × m that satisfies follo

2017-08-12 12:38:15 411

原创 Codeforce_827C_Two Seals_Educational Codeforces Round 26

C. Two Seals time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output One very important person has a piece of paper in the form of a rectangle a ×

2017-08-09 22:13:49 333

原创 hdu6090_2017 Multi-University Training Contest - Team 5

Rikka with GraphAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:For an undirected graph G with n nodes and

2017-08-09 15:50:25 205

原创 hdu_6095_思维题_贪心题

Rikka with CompetitionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:A wrestling match will be held tomorr

2017-08-08 20:42:55 440

原创 hdu _1070_结构体排序

MilkIgnatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. There are many kinds of milk in the supermarket, so Ignatius wants to know which kind of milk is

2017-08-07 19:55:42 258

原创 poj1988_并查集

Cube StackingFarmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to pe

2017-08-07 16:16:32 189

原创 poj1182_并查集详解

食物链 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是”1 X Y”,表示X和Y是同类。 第二种说法是”2 X Y”,表示X吃Y。 此人对N个动物,用上述两种说法,

2017-08-06 20:29:12 194

原创 zoj 1074 前缀和+dp

To the MaxGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of a rectangle is

2017-08-03 20:10:55 223

原创 hdu 1003

Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 252133 Accepted Submission(s): 59775Problem DescriptionGiven a sequence a[1],a[2],a

2017-08-02 22:02:11 175

原创 poj 3253 Fence Repair greater<int>

Fence Repair PKU. : 3253 Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some

2017-08-01 21:04:19 184

空空如也

空空如也

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

TA关注的人

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