結果

問題 No.1110 好きな歌
ユーザー marksman_
提出日時 2020-07-10 21:38:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 543 bytes
コンパイル時間 1,951 ms
コンパイル使用メモリ 195,056 KB
最終ジャッジ日時 2025-01-11 18:07:48
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 10 WA * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

// Sky's the limit :)
#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    
    int T = 1; 
    // cin >> T; 
    while (T--) {
        int n, d;
        cin >> n >> d;
        vector<int> a;
        for (int i = 1; i <= n; i++) {
            int x;
            cin >> x;
            a.push_back(x);

            auto it = lower_bound(a.begin(), a.end(), x - d + 1) - a.begin();
            cout << it << '\n';
        }
    }
    
    return 0;
}

    
0