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
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:
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
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
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
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
**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){