結果
| 問題 |
No.504 ゲーム大会(ランキング)
|
| コンテスト | |
| ユーザー |
aaa
|
| 提出日時 | 2018-10-19 20:39:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 942 bytes |
| コンパイル時間 | 1,233 ms |
| コンパイル使用メモリ | 104,712 KB |
| 実行使用メモリ | 17,232 KB |
| 最終ジャッジ日時 | 2024-11-18 19:28:00 |
| 合計ジャッジ時間 | 26,386 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 TLE * 8 |
ソースコード
#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;
}
aaa