HDU 4981/BC 6A Goffi and Median
来源:互联网 发布:怎么添加usb001端口 编辑:程序博客网 时间:2024/06/08 08:15
题面大意 判断中位数和平均数的大小
#include <iostream>#include <cstring>#include <string>#include <cstdio>#include <cmath>#include <algorithm>#include <vector>#include <queue>#include <map>#include<stack>#include<bitset>#define inf 0x3f3f3f3f#define ll long long#define mod 1000000007using namespace std;#define bug puts("bugbugubgbugbug");int a[1005];int main(){ int n; while(~scanf("%d",&n)) { int sum=0; for(int i=0;i<n;i++){ scanf("%d",&a[i]); sum+=a[i]; } sort(a,a+n); if(a[(n-1)/2]*n>sum) puts("YES"); else puts("NO"); }}
0 0
- HDU 4981/BC 6A Goffi and Median
- 【CUGBACM15级BC第六场 A】hdu 4981 Goffi and Median
- [BestCoder Round #6] hdu 4981 Goffi and Median (水题)
- HDU 4981 Goffi and Median(BestCoder Round #6 1001)
- hdu 4981 Goffi and Median(BestCoder Round #6)
- HDU 4981 Goffi and Median——BestCoder Round #6
- HDU 4981 Goffi and Median(水)
- hdu 4981 Goffi and Median(水题)
- HDU—— 4981 Goffi and Median
- hdu 4981 Goffi and Median(水题)
- HDU 4982/BC 6B Goffi and Squary Partition
- HDU 4983/BC 6C Goffi and GCD
- HDU 4984 / BC 6D Goffi and Graph
- Goffi and Squary Partition-HDU-4982 BC.6.B
- bc第六场Goffi and Squary Partition
- bc第六场Goffi and GCD
- 【CUGBACM15级BC第六场 B】hdu 4982 Goffi and Squary Partition
- hdu 4893 Goffi and GCD
- Android Service详解
- HDU1711Number Sequence(KMP)
- [LeetCode]Reverse Linked List(该题也可以使用递归解法==还没有用递归写过)
- 欢迎使用CSDN-markdown编辑器
- android简单可操作的屏幕适配
- HDU 4981/BC 6A Goffi and Median
- 【Java多线程】之五:wait, notify and notifyAll
- DOM创建表格
- 【转】一些图论、网络流入门题总结、汇总
- PRIM算法
- 回文数 找最长回文子串
- 小白学Python(三) 几个简单的函数
- 回文数 找第n个回文数
- Number of Islands