2020-05-22 — 习题训练二-C

C - Ichihime and TriangleC

题意:给定abcd,输出满足

  • axb
  • byc
  • czd

且能形成三角形的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;
}

 

原文地址:https://www.cnblogs.com/nanan/p/12941261.html