当前位置:网站首页>2022-7-13 summary
2022-7-13 summary
2022-07-25 04:50:00 【JSU-YSJ】
The time for this summary is 2022-7-12~2022-7-13.
Summarize the learning algorithm :
1. I have deeply studied the game , In especial SG function . I know several key points :
(1)SG Expression of function :sg(x) = mex{1,2, 3...} = 0, Defined as the smallest integer that does not appear .
(2)SG Function table template and understanding : take SG Understand the relationship between function and binary , We define all 0 In a state of inevitable failure
00000000( Suppose eight digits ) So for a state 00000001 It can be removed 1 Let him become all 0 It is a winning state
We can use the value that needs to be removed ^ To get . For any state, he has any way to turn it into a state of failure
Then it is in a winning state .
Main transformation :( The problem of taking stones )
A and B Just as much ,A ^ B = 0 If you start, you'll lose
A - B - , A ^ B = 1 The first step is to win
A - B Defeat or A - B Defeat , A ^ B = 1 The first step is to win
A Defeat B Defeat A^B = 0 If you start, you'll lose
void get_sg() {
for (int i = 1; i < N; i++) {
if (i & 1 && !sg[i - 1]) {
sg[i] = 1;
continue;
}
for (int j = 1; j <= 10; j++) {
if (i >> j & 1) {
for (int k = 0; k < j; k++) {
if (!sg[i ^ (1 << j) ^ (1 << k)]) sg[i] = 1;
}
}
}
}
}
How to solve the problem , If you can't see it, type the watch first and then find the rule
2. Big prime judgement
Generally speaking, judge a number n Is it a prime number , You can use a root sign n The algorithm of . But when n Sometimes, for example :100000000000000000, It's impossible at this time , Need to adopt a new property to judge , Fermat's small Theorem .
The condition of Fermat's theorem is P Prime number , On the contrary, if Fermat's small theorem holds, then P Prime number . But this judgment will be a little mistaken , Therefore, we need to make a second depth judgment ( I don't understand it very well here. I have to look at it ).
Summarize the question brushing part :
Two garbage CF+ Supplementary questions :

Last year's winter vacation Niuke made up the question :




Game problem

Reading summary
Read the algorithm competition advanced graph theory 20 page ( Equivalent to review ), Look at the integer solution of the binary first-order equation (20 page ). There is an available corollary :
ax + by = n There is an integer solution ====> gcd(a,b) Divisibility n.
边栏推荐
- Interviewer: explain the core principle of ThreadLocal
- PyG搭建GCN实现链接预测
- Basic knowledge of scratch crawler framework
- Gbase JDBC connection database exception
- Introduction to computing system hardware (common servers)
- The strongest JVM in the whole network is coming!
- 暗黑王者|ZEGO 低照度图像增强技术解析
- How to test data in the process of data warehouse migration?
- SMIC's revenue in 2018 was $3.36 billion, and 14nm technology was mass produced this year
- QT download installation tutorial
猜你喜欢

Burpsuite爆破之token值替换

Token value replacement of burpsuite blasting

开源之夏专访|“00 后” PMC member 白泽平

1. If function of Excel

Interview required: how to design the seckill system?

【浅析STM32之GPIO寄存器(CRL/CRH)配置 】

Druid connection pool - strong self-study from 0. Those who don't understand Druid can click in. If you know not to click in, you will think I'm wordy

5年经验的大厂测试/开发程序员,怎样突破技术瓶颈?大厂通病......

二、MySQL数据库基础

Introduction to CpG control network
随机推荐
PHP Baidu qianqianhua installment API
在开发或调试IP直接方案时需要注意Host的值跟直接的IP要一致
Interpretation and download of the report | ink Tianlun July database industry report, be prepared for danger in times of safety, and safety first
Tiny-emitter.js: a small event subscription and Publishing Library
Token value replacement of burpsuite blasting
OA and fansoft Bi cross system users, departments and posts synchronous summary
ESWC 2018 | r-gcn: relational data modeling based on graph convolution network
LVGL 8.2 Spinbox
1. If function of Excel
[daily question] 731. My schedule II
[analysis of GPIO register (crl/crh) configuration of STM32]
Summary of UPR optimization suggestions of unity
Perspective
Pyg builds GCN to realize link prediction
After watching the latest interview with big manufacturers, these six JVM interview questions were asked
ThreadLocal Kills 11 consecutive questions
中创算力荣获「2022年科技型中小企业」认定
GBase JDBC 连接数据库异常
Understand Huawei's 2018 financial report with one picture
Gbase 8A about no suitable driver