
--------数学问题---------
数学编程走起
reb0rn初代
弃疗吧
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1005Number Sequence
Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). Input The input consi原创 2016-11-13 12:43:37 · 261 阅读 · 2 评论 -
Codeforces 246B Increase and Decrease
Polycarpus has an array, consisting of n integers a1, a2, …, an. Polycarpus likes it when numbers in an array match. That’s why he wants the array to have as many equal numbers as possible. For that Po原创 2016-12-10 09:45:55 · 343 阅读 · 0 评论 -
Hopscotch(思维)
So nearly half of the winter is over and Maria is dreaming about summer. She’s fed up with skates and sleds, she was dreaming about Hopscotch all night long. It’s a very popular children’s game. The ga原创 2016-12-10 09:50:58 · 491 阅读 · 0 评论 -
Buggy Sorting
Little boy Valera studies an algorithm of sorting an integer array. After studying the theory, he went on to the practical tasks. As a result, he wrote a program that sorts an array of n integers a1, a原创 2016-12-10 09:56:42 · 313 阅读 · 0 评论 -
code formatter
Some companies have special requirements for source code format, and it is also good for programmers to keep consistent code style. You are asked to write a simple code formatter for the company to hel原创 2016-12-17 17:05:21 · 785 阅读 · 0 评论 -
Codeforces Round 10 A. Gabriel and Caterpillar 模拟
The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1)原创 2016-12-24 09:19:16 · 318 阅读 · 0 评论 -
CodeForces 652B z-sort
A student of z-school found a kind of sorting called z-sort. The array a with n elements arez-sorted if two conditions hold:ai ≥ ai - 1 for all even i, ai ≤ ai - 1 for all odd i > 1. For example the原创 2016-12-24 10:21:56 · 449 阅读 · 0 评论