Problem p03129 - Generation 2

Orig Description

Score : 100 points
Problem StatementDetermine if we can choose K different integers between 1 and N (inclusive) so that no two of them differ by 1.
Constraints
1\leq N,K\leq 100
N and K are integers.
InputInput is given from Standard Input in the following format:
N K
OutputIf we can choose K integers as above, print YES; otherwise, print NO.
Sample Input 13 2
Sample Output 1YES
We can choose 1 and 3.
Sample Input 25 5
Sample Output 2NO
Sample Input 331 10
Sample Output 3YES
Sample Input 410 90
Sample Output 4NO

Extracted Specification

Canonicalized Input Description:

An integer N (1 ≤ N ≤ 100), representing some quantity or size.
An integer K (1 ≤ K ≤ 100), representing some quantity or size.

### Example Input:

```
13 2
```

### Function Signature:
Write a function f(N, K) that takes in the input.
def f(N: int, K: int):
    '''
    N: an integer
    K: an integer
    '''

Test Case Generator

Certainly! Here is the test case generator for the given problem statement:

```python
import random

def tcgen():
    # Constraints
    N = random.randint(1, 100)
    K = random.randint(1, 100)
    
    return N, K

# Example usage
if __name__ == "__main__":
    test_cases = [tcgen() for _ in range(10)]
    for i, (N, K) in enumerate(test_cases):
        print(f"Sample Input {i+1}")
        print(f"{N} {K}")
        # Optionally, you can also call the solution function to print the expected output.
        # For now, we just print the inputs.
```

This generator will create random test cases for the problem ensuring that values of \(N\) and \(K\) are within the given constraints (1 ≤ \(N, K\) ≤ 100). Each call to `tcgen()` will return a tuple (N, K) representing a test case.

You can run this script and it will generate multiple sample inputs, which you can use to test your solution.

Extract Arguments

def extract_arguments(fh):
    N, K = map(int, fh.readline().strip().split())
    return N, K