use std::collections::HashSet; use proconio::input; fn main() { input! { n:usize, mut a:[usize;n], } const D: usize = 60; let n = if n > 100 { 100 } else { n }; let mut hists = vec![]; for i in 0..n { let mut hs = HashSet::new(); hs.insert(i); hists.push(hs); } let mut rank = 0; for col in 0..D { let Some(row)=(rank..n).find(|&row|a[row]&(1<>(); } rank += 1; } if let Some(ind) = (0..n).find(|&i| a[i] == 0) { let ans = &hists[ind]; println!("{}", ans.len()); for bi in ans { print!("{} ", bi + 1); } println!(); } else { println!("-1"); } }