自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

LP_Cong

你的努力程度还没到拼天赋的程度。

原创 HDU - 4417 Super Mario (静态区间查询<=x的个数)

Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and M...

2017-10-26 17:52:23 185 0

原创 HDU - 4348 To the moon (可持久化线段树,区间查询加累加)

Background  To The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG Maker.  The premise of To...

2017-10-25 21:12:04 337 0

原创 GDUFS 2017信息学院程序设计新手赛(热身赛)题解

GDUFS 2017信息学院程序设计新手赛(热身赛)题解

2017-10-25 17:18:36 1014 0

原创 HDU - 2665 Kth number (静态区间第k大)

Give you a sequence and ask you the kth big number of a inteval. InputThe first line is the number of the test cases.  For each test case, the first...

2017-10-25 13:17:54 154 0

原创 HDU - 3031 To Be Or Not To Be (左偏树模板)

That's a question. Now Happy (Xi Yangyang) has been caught by Wolffy (Hui Tailang). As Wolffy is busy preparing the big meal, a good idea comes ...

2017-10-24 14:12:11 141 0

原创 HDU - 3473 Minimum Sum(划分树模板)

Minimum Sum   Problem Description You are given N positive integers, denoted as x0, x1 ... xN-1. Then give you some intervals [l, r]. For each int...

2017-10-23 21:42:41 138 0

原创 HDU - 5002 Tree (动态树模板)

Tree Problem Description You are given a tree with N nodes which are numbered by integers 1..N. Each node is associated with an integer as the we...

2017-10-18 21:23:04 188 0

转载 虚树模板

虚树详解+例子分析+模板 概念: 给出一棵树. 每次询问选择一些点,求一些东西.这些东西的特点是,许多未选择的点可以通过某种方式剔除而不影响最终结果. 于是就有了建虚树这个技巧..... 我们可以用log级别的时间求出点对间的lca.... 那么...

2017-10-17 20:10:24 216 0

原创 HYSBZ - 2243 染色(树链剖分 线段树 区间染色)

染色 Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1、将节点a到节点b路径上所有点都染成颜色c; 2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段), 如“112221”由3段组成:“11”、“222”和“1”。 请你写一个程...

2017-10-17 16:50:00 126 0

原创 POJ - 3237 Tree (树链剖分+线段树+区间修改)

Tree Description You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each ...

2017-10-17 15:06:08 219 0

原创 SPOJ QTREE(树链剖分模板)

QTREE - Query on a tree You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. We will ask yo...

2017-10-16 15:04:44 139 0

原创 POJ - 3580 SuperMemo (伸展树模板 全)

SuperMemo Description Your friend, Jackson is invited to a TV show called SuperMemo in which the participant is told to play a memorizing g...

2017-10-13 15:53:38 215 0

原创 HDU - 4352 XHXJ's LIS(数位DP+状态压缩)

XHXJ's LIS Problem Description #define xhxj (Xin Hang senior sister(学姐))  If you do not know xhxj, then carefully reading the entire desc...

2017-10-12 14:48:00 154 0

原创 HDU - 3886 Final Kichiku “Lanlanshu”(数位DP,各种形状模板)

Final Kichiku “Lanlanshu” Problem Description During 2010 summer training, temperlisyer often does problem like this: “Consider a decimal in...

2017-10-12 13:50:14 164 0

原创 LightOJ - 1205 Palindromic Numbers(回文数个数,数位DP)

A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this...

2017-10-11 22:57:42 301 0

原创 CodeForces - 55D (完美数)

Beautiful numbers Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only ...

2017-10-11 19:58:57 456 0

原创 LightOJ - 1140 How Many Zeroes?(数位DP,有前导0)

Jimmy writes down the decimal representations of all natural numbers between and including m and n, (m ≤ n). How many zeroes will he write down? ...

2017-10-11 18:50:04 152 0

原创 HDU - 3652 B-number(数位DP)

B-number Problem Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string &qu...

2017-10-11 18:42:53 162 0

原创 HDU - 2089 不要62(数位DP入门)

不要62 Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不...

2017-10-10 20:30:50 138 0

原创 POJ - 1947 Rebuilding Roads(树上背包)

Rebuilding Roads Description The cows have reconstructed Farmer John's farm, with its N barns (1 <= N <= 150, number 1..N) after...

2017-10-10 15:23:10 158 0

原创 POJ - 1192 最优连通子集 (树形DP)

最优连通子集 Description 众所周知,我们可以通过直角坐标系把平面上的任何一个点P用一个有序数对(x, y)来唯一表示,如果x, y都是整数,我们就把点P称为整点,否则点P称为非整点。我们把平面上所有整点构成的集合记为W。  定义1 两个整点P1(x1, y1), ...

2017-10-10 13:56:22 191 0

原创 HDU - 2196 Computer(树形DP)

Computer Problem Description A school bought the first computer some time ago(so this computer's id is 1). During the recent years the s...

2017-10-09 21:41:09 202 3

原创 POJ - 1463 Strategic game(树形DP)

Strategic game Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast en...

2017-10-09 19:13:54 148 0

原创 GYM - 101485K Kitchen Combinatorics

题意:这是道阅读题,认认真真读完题就好了…… 解题思路:读完题之后就会发现,是一道简单题。难点在于怎么判断大于1e18……这里我用了long double 去判断…… #include #include #include #include #include #inclu...

2017-10-09 18:00:15 316 0

原创 GYM - 101503L Remote Control

题意:给你一个特殊的遥控器,问你换台所需按按键的最小次数。 解题思路:台数很少,爆搜即可。 #include #include #include using namespace std; typedef long long int ll; const ll INF=(1LL&l...

2017-10-09 17:42:54 159 0

原创 GYM - 101503C Twisting the Number

Twisting the Number Professor Dull invented a direction in number theory. This is the theory of “twisting generators”. Considera positive integer nu...

2017-10-09 17:35:21 246 0

原创 GYM - 101201B Buggy Robot(BFS+DP)

You are trying to program a robot to navigate through a 2-dimensional maze and find the exit.The maze can be represented as a grid with n rows and m ...

2017-10-02 21:49:26 643 0

原创 GYM - 101201J Shopping(线段树求不比C大的第一个数)

The sale bin of Big Box Bargains contains n products in a row. The ith item has price ai per unit.There is no limit to the quantity of any item.There...

2017-10-02 20:38:01 217 0

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