题目: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. oracle如何修改字段类型(oracle总体知识2)

    在一次做开发的时候,遇到需要将数据表的字段类型由number改成varchar,可是该字段又有值, 用  alter table t-name modify cname newType;会报错. 话说 ...

  2. 转: Transact-sql游标使用详解~~很详细

    /*原理:游标就是把数据按照指定要求提取出相应的数据集,然后逐条进行数据处理.1.1游标的概念 游标(Cursor)它使用户可逐行访问由SQL Server返回的结果集. 使用游标(cursor)的一 ...

  3. QBoxLayout::setSizeConstraint可以固定窗口的大小,且根据内部控件所占用的位置自动调节大小

    setSizeConstraint(QLayout::SetFixedSize)的功能是保持整个对话框的尺寸保持相对固定.也就是说让布局管理器来调整对话框的大小.举个例子吧:一个上下可扩展对话框,基本 ...

  4. HDU 2610 Sequence one

    题目大意:在给定的序列中找到固定个数的递增的子序列,如果子序列的总个数少于要求的个数,那么就把所有的子序列输出即可. 题解:本来题目也不太看得懂,在别人的博客看了许久才懂,剪枝和判重也不大会,于是暂时 ...

  5. HDU 1286 找新朋友

    题解:分析题目,就是一个裸的欧拉函数,于是AC. #include <cstdio> int eular(int n){ int ret=1,i; for(i=2;i*i<=n;i+ ...

  6. Android Manifest.xml 结构详解

    关于AndroidManifest.xml AndroidManifest.xml 是每个android程序中必须的文件.它位于整个项目的根目录,描述了package中暴露的组件(activities ...

  7. android AChartEngine源代码

    昨天翻自己曾经下过的apache开源project项目,看到一个AChartEnginee看了一下自带的Demo才意识到这个东西的强大.立刻想把源代码down一份,在CSDN上有人挂5分让人下载,实在 ...

  8. SQL SERVER 2005 同步复制技术(转)

    SQL SERVER 2005 同步复制技术 以下实现复制步骤(以快照复制为例) 运行平台SQL SERVER 2005 一.准备工作: 1.建立一个 WINDOWS 用户,设置为管理员权限,并设置密 ...

  9. 上传图片到文件夹并显示在GridView控件里面

    http://aspsnippets.com/Articles/Upload-images-to-folder-and-display-uploaded-images-in-ASPNet-GridVi ...

  10. 在 Android 中 Intent 的概念及应用

    一.显式Intent: startActivity(new Intent(MainActivity.this, 类名.class));   二.隐式Intent: 1.在AndroidManiFest ...