OK,lets go↵
------------------↵
↵
↵
~~~~~↵
#include<bits/stdc++.h>↵
↵
using namespace std;↵
↵
int main()↵
{↵
ios::sync_with_stdio(false);↵
int t,s,x;↵
scanf("%d%d%d",&t,&s,&x);↵
int mod ;↵
if(s<=(x-t)||x==t) mod=(x-t)%s;↵
else mod=-1;↵
if(mod==0||mod==1) puts("YES");↵
else puts("NO");↵
}↵
~~~~~↵
↵
------------------↵
↵
↵
~~~~~↵
#include<bits/stdc++.h>↵
↵
using namespace std;↵
↵
int main()↵
{↵
ios::sync_with_stdio(false);↵
int t,s,x;↵
scanf("%d%d%d",&t,&s,&x);↵
int mod ;↵
if(s<=(x-t)||x==t) mod=(x-t)%s;↵
else mod=-1;↵
if(mod==0||mod==1) puts("YES");↵
else puts("NO");↵
}↵
~~~~~↵
↵




