<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.33dai.wiki/index.php?action=history&amp;feed=atom&amp;title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95%2F02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE</id>
	<title>08-基础算法/02-简单枚举 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.33dai.wiki/index.php?action=history&amp;feed=atom&amp;title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95%2F02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE"/>
	<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;action=history"/>
	<updated>2026-05-21T00:48:07Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;diff=427&amp;oldid=prev</id>
		<title>33DAI：​批量导入三三文档</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;diff=427&amp;oldid=prev"/>
		<updated>2026-05-20T18:23:58Z</updated>

		<summary type="html">&lt;p&gt;批量导入三三文档&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年5月20日 (三) 18:23的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;第41行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第41行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:基础算法]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:基础算法]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:三三文档]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:三三文档]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki:diff:1.41:old-385:rev-427:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>33DAI</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;diff=385&amp;oldid=prev</id>
		<title>33DAI：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;diff=385&amp;oldid=prev"/>
		<updated>2026-05-20T18:12:12Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年5月20日 (三) 18:12的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff:1.41:old-384:rev-385 --&gt;
&lt;/table&gt;</summary>
		<author><name>33DAI</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;diff=384&amp;oldid=prev</id>
		<title>-&gt;Importer：​批量导入三三文档</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=08-%E5%9F%BA%E7%A1%80%E7%AE%97%E6%B3%95/02-%E7%AE%80%E5%8D%95%E6%9E%9A%E4%B8%BE&amp;diff=384&amp;oldid=prev"/>
		<updated>2026-05-20T16:50:33Z</updated>

		<summary type="html">&lt;p&gt;批量导入三三文档&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== 简单枚举 ==&lt;br /&gt;
&lt;br /&gt;
枚举（枚举法/穷举法）是最直观的算法思想：&amp;#039;&amp;#039;&amp;#039;列出所有可能的情况，逐一检查是否符合要求&amp;#039;&amp;#039;&amp;#039;。&lt;br /&gt;
&lt;br /&gt;
=== 基本模板 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
for (int i = 1; i &amp;lt;= n; i++)&lt;br /&gt;
    for (int j = 1; j &amp;lt;= n; j++)&lt;br /&gt;
        for (int k = 1; k &amp;lt;= n; k++)&lt;br /&gt;
            if (check(i, j, k))&lt;br /&gt;
                ans++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 优化方向 ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;减少枚举范围&amp;#039;&amp;#039;&amp;#039;：通过数学分析减少不必要的枚举&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;剪枝&amp;#039;&amp;#039;&amp;#039;：在枚举过程中提前排除不可能的方案&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;改变枚举顺序&amp;#039;&amp;#039;&amp;#039;：先枚举约束多的变量&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;使用哈希表&amp;#039;&amp;#039;&amp;#039;：用空间换时间（如两数之和问题）&lt;br /&gt;
&lt;br /&gt;
=== 经典例题 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! 题型 !! 说明&lt;br /&gt;
|-&lt;br /&gt;
| 百钱买百鸡&lt;br /&gt;
| 枚举鸡的数量，满足总价和总数&lt;br /&gt;
|-&lt;br /&gt;
| 水仙花数&lt;br /&gt;
| 枚举三位数，各位立方和等于自身&lt;br /&gt;
|-&lt;br /&gt;
| 完全平方数&lt;br /&gt;
| 枚举范围内的完全平方数&lt;br /&gt;
|-&lt;br /&gt;
| 勾股数&lt;br /&gt;
| 枚举直角三角形的三条边&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:基础算法]]&lt;br /&gt;
[[Category:三三文档]]&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>-&gt;Importer</name></author>
	</entry>
</feed>