結果

問題 No.2092 Conjugation
ユーザー hiro71687khiro71687k
提出日時 2023-03-10 06:18:01
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 4,293 ms
コンパイル使用メモリ 262,536 KB
実行使用メモリ 5,708 KB
最終ジャッジ日時 2023-10-18 06:36:53
合計ジャッジ時間 7,554 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,916 KB
testcase_01 AC 3 ms
4,916 KB
testcase_02 AC 3 ms
4,916 KB
testcase_03 AC 3 ms
4,916 KB
testcase_04 AC 3 ms
4,916 KB
testcase_05 AC 3 ms
4,916 KB
testcase_06 AC 3 ms
4,916 KB
testcase_07 AC 9 ms
4,916 KB
testcase_08 AC 28 ms
5,444 KB
testcase_09 AC 17 ms
5,180 KB
testcase_10 AC 19 ms
5,180 KB
testcase_11 AC 19 ms
5,180 KB
testcase_12 AC 16 ms
5,180 KB
testcase_13 AC 12 ms
4,916 KB
testcase_14 AC 11 ms
4,916 KB
testcase_15 AC 17 ms
5,180 KB
testcase_16 AC 34 ms
5,708 KB
testcase_17 AC 42 ms
5,708 KB
testcase_18 AC 37 ms
5,708 KB
testcase_19 AC 16 ms
5,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll inf=1555505555;
ll mod=1000000007;
int main(){
    ll n;
    cin >> n;
    vector<ll>a(n);
    vector<ll>memo(200000,0);
    for (ll i = 0; i < n; i++)
    {
        cin >> a[i];
        memo[a[0]-a[i]]+=1;
    }
    for (ll i = 1; i <a[0]; i++)
    {
        memo[i]+=memo[i-1];
    }
    for (ll i = a[0]-1; i >=0; i--)
    {
        cout << memo[i] << ' ';
    }
    
}
0