P817 graph's connected components

graph's connected components

题目描述

Given an integers set of m integers,each integer is in the range [0, 2, ..., n-1]. A graph is build on the following constraints: if integers X and Y satisfy X&Y=0 (& is bitwise AND operation),X and Y are connected by an undirected edge.Please help PIPI count the number of connected components in the graph!

输入格式

Input contains multiple test cases. Each test case starts with a number n(0 <= n <= 22) and m(1<=m<=2^n) .

🔒
登录后查看完整题面
登录后查看题目

统计