Source Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define f first
#define s second
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define IAMSPEED ios_base::sync_with_stdio(0); cin.tie(0);

const int inf = 2e9;
const ll infll = 1e18;
const int M = 1000000007;
const int N = 1000;

int n, k, e ;

int main(){
    IAMSPEED
    cin >> n >> k >> e;
    int last = n, beforelast = min(n, n + e - 1);
    if(k == 1) return puts("Yes"), 0;
    if(n%(k-1) == 1 && last == beforelast){
        puts("No");
        return 0;
    }
    else {
        puts("Yes");
    }

}

Copy
Scientific Study Hambubger
GNU G++17
3 ms
1.0 MB
Wrong Answer