该文被密码保护。 阅读全文
posted @ 2018-10-25 16:13 yccdu 阅读(34) 评论(4) 推荐(1) 编辑
摘要: 题目链接 sol:根一定是第一个, 然后不太会,去看了洛谷题解 题解 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define fi first #de 阅读全文
posted @ 2023-07-13 17:00 yccdu 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 题目链接 sol:先建一条链,然后把下面的点一个个往上面移, 优先移到最上面,如果上面满了就往下一层, 知道刚刚好凑满距离,如果最后不能移了就说明不能凑出给定的距离 #include <bits/stdc++.h> using namespace std; typedef long long ll; 阅读全文
posted @ 2023-07-13 16:02 yccdu 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 用一个简单的二次线性插值的例子来演示这种格式的创建(真的好麻烦) def double_linear(filename, tp): # print(tp) date = tp.variables['date'] longitude = tp.coords['longitude'] latitude 阅读全文
posted @ 2023-07-13 13:46 yccdu 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2023-07-12 16:23 yccdu 阅读(20) 评论(0) 推荐(0) 编辑
摘要: netCDF的读入 需要导入的库 import os import xarray as xr import netCDF4 as nc 打开netCDF文件 folder_path = "文件夹路径(建议用绝对路径)" file_list = os.listdir(folder_path) for 阅读全文
posted @ 2023-07-11 11:31 yccdu 阅读(69) 评论(0) 推荐(0) 编辑
摘要: sol:暴力每次加一分钟 printf(“%02d",a) 表示不到两位左边补0 #include <bits/stdc++.h> using namespace std; typedef int ll; inline ll read() { ll s=0; bool f=0; char ch=' 阅读全文
posted @ 2021-10-27 22:51 yccdu 阅读(31) 评论(1) 推荐(0) 编辑
摘要: sol:每次加进一个新元素就找到左边最远的满足条件的元素,然后累计组合数 #include <bits/stdc++.h> using namespace std; #define int long long typedef int ll; inline ll read() { ll s=0; bo 阅读全文
posted @ 2021-10-25 23:02 yccdu 阅读(9) 评论(0) 推荐(0) 编辑
摘要: sol:简单题,复习一下upper_bound #include <bits/stdc++.h> using namespace std; typedef int ll; inline ll read() { ll s=0; bool f=0; char ch=' '; while(!isdigit 阅读全文
posted @ 2021-10-25 00:31 yccdu 阅读(10) 评论(0) 推荐(0) 编辑
摘要: div2B 贪心随便爆一遍就ok了 #include <bits/stdc++.h> using namespace std; typedef int ll; inline ll read() { ll s=0; bool f=0; char ch=' '; while(!isdigit(ch)) 阅读全文
posted @ 2021-10-25 00:12 yccdu 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-10-24 16:05 yccdu 阅读(16) 评论(0) 推荐(0) 编辑