关闭
当前搜索:

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 ...
阅读(257) 评论(0)

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...
阅读(247) 评论(0)

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...
阅读(281) 评论(0)

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...
阅读(242) 评论(0)

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...
阅读(239) 评论(0)

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...
阅读(346) 评论(0)

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...
阅读(372) 评论(0)

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...
阅读(370) 评论(0)

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...
阅读(297) 评论(0)

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...
阅读(329) 评论(0)

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 ...
阅读(185) 评论(0)

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...
阅读(109) 评论(0)

大数模板 (kuangbin模板的修订版)

以前直接用kuangbin的模板,发现一直过不了题,今天又做了一题,发现原来是减法函数里有一个地方写错了,改正之后就可以了(不保证其他的没有问题)。 #include #include #include #include #define LL long long using namespace std; /* * 完全大数模板 * 输出cin>>a * 输出a.print(); * 注...
阅读(274) 评论(0)

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...
阅读(427) 评论(5)

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...
阅读(229) 评论(0)
165条 共11页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:72952次
    • 积分:2363
    • 等级:
    • 排名:第18153名
    • 原创:163篇
    • 转载:2篇
    • 译文:0篇
    • 评论:17条