結果

問題 No.2092 Conjugation
ユーザー V_MelvilleV_Melville
提出日時 2022-10-08 16:00:36
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 390 bytes
コンパイル時間 3,313 ms
コンパイル使用メモリ 244,604 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-04 21:35:12
合計ジャッジ時間 4,933 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 8 ms
4,380 KB
testcase_08 AC 29 ms
4,376 KB
testcase_09 AC 18 ms
4,380 KB
testcase_10 AC 19 ms
4,380 KB
testcase_11 AC 20 ms
4,384 KB
testcase_12 AC 17 ms
4,376 KB
testcase_13 AC 12 ms
4,376 KB
testcase_14 AC 11 ms
4,380 KB
testcase_15 AC 17 ms
4,376 KB
testcase_16 AC 35 ms
4,380 KB
testcase_17 AC 39 ms
4,376 KB
testcase_18 AC 40 ms
4,380 KB
testcase_19 AC 13 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)

using namespace std;
using ll = long long;

int main() {
    int n;
    cin >> n;
    
    vector<int> a(n);
    rep(i, n) cin >> a[i];
    
    reverse(a.begin(), a.end());
    
    for (int i = 1; i <= a.back(); ++i) {
        cout << a.end() - lower_bound(a.begin(), a.end(), i) << ' ';
    }
    
    return 0;
}
0