题目链接:http://codeforces.com/problemset/problem/433/C 题目意思:一本书有 n 页,每页的编号依次从 1 到 n 编排.如果从页 x 翻到页 y,那么|x-y|页都需要翻到(联系生活实际就很容易理解的了).接着有m pieces 的 information,第 i piece 的information 在第 a[i] 页.为了减少翻页的页数,允许把某一页的信息,完全搬到某一页上,这个操作只可以执行一次.问应该把哪一页的信息搬到某一页上,从而使得翻页…
Ryouko's Memory Note Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 433C Description Ryouko is an extremely forgetful girl, she could even forge…
A. Ryouko's Memory Note 题目连接: http://www.codeforces.com/contest/434/problem/A Description Ryouko is an extremely forgetful girl, she could even forget something that has just happened. So in order to remember, she takes a notebook with her, called Ry…
题目链接: A. Ryouko's Memory Note time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ryouko is an extremely forgetful girl, she could even forget something that has just happened. So in order to r…
题目链接:http://codeforces.com/problemset/problem/331/C1 这是第一次参加codeforces比赛(ABBYY Cup 3.0 - Finals (online version))成功AC的题目(n ≤ 106),解题的突破口是:Take the magic number, subtract a digit from it (the digit must occur in the number) and get a new magic number.…