Browse Source

赶火车

爱玲姐姐 5 years ago
parent
commit
6926c0ea38
1 changed files with 16 additions and 0 deletions
  1. 16 0
      I.cpp

+ 16 - 0
I.cpp

@@ -0,0 +1,16 @@
+#include<bits/stdc++.h>
+ 
+using namespace std;
+ 
+int main()
+{
+    int n, k, t;
+    cin >> n >> k >> t;
+    int res = n*3 + min(k-1, n-k);
+    if (res <= t)
+        cout << "YES" << endl;
+    else
+        cout << "NO" << endl;
+ 
+    return 0;
+}