Search found 70 matches
- Mon Jul 09, 2007 3:48 am
- Forum: Volume 112 (11200-11299)
- Topic: 11234 - Expressions
- Replies: 15
- Views: 10052
- Mon Jul 09, 2007 3:02 am
- Forum: Volume 112 (11200-11299)
- Topic: 11235 - Frequent values
- Replies: 35
- Views: 21140
Think about Range Maximum Query(RMQ), then you can answer each query in O(lg N) operation after O(N lg N) for build the tree. You must transform the problem to RMQ first ^_^.
O(n log n) preprocessing -> O(log n) query answering? If you use binary trees, I think the preprocessing part is O(n) not ...
O(n log n) preprocessing -> O(log n) query answering? If you use binary trees, I think the preprocessing part is O(n) not ...
- Sun Jul 08, 2007 9:05 am
- Forum: Volume 112 (11200-11299)
- Topic: 11235 - Frequent values
- Replies: 35
- Views: 21140
- Tue Jan 30, 2007 8:33 am
- Forum: Algorithms
- Topic: Equation
- Replies: 7
- Views: 3805
- Mon Jan 29, 2007 12:30 pm
- Forum: Algorithms
- Topic: Equation
- Replies: 7
- Views: 3805
Equation
I only know the value of A and N, how to solve this equation:
(A^X) % N == 1
I must compute the value of X.
(2<=A,N<=1000000000).
Thanks
Timo
(A^X) % N == 1
I must compute the value of X.
(2<=A,N<=1000000000).
Thanks
Timo
- Mon Oct 23, 2006 5:24 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11138 - Nuts and Bolts
- Replies: 9
- Views: 6890
- Mon Oct 23, 2006 7:06 am
- Forum: Volume 111 (11100-11199)
- Topic: 11138 - Nuts and Bolts
- Replies: 9
- Views: 6890
- Mon Oct 23, 2006 7:01 am
- Forum: Volume 111 (11100-11199)
- Topic: 11138 - Nuts and Bolts
- Replies: 9
- Views: 6890
11138 - Nuts and Bolts
I have stuck to solve this problem
.
Can anybody tell me how to solve this problem ?
Thanks
Timotius Sakti

Can anybody tell me how to solve this problem ?
Thanks
Timotius Sakti
- Thu Oct 19, 2006 4:08 am
- Forum: Algorithms
- Topic: how to choose the num ???
- Replies: 13
- Views: 5545
- Wed Oct 18, 2006 5:46 am
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39763
Re: 902 Password Search
I think your implementation of Hashtable is wrong.
I have use Hashtable too.. and it give me AC
I used Rabin Karp method for hashing but it gave me a WA
what is your method?
sorry for late reply...
I used my own method to solve this problem ^ ^ (that's secret), but if you have used Rabin Karp ...
- Wed Oct 18, 2006 5:27 am
- Forum: Algorithms
- Topic: how to choose the num ???
- Replies: 13
- Views: 5545
- Fri Oct 13, 2006 11:23 am
- Forum: Algorithms
- Topic: Joke with Turtles
- Replies: 0
- Views: 1565
Joke with Turtles
Can anybody give me hint to solve this problem.
http://acm.zju.edu.cn/show_problem.php?pid=2667
Thanks
Timotius Sakti
http://acm.zju.edu.cn/show_problem.php?pid=2667
Thanks
Timotius Sakti
- Fri Oct 06, 2006 11:15 am
- Forum: Bugs and suggestions
- Topic: 913 - Output File Wrong
- Replies: 4
- Views: 2802
- Sat Sep 30, 2006 3:01 pm
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39763
- Sat Sep 30, 2006 9:11 am
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39763
Re: 902 Password Search
I think your implementation of Hashtable is wrong.Darko wrote: Oh, I did try using Hashtable, but it gives me MLE - it is just too expensive to use (on UVa, at least).
I have use Hashtable too.. and it give me AC