UVA-11455 - Behold My Quadrangle

  • UVa Online Judge 解題結果請於 Submit 後,參閱 uHunt
  • 如果你有任何建議與指教,歡迎於下方留言一起討論喔!
  • 相同題目:ZOJ-d260

題意概要

請根據題目給定的四邊邊長判斷能組合出哪一種四邊形,題目將組合的結果分為四大類:「正方形 (Square)」、「長方形 (Rectangle)」、「任意四邊形 (Quadrangle)」與「無法組合成四邊形」。


Input

The first line of the input contains an integer indicating the number of test cases. For each test case, there is a line with four positive integer numbers, between and .


Output

For each test case, the output should consist of a line with the text square, rectangle, quadrangle or banana, if the sides of the corresponding case can form a square, a rectangle, a quadrangle or none, respectively.


Sample Input

4
10 8 7 6
9 1 9 1
29 29 29 29
5 12 30 7

Sample Output

quadrangle
rectangle
square
banana
profile-image
David Lu
Hello, I'm David Lu. I am a graduate student in Department of Computer Science at National Chiao Tung University, Taiwan. I am in the Networking and Sensing Systems (NSS) Lab at NCTU. If you have any question, please feel free to contact with me.
comments powered by Disqus