摘要:
Description "题目链接" Solution 01字典树模板题,删除操作用个数组记录下就行了 Code c++ include include include int n,T[9000010][2],v[9000010],A[300010],num[9000010],rt=1,B[3000 阅读全文
摘要:
Description Zeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 Zeus 需要在集合当中找出一个正整数 K ,使得 K 与 阅读全文
摘要:
Description "题目链接" Solution 设f(x)为x的最大质因子 那么由题意易得$X_1$的范围在$[X_2 f(X_2)+1,X2]$ 同理$X_0$的范围在$[X_1 f(X_1)+1,X1]$ 枚举$X_1$即可 Code c++ include include using 阅读全文
摘要:
Description "题目链接" Solution 将温度做一个前缀和,用一个优先队列依次处理一遍 思路还是很简单的 Code c++ include include include define ll long long define N 100010 using namespace std; 阅读全文
摘要:
Description 给出一个N个点M条边的无向图,经过一个点的代价是进入和离开这个点的两条边的边权的较大值,求从起点1到点N的最小代价。起点的代价是离开起点的边的边权,终点的代价是进入终点的边的边权 N include include include define ll long long de 阅读全文