题目链接:CodeForces 1992A【Only Pluses】
思路
代码
#include <functional>
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
#define ll long long
const int N = 500 + 10;
int a[N];
void solve() {
int n, m = 5;
priority_queue<int> q;
for (int i = 1; i <= 3; i++) {
cin >> a[i];
}
int res = 1;
for (int i = 0; i <= 5; i++) {
for (int j = 0; i + j <= 5; j++) {
for (int k = 0; i + j + k <= 5; k++) {
res = max(res, (a[1] + i) * (a[2] + j) * (a[3] + k));
}
}
}
cout << res << endl;
}
int main() {
int t;
cin >> t;
while (t--) {
solve();
}
return 0;
}
标签:int,Pluses,CodeForces,1992A,Only,include
From: https://www.cnblogs.com/againss/p/18305176