Page 1 of 2

### 11455 - Behold my quadrangle

Posted: Thu May 22, 2008 12:48 am
i'm getting right output for all smple input. but having WA in submission. if i had more crtical input, then it would easy to fix my bug. pls give me some critical inputs. if u need to cheak my code, i'll post it.

### Re: 11455 - WA need more test case

Posted: Thu May 22, 2008 8:08 am
can u just mail me ur code plz??

### Re: 11455 - Behold My Quadrangle

Posted: Thu May 22, 2008 4:51 pm
Input

Code: Select all

``````3
1 2 3 6
1 3 3 7
1 2 3 7
``````
Output

Code: Select all

``````quadrangle
banana
``````

### Re: 11455 - Behold My Quadrangle

Posted: Tue Aug 05, 2008 12:57 pm
can anyone explain how to determine quadrangle and banana

### Re: 11455 - Behold My Quadrangle

Posted: Wed Aug 06, 2008 1:53 pm
Iffat wrote:can anyone explain how to determine quadrangle and banana

### Re: 11455 - Behold My Quadrangle

Posted: Tue Sep 09, 2008 9:04 am
andmej wrote:Input

Code: Select all

``````3
1 2 3 6
1 3 3 7
1 2 3 7
``````
Output

Code: Select all

``````quadrangle
banana
``````
can anyone explain me why 1 2 3 6 and 1 3 3 7 is not banana
is it possible to make ne quadrangle when sum of its 3 side is equal to other side?

### Re: 11455 - Behold My Quadrangle

Posted: Wed Nov 05, 2008 5:43 pm
It is possible to make an quadrangle when sum of its 3 side is equal to other side.

And Beware of the fact that the lengths are not in sorted order!

### Re: 11455 - Behold My Quadrangle

Posted: Sat Dec 20, 2008 4:09 pm
Very cool.
Just sort the values and then the checking,
1st square
2nd rectangle
finally banana

### beware???-11455 - Behold My Quadrangle

Posted: Fri Feb 20, 2009 9:59 pm
BEWARE!!!!!!!!!!!!!1

INPUT MAY CONTAIN 0;
ALTHOUGH PROBLEM STATEMENT SAYS
For each test case, there is a line with four positive integer numbers
I WASTE AT LEAST 10 SUBMISSION FOR THIS REASON.

### Re: 11455 - Behold My Quadrangle

Posted: Tue Jun 30, 2009 6:06 am
After a few times of runtime error, I think the testing data of this problem is badly formatted, and the description is badly written.

Don't trust the description and the sample input format.

When it says the first line contains something it can mean the first line is blank.
When it says there is a line containing 4 integers it can mean the integers are written on several lines.
As a standard, you have to expect extra spaces and CR anywhere.

Finally got it Accepted with brute force parsing the input. It is not a friendly problem for Java programmers.

### Re: 11455 - Behold My Quadrangle

Posted: Wed Jul 15, 2009 1:31 am
Enzam wrote:It is possible to make an quadrangle when sum of its 3 side is equal to other side.

And Beware of the fact that the lengths are not in sorted order!
It isn't!!!

How to make a quadrangle when the sum of 3 sides is equal to the other side????????? It's a line!!! not a poligon!

### Re: 11455 - Behold My Quadrangle

Posted: Tue Aug 11, 2009 3:22 am
x140l31 wrote:
Enzam wrote:It is possible to make an quadrangle when sum of its 3 side is equal to other side.

And Beware of the fact that the lengths are not in sorted order!
It isn't!!!

How to make a quadrangle when the sum of 3 sides is equal to the other side????????? It's a line!!! not a poligon!
We called this a "degenerated" quadrangle, having zero area.
Whether it is considered as a valid quadrangle depends on the problem setter/description...

### Re: 11455 - Behold My Quadrangle

Posted: Thu Nov 12, 2009 9:13 am
"It is possible to make an quadrangle when sum of its 3 side is equal to other side. when it is sorted"

so how it will be quadrangle

10 8 7 6

### Re: 11455 - Behold My Quadrangle

Posted: Sat Nov 27, 2010 9:23 pm
Any idea why I've got WA on this

Code: Select all

``````#include <iostream>
#include <cstdio>
using namespace std ;

int main()
{
//    freopen("in.txt", "r", stdin ) ;

int a,b,c,d ;
int noTest ;
int max ;

cin >> noTest ;

while( noTest-- )
{
cin >> a >> b >> c >> d ;

max = a ;
if( max < b )   max = b ;
if( max < c )   max = c ;
if( max < d )   max = d ;

if( a+b+c+d<2*max )                     cout << "banana" << endl ;
else if( a==b && b==c && c==d )         cout << "square" << endl ;
else if( a==c && b==d && a!=b && c!=d ) cout << "rectangle" << endl ;
else                                    cout << "quadrangle" << endl ;
}

return 0 ;
}
``````

### Re: 11455 - Behold My Quadrangle

Posted: Mon Feb 18, 2013 8:31 pm
use unsigned long long int