#include <cstdio> #include <string> using namespace std; void swap(int& a,int& b) { int t; t=a; a=b; b=t; } int main() { int n; scanf("%d",&n); for (int i=1; i<=n; i++) { printf("%s%d%s ","Scenario #",i,":"); int a,b,c; scanf("%d%d%d",&a,&b,&c); if (b>c) swap(c,b); if (a>c) swap(a,c); if ((c*c)==(a*a+b*b)) printf("%s ","yes"); else printf("%s ","no"); } return 0; }
翻译:triangle 三角型