{"blog_url":"https://obelisk.hatenablog.com/","url":"https://obelisk.hatenablog.com/entry/2020/04/25/165818","version":"1.0","width":"100%","title":"AtCoder ABC128C \uff08\u95a2\u6570\u578bRuby?\uff09","image_url":null,"provider_name":"Hatena Blog","type":"rich","author_name":"obelisk2","published":"2020-04-25 16:58:18","description":"https://atcoder.jp/contests/abc128/tasks/abc128_c\u304d\u308c\u3044\u306b Ruby \u3089\u3057\u304f\u89e3\u3051\u305f\u306e\u3067\u3001\u30e1\u30e2\u3002 n, m = gets.split.map(&:to_i) cond = m.times.map { k, *ss = gets.split.map(&:to_i) ss.inject(0) {|acc, s| acc | 1 << (s - 1)} }.zip(gets.split.map(&:to_i)) puts (2 ** n).times.count {|switches| cond.all? {|c, p| (switches & c).t\u2026","author_url":"https://blog.hatena.ne.jp/obelisk2/","provider_url":"https://hatena.blog","blog_title":"Camera Obscura","categories":["\u7af6\u6280\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","Ruby"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2020%2F04%2F25%2F165818\" title=\"AtCoder ABC128C \uff08\u95a2\u6570\u578bRuby?\uff09 - Camera Obscura\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190"}