摘要: Ice Cream Shop 题目描述 On a beach there are n huts in a perfect line, hut 1 being at the left and hut i+1 being 100 meters to the right o 阅读全文
posted @ 2024-12-12 02:05 lrj124 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 多维数组声明 // 含有 2 个【含有 3 个 int 元素的数组】元素的数组 int a[2][3] = {{1, 2, 3}, {4, 5, 6}}; // 可视作 2 × 3 矩阵,布局以行为主 int b[2][3][4] = {{{1, 2, 3},{4, 5, 6},{7, 8, 9}} 阅读全文
posted @ 2024-10-20 18:42 lrj124 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 题目描述 An identity permutation of length n is an array [1,2,3,,n]. We performed the following operations to an identity permutation of len 阅读全文
posted @ 2021-10-05 17:02 lrj124 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 题目描述 首先村落里的一共有 n 座房屋,并形成一个树状结构。然后救济粮分 m 次发放,每次选择两个房屋 (x, y),然后对于 xy的路径上(含 xy)每座房子里发放一袋 z 类型的救济粮。 然后深绘里想知道,当所有的救济粮发 阅读全文
posted @ 2021-08-28 16:16 lrj124 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Simpson 公式 lrf(x)dxrl6[f(l)+4f(l+r2)+f(r)] Simpson 公式将 (l,f(l)),(r,f(r)),(l+r2,f(l+r2)) 看作一 阅读全文
posted @ 2021-08-15 11:53 lrj124 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 题目描述 You have an array a consisting of n distinct positive integers, numbered from 1 to n . Define pk as \(p_k = \sum_{1 \le i, j 阅读全文
posted @ 2021-07-27 15:48 lrj124 阅读(94) 评论(0) 推荐(0) 编辑
摘要: for (int i = 1;i <= n;i++) for (int j = 1;j <= n/i;j++) ... 是调和级数级别的复杂度,可以由调和级数近似求和公式得到 T(n)=ni=1n1n=O(nlnn) 具体过程如下 $$\begin{ 阅读全文
posted @ 2021-07-25 17:48 lrj124 阅读(753) 评论(0) 推荐(1) 编辑
摘要: 题目描述 小 C 正在玩一个移球游戏,他面前有 n+1 根柱子,柱子从 1n+1 编号,其中 1 号柱子、2 号柱子、……、n 号柱子上各有 m 个球,它们自底向上放置在柱子上,n+1 号柱子上初始时没有球。这 \(n \t 阅读全文
posted @ 2021-06-22 12:01 lrj124 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 题目描述 LiLand is a country, consisting of n cities. The cities are numbered from 1 to n . The country is well known because it has a very st 阅读全文
posted @ 2021-02-18 23:16 lrj124 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 差分约束可以求出这样的不等式组的 {xi} 的一组整数解 xa1xb1c1xa2xb2c2xanxbncn 对于一个不等式可以移个项 \(x_{a_i 阅读全文
posted @ 2021-02-17 23:18 lrj124 阅读(190) 评论(0) 推荐(1) 编辑
点击右上角即可分享
微信分享提示