上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: LL CRT(int k, LL* a, LL* r) { LL n = 1, ans = 0; for (int i = 1; i <= k; i++) n = n * r[i]; for (int i = 1; i <= k; i++) { LL m = n / r[i], b, y; exgc 阅读全文
posted @ 2024-12-18 10:20 lyrrr 阅读(12) 评论(0) 推荐(0)
摘要: __int128 read(){ __int128 x=0,f=1; char ch=getchar(); while(!isdigit(ch)&&ch!='-')ch=getchar(); if(ch=='-')f=-1,ch=getchar(); while(isdigit(ch))x=x*10 阅读全文
posted @ 2024-12-18 00:19 lyrrr 阅读(165) 评论(0) 推荐(0)
摘要: 自己vp了一下这一场,赛时7题,比较简单,但是有几题也是卡了蛮久。 都是思维题。 C 感觉结论比较显然但是实现上被卡住了。 用map没过,重构的时候把多个数压缩成一个数处理ac了,对拍发现是因为循环逻辑导致错误了。。 #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2024-12-15 18:31 lyrrr 阅读(71) 评论(0) 推荐(0)
摘要: 贪心 https://codeforces.com/problemset/problem/1798/C https://codeforces.com/contest/1779/problem/C (bonus problem不会) https://codeforces.com/problemset/ 阅读全文
posted @ 2024-12-13 22:36 lyrrr 阅读(15) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-12-13 22:33 lyrrr 阅读(0) 评论(0) 推荐(0)
摘要: https://atcoder.jp/contests/abc378/tasks/abc378_e #include <bits/stdc++.h> using namespace std; #define int long long #define lowbit(x) (x&(-x)) #defi 阅读全文
posted @ 2024-12-13 18:37 lyrrr 阅读(20) 评论(0) 推荐(0)
摘要: 补码 正数和0补码为本身,负数补码为取反码后加1 多目运算 有几个数参与运算就有几个目,比如取反是单目运算~ 设置一位为0或是1 int st(int x, int i, int k) { if (k) return (x | (1 << i)); else return x & ~(1 << i) 阅读全文
posted @ 2024-12-13 15:35 lyrrr 阅读(11) 评论(0) 推荐(0)
摘要: 期望的性质 线性性 (Linearity) 对任意两个随机变量 \(X, Y\) 和常数 \(a, b\),无论 \(X,Y\) 是否独立,期望满足: \[\mathbb{E}[X+Y] = \mathbb{E}[X] + \mathbb{E}[Y], \quad \mathbb{E}[aX+b] 阅读全文
posted @ 2024-12-13 14:57 lyrrr 阅读(57) 评论(0) 推荐(0)
摘要: E 概率期望 #include<bits/stdc++.h> using namespace std; #define LL long long #define pii pair<int, int> #define endl '\n' #define mkp make_pair // #define 阅读全文
posted @ 2024-12-13 14:55 lyrrr 阅读(9) 评论(0) 推荐(0)
摘要: 本来写完了但是忘保存了。。寄 阅读全文
posted @ 2024-12-12 22:00 lyrrr 阅读(36) 评论(0) 推荐(1)
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页