fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define fast() ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  5. #define all(x) (x).begin(),(x).end()
  6. #define yesc cout << "YES\n"
  7. #define noc cout << "NO\n"
  8. #define yesp printf("YES\n")
  9. #define nop printf("NO\n")
  10. #define PI 3.141592653589793238462643383279502884L
  11. typedef long long ll;
  12.  
  13. void solve() {
  14. int n, m, r; cin >> n >> m >> r;
  15.  
  16. if(n>=r) {
  17. yesc;
  18. return;
  19. }
  20.  
  21. if(n<=m) {
  22. noc;
  23. return;
  24. }
  25.  
  26. int curr=0;
  27. while(true) {
  28. curr+=n;
  29. if (curr>=r) break;
  30. curr-=m;
  31. }
  32.  
  33. yesc;
  34. }
  35.  
  36. int main() {
  37. fast();
  38.  
  39. int t=1;
  40. //cin >> t;
  41. while(t--)
  42. solve();
  43.  
  44.  
  45. return 0;
  46. }
  47.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
YES