結果

問題 No.2092 Conjugation
コンテスト
ユーザー SnowBeenDiding
提出日時 2026-03-20 20:39:28
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 1,012 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,443 ms
コンパイル使用メモリ 420,656 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-20 20:39:43
合計ジャッジ時間 14,678 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 4 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>

#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace atcoder;
using namespace std;

typedef long long ll;

template <typename T>
int smaller(vector<T> &a, T x) {
    return lower_bound(a.begin(), a.end(), x) - a.begin();
}
template <typename T>
int or_smaller(vector<T> &a, T x) {
    return upper_bound(a.begin(), a.end(), x) - a.begin();
}
template <typename T>
int bigger(vector<T> &a, T x) {
    return a.size() - or_smaller(a, x);
}
template <typename T>
int or_bigger(vector<T> &a, T x) {
    return a.size() - smaller(a, x);
}

void solve() {
    int n;
    cin >> n;
    vector<int> a(n);
    for (auto i = n - 1; i >= 0; i--) cin >> a[i];
    rep(i, 0, n) cout << or_bigger(a, (int)i + 1) << ' ';
    cout << endl;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);
    solve();
}
0