Very Simple Problem
Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Description
The difficulty here lies in diverse meanings of the term "simple" amongst the jury members. So, the jury uses the following procedure to reach a consensus: each member weights each proposed problem with a positive integer "complexity rating" (not necessarily different for different problems). The jury member calls "simplest" those problems that he gave the minimum complexity rating, and "hardest" those problems that he gave the maximum complexity rating.
The ratings received from all jury members are then compared, and a problem is declared as "very simple", if it was called as "simplest" by more than a half of the jury, and was called as "hardest" by nobody.
Input
Output
Sample Input
4 4
1 1 1 2
5 900 21 40
10 10 9 10
3 4 3 5
Sample Output
3
/*
题意:有n位评委,给p个选手打分,让你找出very simple的选手,有这样一个标准就是给他打最低分的评委数量超过一半,并且没有评委给他打过最低分 初步思路:模拟
*/
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int n,p;
int a[][];
int cur[];//用来标记每个选手的最低分得票 cur[i]==-1表示这个选手的过最高分,那么他的积分就不做评价
int maxn,minn;
void init(){
memset(cur,,sizeof cur);
}
int main(){
// freopen("in.txt","r",stdin);
while(scanf("%d%d",&n,&p)!=EOF){
init();
for(int i=;i<n;i++){
maxn=-;
minn=;
for(int j=;j<p;j++){
scanf("%d",&a[i][j]);
if(a[i][j]>maxn){
maxn=a[i][j];
}
if(a[i][j]<minn){
minn=a[i][j];
}
}
for(int j=;j<p;j++){
if(a[i][j]==maxn)
cur[j]=-;
else if(a[i][j]==minn){
if(cur[j]==-)
continue;
else
cur[j]++;
} }
}
// for(int i=0;i<n;i++){
// cout<<cur[i]<<" ";
// }
// cout<<endl;
bool flag=false;
for(int i=;i<n;i++){
if(cur[i]>n/){
if(flag){
printf(" %d",i+);
}else{
printf("%d",i+);
flag=true;
}
}
}
if(flag==false)
printf("");
printf("\n");
}
return ;
}
Very Simple Problem的更多相关文章
- POJ 3468 A Simple Problem with Integers(线段树 成段增减+区间求和)
A Simple Problem with Integers [题目链接]A Simple Problem with Integers [题目类型]线段树 成段增减+区间求和 &题解: 线段树 ...
- POJ 3468 A Simple Problem with Integers(线段树/区间更新)
题目链接: 传送门 A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Description Yo ...
- poj 3468:A Simple Problem with Integers(线段树,区间修改求和)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 58269 ...
- ACM: A Simple Problem with Integers 解题报告-线段树
A Simple Problem with Integers Time Limit:5000MS Memory Limit:131072KB 64bit IO Format:%lld & %l ...
- poj3468 A Simple Problem with Integers (线段树区间最大值)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 92127 ...
- POJ3648 A Simple Problem with Integers(线段树之成段更新。入门题)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 53169 Acc ...
- BZOJ-3212 Pku3468 A Simple Problem with Integers 裸线段树区间维护查询
3212: Pku3468 A Simple Problem with Integers Time Limit: 1 Sec Memory Limit: 128 MB Submit: 1278 Sol ...
- POJ 3468 A Simple Problem with Integers(线段树区间更新区间查询)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 92632 ...
- A Simple Problem with Integers(树状数组HDU4267)
A Simple Problem with Integers Time Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- A Simple Problem with Integers
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 77964 Acc ...
随机推荐
- ACM学习之路___HDU 2066 一个人的旅行
Description 虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还 ...
- JVM 菜鸟进阶高手之路九(解惑)
转载请注明原创出处,谢谢! 在第八系列最后有些疑惑的地方,后来还是在我坚持不懈不断打扰笨神,阿飞,ak大神等,终于解决了该问题.第八系列地址:http://www.cnblogs.com/lirenz ...
- Opengl4.5 中文手册—E
索引 A B C D E F G H I J K L M N O P Q ...
- Eclipse中添加文档注释快捷键
该博客仅记录自己添加文档注释时的操作,由于参考文档地址忘了,因此如果与其他文档重复,请见谅 以下是我的操作过程: 例如: /** * @param * @return */ 快捷键为: ...
- Floyd算法(最短路)
如题,这是最短路算法Floyd. Floyd,是只有五行的代码. 简单,易懂.O(N的三方)的时间也可以. 遇到简单的就这么用. #include<iostream> #include&l ...
- [转载]Reids配置文件详解
# redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => 1000 bytes # 1kb ...
- 【转】 文档与笔记利器 reStructuredText 和 Sphinx
关于制作文档和笔记这种事,我已经纠结了很久,网上解决方案也一大推,我试过几样,ScrapBook 和 Zotero,编辑不太方便,同步麻烦.Google Note 过于格式简单,现在也不更新了,Goo ...
- Jquery购物车jsorder改进版,支持后台处理程序直接转换成DataTable处理
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- 关于TileBrush中Viewbox,Viewport以及Stretch,AlignmentX/Y的详细研究
我们知道TileBrush是WPF中一个战斗力爆表的虚基类,从它派生出的DrawingBrush,ImageBrush和VisualBrush在WPF图形编程中发挥着重要作用.然而关于TileBrus ...
- django使用xlwt导出excel文件
这里只是mark一下导出的方法,并没有做什么REST处理和异常处理. 维护统一的style样式,可以使导出的数据更加美观. def export_excel(request): # 设置HttpRes ...