ACM-ICPC国际大学生程序设计竞赛北京赛区(2016)网络赛 The Book List 描述 The history of Peking University Library is as long as the history of Peking University. It was build in 1898. At the end of year 2015, it had about 11,000 thousand volumes of books, among ...
Codeforces Round #372 (Div. 2) C Description ZS the Coder is playing a game. There is a number displayed on the screen and there are two buttons, ' + ' (plus) and '' (square root). Initially, the number2is displayed on the ...
Codeforces Round #373 (Div. 2) B Description Anatoly lives in the university dorm as many other students do. As you know, cockroaches are also living there together with students. Cockroaches might be of two colors: black and...
Codeforces Round #373 (Div. 2) A Description Every summer Vitya comes to visit his grandmother in the countryside. This summer, he got a huge wart. Every grandma knows that one should treat warts when the moon goes down. Thus...
2016 ACM/ICPC Asia Regional Qingdao Online HDU5889 链接:http://acm.hdu.edu.cn/showproblem.php?pid=5889 解法:http://blog.csdn.net/u013532224/article/details/46992973然后改改模版 #include <iostream> #include <cstring> #include <cstdio&g...
Codeforces Round #372 (Div. 2) B Description ZS the Coder loves to read the dictionary. He thinks that a word isniceif there exists asubstring(contiguous segment of letters) of it of length26where each letter of English...
2016 ACM/ICPC Asia Regional Qingdao Online HDU5882 链接:http://acm.hdu.edu.cn/showproblem.php?pid=5882 解法:一个点必须出度和入度相同就满足题意,所以加上本身就是判断奇偶性 #include<stdio.h> #include<math.h> #include<string.h> #include<stack> #include...
Codeforces Round #372 (Div. 2) A Description ZS the Coder is coding on a crazy computer. If you don't type in a word for acconsecutive seconds, everything you typed disappear! More formally, if you typed a word at seconda...
2016 ACM/ICPC Asia Regional Qingdao Online HDU5878 链接:http://acm.hdu.edu.cn/showproblem.php?pid=5878 解法:先保存,再二分查询~具体http://blog.csdn.net/coder_xia/article/details/6707600 #include<stdio.h> //#include<bits/stdc++.h> #include<s...
2016 ACM/ICPC Asia Regional Qingdao Online HDU5883 链接:http://acm.hdu.edu.cn/showproblem.php?pid=5883 解法:先判断是不是欧拉路,然后枚举 #pragma comment(linker, "/STACK:102400000,102400000") #include <math.h> #include <time.h> #include <stdio...
Codeforces Round #370 (Div. 2) B Description Memory is performing a walk on the two-dimensional plane, starting at the origin. He is given a stringswith his directions for motion: An 'L' indicates he should move one unit...
2016 ACM/ICPC Asia Regional Qingdao Online HDU5879 链接:http://acm.hdu.edu.cn/showproblem.php?pid=5879 解法:我们知道到某个极限之后结果相同,所以找到那个极限,其他保存之后输出就好了 #include<stdio.h> //#include<bits/stdc++.h> #include<string.h> #include<iostr...
Educational Codeforces Round 1 A In this problem you are to calculate the sum of all integers from1ton, but you should take all powers of two with minus in the sum. For example, forn = 4the sum is equal to - 1 - 2 + 3 -...
Codeforces Round #260 (Div. 2) B Description Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression: (1n + 2n + 3n + 4n)mod5 for given value ofn. Fedya managed to complete the task....
Codeforces Round #370 (Div. 2) C Description Memory is now interested in the de-evolution of objects, specifically triangles. He starts with an equilateral triangle of side length x, and he wishes to perform operations to obt...
Educational Codeforces Round 16 C Description Find ann × nmatrix with different numbers from1ton2, so the sum in each row, column and both main diagonals are odd. Input The only line contains odd integern...
Codeforces Round #370 (Div. 2) A Description There are n integers b1, b2, ..., bn written in a row. For all i from 1 to n, values ai are defined by the crows performing the following procedure: The crow sets ai initially 0...
Codeforces Round #368 (Div. 2) C Description Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positive integers such that y...
Codeforces Round #260 (Div. 2) C Description Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it. Given a sequ...
Codeforces Round #260 (Div. 2) A Description One day Dima and Alex had an argument about the price and quality of laptops. Dima thinks that the more expensive a laptop is, the better it is. Alex disagrees. Alex thinks that th...