3 ms·
That "char city[32]" looks like a challenge. Lets hope Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is not in the test set.
by tuwtuwtuwtuw 3y ago
That "char city[32]" looks like a challenge. Lets hope Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is not in the test set.
- npalli 3y agoIs it really a C program if you cannot execute a buffer overflow attack.
- RodgerTheGreat 3y agoThe repo for the original Java-based challenge states that station names will be between 1 and 100 bytes long. In practice, the test data uses shorter names, and the first few bytes of each name happen to be distinct from other names, so you can cut some corners and still arrive at the correct result.
- tuwtuwtuwtuw 3y agoIf the application doesn't have to be implemented according to spec, then I propose we skip reading the file and just hard code the results.