dmoj-rust
A Rust crate for providing helpful methods in online judging.
Usage
extern crate dmoj;
Provided macros
print!
, println!
This crate provides print!
and println!
macros that shadow the prelude versions. These versions are about 10 times faster and fully API compatible, but sacrifice thread safety.
Example
extern crate dmoj;
flush!
Flushes the stdout buffer.
Example
extern crate dmoj;
use thread;
use Duration;
scan!
scan! ;
scan! ;
A macro for scanning values from stdin. Currently, only scanning integers is supported. Note that the scanner will continue to read stdin until it finds something that looks like an integer. If the macro is called with multiple type arguments a tuple of the values will be returned, otherwise the value itself is returned.
Example
extern crate dmoj;