Skip to content

Commit

Permalink
pakencamp_2020_day1 h
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Mar 29, 2021
1 parent 5da5ce6 commit f11d1a5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pakencamp-2020-day1/src/bin/h.rs
@@ -1,11 +1,13 @@
// <https://atcoder.jp/contests/pakencamp-2020-day1/editorial/516>
use proconio::input;
use proconio::marker::Usize1;

fn main() {
input! {
n: usize,
a: [Usize1; n],
t: usize,
abc: [(u64, u64, u64); t],
};
let ans = n - a.len();
println!("{}", ans);
for &(a, b, c) in abc.iter() {
let ans = ((a & b) == b) && (((b & c) == b) || ((b & c) == 0)) && ((a | c) == a);
println!("{}", if ans { "Yes" } else { "No" });
}
}

0 comments on commit f11d1a5

Please sign in to comment.