<?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=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95%2F03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B</id>
	<title>01-基础语法/03-变量与基础类型 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.33dai.wiki/index.php?action=history&amp;feed=atom&amp;title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95%2F03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B"/>
	<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;action=history"/>
	<updated>2026-05-20T22:30:53Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=293&amp;oldid=prev</id>
		<title>33DAI：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=293&amp;oldid=prev"/>
		<updated>2026-05-20T18:12:08Z</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-292:rev-293 --&gt;
&lt;/table&gt;</summary>
		<author><name>33DAI</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=292&amp;oldid=prev</id>
		<title>-&gt;Importer：​批量导入三三文档</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=292&amp;oldid=prev"/>
		<updated>2026-05-20T16:50:33Z</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日 (三) 16:50的版本&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-193:rev-292 --&gt;
&lt;/table&gt;</summary>
		<author><name>-&gt;Importer</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=193&amp;oldid=prev</id>
		<title>33DAI：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=193&amp;oldid=prev"/>
		<updated>2026-05-20T16:25:02Z</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日 (三) 16:25的版本&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-192:rev-193 --&gt;
&lt;/table&gt;</summary>
		<author><name>33DAI</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=192&amp;oldid=prev</id>
		<title>-&gt;Importer：​批量导入三三文档</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=01-%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/03-%E5%8F%98%E9%87%8F%E4%B8%8E%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B&amp;diff=192&amp;oldid=prev"/>
		<updated>2026-05-20T16:22:29Z</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;
=== 常见数据类型/变量类型 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  !! 有符号整数 !! 无符号整数&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;32&amp;lt;/math&amp;gt; 位&lt;br /&gt;
| &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;signed&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;unsigned&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;unsigned int&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;64&amp;lt;/math&amp;gt; 位&lt;br /&gt;
| &amp;lt;code&amp;gt;long long&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;unsigned long long&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
- 小数（浮点数）：&lt;br /&gt;
  - 单精度：&amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;&lt;br /&gt;
  - 双精度：&amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;&lt;br /&gt;
  - 扩展精度：&amp;lt;code&amp;gt;long double&amp;lt;/code&amp;gt;&lt;br /&gt;
- 字符：&amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt;&lt;br /&gt;
- 布尔：&amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;&lt;br /&gt;
- 字符串：&amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 变量定义规则 ===&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;
int a;       //变量类型 变量名；&lt;br /&gt;
int b = 0;   //变量类型 变量名 = 初始值;&lt;br /&gt;
int c, d, e; //变量类型 变量名1, 变量名2, 变量名3;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
变量命名规则：&lt;br /&gt;
&lt;br /&gt;
- 字母或下划线开头&lt;br /&gt;
- 只能包含字母、数字、下划线&lt;br /&gt;
- 不能是 C++ 关键字&lt;br /&gt;
&lt;br /&gt;
=== 数据类型对应的范围 ===&lt;br /&gt;
&lt;br /&gt;
- bit：位（&amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; 个二进制位），计算机储存的最小单位&lt;br /&gt;
- Byte：字节（&amp;lt;math&amp;gt;8&amp;lt;/math&amp;gt; 个连续的二进制位），计算机储存的基本单位&lt;br /&gt;
- 换算方法：&lt;br /&gt;
  - &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; B(Byte) = &amp;lt;math&amp;gt;8&amp;lt;/math&amp;gt; bits&lt;br /&gt;
  - &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; KB(KiB) = &amp;lt;math&amp;gt;1024&amp;lt;/math&amp;gt; B（&amp;lt;math&amp;gt;2^{10}&amp;lt;/math&amp;gt; B）&lt;br /&gt;
  - &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; MB(MiB) = &amp;lt;math&amp;gt;1024&amp;lt;/math&amp;gt; KB&lt;br /&gt;
  - &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; GB(GiB) = &amp;lt;math&amp;gt;1024&amp;lt;/math&amp;gt; MB&lt;br /&gt;
  - &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; TB(TiB) = &amp;lt;math&amp;gt;1024&amp;lt;/math&amp;gt; GB&lt;br /&gt;
  - &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; PB(PiB) = &amp;lt;math&amp;gt;1024&amp;lt;/math&amp;gt; TB&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! 数据类型名 !! 内容（一般情况） !! 占用内存大小 !! 能储存的范围 !! &amp;lt;code&amp;gt;scanf&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;printf&amp;lt;/code&amp;gt; 标识符(g++)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;signed&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;32&amp;lt;/math&amp;gt; 位整数&lt;br /&gt;
| &amp;lt;math&amp;gt;4&amp;lt;/math&amp;gt; Bytes&lt;br /&gt;
| &amp;lt;math&amp;gt;-2^{31}\sim 2^{31}-1&amp;lt;/math&amp;gt;，约 &amp;lt;math&amp;gt;-2\times 10^9\sim 2\times 10^9&amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;%d&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%d&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;long long&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;64&amp;lt;/math&amp;gt; 位整数&lt;br /&gt;
| &amp;lt;math&amp;gt;8&amp;lt;/math&amp;gt; Bytes&lt;br /&gt;
| &amp;lt;math&amp;gt;-2^{63}\sim 2^{63}-1&amp;lt;/math&amp;gt;，约 &amp;lt;math&amp;gt;-9\times 10^{18}\sim 9\times 10^{18}&amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;%lld&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%lld&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt;&lt;br /&gt;
| 字符&lt;br /&gt;
| &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; Byte&lt;br /&gt;
| 至少能储存 &amp;lt;math&amp;gt;0\sim 127&amp;lt;/math&amp;gt;，常见范围为 &amp;lt;math&amp;gt;-128\sim 127&amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;%c&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%c&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;&lt;br /&gt;
| 单精度浮点数&lt;br /&gt;
| &amp;lt;math&amp;gt;4&amp;lt;/math&amp;gt; Bytes&lt;br /&gt;
| &amp;lt;math&amp;gt;-3.4\times 10^{38}\sim 3.4\times 10^{38}&amp;lt;/math&amp;gt;，有效数字 &amp;lt;math&amp;gt;6\sim 7&amp;lt;/math&amp;gt; 位&lt;br /&gt;
| &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;&lt;br /&gt;
| 双精度浮点数&lt;br /&gt;
| &amp;lt;math&amp;gt;8&amp;lt;/math&amp;gt; Bytes&lt;br /&gt;
| &amp;lt;math&amp;gt;-1.7\times 10^{308}\sim 1.7\times 10^{308}&amp;lt;/math&amp;gt;，有效数字 &amp;lt;math&amp;gt;15\sim 16&amp;lt;/math&amp;gt; 位&lt;br /&gt;
| &amp;lt;code&amp;gt;%lf&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;unsigned int&amp;lt;/code&amp;gt;&lt;br /&gt;
| 无符号 &amp;lt;math&amp;gt;32&amp;lt;/math&amp;gt; 位整数&lt;br /&gt;
| &amp;lt;math&amp;gt;4&amp;lt;/math&amp;gt; Bytes&lt;br /&gt;
| &amp;lt;math&amp;gt;0 \sim 2^{32}-1&amp;lt;/math&amp;gt;，约 &amp;lt;math&amp;gt;0 \sim 4\times 10^9&amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;%u&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%u&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;unsigned long long&amp;lt;/code&amp;gt;&lt;br /&gt;
| 无符号 &amp;lt;math&amp;gt;64&amp;lt;/math&amp;gt; 位整数&lt;br /&gt;
| &amp;lt;math&amp;gt;8&amp;lt;/math&amp;gt; Bytes&lt;br /&gt;
| &amp;lt;math&amp;gt;0 \sim 2^{64}-1&amp;lt;/math&amp;gt;，约 &amp;lt;math&amp;gt;0 \sim 1.8\times 10^{19}&amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;%llu&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;%llu&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 类型转换 ===&lt;br /&gt;
&lt;br /&gt;
- 用一个目标类型的数参与运算（必须是更优先的类型）：&lt;br /&gt;
  - &amp;lt;code&amp;gt;1.0 * a&amp;lt;/code&amp;gt;&lt;br /&gt;
  - &amp;lt;code&amp;gt;1LL * a&amp;lt;/code&amp;gt;（默认情况下 &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; 为 &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; 类型，在后面加上 &amp;lt;code&amp;gt;ll&amp;lt;/code&amp;gt; 或 &amp;lt;code&amp;gt;LL&amp;lt;/code&amp;gt; 可以得到一个 &amp;lt;code&amp;gt;long long&amp;lt;/code&amp;gt; 类型的 &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;）&lt;br /&gt;
- 存入一个目标类型的变量：&lt;br /&gt;
  - &amp;lt;code&amp;gt;char c = &amp;#039;a&amp;#039; - 32;&amp;lt;/code&amp;gt;&lt;br /&gt;
- 用 &amp;lt;code&amp;gt;(type)&amp;lt;/code&amp;gt; 前缀，这个前缀会把紧跟着的数变为 &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; 类型：&lt;br /&gt;
  - &amp;lt;code&amp;gt;(double)p / q&amp;lt;/code&amp;gt;&lt;br /&gt;
  - &amp;lt;code&amp;gt;(char)(&amp;#039;a&amp;#039; - 32)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:基础语法]]&lt;br /&gt;
[[Category:三三文档]]&lt;/div&gt;</summary>
		<author><name>-&gt;Importer</name></author>
	</entry>
</feed>