给定一个长度为 n 的整数序列 a,找到一个自然数 x 使得 max(ai xor x) 最小。输出这个最小值。 ...
分类:
其他好文 时间:
2021-02-19 12:54:00
阅读次数:
0
树套树(splay套线段树) -AcWing 2476 本来想着用multiset套线段树的,结果一直T。改成常数小的splay才过,写完人都傻了^^ /* splay套线段树 */ #include <bits/stdc++.h> using namespace std; const int N ...
https://www.acwing.com/problem/content/1144/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-17 14:57:50
阅读次数:
0
https://www.acwing.com/problem/content/1145/ 思路 \(把已有的边加上,会形成各个连通块,等价于把每个连通块当成一个点去做Kruskal算法.\) #include <bits/stdc++.h> using namespace std; #define ...
分类:
其他好文 时间:
2021-02-17 14:56:41
阅读次数:
0
高斯消元解线性方程组 时间复杂度:O(\(n^3\)) https://www.luogu.com.cn/problem/P3389 题意:给定一个线性方程组,对其求解。 #include <bits/stdc++.h> using namespace std; const char nl = '\ ...
分类:
其他好文 时间:
2021-02-17 14:54:53
阅读次数:
0
快速幂 (1)快速幂 求 \(a^k\ mod\ p\) 时间复杂度:O($\log$k) https://www.luogu.com.cn/problem/P1226 题意:求 \(a^k \ mod \ p\) #include <cstdio> #include <iostream> usin ...
分类:
其他好文 时间:
2021-02-17 14:14:44
阅读次数:
0
未完待续……(只是给自己存个板子) 快速傅里叶变换 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 1e2; struct Cp { double x, y; inline Cp operator +(cons ...
分类:
其他好文 时间:
2021-02-17 14:03:19
阅读次数:
0
2.EDA/探索性数据分析 2.1 周一到周日每天购买情况 # 导入相关包 %matplotlib inline # 绘图包 import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as p ...
分类:
其他好文 时间:
2021-02-17 14:01:56
阅读次数:
0
由于题目的数据范围为[0, 168],因此给定的整数x在十三进制下一定可以表示为$x=a13^1+b130$(因为$168<132$),于是只要想办法求出a跟b即可。 对上面的等式两边同时整除13,可以得到$\lfloor x/13 \rfloor =a$;对上面的等式两边同时对13取模,可以得到$ ...
分类:
其他好文 时间:
2021-02-16 12:26:18
阅读次数:
0
/* { ###################### # Author # # Gary # # 2021 # ###################### */ #include<bits/stdc++.h> #define rb(a,b,c) for(int a=b;a<=c;++a) #de ...
分类:
其他好文 时间:
2021-02-15 12:03:57
阅读次数:
0