Search found 63 matches
- Fri Jun 18, 2010 3:35 pm
- Forum: Bugs and suggestions
- Topic: My statistics
- Replies: 1
- Views: 1400
Re: My statistics
Now it is back to normal.
- Fri Jun 18, 2010 11:15 am
- Forum: Bugs and suggestions
- Topic: My statistics
- Replies: 1
- Views: 1400
My statistics
Hello,
I have solved 961 problems as of yesterday. However, when I logged in today, I found out that my number of problems solved became 2 and number of total submissions became 2. What happened to my account??!
PS My user number is 8764.
I have solved 961 problems as of yesterday. However, when I logged in today, I found out that my number of problems solved became 2 and number of total submissions became 2. What happened to my account??!
PS My user number is 8764.
- Wed Jun 16, 2010 5:41 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11196 - Birthday Cake
- Replies: 2
- Views: 4705
Re: 11196 - Birthday Cake
Thank for the hint. Managed to solved it after so long.
A hint from me is that the order you search matters too. I just changed the order and my code which probably takes hours to run manage to solve the largest test case in a short time.
A hint from me is that the order you search matters too. I just changed the order and my code which probably takes hours to run manage to solve the largest test case in a short time.
- Tue Jul 28, 2009 5:45 am
- Forum: Volume 111 (11100-11199)
- Topic: 11155 - Be Efficient
- Replies: 15
- Views: 10867
Re: 11155 - Be Efficient
There's an O(n) solution. Almost similar in idea to 11237
- Fri Jul 17, 2009 9:27 am
- Forum: Volume 113 (11300-11399)
- Topic: 11311 - Exclusively Edible
- Replies: 5
- Views: 5601
Re: 11311 - Exclusively Editable
Think nim/nim sum.
- Thu Jul 02, 2009 9:20 am
- Forum: Volume 114 (11400-11499)
- Topic: 11404 - Palindromic Subsequence
- Replies: 25
- Views: 14744
Re: 11404 - Palindromic Subsequence
You are using the wrong method. It does not give you the smallest lexicographical palindrome.
- Thu Jul 02, 2009 9:15 am
- Forum: Volume 113 (11300-11399)
- Topic: 11338 - Minefield
- Replies: 10
- Views: 4096
Re: 11338 - Minefield
Inserting into a map takes O(lg n) and hence you got TLE.
Using O(n^2) algorithm to generate all the edges result in my code taking 0.7+s. I think using kd-tree will result in faster runtime.
Using O(n^2) algorithm to generate all the edges result in my code taking 0.7+s. I think using kd-tree will result in faster runtime.
- Sat Jun 13, 2009 9:34 am
- Forum: Bugs and suggestions
- Topic: Special Corrector Problem - Always PE
- Replies: 10
- Views: 5273
Re: Special Corrector Problem - Always PE
I'm encountering the same problem too...
- Fri Jun 12, 2009 5:28 am
- Forum: Volume 100 (10000-10099)
- Topic: 10090 - Marbles
- Replies: 43
- Views: 23633
Re: 10090 - Marbles
use %lld
- Tue Jun 09, 2009 10:18 am
- Forum: Volume 115 (11500-11599)
- Topic: 11525 - Permutation
- Replies: 9
- Views: 3668
Re: 11525 - Permutation
There is no need to compute factorials. Just find the kth smallest number that is not used (k starts from 0...so-on).
People have suggested using interval/segment trees to solve this problem. I've used fenwick trees to solve it. It is possible to find the kth smallest number using binary search.
People have suggested using interval/segment trees to solve this problem. I've used fenwick trees to solve it. It is possible to find the kth smallest number using binary search.
- Mon Jun 01, 2009 10:26 am
- Forum: Volume 4 (400-499)
- Topic: 437 - The Tower of Babylon
- Replies: 14
- Views: 8373
Re: 437 - Any good idea for Towers of Babylonia?
I finally realised that there is a linear solution to the problem - solving longest path on a DAG.
- Mon Jun 01, 2009 7:39 am
- Forum: Volume 115 (11500-11599)
- Topic: 11596 - Convex Orthogonal Polygon
- Replies: 2
- Views: 1604
Re: 11596 - Convex Orthogonal Polygon
You are moving towards the right direction.
If you really want a hint take a look at Steven Halim's website (a solution by Minh Duc): http://www.comp.nus.edu.sg/~stevenha/pr ... al_Polygon
If you really want a hint take a look at Steven Halim's website (a solution by Minh Duc): http://www.comp.nus.edu.sg/~stevenha/pr ... al_Polygon
- Sun May 31, 2009 8:53 am
- Forum: Volume 114 (11400-11499)
- Topic: 11475 - Extend to Palindrome
- Replies: 32
- Views: 15317
Re: 11475 - Extend to Palindromes
Well let me drop one hint.
In this problem we have to find the suffix of the string that is the longest palindrome. This problem can be solved using a slightly modified KMP with the search string the reverse of the original string.
Therefore, this problem can be solved in linear time.
In this problem we have to find the suffix of the string that is the longest palindrome. This problem can be solved using a slightly modified KMP with the search string the reverse of the original string.
Therefore, this problem can be solved in linear time.
- Thu May 28, 2009 4:48 am
- Forum: Volume 116 (11600-11699)
- Topic: 11610 - Reverse Prime
- Replies: 7
- Views: 3479
Re: 11610 - Reverse Prime
You didn't comment out your freopen. I think your code might TLE.
- Tue May 26, 2009 4:50 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11440 - Help Tomisu
- Replies: 9
- Views: 3656
Re: 11440 - Help Tomisu
phi(N!) = number of numbers between 1 and N! which has no common factors with (1...N) ie number of numbers between 1 and N! with prime factors > N.