A. Strange Partition
Problem - A - Codeforces 2022-12-15 14:00:52
公式就是上面这个,题目就是一个很简单的贪心题
#include <bits/stdc++.h>
#define int long long
const int N=100010;
using namespace std;
int a[N];
signed main()
{
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
doub