Submission #3027415
Source Code Expand
use std::io; fn main() { let (x, y) = { let i = read::<isize>(); (i[0], i[1]) }; let gx = match x { 1|3|5|7|8|10|12 => 1, 4|6|9|11 => 2, 2 => 3, _ => 4, }; let gy = match y { 1|3|5|7|8|10|12 => 1, 4|6|9|11 => 2, 2 => 3, _ => 4, }; if gx == gy { println!("Yes"); } else { println!("No"); } } #[allow(dead_code)] fn read<T>() -> Vec<T> where T: std::str::FromStr, T::Err: std::fmt::Debug { let mut buf = String::new(); io::stdin().read_line(&mut buf).unwrap(); buf.split_whitespace() .map(|s| s.trim().parse().unwrap()) .collect() } #[allow(dead_code)] fn read_one<T>() -> T where T: std::str::FromStr, T::Err: std::fmt::Debug { let mut buf = String::new(); io::stdin().read_line(&mut buf).unwrap(); buf.trim().parse().unwrap() }
Submission Info
Submission Time | |
---|---|
Task | A - Grouping |
User | koka |
Language | Rust (1.15.1) |
Score | 100 |
Code Size | 955 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 4352 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt |
All | 0_00.txt, 0_01.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 2 ms | 4352 KB |
0_01.txt | AC | 2 ms | 4352 KB |
1_00.txt | AC | 2 ms | 4352 KB |
1_01.txt | AC | 2 ms | 4352 KB |
1_02.txt | AC | 2 ms | 4352 KB |
1_03.txt | AC | 2 ms | 4352 KB |
1_04.txt | AC | 2 ms | 4352 KB |