Submission #15495562


Source Code Expand

Copy
use proconio::input;
use proconio::marker::Chars;

fn main() {
    input! {
        n: usize,
        s: [Chars; n],
    };
    let mut c_r = 0;
    let mut c_b = 0;
    for s_i in s.iter() {
        for &s_ij in s_i.iter() {
            match s_ij {
                'R' => c_r += 1,
                'B' => c_b += 1,
                '.' => {}
                _ => unreachable!(),
            }
        }
    }
    let ans = if c_r == c_b {
        "DRAW"
    } else if c_r > c_b {
        "TAKAHASHI"
    } else if c_r < c_b {
        "AOKI"
    } else {
        unreachable!()
    };
    println!("{}", ans);
}

Submission Info

Submission Time
Task A - 床塗り
User bouzuya
Language Rust (1.42.0)
Score 100
Code Size 612 Byte
Status
Exec Time 5 ms
Memory 2220 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample-01.txt, sample-02.txt, sample-03.txt
All 100 / 100 sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, sample-01.txt, sample-02.txt, sample-03.txt
Case Name Status Exec Time Memory
01-01.txt 5 ms 1988 KB
01-02.txt 2 ms 2108 KB
01-03.txt 1 ms 2052 KB
01-04.txt 1 ms 2092 KB
01-05.txt 1 ms 2048 KB
01-06.txt 1 ms 2120 KB
01-07.txt 3 ms 2080 KB
01-08.txt 1 ms 2036 KB
01-09.txt 2 ms 2024 KB
01-10.txt 1 ms 2004 KB
01-11.txt 1 ms 2220 KB
01-12.txt 2 ms 2216 KB
01-13.txt 2 ms 2204 KB
01-14.txt 1 ms 2128 KB
01-15.txt 1 ms 2168 KB
01-16.txt 2 ms 2080 KB
sample-01.txt 1 ms 2104 KB
sample-02.txt 3 ms 2116 KB
sample-03.txt 1 ms 2044 KB