自定义博客皮肤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

为了看到更大的世界

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

原创 Technocup 2021 - Elimination Round 2 D. XOR-gun

Arkady owns a non-decreasing array ????1,????2,…,????????. You are jealous of its beauty and want to destroy this property. You have a so-called XOR-gun that you can use one or more times.In one step you can select two consecutive elements of the array, l

2020-12-09 13:53:16 201

原创 Codeforces Round #614 (Div. 1) D. Chaotic V.

"Everything has been planned out. No more hidden concerns. The condition of Cytus is also perfect.The time right now… 00:01:12…It’s time."The emotion samples are now sufficient. After almost 3 year...

2020-01-28 19:34:45 305

翻译 kudu CFile设计文档个人翻译.

CFileCFile是一种在磁盘上的存放了数据和其相关B-树索引的列式存储结构,在一个DiskRowSet中每一列和DeltaFile都会映射到一个CFile上,此外DIskRowSet的布隆过滤器也会被存储在CFile中,如果这张表含有复合主键,那么与其相关的ad-hoc index也会被存储在各自的CFile中。  尽管叫CFile,一个CFile也并不一定和真实文件系统中的一个文件一...

2018-08-26 22:06:40 628

原创 “今日头条杯”首届湖北省大学程序设计竞赛 网络赛-E.Jump A Jump(取模最短路)

Problem DescriptionThere's a very popular game called jump a jump recently.In order to get good marks, many people spend a lot of time in this game.Wei is the master of jump a jump,he can easily get a...

2018-04-21 15:24:38 671

原创 Hdu-6183 Color it(cdq分治)

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 ma

2017-10-31 17:59:36 291

原创 Codeforces Round #441 (Div. 1, by Moscow Team Olympiad) D. High Cry

Disclaimer: there are lots of untranslateable puns in the Russian version of the statement, so there is one more reason for you to learn Russian :)Rick and Morty like to go to the ridge High Cry for

2017-10-26 19:10:49 265

原创 UVALive - 7042 The Problem to Make You Happy(博弈/bfs)

分析: 之前没怎么做过博弈相关的题目,一开始还以为是道复杂的分类讨论,设状态i,j,k表示当前Alice在i点Bob再j点且这一步轮到Alice/Bob操作,若dp[i][j][k]为1则表示Bob必败,那么我们考虑边界必败状态,一是两个点重叠在一起,二是现在轮到Bob操作而且Bob到了一个出度为0的点,有了这些状态后我们可以BFS出所有的必败点,根据题意那么剩下的点就一定是必胜点了。

2017-10-18 19:51:05 346

原创 Hdu-5016 Mart Master II(点分治+二分)

Trader Dogy lives in city S, which consists of n districts. There are n - 1 bidirectional roads in city S, each connects a pair of districts. Indeed, city S is connected, i.e. people can travel betwee

2017-10-18 09:46:58 337

原创 Hdu-5126 stars(cdq分治)

John loves to see the sky. A day has Q times. Each time John will find a new star in the sky, or he wants to know how many stars between(x1,y1,z1) and (x2,y2,z2). Input The first line co

2017-10-09 14:38:03 378

原创 ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 Agent Communication(图论)

描述In Peking University, there are many homeless cats. The students of cat club built n nests and some paths for those cats. A path connects two nests directly. All nests are connected by paths and t

2017-09-25 19:39:05 572

原创 BSUIR Open 2017 Finals Financial Reports(线段树)

题意:10^5的数列,让你交换两个数,使得交换后的数列的连续区间最大和最大。分析:我们假设最优解是交换u 和 v,u >= v,那么交换后的最优解应该是以交换后u向左右两端分别扩展的一段区间,和u之前位置异侧的最大扩展值可以O(n)的DP预处理出来,然后我们考虑和u之前位置(也就是v现在的位置)同侧的最大扩展区间,可以证明在原数列中u一定是这个扩展区间终点再往后/前的最大值,所以我们考

2017-09-23 00:34:13 345

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 D. Hack Portals(区间DP)

We all have much to be proud of.As a player of the game Ingress, IloveMATH is proud of these portals on the road in front of his campus.Here is a brief introduction of this mobile game. Ingress, a

2017-09-21 20:31:42 505

原创 Hdu-6212 Zuma(区间DP)

Think about the Zuma Game. You have a row of at most 200black(0) or white(1) balls on the table at the start. Each three consecutive balls never share the same colour. You also have infinite amo

2017-09-20 12:38:00 387

原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 E. Maximum Flow

Given a directed graph with nnn nodes, labeled 0,1,⋯,n−10,1, \cdots, n-10,1,⋯,n−1.For each i,j> satisfies 0≤i0≤ijn, there exists an edge from the i-th node to the j-th node, the capacity of wh

2017-09-16 21:56:39 302

原创 Educational Codeforces Round 27 E. Fire in the City(二维离散化)

The capital of Berland looks like a rectangle of size n × m of the square blocks of same size.Fire!It is known that k + 1 blocks got caught on fire (k + 1 ≤ n·m). Those blocks are centers of ignit

2017-09-16 10:18:55 359

原创 CodeForces - 842C Ilya And The Tree(树上倍增)

Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very interesting tree rooted at vertex1. There is an integer number written on each vertex of the tree;

2017-09-15 16:14:14 289

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 Colored Graph(贪心构造)

In graph theory, graph colouring is a special case of graph labelling.It is an assignment of labels traditionally called colours to edges of a graph.Here we consider the simplest form.Given an u

2017-09-14 00:02:30 285

原创 Hdu-6200 mustedge mustedge mustedge(动态树+并查集)

Give an connected undirected graph with n nodes and m edges, (n,m≤105) which has no selfloops or multiple edges initially.Now we have q operations (q≤105):   ⋅1 u v: add an

2017-09-11 15:42:17 378

原创 HYSBZ - 2959 长跑(动态树+并查集)

某校开展了同学们喜闻乐见的阳光长跑活动。为了能“为祖国健康工作五十年”,同学们纷纷离开寝室,离开教室,离开实验室,到操场参加3000米长跑运动。一时间操场上熙熙攘攘,摩肩接踵,盛况空前。  为了让同学们更好地监督自己,学校推行了刷卡机制。  学校中有n个地点,用1到n的整数表示,每个地点设有若干个刷卡机。  有以下三类事件:  1、修建了一条连接A地点和B地点的跑道。  2、A

2017-09-11 10:46:26 278

原创 Codeforces Round #429 (Div. 1) D. Destiny(主席树)

D. Destinytime limit per test2.5 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputOnce, Leha found in the left pocket an array c

2017-08-25 17:08:05 432

原创 Hdu-6133 Army Formations(线段树合并)

Though being cruel and merciless in the battlefields, the total obedience to the command hierarchy makes message delivering between Stormtroopers quite inefficient, which finally caused the escape of

2017-08-19 20:31:50 687 4

原创 Hdu-6086 Rikka with String(AC自动机+DP)

As 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:Yuta has n01 strings si, and he wants to

2017-08-10 00:25:09 341

原创 Poj-3696 The Luckiest number(数论)

Chinese people think of '8' as the lucky digit. Bob also likes digit '8'. Moreover, Bob has his own lucky number L. Now he wants to construct his luckiest number which is the minimum among all positiv

2017-08-08 23:22:34 241

原创 Hdu-4666 Hyperspace(曼哈顿距离)

The great Mr.Smith has invented a hyperspace particle generator. The device is very powerful. The device can generate a hyperspace. In the hyperspace, particle may appear and disappear randomly. At th

2017-08-06 11:43:50 235

原创 UESTC-1633 去年春恨却来时,落花人独立,微雨燕双飞(取模最短路)

给你一个大小为n的集合S,集合里有n个互不相同正整数.有q个询问,每次询问是否能选择S中的一些数字 ( 同一个数字可以选择多次,也可以任何数字都不选),使它们相加的和为m.Input第一行一个数n(1≤n≤2000),表示集合S的大小.第二行n个数,第i个数ai(1≤ai≤50000)表示集合S中的第i个数.第三行一个数q(1≤q≤10000),表示询问次数.接下来q行,每行一个数m(0≤m≤10...

2017-08-05 12:05:01 818

原创 Hdu-6071 Lazy Running(trick最短路)

In HDU, you have to run along the campus for 24 times, or you will fail in PE. According to the rule, you must keep your speed, and your running distance should not be less than KK meters. There a

2017-08-04 17:00:26 282

原创 Hdu-4661 Message Passing(树形DP)

There are n people numbered from 1 to n. Each people have a unique message. Some pairs of people can send messages directly to each other, and this relationship forms a structure of a tree. In one tur

2017-08-02 21:54:33 249

原创 Codeforces Round #426 (Div. 1) C. Ever-Hungry Krakozyabra(搜索)

Recently, a wild Krakozyabra appeared at Jelly Castle. It is, truth to be said, always eager to have something for dinner.Its favorite meal is natural numbers (typically served with honey sauce),

2017-07-31 12:03:15 380

原创 Bzoj-3991 寻宝游戏(dfs序)

小B最近正在玩一个寻宝游戏,这个游戏的地图中有N个村庄和N-1条道路,并且任何两个村庄之间有且仅有一条路径可达。游戏开始时,玩家可以任意选择一个村庄,瞬间转移到这个村庄,然后可以任意在地图的道路上行走,若走到某个村庄中有宝物,则视为找到该村庄内的宝物,直到找到所有宝物并返回到最初转移到的村庄为止。小B希望评测一下这个游戏的难度,因此他需要知道玩家找到所有宝物需要行走的最短路程。但是这个游戏中宝物经

2017-07-30 21:29:30 250

原创 Hdu-5519 Kykneion asma(状压DP+容斥)

On the last day before the famous mathematician Swan's death, he left a problem to the world: Given integers nn and aiai for 0≤i≤40≤i≤4, calculate the number of nn-digit integers which have at mos

2017-07-29 22:31:32 774

原创 Hdu-6049 Sdjpx Is Happy(贪心)

Sdjpx is a powful man,he controls a big country.There are n soldiers numbered 1~n(11.He can divides soldiers into K disjoint non-empty subarrays. 2.He can sort a subarray many times untill a subar

2017-07-28 23:07:28 1269 11

原创 Hdu-6052 To my boyfriend(单调栈)

Dear Liao I never forget the moment I met with you. You carefully asked me: "I have a very difficult problem. Can you teach me?". I replied with a smile, "of course". You replied:"Given a matrix,

2017-07-28 00:44:54 1686 6

原创 Hdu-6053 TrickGCD(莫比乌斯函数)

You are given an array A, and Zhu wants to know there are how many different array B satisfy the following conditions? * 1≤Bi≤Ai   1 ≤Bi≤Ai * For each pair( l , r ) (1≤l≤r≤n   ) , gcd(bl

2017-07-27 21:09:34 709 2

原创 Hdu-6035 Colorful Tree(dfs)

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 375    Accepted Submission(s): 126Problem DescriptionThere is a tree with n node

2017-07-25 23:37:30 916 1

原创 Codeforces Round #182 (Div. 1) Yaroslav and Divisors(离线+树状数组)

Yaroslav has an array p = p1, p2, ..., pn (1 ≤ pi ≤ n), consisting of n distinct integers. Also, he has m queries:Query number i is represented as a pair of integers li, ri (1 ≤ li ≤ ri ≤ n).

2017-07-21 21:55:01 322

原创 Codeforces Round #170 (Div. 1) E. Binary Tree on Plane(费用流)

A root tree is a directed acyclic graph that contains one node (root), from which there is exactly one path to any other node.A root tree is binary if each node has at most two outgoing arcs.W

2017-07-21 21:11:22 323

原创 Codeforces Round #420 (Div. 2) D. Okabe and City(最短路)

Okabe likes to be able to walk through his city on a path lit by street lamps. That way, he doesn't get beaten up by schoolchildren.Okabe's city is represented by a 2D grid of cells. Rows are numb

2017-07-21 21:04:31 242

原创 Hdu-5371 Hotaru's problem(马拉车算法)

Problem DescriptionHotaru Ichijou recently is addicated to math problems. Now she is playing with N-sequence.Let's define N-sequence, which is composed with three parts and satisfied with the foll

2017-07-20 09:22:33 262

原创 Codeforces Round #416 (Div. 2) E. Vladik and Entertaining Flags(线段树+并查集)

In his spare time Vladik estimates beauty of the flags.Every flag could be represented as the matrix n × m which consists of positive integers.Let's define the beauty of the flag as number of

2017-07-17 22:26:57 333

原创 VK Cup 2017 - Round 3 D. Perishable Roads(最短路)

In the country of Never, there are n cities and a well-developed road system. There is exactly one bidirectional road between every pair of cities, thus, there are as many as  roads! No two roads

2017-06-03 21:47:54 749

空空如也

空空如也

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

TA关注的人

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