@Manikanta Babu.
Dont say you were using dev C++ or turbo c++You must be knowing that if
you dont specify these compilers will compile the code in c++ format.Try
this in gcc which is the standard compiler for c and if you dont get any
error then report.ITS COMPLETELY ILLEGAL TO INITIALIZE A
Hi here is the basic approach as we know in a week atmost 7 days ..so
start with hit and trial
Total 36 medals were awarded and the contest was for 6 days.
On day 1: Medals awarded = (1 + 35/7) = 6 : Remaining 30 medals
On day 2: Medals awarded = (2 + 28/7) = 6 : Remaining 24 medals
On day 3:
hey we can do like dis man using trial and error, so start with m = 15, 22,
29 etc. obviuosly we cant start with 8 as n must be greater than 1. I think
u people got the reason for starting with 15(1+14 is divisible by 7),
22(1+21 is divisible by 7) etc.
test for m = 15;
Day 1:- medals = 1+14/7 =
Dear Colleagues:
Please share the announcement below with those who may be interested.
Thank you, Organizing Committee
CALL FOR PAPERS
Paper Submission Deadline: March 31, 2011
*A Riddle Problem Solution*
*
*What is one thing that all wise men, regardless of their religion or
politics, agree is between heaven and earth
Update Your Answers at : Click
Herehttp://dailybrainteaser.blogspot.com/2011/03/18march.html
Solution:
Will be updated after 1 day
--
@Saurabh, Sorry buddy, I was trying with g++ compiler, i just tried with gcc
and its throwing an error 'error: initializer element is not constant'.
I apologise for the mistake.
Thanks,
Mani
On Fri, Mar 18, 2011 at 11:38 AM, saurabh singh saurab...@gmail.com wrote:
@Manikanta Babu.
Dont say
this is something like Multiple granularity locking protocol in DBMS...
On Fri, Mar 18, 2011 at 5:43 PM, bittu shashank7andr...@gmail.com wrote:
Given an n-ary tree of resources arranged hierarchically. A process
needs to lock a resource node in order to use it. But a node cannot be
locked
http://discuss.codechef.com/showthread.php?t=635
On Thu, Mar 17, 2011 at 7:11 PM, kavitha nk kavithan...@gmail.com wrote:
oh 5n..
--
//BE COOL// kavi
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
You have N marbles and K slots. You have to follow the below mentioned
rules :
1. You can put in a marble or take out a marble from slot numbered
1 at any time.
2. You can put in a marble or take out a marble from slot numbered
i only if there exists a marble at the slot i - 1.
3. The
thank you so much kumar anurag. will try it out and reply soon.
On Mar 16, 1:24 am, kumar anurag anurag.it.jo...@gmail.com wrote:
the code is attached , u can covert bf program to c , more info is in the
file
On Wed, Mar 16, 2011 at 12:43 AM, Saikat Debnath crazysai...@gmail.comwrote:
@
@saikat: this place is only to share the algorithms and not the codes
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
Assuming each integer takes 4 bytes, for 4 billion numbers it turns out to
be 16 GB memory required. But we have only 1 GB memory.
1. So, break the 16GB file into 16 1GB files.
2. Then one by one take each file into memory and run quick sort algorithm
on it and put it back in the same file. After
10 is the best answer if the condition is number of non-zero digits
should be maximum...
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
On Wed, Mar 16, 2011 at 8:08 PM, Gunjan Sharma gunjan.khan...@gmail.comwrote:
10 what about
@Gunjan Sharma:
Why do you think 50 is not an acceptable answer???
You might be thinking last 5 zeroes not representing the number of zeroes
followed..thus you gave an answer as 10 in one of your previous
post...
But as per the problem is exemplified, *if it is the original precise
Nothing !!! :P :P
On Fri, Mar 18, 2011 at 1:02 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*A Riddle Problem Solution*
*
*What is one thing that all wise men, regardless of their religion or
politics, agree is between heaven and earth
Update Your Answers at : Click
The problem goes like this :
Peter wants to generate some prime numbers. Your task is to generate
all prime numbers between two given numbers!
Input
The input begins with the number t of test cases in a single line
(t=10). In each of the next t lines there are two numbers m and n (1
= m = n =
you should try sieve of eratosthenes
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
there are far more efficient algorithms but i think this shoild be a good
one to start with . ( even i got AC with this one :) )
On Fri, Mar 18, 2011 at 10:11 PM, samby ankitsamb...@gmail.com wrote:
The
Assuming the data is 32-bit unsigned integers:
Treat your memory (either amount) as an array A[] of M integers.
E.g., with 10 MB of memory, M = 2,500,000.
Initialize the array to zero.
Read through the file. For each integer x, increment A[x mod M].
There will be at least one bin whose count is
On Mar 17, 10:24 am, saurabh agrawal saurabh...@gmail.com wrote:
Given a function which returns true 60% time and false 40% time.
Using this function you have to write a function which returns true 50% of
the time.
If we call the function N times, then the probability that we'll have
K true
Hi,
I hope this is correct. Please correct if I am wrong.
Short answer:
Let a = (k-n)/(n-1)
Let b = (k-n)%(n-1)
steps = (n-1)(a)(a+1)/2 + b
Put = steps + n
Remove = steps
Explanation:
Example with n = 3 k =10:
Start by putting balls in 1,2,3
1 2 3 x x x x x x
Now move balls from 1-3 to
Hey..
I also got into same trouble today...
I submitted it 6 times..then got bored and de moralised cause i cudnt find
flaw in code...
When i read your mail and corresponding sorry mail...it just struck me..I
also had to print YES and NOand i was printing NO as NoIt
got ac den...
:P
thnx
@ ashu:---Very interesting and nice solution...
On Tue, Mar 15, 2011 at 2:58 PM, Terence technic@gmail.com wrote:
To the east shop :)
One can not get his haircut by himself.
On 2011-3-15 15:55, Lavesh Rawat wrote:
* barbershop **Problem Solution*
*
*A traveller arrives in a small
agree
On Fri, Mar 18, 2011 at 10:05 PM, Kunal Patil kp101...@gmail.com wrote:
Nothing !!! :P :P
On Fri, Mar 18, 2011 at 1:02 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*A Riddle Problem Solution*
*
*What is one thing that all wise men, regardless of their religion or
politics, agree
and
Yanan Cao
On Fri, Mar 18, 2011 at 1:00 PM, anuj maurice anuj.maur...@gmail.comwrote:
agree
On Fri, Mar 18, 2011 at 10:05 PM, Kunal Patil kp101...@gmail.com wrote:
Nothing !!! :P :P
On Fri, Mar 18, 2011 at 1:02 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*A Riddle Problem
@Bittu haha... just copied the first answer from CCbook.
On Mar 3, 10:42 am, bittu shashank7andr...@gmail.com wrote:
both DP Catalan Number solve this
1st Approach Catalan Number
(For clarity, we will solve this part assuming an X*Y Matrix)
Each path has (X-1)+(Y-1) steps. Imagine the
On Friday, March 18, 2011 1:47:45 PM UTC-4, Gene wrote:
On Mar 17, 10:24 am, saurabh agrawal saura...@gmail.com wrote:
Given a function which returns true 60% time and false 40% time.
Using this function you have to write a function which returns true 50%
of
the time.
If we
26 matches
Mail list logo