Fast input from usaco guide

the “even faster method” at usaco guide it’s not working, i tried it with the inputs from the examples and none of the two works, no output is done and the program keeps running.

Works on USACO Guide IDE: Is this the code you’re referring to?

yes, it doesn’t work on Dev-C++