#include using namespace std; const int D=1e9; int n,d,t,done[100]; long long x[100],sz,bef,res; struct R{ long long st,ed; } r[100]; bool cmp(const R &a,const R &b){ if(a.st==b.st) return a.ed