Created
February 7, 2020 20:36
-
-
Save clavin/215ca896e46893aae909a3393af55294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{stdin, BufRead, BufReader}; | |
const CROW: &str = r#" | |
▒▒▒▒▒▒▓▓▓▓▒▒ | |
▓▓▒▒▓▓▒▒ | |
▓▓▓▓▓▓▓▓▒▒ | |
▓▓████▓▓████▓▓▒▒ | |
▓▓▓▓▓▓▓▓▓▓██▓▓████ | |
▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓████ | |
▓▓▓▓▓▓▒▒▓▓▒▒▒▒████▓▓▓▓ | |
██▓▓▓▓▒▒▓▓▒▒▓▓▓▓▓▓▓▓██▓▓ | |
██▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ | |
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓ | |
▓▓▒▒▓▓▓▓▓▓██▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██ | |
▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓██████▓▓ | |
▓▓▓▓▓▓██▓▓▓▓▓▓██████▓▓██▓▓██████ | |
▓▓██▒▒▓▓████████ ██████▓▓████ | |
▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓██ | |
██▒▒ ██ ██▒▒ | |
▓▓ ▓▓ | |
▓▓ ▓▓ | |
▒▒ ▓▓ | |
██▓▓▒▒██ ▓▓▒▒ | |
▒▒ | |
"#; | |
fn main() -> Result<(), std::io::Error> { | |
let mut crow_lines = CROW.lines().skip(1); | |
let mut last_crow_line = ""; | |
for line in BufReader::new(stdin()).lines() { | |
let crow_line = match crow_lines.next() { | |
Some(crow_line) => { | |
last_crow_line = crow_line; | |
crow_line | |
} | |
None => last_crow_line, | |
}; | |
println!("{} {}", crow_line, line?); | |
} | |
for crow_line in crow_lines { | |
println!("{}", crow_line); | |
} | |
Ok(()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment