当前位置:网站首页>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
边栏推荐
- Introduction to PostgreSQL
- npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
- SELECT:简单的查询操作语法&使用例——《mysql 从入门到内卷再到入土》
- DDL:CREATE 创建数据库——《mysql 从入门到内卷再到入土》
- 直播课堂系统08补-腾讯云对象存储和课程分类管理
- ENVI最小距离、最大似然、支持向量机遥感影像分类
- 【Windows】你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问,这些策略可帮助保护你的电脑
- 扩展中国剩余定理
- 什么是抽象类?什么时候用?什么是接口?抽象类与接口的区别?
- Detailed explanation and use of each module of ansible
猜你喜欢
随机推荐
Auto.js中的悬浮窗
Knowledge map Knowledge Graph
我的世界整合包 云服务器搭建方法(ECS)
【PCBA方案】电子握力测试仪方案she‘ji
DDL:ALTER 修改数据库——《mysql 从入门到内卷再到入土》
Date picker component (restrict year to set only displayed months)
npm‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
查询:复杂查询的语法和使用例——《mysql 从入门到内卷再到入土》
Kubernetes Notes / Getting Started / Production Environment / Installing Kubernetes with Deployment Tools / Starting a Cluster with kubeadm / Creating a Cluster with kubeadm
B. Trouble Sort
社区分享|货拉拉通过JumpServer纳管大规模云上资产
数字化转型:如何引导创新领导者
关于 NFT 版权保护的争议
D. Game With Array
论文解读(g-U-Nets)《Graph U-Nets》
【nvm】【node多版本管理工具】使用说明和踩坑(exit status 1)
单选点击可取消功能
第四届红帽杯网络安全大赛
APP application related instructions in Auto.js
A fullGC problem troubleshooting caused by groovy