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 ...
随机推荐
- thinkphp phpexcel导出
近期做一个项目涉及到商品信息的批量导出与导入,遂记录了下来,框架是tp框架3.2.3(tp5.0性质是一样的,无非是加载方法与所放目录不一样罢了),运用的是phpexcel,闲话不多说,上代码 1.首 ...
- Python一些字符串判断和转换
设s是字符串: s.isalnum() 判断所有字符都是数字或者字母 s.isalpha() 判断所有字符都是字母 s.isdigit() 判断所有字符都是数字 s.islower() ...
- fork出的子进程和父进程的继承关系【转载】
[原文地址]http://blog.163.com/dengjingniurou@126/blog/static/53989196200962924412524/ fork出的子进程和父进程的继承关系 ...
- (Problem 41)Pandigital prime
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly o ...
- 【转】Win7下VS2010中配置Opencv2.4.4的方法(32位和64位都有效)(亲测成功)
在vs2010下配置opencv是件痛苦的事情,一点点错误可能就会导致莫名其妙的报错,各种error让人郁闷不已,这里提供给大家一篇vs2010下配置opencv2.4.4的方法,我是64位的win7 ...
- mysql三个应用场景
场景一,数据表自动备份(多个数据表字段同步等),使用触发器.如updatelog记录对资源的所有操作日志,reslastlog记录资源最后操作的日志信息.同步方式实现如下: //创建表 DROP TA ...
- Android中GPS简介及其应用
GPS是Global Positioning System(全球定位系统)的简称,它的作用就是为全球的物体提供定位功能.GPS定位是一门高新技术,但对于Android程序员来说,开发GPS功能的应用程 ...
- SQL SERVER 2005 同步复制技术(转)
SQL SERVER 2005 同步复制技术 以下实现复制步骤(以快照复制为例) 运行平台SQL SERVER 2005 一.准备工作: 1.建立一个 WINDOWS 用户,设置为管理员权限,并设置密 ...
- CSS3属性之border-radius
一.语法: 代码如下: border-radius : none | <length>{1,4} [/ <length>{1,4} ]? 二.取值: <length& ...
- 实现AJAX局部刷新以及PageMethod方法的使用
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> &l ...