Codeforces Round #316 (Div. 2A) 570A Elections
题目:Click here
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int M = +; int n, m;
int a[];
int b[];
int main() {
while( ~scanf("%d%d", &n, &m ) ) {
memset( b, , sizeof(b) );
for( int i=; i<=m; i++ ) {
for( int j=; j<=n; j++ )
scanf("%d", &a[j] );
int maxi = n;
for( int j=n-; j>; j-- )
if( a[maxi] <= a[j] )
maxi = j;
b[maxi]++;
}
int maxc = n;
for( int i=n-; i>; i-- )
if( b[maxc] <= b[i] )
maxc = i;
printf("%d\n", maxc );
}
return ;
}
Codeforces Round #316 (Div. 2A) 570A Elections的更多相关文章
- Codeforces Codeforces Round #316 (Div. 2) C. Replacement set
C. Replacement Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/570/proble ...
- Codeforces Codeforces Round #316 (Div. 2) C. Replacement 线段树
C. ReplacementTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/570/problem ...
- Codeforces Round #316 (Div. 2)
A. Elections time limit per test 1 second memory limit per test 256 megabytes input standard input o ...
- Codeforces Round #316 (Div. 2) A
Description The country of Byalechinsk is running elections involving n candidates. The country cons ...
- Codeforces Round #316 (Div. 2) A 水
A. Elections time limit per test 1 second memory limit per test 256 megabytes input standard input o ...
- Codeforces Round #316 (Div. 2) (ABC题)
A - Elections 题意: 每一场城市选举的结果,第一关键字是票数(降序),第二关键字是序号(升序),第一位获得胜利. 最后的选举结果,第一关键字是获胜城市数(降序),第二关键字是序号(升序) ...
- Codeforces Round #316 (Div. 2) C. Replacement
题意:给定一个字符串,里面有各种小写字母和' . ' ,无论是什么字母,都是一样的,假设遇到' . . ' ,就要合并成一个' .',有m个询问,每次都在字符串某个位置上将原来的字符改成题目给的字符, ...
- Codeforces Round #316 (Div. 2) B. Simple Game
思路:把n分成[1,n/2],[n/2+1,n],假设m在左区间.a=m+1,假设m在右区间,a=m-1.可是我居然忘了处理1,1这个特殊数据.被人hack了. 总结:下次一定要注意了,提交前一定要看 ...
- Codeforces Round #316 (Div. 2) A B C
A. Elections time limit per test 1 second memory limit per test 256 megabytes input standard input o ...
随机推荐
- Mongodb备份(mongodump)和恢复(mongorestore)
1.备份: mongodump -d DbName -o /data/backup 2. 恢复: mongorestore -d newDB --drop data/backup/DbName/
- mapper分页排序指定字段查询模板
StudentQuery: package Student; import java.util.ArrayList; import java.util.List; public class Stude ...
- KISSY对vm的抽取
vm <script type="text/javascript"> KISSY.use(['bops/js/forced-closure', 'common/js/t ...
- TortoiseSVN是windows平台下Subversion的免费开源客户端。
一般我们都是先讲讲服务器的配置,然后再讲客户端的使用,但是在TortoiseSVN上,却可以反过来.因为,如果你的要求不高,只是想在本机,或者是可信任的局域网络中使用SVN版本控制,可以不需要安装SV ...
- 阿里云ECS每天一件事D1:配置SSH
近期因为项目需求,采购了两台阿里云ECS,选择的系统为CentOS 6.3 X64 安全加固版,额外买了160G的硬盘,应该够应付此项目的需求了. ECS默认已经配置好了sshd服务,可以使用root ...
- Django里面的RequestContext
c = RequestContext(request, { 'foo': 'bar', }) get_template('about.html').render(c) 当我们定义一个RequestCo ...
- Linux通过网卡驱动程序和版本号的信息
检查卡制造商和信号 查看基本信息:lspci 查看详情:lspci -vvv # 3小作文v 查看卡信息:lspci | grep Ethernet 查看网卡驱动 查看网卡驱动信息:lspci - ...
- adb shell 命令
adb 概述 SDK的Tools文件夹下包含着Android模拟器操作的重要命令adb,adb的全称为(Android Debug Bridge就是调试桥的作用.通过adb我们可以在Eclipse中方 ...
- hdu 3966 Aragorn's Story(树链剖分+树状数组)
pid=3966" target="_blank" style="">题目链接:hdu 3966 Aragorn's Story 题目大意:给定 ...
- sql 和 nosql 说明
在传统的数据库中, 数据库的格式是由表(table).行(row).字段(field)组成的.表有固定的结构,规定了每行有哪些字段,在创建时被定义,之后修改很困难.行的格式是相同的,由若干个固定的字段 ...