4981专题

hdu 4981 Goffi and Median(水题)

题目链接:hdu 4981 Goffi and Median 题目大意:给定一个序列,判断中位数是否比平均值大。 解题思路:水题。排个序求中位数比较一下。 #include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int maxn = 1005;int N, arr[maxn];

HDU 4981 Goffi and Median(水)

HDU 4981 Goffi and Median 思路:排序就可以得到中间数,然后总和和中间数*n比较一下即可 代码: #include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int N = 1005;int n, a[N], sum

4981: Collatz Conjecture

4981: Collatz Conjecture 题目描述 In 1978 AD the great Sir Isaac Newton, whilst proving that P is a strict superset of N P, defined the Beta Alpha Pi Zeta function f as follows over any sequence o