結果
問題 |
No.709 優勝可能性
|
ユーザー |
![]() |
提出日時 | 2024-05-17 07:45:13 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 843 bytes |
コンパイル時間 | 4,280 ms |
コンパイル使用メモリ | 292,712 KB |
実行使用メモリ | 14,456 KB |
最終ジャッジ日時 | 2024-12-20 11:31:00 |
合計ジャッジ時間 | 10,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 4 WA * 18 |
ソースコード
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <atcoder/dsu> #include <atcoder/segtree> using namespace atcoder; using namespace std; typedef long long ll; #define rep(i,a,b) for(int i=a;i<b;i++) using vi = vector<int>; using vvi = vector<vi>; using li =vector<ll>; using lli=vector<li>; using si =vector<char>; using ssi =vector<si>; const long long INF = 1e18; const long long MOD=1e9+7; //for (auto [key, val] : mp) int main() { ll n,m;cin>>n>>m; vvi vec(n,vi(m)); rep(i,0,n)rep(j,0,m)cin>>vec[i][j]; li ANS(n); ll cnt=1; map<ll,pair<ll,ll>>mp; rep(i,0,m)mp[i]={vec[0][i],0}; ANS[0]=m; cout<<cnt<<endl; rep(i,1,n){ rep(j,0,m){ if(vec[i][j]>mp[j].first){ANS[mp[j].second]--;if(ANS[mp[j].second]==0)cnt--;mp[j].second=i;mp[j].first=vec[i][j];ANS[i]++;} } //rep(j,0,m)cout<<ANS[j]<<" "; if(ANS[i])cnt++; cout<<cnt<<endl; } }