|
|
back to boardRE2 in Rust In the statement, "any symbol" means NOT any valid ASCII char, but any byte, including those with codes 128..255. Common methods to read text in Rust, including stdin().read_line, expect valid UTF-8 and therefore crash on test 2 where bytes 128..255 are present. I got AC with this: let mut reader = BufReader::new(stdin()); let mut s = Vec::new(); reader.read_until(10, &mut s).unwrap(); |
|
|