Search found 60 matches
- Mon Feb 26, 2007 3:59 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11184 - Joyful Ride
- Replies: 11
- Views: 7264
Well..I tried that problem during the contest..I guessed there was a solution when (n-4)%3 == 0, you can make the sample for 4, 7, 11 and you will find that the solution follows a pattern. Though I didn't get AC :p, so, perhaps I was missing something else?
- Fri Oct 15, 2004 10:44 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10732 - The Strange Research
- Replies: 5
- Views: 2740
Well, the problem is quiet easy, though some tricky..I thought I have solved the problem too but then I realized I missed some case..You first check the combinations of signs and get the good ones..I missed one case a = 0, b = +.
Yeap you are right!. 15625 in fact it's the biggest power of 5 that it's less than 20000, so for sure can extend till 6 zeros(for every 5), and then sort, so I should have realized about that..But then if the number of 19940, doesn't take that longest sequence, why to take it?..well well until you r...
Till 40,000; but calculating till 20,000..There's no sense to make a number till a very big one of 9 digits, we may need at least 14 M operations to make 20,000 a number bigger than 9 digits, surely we can make 20,000 into 1, in 14 D operations;). The only "valuable" way it can decrease monotonicall...
Well, I think you elevated the complexity of this problem :). It's just DP, you need an array of [20,000], where [Num][Op] indicates the minimum number of operations as Op as first operation(ie. DMMS, the D) and number Num. You can see that with this model you can manage minimum length and lexico...
- Thu Jun 03, 2004 11:04 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10613 - Mushroom Misery
- Replies: 14
- Views: 6386
Yeap, well if you think it as a big square first, is hard for sure..But you may agree the following, in the big square you can fit two rectangles of with w and height h, making a cross and covering the whole circle. If don't believe me, let's suppose it exist, if exist those 2 rectangles cross in 4 ...
Which is proportional to NlogN, in such case will be smth like O(M log N), given the two length of the strings. Anyway, that's not the case, there's a way to do it, based on balanced trees (on arrays) where you can perform operations in log N speed. The first word will be a set of finite characters ...