这个家伙不懒,什么都留下了
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《求问闭关》回复:
可能溢出
```cpp #include using namespace std; struct Trie{ int n=0; int son[300005][35]; int num[300005]; void insert(string s,int p=0){ for(auto x:s){ int real=x-'a'; i…
```cpp #include using namespace std; int fail[1000005]; void get_fail(string t){ fail[0]=0; for(int i=1;i >n; string s; cin>>s; get_fail(s); cout<<n-fail[n-1]<<…
在讨论《关于 CSP2 准考证》回复:
不行,空的
我们对违反团规采取**0容忍**态度。 请不要在团队的讨论区发**无意义**的帖。 请**不要违法法律**和洛谷社区规则。 请**尊重**团内的所有人。 团内成员的对错**不需要**普通成员来判断,如有需要,请**私信**向管理员举报,但请**不要公开**。 请不要假冒管理员。 请保持**积极向上**的态度,不要作弊,…
``` #include using namespace std; int a[255]; int s[255]; int d[255]; int dp[255][255]; int main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); memset(dp,…
```cpp #include #define ll l #define lr ((l+r)>>1) #define rl ((l+r)>>1)+1 #define rr r #define ls id ma=max(max(L->ma,R->ma),L->MFR+R->MFL); F->MFL=L->MFL+(L->…
[洛谷:CF1611E2](https://www.luogu.com.cn/problem/CF1611E2) [Codeforces:1611-E2](https://codeforces.com/problemset/problem/1611/E2) # 题意 现在有一棵树,其中 `1` 号节点是树根,树上边都是…
``` #include using namespace std; int main(){ int n; cin>>n; while(n--){ string s1,s2; cin>>s1>>s2; if(s1.size()>s2.size())swap(s1,s2); if(s2.size()-s1.size()>1…
``` #include using namespace std; pair p11[100005]; pair p21[100005]; int main(){ int a11=0,b11=0,id11=0; int a21=0,b21=0,id21=0; while(true){ char c; cin>>c; i…
在讨论《#4#22等WA,50分求调》回复:
@[Langke_Saonian](luogu://user/1237546)有什么建议的方式?
WA了#4#5#8#11#13#22 ``` #include using namespace std; const int N=4e6+5; int ne[N],to[N],he[N],df[N],ba[N],fr[N],st[N];//next,to,head,dfs,back,from,stack bool v[…
代码: ```cpp #include using namespace std; const int N=1e3+5; bool v[N][N]; bool w[N][N]; int way[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; bool OK(int x,int y,int n,int…
# 有没有大佬能帮忙解一下这道题 题目描述 有多少个长为的整数序列,满足所有数的绝对值都≤m,且最大子段和为k。答案对998244353取模。 一个序列A1,A2,...,Al的最大子段和定义为:选择两个数ij满足1≤i≤j≤l,能够得到的最大的Ai+A(i+1)+...+Aj的值。 输入描述 一行三个整数n,m,k。…