# 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. They decided that they will meet sometime between X ...

# 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 be named according to the queen's name. This new co...

# 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 which a keyword is found out after applying the algo...

# 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 the centroid, some integer value will be assosciate...

# 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. Let A [i, j] be the number of soldiers in the stat...

# 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 of K segments. You have to determine, whether a give...

# 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 prime number too. For example, 3 is a super-prim...

# 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. Input Input is a line with two positive integer...

# 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 tiseconds to save i-th item. In addition, for each item...

# 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 know that the cup is present in Bellatrix's family v...

# 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 Sirius Black's mother. It was stolen from there and ...

# 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. There are n colonies on the Mars, numbered from 1...

# Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor

Mahmoud and Ehab are on the third stage of their adventures now. As you know, Dr. Evil likes sets. This time he won't show them any set from his large collection, but will ask them to create a new set...

# SGU 103. Traffic Lights （SPFA）

In the city of Dingilville the traffic is arranged in an unusual way. There are junctions and roads connecting the junctions. There is at most one road between any two different junctions. There is...

165条 共11页1 2 3 4 5 ... 下一页 尾页
个人资料
• 访问：72952次
• 积分：2363
• 等级：
• 排名：第18153名
• 原创：163篇
• 转载：2篇
• 译文：0篇
• 评论：17条