結果

問題 No.504 ゲーム大会(ランキング)
ユーザー aaaaaa
提出日時 2018-10-19 20:39:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 942 bytes
コンパイル時間 977 ms
コンパイル使用メモリ 104,112 KB
実行使用メモリ 8,756 KB
最終ジャッジ日時 2023-08-11 23:44:48
合計ジャッジ時間 5,900 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,756 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 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 <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>

using namespace std;

int main() {
	int i, j, k;
	int n;
	vector<pair<long, long>>list;
	vector<int>ans;


	cin >> n;

	for (i = 0; i < n; i++) {
		long num;
		cin >> num;
		if (i == 0) {
			list.push_back(make_pair(num, 55));
		}
		else {
			list.push_back(make_pair(num, 0));
		}

		sort(list.begin(), list.end(), greater<pair<long, long>>());

		for (j = 0; j < list.size(); j++) {
			if (list[j].second == 55) {
				//cout << j + 1 << endl;
				ans.push_back(j + 1);
				break;
			}
		}

	}


	
	for (i = 0; i < ans.size(); i++) {
		cout << ans[i] << endl;
	}











	getchar();
	getchar();
	return 0;
}
0