Search found 151 matches

by Whinii F.
Mon Sep 15, 2003 8:31 am
Forum: Volume 105 (10500-10599)
Topic: 10514 - River Crossing
Replies: 14
Views: 3647

The stupid mistake I made was to only count distances between line segments A1-A2, A2-A3, ... A(n-1)-An. You should take An-A1 into account too. (where A is an array of vertices of an island)
by Whinii F.
Sun Aug 31, 2003 1:21 pm
Forum: Volume 105 (10500-10599)
Topic: 10503 - The dominoes solitaire
Replies: 16
Views: 11553

What do you mean by a quick approach?
It seems backtracking works pretty fast.. I used a simple DP and got 1.8secs, and I'm the SLOWEST ;)
by Whinii F.
Sat Aug 30, 2003 6:52 pm
Forum: Volume 103 (10300-10399)
Topic: 10380 - Shogi Tournament
Replies: 10
Views: 4849

BFS it may be slower itself, but it is proven BFS results in higher performance because BFS returns a shortest path.. A variation of Ford-Fulkerson method using BFS to find augmenting paths is called Edmonds-Karp. CLR handles it so you can look up. Anyway there are problems that E-K doesn't work too...
by Whinii F.
Sat Aug 30, 2003 6:54 am
Forum: Algorithms
Topic: LIS, better then O(n^2)?
Replies: 16
Views: 11812

There is a better approach (Because this problem has a dictionary as input). I think most of the people used algorithm with O(nmlogn) where m is the maximum length of each word. I implemented a kind of B-tree (or ternery tree) to archive O(mn). Or you can try hashing to do that.
by Whinii F.
Thu Aug 28, 2003 7:36 pm
Forum: Volume 4 (400-499)
Topic: 426 - Fifth Bank of Swamp County
Replies: 14
Views: 2362

Wow thanks very very much, little joey!!
There EXISTS that kind of input. Three digits of a cent. How strange. :-?

Anyway after modifying that I got an AC. :)
Thanks again for your sincere reply(even after 6 months the question is posted! :)).

Best regards,
by Whinii F.
Thu Aug 28, 2003 7:26 pm
Forum: Volume 103 (10300-10399)
Topic: 10380 - Shogi Tournament
Replies: 10
Views: 4849

Your program easily fails on big inputs.. like 1 6 4 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Your program's output is Player 4 can win with 3 point(s). -- 11 11 00 11 10 : 7 00 -- 00 00 00 00 : 0 00 11 -- 00 00 00 : 2 11 11 11 -- 11...
by Whinii F.
Thu Aug 28, 2003 7:17 pm
Forum: Volume 102 (10200-10299)
Topic: 10201 - Adventures in Moving - Part IV
Replies: 23
Views: 11511

It's because you don't insert blank lines correctly, that the answers for different test cases should be seperated by a blank line. That means the first and last line of output will not be blank.
by Whinii F.
Wed Aug 27, 2003 4:53 pm
Forum: Volume 105 (10500-10599)
Topic: 10544 - Numbering the Paths
Replies: 14
Views: 4837

Oh! Yes! That was why. My program got Accepted when I ignored already existing paths. :)
by Whinii F.
Tue Aug 26, 2003 12:57 pm
Forum: Volume 105 (10500-10599)
Topic: 10546 - The Eagle's Nest
Replies: 23
Views: 10771

Tomal: Wow was that so? :o I thought I should just select the mission with the lowest difficulty and has a K-length increasing sequence ending with it. Because the following part of the problem statement: A player can only play the missions that are harder than all the missions that he/she has compl...
by Whinii F.
Mon Aug 25, 2003 5:40 pm
Forum: Volume 105 (10500-10599)
Topic: 10544 - Numbering the Paths
Replies: 14
Views: 4837

Per: Thank you for being so kind! My program passed all your test inputs. After that I changed my counting routine to a top-down approach with memoization and got ACCEPTED at once. :wink: Was my approach wrong or was it my code? :-? Tomal: Well, I didn't say your problem statement was confusing. :) ...
by Whinii F.
Mon Aug 25, 2003 9:36 am
Forum: Volume 105 (10500-10599)
Topic: 10544 - Numbering the Paths
Replies: 14
Views: 4837

Per: Yes, my program handles the case correctly since count of B and C are both 1. When I process A, count of B is added to the whole sum. How did you interprete the problem? Something special? BTW, congratulations for your 900 problem :) kmhasan: ... Well, is my English not good enough? :( I don't ...
by Whinii F.
Mon Aug 25, 2003 5:25 am
Forum: Volume 105 (10500-10599)
Topic: 10539 - Almost Prime Numbers
Replies: 44
Views: 24342

Our team had the same problem during the contest. :-? But ten minutes before the finish, we realized there are only about 80000~ almost primes in the range, so easily generatable & sortable within the time limit. And we could do a binary search on that. Wondering if this could be better than our las...
by Whinii F.
Sun Aug 24, 2003 8:06 pm
Forum: Volume 105 (10500-10599)
Topic: 10544 - Numbering the Paths
Replies: 14
Views: 4837

10544 - Numbering the Paths

Hi. I constantly tackled this problem in the contest and received LOTs of WAs. I assumed the graph as a DAG and there are no additional spaces in the input. Anyone could point out any flaws or critical inputs? The following is my algorithm: Initially for all vertices with out-degree 0, give them cou...
by Whinii F.
Fri Aug 15, 2003 12:56 pm
Forum: Algorithms
Topic: Help about MAX Flow
Replies: 8
Views: 4227

To name few problems come to mind..

10092 The Problem with the Problem Setter
10380 Shogi Tournament
563 Crimewave (Which is identical to an exercise in CLR network flow chapter)

Of course there should be more. :)
by Whinii F.
Thu Aug 14, 2003 7:08 am
Forum: Other words
Topic: Problems with searching in the board
Replies: 1
Views: 582

Problems with searching in the board

Hi, it seems this board's searching feature does not work properly. Trying a search doesn't output all results.. For example searching the board with a query '10011' you'll see only 2 posts. But when you look up Volume C section you'll find posts like this one (not listed in the search result): 1001...

Go to advanced search