Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
using namespace std;
using P = pair<ll,ll>;

using ll = long long;
const int mod = 998244353;
struct mint {
  ll x;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  void operator++() {
      x += 1;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  void operator--() {
      x -= 1;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};

int main() {
    int n;
    cin >> n;
    vector<P> rob(n);
    rep(i,n) {
        int x,d;
        cin >> x >> d;
        rob[i] = {x,x+d};
    }
    sort(all(rob));
    mint ans = 1;
    vector<ll> mostr(n);
    mostr[0] = rob[0].second;
    rep2(i,1,n) {
        mostr[i] = max(mostr[i-1],rob[i].second);
    }
    mint nans = 2;
    for(int i = n-2; i >= 0; i--) {
        if(mostr[i] <= rob[i+1].first) {
            ans*=nans;
            nans = 2;
        } else {
            if(rob[i].second <= rob[i+1].first) nans*=2;
            else nans += 1;
        }
    }
    ans*=nans;
    cout << ans.x << endl;
}

Compiler output:
a.cc:6:16: error: 'll' was not declared in this scope; did you mean 'all'?
    6 | using P = pair<ll,ll>;
      |                ^~
      |                all
a.cc:6:19: error: 'll' was not declared in this scope; did you mean 'all'?
    6 | using P = pair<ll,ll>;
      |                   ^~
      |                   all
a.cc:6:21: error: template argument 1 is invalid
    6 | using P = pair<ll,ll>;
      |                     ^
a.cc:6:21: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:68:12: error: 'P' was not declared in this scope
   68 |     vector<P> rob(n);
      |            ^
a.cc:68:13: error: template argument 1 is invalid
   68 |     vector<P> rob(n);
      |             ^
a.cc:68:13: error: template argument 2 is invalid
a.cc:72:12: error: invalid types 'int[int]' for array subscript
   72 |         rob[i] = {x,x+d};
      |            ^
a.cc:4:18: error: request for member 'begin' in 'rob', which is of non-class type 'int'
    4 | #define all(a) a.begin(),a.end()
      |                  ^~~~~
a.cc:74:10: note: in expansion of macro 'all'
   74 |     sort(all(rob));
      |          ^~~
a.cc:4:28: error: request for member 'end' in 'rob', which is of non-class type 'int'
    4 | #define all(a) a.begin(),a.end()
      |                            ^~~
a.cc:74:10: note: in expansion of macro 'all'
   74 |     sort(all(rob));
      |          ^~~
a.cc:77:19: error: invalid types 'int[int]' for array subscript
   77 |     mostr[0] = rob[0].second;
      |                   ^
a.cc:79:38: error: invalid types 'int[int]' for array subscript
   79 |         mostr[i] = max(mostr[i-1],rob[i].second);
      |                                      ^
a.cc:83:27: error: invalid types 'int[int]' for array subscript
   83 |         if(mostr[i] <= rob[i+1].first) {
      |                           ^
a.cc:87:19: error: invalid types 'int[int]' for array subscript
   87 |             if(rob[i].second <= rob[i+1].first) nans*=2;
      |                   ^
a.cc:87:36: error: invalid types 'int[int]' for array subscript
   87 |             if(rob[i].second <= rob[i+1].first) nans*=2;
      |                                    ^