cqbz初一最蒻之人||%%%Orz%%%|| You were never here.
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《TLE 100pts求条 玄关》回复:
不是O2自动开了inline吗,怎么手动开了快了这么多?
在讨论《TLE 100pts求条 玄关》回复:
加inline AC了,此贴结。
```cpp #include #define endl '\n' using namespace std; typedef long long ll; const int MAXN = 3e5 + 5; const int LOG = 20; const int MOD = 998244353; int n; vec…
```cpp #include #define endl '\n' using namespace std; typedef long long ll; const int MAXN = 1e5 + 5; const int MAXM = 3e5 + 5; const int LOG = 20; int n, m; s…
在讨论《LGR-271 作弊名单》回复:
kkk又熬夜加班
在讨论《树状数组求条》回复:
@[c202837](luogu://user/1838362)%%%dalao
```cpp #include #define endl '\n' using namespace std; typedef long long ll; const int MAXN = 3e5 + 5; int n, m; int a[MAXN]; struct FenwickTree{ int c[MAXN]; i…
在讨论《ST表求条悬3关》回复:
@[Jason331](luogu://user/1126439)@[wzq_owo](luogu://user/1042986)已AC, 没开long long,感谢帮助。
在讨论《ST表求条悬3关》回复:
@[wzq_owo](luogu://user/1042986)是有单调性的啊,越往左,最小值只会变小或不变, 一旦在某处遇到比 $a_i$ 小的值,左边就不可能再等于$a_i$ 了。
```cpp #include #define endl '\n' using namespace std; typedef long long ll; const int MAXN = 1e5 + 5; const int LOG = 20; int n; int a[MAXN], sum[MAXN]; struct…
在讨论《60fpsHELP!!!必关!!!》回复:
@[X_Thorne](luogu://user/1987099) ```cpp #include using namespace std; int main() { int a, b; cin >> a >> b; a %= 7; int ans = 1; for (int i = 1; i <= b; i++) {…
```cpp #include using namespace std; #define getchar() getchar_unlocked() #define putchar(c) putchar_unlocked(c) template inline void read(T &x) { x = 0; char c…
在讨论《0分求条》回复:
%%%zyl Orz%%%
在讨论《树的直径0pt求条》回复:
@[tsh_qwq](luogu://user/1485346)
在讨论《树的直径0pt求条》回复:
```cpp #include #define endl '\n' using namespace std; const int N=3e5+5; int n,m,c,maxd,d[N]; int cnt[N]; bool vis[N]; vector e[N]; void dfs(int u,int fa){ vis…
在讨论《树的直径0pt求条》回复:
```cpp #include using namespace std; const int MAXN = 1e5+5; vector a[MAXN]; int idx, ans; void dfs(int u, int fa, int step) { if (step > ans) { ans = step; idx…
在讨论《树的直径0pt求条》回复:
没看懂你的求法诶,一般来说树的直径就求最长链和次长链树形dp或者二次扫描,你的有点像二次扫描
```cpp #include typedef long long ll; using namespace std; const int MAXN=65+5; int l,r,mid,n,ans,sum,len; int a[MAXN]; bool vis[101]; inline bool dfs(int ii,in…
### 题目大意 - 数字(0 到 9):直接返回数字。 - 连接器(#):一个输入,一个输出,直接传递值。 - 运算符(+,-,*,/):对两个输入进行运算并输出结果。 - 打印机(P):显示最终结果。 所有元件通过相邻连接形成一棵以打印机为根的树,我们需要计算这棵表达式树的值。 --- ### 解决方法 暴力dfs…
在讨论《25 年 8 月 评测机环境更新》回复:
hp?
### 1.题目大意: 有一个初始算式:$S=A_1-A_2-A_3-\dots-A_n$ 可以在其中添加 $K$ 对括号(合法配对),形成不同的算式方案。 两个方案本质不同当且仅当存在某个数列 $A_1,A_2,\dots,A_n$ 使得计算结果不同。 给定 $n$ 和 $k$,求本质不同的算式方案数量。 ### 2…
在文章《题解:P7751 [COCI 2013/2014 #2] PUTNIK》发表评论:
膜拜自己orzorz
在讨论《关于题目难度调整工单的新规定》回复:
qp?
### 1. 分析 下面的 dalao 们都用的搜索,我发现这道题可以维护一个连续的区间,而且每次向左或向右拓展,所以考虑区间 dp,暴力枚举两端节点(实际上和 dalao 们的思路差不多)。 --- ### 2. dp 数组定义 $dp[i][j]$ 表示两端城市是 $i$ 和 $j$ 时的最小飞行时间。 --- #…