POJ 2535 Very Simple Problem G++
来源:互联网 发布:sql 数据默认值 编辑:程序博客网 时间:2024/05/18 03:23
#include <iostream>using namespace std;//谢谢博友文章 int a[102][102];int b[102];int s[102];int main(){int N,P;cin>>N>>P;for(int i=0;i<N;i++){cin>>a[i][0];b[i]=a[i][0];s[i]=a[i][0];for(int j=1;j<P;j++){cin>>a[i][j];if(a[i][j]>b[i]){b[i]=a[i][j];}if(a[i][j]<s[i]){s[i]=a[i][j];}}}int flag=0;for(int j=0;j<P;j++){int js_s=0;//最简单数的计数 int js_b=0; for(int i=0;i<N;i++){if(a[i][j]==b[i]){js_b++;}if(a[i][j]==s[i]){js_s++;}} if((js_b==0)&&(js_s>(N/2))){cout<<j+1<<" ";//谢谢博友 flag=1;}}if(flag==0){cout<<0<<endl;}else{cout<<endl;}return 0;}
N位裁判对P个问题按难度打分,每行是某裁判对问题打出的分数。简单问题定义为一半以上裁判认为最简单,没有人认为最难。求简单问题列表。
阅读全文
0 0
- POJ 2535 Very Simple Problem G++
- POJ 2535 Very Simple Problem
- poj 2535 Very Simple Problem
- POJ 2535 Very Simple Problem(水~)
- POJ 3483 A Very Simple Problem
- 1166 Very Simple Problem
- [Java]Very simple problem
- sgu111:Very simple problem
- 111. Very simple problem
- SGU111 Very simple problem
- POJ 2535 Very Simple Problem(我的水题之路——看错题)
- FOJ 1350 Very Simple Problem
- FZU 1350 Very Simple Problem
- SGU 111 Very simple problem
- [SGU]111. Very simple problem
- SGU 111 Very simple problem
- SGU 111 Very simple problem
- 【FOJ 1350】 Very Simple Problem
- Win7设置AHCI模式启动
- centos 修改root密码
- 索引理解
- 再谈Cocos2dx2.x.x编译
- 牛客《剑指Offer》 重建二叉树
- POJ 2535 Very Simple Problem G++
- RenPy 如何设置支持中文内容
- matlab对于字符串的处理
- 1080P 的显示器上,4K 的视频是否看起来比 1080P 的视频更清晰
- 计算机网络
- UVA-1347
- 数据分析(入门篇)-第三章-无米难为巧妇——数据准备
- DataNode寻找NameNode
- docker镜像中的定时任务