[algogeeks] A pair-selecting problem

2008-05-28 Thread Zeratul
On a board there are N * 2 pins colored with either black or white. The number of black pins is equal to that of white ones. Each pin has a location x, y, and x y are all integers (there are no more than one pins on the same location) We can pair a white pin located at x1, y1 with a black pin

[algogeeks] Re: A pair-selecting problem

2008-05-28 Thread Zeratul
On May 28, 10:16 pm, Ajinkya Kale [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 1:53 PM, Zeratul [EMAIL PROTECTED] wrote: We can pair a white pin located at x1, y1 with a black pin located at x2, y2 if x1 x2 and y2 y2. you mean y1 y2 right ? Yes My idea is to first find

[algogeeks] How to calculate the sum of three integers using only one '+' operation?

2007-10-23 Thread Zeratul
Only operation | ^! ~ are allowed to use in the expression. other operations like minus- multiply* cannot be used as well as branch expression like IF FOR WHILE Plus operation + is allowed to be used only once. then how to get the sum of three 4-byte integers ? thanks