摘要: 原题链接 题解 1.如果限定在 \(x\) 天内买完,那么限定在 \(x+1\) 天内也能买完,二分浮现。 2.如果要买 \(type\ 1\) ,那么一定是在这 \(x\) 天内 \(a\) 价格最低的那天一次买齐,且优先买价格低的 \(type\ 1\) 3.优先买 单价x汇率 最低的那个 co 阅读全文
posted @ 2024-07-16 21:07 纯粹的 阅读(23) 评论(0) 推荐(0)
摘要: 原题链接 题解 正着来发现很怪,倒着来发现顺多了 code #include<bits/stdc++.h> #define ll long long using namespace std; const ll N=114514; ll tree[8*N]={0}; ll tag[8*N]={0}; 阅读全文
posted @ 2024-07-16 19:51 纯粹的 阅读(25) 评论(0) 推荐(0)
摘要: 原题链接 真恶心 code #include<bits/stdc++.h> #define ll long long using namespace std; const ll N=114514; ll a[200005],d[200005]; bool solve() { ll n; cin>>n 阅读全文
posted @ 2024-07-16 18:25 纯粹的 阅读(21) 评论(0) 推荐(0)
摘要: 原题链接 题解 找出大于对应平均数的部分。。。 code #include<bits/stdc++.h> #define ll long long using namespace std; const ll N=114514; ll a[100006]; void solve() { ll n; c 阅读全文
posted @ 2024-07-16 15:26 纯粹的 阅读(17) 评论(0) 推荐(0)
摘要: 原题链接 题解 连续两次对同一位操作等于没操作 连续两次对不同位操作等于交换 奇数次操作会改变01的数量 code #include<bits/stdc++.h> #define ll long long using namespace std; const ll N=114514; const i 阅读全文
posted @ 2024-07-16 14:08 纯粹的 阅读(26) 评论(0) 推荐(0)
摘要: 原题链接 题解 给定若干条路径限制,问是否合法 对于树上任意三个点 \(a,b,c\) (不一定直接相连),如果已知 \(a\oplus b,b\oplus c\) 那么 \(a\oplus c\) 也已知 所以我们可以对限制里相连的节点放到一个集合里,并且统一记录他们到集合头领的路径异或值 由于奇 阅读全文
posted @ 2024-07-16 11:15 纯粹的 阅读(32) 评论(0) 推荐(0)