# Codeforces Round #466 (Div. 2) E. Cashback （dp+树状数组+RMQ）

Since you are the best Wraith King, Nizhniy Magazin «Mir» at the centre of Vinnytsia is offering you a discount.You are given an array a of length n ...

# Codeforces Round #464 (Div. 2) E. Maximize!

You are given a multiset S consisting of positive integers (initially empty). There are two kind of queries:Add a positive integer to S, the newly ad...

# Codeforces Round #464 (Div. 2) D. Love Rescue

Valya and Tolya are an ideal pair, but they quarrel sometimes. Recently, Valya took offense at her boyfriend because he came to her in t-shirt with l...

# Codeforces Round #464 (Div. 2) C. Convenient For Everybody

In distant future on Earth day lasts for n hours and that's why there are n timezones. Local times in adjacent timezones differ by one hour. For desc...

# BZOJ 2442[Usaco2011 Open] 修剪草坪 （dp+单调队列）

Description在一年前赢得了小镇的最佳草坪比赛后，FJ变得很懒，再也没有修剪过草坪。现在，新一轮的最佳草坪比赛又开始了，FJ希望能够再次夺冠。然而，FJ的草坪非常脏乱，因此，FJ只能够让他的奶牛来完成这项工作。FJ有N(1 &amp;lt;= N &amp;lt;= 100...

# Codecraft-18 and Codeforces Round #458 D. Bash and a Tough Math Puzzle（线段树）

Bash likes playing with arrays. He has an array a1, a2, ... an of n integers. He likes to guess the greatest common divisor (gcd) of different segm...

# Codecraft-18 and Codeforces Round#458 C. Travelling Salesman and Special Numbers（数位DP）

The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pass time, he likes to perform operations on numbers. One such o...

# SGU 144. Meeting（概率）

Two of the three members of the winning team of one of the ACM regional contests are going to meet in order to train for the upcoming World Finals. T...

# SGU 143. Long Live the Queen（树形DP）

The Queen of Byteland is very loved by her people. In order to show her their love, the Bytelanders have decided to conquer a new country which will ...

# SGU 142. Keyword（暴力枚举）

Kevin has invented a new algorithm to crypt and decrypt messages, which he thinks is unbeatable. The algorithm uses a very large key-string, out of w...

# SGU 134. Centroid（树的重心）

You are given an undirected connected graph, with N vertices and N-1 edges (a tree). You must find the centroid(s) of the tree.  In order to define ...

# SGU 125. Shtirlits（dfs）

There is a checkered field of size N x N cells (1 Ј N Ј 3). Each cell designates the territory of a state (i.e. N2 states). Each state has an army. ...

# SGU 124. Broken line（射线法判断一个点是否在一个多边形内）

There is a closed broken line on a plane with sides parallel to coordinate axes, without self-crossings and self-contacts. The broken line consists o...

# SGU 116. Index of super-prime（完全背包+输出路径）

Let P1, P2, … ,PN, … be a sequence of prime numbers. Super-prime number is such a prime number that its current number in prime numbers sequence is a...

# SGU 115. Calendar （基姆拉尔森公式）

irst year of new millenium is gone away. In commemoration of it write a program that finds the name of the day of the week for any date in 2001. In...

# Codeforces Round #436 (Div. 2) E. Fire（01背包+输出路径）

Polycarp is in really serious trouble — his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take tiseco...

# Manthan, Codefest 17 C. Helga Hufflepuff's Cup（树形DP）

Harry, Ron and Hermione have figured out that Helga Hufflepuff's cup is a horcrux. Through her encounter with Bellatrix Lestrange, Hermione came to k...

# Manthan, Codefest 17 E. Salazar Slytherin's Locket（数位DP）

Harry came to know from Dumbledore that Salazar Slytherin's locket is a horcrux. This locket was present earlier at 12 Grimmauld Place, the home of S...

# 2017北京网络赛 && hihocoder 1582 Territorial Dispute（凸包）

In 2333, the C++ Empire and the Java Republic become the most powerful country in the world. They compete with each other in the colonizing the Mars....

个人资料
等级：
访问量： 9万+
积分： 2652
排名： 1万+