题面 链接:CF548E Description Mike is a bartender at Rico's bar. At Rico's, they put beer glasses in a special shelf. There are n kinds of beer at Rico's numbered from 1 to n. i-th kind of beer has *a**i* milliliters of foam on it. Maxim is Mike's boss. T…
E. Mike and Foam Mike is a bartender at Rico's bar. At Rico's, they put beer glasses in a special shelf. There are n kinds of beer at Rico's numbered from 1 to n. i-th kind of beer has ai milliliters of foam on it. Maxim is Mike's boss. Today he told…
C. Mike and Foam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike is a bartender at Rico's bar. At Rico's, they put beer glasses in a special shelf. There are n kinds of beer at Rico's…
A. Distance and Axis 题目:http://codeforces.com/contest/1401/problem/A 题解:对于n来说分两种情况,一是奇数,二则是偶数 ①奇数:对于k来说如果是奇数且小于等于他,ans=0:若k是奇数并且大于n,则ans=k-n:若k是偶数并且k<n,那么ans=1:若k为偶数并且k>n,则ans=k-n ②偶数:若k为偶数并且k<=n,则ans=0:若k为偶数并且k>n,则ans=k-n:若k为奇数并且k<n,则ans=1…