6

Please help to calculate time complexity

 1 year ago
source link: https://codeforces.com/blog/entry/109322?f0a28=1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Code

I think it is .

Unfortunately for it works more than 10 seconds.

is for queries when I calculate (on & have[id[u[i]]]).count() and is clearing .

I am solving 398D - Instant Messanger and don't understand why my solution is so slow, I tried to change values of and the best results I got is 4211 ms with .

UPD : I made and got Accepted.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK