3 ms·
How did you read the input? All at once or one line at a time?
by yxhuvud 14y ago
How did you read the input? All at once or one line at a time?
- sspiff 14y agoOne line at a time. Is that significantly slower for stdin? I would assume that this wouldn't make a difference, since we're talking about simple memory operations, and 20k method invocations shouldn't be that hard on a modern system.
- yxhuvud 14y agostdin? No, that shouldn't matter then, but it would if you were reading from file.