A. Vanya and Cubes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya got n cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of…
A. Vanya and Cubes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya got n cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of…
A. Buy a Shovel time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is so…
Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/A Description After a hard day Vitaly got very hungry and he wants to eat his favorite pot…
A. Mahmoud and Longest Uncommon Subsequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest comm…
E. Vanya and Field Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/492/problem/E Description Vanya decided to walk in the field of size n × n cells. The field contains m apple trees, the i-th apple tree is at the cell with…
D. Vanya and Computer Game Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/492/problem/D Description Vanya and his friend Vova play a computer game where they need to destroy n monsters to pass a level. Vanya's character pe…
C. Vanya and Exams Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/492/problem/C Description Vanya wants to pass n exams and get the academic scholarship. He will get the scholarship if the average grade mark for all the ex…
A. Vanya and Cubes 题意: 给你n个小方块,现在要搭一个金字塔,金字塔的第i层需要 个小方块,问这n个方块最多搭几层金字塔. 分析: 根据求和公式,有,按照规律直接加就行,直到超过n. #include <cstdio> int main() { int n; scanf("%d", &n); , cnt = ; while(n > sum) { cnt++; sum += cnt * (cnt + ) / ; } if(sum > n…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud 本场题目都比较简单,故只写了E题. E. Vanya and Field Vanya decided to walk in the field of size n × n cells. The field contains m apple trees, the i-th apple tree is at the cell with coordinates(xi, yi). Van…