Dirring's blog

By Dirring, history, 10 years ago, In English

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");
}
  • Vote: I like it
  • -18
  • Vote: I do not like it

| Write comment?