Search found 174 matches

by junbin
Thu Mar 11, 2004 3:21 pm
Forum: Volume 2 (200-299)
Topic: 238 - Jill's Bike
Replies: 24
Views: 9732

Yes.. I agree.. this question is very ambiguous.. can someone please clarify: 1) What does it mean by "Avoid any climb of more than 10 meters between adjacent grid points." ? Does it mean that the height difference should be < 10 (when climbing) or <= 10 < sqrt( 99 ) or <= sqrt( 99 ) ? (99 is from 1...
by junbin
Thu Mar 11, 2004 1:42 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 13864

Sorry I don't really have time to debug your program... why don't you post some test data and I'll post my results and you can work it out from there?
by junbin
Thu Mar 11, 2004 1:39 pm
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26216

Output for data set 1, 500000 bytes: Time remaining: 2 seconds Total time: 6 seconds Output for data set 2, 5000000 bytes: Time remaining: 2 seconds Total time: 6 seconds Output for data set 3, 500000000 bytes: Time remaining: 2 seconds Total time: 6 seconds Output for data set 4, 705032704 bytes: ...
by junbin
Thu Mar 11, 2004 12:28 am
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26216

3rd data gave a very long string of "stalled"
4th data crashed my program


Output for data set 1, 500000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds

Output for data set 2, 5000000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
by junbin
Thu Mar 11, 2004 12:25 am
Forum: Volume 3 (300-399)
Topic: 335 - Processing MX Records
Replies: 12
Views: 5293

If I remmeber right, there's no case where multiple answers are possible eg a.com 0 b.com a.com 0 c.com but anyway, a quick look at the answers: A a.com D c.com A a.com D b.com A a.com U c.com A a.com D d.com A a.com You can see that for the last A a.com, c.com is up.. so a.com should redirect to c....
by junbin
Thu Mar 11, 2004 12:21 am
Forum: Volume 2 (200-299)
Topic: 297 - Quadtrees
Replies: 16
Views: 2295

try this case:

1
f
f

ans should be 1024
by junbin
Thu Mar 11, 2004 12:16 am
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 13864

1) You can't do > 1.01 comparisions for floating point numbers.. because they are inaccurate, you need to do : x - 1.01 > EPS, where EPS = 1e-6 or something 2) I don't really see the code which limits the length of an arbitrage to less than n 3) If it helps, I think I used a 3dimensional array for t...
by junbin
Tue Mar 09, 2004 4:58 pm
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26216

my answer is exactly the same. :p Output for data set 1, 980 bytes: Time remaining: 26 seconds Time remaining: 33 seconds Time remaining: 19 seconds Time remaining: 10 seconds Time remaining: 9 seconds Time remaining: 23 seconds Time remaining: 0 seconds Total time: 35 seconds Output for data set 2,...
by junbin
Tue Mar 09, 2004 2:24 am
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26216

If it is a simple one more line, one less line thing, then you'd get PE.. so I think you probably have a +1/-1 bug somewhere... try posting random data of very long length.. I'll post my results and then you can compare a bit.
by junbin
Tue Mar 09, 2004 2:23 am
Forum: Volume 3 (300-399)
Topic: 346 - Getting Chorded
Replies: 19
Views: 4521

This question is not very well formed.. the number of sharps/flats that the judge matches is more than the number listed.. my code uses: if (!strcmp(note, "a")) { return 0; } else if (!strcmp(note, "a#") || !strcmp(note, "bb")) { return 1; } else if (!strcmp(note, "b") || !strcmp(note, "cb")) { retu...
by junbin
Tue Mar 09, 2004 2:21 am
Forum: Volume 2 (200-299)
Topic: 275 - Expanding Fractions
Replies: 47
Views: 21780

I didn't really read through your code, but the line char flag[1001] seems to say taht you use 100 digits to determine recurring digits... I think that may not be enough.,. I'm using 1000000 digits and a recurrence of at least 3 times before I flag the recurring digits... it's an overkill, but it wo...
by junbin
Tue Mar 09, 2004 2:20 am
Forum: Volume 1 (100-199)
Topic: 161 - Traffic Lights
Replies: 28
Views: 4021

This is a fairly simple simulation question.. so I think your problem is probably a careless mistake.. try reading the question more carefullly... if you still need help, generate some test data and I'll post the results my program gives.
by junbin
Tue Mar 09, 2004 2:18 am
Forum: Volume 101 (10100-10199)
Topic: 10135 - Herding Frosh
Replies: 33
Views: 12795

I haven got AC yet, and have some discrepances with your data. As your datasets are so big I haven't given the effort needed to check the data. If you check it, please let me know what are the results. 413.12 <- 410.59 (0,0) (-10.4,37.2) (-29.6,46.22) (-35.91,37.27) (-40.11,13.37) (-46.58,-40.1) (-...
by junbin
Tue Mar 09, 2004 2:17 am
Forum: Volume 101 (10100-10199)
Topic: 10149 - Yahtzee
Replies: 20
Views: 11717

I used brute force with memoization and managed top 25 .. so that should be fast enough.. in general, brute force with memoization can be converted to dp quite easily.. but recursion may be an easier way to represent the problem. Anyway, the recurrence was, given a certain slot, and a certain number...
by junbin
Tue Mar 09, 2004 2:11 am
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7117

Re: 138 - Steet numbers

I need help from people's whos have linux and same compiler like OJ. plz write output for this program, becouse i get that output on my win98 with devc++(orginal compiler): [output removed] And there is code: code removed by Jan Best Regards Rav I think you need long long.. not long int

Go to advanced search