Search found 119 matches

by tryit1
Sun Feb 22, 2009 1:39 am
Forum: Algorithms
Topic: minimize sum of manhattan distance
Replies: 2
Views: 3208

minimize sum of manhattan distance

The 1D problem is well known. Choose the median. But how do we choose in a 2D space. If choosing one of the given points wasn't a constraint , then i could choose the median of all x and median of all y (Mx,My). But that needn't be a point of the given set. There are around 100 testcases. So looking...
by tryit1
Sun Feb 22, 2009 1:23 am
Forum: Algorithms
Topic: Non-Text Book Algorithms
Replies: 2
Views: 3238

Re: Non-Text Book Algorithms

constructing segment trees. See topcoder tutorials.

All these are applications of standard algorithms. So learn and understand them well, so that you can apply then yourself. Practice helps.
by tryit1
Wed Feb 18, 2009 1:59 pm
Forum: Algorithms
Topic: given sum and product , find the respective integers.
Replies: 2
Views: 3364

Re: given sum and product , find the respective integers.

i was able to get accepted using some pruning which my friend told. i 'm not able to understand this pruning why it is true. It says if the sum of k integers is S and product is P, then if S > abs(P)+k , then there cannot be any solution . Why ? what about S < -abs(P) -k ? if(S> abs(P) + N) return ;...
by tryit1
Wed Feb 11, 2009 2:11 am
Forum: Algorithms
Topic: given sum and product , find the respective integers.
Replies: 2
Views: 3364

given sum and product , find the respective integers.

http://acm.pku.edu.cn/JudgeOnline/problem?id=2844 Given sum and product of N integers, find them if they exist. For a sequence of N integers A1, A2, ... , AN, we can calculate their sum S and product P easily. With given N, S and P, can you find out the sequence A1, A2, ... , AN? The input only con...
by tryit1
Wed Feb 11, 2009 12:16 am
Forum: Algorithms
Topic: Orthogonal range searching
Replies: 0
Views: 1329

Orthogonal range searching

without fractional cascading. I tried posting this at http://forums.topcoder.com/?module=Thread&threadID=632764&start=0 but never got any suggestions. i've implemented range trees for 2 dimensional points. I've difficulty extending it to n dimensional points. Can you suggest a better implementation ...
by tryit1
Tue Feb 10, 2009 10:47 pm
Forum: Algorithms
Topic: Circular String Linearization
Replies: 12
Views: 13095

Re: Circular String Linearization

mf wrote:Y
I wrote it for my ICPC team's reference notebook
thanks,
If they are commented like above, do you have them online somewhere or can you send the rar to tryitn1@gmail.com. Would certainly be useful.
by tryit1
Tue Feb 10, 2009 9:29 pm
Forum: Algorithms
Topic: Circular String Linearization
Replies: 12
Views: 13095

Re: Circular String Linearization

And for this problem, I think, suffix arrays are the way to go in contests -- I have a very simple O(n log^2 n) implementation in only 20 lines of C++, and it needs only 16 bytes per char.
Can you please post it here ?
by tryit1
Sat Jan 31, 2009 7:54 am
Forum: Volume 112 (11200-11299)
Topic: 11280 - Flying to Fredericton
Replies: 43
Views: 16655

Re: 11280 - Flying to Fredericton

2 4 Calgary Winnipeg Ottawa Fredericton 6 Calgary Winnipeg 125 Calgary Ottawa 800 Winnipeg Fredericton 325 Winnipeg Ottawa 200 Calgary Fredericton 875 Ottawa Fredericton 175 4 2 1 0 10 3 Calgary Montreal Fredericton 2 Calgary Montreal 300 Montreal Fredericton 325 2 0 1 Scenario #1 Total cost of fli...
by tryit1
Wed Jan 28, 2009 5:01 am
Forum: Volume 101 (10100-10199)
Topic: 10154 - Weights and Measures
Replies: 60
Views: 40256

Re: 10154 - Weights and Measures

RS (residual strength) = Actualstrength (AS) - weight(W) RS = AS - W if i 've RS1 < RS2 how would i order and why ?You are odering it from bottom{maximum residual strenght at bottom} (turtle 2)RS2 < (turtle 1) RS1 because RS2 can carry more weight.lets say AS1 = 1000, W1=900, AS2=800, W2=600, now R...
by tryit1
Sat Jan 03, 2009 11:35 am
Forum: Bugs and suggestions
Topic: Cookie problem of acm.uva.es board
Replies: 5
Views: 4585

Re: Cookie problem of acm.uva.es board

i use the redirector addon with regexp option currently to work around this and icpcresproblem.

Any valid sid that is generated when you login once can be used.

https://addons.mozilla.org/en-US/firefox/addon/5064

screenshot rules
Image
by tryit1
Fri Jan 02, 2009 3:22 pm
Forum: Bugs and suggestions
Topic: Cookie problem of acm.uva.es board
Replies: 5
Views: 4585

Re: Cookie problem of acm.uva.es board

what version of chrome do you use ? I use 1.0.154.36 on XP SP3. It doesn't work for me on chrome. Once i login on the board ,any subsequent stuff is good but when I close the chrome browser (taskkill /im chrome.exe /f) then restart , acm.uva.es/board it asks for login agin. It doesn't work on Opera ...
by tryit1
Fri Jan 02, 2009 1:43 pm
Forum: Bugs and suggestions
Topic: Cookie problem of acm.uva.es board
Replies: 5
Views: 4585

Cookie problem of acm.uva.es board

When i click login , i 've my username and password filled. I click "Log me on automatically each visit" and login . Nexttime when i close all the browsers (firefox.exe by taskkill /im firefox.exe /f ) and then again visit the site acm.uva.es/board , it still asks for the username password. I checke...
by tryit1
Thu Jan 01, 2009 10:45 pm
Forum: Bugs and suggestions
Topic: 930 - Polynomial Roots Tests
Replies: 1
Views: 1885

930 - Polynomial Roots Tests

http://acm.uva.es/board/viewtopic.php?f=35&t=23541&hilit=930&sid=65c2740f4b37bb529606db414a767c04 Carlos, where do we submit test cases for the problem. I have some tests to be added even for other problems. Inputs Here are some test cases 8 3 1 -3 3 1 1 4 0 1 3 3 1 -1 -1 4 15 1 -52 20 16 1 -2 4 1 ...
by tryit1
Thu Jan 01, 2009 2:33 am
Forum: Volume 106 (10600-10699)
Topic: 10668 - Expanding Rods
Replies: 38
Views: 20352

Re: 10668 - Expanding Rods

i used long double , and EPS as 1e-13

Code: Select all

1000 100 0.0001
15000 10 0.00006
15000 20 0.00006
15000 20 0.00089
10 1 0.001
10 0 0.001
1 5 0.2333
5 1 0.2333
5300 100 0.5323
15 415 0.0044
15 15 3.333
-1 -1 -1

Code: Select all

61.329
225.020
318.255
1228.775
0.194
0.000
0.000
1.529
0.000
0.000
0.000

Go to advanced search