Skip to content

Instantly share code, notes, and snippets.

@icub3d
Created December 5, 2025 19:43
Show Gist options
  • Select an option

  • Save icub3d/2eb6b0563ad213dab2c6551c8bae5e71 to your computer and use it in GitHub Desktop.

Select an option

Save icub3d/2eb6b0563ad213dab2c6551c8bae5e71 to your computer and use it in GitHub Desktop.
Kattis leftbeehind
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
for m in s.lines() {
if m == "0 0" {
break;
}
let (s, x) = m
.split_once(' ')
.map(|(l, r)| (l.parse::<usize>().unwrap(), r.parse::<usize>().unwrap()))
.unwrap();
if x + s == 13 {
println!("Never speak again.")
} else if x > s {
println!("Left beehind.");
} else if s > x {
println!("To the convention.");
} else if s == x {
println!("Undecided.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment