当前位置:网站首页>Reductive elimination
Reductive elimination
2022-06-13 04:52:00 【csuzhucong】
Catalog
One , The rules of the game

In fact, the essence of this game is , There are some boxes , There are several balls of various colors in each box , Every election 2 A box , Take out the balls of the same color among them , Finally, you can take all of them .
Two , Definition of terms
The right state : After a series of operations, the state that can be completely eliminated .
3、 ... and , Greedy strategy
(1) Greedy strategy one , Take the largest number each time , Whether there must be a number that can be mutually reduced with this number , So that the mutual covenant is still in the correct state ?
Is the answer , We are the first 7 Guan can easily find such an example ,4 6 6 3 3

This example does not violate , because 6 You can talk to 4 Mutual covenant , Then it's still in the right state .
But the inspiration from this example is , among 2 The power of 4 2 2 1 1, We found that the largest number in the two sets of data is different , This allows you to design cross use cases :
60, 150, 10, 9
In this case , Must be 9 And other numbers should be mutually reduced first , So the greedy strategy is not tenable .
(2) Greedy strategy two , Each time you get the most prime factor ( Repeated weighing ) Number of numbers , Whether there must be a number that can be mutually reduced with this number , So that the mutual covenant is still in the correct state ?
Repeated weighing means , such as 12 Yes 3 A quality factor , Namely 2 2 3
Four , Violence strategy
If the data is weak , Take whatever you like 2 The number can be reduced to each other , That is to say, it is OK to keep disorderly .
The first 26 Close the test , Just remember the approximate grid position without looking at the numbers , Just close your eyes and go crazy 18 Seconds to complete .

Because the data is too watery , So I stopped playing .
边栏推荐
- Latex operation
- General communication protocol for industrial Internet
- 前几年的互联网人vs现在的互联网人
- The games that you've tasted
- Win8.1和Win10各自的优势
- 2022 chlorination process operation certificate examination question bank and simulation examination
- 无限循环滚动代码阿里巴巴国际站店铺装修代码底图滚动黑色半透明显示效果自定义内容装修代码全屏显示
- 你的一对一会议效率低下,你可以这么做!
- Your one-on-one meetings are inefficient. You can do this!
- Use service worker to preferentially request resources - continuous update
猜你喜欢
![[LeetCode]-二分查找](/img/7f/7d1f616c491c6fb0be93f591da6df1.png)
[LeetCode]-二分查找

What is the difference between ROM, ram and flash? SRAM、DRAM、PROM、EPROM、EEPROM

QT realizes message sending and file transmission between client and server

Conception d'un système basé sur MVC avec javaswing JDBC

Advantages of win8.1 and win10

Ctfshow SQL injection (211-230)

无限循环滚动代码阿里巴巴国际站店铺装修代码底图滚动黑色半透明显示效果自定义内容装修代码全屏显示

Win8.1和Win10各自的优势

Design system based on MVC using javeswingjdbc

Mind mapping series - Database
随机推荐
C盘无损移动文件
Section 6 - pointers
[leetcode]- sliding window
Use service worker to preferentially request resources - continuous update
Avantages de win8.1 et win10
[untitled]
2022 question bank and answers for operation certificate examination of safety production management personnel in road transport enterprises
General communication protocol for industrial Internet
Section 4 - arrays
E - Lucky Numbers
用navicat将mysql数据转化为postgresql
String()和toString()方法得区别
Red Treasure Book Reading Notes (continuously updated)
Section 5 - Operator details
C#获取WebService接口的所有可调用方法[WebMethod]
2022 chlorination process operation certificate examination question bank and simulation examination
Createanonymousthreadx passes parameters to anonymous threads
利用Javeswingjdbc基于mvc设计系统
Set properties \ classes
Read paper 20 together: spatiotemporal prediction of PM2.5 concentration by idw-blstm under different time granularity