CSES - Datatähti 2021 alku - Results
Submission details
Task:Sanalista
Sender:antti_p
Submission time:2020-10-02 21:44:15 +0300
Language:Rust
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails

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