Language: C++

#include <bits/stdc++.h>
using L = long long;
const L INF=1e15;
#define F first
#define S second
#define I XH[i]
#define W std::c

L N,D,A,n=0,r=0,t;
pair<L,L>XH[3e5];
queue<pair<L,L> >P;
int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;} 

Compiler output:
a.cc:10:1: error: 'pair' does not name a type
   10 | pair<L,L>XH[3e5];
      | ^~~~
a.cc:11:1: error: 'queue' does not name a type
   11 | queue<pair<L,L> >P;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:12:13: error: 'Win' was not declared in this scope; did you mean 'sin'?
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |             ^~~
      |             sin
a.cc:6:11: error: 'XH' was not declared in this scope
    6 | #define I XH[i]
      |           ^~
a.cc:12:50: note: in expansion of macro 'I'
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                  ^
a.cc:12:65: error: 'XH' was not declared in this scope
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                                 ^~
a.cc:12:60: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                            ^~~~
      |                                                            std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:12:100: error: 'P' was not declared in this scope
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                                                                    ^
a.cc:12:188: error: 'P' was not declared in this scope
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                                                                                                                                                            ^
a.cc:12:210: error: 'now' was not declared in this scope; did you mean 'pow'?
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                                                                                                                                                                                  ^~~
      |                                                                                                                                                                                                                  pow
a.cc:12:221: error: 'Wout' was not declared in this scope
   12 | int main() {Win>>N>>D>>A;for(L i=0;i<N;i++){Win>>I.F>>I.S;}sort(XH,XH+N);for(L i=0;i<N;i++){while(!P.empty()&&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});now+=t*A;}}Wout<<r;}
      |                                                                                                                                                                                                                             ^~~~