首页 > 隔板与水槽
头像 FQR_
发表于 2024-10-31 08:33:56
比赛链接 难度递增:FDABEC A 枚举中间隔板的位置,然后分别枚举左右隔板,找到最大值。时间复杂度 。 //赛时代码 by zys #include<bits/stdc++.h> using namespace std; #define int long long const in 展开全文
头像 自由的风0450
发表于 2025-12-01 22:18:00
枚举左右两侧最大容积,相加得最大容积 #include <iostream> #include<vector> #include<algorithm> using namespace std; int main() { ios::sync_with_st 展开全文
头像 小男娘
发表于 2025-11-25 08:43:13
发现,于是可以对于每个中间隔板分别枚举左右水槽的最大值,加起来再求最大值即可。时间复杂度。 #include <iostream> #include <vector> using namespace std; using ll = long long; int n; v 展开全文