Data_Structure
Difference between en1 and en2, changed 4 character(s)
Suppose, there's n persons _A1,A2,....,An_. Person _Ai_  have a set of p_i_ numbers, Xi.1,Xi.2,....,Xi.pi. You have Q quaries.↵
Each quary is two types.↵

1. 1 in t S1,S2,...,St. Set p_in_ with t and Xi with S.↵

2. 2 l,r,m,S1,S2,...,Sm. Calculate the number of people Al...Ar, who has at least one number Si in his set p_i_↵

1<=n,Q<=100000↵
1<=p_i_,t,m<=20↵
1<=Si,each element of Xi<=1000000↵

How can be it solved?↵

N.B.: Its a problem of an onsite contest.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en8 English Tuhin_RU 2018-03-10 08:37:47 5
en7 English Tuhin_RU 2018-03-09 20:45:54 6
en6 English Tuhin_RU 2018-03-09 20:40:03 47 Tiny change: 'te contest.' -> 'te contest occured 2 weeks ago.'
en5 English Tuhin_RU 2018-03-09 20:37:30 7
en4 English Tuhin_RU 2018-03-09 20:36:55 10
en3 English Tuhin_RU 2018-03-09 20:36:09 24
en2 English Tuhin_RU 2018-03-09 20:34:54 4
en1 English Tuhin_RU 2018-03-09 20:33:59 476 Initial revision (published)