题目链接:http://codeforces.com/problemset/problem/284/C 题目意思:给出3种操作:t = 1:在前 a 个数中每个数都加上x: t= 2:在数组末尾增加一个数k,数组长度相应增加1: t = 3:删除数组最后一个数,数组长度减少1.对于n次操作,都给出整个数组所有元素的平均值. 一开始看见题目意思那么容易懂,于是以为很容易做,错足14次,15次终于成功了.先是TLE(对操作2直接暴力循环加),后在Test 10 wa wa wa~~~,说误差超了,全…
题目链接:http://codeforces.com/problemset/problem/476/C 题目意思:给出两个数:a 和 b,要求算出 (x/b) / (x%b) == k,其中 k 的取值范围是 [1, a],找出满足所有正整数的 x 并求出所有 x 的和. 是不是觉得无从下手呢?我当时也是 = = .....看了整晚题解,算是看懂了... 首先设 d = x / b, m = x % b,那么整条式子就变成 d/m = k —> d = mk(1) (好快你就知道有啥用了…
先上题目: C. Cows and Sequence time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Bessie and the cows are playing with sequences and need your help. They start with a sequence, initially containi…
1.题目描述: 1175. Strange Sequence Time limit: 1.0 secondMemory limit: 2 MB You have been asked to discover some important properties of one strange sequences set. Each sequence of the parameterized set is given by a recurrent formula: Xn+1 = F(Xn-1, Xn)…