自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 1038D. Slime(思维)

There are nslimes in a row. Each slime has an integer value (possibly negative or zero) associated with it.Any slime can eat its adjacent slime (the closest slime to its left or to its right, assu...

2018-09-11 13:14:46 554

原创 1038C. Gambling(思维+模拟)

Two players A and B have a list of nintegers each. They both want to maximize the subtraction between their score and their opponent's score.In one turn, a player can either add to his score any e...

2018-09-11 11:05:19 358

原创 B Non-Coprime Partition(构造+思维)

Find out if it is possible to partition the first n positive integers into two non-empty disjoint sets S1 and S2such that:gcd(sum(S1),sum(S2))>1Here sum(S)denotes the sum of all elements pr...

2018-09-08 11:14:14 466

原创 D. Valid BFS? (BFS)

The BFS algorithm is defined as follows.Consider an undirected graph with vertices numbered from 1to n. Initialize q as a new queue containing only vertex 1, mark the vertex 1as used. Extract a ...

2018-09-06 16:44:39 512

原创 Fibonacci Tree HDU - 4786 (最小生成树)

  Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem:  Consider a bidirectional graph ...

2018-09-06 11:13:28 263

原创 C. Equalize(思维)

You are given two binary strings a and b of the same length. You can perform the following two operations on the string a:Swap any two bits at indices iand j respectively (1≤i,j≤n), the cost of t...

2018-09-05 16:23:53 462

原创 B. Reach Median(思维)

You are given an array a of n integers and an integer s. It is guaranteed that nis odd.In one operation you can either increase or decrease any single element by one. Calculate the minimum number ...

2018-09-05 15:58:05 314

原创 1008B. Turn the Rectangles(贪心)

There are n rectangles in a row. You can either turn each rectangle by 90degrees or leave it as it is. If you turn a rectangle, its width will be height, and its height will be width. Notice that yo...

2018-09-05 10:54:29 179

原创 ACM-ICPC 2018 南京赛区网络预赛 Magical Girl Haze(分层图最短路)

There are NNN cities in the country, and MMM directional roads from uuu to v(1≤u,v≤n)v(1\le u, v\le n)v(1≤u,v≤n). Every road has a distance cic_ici​. Haze is a Magical Girl that lives in City 111, she...

2018-09-03 17:01:28 331

原创 1028A. Find Square(思维)

Consider a table of size n×m, initially fully white. Rows are numbered 1 through n from top to bottom, columns 1 through mfrom left to right. Some square inside the table with odd side length was pa...

2018-09-02 21:01:51 349

原创 1029D. Concatenated Multiples(思维+数学)

You are given an array a, consisting of npositive integers.Let's call a concatenation of numbers xand y the number that is obtained by writing down numbers x and y one right after another withou...

2018-09-02 16:21:21 491 1

原创 1029C. Maximal Intersection

You are given nsegments on a number line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in each ot...

2018-09-02 11:29:26 203

原创 1029B. Creating the Contest(尺取法)

You are given a problemset consisting of n problems. The difficulty of the i-th problem is ai. It is guaranteed that all difficulties are distinct and are given in the increasing order.You have to...

2018-09-02 10:25:56 215

原创 1029A. Many Equal Substrings(字符串+思维)

You are given a string t consisting of n lowercase Latin letters and an integer number k.Let's define a substring of some string swith indices from l to r as s[l…r].Your task is to construct...

2018-09-02 09:55:05 971

空空如也

空空如也

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

TA关注的人

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