随笔分类 - OJ——Codeforce
摘要:A. Phone Numbers 题意:给一些数字,每个电话号码以8开头,11位,求最多组成多少个号码,重复累加。 #include <bits/stdc++.h> using namespace std; const int maxn = 105; char str[maxn]; int main
阅读全文
摘要:A. Supermarket We often go to supermarkets to buy some fruits or vegetables, and on the tag there prints the price for a kilo. But in some supermarket
阅读全文
摘要:A. Arpa and a research in Mexican wave Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. They start th
阅读全文
摘要:A. Odds and Ends A. Odds and Ends Where do odds begin, and where do they end? Where does hope emerge, and will they ever break? Given an integer seque
阅读全文
摘要:A. Kirill And The Game Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two
阅读全文
摘要:Codeforces Round #426 (Div. 2) Codeforces Round #426 (Div. 2)A. The Useless ToyB. The Festive EveningC. The Meaningless Game Codeforces Round #426 (Di
阅读全文
摘要:Codeforces Round #427 (Div. 2) Codeforces Round #427 (Div. 2) A. Key races B. The number on the board C. Star sky Codeforces Round #427 (Div. 2) A. Ke
阅读全文
摘要:Table of Contents A. Generous KefaB. GodsendC. Leha and Function A. Generous Kefa One day Kefa found n baloons. For convenience, we denote color of i
阅读全文
摘要:A. Chess Tourney Berland annual chess tournament is coming! Organizers have gathered 2·n chess players who should be divided into two teams with n peo
阅读全文
摘要:A. Arya and Bran Bran and his older sister Arya are from the same house. Bran like candies so much, so Arya is going to give him some Candies. At firs
阅读全文
摘要:题意:给一个有向图带权图,求最长严格递增链的长度。 分析: 定义 dp(i) 以 节点 i 开头的最长长度,要保证上一条边很长,而且权值很小,很难把控。 定义 f(i) 以节点 i 结尾的最长长度。 但是要严格递增,节点节点间转移也不好搞,于是以边为对象。 首先对边排序分层,后面的边,一定大于等于前
阅读全文
摘要:注:梅森素数,数组表示的是2^n-1的n,指数。
阅读全文
摘要:A. Vladik and Courtesy At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. After that Val
阅读全文
摘要:Codeforces Round 419 (Div. 2) Table of Contents Codeforces Round 419 (Div. 2)A. Karen and MorningB. Karen and CoffeeC. Karen and GameE. Karen and Supe
阅读全文
摘要:2016 China Collegiate Programming Contest Final Table of Contents 2016 China Collegiate Programming Contest FinalProblem A:Problem J:Problem H: Proble
阅读全文
摘要:Codeforces Round 421 (Div. 2) Table of Contents Codeforces Round 421 (Div. 2)A. Mister B and Book ReadingB. Mister B and Angle in PolygonD. Mister B a
阅读全文
摘要:2016 2017 ACM Central Region of Russia Quarterfinal Programming Contest A. Fried Fish 题意:有N条鱼,有一个同时可以煎k条鱼的锅,鱼两个面都要煎; 分析:k 2个面要煎,是否有一种方式可以让锅没有空闲,当时我举了几
阅读全文
摘要:Codeforces Round 420 (Div. 2) Table of Contents A. Okabe and Future Gadget LaboratoryB. Okabe and Banana TreesC. Okabe and Boxes A. Okabe and Future G
阅读全文
摘要:Codeforces Round #417 (Div. 2) Codeforces Round #417 (Div. 2)A. Sagheer and CrossroadsB. Sagheer, the HausmeisterC. Sagheer and Nubian Market Codeforc
阅读全文
摘要:A题:从两个保安中间那钞票 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 int main() 6 { 7 int a,b,c; 8 scanf("%d%d%d",&a,&b,&c); 9 int n; 10 scanf("%d",&
阅读全文