Task: | Sanalista |
Sender: | antti_p |
Submission time: | 2020-10-02 21:44:15 +0300 |
Language: | Rust |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.01 s | details |
Code
use std::io; use std::io::prelude::*; fn main() { let stdin = io::stdin(); let mut lines = stdin.lock().lines(); let mut count = 0; 'outer: for _ in 0..lines.next().unwrap().unwrap().parse::<i32>().unwrap() { let mut charcount = [0; 256]; let l = lines.next().unwrap().unwrap(); for b in l.bytes() { charcount[b as usize]+= 1; } for c in charcount.iter() { if c % 2 == 1 { continue 'outer; } } count+= 1; } println!("{}", count); }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1000 korvata sopimusaika nuhatartunta korttiautomaatti ... |
correct output |
---|
15 |
user output |
---|
15 |
Test 2
Verdict: ACCEPTED
input |
---|
1000 pub hansikaslokero erikoisvalmisteinen unijukka ... |
correct output |
---|
42 |
user output |
---|
42 |
Test 3
Verdict: ACCEPTED
input |
---|
1000 haapalastu toipumisaika mustalaiskieli taidelainaamo ... |
correct output |
---|
70 |
user output |
---|
70 |