I.cpp 243 B

12345678910111213141516
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n, k, t;
  6. cin >> n >> k >> t;
  7. int res = n*3 + min(k-1, n-k);
  8. if (res <= t)
  9. cout << "YES" << endl;
  10. else
  11. cout << "NO" << endl;
  12. return 0;
  13. }