2020-05-22 — 习题训练二-C
C - Ichihime and TriangleC
题意:给定a≤b≤c≤d,输出满足
- a≤x≤b
- b≤y≤c
- c≤z≤d
且能形成三角形的x,y,z.
解题思路:由三角形性质得出:b,c,c满足题意.
ac代码:
#include<iostream>
using namespace std;
int main(){
int t,a,b,c,d;
cin>>t;
while(t--){
cin>>a>>b>>c>>d;
cout<<b<<" "<<c<<" "<<c<<endl;
}
return 0;
}