結果
| 問題 | No.709 優勝可能性 | 
| コンテスト | |
| ユーザー |  square1001 | 
| 提出日時 | 2018-07-02 21:36:01 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 233 ms / 3,500 ms | 
| コード長 | 543 bytes | 
| コンパイル時間 | 821 ms | 
| コンパイル使用メモリ | 82,988 KB | 
| 実行使用メモリ | 10,512 KB | 
| 最終ジャッジ日時 | 2024-07-01 01:38:46 | 
| 合計ジャッジ時間 | 3,413 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 22 | 
ソースコード
#include <map>
#include <vector>
#include <iostream>
using namespace std;
int n, m, x, mx[15]; vector<int> mxlis[15];
int main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	cin >> n >> m;
	map<int, int> d;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < m; ++j) {
			cin >> x;
			if (mx[j] < x) {
				mx[j] = x;
				for (int k : mxlis[j]) {
					--d[k];
					if (d[k] == 0) d.erase(k);
				}
				mxlis[j].clear();
			}
			if (mx[j] == x) {
				mxlis[j].push_back(i);
				++d[i];
			}
		}
		cout << d.size() << '\n';
	}
	return 0;
}
            
            
            
        