khokharnikunj8's blog

By khokharnikunj8, history, 8 months ago, ,

Question: Given an array of size N. All elements of array <= N. You need to answer M queries. Each query is of the form L, R. You need to answer the count of values in the range [L, R] which are repeated at least X times.

By MO's algorithm(BLOG), we all know that the approximate time complexity of queries will be sqrt(N)* Q.

I just wanted to know What will happen if we just randomize the query and proceed the queries. What will be approximate complexity of algorithm now? I want to understand the mathematics behind that as well.

Thank you.

• +20

By khokharnikunj8, history, 12 months ago, ,

Hello Everyone,

I am excited to invite you to participate in Epiphany 8.0 hosted by ACM NIT SURAT, that will take place on 9th September, 21:00 IST for a duration of 3 hours. The event is going to be conducted on HackerEarth. Problem difficulty will be equivalent to Div 2 contest.

The problem setters and testers of this events are me(khokharnikunj8), Kruti_20, vivek_shah and jenish9599 .

This event is conducted on a yearly basis by ACM NIT SURAT(Association for computing machinery) and is open for all. ACM NIT SURAT is a local student chapter of the international learned society for computing, ACM.

Prize Money will be given to only NIT SURAT students.

Link to some previous Epiphany : Epiphany 7.1 Epiphany 7.0

• +18

By khokharnikunj8, history, 19 months ago, ,

Hello EveryOne ,

Have a look at following 2 soutions :

Solution1

Solution2

Both Solutions are exact Same. But Solution in Java is giving memory limit exceeded. Same solution is accepted in cpp is accepted. I think time complexity of problem is OK!.. Why don't Codeforces have Different memory limit for all languages ? Or If it is already there.. Then I think this solution should have worked!

If Anyone knows Any further optimisation in Java , Suggestions are Welcome.