ICode9

精准搜索请尝试: 精确搜索
  • NC15832 Most Powerful2022-09-03 12:03:35

    题目链接 题目 题目描述 Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power is produced. Researchers know the wa

  • 【学习笔记】Powerful Number 筛2022-07-27 15:05:59

    有力量的数字筛(?) Powerful Number 有力量的数字(?) 定义一个数 \(n\) 为 Powerful Number(简称 PN),当且仅当 \(n\) 没有非平方因子。 也即,若 \(n=\prod p_i^{e_i}\),则 \(\forall e_i>1\)。 Lemma 保障 PN 筛时间复杂度的一个性质。 \(n\) 以内的 PN 个数为 \(O(\sqrt n)\)。 首先,考虑

  • Powerful Discount Tickets(贪心,数学)2022-06-24 15:02:08

    题意 有\(N\)件物品,每件物品价格为\(A_i\)元。 你现在有\(K\)张优惠券。对于一个价格为\(X\)的物品,如果你使用\(y\)张优惠券,则你需要花费\(\lfloor \frac{X}{2^y} \rfloor\)元。 求购买所有物品需要花费多少元钱? 题目链接:https://atcoder.jp/contests/abc141/tasks/abc141_d 数据

  • Diary & Solution Set - 多校度假2022-06-14 17:02:45

    \(\mathscr{Summary}\sim6.14\)   Contest.   总结等会儿写,好像要走了。 \(\mathscr{A}\sim\) 区间第 \(k\) 小   给定 \(n,m\) 和序列 \(\{a_n\}\)。\(q\) 次询问,每次给出 \(l,r,k\),求将 \(a[l:r]\) 中所有出现次数多于 \(m\) 次的数替换为 \(n\) 后,\(a[l:r]\) 中第 \(k\)

  • CF86D Powerful array 题解2022-04-14 21:04:30

    看到长这样的题目,显然是莫队板子题。 但是不知道为什么很多人写的都是 \(2 \times cnt_x + 1\) 之类的?好像直接先减再加不就好了?公式都不用推。 注意指针顺序以及 long long。 目前 CF 的机子上已经不需要用 %l64d 输出 long long,直接 %lld 输出即可。 代码: #include <bits/stdc++

  • 亚线性筛法: 杜教筛和 Powerful Number 筛2022-02-24 20:01:55

    亚线性筛法 求积性函数 \(f(x)\) 的前 \(n\) 项和, 我们可以通过线性筛解决 \(n\) 数量在 \(10^7\) 级别的情况, 当 \(n\) 更大时, 线性算法就不足以求出答案了. 杜教筛就是一种对于特定积性函数能够在小于线性的复杂度内求出前 \(n\) 项和的方法. 前置知识 线性筛 狄利克雷卷

  • USTC English Club Note202112292022-01-31 00:01:17

    #Golden Lines Series# #Rick and Morty#   We’re gonna live our lives until we die. 一直活着,到死为止。   That’s planning for failure,Morty,even dumber than regular planning. 别为失败做打算,比庸常的打算还要愚蠢。   They just put you at the center of their l

  • Powerful Number 筛法2022-01-30 14:34:10

    三个式子$f(a,b,c,n)=\sum_{i=0}^{n}\lfloor \frac{ai+b}{c} \rfloor$$g(a,b,c,n)=\sum_{i=0}^{n}\lfloor \frac{ai+b}{c} \rfloor^2$$h(a,b,c,n)=\sum_{i=0}^{n}i\lfloor \frac{ai+b}{c} \rfloor$它的几何意义也比较明显$a=0$$f(a,b,c,n)=(n+1)\times \lfloor \frac{b}{c} \

  • powerful number筛2022-01-20 19:00:23

    心血来潮跑来实现以下这个东西 我们应该知道杜教筛的理论是 \(f * g=h\),那么问题在于如何找 \(g\)。 之前的blog应该提到过可以令 \(g(p)=-f(p)\),这样一来 \(h\) 就只会在PN处有值。于是可以大力爆搜 \(h\),而 \(g\) 的块筛又很好处理。 但是这样复杂度会有一个下限为 \(O(n^{\frac

  • Messya, a super simple yet powerful Microsoft Edge Extension2021-12-16 23:33:00

    一个超简单的Microsoft Edge Extension - Fun_with_Words - 博客园 (cnblogs.com) 海底两万里(20,000 Leagues Under the Sea) 英文版 - - 趣词英文在线小说 (quword.com) 能在每个页面里注入我们的JS代码,那我们有啥不能干的?我想可以: 外观改善,如页面背景图片和颜色,行间距,字体,段首

  • powerful number2021-12-07 12:04:19

    基础 定义:所有质因子次幂至少为 \(2\) 的数,以下均简写为 PN。 性质 1:所有 PN 都可以表示成 \(a ^ 2b ^ 3\) 的形式且构成单射。 考虑构造一种方式使得一个 PN \(n\) 唯一对应一组 \((a, b)\)。 \(\forall p \in \mathbb{P}, p \mid n, \alpha = \max\limits_{p ^ {\beta} \mid n}

  • powerful number & ULR #1 校验码2021-12-07 09:00:38

    用 PN 做 min25 模板: \(F(p^k) = p^k(p^k-1),F(p)=p(p-1)\) 构造 \(G(x) = x\varphi(x)\) ,\(H = F/G\) ,\(H\) 只在 PN 处有值。 \[\sum_{i=1}^n F(i) = \sum_{d=1}^n [d\in \text{PN}] H(d) \text{sum}G(n/d) \] 想要求: \[\text{sum}q(\lfloor \dfrac nt \rfloor)

  • 970. Powerful Integers2021-05-01 03:32:20

    Given three integers x, y, and bound, return a list of all the powerful integers that have a value less than or equal to bound. An integer is powerful if it can be represented as xi + yj for some integers i >= 0 and j >= 0. You may return the a

  • 0970. Powerful Integers (M)2021-04-30 16:34:35

    Powerful Integers (M) 题目 Given three integers x, y, and bound, return a list of all the powerful integers that have a value less than or equal to bound. An integer is powerful if it can be represented as xi + yj for some integers i >= 0 and j >= 0.

  • Powerful Number 筛学习笔记2021-03-31 20:02:21

    Powerful Number 筛学习笔记 用途 \(Powerful\ number\) 筛可以用来求出一类积性函数的前缀和,最快可以达到根号复杂度。 实现 \(Powerful\ number\) 的定义是每个质因子次数都 \(\ge 2\) 的数。 有如下的性质: \(1\)、一个 \(Powerful\ number\) 一定可以表示为 \(a^2b^3\) 的形式

  • [学习笔记]Powerful number 筛2021-02-26 20:34:28

    [学习笔记]Powerful number 筛 一.前言 ​ 好耶,原来我也会 PN 。这两天整了一些筛法相关,虽然还没看 Min_25 筛,可能过两天会写吧,现在先把 PN 的笔记写了。yysy 这个东西并没有我想像中的那么难,真的搞懂之后还是挺简单的。 ​ 当然我现在所有的筛法相关都没看复杂度,

  • LG模拟赛#1 T2 肯德基,powerful number,寻找构造函数的规律2021-02-23 10:03:05

    正题 求 n n n 以内所有正整数的最大平方因子的和。答案对 2 64 2^{

  • [CF86D] Powerful array - 莫队2021-01-31 09:35:11

    [CF86D] Powerful array - 莫队 Description 给定长度为 \(n\) 的序列 \(a\),有 \(q\) 次询问,每次询问给出两个数 \(l,r\)。对于每次询问,设 \(cnt_i\) 表示 \(i\) 在 \(a_l,a_{l+1},\cdots,a_r\) 出现的次数,您需要求出 \(\displaystyle\sum_i cnt_i^2\cdot i\)。\(1\le a_i\le 10^6

  • singly-linked list----Two words to express it, brief yet powerful!2021-01-16 22:34:23

    Two words to express it, brief yet powerful! 发布于 几秒前0递归算法链表 解题思路 此处撰写解题思路 代码 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) {

  • [LeetCode] 970. Powerful Integers 强力数字2020-12-16 13:05:00

    Given two positive integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0. Return a list of all powerful integers that have value less than or equal to bound. You may return the answer in any or

  • powerful number 筛2020-05-29 21:57:25

    似乎没啥例题的样子 \(powerful number\)就是没有质因子指数为\(1\)的 那么一定可以表示成\(a^2b^3\),积一下分可以得到\(pn\)规模是\(O(\sqrt n)\)的 考虑如果要求一个积性函数\(f\)前缀和 考虑找一个\(g\),满足\(f(p)=g(p)\) 设\(f=g*h\),那么\(f(p)=g(p)h(1)+h(p)g(1)\) 那么\(h(

  • 联考20200520 T2 函数2020-05-20 20:56:09

    分析: 考场上写min25筛T到飞起,插值的时候脑抽没优化用的\(O(K^2)\),结果跟暴力差不多速度 由于\(f(p^k)\)是\(O(1)\)可求的,答案: \(\sum_{i=1}^{n}f(i)=G_k(n,|P|)\) 所以无脑筛就好了。。。 答案进行了优化,引入了一个叫powerful number的奥妙重重的东西 这里可以去拜读zzq大神的博

  • 86D - Powerful array2020-03-29 09:51:57

    莫队。 统计ai[i]的出现次数,每一次先还原贡献,再加上或减去当前的贡献即可。 #include<iostream> #include<cstring> #include<algorithm> #include<cmath> #include<cstdlib> #include<climits> #include<stack> #include<vector> #include<queue> #i

  • 2019年10月13日 计算机英语习题 wangqingchao2019-10-13 19:00:08

    Match the explanations in Column B with words and expressions in Columna. (搭配每组中意义相同的词或短语) Types of Computer Computer can be generally cassified by size and power as ollwing, though there is considerable overlap among them. A minicomputer refer

  • D - Powerful Discount Tickets2019-09-16 21:01:51

    D - Powerful Discount Tickets Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400400 points Problem Statement Takahashi is going to buy NN items one by one. The price of the ii-th item he buys is AiAi yen (the currency of Japan). He has MM disc

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有