Created
January 20, 2026 16:17
-
-
Save icub3d/60358ca3fad867e1266b661620b07b7f to your computer and use it in GitHub Desktop.
Kattis peasoup
This file contains hidden or 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::{Read, stdin}; | |
| fn main() { | |
| let mut s = String::new(); | |
| stdin().read_to_string(&mut s).unwrap(); | |
| let mut ss = s.lines(); | |
| let n = ss.next().unwrap().parse::<usize>().unwrap(); | |
| for _ in 0..n { | |
| let k = ss.next().unwrap().parse::<usize>().unwrap(); | |
| let r = ss.next().unwrap(); | |
| let menu = (0..k).map(|_| ss.next().unwrap()).collect::<Vec<_>>(); | |
| if menu.contains(&"pea soup") && menu.contains(&"pancakes") { | |
| println!("{r}"); | |
| return; | |
| } | |
| } | |
| println!("Anywhere is fine I guess"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment