Language: C++

#include <bits/stdc++.h>
using namespace std;

#define ll long long 
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define all(x) (x).begin(),(x).end()
#define f(i, a, b) for (int i=a; i<(signed)(b); ++i)
#define pc __builtin_popcount // counts number of 1's in bin(num)

const double pi = 2*acos(0.0);
//__gcd(n1, n2);
//cout << fixed;
//cout << setprecision(6); //fixes # of dp

onst int mxN=2e5, M=998244353;
int n;
ar<int, 2> a[mxN];
ll dp[mxN+1];

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin >> n;
	for(i, 0, n){
		cin >> a[i][0] >> a[i][1];
    }
	sort(a, a+n);
	dp[n]=1;
	vector<ar<int, 2>> st{{n, (int)2e9}};
	for(int i=n-1; ~i; --i) {
		while(st.back()[1]<a[i][0]+a[i][1])
			st.pop_back();
		int p=st.back()[0];
		dp[i]=dp[p];
		st.push_back({i, a[i][0]});
		dp[i]=(dp[i]+dp[i+1])%M;
	}
	cout << dp[0];
}

// not my code but nice ans







Compiler output:
a.cc:16:1: error: 'onst' does not name a type; did you mean 'const'?
   16 | onst int mxN=2e5, M=998244353;
      | ^~~~
      | const
a.cc:18:1: error: 'ar' does not name a type
   18 | ar<int, 2> a[mxN];
      | ^~
a.cc:19:7: error: 'mxN' was not declared in this scope
   19 | ll dp[mxN+1];
      |       ^~~
a.cc: In function 'int main()':
a.cc:27:13: error: 'i' was not declared in this scope; did you mean 'pi'?
   27 |         for(i, 0, n){
      |             ^
      |             pi
a.cc:30:14: error: 'a' was not declared in this scope
   30 |         sort(a, a+n);
      |              ^
a.cc:31:9: error: 'dp' was not declared in this scope; did you mean 'dup'?
   31 |         dp[n]=1;
      |         ^~
      |         dup
a.cc:31:16: error: expected ')' before ';' token
   31 |         dp[n]=1;
      |                ^
      |                )
a.cc:27:12: note: to match this '('
   27 |         for(i, 0, n){
      |            ^
a.cc:32:16: error: 'ar' was not declared in this scope
   32 |         vector<ar<int, 2>> st{{n, (int)2e9}};
      |                ^~
a.cc:32:25: error: template argument 1 is invalid
   32 |         vector<ar<int, 2>> st{{n, (int)2e9}};
      |                         ^~
a.cc:32:25: error: template argument 2 is invalid
a.cc:32:44: error: too many braces around scalar initializer for type 'int'
   32 |         vector<ar<int, 2>> st{{n, (int)2e9}};
      |                                            ^
a.cc:34:26: error: request for member 'back' in 'st', which is of non-class type 'int'
   34 |                 while(st.back()[1]<a[i][0]+a[i][1])
      |                          ^~~~
a.cc:34:36: error: 'a' was not declared in this scope
   34 |                 while(st.back()[1]<a[i][0]+a[i][1])
      |                                    ^
a.cc:35:28: error: request for member 'pop_back' in 'st', which is of non-class type 'int'
   35 |                         st.pop_back();
      |                            ^~~~~~~~
a.cc:36:26: error: request for member 'back' in 'st', which is of non-class type 'int'
   36 |                 int p=st.back()[0];
      |                          ^~~~
a.cc:37:17: error: 'dp' was not declared in this scope; did you mean 'p'?
   37 |                 dp[i]=dp[p];
      |                 ^~
      |                 p
a.cc:38:20: error: request for member 'push_back' in 'st', which is of non-class type 'int'
   38 |                 st.push_back({i, a[i][0]});
      |                    ^~~~~~~~~
a.cc:38:34: error: 'a' was not declared in this scope
   38 |                 st.push_back({i, a[i][0]});
      |                                  ^
a.cc:39:39: error: 'M' was not declared in this scope
   39 |                 dp[i]=(dp[i]+dp[i+1])%M;
      |                                       ^
a.cc:41:17: error: 'dp' was not declared in this scope; did you mean 'dup'?
   41 |         cout << dp[0];
      |                 ^~
      |                 dup