http://codeforces.com/contest/1077/problem/A A frog is currently at the point 00 on a coordinate axis OxOx. It jumps by the following algorithm: the first jump is aa units to the right, the second jump is bb units to the left, the third jump is aa un…
Codeforces Round #521 (Div. 3)  E. Thematic Contests 题目传送门 题意: 现在有n个题目,每种题目有自己的类型要举办一次考试,考试的原则是每天只有一种题目类型一种题目类型只能出现在一天每天的题目类型不能相同,而且后一天的题目数量必须正好为前一天的两倍,第一天的题目数量是任意的求怎么安排能使题目尽量多.注意:不是天数尽量多 思路: 首先我们知道一件事,题目属于哪种类型并不重要,重要的是每种类型的个数所以我们先统计出所有类型的个数,存进一个数组,而…
E. Frog Fights 题目连接: http://www.codeforces.com/contest/625/problem/E Description stap Bender recently visited frog farm and was inspired to create his own frog game. Number of frogs are places on a cyclic gameboard, divided into m cells. Cells are nu…
任意门:http://codeforces.com/contest/1077/problem/D D. Cutting Out time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array ss consisting of nn integers. You have to find any ar…
http://codeforces.com/contest/1077/problem/E output standard output Polycarp has prepared nn competitive programming problems. The topic of the ii-th problem is aiai, and some problems' topics may coincide. Polycarp has to host several thematic conte…
http://codeforces.com/contest/1077/problem/D You are given an array ss consisting of nn integers. You have to find any array tt of length kk such that you can cut out maximum number of copies of array tt from array ss. Cutting out the copy of tt mean…
F1. Pictures with Kittens (easy version) 题目链接:https://codeforces.com/contest/1077/problem/F1 题意: 给出n个数,以及k,x,k即长度为k的区间至少选一个,x的意思是一共要选x个,少一个或者多一个都不行. 选一个会得到一定的奖励,问在满足条件的前提下,最多得到多少的奖励. 题解: 简单版本数据量比较小,考虑比较暴力的动态规划. dp[i,j]表示前i个数,要选第i个数,目前选了j个所得到的最大奖励,那么当…
http://codeforces.com/contest/1077/problem/B There is a house with nn flats situated on the main street of Berlatov. Vova is watching this house every night. The house can be represented as an array of nn integer numbers a1,a2,…,ana1,a2,…,an, where a…
C. Platforms Jumping There is a river of width n. The left bank of the river is cell 0 and the right bank is cell n+1 (more formally, the river can be represented as a sequence of n+2 cells numbered from 0 to n+1). There are also m wooden platforms o…
There is a river of width nn. The left bank of the river is cell 00 and the right bank is cell n+1n+1 (more formally, the river can be represented as a sequence of n+2n+2 cells numbered from 00 to n+1n+1). There are also mm wooden platforms on a rive…