#include #include using namespace std; using namespace atcoder; #define rep(i,n) for(int i = 0; i < n; i++) #define all(a) a.begin(),a.end() #define SORT(a) sort(all(a)); #define MIN(a) *min_element(all(a)) #define MAX(a) *max_element(all(a)) #define SUM(a) accumulate(all(a),0LL) using ll=long long; using ld=long double; using ull=unsigned long; ll MOD=998244353; using mint = static_modint<998244353>; const int dx[]={0,1,0,-1,1,-1,1,-1};const int dy[]={1,0,-1,0,1,1,-1,-1}; const string ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZ";const string alpha="abcdefghijklmnopqrstuvwxyz"; int main(){ cin.tie(nullptr); cout.tie(nullptr); ios::sync_with_stdio(false); ll n,s;cin>>n>>s; vectorp(n); mapmp; rep(i,n){ cin>>p[i]; mp[p[i]]=i; } SORT(p); vectorans(0); rep(i,n){ auto Iter1 = upper_bound(all(p), p[i]+s); auto Iter2 = upper_bound(all(p), p[i]-s-1); if(Iter1-Iter2==1){ ans.push_back(p[i]); } } cout<ans2(c); for(ll i=0;i