自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

HJY

一只想要翻身的咸鱼

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

转载 java常用包简介

一、常用的基础类库:11个jar(Java Archive,Java归档)包作为java语言使用者,我们可以感受到java语言带来的优势(平台无关、面向对象、多线程、高效易扩展等),而且它有很多已经实现的类库可以供我们直接使用,这些类库都是以jar包的形式提供的,也可以成为java API,它为编程者实现了各种常用操作的方法,为程序员编写java程序代码带来了许多方便。 作为初学者,我觉得熟练掌握和应用java基础类库是很有必要的。因此,总结了一些自己在初学java时的一些基础类知识点。Java 2

2017-09-27 21:09:43 7637

原创 HDU 5510 Bazinga(KMP||strstr神器+些许优化)

Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious.For nn given strings S1,S2,⋯,SnS1,S2,⋯,Sn, labelled from 11 to nn, you should find the largest i (1≤i≤n)i (1≤i≤n) such that there exists an integer j (1≤j<i)j (1≤j<i) and SjS

2017-09-26 21:22:26 581

原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 J. Minimum Distance in a Star Graph(bfs+状态保存)

In this problem, we will define a graph called star graph, and the question is to find the minimum distance between two given nodes in the star graph.Given an integer nn, an n-dimensionaln−dimensional star graph, also referred to as S_{n}S​n​​ , is an

2017-09-24 17:03:01 935

原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 L. The Heaviest Non-decreasing Subsequence Problem(最长不下降子序列变形)

Let SS be a sequence of integers s_{1}s​1​​ , s_{2}s​2​​ , ......, s_{n}s​n​​ Each integer is is associated with a weight by the following rules:(1) If is is negative, then its weight is 00.(2) If is is greater than or equal to 1000010000, then

2017-09-24 16:59:56 685

原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 F. Overlapping Rectangles(扫描线)

There are nn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with each other, and the overlapped areas of these rectangles shall not be counted more than once. For example,

2017-09-24 16:57:25 426

原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 B.Train Seats Reservation(模拟)

You are given a list of train stations, say from the station 11 to the station 100100.The passengers can order several tickets from one station to another before the train leaves the station one. We will issue one train from the station 11 to the station

2017-09-24 16:52:44 394

原创 ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 I.Minimum(线段树区间极值+分类讨论)

You are given a list of integers a0, a1, …, a2^k-1.You need to support two types of queries:1. Output Minx,y∈[l,r] {ax∙ay}.2. Let ax=y.

2017-09-23 17:04:49 456

原创 ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 A. Visiting Peking University(模拟水题)

Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …, n-1. He plans to spend m consecutive days(2 ≤ m ≤ n)in Beijing. During these m days, he intends to use the first day and another day to visit Peking

2017-09-23 17:00:02 696

原创 HDU 5536 Chip Factory(暴力+优化)

John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a serial number. More specifically, the factory produces nn chips today, the ii-th chip produced this day has a s

2017-09-21 21:03:29 235

原创 HDU 5533 Dancing Stars on Me (暴力模拟+思维)

The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky if we connect them properly. You want to record these moments by your smart c

2017-09-21 20:32:21 276

原创 HDU 5532 Almost Sorted Array(最长不下降子序列nlogn模板)

We are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. But sometimes it is an overkill to use these algorithms for an almost sorted array. We say an array is sorted if its element

2017-09-21 20:28:27 309

原创 HDU 5551 Huatuo's Medicine(宇宙无敌炒鸡大水题)

Huatuo was a famous doctor. He use identical bottles to carry the medicine. There are different types of medicine. Huatuo put medicines into the bottles and chain these bottles together. However, there was a critical problem. When Huatuo arrived the pati

2017-09-19 21:26:15 369

原创 HDU 5547 Sudoku(dfs+模拟+状态判断)

Yi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but smaller. Actually, Yi Sima was playing it different. First of all, he tried to generate a 4×44×4 board with every row contains

2017-09-19 21:18:38 354

原创 hdu 5546 Ancient Go(bfs+模拟)

Yu Zhou likes to play Go with Su Lu. From the historical research, we found that there are much difference on the rules between ancient go and modern go. Here is the rules for ancient go they were playing: ⋅⋅The game is played on a 8×88×8 cell board, t

2017-09-19 21:12:58 516

原创 HDU 6208 The Dominator of Strings(stl)

Here you have a set of strings. A dominator is a string of the set dominating all strings else. The string S is dominated by T if S is a substring of T.

2017-09-19 17:54:16 378

原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 C.Sum(找规律)

Define the function S(x)S(x) for xx is a positive integer. S(x)S(x) equals to the sum of all digit of the decimal expression of xx. Please find a positive integer kk that S(k*x)\%233=0S(k∗x)%233=0.

2017-09-16 17:49:33 745

原创 HDU 6201 transaction transaction transaction(SPFA算法求最长路径)

Kelukin is a businessman. Every day, he travels around cities to do some business. On August 17th, in memory of a great man, citizens will read a book named "the Man Who Changed China". Of course, Kelukin wouldn't miss this chance to make money, but he doe

2017-09-14 20:52:00 378

原创 HDU 5493 Queue(树状数组+二分)

NN people numbered from 1 to NN are waiting in a bank for service. They all stand in a queue, but the queue never moves. It is lunch time now, so they decide to go out and have lunch first. When they get back, they don’t remember the exact order of the que

2017-09-12 21:32:43 320

原创 HDU 5491 The Next(技巧性模拟)

Let LL denote the number of 1s in integer DD’s binary representation. Given two integers S1S1 and S2S2, we call DD a WYH number if S1≤L≤S2S1≤L≤S2. With a given DD, we would like to find the next WYH number YY, which is JUST larger than DD. In other words,

2017-09-12 21:27:44 274

原创 HDU 6205 card card card(展开字符串思想+思维)

As a fan of Doudizhu, WYJ likes collecting playing cards very much. One day, MJF takes a stack of cards and talks to him: let's play a game and if you win, you can get all these cards. MJF randomly assigns these cards into n heaps, arranges in a row, and

2017-09-10 17:46:13 1228 2

原创 HDU 6197 array array array(最长不下降子序列)

One day, Kaitou Kiddo had stolen a priceless diamond ring. But detective Conan blocked Kiddo's path to escape from the museum. But Kiddo didn't want to give it back. So, Kiddo asked Conan a question. If Conan could give a right answer, Kiddo would return t

2017-09-10 17:43:20 330

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 F. Islands(有向图加边变成一个强连通图)

On the mysterious continent of Tamriel, there is a great empire founded by human.To develope the trade, the East Empire Company is set up to transport goods from place to place.Recently, the company wants to start their business in Solstheim, which is

2017-09-09 16:59:49 1313

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 H. Skiing(记忆化dfs)

In this winter holiday, Bob has a plan for skiing at the mountain resort.This ski resort has MM different ski paths and NNdifferent flags situated at those turning points.The ii-th path from the S_iS​i​​ -th flag to the T_iT​i​​ -th flag has length

2017-09-09 16:59:16 482

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 A. Banana(连通性水题)

Bananas are the favoured food of monkeys.In the forest, there is a Banana Company that provides bananas from different places.The company has two lists.The first list records the types of bananas preferred by different monkeys, and the second one rec

2017-09-09 16:58:50 396

原创 Codeforces Round #433 (Div. 2) C. Planning(贪心)

Helen works in Metropolis airport. She is responsible for creating a departure schedule. There are n flights that must depart today, the i-th of them is planned to depart at the i-th minute of the day.Metropolis airport is the main transport hub of Metro

2017-09-07 14:53:26 502

原创 Codeforces Round #433 (Div.2 ) B. Maxim Buys an Apartment(水题)

Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis. The house has n apartments that are numbered from 1 to n and are arranged in a row. Two apartments are adjacent if their indices differ by 1. Some of the apartments can already be

2017-09-07 14:47:08 590

原创 HDU 6183 Color it(线段树+思维+高端的优化技巧)

Do you like painting? Little D doesn't like painting, especially messy color paintings. Now Little B is painting. To prevent him from drawing messy painting, Little D asks you to write a program to maintain following operations. The specific format of thes

2017-09-06 16:58:24 821

原创 Educational Codeforces Round 28 A. Curriculum Vitae(读懂题意后的暴力水题)

Hideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still needs a CV to apply for a job.During all his career Hideo has produced n games. Some of them were successful, some

2017-09-06 10:02:18 732

原创 hdu 6184 Counting Stars(求无向图三元环)

Little A is an astronomy lover, and he has found that the sky was so beautiful! So he is counting stars now! There are n stars in the sky, and little A has connected them by m non-directional edges. It is guranteed that no edges connect one star with

2017-09-05 21:12:42 788 2

原创 HDU 6187 Destroy Walls(最大生成树)

Long times ago, there are beautiful historic walls in the city. These walls divide the city into many parts of area. Since it was not convenient, the new king wants to destroy some of these walls, so he can arrive anywhere from his castle. We assume that

2017-09-05 19:46:42 454

原创 HDU 6188 Duizi and Shunzi(贪心)

Nike likes playing cards and makes a problem of it. Now give you n integers, ai(1≤i≤n)ai(1≤i≤n) We define two identical numbers (eg: 2,22,2) a Duizi, and three consecutive positive integers (eg: 2,3,42,3,4) a Shunzi. Now you want to use these intege

2017-09-05 14:56:29 912

原创 HDU 6186 CS Course(线段树区间操作)

Little A has come to college and majored in Computer and Science. Today he has learned bit-operations in Algorithm Lessons, and he got a problem as homework. Here is the problem: You are giving n non-negative integers a1,a2,⋯,ana1,a2,⋯,an, and some q

2017-09-05 14:48:41 341

原创 Codeforces Round #432 (Div. 2) B. Arpa and an exam about geometry(数学水题)

Arpa is taking a geometry exam. Here is the last problem of the exam.You are given three points a, b, c.Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old position of b,

2017-09-04 23:28:08 1035 4

原创 HDU 3549 Flow Problem(最大流+EK邻接表||邻接矩阵||dinic算法模板比较)

Network flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.

2017-09-04 19:48:33 837

转载 网络流题集【转】

博客原文:http://blog.csdn.net/shahdza/article/details/7779537最近搞网络流。。觉得这篇博客总结的题集感觉很有用,mark转载下来【HDU】1532Drainage Ditches(入门)    [最大流]3549 Flow Problem(入门)    [最大流]3572 Task Schedule(基础)    [最大流

2017-09-04 19:40:20 522

原创 POJ 1459 Power Network(最大流+dinic算法模板)

A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 <= p(u) <= p max(u) of power, may consume an amount 0 <= c

2017-09-04 16:53:33 340

原创 POJ 1459 Power Network(最大流+EK算法邻接矩阵写法)

A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 <= p(u) <= p max(u) of power, may consume an amount 0 <= c

2017-09-04 10:53:13 392

原创 HDU 1532 Drainage Ditches(最大流+EK算法模板题)

Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Be

2017-09-03 20:29:58 498

原创 CodeForces125E MST Company(根限度为k的最小生成树+二分)

The MST (Meaningless State Team) company won another tender for an important state reform in Berland.There are n cities in Berland, some pairs of the cities are connected by roads. Each road has its price. One can move along any road in any direction. The

2017-09-03 15:25:37 855

原创 Codeforces Round #431 (Div. 2) B. Tell Your World(技巧性模拟+精度坑死人系列)

Connect the countless points with lines, till we reach the faraway yonder.There are n points on a coordinate plane, the i-th of which being (i, yi).Determine whether it's possible to draw two parallel and non-overlapping lines, such that every point in

2017-09-02 20:16:46 331

空空如也

空空如也

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

TA关注的人

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