#27984: CPP


11030067@mail.hpsh.tp.edu.tw (和平110級鄧雨珊)

學校 : 臺北市立和平高級中學
編號 : 163096
來源 : [61.64.210.174]
最後登入時間 :
2022-10-23 16:54:59
d260. 11455 - Behold my quadrangle -- UVa11455 | From: [203.72.60.244] | 發表日期 : 2021-11-08 11:31

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
int t, a[4];
cin >> t;
while (t--){
for(int i = 0; i<4; i++){
cin >> a[i];
}
sort(a, a+4);
if(a[0]==a[3]){
cout <<"square\n";
}
else if (a[0]==a[1] && a[2]==a[3]){
cout << "rectangle\n";
}
else if(a[0]+a[1]+a[2]>a[3]){
cout <<"quadrangle\n";
}
else {
cout <<"banana\n";
}
}
}
 
ZeroJudge Forum