Codeforces Round #362 (Div. 2) A
简单题
#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <limits>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#define lowbit(x) ( x&(-x) )
#define pi 3.141592653589793
#define e 2.718281828459045
#define INF 0x3f3f3f3f
#define HalF (l + r)>>1
#define lsn rt<<1
#define rsn rt<<1|1
#define Lson lsn, l, mid
#define Rson rsn, mid+1, r
#define QL Lson, ql, qr
#define QR Rson, ql, qr
#define myself rt, l, r
using namespace std;
typedef unsigned long long ull;
typedef unsigned int uit;
typedef long long ll;
int t, s, x;
int main()
{
scanf("%d%d%d", &t, &s, &x);
if(x == t) printf("YES\n");
else
{
if(x < t || x < t + s) { printf("NO\n"); return 0; }
x -= t;
int tmp = x % s;
if(tmp == 1 || tmp == 0) printf("YES\n");
else printf("NO\n");
}
return 0;
}