cf 1443C The Delivery Dilemma
传送门
n份菜,可以选择饭店送,也可以自己拿,求总的花费时间最小
假设所有的都是自己拿,花的时间为二分的上界,枚举所有答案,判断当前情况下是否符合
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int t,n,a[maxn],b[maxn];
bool check(long long x){
long long s = 0;
for(int i = 1; i <= n; i++)
原创
2020-11-06 21:05:26 ·
199 阅读 ·
0 评论