这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《单开函数写freopen有影响吗》回复:
@[A_chicken](luogu://user/991723)xde的说法是第二题只是以函数作为形式的强制在线,本质上是伪交互,T1是个交互,T2场上可以当交互看,反正也是不写main函数那一类的。。。
在讨论《单开函数写freopen有影响吗》回复:
@[A_chicken](luogu://user/991723)按理说交互库应该只调用init和perm两个函数,所以我写在第三个函数里不被调用会被判爆零吗
在讨论《单开函数写freopen有影响吗》回复:
@[Melo_qwq](luogu://user/750292)印象里下发交互库没写freopen,但是我的问题在于我写的coder函数理论不会被交互库调用,不被main函数调用的情况下也会出现错误吗
rt,本人提交的代码一共写了三个函数,分别为init,perm和一个叫coder的函数,其中init里只打了一个rerurn,perm是实现,然后coder里面单放了两行freopen编译能过去吗
在讨论《仅AC 7求助》回复:
@[tzhengqing](luogu://user/1058570)我开大空间以后确实变成5AC了()
```cpp #include using namespace std; #define ll long long const ll mod = 998244353; const int maxn = 1e3 + 5; const int maxm = 1e6 + 5; ll son[maxm]; int dfn[ma…
在讨论《警示后人》回复:
其实大样例3过不去交上去能AC…………
rt,调了一个下午,本人已疯 ```cpp #include using namespace std; const int maxn = 5e5 + 5; #define ls u t[maxn h[c][y]) { swap(x, y); } fa[c][x] = y; a[++top] = {c, x, y, h[…
在讨论《求助cmp函数导致的神秘RE》回复:
搞懂了,此贴结。@[Rigel](luogu://user/602458)@[Jerrycyx](luogu://user/545986)
在讨论《求助cmp函数导致的神秘RE》回复:
@[oldnet](luogu://user/713602)实测并非此原因
在讨论《求助cmp函数导致的神秘RE》回复:
@[KNO3](luogu://user/83168) 信息: Runtime Error. Received signal 11: Segmentation fault with invalid memory reference.
```cpp struct node { double a, b; } p[maxn]; bool cmp(node x, node y) { if (x.b == -1) { return y.b == x.b ? x.a x.b; } if (y.b == -1) { return x.b == y.b ? x.a…
rt,根据提示信息来看,交上去以后ans就会变成极大值 ```cpp #include using namespace std; const int maxn = 205; #define ll long long const ll INF = 0x3f3f3f3f3f3f; int n, m, x[maxn], y[…
如题,搞了一晚上这条个结果,真郁闷 测试点1本地能过,为啥提交上去过不去呢,太奇怪了 ```cpp #include using namespace std; const int maxn = 205; #define ll long long const ll INF = 0x3f3f3f3f3f3f; int n,…
在讨论《求问 || 的奇妙用法》回复:
已理解,感谢各位dalao,此贴结
```cpp dp[v.to] || (dp[u] ^= 1, ans[v.to] = v.id); ``` 原题为 :https://www.luogu.com.cn/problem/P9923 在我订正这道题时,参考了题解区第一个人的代码,一开始我将其理解为给 $dp[v.to]$ 赋值为 $0$,于是有了以下写法…
在讨论《在线等!1道基环树好题,但浮点异常,33分,求大佬给看看》回复:
已解决,len处理的有问题,AC后代码 ```cpp #include using namespace std; const int maxn = 5e5 + 5; vector g[maxn]; int in[maxn], fa[maxn][20], depth[maxn], lg[maxn], rt[maxn],…
代码如下,报 ```markdown Runtime Error. Received signal 8: Floating-point exception. ``` 代码如下,求大佬给看看,是哪错了,在线等 ```cpp #include using namespace std; const int maxn = 5e…
这个题我在atcoder上提交WA:12个点,思路没啥问题。很郁闷!哪位大佬给看看。 ```cpp #include using namespace std; const int maxn = 2e5 + 5; int T, n, a[maxn], b[maxn], c[maxn]; void solve() { ci…
```cpp int Find(int x) { // if (fa[x] == x) { // return x; // } // fa[x] = Find(fa[x]); // return fa[x]; return fa[x] == x ? x : fa[x] = Find(fa[x]); } ``` 在上述代…
提示是在 query的if (l using namespace std; const int maxn = 2e5 + 5; #define ls u 0 ? 1 : 0; t[u].val[1] = b[l] > 1; build(ls, l, mid); build(rs, mid + 1, r); push_u…
rt,用的是重链剖分,代码如下 ```cpp #include using namespace std; const int maxn = 3e4 + 5; #define ls u > 1; build(ls, l, mid); build(rs, mid + 1, r); push_up(u); } void mo…
在讨论《关于莫队分块块长RE问题》回复:
感谢感谢,此贴结
```cpp // int len = sqrt(1ll * n * n / m); // int len = n / (sqrt(m)); int len = sqrt(n); ``` 原题为[AT_abc293_g](https://www.luogu.com.cn/problem/AT_abc293_g),此题中…
# AC 自动机 AC 自动机这个东西折磨了我好久,第一次写文章,记录一下,如有哪里笔误请在评论区留言,轻喷 QAQ。 ## 引言 - 这是一种用于多个字符串与同一个文本串匹配的算法,整体运用到了 kmp 和字典树的思想。 ## 实现 ### 定义 ```cpp struct node { int fail; // 失…
```cpp #include using namespace std; const int maxn = 2e5 + 5; #define ls t[u].ch[0] #define rs t[u].ch[1] int root, tot; struct node { int ch[2]; int fa, val,…
求调!样例过了,但提交12TLE,5个RE,竟然一个没过,郁闷 ```cpp #include using namespace std; #define it set :: iterator const int maxn = 5e5 + 5; struct node{ int l, r; mutable int val…
第二个样例下下来是能过的,没有出现RE情况,但交上去就炸 ```cpp #include using namespace std; #define ls u > 1; build(ls, l, mid); build(rs, mid + 1, r); t[u] = push_up(t[ls], t[rs]); } vo…
在讨论《关于复赛部分变量声明问题求助》回复:
感谢回复,主要是用惯了cin,cout到了考场上习惯性改不过来,快读平时也不用怕记不住