[2023牛客多校7 F] Counting Sequences (生成函数 多项式快速幂)

news/2023/11/28 1:01:49

题意

计算满足下列条件长度为 n n n 的序列 ( a 1 , a 2 , ⋯ , a n ) (a_1,a_2,\cdots,a_n) (a1,a2,,an) 的个数。

  • 对于 1 ≤ i ≤ n 1 \le i \le n 1in 满足 0 ≤ a i ≤ 2 m 0 \le a_i \le 2 ^ m 0ai2m
  • ∑ i = 1 n cnt 1 ( a i ⊕ b i ) = k \sum\limits_{i = 1} ^ {n} \text{cnt}_1(a_i \oplus b_i) = k i=1ncnt1(aibi)=k

其中序列 b b b ( a 2 , a 3 , ⋯ , a n , a 1 ) (a_2,a_3,\cdots,a_n,a_1) (a2,a3,,an,a1) cnt 1 ( x ) \text{cnt}_1(x) cnt1(x) 代表 x x x 二进制中 1 1 1 的个数。

998 244 353 998\,244\,353 998244353 取模。

2 ≤ n < 998 244 353 , 1 ≤ m ≤ 1 0 8 , 1 ≤ k ≤ 5 × 1 0 4 2 \le n < 998\,244\,353, 1 \le m \le 10 ^ 8,1 \le k \le 5\times 10 ^ 4 2n<998244353,1m108,1k5×104

分析:

首先观察第二个条件,由于每一位是独立的,考虑拆位。

统计 m m m 位中每一位对答案的贡献,记 a i = ∑ j = 0 m − 1 c i j × 2 j a_i = \sum\limits_{j = 0} ^ {m - 1} c_{ij} \times 2 ^ j ai=j=0m1cij×2j,其中 c i j c_{ij} cij 表示 a i a_i ai 二进制的第 j j j 位。

那么对第 j j j 位来说,只需要知道序列 ( c 1 j ⊕ c 2 j , c 2 j ⊕ c 3 j , ⋯ , c ( n − 1 ) j ⊕ c n j , c n j ⊕ c 1 j ) (c_{1j} \oplus c_{2j},c_{2j} \oplus c_{3j},\cdots, c_{(n - 1)j} \oplus c_{nj}, c_{nj} \oplus c_{1j}) (c1jc2j,c2jc3j,,c(n1)jcnj,cnjc1j) 中产生若干个 1 1 1 的方案数。

下面简单证一下序列中只可能包含偶数个 1 1 1

c p j ⊕ c q j = 1 c_{pj} \oplus c_{qj} = 1 cpjcqj=1 等价于 c p j ≠ c q j c_{pj} \ne c_{qj} cpj=cqj

c p j ⊕ c q j = 0 c_{pj} \oplus c_{qj} = 0 cpjcqj=0 等价于 c p j = c q j c_{pj} = c_{qj} cpj=cqj

所以问题等价于在 01 01 01 环选择 u u u 条边使相邻点的值不相等,那么剩下 n − u n - u nu 条边使得相邻点的值相等。

由于相等边不改变值,所以我们可以将不相等边构成的连通块缩成一个连通块,也就是将相等边构成连通块的两边节点合并到一起。

此时问题变为二分图染色问题,我们知道二分图染色奇数环是不可行的,所以环大小必定为偶数,由此推出 1 1 1 必须为偶数个。

那么得到 2 u 2u 2u 1 1 1 的方案数就为 ( n 2 u ) \dbinom{n}{2u} (2un),考虑每一位的生成函数

F ( x ) = ∑ u = 0 ⌊ n 2 ⌋ ( n 2 u ) x u F(x) = \sum_{u = 0} ^ {\lfloor \frac{n}{2} \rfloor } \binom{n}{2u}x ^ u F(x)=u=02n(2un)xu

由于每一位独立,所以 m m m 个生成函数都相等,所以答案为

[ x k ] F m ( x ) [x ^ k] F^ m(x) [xk]Fm(x)

由于 n < 998 244 353 n < 998\,244\,353 n<998244353 ,但 k ≤ 5 × 1 0 4 k \le 5\times 10 ^ 4 k5×104,所以 F ( x ) F(x) F(x) 至多算到第 k k k 项,那么 ( n 2 u ) \dbinom{n}{2u} (2un) 经典维护下降幂。最后使用多项式快速幂求解即可。

代码:

#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
constexpr int mod = 998244353;
template<class T>
T power(T a, int b) {T res = 1;for (; b; b /= 2, a *= a) {if (b % 2) {res *= a;}}return res;
}
template<int mod>
struct ModInt {int x;ModInt() : x(0) {}ModInt(i64 y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}ModInt &operator+=(const ModInt &p) {if ((x += p.x) >= mod) x -= mod;return *this;}ModInt &operator-=(const ModInt &p) {if ((x += mod - p.x) >= mod) x -= mod;return *this;}ModInt &operator*=(const ModInt &p) {x = (int)(1LL * x * p.x % mod);return *this;}ModInt &operator/=(const ModInt &p) {*this *= p.inv();return *this;}ModInt operator-() const {return ModInt(-x);}ModInt operator+(const ModInt &p) const {return ModInt(*this) += p;}ModInt operator-(const ModInt &p) const {return ModInt(*this) -= p;}ModInt operator*(const ModInt &p) const {return ModInt(*this) *= p;}ModInt operator/(const ModInt &p) const {return ModInt(*this) /= p;}bool operator==(const ModInt &p) const {return x == p.x;}bool operator!=(const ModInt &p) const {return x != p.x;}ModInt inv() const {int a = x, b = mod, u = 1, v = 0, t;while (b > 0) {t = a / b;swap(a -= t * b, b);swap(u -= t * v, v);}return ModInt(u);}ModInt pow(i64 n) const {ModInt res(1), mul(x);while (n > 0) {if (n & 1) res *= mul;mul *= mul;n >>= 1;}return res;}friend ostream &operator<<(ostream &os, const ModInt &p) {return os << p.x;}friend istream &operator>>(istream &is, ModInt &a) {i64 t;is >> t;a = ModInt<mod>(t);return (is);}int val() const {return x;}static constexpr int val_mod() {return mod;}
};
using Z = ModInt<mod>;
vector<Z> fact, infact;
void init(int n) {fact.resize(n + 1), infact.resize(n + 1);fact[0] = infact[0] = 1;for (int i = 1; i <= n; i ++) {fact[i] = fact[i - 1] * i;}infact[n] = fact[n].inv();for (int i = n; i; i --) {infact[i - 1] = infact[i] * i;}
}
Z C(int n, int m) {if (n < 0 || m < 0 || n < m) return Z(0);return fact[n] * infact[n - m] * infact[m];
}
vector<int> rev;
vector<Z> roots{0, 1};
void dft(vector<Z> &a) {int n = a.size();if (int(rev.size()) != n) {int k = __builtin_ctz(n) - 1;rev.resize(n);for (int i = 0; i < n; i ++) {rev[i] = rev[i >> 1] >> 1 | (i & 1) << k;}}for (int i = 0; i < n; i ++) {if (rev[i] < i) {swap(a[i], a[rev[i]]);}}if (int(roots.size()) < n) {int k = __builtin_ctz(roots.size());roots.resize(n);while ((1 << k) < n) {Z e = power(Z(3), (mod - 1) >> (k + 1));for (int i = 1 << (k - 1); i < (1 << k); i ++) {roots[i << 1] = roots[i];roots[i << 1 | 1] = roots[i] * e;}k ++;}}for (int k = 1; k < n; k *= 2) {for (int i = 0; i < n; i += 2 * k) {for (int j = 0; j < k; j ++) {Z u = a[i + j], v = a[i + j + k] * roots[k + j];a[i + j] = u + v, a[i + j + k] = u - v;}}}
}
void idft(vector<Z> &a) {int n = a.size();reverse(a.begin() + 1, a.end());dft(a);Z inv = (1 - mod) / n;for (int i = 0; i < n; i ++) {a[i] *= inv;}
}
struct Poly {vector<Z> a;Poly() {}Poly(const vector<Z> &a) : a(a) {}Poly(const initializer_list<Z> &a) : a(a) {}int size() const {return a.size();}void resize(int n) {a.resize(n);}Z operator[](int idx) const {if (idx < size()) {return a[idx];} else {return 0;}}Z &operator[](int idx) {return a[idx];}Poly mulxk(int k) const {auto b = a;b.insert(b.begin(), k, 0);return Poly(b);}Poly modxk(int k) const {k = min(k, size());return Poly(vector<Z>(a.begin(), a.begin() + k));}Poly divxk(int k) const {if (size() <= k) {return Poly();}return Poly(vector<Z>(a.begin() + k, a.end()));}friend Poly operator+(const Poly &a, const Poly &b) {vector<Z> res(max(a.size(), b.size()));for (int i = 0; i < int(res.size()); i ++) {res[i] = a[i] + b[i];}return Poly(res);}friend Poly operator-(const Poly &a, const Poly &b) {vector<Z> res(max(a.size(), b.size()));for (int i = 0; i < int(res.size()); i ++) {res[i] = a[i] - b[i];}return Poly(res);}friend Poly operator*(Poly a, Poly b) {if (a.size() == 0 || b.size() == 0) {return Poly();}int sz = 1, tot = a.size() + b.size() - 1;while (sz < tot) {sz *= 2;}a.a.resize(sz);b.a.resize(sz);dft(a.a);dft(b.a);for (int i = 0; i < sz; i ++) {a.a[i] = a[i] * b[i];}idft(a.a);a.resize(tot);return a;}friend Poly operator*(Z a, Poly b) {for (int i = 0; i < int(b.size()); i ++) {b[i] *= a;}return b;}friend Poly operator*(Poly a, Z b) {for (int i = 0; i < int(a.size()); i ++) {a[i] *= b;}return a;}Poly &operator+=(Poly b) {return (*this) = (*this) + b;}Poly &operator-=(Poly b) {return (*this) = (*this) - b;}Poly &operator*=(Poly b) {return (*this) = (*this) * b;}Poly deriv() const {if (a.empty()) {return Poly();}vector<Z> res(size() - 1);for (int i = 0; i < size() - 1; i ++) {res[i] = a[i + 1] * (i + 1);}return Poly(res);}Poly integr() const {vector<Z> res(size() + 1);for (int i = 0; i < size(); i ++) {res[i + 1] = a[i] / (i + 1);}return Poly(res);}Poly inv(int m) const {Poly x{a[0].inv()};int k = 1;while (k < m) {k *= 2;x = (x * (Poly{2} - modxk(k) * x)).modxk(k);}return x.modxk(m);}Poly log(int m) const {return (deriv() * inv(m)).integr().modxk(m);}Poly exp(int m) const {Poly x{1};int k = 1;while (k < m) {k *= 2;x = (x * (Poly{1} - x.log(k) + modxk(k))).modxk(k);}return x.modxk(m);}Poly pow(int k, int m) const {int i = 0;while (i < size() && a[i].val() == 0) {i ++;}if (i == size() || 1LL * i * k >= m) {return Poly(vector<Z>(m));}Z v = a[i];auto f = divxk(i) * v.inv();return (f.log(m - i * k) * k).exp(m - i * k).mulxk(i * k) * power(v, k);}Poly sqrt(int m) const {Poly x{1};int k = 1;while (k < m) {k *= 2;x = (x + (modxk(k) * x.inv(k)).modxk(k)) * ((mod + 1) / 2);}return x.modxk(m);}Poly mulT(Poly b) const {if (b.size() == 0) {return Poly();}int n = b.size();reverse(b.a.begin(), b.a.end());return ((*this) * b).divxk(n - 1);}vector<Z> eval(vector<Z> x) const {if (size() == 0) {return vector<Z>(x.size(), 0);}const int n = max(int(x.size()), size());vector<Poly> q(n << 2);vector<Z> ans(x.size());x.resize(n);function<void(int, int, int)> build = [&](int p, int l, int r) {if (r - l == 1) {q[p] = Poly{1, -x[l]};} else {int m = l + r >> 1;build(p << 1, l, m);build(p << 1 | 1, m, r);q[p] = q[p << 1] * q[p << 1 | 1];}};build(1, 0, n);function<void(int, int, int, const Poly &)> work = [&](int p, int l, int r, const Poly &num) {if (r - l == 1) {if (l < int(ans.size())) {ans[l] = num[0];}} else {int m = (l + r) / 2;work(p << 1, l, m, num.mulT(q[p << 1 | 1]).modxk(m - l));work(p << 1 | 1, m, r, num.mulT(q[p << 1]).modxk(r - m));}};work(1, 0, n, mulT(q[1].inv(n)));return ans;}Poly inter(const Poly &y) const {vector<Poly> Q(a.size() << 2), P(a.size() << 2);function<void(int, int, int)> dfs1 = [&](int p, int l, int r) {int m = l + r >> 1;if (l == r) {Q[p].a.push_back(-a[m]);Q[p].a.push_back(Z(1));return;}dfs1(p << 1, l, m), dfs1(p << 1 | 1, m + 1, r);Q[p] = Q[p << 1] * Q[p << 1 | 1];};dfs1(1, 0, a.size() - 1);Poly f;f.a.resize((int)(Q[1].size()) - 1);for (int i = 0; i + 1 < Q[1].size(); i ++) {f[i] = Q[1][i + 1] * (i + 1);}Poly g = f.eval(a);function<void(int, int, int)> dfs2 = [&](int p, int l, int r) {int m = l + r >> 1;if (l == r) {P[p].a.push_back(y[m] * power(g[m], mod - 2));return;}dfs2(p << 1, l, m), dfs2(p << 1 | 1, m + 1, r);P[p].a.resize(r - l + 1);Poly A = P[p << 1] * Q[p << 1 | 1];Poly B = P[p << 1 | 1] * Q[p << 1];for (int i = 0; i <= r - l; i ++) {P[p][i] = A[i] + B[i];}};dfs2(1, 0, a.size() - 1);return P[1];}
};
Poly toFPP(vector<Z> &a) {int n = a.size();vector<Z> b(n);iota(b.begin(), b.end(), 0);auto F = Poly(a).eval(b);vector<Z> f(n), g(n);for (int i = 0, sign = 1; i < n; i ++, sign *= -1) {f[i] = F[i] * infact[i];g[i] = Z(sign) * infact[i];}return Poly(f) * Poly(g);
}
Poly toOP(vector<Z> &a) {int n = a.size();vector<Z> g(n);for (int i = 0; i < n; i ++) {g[i] = infact[i];}auto F = Poly(a) * Poly(g);for (int i = 0; i < n; i ++) {F[i] *= fact[i];}vector<Z> p(n);iota(p.begin(), p.end(), 0);return Poly(p).inter(F);
}
Poly FPPMul(Poly a, Poly b) {int n = a.size() + b.size() - 1;Poly p;p.resize(n);for (int i = 0; i < n; i ++) {p[i] = infact[i];}a *= p, b *= p;for (int i = 0; i < n; i ++) {a[i] *= b[i] * fact[i];}for (int i = 1; i < n; i += 2) {p[i] = -p[i];}a *= p;a.resize(n);return a;
}
Poly Lagrange2(vector<Z> &f, int m, int k) {int n = f.size() - 1;vector<Z> a(n + 1), b(n + 1 + k);for (int i = 0; i <= n; i ++) {a[i] = f[i] * ((n - i) & 1 ? -1 : 1) * infact[n - i] * infact[i];}for (int i = 0; i <= n + k; i ++) {b[i] = Z(1) / (m - n + i);}Poly ans = Poly(a) * Poly(b);for (int i = 0; i <= k; i ++) {ans[i] = ans[i + n];}ans.resize(k + 1);Z sum = 1;for (int i = 0; i <= n; i ++) {sum *= m - i;}for (int i = 0; i <= k; i ++) {ans[i] *= sum;sum *= Z(m + i + 1) / (m - n + i);}return ans;
}
Poly Chirp_Z_Transform(vector<Z> &a, int c, int m) {int n = a.size();a.resize(n + m - 1);Poly f, g;f.resize(n + m - 1), g.resize(n + m - 1);for (int i = 0; i < n + m - 1; i ++) {f[n - 1 + m - 1 - i] = power(Z(c), i * (i - 1LL) / 2 % (mod - 1));g[i] = power(Z(c), mod - 1 - i * (i - 1LL) / 2 % (mod - 1)) * a[i];}Poly res = f * g, ans;ans.resize(m);for (int i = 0; i < m; i ++) {ans[i] = res[n - 1 + m - 1 - i] * power(Z(c), mod - 1 - i * (i - 1LL) / 2 % (mod - 1));}return ans;
}
Poly S2_row;
void S2_row_init(int n) {vector<Z> f(n + 1), g(n + 1);for (int i = 0; i <= n; i ++) {f[i] = power(Z(i), n) * infact[i];g[i] = Z(i & 1 ? -1 : 1) * infact[i];}S2_row = Poly(f) * Poly(g);
}
Poly S2_col;
void S2_col_init(int n, int k) {n ++;vector<Z> f(n);for (int i = 1; i < n; i ++) {f[i] = infact[i];}auto ans = Poly(f).pow(k, n);S2_col.resize(n + 1);for (int i = 0; i < n; i ++) {S2_col[i] = ans[i] * fact[i] * infact[k];}
}
Poly Bell;
void Bell_init(int n) {vector<Z> f(n + 1);for (int i = 1; i <= n; i ++) {f[i] = infact[i];}auto ans = Poly(f).exp(n + 1);Bell.resize(n + 1);for (int i = 0; i <= n; i ++) {Bell[i] = ans[i] * fact[i];}
}
vector<Z> p;
void p_init(int n) {vector<int> f(n + 1);p.resize(n + 1);p[0] = 1;f[0] = 1, f[1] = 2, f[2] = 5, f[3] = 7;for (int i = 4; f[i - 1] <= n; i ++) {f[i] = 3 + 2 * f[i - 2] - f[i - 4];}for (int i = 1; i <= n; i ++) {for (int j = 0; f[j] <= i; j ++) {p[i] += Z(j & 2 ? -1 : 1) * p[i - f[j]];}}
}
Poly P;
void p_init(int n, int m) {vector<Z> a(n + 1);for (int i = 1; i <= m; i ++) {for (int j = i; j <= n; j += i) {a[j] += Z(j / i).inv();}}P = Poly(a).exp(n + 1);
}
signed main() {cin.tie(0) -> sync_with_stdio(0);int n, m, k;cin >> n >> m >> k;int sz = min(n, k);Poly f;f.resize(sz + 1);f[0] = 2;Z fsum = 1, fn = n;for (int i = 1; i <= sz; i ++) {fsum = fsum * fn / i;f[i] = i & 1 ? Z(0) : fsum * 2;fn -= 1;}cout << f.pow(m, k + 1)[k] << "\n";
}

http://www.ppmy.cn/news/1014337.html

相关文章

WDM设备栈

图 1一块USB主控制器卡&#xff08;主控芯片为VIA VL805&#xff09; 图中的板卡包含USB主控制器&#xff08;USB Host Controller&#xff09;、USB集线器&#xff08;USB Hub&#xff09;&#xff0c;这里USB集线器扩展了4个USB端口&#xff08;USB Port&#xff09;。 PCI…

四十八.图卷积网络(GCN)

1.卷积神经网络 CNN 在图像识别等任务中具有重要作用&#xff0c;主要是因为 CNN 利用了图片&#xff08;信号&#xff09;在其域中的局部平移不变性。由于图结构不存在平移不变性&#xff0c;所以 CNN 无法直接在图上进行卷积。 1.1局部平移不变性 CNN 之所以能成为图像领域…

uni——不规则tab切换(skew)

案例展示 案例代码 <!-- 切换栏 --> <view class"tabBoxs"><view class"tabBox"><block v-for"(item,index) in tabList" :key"index"><view class"tabItem":class"current item.id&…

Bytebase 2.5.0 - VCS 集成支持 Azure DevOps,支持达梦数据库

&#x1f680; 新功能 VCS 集成支持 Azure DevOps。研发版本支持达梦数据库。允许用户设置需要重新登录的频率。支持选择并导出数据库变更历史。新增 MySQL Schema 设计器。支持字段模板库。 &#x1f384; 改进 在 SQL 编辑器中&#xff0c;优化 MongoDB 的查询结果。优化 …

鉴源论坛·观模丨汽车电子ISO 26262: 2018标准概述(二)

作者 | 郭建 上海控安可信软件创新研究院特聘专家 版块 | 鉴源论坛 观模 摘要&#xff1a;安全在汽车研发中是关键要素之一&#xff0c;辅助驾驶、车辆的动态控制等功能的研发和集成都需要加强安全系统研发&#xff0c;同时&#xff0c;需要为满足所有预期的安全目标提供证据…

ensp与虚拟机搭建测试环境

1.虚拟机配置 ①首先确定VMnet8 IP地址&#xff0c;若要修改IP地址&#xff0c;保证在启动Ensp前操作 ②尽量保证NAT模式 2.ensp配置 (1)拓扑结构 (2)Cloud配置 ①首先点击 绑定信息 UDP → 增加 ②然后点击 绑定信息 VMware ... → 增加 ③最后在 端口映射设置上点击双向通…

【有关数据库的编码格式和导出备份】

问题1&#xff1a;前端页面可以正常插入数据到数据库mysql中&#xff0c;但是却显示不了数据库中的数据内容&#xff1f; 分析&#xff1a;通过尝试&#xff0c;当数据插入的全部都是英文时&#xff0c;可以正常显示数据&#xff0c;但是出现中文时&#xff0c;则连带着全部数…

【C++11】右值引用 | 移动语义

文章目录 一.基本概念1.左值 && 右值2.左值引用 && 右值引用 二.右值引用使用场景和意义1.左值引用的使用场景2.左值引用的短板3.右值引用和移动语义4.右值引用引用左值5.右值引用的其他使用场景 三.完美转发1.万能引用2.完美转发保持值的属性3.完美转发的使用…

CMMI各等级认证适用哪些领域?

CMMI是世界公认的软件产品进入国际市场的通行证&#xff0c;不仅是对产品质量的认证&#xff0c;更是一种软件过程改善的途径。如果一家公司最终通过CMMI的评估认证&#xff0c;标志着该公司在质量管理的能力已经上升到一个新的高度。而认证的等级越高&#xff0c;意味着公司质…

云知识库软件的推荐清单,你看看你喜欢哪一个?

在选择云知识库软件时&#xff0c;有很多因素需要考虑&#xff0c;如功能、易用性、可定制性、安全性、价格等。下面是一些我喜欢的云知识库软件推荐清单&#xff1a; Confluence&#xff1a; Confluence是一款由Atlassian开发的知识管理和协作工具。它提供了强大的编辑和协作…

【我们一起60天准备考研算法面试(大全)-第三十八天 38/60】【哈希表】

专注 效率 记忆 预习 笔记 复习 做题 欢迎观看我的博客&#xff0c;如有问题交流&#xff0c;欢迎评论区留言&#xff0c;一定尽快回复&#xff01;&#xff08;大家可以去看我的专栏&#xff0c;是所有文章的目录&#xff09;   文章字体风格&#xff1a; 红色文字表示&#…

rust实践-异步并发socket通信

客户端 [package] name = "rust_client" version = "0.1.0" edition = "2021"[dependencies] tokio = {version = "1.14.0", features = ["full"] }use tokio::io::{self, AsyncReadExt, AsyncWriteExt}; use tokio::net::…

Windows环境利用QT+CMake编译mingw版本的opencv

Opencv官网没有提供mingw版本的opencv库&#xff0c;所以需要自己编译&#xff0c;下面是编译过程&#xff0c;32位64位方法类似。 可以直接下载编译好的mingw版本opencv4.4&#xff1a; 使用CMAKE3.22QT5.13编译后的opencv4.4&#xff08;32位的&#xff09;资源-CSDN文库 …

echart 词云 避坑

let myWordCloudChart this.$echarts.init(document.getElementById("xxx"));let option {title: {text: ,x: center},backgroundColor: ,//浮窗tooltip: {trigger: item,padding: [10, 15],textStyle: {fontSize: 18},formatter: params > {const { name, valu…

java扩容

1.数组的扩容 1.1 第一种方式 平平无奇直接按照下标赋值 Testvoid dilationArray() {int[] oldArr {1,2,3,4};int[] nowArr new int[7];for (int i 0 ; i < oldArr.length ; i){nowArr[i] oldArr[i];}System.out.println(Arrays.toString(nowArr));//[1, 2, 3, 4, 0, …

封装上传文件组件(axios,进度条onUploadProgress,取消请求)

目录 定时模拟进度条 方法 A.axios B.xhr 取消请求​​​​​​​ 完整代码 A.自定义上传组件 B.二次封装组件 情况 增加cancelToken不生效&#xff0c;刷新页面 进度条太快->设置浏览器网速 定时模拟进度条 startUpload() {if (!this.file) return;const totalS…

Gson 添加数据默认值问题记录

问题&#xff1a;在用Gson add(key&#xff08;string类型&#xff09;&#xff0c;value&#xff08;必须是JsonElement子类&#xff09;&#xff09;时发现&#xff0c;value 传了 "" 空字符串&#xff08;非null&#xff09;&#xff0c;默认解析后返回null&#…

计算机网络(7) --- UDP协议和TCP协议

计算机网络&#xff08;6&#xff09; --- https协议_哈里沃克的博客-CSDN博客https协议https://blog.csdn.net/m0_63488627/article/details/132112683?spm1001.2014.3001.5501 目录 1.补充知识 1.PORT端口号 2.端口号范围划分 3.知名端口号 2.UDP协议 1.UDP报头 2.U…

【力扣】2810. 故障键盘 <模拟>

【力扣】2810. 故障键盘 你的笔记本键盘存在故障&#xff0c;每当你在上面输入字符 ‘i’ 时&#xff0c;它会反转你所写的字符串。而输入其他字符则可以正常工作。给你一个下标从 0 开始的字符串 s &#xff0c;请你用故障键盘依次输入每个字符。返回最终笔记本屏幕上输出的字…

基于JavaWeb的家居电子商城管理系统

家居电子商城HOMEECMS 大二下的JavaWeb小学期课程写的一个家居电子商城管理系统&#xff0c;没有spring框架&#xff0c;纯servlet&#xff0c;线上家居电子商城系统&#xff0c;主要实现了用户注册&#xff0c;登录、浏览&#xff0c;查看家居商品信息&#xff0c;购物车&…
最新文章