結果

問題 No.2092 Conjugation
ユーザー otoshigo
提出日時 2022-10-07 21:22:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 472 bytes
コンパイル時間 1,908 ms
コンパイル使用メモリ 192,736 KB
最終ジャッジ日時 2025-02-07 22:46:31
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (int i = 0; i < n; i++)
#define rrep(i,n) for (int i = (n) - 1; i >= 0; i--)

int n,S[100010];
int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    cin>>n;
    int m=0;
    rep(i,n){
        int a;
        cin>>a;
        S[0]++;
        S[a+1]--;
        if(i==0)m=a;
    }
    rep(i,m){
        S[i+1]+=S[i];
        cout<<S[i+1]<<" ";
    }
    cout<<"\n";
}
0