标签:ret 最大的 span i++ for ble col bsp code
水题~
题目大意每行选一个最大的,套公式就好了
#include <iostream> #include <cstring> #include <string> #include <sstream> #include <string> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #define maxn 1005 #define INF 0x3f3f3f3f #define EPS 1e-6 #define pi acos(-1.0) using namespace std; typedef long long ll; double a,b,c; double maxx; char ch; char ca[4]; int main() { maxx=0; double ans=1.0; for(int i=0;i<3;i++) { cin>>a>>b>>c; if(a>maxx) { maxx=a; ch=‘W‘; } if(b>maxx) { maxx=b; ch=‘T‘; } if(c>maxx) { maxx=c; ch=‘L‘; } ca[i]=ch; ans*=maxx; maxx=0; } for(int i=0;i<3;i++) cout<<ca[i]<<" "; ans=(ans*0.65-1.0)*2.0; printf("%.2lf\n",ans); return 0; }
标签:ret 最大的 span i++ for ble col bsp code
原文地址:https://www.cnblogs.com/FTA-Macro/p/10080597.html