Really Good Compression
Time limit1sMemory limit128 MB
Given N distinct 1000-bit files, decide whether each can be compressed to at most b bits.
- Level
Easy3 of 10
- Topics
- Math, Combinatorics, Bit manipulation, Implementation
- Solved
- No attempts yet
Problem
When exam season arrives, many people start doing things they normally never do. This exam season, Sanggeun came up with a fantastic compression algorithm.
Using Sanggeun's algorithm, when you compress files, each file becomes at most bits after compression. It is hard to believe such a compression algorithm could exist, so write a program that decides whether such an algorithm is theoretically possible.
There are files to compress, all distinct, and each file consists of bits. In other words, no two files are exactly the same.
Input
The first line contains and , separated by a space. (, )
Output
Print yes if all files can be compressed so that each file is at most bits long, and no otherwise.