func (m *Map) Count() int {
	return len(m.array)
}
Count implements Set interface.
package common
import (
	"reflect"
	"sort"
)
var (
	hexMap = []byte{
		'0', '1', '2', '3', '4', '5', '6', '7',
		'8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
	}
)
func getHexByte(n int) byte { return hexMap[n] }
func getHexIndex(c byte) int {
	for i, x := range hexMap {
		if x == c {
			return i
		}
	}
	return 0
}
func hex(a []int) string {
	var out []byte
	for _, n := range a {
		i, r := n/4, uint(n&3)
		if i >= len(out) {
			add := make([]byte, i-len(out)+1)
			for k := range add {
				add[k] = '0'
			}
			out = append(add, out...)
		}
		i = len(out) - 1 - i
		out[i] = getHexByte(getHexIndex(out[i]) | (1 << r))
	}
	return string(out)
}
type Set interface {
	IsSet(int) bool
	Count() int
	Set(int)
}
type Map struct {
	array []int
}
func (m *Map) find(n int) (int, bool) {
	k := sort.SearchInts(m.array, n)
	return k, k < len(m.array) && m.array[k] == n
}
func (m *Map) Set(n int) {
	if k, ok := m.find(n); !ok {
		m.array = append(m.array, n)
		copy(m.array[k+1:], m.array[k:])
		m.array[k] = n
	}
}
func (m *Map) IsSet(n int) bool {
	_, ok := m.find(n)
	return ok
}
func (m *Map) Zero() {
	m.array = m.array[:0]
}