题目链接

/*
两次排序,搞定
*/
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
struct node {
int key;
double sum;
bool operator <(const node& para) const {
if (sum > para.sum )return true;
else if (sum == para.sum) {
if (key > para.key) return true;
else return false;
}else return false;
}
}arr[];
bool cmp(node a, node b) {
return a.key > b.key;
}
int main() {
int n,m ,k;
while (cin>>n>>m>>k) {
memset(arr, , sizeof(arr));
for (int i=; i<n; i++) {
for (int j=; j<m; j++) {
double tmp;
scanf("%lf", &tmp);
arr[j].sum += tmp;
arr[j].key = j;
}
}
sort(arr, arr+m);
sort(arr, arr+k, cmp);
printf("%d", arr[].key + );
for (int i=; i<k; i++) {
printf(" %d",arr[i].key + );
}
printf("\n");
}
return ;
}

最新文章

  1. 启动mysql服务 报1067 错误
  2. a标签
  3. ubuntu 休眠之后网络间接失败 can not connect to network after suspend (wake up)
  4. js init : function ()
  5. C语言:其他进制转换为十进制(方法二)
  6. 踏着前人的脚印学hadoop&mdash;&mdash;ipc中的Client
  7. EditText 监听回车事件 避免2次触发
  8. labview中的文件格式
  9. Codeforces Good Bye 2015 A. New Year and Days 水题
  10. 有用好看的CSS+JS+table 导航
  11. cocos2d-x 2.2 wp8 开发手记
  12. BZOJ 4059: [Cerc2012]Non-boring sequences ( )
  13. Sublime text 3编辑python时出现方框的解决办法
  14. Netbeans IDE 安装Emmet插件并解决Emmet插件无效果问题
  15. AngularJS 四大特性
  16. 教你如何使用云服务器去搭建SS
  17. win10 Xshell5连ubuntu服务器
  18. jquery 带农历天干地支的日期选择控件
  19. 【数组】Missing Number
  20. ubuntu14.04 忘记了登录密码和root密码

热门文章

  1. Redis分布式锁的python实现
  2. 【saltstack】saltstack执行结果和事件存储到mysql
  3. 1.5 使用电脑测试MC20的发送英文短信功能
  4. 使用 C#的 is 和 as 操作符来转型
  5. 【算法题 14 LeetCode 147 链表的插入排序】
  6. Python之常用模块(re,时间,random,os,sys,序列化模块)(Day20)
  7. linux eclipse的桌面快捷方式
  8. 027_编写MapReduce的模板类Mapper、Reducer和Driver
  9. Python编程-多进程二
  10. DNS 转发配置