結果

問題 No.709 優勝可能性
ユーザー _shota_224__shota_224_
提出日時 2018-06-29 23:49:01
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 2,383 bytes
コンパイル時間 1,300 ms
コンパイル使用メモリ 127,076 KB
実行使用メモリ 13,332 KB
最終ジャッジ日時 2023-09-13 15:50:02
合計ジャッジ時間 7,017 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

//#include <bits/stdc++.h>

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//#define int long long
#define ln '\n'
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define P(p) cout << (p) << endl;
#define S(s) cin << (s);
#define reps(i,a,b) for(int (i)=(a); (i)<(b); ++(i))
#define rep(i,n) reps(i,0,n)
#define repst(i,a,b) rep(i,s,(n)+1)
#define rept(i,n) rep(i,(n)+1)
#define reprt(i,a,b) for(int (i)=(a); (i)>=(b); --(i))
#define repr(i,n) reprt(i,n,0)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define debug(x) cerr << #x << ": " << x << '\n'
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define tmax(x,y,z) max(x,max(y,z))
#define tmin(x,y,z) min(x,min(y,z))
#define fastIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)

typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vst;
typedef vector<bool> vb;
typedef vector<ld> vld;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vector<int> > mat;

const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll INFF = 1e18;
const double EPS = 1e-9;
const double PI  = acos(-1.0);

/*********TEMPLATE**********/

int main() {
  int N, M, t;
  cin >> N >> M;
  mat R;
  rep(i,N) {
    vi tmp;
    rep(j,M) {
      cin >> t;
      tmp.push_back(t);
    }
    R.push_back(tmp);
  }
  /*
  rep(i,N) {
    rep (j,M) {
      cout << R[i][j] << ' ';
    }
    cout << ln << ln;
  }
  */

  rep(i,N) {
    vi s(0);
    rep(j,M) {
      vi r(0);
      rep(k,i+1) {
        r.push_back(R[k][j]);
        //cout << r[k] << ' ';///
      }
      int m = *max_element(all(r));
      //cout << "m: " << m << ln;
      rep(k,i+1) {
        if (r[k]==m) {
          s.push_back(k);
        }
      }
    }
    sort(s.begin(), s.end());
    auto ss = unique(s.begin(), s.end());
    cout << ss-s.begin() << ln;
  }

  return 0;

}
0