CF 1409B 脑瘫题我写不来

https://codeforces.ml/contest/1409/problem/B

我是蠢蛋

 1 #include<bits/stdc++.h>
 2 #define ll long long
 3 using namespace std;
 4 
 5 inline ll min(ll a, ll b){
 6     return a > b ? b : a;
 7 }
 8 
 9 int main(){
10     int T;cin >> T;
11     while(T--){
12         ll a, b, x, y, n;
13         cin >> a >> b >> x >> y >> n;
14         ll res = 1000000000000000000;
15         for(int i = 0 ; i < 2 ; i++){
16             int da = min(a - x, n);
17             int db = min(b - y, n - da);
18             res = min(res, (a - da) * (b - db));
19             swap(a, b); swap(x, y);
20         }
21         cout << res << endl;
22     }
23     
24     return 0;
25 }
原文地址:https://www.cnblogs.com/ecustlegendn324/p/14287080.html