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: https://ide.usaco.guide/NEppQ98umEvbLISzK45 Is this the code you’re referring to?

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