当前位置:网站首页>2022/7/17 exam summary
2022/7/17 exam summary
2022-07-26 08:01:00 【Misty rain】
Time arrangement
8:00~9:00
T1 First, we can find the ring length, and then the problem becomes how many x ≤ n , y ≤ m , x y ≡ 0 ( m o d p ) x\leq n,y\leq m,x^y\equiv 0(mod p) x≤n,y≤m,xy≡0(modp)
And then enumerate p And then simply exclude it .
This part of the complexity O ( p 2 7 ) O(\sqrt p2^7) O(p27) But I'm not satisfied with running
9:00~10:00
The bottleneck of the algorithm just now is to find the ring length , Consider writing the transfer in the form of a matrix , Then find A × B t ≡ C ( m o d p ) A\times B^t\equiv C(mod p) A×Bt≡C(modp) The smallest t, It can be used BSGS, But due to the A,C The particularity of , There is no need to reverse . I hope I can
10:00~10:30
At the beginning with map Save the matrix , It's too slow , It was later changed to hash surface , Take off soon , But the space seems a little high , Because of this hash The table stores a matrix .
10:30~11:10
T2 There is one at a glance nmlogmlogn How to do it , It can be used 01BFS Remove one log, Can have 60 Divide up , Well written .
11:10~11:30
T3 No idea at all , Only written. 20pts violence .
12:00~12:30
Find out T2 There's a mistake , Change it quickly .
A summary after the exam
T1
Although my T1 We can do better , However, the author is better .
First, there is no need for a matrix BSGS, You can expand and enumerate directly according to the congruence φ ( 9 p ) \varphi(9p) φ(9p) Factor of , Judge whether the ring is long .
secondly , The positive solution is obtained by turning y Except come here , Give Way y The upper bound of is very small , When y When it is greater than the upper bound , Composite x The number of will not become .
So it is log Of . I feel like I'm doing problems , I don't like pushing , Always use something more routine or mindless , such as BSGS Or tolerance .
Still need to write more , Simplify the operation when necessary .
T2
I thought of reconstructing the tree during the exam , But I don't know how to judge whether the two intervals are reachable , The merging of line segments and trees of the problem solution is very wonderful , Maintain the reachable points in an interval , The rest is 60 Two points .
T3
The first step of transformation did not expect , I've been thinking dp/ Pull and insert , The result is a combinatorial number .
secondly , According to the small modulus, this kind of combination number is converted to Lucas On , Then similar to a P Decimal digits dp.
To be honest, I have just done a similar problem before [ Tsinghua training 2016] Combinatorial number problem , But it is much simpler than this question , There is no need to consider abdication or anything .
边栏推荐
猜你喜欢

分布式相关面试题总结

Burp Suite-第六章 如何使用Burp Spider

JSP built-in object (implicit object)

Vscode cannot start the problem solving idea

Dynamic performance view overview

要不你给我说说什么是长轮询吧?

Excel file reading and writing (creation and parsing)

Web side 3D visualization engine hoops communicator reads 10g super large model test | digital twin Technology

How to close the high-level port

线程崩了,为什么不会导致 JVM 崩溃呢?如果是主线程呢?
随机推荐
File parsing (JSON parsing)
微服务feign调用时候,token丢失问题解决方案
Common database commands (special for review)
Add traceid to the project log
2022-07-09 group 5 Gu Xiangquan's learning notes day02
Abstract classes and interfaces
utils 连接池
If the thread crashes, why doesn't it cause the JVM to crash? What about the main thread?
Jmeter性能测试之命令行执行和生成测试报告
Sort sort IP addresses
Sort: merge sort and quick sort
Jmeter性能测试之将每次接口请求的结果保存到文件中
Hystrix配置简单说明
Why is Google's internal tools not suitable for you?
Wrong Addition
Rewriting and overloading
一点一点理解微服务
一文掌握mysql数据库审计特点、实现方案及审计插件部署教程
Distributed system and distributed database system (Introduction)
Crawler - > tpimgspider