about summary refs log tree commit diff
path: root/codeforces/697a.c
diff options
context:
space:
mode:
Diffstat (limited to 'codeforces/697a.c')
-rw-r--r--codeforces/697a.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/codeforces/697a.c b/codeforces/697a.c
new file mode 100644
index 0000000..576bc59
--- /dev/null
+++ b/codeforces/697a.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+int main()
+{
+	long t, s, x;
+
+	scanf("%ld %ld %ld", &t, &s, &x);
+
+	x -= t;
+
+	if (((x % s == 1) && (x / s > 0)) || ((x % s == 0) && (x / s >= 0)))
+		puts("YES");
+	else
+		puts("NO");
+
+	return 0;
+}