結果

問題 No.504 ゲーム大会(ランキング)
ユーザー nnasennnasen
提出日時 2017-12-01 04:15:54
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 544 bytes
コンパイル時間 2,352 ms
コンパイル使用メモリ 169,008 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-08-18 14:01:43
合計ジャッジ時間 6,219 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD % 1000000007
using namespace std;
typedef long long LL;
typedef vector<int> VI;


int main() {
	int n;
	cin >> n;
	VI ai(n), l(n);
	REP(i, n) {
		int a;
		cin >> a;
		ai[i] = a;
	}
	REP(i, n) {
		l[i] = ai[i];
		sort(ALL(l), greater<int>());
		for (int j = 0; j <= i; j++) {
			if (l[j] == ai[0]) {
				cout << j + 1 << endl;
				break;
			}
		}
	}
	return 0;
}
0