自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

WZJRJ28

为了看到更大的世界

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

原创 Codeforces Round #362 (Div. 1) B. Puzzles(递推)

B. Puzzlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBarney lives in country USC (United States of Charzeh). USC

2016-09-23 14:33:47 273

原创 Hdu-5886 Tower Defence(树形DP)

Problem DescriptionThere was a civil war between two factions in Skyrim, a province of the Empire on the continent of Tamriel. The Stormcloaks, led by Ulfric Stormcloak, are made up of Skyrim's nati

2016-09-20 22:12:31 831

原创 Hdu-5884 Sort(k叉哈夫曼树)

Problem DescriptionRecently, Bob has just learnt a naive sorting algorithm: merge sort. Now, Bob receives a task from Alice.Alice will give Bob N sorted sequences, and the i-th sequence includ

2016-09-20 15:34:40 396

原创 Hdu-5900 QSC and Master(区间DP)

Problem DescriptionEvery school has some legends, Northeastern University is the same.Enter from the north gate of Northeastern University,You are facing the main building of Northeastern Univer

2016-09-20 12:59:33 300

原创 Hdu-5898 odd-even number(数位DP)

Problem DescriptionFor a number,if the length of continuous odd digits is even and the length of continuous even digits is odd,we call it odd-even number.Now we want to know the amount of odd-even n

2016-09-20 12:50:59 365

原创 Hdu-5893 List wants to travel(树链剖分)

Problem DescriptionA boy named List who is perfect in English. Now he wants to travel and he is making a plan. But the cost of living in same citie always changes. Now he wants to know how many diff

2016-09-18 23:11:53 350

原创 Codeforces Round #372 (Div. 1) C. Digit Tree(树的点分治)

ZS the Coder has a large tree. It can be represented as an undirected connected graph ofn vertices numbered from 0 to n - 1 and n - 1 edges between them. There is a single nonzero digit writte

2016-09-18 01:21:21 688

原创 Spoj - 1825 Free tour II(树的点分治)

题意:给一棵树,m个黑点和一个K,问最长的不超过k个黑点的带权路径。分析:树上的点分治,被卡了一天,因为宏定义出现了神奇的错误。#include#include#include#include#include#include#include#include#include#include#include#define INF 0x3f3f3f3f#d

2016-09-16 23:42:27 323

原创 Codeforces Round #371 (Div. 1) A. Sonya and Queries(trie)

A. Sonya and Queriestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday Sonya learned about long integers and invit

2016-09-14 23:39:44 311

原创 Codeforces Round #371 (Div. 1) C. Sonya and Problem Wihtout a Legend(贪心+DP)

Sonya was unable to think of a story for this problem, so here comes the formal description.You are given the array containing n positive integers. At one turn you can pick any element and increase

2016-09-14 17:30:59 388

原创 Poj-1741 Tree(树的点分治)

DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001).Define dist(u,v)=The min distance between node u and v. Give an integer k,for every pair (u,v)

2016-09-12 23:44:07 368

原创 Codeforces Round #364 (Div. 1) C. Break Up (桥)

Again, there are hard times in Berland! Many towns have such tensions that even civil war is possible.There are n towns in Reberland, some pairs of which connected by two-way roads. It is not guar

2016-09-12 01:38:46 357

原创 Codeforces Round #370 (Div. 2) 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 lengthx, and he wishes to perform operations to obtain an equilateral

2016-09-11 23:20:08 190

原创 Codeforces Round #370 (Div. 2) D. Memory and Scores(DP)

Memory and his friend Lexa are competing to get higher score in one popular computer game. Memory starts with scorea and Lexa starts with score b. In a single turn, both Memory and Lexa get some i

2016-09-11 23:12:13 290

原创 Hdu-5869 Different GCD Subarray Query(区间不同值离线算法)

Problem DescriptionThis is a simple problem. The teacher gives Bob a list of problems about GCD (Greatest Common Divisor). After studying some of them, Bob thinks that GCD is so interesting. One day

2016-09-10 23:43:19 491

原创 Hdu-5875 Function(树上倍增st算法)

Problem DescriptionThe shorter, the simpler. With this problem, you should be convinced of this truth.    You are given an array A of N postive integers, and M queries in the form (l,r).

2016-09-10 20:14:21 614

原创 Codeforces Round #364 (Div. 1) B. Connecting Universities(图论)

Treeland is a country in which there are n towns connected byn - 1 two-way road such that it's possible to get from any town to any other town.In Treeland there are 2k universities which are loc

2016-09-10 01:22:49 270

原创 Codeforces Round #364 (Div. 1) A. As Fast As Possible

On vacations n pupils decided to go on excursion and gather all together. They need to overcome the path with the lengthl meters. Each of the pupils will go with the speed equal tov1. To get to th

2016-09-09 22:35:24 306

原创 2014 Nordic Collegiate Programming Contest A - Amanda Lounges

题意:给n个点m条边的图,每条边有一个权重,表示两端点的权值和,每个点的权值为0或1,问所有点的最小权重。分析:类似2-SAT的方法对全图染色,注意每个点染两次,取最小值。#include#include#include#include#include#include#include#include#include#include#include#in

2016-09-08 19:49:41 500

原创 AIM Tech Round 3 (Div. 1) C. Centroids(树形DP)

C. Centroidstime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputTree is a connected acyclic graph. Suppose you are given

2016-09-06 21:54:00 341

原创 Codeforces Round #368 (Div. 2) E. Garlands(二维树状数组)

E. Garlandstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLike all children, Alesha loves New Year celebration. Dur

2016-09-05 19:28:58 336

原创 AIM Tech Round 3 (Div. 1) B. Recover the String(构造)

B. Recover the Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor each string s consisting of characters '0' a

2016-09-05 16:19:21 344

原创 UVALive 7155 Keyboarding(BFS)

题意:给定一个r*c的键盘,键盘由字母和数字还有一些符号的按键组成,键盘光标的起始位置在左上角,每次移动可以朝上下左右四个方向跳到一个和当前位置字符不同的按键处,给定一串长字符,问至少要按多少次键盘。分析:直接BFS,f[i][j][k]表示当前在(i,j)位置,已经按了k个键的最小值。#include#include#include#include#include

2016-09-03 19:03:40 458

原创 Gym 100960G Youngling Tournament(splay)

Descriptionstandard input/outputStatementsYoda, the Grand Master of the Jedi Order, hit on the idea to hold a tournament among younglings. He has not chosen the date yet, but he has already de

2016-09-01 00:24:58 568

空空如也

空空如也

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

TA关注的人

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