自由总需要我们付出一些代价
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《请求大佬帮助》回复:
@[cognjinag](luogu://user/1410070)有没有可能删了也不对
``` #include #include #include #include #define ls(p) p > 1; tree[ls(p)].sum += (mid - l + 1) * tree[p].tag; tree[ls(p)].tag += tree[p].tag; tree[rs(p)].sum +=…
``` #include #include #include #include using namespace std; const int N = 5e6 + 5; int n, m; long long ans; int fa[N], p[N], d[N]; long long TP() { for (int i…
```cpp #include using namespace std; typedef long long ll; typedef pair pli; const int N = 100005; const int M = 500005; const ll INF = 1e18; struct Edge { int…
```cpp #include #include #include #include #include using namespace std; const int N = 2e3 + 5; string s1, s2; int dp[N][N]; int main() { cin >> s1 >> s2; for (…
```cpp #include #include #include #include using namespace std; const int N = 1e5 + 5; int a[N], f[N], h[N], G[N], m, s; int main() { int n = 1; while (scanf("%…
在讨论《【LGR-266】赛时答疑帖》回复:
qp
```cpp #include using namespace std; #define int long long #define mid ((l + r) >> 1) #define ls(x) (x mid) insert(nl, nr, mid + 1, r, rs(p), k); push_up(p); }…
```cpp #include using namespace std; typedef long long ll; const int N = 3e5 + 5; int n; int opt, l, r; ll a[N], c[N], ans, k; ll lowbit(int x) { return x & -x;…
在讨论《80分求助》回复:
@[zyzxzhangyi](luogu://user/1050256)OK
```cpp #include using namespace std; const int N = 1e5 + 5; int n; int a[N], fa[N]; int find(int x) { if (x == fa[x]) return x; else return fa[x] = find(fa[x]);…
```cpp #include #include #include using namespace std; const int N = 100; int n, BeginLevel, MaxLevel; int c[N]; bool dp[N][2]; int main() { scanf("%d %d %d", &…
神秘的单调队列做法 ```cpp #include using namespace std; const int N = 1e5 + 5; int m, n; int a[N], x, y; deque nums; void solve(int x, int y) { for (int i = 1; i = a[i])…
```cpp #include using namespace std; const int N = 70; int x, y; vector a(N), b(N); set s; int main() { scanf("%d", &x); if (x > 0) for (int i = 1; i 0) for (in…
```cpp #include using namespace std; const int N = 1e5 + 5, M = 105; int n, ans; int a[N], dp[M]; int gcd(int m, int n) { if (n) return gcd(n, m % n); return m;…
## 一、圆的基本概念与性质 - 1. 圆的定义 - 静态:平面内到定点(圆心 $O$)距离等于定长(半径 $r$)的所有点的集合 - 动态:线段 $OA$ 绕端点 $O$ 旋转一周,另一个端点 $A$ 所形成的图形 - 2. 核心要素 - 圆心($O$):确定圆的位置 - 半径($r$):连接圆心和圆上任意一点的线段…
```cpp #include using namespace std; #define int long long const int N = 1e4 + 5; const int M = 1e7 + 5; int t, m; int a[N], b[N], dp[M]; signed main() { scanf(…
在讨论《为什么第一个定义常量不行,而第二个可以》回复:
@[jrx666222](luogu://user/1778313)或者你用的c++版本不支持3,1415926这么定义
在讨论《为什么第一个定义常量不行,而第二个可以》回复:
第一个你的小数点打成逗号了
```cpp #include using namespace std; const int N = 5005; const int mod = 998244353; int n; int a[N], dp[N]; int main() { scanf("%d", &n); for (int i = 0; i = 0;…
## 思路: #### 1. 前缀异或数组 定义前缀异或数组,其中 $p_0 = 0$,$p_i = a_1 \oplus a_2 \oplus \cdots \oplus a_i$。\ 则区间 $[l, r]$ 的异或和可表示为 $p_r \oplus p_{l-1}$,当区间异或和等于 $k$ 时,有 $p_{l-…
在讨论《RE求调》回复:
第三行改成 ```cpp typedef unsigned long long ull;
```cpp #include using namespace std; typedef int ull; int q; int main() { scanf("%d", &q); while (q --) { ull k; cin >> k; ull a[10000000] = {0}; if (k == 1) {…
## 题目大意 给定一个集合 $A$,从集合 $A$ 中删去一个数 $a$,将集合 $A$ 中剩下的元素分成两个不同的子集 $A_1,A_2$且这两个子集都不是空集。问:$\sum_{i = 1}^{|A_1|} = \sum_{i = 1}^{|A_2|}$ 是否成立。 ### 思路: 根据题意我们可以得出:$\su…
```cpp #include #include #include using namespace std; const int MAX_R = 500; const int MAX_SUM = 250000; int x[MAX_R + 1]; bool f[MAX_SUM + 1]; int main() { io…
# 题解:P14259 兄妹(siblings) ## 题目大意 书店有若干排书架,第 $r$ 排书架包含坐标 $(r, c)$($c \ge 0$),出入口在 $(r, 0)$。有 $n$ 本书需要放到指定位置 $(r_i, c_i)$。两个人从 $(0,0)$ 出发,各自负责一部分书,放书后返回 $(0,0)$。移…
 假设最外面的圆的直径是d,那最小的圆的半径怎么表示? 除最大的圆外,其他图形都是内接或外接
## 定义 #### 一元二次方程 我们把只含有**一个未知数**,且**未知数最高次数**为 $2$ 的**等式**称为一元二次方程,形式化就是把形如 $ax^2 + bx + c = 0(a \ne 0)$ 的等式称为一元二次方程。 为什么这里的 $a \ne 0$ 呢?我们可以从两个角度考虑: 1. 根据定义可以…