Re: [algogeeks] help

2011-06-13 Thread sunny agrawal
because in all expression is evaluated to true. On Mon, Jun 13, 2011 at 10:02 PM, sahil sharma sahil18...@gmail.com wrote: ok i got the values of i ,j ,k ,.in all the 3 codes but can u please explain me how we get the value of m =1 in all the 3 program.? -- You received

Re: [algogeeks] help

2011-06-13 Thread udit sharma
Bt y k=0, in 2nd code??? -- 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 algogeeks+unsubscr...@googlegroups.com. For more options,

Re: [algogeeks] help

2011-06-13 Thread sunny agrawal
m= ++i || ++j ++k; ++i will evauate to 3 and which is true so as next is || so next part will not be evaluated and m = true On Mon, Jun 13, 2011 at 11:34 PM, udit sharma sharmaudit...@gmail.comwrote: Bt y k=0, in 2nd code??? -- You received this message because you are subscribed to the

Re: [algogeeks] help

2011-06-13 Thread udit sharma
@Sunny: Thn y k=1 in 2nd code??? -- 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 algogeeks+unsubscr...@googlegroups.com. For more

Re: [algogeeks] help

2011-06-13 Thread udit sharma
hmm. Sry yr... Got it.. Thanx.. :) :) -- 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 algogeeks+unsubscr...@googlegroups.com. For

[algogeeks] help

2011-05-24 Thread sunny
click on this link and register . it will take less than half a minute and you will really help me a lot http://www.earnparttimejobs.com/index.php?id=3407956 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] HELP - printf

2011-01-22 Thread LALIT SHARMA
*case 1 :* #include stdio.h #include math.h #include conio.h int main() { float i = 2.5; printf (%f %f\n, floor(i), ceil(i)); getch(); return 0; } *ans : 2.00 3.00* *case 2: * #include stdio.h #include math.h #include conio.h int main() { float i = 2.5; printf (%d

[algogeeks] help me debug this

2011-01-17 Thread ankit sablok
i dont knw wt wrong i have done in this simple problem bt its nt being accepted at uva judge here is the link to the problem http://uva.onlinejudge.org/index.php?option=com_onlinejudgeItemid=8category=6page=show_problemproblem=347 please help me debug my code #includeiostream #includecstdio

[algogeeks] help me solve this problem

2010-12-25 Thread sudhir mishra
**https://www.spoj.pl/problems/MCARDS/en/ -- -- regards *Sudhir Mishra* MNNIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send

[algogeeks] help

2010-12-16 Thread kumar0746 kerth
problem:https://www.spoj.pl/problems/PARTY/ i m getting wrong answer for dis problem.can anyone help me in finding de mistake..thank u in advance #includeiostream //#includeconio.h #includevector #includealgorithm using namespace std; //int n; int item(int c[][501],int i,int wt,vectorint w,int

Re: [algogeeks] help

2010-12-16 Thread bharath kannan
machi use this.. Define *m*[*i*,*w*] to be the maximum value that can be attained with weight less than or equal to *w* using items up to *i*. We can define *m*[*i*,*w*] recursively as follows: - [image: m[0,\,w]=0] - [image: m[i,\,0]=0] - [image: m[i,\,w]=m[i-1,\,w]] if [image:

Re: [algogeeks] help me reduce the time limit

2010-12-12 Thread Amir hossein Shahriari
use segment tree http://en.wikipedia.org/wiki/Segment_tree -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] help me reduce the time limit

2010-12-08 Thread ankit sablok
please help mewritea program for this problem to reduce the time limit http://www.codechef.com/problems/FLIPCOIN/ thnx in advance i have ben banging my head on this for a full day -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

Re: [algogeeks] help me reduce the time limit

2010-12-08 Thread radha krishnan
see TC forums : On Wed, Dec 8, 2010 at 10:44 PM, ankit sablok ankit4...@gmail.com wrote: please help mewritea program for this problem to reduce the time limit http://www.codechef.com/problems/FLIPCOIN/ thnx in advance i have ben banging my head on this for a full day -- You received this

Re: [algogeeks] help me reduce the time limit

2010-12-08 Thread jai gupta
#includestdio.h int main() { int arr[11]={0},sum2[1001]={0}; int type[1001]={0};//0 for tails int N,Q,i,j,sum; int a,b,c; scanf(%d,N); scanf(%d,Q); for(i=0;iQ;i++) { scanf(%d%d%d,a,b,c); if(a==0) { j=b; int

[algogeeks] help me find a solution

2010-12-08 Thread ankit sablok
can anyone suggest me how to go about this problem i m finding it quite tough http://www.codechef.com/problems/TEAMSEL/ thanx in advance -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] help required...

2010-09-24 Thread umesh kewat
@coolfrog in case of AB we asked to A know B after checking this we eliminate A n same case go for CD den A B CD | | AD AD Same approach | D (D will be celebrity) On Fri, Sep 24, 2010 at 10:57 AM, kartheek muthyala

Re: [algogeeks] help required...

2010-09-23 Thread santhosh
if the possibilty of a person knowing other any1 based circular linked.. ie. 1/n.. then none becomes celebrity .. so wat to do in tat situation?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] help required...

2010-09-23 Thread Soundar
isn't it supposed to be only O(n) questions.? On 9/23/10, santhosh santhos4...@gmail.com wrote: if the possibilty of a person knowing other any1 based circular linked.. ie. 1/n.. then none becomes celebrity .. so wat to do in tat situation?? -- You received this message because you are

Re: [algogeeks] help required...

2010-09-23 Thread Soundar
And what if more than one person in that set?...let it be c. so u must ask ac+1(n-1) questions right? On 9/23/10, Soundar soundha...@gmail.com wrote: isn't it supposed to be only O(n) questions.? On 9/23/10, santhosh santhos4...@gmail.com wrote: if the possibilty of a person knowing

Re: [algogeeks] help required...

2010-09-23 Thread coolfrog$
@kartheek i am getting. this prudent approach but what is add what remained to the remainder. suppose u have A,B,C,D and B is celebrity ... if( A knows B) { A is not celb. if( B knows C){} else{ C is not celb. if (C knows B ) { if( D

Re: [algogeeks] help required...

2010-09-23 Thread Sathaiah Dontula
is it not finding the articulation point in a graph ? = this has a linear time solution. if the edge exist TRUE otherwise FALSE, n x n adjacency matrix with 1/0 (TRUE/FALSE) Thanks, Sathaiah On Wed, Sep 22, 2010 at 9:37 PM, Divesh Dixit dixit.coolfrog.div...@gmail.com wrote: Among n people,

Re: [algogeeks] help required...

2010-09-23 Thread umesh kewat
Use divide and conquer strategy of algorithm by diving in 2-2 group like merge sort make tree where every level we dropping people by using logic of above post so root will be celebrity On Thu, Sep 23, 2010 at 11:26 AM, kartheek muthyala kartheek0...@gmail.comwrote: Take 2 persons, suppose say

Re: [algogeeks] help required...

2010-09-23 Thread coolfrog$
@ umesh kewat suppose A,B,C,D and D is celebrity A,B C,D how would u eliminate one form A,B even if u can ... it will be order of O(n logn) ... Regards ... Divesh On Thu, Sep 23, 2010 at 4:00 AM, umesh kewat umesh1...@gmail.com wrote: Use divide and conquer strategy of algorithm

Re: [algogeeks] help required...

2010-09-23 Thread kartheek muthyala
@coolfrog, What I meant by remained is Considering your case of A,B,C,D and B is the celebrity, The sequence is First A,B ask the question to A, then remained=B Then B,C ask the question to B, then remained=B Then B,D ask the question to B, then remained= B Then ask A,C,D whether they know B

Re: [algogeeks] Help required

2010-09-22 Thread Nikhil Agarwal
@ankur Please give me a proper link.I mean with hash after 4shared.com On Wed, Sep 22, 2010 at 11:26 AM, ankur aggarwal ankur.mast@gmail.comwrote: http://www.4shared.com/ check it.. On Wed, Sep 22, 2010 at 12:00 AM, Nikhil Agarwal nikhil.bhoja...@gmail.com wrote: Can anybody share

Re: [algogeeks] Help required

2010-09-22 Thread sharad kumar
hey ya man I was also searching for tat ione , Sep 22, 2010 at 8:37 PM, Nikhil Agarwal nikhil.bhoja...@gmail.com wrote: @ankur Please give me a proper link.I mean with hash after 4shared.com On Wed, Sep 22, 2010 at 11:26 AM, ankur aggarwal ankur.mast@gmail.com wrote:

Re: [algogeeks] Help required

2010-09-22 Thread ankur aggarwal
http://www.4shared.com/ check it.. On Wed, Sep 22, 2010 at 12:00 AM, Nikhil Agarwal nikhil.bhoja...@gmail.comwrote: Can anybody share his/her E-copy of An Introduction to algorithm by Udi manber.It's a great resource.If anybody has please share his E-copy.Thanks in advance. -- Thanks

[algogeeks] help required...

2010-09-22 Thread Divesh Dixit
Among n people, a celebrity is defined as someone who is known to everyone, but who knows no one. Design and analyze to identify the celebrity, if one exists, by asking only questions of the following form: Excuse me, do you know person x? You will get a binary answer for each such question asked.

Re: [algogeeks] help required...

2010-09-22 Thread kartheek muthyala
Take 2 persons, suppose say A and B ask one of them the question about other if A Knows B, then A cannot be the celebrity, if A does not know B, then B cannot be the celebrity. add what remained to the remainder. repeat this process for the remaining n-1 until one or none remained. Then if it is

[algogeeks] Help required

2010-09-21 Thread Nikhil Agarwal
Can anybody share his/her E-copy of An Introduction to algorithm by Udi manber.It's a great resource.If anybody has please share his E-copy.Thanks in advance. -- Thanks Regards Nikhil Agarwal Senior Undergraduate Computer Science Engineering, National Institute Of Technology, Durgapur,India

Re: [algogeeks] Help with Increment Operators in C!

2010-08-29 Thread prasad rao
In printf, the cursor goes to left to right. so x++ + ++x + x++ 5 + 7 +7 = 19. ( Here x=5, then we put 5 in place of first x, after that x will be incremented(post increment) that means x is 6 and we take second x which is pre-increment and hence once again x will be incremented that means x is 7

Re: [algogeeks] Help with Increment Operators in C!

2010-08-29 Thread Manjunath Manohar
it is compiler dependant da..the evaluation of this kind of expressions -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] Help with Increment Operators in C!

2010-08-28 Thread jagadish
I ran this code.. int main() { int x=5; printf(%d,(x++ + ++x + x++)); } The output printed was 18 instead of 19.. Should it not be 19? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Help with Increment Operators in C!

2010-08-28 Thread vineeth mohan
it sud b 19 naaa x++ = 5 ++x = 7 x++ = 7 5+7+7 On Sat, Aug 28, 2010 at 4:35 PM, jagadish jagadish1...@gmail.com wrote: I ran this code.. int main() { int x=5; printf(%d,(x++ + ++x + x++)); } The output printed was 18 instead of 19.. Should it not be 19? -- You received this message

Re: [algogeeks] Help with Increment Operators in C!

2010-08-28 Thread Priyanka Chatterjee
output is 18 1. control goes to ++x =6 ,x=6 2. control goes to both x++, i.e. both x++ are evaluated together, therefore x++ + ++x + x++= 6 +6+6 =18 x=7 On 28 August 2010 17:05, jagadish jagadish1...@gmail.com wrote: I ran this code.. int main() { int x=5; printf(%d,(x++ + ++x + x++));

Re: [algogeeks] Help with Increment Operators in C!

2010-08-28 Thread Raj N
The output is undefined. Depends on the compiler. + is not a sequence point which may result in undefined behavior On Sat, Aug 28, 2010 at 5:05 PM, jagadish jagadish1...@gmail.com wrote: I ran this code.. int main() { int x=5; printf(%d,(x++ + ++x + x++)); } The output printed was 18

[algogeeks] HELP ME!!!

2008-11-03 Thread Giridharan
Sir, I've a question.. Please help me to find the algorithm for evaluating the sine series. PLEASE HELP It's URGENT, Please give ans to this problem ASAP. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[algogeeks] Help

2008-02-12 Thread Atul Aggarwal
Hello everybody, I am new to algorithm and has started reading Cormen. I have no mentor to guide me. I want to verify my answers to the problems given in exercises. Does anyone having the solution to this book or I should discuss the solution with this group only?

[algogeeks] Help

2008-02-07 Thread Atul Aggarwal
Hello Everybody, I am beginner in Algorithms. Which book I should prefer for understanding basic algos? Also tell me some good book for graph Theory and its basic algos. Thanx in advance. Atul Aggarwal --~--~-~--~~~---~--~~ You received this message because you

[algogeeks] help with this acm problem

2007-11-29 Thread Daniel Bastidas
Hi, I try to solve this problem: The ICPC world finals will be held in a luxurious hotel with a big ballroom. A buffet meal will be served in this ballroom, and organizers decided to decorate its walls with pictures of past champion teams. In order to avoid criticism about favouring some of

[algogeeks] help with this acm problem

2007-11-27 Thread Daniel Bastidas
Hi, I try to solve this problem: The ICPC world finals will be held in a luxurious hotel with a big ballroom. A buffet meal will be served in this ballroom, and organizers decided to decorate its walls with pictures of past champion teams. In order to avoid criticism about favouring some of

[algogeeks] help with serie-parallel recognition algorithm

2007-11-14 Thread fpalamariu
Hi, i need a little help with an algorithm... an algorithm to recognize a series-parallel graph using (a adaptation probably) the algorithm for detecting articulation points in a graph. I have no ideea how this finally algoritm might look i've open a lot of books on graph theory data

[algogeeks] Help! - rectangle packing problem

2007-06-19 Thread ihinayana
Description: Given a group of rectangles with different integer width and height,such as 5*4, 2*3,1*7,etc. The total number of rectangles is like 10 or more.The problem is how to find a bigger rectangle with a minimal area which can hold all those given ones. To fix them in,those rectangles can

[algogeeks] help me with finding the time complexcity

2007-05-28 Thread sl7fat
hi i have an algorthim code and i have to find the time complixcity of the code so can you plz help me ASAP the code is written done ,, # include iostream.h void main() { int a[10][4]= {{ 16,17,19,13}, {18,14,15,19}, {18,20,20,19}, {13,14,15,10},

[algogeeks] help needed

2007-05-21 Thread monu
Consider a rectangle of M N .Inside that there are many small overlapping rectangles.Now i have to minimize overlapping area such that the % increase in size (M N) - 0 . means readjust smaller rectangles such that they do't overlap. Please suggest some algorithm !

[algogeeks] help

2006-07-08 Thread hosseingt
hi i'm a begginer. can anyone guide me how to start in algorithms? --~--~-~--~~~---~--~~ 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

[algogeeks] Help me with this problem

2006-06-17 Thread Norbert
I'm unable to solve this problem correctly. Please help me: You have chess board of size N x M and a lot of bricks of size K x 1. How many bricks can you place on this board (brick edges must be pallarel to board edges) Thanks for help --~--~-~--~~~---~--~~ You

<    1   2