Search found 174 matches

by junbin
Fri Apr 02, 2004 2:46 pm
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 21243

I use this algo, but I get WA, :evil: [c]TColors vertexColor(TVertex *vertex) { TEdge *edge; edge = vertex->edges.first; while ( edge ){ if ( edge->dest->color == clBlack ) return clWhite; edge = edge->next; } return clBlack; }; void makeColors(TGraph *graph, int start) { TVertex *vertex; TEdge *ed...
by junbin
Thu Apr 01, 2004 5:34 am
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 21243

NightZ-1 wrote:Thanks sohel.

I found my error.

I am using BFS, but in this case I think i will have to use Backtracking. Is this correct ?

Do you know any other solution, more simple than that?
Backtracking is the easiest to code for this problem..
by junbin
Mon Mar 22, 2004 5:20 pm
Forum: Volume 4 (400-499)
Topic: 404 - Radar Scopes
Replies: 8
Views: 1608

Thank you for your help. I did as you advised and managed to get accepted.
by junbin
Mon Mar 22, 2004 11:53 am
Forum: Volume 4 (400-499)
Topic: 404 - Radar Scopes
Replies: 8
Views: 1608

q 404 Radar Scopes

I'm working on q404 ( Radar Scopes ) and I seem to have hit on another floating point error problem. My algorithm is pretty simple: 1) If a plane appears in both sweeps, it either has no warnings or equipment warning. 2) If a plane appears in the first sweep but not in the second, then it either has...
by junbin
Mon Mar 22, 2004 11:25 am
Forum: Volume 1 (100-199)
Topic: 134 - Loglan-A Logical Language
Replies: 45
Views: 4546

Does your program have any problems with the following:

1) Extra spaces between words
2) Extra spaces at the END of the sentence (before the period)
3) Extra spaces at the START of the sentence
4) Extra letters AFTER the period
5) Extra spaces AFTER the period

etc.
by junbin
Mon Mar 22, 2004 6:09 am
Forum: Volume 1 (100-199)
Topic: 134 - Loglan-A Logical Language
Replies: 45
Views: 4546

If I'm not wrong, there won't be such cases.
by junbin
Mon Mar 22, 2004 6:06 am
Forum: Volume 2 (200-299)
Topic: 205 - Getting There
Replies: 13
Views: 4023

I didn't go through your code.. but here's some common tripups that I saw.

1) Time for each FLIGHT <24 hours. But time for each TRIP can take as long as possible.

2) If there is multiple optimals, then you need to optimal the other criteria as well.

3) You cannot use DP for this question.
by junbin
Mon Mar 22, 2004 6:03 am
Forum: Volume 1 (100-199)
Topic: 111 - History Grading
Replies: 135
Views: 22155

I believe at end of input
by junbin
Tue Mar 16, 2004 3:10 pm
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 12637

Your output is correct.
by junbin
Mon Mar 15, 2004 11:29 am
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 12637

Think about these questions: 1) Do you really need to scan all 100x100 trees to see if each one is inside the polygon? 2) If point i is inside, point i+1 is outside, when can point i+2 be inside? ps: This method is just a pruning of your current method, which is also the method I used.. I managed to...
by junbin
Mon Mar 15, 2004 2:42 am
Forum: Volume 3 (300-399)
Topic: 313 - Intervals
Replies: 10
Views: 4801

this question is a bit strict on the floating point numbers.. so try trying your epsilon value.. also, try finding another way to evaluate the answer.
by junbin
Sat Mar 13, 2004 4:59 pm
Forum: Volume 2 (200-299)
Topic: 238 - Jill's Bike
Replies: 24
Views: 9734

Farid: Could you perhaps change your program and the special corrector, because a lot of submissions was based on the sample output and had this ",". And this is also like the original output for this problem was (World Finals 1995 Problem A http://icpc.baylor.edu/past/icpc95/finals/Problems.html )...
by junbin
Fri Mar 12, 2004 12:20 am
Forum: Volume 2 (200-299)
Topic: 238 - Jill's Bike
Replies: 24
Views: 9734

I have a blank line between teach output.. but even if there isn't, +- blank lines should just give PE.. not WA..

Also, I don't keep track of routes.. just their final results since I'm using Dijkstra, so there's no memory problems for me.
by junbin
Fri Mar 12, 2004 12:16 am
Forum: Volume 3 (300-399)
Topic: 335 - Processing MX Records
Replies: 12
Views: 5294

There won't be a case where there's a possibility of ambiguity.. so there won't be a :

x a y
x a z


where x y z are server names and a is a prioirty number
by junbin
Fri Mar 12, 2004 12:14 am
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 13910

my program gives 3 1 3 1 3, but it should be fine either way

Go to advanced search