結果
問題 | No.709 優勝可能性 |
ユーザー |
|
提出日時 | 2018-06-29 23:03:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 537 ms / 3,500 ms |
コード長 | 519 bytes |
コンパイル時間 | 724 ms |
コンパイル使用メモリ | 75,092 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 00:09:28 |
合計ジャッジ時間 | 5,643 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
コンパイルメッセージ
main.cpp:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 12 | main() | ^~~~
ソースコード
#include<iostream> #include<algorithm> #include<set> #include<vector> using namespace std; int n,m; int R[11]; int cnt[1<<17]; vector<int>a[11]; int MR[11]; int ans; main() { cin>>n>>m; for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { cin>>R[j]; if(MR[j]<R[j]) { MR[j]=R[j]; for(int k=0;k<a[j].size();k++)ans-=!--cnt[a[j][k]]; a[j].clear(); a[j].push_back(i); ans+=!cnt[i]++; } else if(MR[j]==R[j]) { a[j].push_back(i); ans+=!cnt[i]++; } } cout<<ans<<endl; } }