class GHSortedCollection {

    public void insert(int key, int value) {
        GHIntHashSet set = map.get(value);
        if (set == null) {
            map.put(value, set = new GHIntHashSet(slidingMeanValue));
        }
//        else
//            slidingMeanValue = Math.max(5, (slidingMeanValue + set.size()) / 2);
        if (!set.add(key)) {
            throw new IllegalStateException("use update if you want to update " + key);
        }
        size++;
    }

    public  GHSortedCollection();

}