水题,注意到 a + b 的 a 只能遍历 1 到 n - 1,所以 k 应满足 k < n
#include <bits/stdc++.h> using i64 = long long; int main() { std::cin.tie(nullptr)->sync_with_stdio(false); int n, k; std::cin >> n >> k; std::cout << (k <= n - 1 ? "YES" : "NO"); return 0; }
水题,注意到 a + b 的 a 只能遍历 1 到 n - 1,所以 k 应满足 k < n
#include <bits/stdc++.h> using i64 = long long; int main() { std::cin.tie(nullptr)->sync_with_stdio(false); int n, k; std::cin >> n >> k; std::cout << (k <= n - 1 ? "YES" : "NO"); return 0; }