摘要: 发现有时候直接在站内用搜索功能会抽风…一边翻博客一边整理一下(方便自己找了属于是) 数学相关: 埃氏筛复杂度:https://www.cnblogs.com/yoshinow2001/p/14610848.html 数学问题杂项:https://www.cnblogs.com/yoshinow200 阅读全文
posted @ 2023-09-19 21:17 yoshinow2001 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 有趣的数学题 这篇博文应该会持续更新,记录一些我在各种地方看到的有意思的数学问题/证明。 存在连续的1000个数恰好有5个素数 如何证明存在1000个连续的自然数中恰好有5个素数? (来自知乎问题https://www.zhihu.com/question/369220695下@demo256的回答 阅读全文
posted @ 2021-04-14 22:45 yoshinow2001 阅读(581) 评论(3) 推荐(0) 编辑
摘要: “总感觉这题是诈骗题…” link:https://codeforces.com/contest/1948/problem/F [!题意] 有 \(n\) 个袋子,每个袋子有 \(a_i\) 个金币, \(b_i\) 个银币,金币的价格固定是 \(1\) ,每个银币的价格服从 \(B(1,\frac 阅读全文
posted @ 2024-03-27 21:26 yoshinow2001 阅读(3) 评论(0) 推荐(0) 编辑
摘要: link:https://codeforces.com/contest/703/problem/D 题意: 给一个序列 \(a_1,\dots,a_n\),有 \(m\) 次询问,每次问一段区间 \([l,r]\) 内出现偶数次的数的异或和,\(1\leq n,m\leq 10^6\)。 偶数次异或 阅读全文
posted @ 2024-03-25 00:38 yoshinow2001 阅读(1) 评论(0) 推荐(0) 编辑
摘要: link:https://codeforces.com/contest/1946/problem/F 题意:给一个长度为 \(n\) 的排列 \(a\),有 \(q\) 个询问,每次问 \([l,r]\) 内有多少子序列 \(t_1,\dots,t_k\) 满足: \(l\leq t_1<\dots 阅读全文
posted @ 2024-03-23 01:54 yoshinow2001 阅读(8) 评论(0) 推荐(0) 编辑
摘要: link:https://codeforces.com/contest/938/problem/G [!Description] 有一张连通的无向图简单图,三种操作: 1、加边\((x,y,d)\) 2、删边\((x,y)\) 3、询问 \(x\to y\) 的路径中异或最小的路径(不一定是简单路径 阅读全文
posted @ 2024-03-22 19:29 yoshinow2001 阅读(1) 评论(0) 推荐(0) 编辑
摘要: link:https://codeforces.com/contest/938/problem/E 题意:给一个序列 \(a\) ,按如下方式计算 \(f_a\): 初始 \(f_a=0,M=1\) 对每个 \(2\leq i\leq n\),如果 \(a_M<a_i\),\(f_a\to f_a+ 阅读全文
posted @ 2024-03-21 12:09 yoshinow2001 阅读(5) 评论(1) 推荐(0) 编辑
摘要: link:https://codeforces.com/contest/765/problem/F 据说是典中典问题(出现三次了) 题意:给一个序列 \(a_1,\dots,a_n\),有 \(m\) 次询问,每次询问给 \(l,r(1\leq l<r\leq n)\)问 \(\min_{l\leq 阅读全文
posted @ 2024-03-20 19:50 yoshinow2001 阅读(1) 评论(0) 推荐(0) 编辑
摘要: link:https://codeforces.com/contest/1514/problem/D 很久以前小号打的场了,当时D题写的莫队,现在重新来看看。 题意:给一个序列 \([a_1,\dots,a_n]\),有q次询问,每次问:把\([a_l,\dots,a_r]\) 划分最少几个不相交子 阅读全文
posted @ 2024-03-18 18:52 yoshinow2001 阅读(3) 评论(0) 推荐(0) 编辑
摘要: link:https://codeforces.com/gym/104065/problem/E 题意:\(n\) 个城市由 \(m\) 条边连成一张无向图,每个点所属连通块大小至少是2。接下来有 \(q\) 次危机,每次危机恰发生在一个城市 \(x\),需要所有在 \(x\) 城市的所有居民迁移到 阅读全文
posted @ 2024-03-17 22:50 yoshinow2001 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1938 给一棵有根树,执行以下代码: let L be an empty array for x = 1 to n for y = 1 to n append ((x - 1) * n * n + (LCA(x, y) - 1 阅读全文
posted @ 2024-03-04 16:11 yoshinow2001 阅读(9) 评论(0) 推荐(0) 编辑
摘要: link:https://www.luogu.com.cn/problem/P3317 给一张无向图,每条边有一定概率连通,问整张图恰好构成一棵 \(n\) 个点的树的概率。输出实数。 \(1<n\leq 50\) 这种问题通常会试着写出来: \[ans=\sum_{T} (\prod_{e\in 阅读全文
posted @ 2024-03-01 18:04 yoshinow2001 阅读(2) 评论(0) 推荐(0) 编辑