Submission #49037237
Source Code Expand
Copy
// -*- coding:utf-8-unix -*-use proconio::input;use std::collections::HashMap;fn main() {input! {w: String,}let not_beautiful_count = w.chars().fold(HashMap::new(), |mut acc, c| {*acc.entry(c).or_insert(0) += 1;acc}).iter().filter(|(_, count)| **count % 2 != 0).count();let yes = not_beautiful_count == 0;
// -*- coding:utf-8-unix -*- use proconio::input; use std::collections::HashMap; fn main() { input! { w: String, } let not_beautiful_count = w .chars() .fold(HashMap::new(), |mut acc, c| { *acc.entry(c).or_insert(0) += 1; acc }) .iter() .filter(|(_, count)| **count % 2 != 0) .count(); let yes = not_beautiful_count == 0; println!("{}", if yes { "Yes" } else { "No" }); }
Submission Info
Submission Time | |
---|---|
Task | B - Beautiful Strings |
User | homura10059 |
Language | Rust (rustc 1.70.0) |
Score | 200 |
Code Size | 499 Byte |
Status | AC |
Exec Time | 0 ms |
Memory | 2092 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_01.txt, example_02.txt |
All | example_01.txt, example_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_01.txt | AC | 0 ms | 2092 KB |
example_02.txt | AC | 0 ms | 1936 KB |
subtask1_01.txt | AC | 0 ms | 1892 KB |
subtask1_02.txt | AC | 0 ms | 1920 KB |
subtask1_03.txt | AC | 0 ms | 1928 KB |
subtask1_04.txt | AC | 0 ms | 1972 KB |
subtask1_05.txt | AC | 0 ms | 1928 KB |
subtask1_06.txt | AC | 0 ms | 1860 KB |
subtask1_07.txt | AC | 0 ms | 1936 KB |
subtask1_08.txt | AC | 0 ms | 1872 KB |
subtask1_09.txt | AC | 0 ms | 1936 KB |
subtask1_10.txt | AC | 0 ms | 1928 KB |