結果

問題 No.1110 好きな歌
ユーザー yuya1234
提出日時 2020-07-10 21:57:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 833 bytes
コンパイル時間 1,785 ms
コンパイル使用メモリ 166,036 KB
実行使用メモリ 8,960 KB
最終ジャッジ日時 2024-10-11 13:12:17
合計ジャッジ時間 9,087 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 TLE * 1 -- * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
*    author:  yuya1234
*    created: 10.07.2020 21:42:50
**/

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)

#define ALL(x) x.begin(),x.end()
#define SORT(x) sort(x.begin(),x.end())
#define SORTD(x) sort(x.rbegin(),x.rend())
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define SZ(x) ll(x.size())

#define MEMSET(v, h) memset((v), h, sizeof(v))

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int n,d;
  cin>>n>>d;
  
  int a[n],ans;
  REP(i,n)cin>>a[i];

  REP(i,n)
  {
    ans=0;
    REP(j,n)
    {
      if(i!=j && (a[i]-a[j]>=d))ans++;
    }
    cout<<ans<<endl;
  }




  return 0;
}
0