this easy version problem you find hard version Div 1 contest both version differ number time ask friend taste coffeethis interactive problemyoure consider move city friend live there n cafés city n power the ith café produce single variety coffee a_i as you re coffeelover decide want know number d distinct variety coffee produce cityyou do not know value a_1 ldot a_n fortunately friend memory size k k power twoOnce day ask taste cup coffee produce café c tell taste similar coffee k daysyou ask medication reset memory he forget previous cup coffee taste you reset memory 30 000 timesmore formally memory friend queue S do query café c tell a_c S add a_c S if S k pop element S do reset request pop element SYour friend taste dfrac2n2k cups coffee total Find diversity d number distinct value array aNote ask friend reset memory count number time ask friend taste cup coffeein test case behavior interactor adaptive it mean array fix start interaction depend query it guarantee moment interaction array consistent answer give far