diff --git a/atcoder/abc377/a.rs b/atcoder/abc377/a.rs new file mode 100644 index 00000000..9943ca51 --- /dev/null +++ b/atcoder/abc377/a.rs @@ -0,0 +1,11 @@ +fn getline() -> String { + let mut ret = String::new(); + std::io::stdin().read_line(&mut ret).ok().unwrap(); + ret +} + +fn main() { + let mut s = getline().trim().bytes().collect::>(); + s.sort(); + println!("{}", if s == b"ABC" { "Yes" } else { "No" }); +} diff --git a/atcoder/abc377/b.rs b/atcoder/abc377/b.rs new file mode 100644 index 00000000..16b60b75 --- /dev/null +++ b/atcoder/abc377/b.rs @@ -0,0 +1,34 @@ +fn getline() -> String { + let mut ret = String::new(); + std::io::stdin().read_line(&mut ret).ok().unwrap(); + ret +} + +fn main() { + let mut b = vec![vec![]; 8]; + for i in 0..8 { + let s = getline().chars().collect::>(); + b[i] = s; + } + let mut ans = 0; + for i in 0..8 { + for j in 0..8 { + if b[i][j] == '#' { + for a in 0..8 { + if b[a][j] != '#' { + b[a][j] = 'x'; + } + } + for a in 0..8 { + if b[i][a] != '#' { + b[i][a] = 'x'; + } + } + } + } + } + for i in 0..8 { + ans += b[i].iter().filter(|&&c| c == '.').count(); + } + println!("{}", ans); +} diff --git a/atcoder/abc377/remain.txt b/atcoder/abc377/remain.txt new file mode 100644 index 00000000..3a91954e --- /dev/null +++ b/atcoder/abc377/remain.txt @@ -0,0 +1,5 @@ +c +d +e +f +g