結果
| 問題 | No.709 優勝可能性 |
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2018-06-29 23:55:19 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,119 bytes |
| 記録 | |
| コンパイル時間 | 1,672 ms |
| コンパイル使用メモリ | 186,652 KB |
| 実行使用メモリ | 23,148 KB |
| 最終ジャッジ日時 | 2026-03-21 15:09:35 |
| 合計ジャッジ時間 | 27,170 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 TLE * 4 |
ソースコード
#include "bits/stdc++.h"
#define REP(i,n,N) for(ll i=(n); i<(N); i++)
#define RREP(i,n,N) for(ll i=(N-1); i>=n; i--)
#define CK(n,a,b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define p(s) cout<<(s)<<endl
#define p2(a,b) cout<<(a)<<" "<<(b)<<endl
#define v2(T) vector<vector<T>>
typedef long long int ll;
using namespace std;
const ll inf=1e18;
ll N,M;
ll R[100010][12];
int main(){
while(cin>>N>>M){
ll mx[12];
set<ll> kouho[12];
REP(i,0,11) mx[i]=0;
REP(i,0,N){
REP(j,0,M){
cin>>R[i][j];
}
}
REP(i,0,N){
set<ll> s;
REP(j,0,M){
if(R[i][j]>mx[j]){
mx[j] = R[i][j];
kouho[j].clear();
kouho[j].insert(i);
}else if(R[i][j]==mx[j]){
kouho[j].insert(i);
}
for (auto itr = kouho[j].begin(); itr != kouho[j].end(); ++itr) {
s.insert(*itr);
}
}
p(s.size());
}
}
return 0;
}
dnish