結果
問題 | No.709 優勝可能性 |
ユーザー |
![]() |
提出日時 | 2018-06-29 23:55:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,119 bytes |
コンパイル時間 | 1,545 ms |
コンパイル使用メモリ | 173,644 KB |
実行使用メモリ | 13,888 KB |
最終ジャッジ日時 | 2024-07-01 00:29:53 |
合計ジャッジ時間 | 7,153 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 10 TLE * 1 -- * 11 |
ソースコード
#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; }