What is your primary purpose . If you want to make a game , OpenGL and
AllegroGL is way to go .Other wiase to make appliations , you can use visual
c++. Can you be more specific ?
Regards,
Ankur
On Sat, Feb 26, 2011 at 1:22 PM, Logic King crazy.logic.k...@gmail.comwrote:
I also want to know
Yeah. Sorry, it is my bad missed to observe N = 5623.
Regards,
Venki.
On Feb 25, 11:22 pm, Dave dave_and_da...@juno.com wrote:
@Venki. Hmmm. Let me see. The problem specified that there were 5623
participants. That makes n = 5623. You say that n-1 games are needed,
and compute that as 5621.
19(I m d driver and I m 19)
On Feb 26, 12:35 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote:
*Bus Driver Problem Solution*
ok let's say you're driving a bus and it's empty. At the first stop two(2)
people get on. At the second stop five(5) people get on and one(1) person
exits. At the third
Dear colleagues:
Please share the appended announcement with those who may be interested.
Thank you - Steering Committee, SERP
CALL FOR PAPERS
and
Call For Workshop/Session Proposals
As the competition is over I can reveal u the answer. There is only one
number satisfying given condition and that is 578 so the answer is 20 :)
On Fri, Feb 25, 2011 at 10:33 PM, vaibhav shukla vaibhav200...@gmail.comwrote:
nothing to do with complexity...
just the ans
On Fri, Feb 25, 2011
@all hi what do you think about this
https://ideone.com/8QAig
Please Let Me Know if something wrong with this
Thanks Regards
Shashank The Best Way to Escape From The Problem is Solve It
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
Given an array of integers where some numbers repeat 1 time, some
numbers repeat 2 times and only one number repeats 3 times, how do you
find the number that repeat 3 times.
Thanks
Shashank
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
XOR :P
On Sat, Feb 26, 2011 at 10:11 PM, bittu shashank7andr...@gmail.com wrote:
Given an array of integers where some numbers repeat 1 time, some
numbers repeat 2 times and only one number repeats 3 times, how do you
find the number that repeat 3 times.
Thanks
Shashank
--
You received
hi Gunjan,
Can you please give the methodhow you achieved this answer...
On Sat, Feb 26, 2011 at 9:36 PM, Gunjan Sharma gunjan.khan...@gmail.com wrote:
As the competition is over I can reveal u the answer. There is only one
number satisfying given condition and that is 578 so the answer
There are only few numbers satisfying the 1st property and for them I
checked using python the second condition. :)
Competition name - Codematics
On Sun, Feb 27, 2011 at 1:18 AM, Rel Guzman Apaza rgap...@gmail.com wrote:
what competition?
2011/2/26 Gunjan Sharma gunjan.khan...@gmail.com
As
You are given n coins, at least one of which is bad. All the good
coins weigh the same, and
all the bad coins weigh the same. The bad coins are lighter than the
good coins.
Find the exact number of bad coins by making O(logn)^2 weighings on a
balance. Each
weighing tells you whether the total
Another optimization: Since the sum of the digits of n^2 is 45, n^2 is
divisible by 9. Thus, we need consider only n values that are
divisible by 3. Thus, the outer for-loop can be written
for( n = 31992 ; n 99381 ; n+=3 )
Dave
On Feb 23, 7:02 pm, Dave dave_and_da...@juno.com wrote:
Try this:
@Radha: Please explain your method further. You can use this data:
0, 1, 2, 4, 4, 5, 5, 6, 6, 6.
Dave
On Feb 26, 10:44 am, radha krishnan radhakrishnance...@gmail.com
wrote:
XOR :P
On Sat, Feb 26, 2011 at 10:11 PM, bittu shashank7andr...@gmail.com wrote:
Given an array of integers where
The age guy of bus driver is the age of the puzzle solver.
Best Regards
Abhijit
On Sat, Feb 26, 2011 at 1:05 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*Bus Driver Problem Solution*
ok let's say you're driving a bus and it's empty. At the first stop two(2)
people get on. At the second
@Dave great one.
On Sun, Feb 27, 2011 at 3:33 AM, Dave dave_and_da...@juno.com wrote:
Another optimization: Since the sum of the digits of n^2 is 45, n^2 is
divisible by 9. Thus, we need consider only n values that are
divisible by 3. Thus, the outer for-loop can be written
for( n = 31992 ;
19 (I'm driving )
Ironically I read this puzzle in chacha chaudhary comics :P
On Feb 26, 8:31 pm, anuja verma kcrazy...@gmail.com wrote:
19(I m d driver and I m 19)
On Feb 26, 12:35 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote:
*Bus Driver Problem Solution*
ok let's say you're driving a
Why not try all possibilities? Not many numbers to enumerate.
2011/2/23 bittu shashank7andr...@gmail.com
How to find a number of 10 digits (non repeated digits) which is a
perfect square? perfect square examples: 9 (3x3) 16 (4x4) 25(5x) etc.
Ten digit number example 1,234,567,890
Thanks
Here is the algo :
while(read string in reverse)
{
if(str = L)
create node and push to stack
continue
if(str = N)
pop 2 nodes from stack and asign them as children of N and push N
on stack //Here we can get
//multiple trees
}
pop root from stack
On Thu,
The points must satisfy the equation
(x-x1)(x-x2)+(y-y1)(y-y2)=0
Circle centered at origin
x2+y2=Some radius .With N points on the circle , we find out the
radius
In order to find if the two points are antipodal , we check the first
equation putting the two points and checking for any other
A NxN binary matrix is given. If a row contains a 0 all element in the
row will be set to 0 and if a column contains a 0 all element of the
column will be set to 0. You have to do it in O(1) space.
example :
input array :
1 0 1 1 0
0 1 1 1 0
1 1 1 1 1
1 0 1 1 1
1 1 1 1 1
result array :
0 0 0
I think the output is wrong. It should be
1 3 4 9 n in no call them ai's a[1] to a[n]
4 5 10 7 12 13 m in no call them bi's b[1] to b[m]
I assume starting from 1 to make manipulation easier
n(n-1)/2= m
n(n-1)=2m
n2 -n -2m=0
using quadratic formula:-
n=1 + sqrt( 1+8m)/2
This will always be a
Kind of brute force with O(n*log(n))
map mint, int;
for( int i=0; iN; i++)
m[a[i]]++;
for each element in hashmap
if( m[i] == 3)
print i;
On Sun, Feb 27, 2011 at 3:59 AM, Dave dave_and_da...@juno.com wrote:
@Radha: Please explain your method further. You can use this data:
@Dave: I think it is to find the longest substring which appears more
than once in the given string.
@bittu:
You could use suffix tree: http://en.wikipedia.org/wiki/Suffix_tree, and
find the deepest branch node.
or use suffix array: http://en.wikipedia.org/wiki/Suffix_array, and find
the
Practical - Good mix of theory and practice
1. The Art of Multiprocessor Programming by Maurice Herlihy Nir Shavit
2. Introduction to Parallel Computing, Second Edition. By Ananth Grama,
Anshul Gupta, George Karypis, Vipin Kumar
3. Herb Sutter's Blog on Concurrency
API Specific
4. Oreilly's
That is exactly what my solution is doing.
On Thu, Feb 24, 2011 at 5:09 PM, ashish agarwal
ashish.cooldude...@gmail.com wrote:
There must be another good solution..please let me know .
Thanks
On Thu, Feb 24, 2011 at 5:09 PM, ashish agarwal
ashish.cooldude...@gmail.com wrote:
I think..
I guess macro can be a work arround for this.
in configuration you can provide files which can access a global variable
ProtectedVariable
you have defined PROTECTEDVARIABLE_ACCESSIBLE_IN_FILEONE
like
*global.c
*
int ProtectedVariable = 10;
/*
other stuff
*/
*fileone.c
*
#ifdef
@Sankalp: There are 10^10 - 10^9 10-digit numbers. We investigate only
about the sqrt of that many to find out how many both are perfect
squares and have non-repeating digits.
Dave
On Feb 26, 11:31 pm, sankalp srivastava richi.sankalp1...@gmail.com
wrote:
@dave
But you are going over elements
1.) Traverse the whole matrix and replace each 0 value with -1.
2.) Traverse the matrix again,all the 1 values are replaced with 0 in
the row and column of the index where a -1 value is found.
3.) Set all -1 values to zero and we have the output array.
time complexity: O(n^2)
space complexity:
Okk...I got my mistake...
Thank you all for clearing my doubts..
On Sun, Feb 27, 2011 at 10:53 AM, sankalp srivastava
richi.sankalp1...@gmail.com wrote:
The points must satisfy the equation
(x-x1)(x-x2)+(y-y1)(y-y2)=0
Circle centered at origin
x2+y2=Some radius .With N points on the
29 matches
Mail list logo