The best I came up with is O( N*sqrt(N)*log(N) ) using MO to sort the queries — the log(N) part is for querying the most frequent value in that range. Got TLE with that — even in some smaller cases.
Any hint? :)
The best I came up with is O( N*sqrt(N)*log(N) ) using MO to sort the queries — the log(N) part is for querying the most frequent value in that range. Got TLE with that — even in some smaller cases.
Any hint? :)
I would be immensely grateful if you could suggest a book I could read from about these. The online materials seem rather scattered.
Some help/hint would be greatly appreciated :)
Hello
I would be immensely grateful if anyone could kindly give me any link to an easy-to-understand Suffix Automaton tutorial. Emaxx is hard for me to understand due to foggy Google translator and all other pdf's I managed to get from the internet seemed kind of complex :(
I understand that something that is complicated for someone may be too easy for someone else. So, I would be more than happy if you just give me the tutorial that You thought was good enough for you :)
Hi
Could any kind person give me any hint to solve this problem? I am horrible at math :(
Finding unique numbers in N*N multiplication table? :(
Hi
If you know Chinese, could you be very kind and translate the part from "1003 Revenge of Nim II" from http://bestcoder.hdu.edu.cn/ ? :) Google translation is really hard to understand for me.