Page 1 of 2
11455 - Behold my quadrangle
Posted: Thu May 22, 2008 12:48 am
by nahid
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
by Rushow
can u just mail me ur code plz??
Re: 11455 - Behold My Quadrangle
Posted: Thu May 22, 2008 4:51 pm
by andmej
Re: 11455 - Behold My Quadrangle
Posted: Tue Aug 05, 2008 12:57 pm
by Iffat
can anyone explain how to determine quadrangle and banana
Re: 11455 - Behold My Quadrangle
Posted: Wed Aug 06, 2008 1:53 pm
by sohel
Iffat wrote:can anyone explain how to determine quadrangle and banana
A 'quadrangle' is a valid quadrilateral whereas a 'banana' isn't!
Re: 11455 - Behold My Quadrangle
Posted: Tue Sep 09, 2008 9:04 am
by bleedingeyes
andmej wrote:Input
Output
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
by Enzam
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
by Obaida
Very cool.
Just sort the values and then the checking,
1st square
2nd rectangle
3rd quadrangle
finally banana
beware???-11455 - Behold My Quadrangle
Posted: Fri Feb 20, 2009 9:59 pm
by sazzadcsedu
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
by allenlam
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
by x140l31
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
by phy
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
by sms.islam
"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
please explain.
Re: 11455 - Behold My Quadrangle
Posted: Sat Nov 27, 2010 9:23 pm
by dewsworld
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
by shuvokr
use unsigned long long int