Language: C++

#include <bits/stdc++.h>
??????
using namespace std;
??????
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
const ll MOD = 10e9+7;
??????
int binsearch_lower_bound(vector<ll>& vec, int val) {
????int low = 0;?????????????????????? // ???????????????
????int high = vec.size();?? // ?????????????????????§??£?????????????° [low, high] ????????????????¨??????
????while (low < high) {
????????int mid = (low + high) / 2;?? // ????????????????????????£?????§????????????????????????????????????
??????????????????????????????????????????????????????????????????// ??????????????? mid=low+(high-low)/2 ????¨????????????
????????int midval = vec[mid];???????????? // ??????????§??????
??????
????????// ???§??£?????????????????????
????????if (midval < val) low = mid + 1;
????????else high = mid;
????}
????return low;
}
??????
int main(){
????cin.tie(0);
????ios::sync_with_stdio(false);
??????
????int n,t;
????cin >> n >> t;
????std::vector<ll> v;
????for(int i=0;i<n;i++){
????????ll d;
????????cin >> d;
????????v.push_back(d);
????}
????sort(v.begin(),v.end());
????ll res[n+1];
????res[0]=1;
????for(int i=1;i<n;i++){
????????if(v[i-1]>=v[i]-t){
????????????int idx=binsearch_lower_bound(v,v[i]-t);
????????????res[i] = (res[i-1]*(i-idx+1))%MOD;
????????}
????????else res[i]=res[i-1];
????}
????cout << res[n-1] << endl;
}

Compiler output:
a.cc:20:65: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   20 | ??????????????????????????????????????????????????????????????????// ??????????????? mid=low+(high-low)/2 ????¨????????????
a.cc:23:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   23 | ????????// ???§??£?????????????????????
a.cc:2:1: error: expected unqualified-id before '?' token
    2 | ??????
      | ^
a.cc:4:1: error: expected unqualified-id before '?' token
    4 | ??????
      | ^
a.cc:6:9: error: 'pair' does not name a type
    6 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:7:9: error: 'vector' does not name a type
    7 | typedef vector<int> VI;
      |         ^~~~~~
a.cc:8:9: error: 'vector' does not name a type
    8 | typedef vector<VI> VVI;
      |         ^~~~~~
a.cc:11:17: error: 'numeric_limits' was not declared in this scope; did you mean 'std::numeric_limits'?
   11 | const int INF = numeric_limits<int>::max() / 2;
      |                 ^~~~~~~~~~~~~~
      |                 std::numeric_limits
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:55,
                 from a.cc:1:
/usr/include/c++/14/limits:312:12: note: 'std::numeric_limits' declared here
  312 |     struct numeric_limits : public __numeric_limits_base
      |            ^~~~~~~~~~~~~~
a.cc:11:32: error: expected primary-expression before 'int'
   11 | const int INF = numeric_limits<int>::max() / 2;
      |                                ^~~
a.cc:12:21: error: 'numeric_limits' was not declared in this scope; did you mean 'std::numeric_limits'?
   12 | const int NEG_INF = numeric_limits<int>::min() / 2;
      |                     ^~~~~~~~~~~~~~
      |                     std::numeric_limits
/usr/include/c++/14/limits:312:12: note: 'std::numeric_limits' declared here
  312 |     struct numeric_limits : public __numeric_limits_base
      |            ^~~~~~~~~~~~~~
a.cc:12:36: error: expected primary-expression before 'int'
   12 | const int NEG_INF = numeric_limits<int>::min() / 2;
      |                                    ^~~
a.cc:13:7: error: 'll' does not name a type
   13 | const ll MOD = 10e9+7;
      |       ^~
a.cc:14:1: error: expected unqualified-id before '?' token
   14 | ??????
      | ^
a.cc:29:1: error: expected unqualified-id before '?' token
   29 | ??????
      | ^