1.1k1 分钟

最长公共子序列考虑到元素各异,变成最上不降子序列 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; cons
1.6k1 分钟

有点吉司机线段树的味 #include<bits/stdc++.h> using namespace std; using ll=long long; const int maxn=1e5+9; struct Node{ ll l,r,v,ma; }tr[maxn<<2]; ll n,m,a[maxn]; void build (int l,int r,int tot){ if(l==r){ tr[tot].v=tr[tot].
1.2k1 分钟

#include<bits/stdc++.h> using namespace std; using ll =long long ; const int maxn=5e5+9; struct Node{ int l,r,v; }tr[maxn<<2]; int gcd(int ma,int mi){return mi?gcd(mi,ma%mi):ma;} int a[maxn],n,m,cnt; void build(int l,int r,int now){
1.5k1 分钟

有思路但老是被否,自己却难以implement #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const
1.4k1 分钟

乱搞 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln = 2.