[algogeeks] Re: Problem

2006-11-07 Thread shisheng li
Can the 4 overlap? From: algogeeks@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mohamad momenian Sent: Tuesday, November 07, 2006 4:09 PM To: algogeeks@googlegroups.com Subject: [algogeeks] Problem Hi i have a problem please help me The input

[algogeeks] Re: Problem

2006-11-07 Thread mohamad momenian
No they can't over lap thank you for your attention On 11/7/06, shisheng li [EMAIL PROTECTED] wrote: Can the 4 overlap? From: algogeeks@googlegroups.com [mailto: algogeeks@googlegroups.com] On Behalf Of mohamad momenianSent: Tuesday, November 07, 2006 4:09 PM To:

[algogeeks] Re: Problem

2006-11-07 Thread Malay Bag
I did not get the point:-we mustcalculate widthand height ofallof rectangles that can coverthis 4 rectangles and it'sareabecome minimumcan you give some example? On 11/7/06, mohamad momenian [EMAIL PROTECTED] wrote: No they can't over lap thank you for your attention On 11/7/06, shisheng li

[algogeeks] Re: Problem

2006-11-07 Thread Atamyrat Hezretguliyew
On 11/7/06, Malay Bag [EMAIL PROTECTED] wrote: I did not get the point:- we must calculate width and height of all of rectangles that can cover this 4 rectangles and it's area become minimum can you give some example? I think this problem is from IOI95

[algogeeks] Re: Problem

2006-11-07 Thread Manish Garg
it will be better if u will give at least one sample input and output. On 11/7/06, mohamad momenian [EMAIL PROTECTED] wrote: Hi i have a problem please help me The input of problem is : width and height of 4 rectangle that is between 1,50 and thewe mustcalculate widthand height ofallof

[algogeeks] Re: Problem

2006-11-07 Thread mohamad momenian
Yes that is from ioi95 | INPUT.TXT | | OUTPUT.TXT ||___| ||| 1 2 | | 40 || 2 3 | | 4 10 || 3 4 | | 5 8 || 4 5 | || |___| Example input and output On 11/7/06, Manish Garg [EMAIL PROTECTED] wrote: it will be better if u will give at least one sample input

[algogeeks] Re: majority element

2006-11-07 Thread J.Guo
**Presume the majority exists**, the following algo use O(1) space and only scan the array one pass. It is simple idea of counting. If there exists a majority elements in the array, it must be the remaining element on the counter after we consider all elements. int getMajority(int A[], int n){