摘要:
题目链接 sol:根一定是第一个, 然后不太会,去看了洛谷题解 题解 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define fi first #de 阅读全文
摘要:
题目链接 sol:先建一条链,然后把下面的点一个个往上面移, 优先移到最上面,如果上面满了就往下一层, 知道刚刚好凑满距离,如果最后不能移了就说明不能凑出给定的距离 #include <bits/stdc++.h> using namespace std; typedef long long ll; 阅读全文
摘要:
def netCDF_out(tp, dims, coords, filename): tp1 = [] for key, value in tp.items(): # print(key, xr.DataArray(value)) tp1.append(xr.DataArray(value)) t 阅读全文
摘要:
sol:每次加进一个新元素就找到左边最远的满足条件的元素,然后累计组合数 #include <bits/stdc++.h> using namespace std; #define int long long typedef int ll; inline ll read() { ll s=0; bo 阅读全文
摘要:
sol:思考过后得到 对于a>b>0 有a*b>(a-x)*b>a*(b-x) 维护一个优先队列,每次使得绝对值最小的数字绝对值变大就行了 #include <bits/stdc++.h> using namespace std; #define int long long typedef int 阅读全文