自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

HJ

业余算法爱好者

  • 博客(28)
  • 资源 (5)
  • 收藏
  • 关注

原创 hdu 4451 Dressing(容斥)

Problem Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K different combinations of dressing. One day he wears his pants Nike, shoes Adiwang to go to school h

2017-07-17 17:34:01 409

原创 codeforces 750-C. New Year and Rating(模拟)

Every Codeforces user has rating, described with one integer, possibly negative or zero. Users are divided into two divisions. The first division is for users with rating 1900 or higher. Those with rat

2017-07-17 14:18:34 447

原创 玲珑杯 1146(dp)

今天HH在操场上跑步,HH作为一个爱运动的人,肯定会想方设法把跑步所消耗的能量减到最少.现在这个操场上有n个可以休息的点,他们的坐标分别是x1,x2…xn(xi≤xi+1),HH刚开始在x1 ,并且他只能在这些点休息,在中途不能停下来,否则会因为旁边的音浪太强而被晃到.如果H连续跑一段长度为l的距离,那么他将会消耗2l+a的能量(a为HH的可爱值)现在给你这些点的坐标,请帮HH计算他跑到xn点所需要

2017-07-17 14:11:14 327

原创 codeforces 625-D. Finals in arithmetic(构造+模拟)

Vitya is studying in the third grade. During the last math lesson all the pupils wrote on arithmetic quiz. Vitya is a clever boy, so he managed to finish all the tasks pretty fast and Oksana Fillipovna

2017-07-16 19:03:28 426

原创 codeforces 490-C. Hacking Cypher(暴力)

Polycarpus participates in a competition for hacking into a new secure messenger. He’s almost won.Having carefully studied the interaction protocol, Polycarpus came to the conclusion that the secret ke

2017-07-16 18:49:54 415

原创 codeforces 165-C. Another Problem on Strings(计数+尺取)

A string is binary, if it consists only of characters “0” and “1”.String v is a substring of string w if it has a non-zero length and can be read starting from some position in string w. For example, s

2017-07-16 18:43:57 606

原创 codeforces 780-C. Andryusha and Colored Balloons(dfs)

Andryusha goes through a park each day. The squares and paths between them look boring to Andryusha, so he decided to decorate them.The park consists of n squares connected with (n - 1) bidirectional p

2017-07-16 18:34:04 420

原创 codeforces 676-C. Vasya and String(尺取)

High school student Vasya got a string of length n as a birthday present. This string consists of letters ‘a’ and ‘b’ only. Vasya denotes beauty of the string as the maximum length of a substring (cons

2017-07-16 18:29:39 455

原创 codeforces 743-C. Vladik and fractions(构造)

Vladik and Chloe decided to determine who of them is better at math. Vladik claimed that for any positive integer n he can represent fraction as a sum of three distinct positive fractions in form .Help

2017-07-13 16:06:58 439

原创 codeforces 467-C. George and Job(前缀和+dp)

The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn’t have enough money, so George was going to work as a programmer. Now he faced the following prob

2017-07-13 15:34:57 800

原创 codeforces 486-C. Palindrome Transformation(贪心)

Nam is playing with a string on his computer. The string consists of n lowercase English letters. It is meaningless, so Nam decided to make the string more beautiful, that is to make it be a palindrome

2017-07-13 13:39:08 481

原创 codeforces 118-D. Caesar's Legions(dp计数)

Gaius Julius Caesar, a famous general, loved to line up his soldiers. Overall the army had n1 footmen and n2 horsemen. Caesar thought that an arrangement is not beautiful if somewhere in the line there

2017-07-13 10:14:11 483

原创 玲珑杯 1091 - Black and White(dp计数)

DESCRIPTIONConstroy likes the game called Reversi. He has a long paper tape with n grids, where each grid should fill by one black chess or one white chess exactly. Constroy dislikes the situation wit

2017-07-12 14:09:57 388

原创 codeforces 712-C. Memory and De-Evolution(数学+逆推)

Memory is now interested in the de-evolution of objects, specifically triangles. He starts with an equilateral triangle of side length x, and he wishes to perform operations to obtain an equilateral tr

2017-07-12 11:25:17 550

原创 codeforces 701-C. They Are Everywhere(尺取)

Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go ou

2017-07-12 10:59:19 393

原创 codeforces 478C. Table Decorations(规律)

You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table shouldn’t have the same color. What maximu

2017-07-12 10:04:09 475

原创 codeforces 735-D. Taxes(数学)

Mr. Funt now lives in a country with a very specific tax laws. The total income of mr. Funt during this year is equal to n (n ≥ 2) burles and the amount of tax he has to pay is calculated as the maximu

2017-07-11 13:20:53 408

原创 codeforces 581-C. Developing Skills(贪心)

Petya loves computer games. Finally a game that he’s been waiting for so long came out!The main character of this game has n different skills, each of which is characterized by an integer ai from 0 to

2017-07-11 11:26:45 377

原创 codeforces 166-E. Tetrahedron(预处理+dp)

You are given a tetrahedron. Let’s mark its vertices with letters A, B, C and D correspondingly. An ant is standing in the vertex D of the tetrahedron. The ant is quite active and he wouldn’t stay idl

2017-07-11 11:20:05 811

原创 codeforces 707-C. Pythagorean Triples(数学)

Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positive integers such that you can construct a right tria

2017-07-11 11:15:12 344

原创 codeforces 570-C. Replacement(预处理+规律)

Daniel has a string s, consisting of lowercase English letters and period signs (characters ‘.’). Let’s define the operation of replacement as the following sequence of steps: find a substring “..” (tw

2017-07-11 11:07:26 440

原创 POJ 3126 Prime Path(bfs+素数打表)

Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a

2017-07-02 17:15:00 500

原创 POJ 1426 Find the Multiple(dfs)

Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there

2017-07-02 17:11:18 368

原创 hdu 1253 胜利大逃亡(三维bfs+剪枝)

Problem Description Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一

2017-07-02 13:00:00 555

原创 hdu 1240 Asteroids!(三维bfs)

Problem Description You’re in space. You want to get home. There are asteroids. You don’t want to hit them.Input Input to this problem will consist of a (non-empty) series of up to 100 data sets.

2017-07-02 12:53:57 397

原创 对acm一点点改变性的认识

相信很多人都是对编程感兴趣进而才会进入acm这个坑的吧。但是实际上,要在acm这个坑里学出点能力来,我想大概就是两个:自学能力和逻辑思维能力。先说说自学能力吧。从C语言会一些简单的编程开始,到具有比较扎实的基础功,就像熬汤一样,是一个比较漫长的过程。如果要问需要刷一些什么样的题目,简单字符串处理,模拟,简单数学和贪心。这些题目或多或少刷一些,在你的脑子里就会形成一定的逻辑思维定势了。并且你也会对常见

2017-07-01 22:06:22 934

原创 hdu 2510 符号三角形(dfs+打表)

Problem Description 符号三角形的 第1行有n个由“+”和”-“组成的符号 ,以后每行符号比上行少1个,2个同号下面是”+“,2个异 号下面是”-“ 。计算有多少个不同的符号三角形,使其所含”+“ 和”-“ 的个数相同 。 n=7时的1个符号三角形如下: + + - + - + + + - - - - + - + + + - - + + - - + - - - +I

2017-07-01 15:54:27 611

原创 nyoj 32 组合数(dfs)

描述 找出从自然数1、2、… 、n(0< n< 10)中任取r(0< r<=n)个数的所有组合。输入 输入n、r。 输出 按特定顺序输出所有组合。 特定顺序:每一个组合中的值从大到小排列,组合之间按逆字典序排列。 样例输入 5 3样例输出 543 542 541 532 531 521

2017-07-01 15:51:21 393

Fabric_源码分析.pdf

Hyperledger Fabric源码1.0版本的流程全解析,包括链码启动、Peer启动、Peer与链码交互、Endorser背书流程、Orderer启动、Orderer与Kafka集群交互等等内容

2020-05-08

字符串基本知识点讲解

对KMP算法的详细讲解(私密材料),以及Manacher算法的经典讲述。

2018-02-09

基础数据结构总结

基础数据结构的知识点的讲解、总结,包括栈、队列、二叉树、图等。

2018-02-09

动态规划总结

ACM中基础动态规划的各类知识点讲述、总结。其中包括基础DP、背包问题、数位DP、概率DP等。

2018-02-09

线段树矩形面积并讲解

ACM中对于矩形面积并用线段树+离散化+ 扫描线一类问题求解

2018-02-09

空空如也

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

TA关注的人

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