摘要:
I. A Small Game 题解: 这一题可以反向思考,考虑如何从x得到0.因为本题的倍乘机制决定了即使我们用更小的代价到达了更大的x值,这个x值不一定会在最优路线中被用到.因此我们不能根据x的绝对大小及当前代价直接剪枝,如果反向递推时,当前值为偶数时的最优情况比较特殊,对于偶数,加1一定不是最 阅读全文
摘要:
B - Two Arrays And Swaps You are given two arrays a and b both consisting of n positive (greater than zero) integers. You are also given an integer k. 阅读全文
摘要:
A - Most Unstable Array You are given two integers n and m. You have to construct the array a of length n consisting of non-negative integers (i.e. in 阅读全文