摘要:
中位数定理:给定一个数组,每次操作加1或者减1,将所有元素变成相同的最小操作次数则是将所有元素变成中位数即可。 阅读全文
posted @ 2025-01-21 22:27
临江柔
阅读(11)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> using namespace std; #define int long long const int N=1e5+10; int Max,Min,n,t; int a[N],b[N]; bool check(int x){ int lim=Max- 阅读全文
posted @ 2025-01-21 22:20
临江柔
阅读(9)
评论(0)
推荐(0)
浙公网安备 33010602011771号