結果

問題 No.504 ゲーム大会(ランキング)
ユーザー ukuku09ukuku09
提出日時 2017-04-21 22:22:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 750 bytes
コンパイル時間 1,180 ms
コンパイル使用メモリ 145,356 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-27 11:07:29
合計ジャッジ時間 3,065 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 130 ms
4,376 KB
testcase_08 AC 132 ms
4,380 KB
testcase_09 AC 131 ms
4,376 KB
testcase_10 AC 135 ms
4,376 KB
testcase_11 AC 129 ms
4,380 KB
testcase_12 AC 127 ms
4,380 KB
testcase_13 AC 122 ms
4,376 KB
testcase_14 AC 132 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define all(v) begin(v), end(v)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++)

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

using pint = pair<int, int>;
using tint = tuple<int, int, int>;
using vint = vector<int>;

const int inf = 1LL << 55;
const int mod = 1e9 + 7;

signed main()
{
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  int N;
  cin >> N;
  vint a(N);
  int rank = 1;
  rep(i, N) {
    cin >> a[i];
    if(a[0] < a[i]) rank++;
    cout << rank << endl;
  }


  return 0;
}
0