题目: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的更多相关文章

  1. 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 ...

  2. Codeforces Codeforces Round #316 (Div. 2) C. Replacement 线段树

    C. ReplacementTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/570/problem ...

  3. Codeforces Round #316 (Div. 2)

    A. Elections time limit per test 1 second memory limit per test 256 megabytes input standard input o ...

  4. Codeforces Round #316 (Div. 2) A

    Description The country of Byalechinsk is running elections involving n candidates. The country cons ...

  5. Codeforces Round #316 (Div. 2) A 水

    A. Elections time limit per test 1 second memory limit per test 256 megabytes input standard input o ...

  6. Codeforces Round #316 (Div. 2) (ABC题)

    A - Elections 题意: 每一场城市选举的结果,第一关键字是票数(降序),第二关键字是序号(升序),第一位获得胜利. 最后的选举结果,第一关键字是获胜城市数(降序),第二关键字是序号(升序) ...

  7. Codeforces Round #316 (Div. 2) C. Replacement

    题意:给定一个字符串,里面有各种小写字母和' . ' ,无论是什么字母,都是一样的,假设遇到' . . ' ,就要合并成一个' .',有m个询问,每次都在字符串某个位置上将原来的字符改成题目给的字符, ...

  8. 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了. 总结:下次一定要注意了,提交前一定要看 ...

  9. 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 ...

随机推荐

  1. JavaSE_ 网络编程 目录(26)

    JavaSE学习总结第26天_网络编程26.01 网络编程概述26.02 网络模型概述和图解26.03 网络编程三要素概述26.04 网络编程三要素之IP概述126.05 InetAddress类的概 ...

  2. Python之路Day2

    -->the start 养成好习惯,每次上课的内容都要写好笔记. 第二天内容主要是熟悉int.long.float.str.list.dict.tuple这几个类的内建方法. 对于Python ...

  3. shell学习-读取输入

    功能:读取输入,打印:如果长度小于MINLEN,那么输出空格. #!/bin/bash # paragraph-space.sh # Insert a blank line between parag ...

  4. 图标字体IcoMoon 使用

    IcoMoon 使用官方地址 http://icomoon.io/实际上,它是一种字体,只不过这种字体的字象图标一样,比如windows中自带的MT Extra Webdings Wingdings字 ...

  5. MVC-04 视图(1)

    不可否认的,View应该是整个ASP.NET MVC项目开发过程中最花时间的部分,因为与显示逻辑相关的技术五花八门,你可能要学习的有HTML.CSS.JavaScript.DOM.JQuery.JSO ...

  6. ASP.NET JQuery Ajax 详解

    在.NET中使用Ajax请求,我们可以使用一般处理程序,或者Web服务,还有一种是使用后台的Web方法(注意:当我们使用后台的Web方法是,后台方法必须加可访问性必须为: public,且为stati ...

  7. Cow Acrobats(贪心)

    Cow Acrobats Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3686   Accepted: 1428 Desc ...

  8. adb shell dumpsys 命令 查看内存

    android程序内存被分为2部分:native和dalvik,dalvik就是我们平常说的java堆,我们创建的对象是在这里面分配的,而bitmap是直接在native上分配的,对于内存的限制是 n ...

  9. UVA 10312 - Expression Bracketing(数论+Catalan数)

    题目链接:option=com_onlinejudge&Itemid=8&page=show_problem&problem=1253">10312 - Exp ...

  10. 「OC」内存管理

    一.基本原理 (一)为什么要进行内存管理. 由于移动设备的内存极其有限,所以每个APP所占的内存也是有限制的,当app所占用的内存较多时,系统就会发出内存警告,这时需要回收一些不需要再继续使用的内存空 ...