Search found 647 matches
- Fri Jan 12, 2007 12:02 am
- Forum: Volume 108 (10800-10899)
- Topic: 10848 - Make Palindrome Checker
- Replies: 26
- Views: 14869
I use: abcd 3 abcdcba aaaa 3 abcdcba abc 2 abdcba aab b baab abababaabababa 0 abababaabababa pqrsabcdpqrs 9 pqrsabcdpqrqpdcbasrqp a 0 aa aa 0 aa 0 2 aa and I get: TTTTTTT The solution is accepted TTTFFTT The solution is not accepted TFTTTFT The solution is not accepted TTTTTFT The solution is not ac...
- Thu Oct 26, 2006 8:21 pm
- Forum: Algorithms
- Topic: Problems using LCA form arhive.
- Replies: 8
- Views: 3956
Actually, you can do the precalc in O(nlogn) time by converting into an +/-1 RMQ problem in linear time, and then do the queries in O(1). Of course, you can also precalc in O(n) and queries in O(1), and that part isn't so bad using the big/small universe paradigm. The general RMQ->LCA is probably th...
- Mon Sep 11, 2006 11:01 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11084 - Anagram Division
- Replies: 19
- Views: 9410
the first thing i did was next_permutation(), but TLE the second is using dp[mask][rem] with memo map<int,int>, but TLE the third is i changed the map<int,int> to int memo[1024*10000], but MLE the fourth is partial memoization (is that what we call it?) so i only memoized up to 1000000, otherwise i...