123456789101112131415161718192021222324252627282930313233343536 |
- #include<bits/stdc++.h>
- using namespace std;
- //C: 狗哥的肚子 模拟
- int main() {
- double pi = 3.14159;
- int T;
- cin >> T;
- while (T--) {
- int N;
- cin >> N;
- double Max = 0;
- double S = 0;
- while (N--) {
- char t[100];
- cin >> t;
- if (*t == 'T') {//strcmp(t,"T")==0
- double a, h;
- cin >> a >> h;
- S = a * h / 2;
- } else if (t[0] == 'R') {
- double a, b;
- cin >> a >> b;
- S = a * b;
- } else if (t[0] == 'C') {
- double r;
- cin >> r;
- S = pi * r * r;
- }
- Max = max(Max, S);
- }
- cout << fixed << setprecision(2) << Max << endl;
- }
- return 0;
- }
|