当前位置:网站首页>2022.8.9 Mock Competition
2022.8.9 Mock Competition
2022-08-10 21:26:00 【aWty_】
T0
小清新签到题,直接暴力 b f s bfs bfs 就过掉了,But have you ever been walked to record each letter in the middle,Don't go through.Or if the picture is all the same letter time complexity just blew up Here is the hang up 9 分.
T1 Jacob arithmetic of
Allows you to quickly determine the score p q \frac pq qp 在 b b b Whether in base for infinite decimals.
According to some common sense,我们知道 p q \frac pq qp Whether the cycle with p p p 没啥关系,So let's give them a reduction of a fraction and then focus on q q q(Here are special for p = 0 p = 0 p=0).
Then we found that give a number 1 q \frac 1q q1 乘上一个 b b b 就相当于在 b b b Base the decimal point moves to the right a.So if the decimal is limited,那么就存在一个 k ∈ N ∗ k \in N^* k∈N∗ 使得 q ∣ b k q \mid b^k q∣bk.
So we will consider has been to q q q 除上 gcd ( q , b ) \gcd(q, b) gcd(q,b),Until the two thing co-prime.此时如果 q = 1 q = 1 q=1 那么就说明 q q q 的质因子 b b b 都有.So that is there k k k 使得 q ∣ b k q \mid b^k q∣bk,时间复杂度是 O ( T log 2 q ) O(T\log^2q) O(Tlog2q) 的.
T2 Jacob paint the walls
20pts
有 20 p t s 20pts 20pts Is a rectangular case,According to the computer room bosses c m y cmy cmy The law of the said this part is better looking for,答案就是:
a n s = 2 n + 2 h − 2 ans = 2^n + 2^h - 2 ans=2n+2h−2
就直接 O ( log n ) O(\log n) O(logn) Finished it quickly power.
T3 Jacob data structure
10pts
Simulated according to the problem face directly,复杂度 O ( m n 2 ) O(mn^2) O(mn2).
40 pts
Maintaining a line segment tree support single point change,区间查询,我们发现一个性质,对于一个左端点 i i i 来说,After her extension to the right of o r or or Value is strictly monotone increasing,So we can consider to get a binary point p o s pos pos,This is the first greater than or equal to x x x 的右端点,那么这个点 i i i 的贡献就是 v − p o s + 1 v - pos + 1 v−pos+1.
Binary every time c h e c k ( m i d ) check(mid) check(mid) To segment tree range check,所以复杂度是 O ( m n log n ) O(mn\log n) O(mnlogn) 的.
50 pts
因为 x = 0 x = 0 x=0,所以答案就是:
a n s = 1 2 ( r − l + 1 ) ( r − l + 2 ) ans = \frac 12(r - l + 1)(r - l + 2) ans=21(r−l+1)(r−l+2)
70pts
边栏推荐
- Auto.js中的悬浮窗
- 机器学习笔记:t-SNE
- Bedtime story | made a Bitmap and AST length system configuration
- 如何提交一个PR?【OpenHarmony成长计划】【OpenHarmony开源社区】
- labelme-屏蔽拖拽的事件
- apr_thread使用内存之谜
- Getting started with kuberentes Auditing
- 【vulhub】MySql身份认证绕过漏洞复现(CVE-2012-2122)
- npm‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
- svg+元素js实现在图片上描点成框,并获取相对图片的坐标位置
猜你喜欢
美创科技勒索病毒“零信任”防护和数据安全治理体系的探索实践
ACM解题笔记——HDU 1401 Solitaire(DBFS)
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
使用SylixOS虚拟串口,实现系统串口自由
leetcode:45. 跳跃游戏II
直播课堂系统08补-腾讯云对象存储和课程分类管理
apr_thread使用内存之谜
ansible各个模块的详解和使用
【golang map】 深入了解map内部存储协议
面向未来的 IT 基础设施管理架构——融合云(Unified IaaS)
随机推荐
参天生长大模型:昇腾AI如何强壮模型开发与创新之根?
C. Rotation Matching
The use of TortoiseSVN little turtle
Detailed explanation of the use of Oracle's windowing function (2)
用汇编带你看Golang里到底有没有值类型、引用类型
Object.assign用法 以及 与$.extend的区别
Auto.js中的悬浮窗
查询:复杂查询的语法和使用例——《mysql 从入门到内卷再到入土》
[SWPUCTF 2021 新生赛] web
GAN CFOP
Kubernetes 笔记 / 入门 / 生产环境 / 用部署工具安装 Kubernetes / 用 kubeadm 启动集群 / 用 kubeadm 创建集群
Detailed explanation and use of each module of ansible
如何保护 LDAP 目录服务中的用户安全?
数字化转型:如何引导创新领导者
PostgreSQL 介绍
论配置化系统的配置
ACM模板笔记:最长不下降/上升子序列
直播课堂系统08补-腾讯云对象存储和课程分类管理
LeetCode-36-二叉搜索树与双向链表
地理探测器Geodetector软件的下载、应用与结果解读