Submission #59162974


Source Code Expand

use itertools::Itertools;
use proconio::{input, marker::Chars};

pub fn main() {
    input! {
        board: [Chars; 8]
    };
    let mut ans = 0;
    for i in 0..8 {
        let mut local = 0;
        for j in 0..8 {
            if board[i][j] == '#' {
                local = 0;
                break;
            }
            let mut ok = true;
            for k in 0..8 {
                if board[k][j] == '#' {
                    ok = false;
                    break;
                }
            }
            if ok {
                local += 1;
            }
        }
        ans += local;
    }
    println!("{}", ans);
}

Submission Info

Submission Time
Task B - Avoid Rook Attack
User macaroon
Language Rust (rustc 1.70.0)
Score 200
Code Size 666 Byte
Status AC
Exec Time 1 ms
Memory 2076 KiB

Compile Error

warning: unused import: `itertools::Itertools`
 --> src/main.rs:1:5
  |
1 | use itertools::Itertools;
  |     ^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 1916 KiB
00_sample_01.txt AC 1 ms 1896 KiB
00_sample_02.txt AC 1 ms 1732 KiB
01_random_03.txt AC 1 ms 1984 KiB
01_random_04.txt AC 1 ms 1984 KiB
01_random_05.txt AC 1 ms 1908 KiB
01_random_06.txt AC 0 ms 1856 KiB
01_random_07.txt AC 1 ms 1932 KiB
01_random_08.txt AC 0 ms 1964 KiB
01_random_09.txt AC 1 ms 1868 KiB
01_random_10.txt AC 1 ms 2076 KiB
01_random_11.txt AC 0 ms 2068 KiB
01_random_12.txt AC 1 ms 1964 KiB
01_random_13.txt AC 1 ms 1968 KiB
01_random_14.txt AC 1 ms 1908 KiB
01_random_15.txt AC 1 ms 1984 KiB
01_random_16.txt AC 0 ms 1860 KiB