ans' c =
  let cc = map (\m -> filter (\cc -> m == (fst cc)) c) mark
      r  = and $ map tst cc
  in
    if r then 1 else 0
ans' c =
  let cc = map (\m -> filter (\cc -> m == (fst cc)) c) mark
      r  = and $ map tst cc
  in
    if r then 1 else 0
ans' c =
  let cc = map (\m -> filter (\cc -> m == (fst cc)) c) mark
      r  = and $ map tst cc
  in
    if r then 1 else 0