首先:

1.下载flex的sdk,如果你电脑有装flash builder,它自带了一份,位于安装目录的sdks目录下。

备注:(sdk依赖java的jre)

2.配置mxmlc的java运行环境jre,该配置文件位于sdk/bin/jvm.config,更改java.home=jre所在目录。

3.配置mxmlc的环境变量,改环境变量exe,位于sdk/bin/mxmlc.exe,控制台输入:mxmlc,没报错证明配置成功。

注意:如果不配置,并且你之前有配置过java的jre,那么mxmlc会默认为java的jre。

然后:需要一个编译项目的配置文件flex-config .xml,该文件可以在sdk的frameworks目录可以找到。可以参考以下完整的:

<?xml version="1.0"?>

<!--

    ADOBE SYSTEMS INCORPORATED
Copyright 2005-2007 Adobe Systems Incorporated
All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the license agreement accompanying it. --> <flex-config>
<!-- Specifies the minimum player version that will run the compiled SWF. -->
<target-player>11.1</target-player> <!-- Specifies the version of the compiled SWF -->
<swf-version>14</swf-version> <compiler> <!-- Turn on generation of accessible SWFs. -->
<accessible>true</accessible> <!-- Specifies the locales for internationalization. -->
<locale>
<locale-element>en_US</locale-element>
</locale> <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
<!-- not set -->
<!--
<source-path>
<path-element>string</path-element>
</source-path>
--> <!-- Allow the source-path to have path-elements which contain other path-elements -->
<allow-source-path-overlap>false</allow-source-path-overlap> <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
<!-- code. -->
<show-actionscript-warnings>true</show-actionscript-warnings> <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
<!-- but true by default for compc. -->
<!--
<debug>true</debug>
--> <!-- List of SWC files or directories to compile against but to omit from -->
<!-- linking. -->
<external-library-path>
<path-element>${flexlib}/libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc</path-element>
</external-library-path> <!-- not set --> <!--<include-libraries>
<library>src/res/comlib.swc</library>
</include-libraries>
--> <!-- List of SWC files or directories that contain SWC files. -->
<library-path>
<path-element>${flexlib}/libs</path-element>
<path-element>${flexlib}/libs/mx</path-element>
<path-element>${flexlib}/locale/{locale}</path-element>
<!-- The following entry is because LCDS copies playerfds.swc in the player folder -->
<path-element>${flexlib}/libs/player</path-element>
<path-element>${flexlib}/src/res</path-element>
</library-path> <namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
<!-- elements. -->
<namespace>
<uri>http://ns.adobe.com/mxml/2009</uri>
<manifest>${flexlib}/mxml-2009-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.adobe.com/flex/spark</uri>
<manifest>${flexlib}/spark-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.adobe.com/flex/mx</uri>
<manifest>${flexlib}/mx-manifest.xml</manifest>
</namespace>
<namespace>
<uri>http://www.adobe.com/2006/mxml</uri>
<manifest>${flexlib}/mxml-manifest.xml</manifest>
</namespace>
</namespaces> <!-- Enable post-link SWF optimization. -->
<optimize>true</optimize> <!-- Enable trace statement omission. -->
<omit-trace-statements>true</omit-trace-statements> <!-- Keep the following AS3 metadata in the bytecodes. -->
<!-- Warning: For the data binding feature in the Flex framework to work properly, -->
<!-- the following metadata must be kept: -->
<!-- 1. Bindable -->
<!-- 2. Managed -->
<!-- 3. ChangeEvent -->
<!-- 4. NonCommittingChangeEvent -->
<!-- 5. Transient -->
<!--
<keep-as3-metadata>
<name>Bindable</name>
<name>Managed</name>
<name>ChangeEvent</name>
<name>NonCommittingChangeEvent</name>
<name>Transient</name>
</keep-as3-metadata>
--> <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
<!-- will not be able to detect assignments to "foo". -->
<show-binding-warnings>true</show-binding-warnings> <!-- toggle whether warnings generated from unused type selectors are displayed -->
<show-unused-type-selector-warnings>true</show-unused-type-selector-warnings> <!-- Run the AS3 compiler in strict error checking mode. -->
<strict>true</strict> <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
<!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
<!-- (-strict is recommended, but not required, for earlier errors) -->
<as3>true</as3> <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
<!-- properties. In the prototype based object model built-in functions are implemented as dynamic -->
<!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for -->
<!-- references to dynamic properties) -->
<es>false</es> <!-- List of CSS or SWC files to apply as a theme. -->
<theme>
<!-- The Flex 4 default theme is Spark. -->
<filename>${flexlib}/themes/Halo/halo.swc</filename>
</theme> <!-- Turns on the display of stack traces for uncaught runtime errors. -->
<verbose-stacktraces>false</verbose-stacktraces> <!-- Defines the AS3 file encoding. -->
<!-- not set -->
<!--
<actionscript-file-encoding></actionscript-file-encoding>
--> <fonts> <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
<!-- fonts. This setting can be overriden in CSS for specific fonts. -->
<!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
<advanced-anti-aliasing>true</advanced-anti-aliasing> <!-- The number of embedded font faces that are cached. -->
<max-cached-fonts>20</max-cached-fonts> <!-- The number of character glyph outlines to cache for each font face. -->
<max-glyphs-per-face>1000</max-glyphs-per-face> <!-- Defines ranges that can be used across multiple font-face declarations. -->
<!-- See flash-unicode-table.xml for more examples. -->
<!-- not set -->
<!--
<languages>
<language-range>
<lang>englishRange</lang>
<range>U+0020-007E</range>
</language-range>
</languages>
--> <!-- Compiler font manager classes, in policy resolution order-->
<managers>
<manager-class>flash.fonts.JREFontManager</manager-class>
<manager-class>flash.fonts.BatikFontManager</manager-class>
<manager-class>flash.fonts.AFEFontManager</manager-class>
<manager-class>flash.fonts.CFFFontManager</manager-class>
</managers> <!-- File containing cached system font licensing information produced via
java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
Will default to winFonts.ser on Windows XP and
macFonts.ser on Mac OS X, so is commented out by default.
-->
<local-fonts-snapshot>${flexlib}/localFonts.ser</local-fonts-snapshot> </fonts> <!-- Array.toString() format has changed. -->
<warn-array-tostring-changes>false</warn-array-tostring-changes> <!-- Assignment within conditional. -->
<warn-assignment-within-conditional>true</warn-assignment-within-conditional> <!-- Possibly invalid Array cast operation. -->
<warn-bad-array-cast>true</warn-bad-array-cast> <!-- Non-Boolean value used where a Boolean value was expected. -->
<warn-bad-bool-assignment>true</warn-bad-bool-assignment> <!-- Invalid Date cast operation. -->
<warn-bad-date-cast>true</warn-bad-date-cast> <!-- Unknown method. -->
<warn-bad-es3-type-method>true</warn-bad-es3-type-method> <!-- Unknown property. -->
<warn-bad-es3-type-prop>true</warn-bad-es3-type-prop> <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
<warn-bad-nan-comparison>true</warn-bad-nan-comparison> <!-- Impossible assignment to null. -->
<warn-bad-null-assignment>true</warn-bad-null-assignment> <!-- Illogical comparison with null. -->
<warn-bad-null-comparison>true</warn-bad-null-comparison> <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
<warn-bad-undefined-comparison>true</warn-bad-undefined-comparison> <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
<warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args> <!-- __resolve is no longer supported. -->
<warn-changes-in-resolve>false</warn-changes-in-resolve> <!-- Class is sealed. It cannot have members added to it dynamically. -->
<warn-class-is-sealed>true</warn-class-is-sealed> <!-- Constant not initialized. -->
<warn-const-not-initialized>true</warn-const-not-initialized> <!-- Function used in new expression returns a value. Result will be what the -->
<!-- function returns, rather than a new instance of that function. -->
<warn-constructor-returns-value>false</warn-constructor-returns-value> <!-- EventHandler was not added as a listener. -->
<warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error> <!-- Unsupported ActionScript 2.0 function. -->
<warn-deprecated-function-error>true</warn-deprecated-function-error> <!-- Unsupported ActionScript 2.0 property. -->
<warn-deprecated-property-error>true</warn-deprecated-property-error> <!-- More than one argument by the same name. -->
<warn-duplicate-argument-names>true</warn-duplicate-argument-names> <!-- Duplicate variable definition -->
<warn-duplicate-variable-def>true</warn-duplicate-variable-def> <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
<warn-for-var-in-changes>false</warn-for-var-in-changes> <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
<warn-import-hides-class>true</warn-import-hides-class> <!-- Use of the instanceof operator. -->
<warn-instance-of-changes>true</warn-instance-of-changes> <!-- Internal error in compiler. -->
<warn-internal-error>true</warn-internal-error> <!-- _level is no longer supported. For more information, see the flash.display package. -->
<warn-level-not-supported>true</warn-level-not-supported> <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
<warn-missing-namespace-decl>true</warn-missing-namespace-decl> <!-- Negative value will become a large positive value when assigned to a uint data type. -->
<warn-negative-uint-literal>true</warn-negative-uint-literal> <!-- Missing constructor. -->
<warn-no-constructor>false</warn-no-constructor> <!-- The super() statement was not called within the constructor. -->
<warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor> <!-- Missing type declaration. -->
<warn-no-type-decl>true</warn-no-type-decl> <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
<!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space. -->
<warn-number-from-string-changes>false</warn-number-from-string-changes> <!-- Change in scoping for the this keyword. Class methods extracted from an -->
<!-- instance of a class will always resolve this back to that instance. In -->
<!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
<!-- is invoked from. -->
<warn-scoping-change-in-this>false</warn-scoping-change-in-this> <!-- Inefficient use of += on a TextField.-->
<warn-slow-text-field-addition>true</warn-slow-text-field-addition> <!-- Possible missing parentheses. -->
<warn-unlikely-function-value>true</warn-unlikely-function-value> <!-- Possible usage of the ActionScript 2.0 XML class. -->
<warn-xml-class-has-changed>false</warn-xml-class-has-changed> </compiler> <!-- compute-digest: writes a digest to the catalog.xml of a library. Use this when the library will be used as a
cross-domain rsl.-->
<!-- compute-digest usage:
<compute-digest>boolean</compute-digest>
--> <!-- remove-unused-rsls: remove RSLs that are not being used by the application-->
<remove-unused-rsls>true</remove-unused-rsls> <!-- A list of runtime shared library URLs to be loaded before applications start. -->
<!-- not set -->
<!--
<runtime-shared-libraries>
<url>string</url>
<url>string</url>
</runtime-shared-libraries>
--> <!-- runtime-shared-library-path: specifies a SWC or directory to link against and an RSL URL to load with optional failover URLs -->
<!-- Framework SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/framework.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/framework_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>framework_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- TextLayout SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/textLayout.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>textLayout_2.0.0.232.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- Spark SWC-->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/spark.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/spark_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>spark_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- Sparkskins SWC-->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/sparkskins.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/sparkskins_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>sparkskins_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- RPC SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/rpc.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/rpc_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>rpc_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- Charts SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/charts.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/charts_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>charts_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- Spark_dmv SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/spark_dmv.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/spark_dmv_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>spark_dmv_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- OSMF SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/osmf.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/osmf_1.0.0.16316.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>osmf_1.0.0.16316.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- MX SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/mx/mx.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/mx_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>mx_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- Advancedgrids SWC -->
<runtime-shared-library-path>
<path-element>${flexlib}/libs/advancedgrids.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/advancedgrids_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>advancedgrids_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path> <!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
<static-link-runtime-shared-libraries>false</static-link-runtime-shared-libraries> <!-- target-player: specifies the version of the player the application is targeting.
Features requiring a later version will not be compiled into the application.
The minimum value supported is "9.0.0".-->
<!-- target-player usage:
<target-player>version</target-player>
--> <!-- Enables SWFs to access the network. -->
<use-network>true</use-network> <!-- Metadata added to SWFs via the SWF Metadata tag. -->
<metadata>
<title>Adobe Flex 4 Application</title>
<description>http://www.adobe.com/products/flex</description>
<publisher>unknown</publisher>
<creator>unknown</creator>
<language>EN</language>
</metadata> <!-- licenses: specifies a list of product and serial number pairs. -->
<!-- not set -->
<!--
<licenses>
<license>
<product>string</product>
<serial-number>number</serial-number>
</license>
</licenses>
--> </flex-config>

备注:

1.其中${flexlib} 代表sdk的frameworks目录。

2.由于我的项目是Halo主题,所以设置<filename>${flexlib}/themes/Halo/halo.swc</filename>指定主题,

如果是spark主题,则:<filename>${flexlib}/themes/Spark/spark.css</filename>。

最后:编写编译批处理

假定工程的application文件位于D:/project/src/test.mxml,依赖swc文件位于D:/project/src/lib目录,输出目录为D:/output

那么:建立批处理文件bulid.bat

@echo off
cls
set appPath=D:/project/src
set outPath=D:/output
mxmlc -load-config flex-config.xml %appPath%/test.mxml -library-path+=%appPath%/lib -output %outPath%/test.swf

flex mxmlc 手动编译项目的更多相关文章

  1. MyEclipse 怎样手动编译整个项目

    去掉自动编译的对勾,项目上就有build project,在菜单project->>build automatically. MyEclipse 菜单 Project->Build ...

  2. 手动编译websocket-sharp项目使其支持.net core

    以前项目中使用了websocket-sharp,挺好用.可惜,不支持.net core.好在手动编译很顺利: 从github下载源代码 创建dotnet core的类库,复制代码后并编译即可 dotn ...

  3. 走进JavaWeb技术世界12:从手动编译打包到项目构建工具Maven

    小李的Build之路(上) 转自: 刘欣 码农翻身 2016-07-10 摘要:手工Build的烦恼要不是为了和女朋友留在一个城市,小李肯定去北上广奋斗去了.现在他只能留在这个2.5线城市,进入这家软 ...

  4. ffmpeg为视频添加时间戳 - 手动编译ffmpeg

    FFMPEG给视频加时间戳水印 项目中需要给视频添加时间戳,理所当然最好用的办法是ffmpeg.在找到正确的做法前,还被网上的答案timecode给水了一下(水的不轻,在这里转了2天),大概是这样写的 ...

  5. intellij idea 热部署失效,需要手动编译类

    从网上看到的解决方案,做一下备忘: spring boot项目中遇到jrebel类需要手动编译才会触发热部署的问题(spring boot devtools一样的问题) 1.ctl + shift + ...

  6. Debian/Ubuntu手动编译安装MongoDB C++11驱动及驱动测试

    本文章仅限cnblogs网站内转载!请某网站自觉,遵纪守法,尊重原创! 系统环境情况: 最小化.无桌面环境 新安装的Debian 8 Server 版本操作系统虚拟机一台 手动编译安装MongoDB ...

  7. 删除bin后,Eclipse重新编译项目

    今天做"用java.util.Properties类读写配置文件"Demo时,在编译项目时由于配置资源文件一起写入bin了.而Demo修改了配置文件,从新运行时配置文件不再更新,于 ...

  8. Linux下手动编译shogun

    手动编译shogun,如果按照直接按照官网上的步骤进行,会踩非常多的坑,下面分享一下在下的编译过程,希望能为阁下提供些许借鉴. 1. git clone https://github.com/shog ...

  9. C# 反编译项目修复

    1.反编译测试程序 1>.将测试程序添加到.NET Reflector 2>.选中测试程序后右键选择导出 2.反编译项目修复 1>.问题一 问题现象: base.AutoScaleM ...

随机推荐

  1. 深入理解 KVC\KVO 实现机制 — KVC

    KVC和KVO都属于键值编程而且底层实现机制都是isa-swizzing,所以本来想放在一起讲的.但是篇幅有限所以就分成了两篇博文 KVO实现机制传送门 KVC概述 KVC是Key Value Cod ...

  2. Linux常用命令_(文件查看)

    文件查看主要有以下命令 cat.tac.more.less.head.tail.nl cat命令:是一个文本文件查看和连接工具.从第一个字节开始正向查看文件的内容,适用于小文件 以第一行开始,显示没有 ...

  3. Selenium学习

    Web测试:Selenium使用 2008-12-23 10:49 by 敏捷的水, 17940 阅读, 16 评论, 收藏, 编辑 本文包含的主要内容: Selenium简介 我应该使用哪一个Sel ...

  4. hdu2955

    #include<bits/stdc++.h> using namespace std; struct Bank { double cau; int money; }bank[]; ]; ...

  5. 绑定GoDaddy域名到OpenShift应用

    一.申请GoDaddy域名 二.托管OpenShift应用 三.绑定www.mydomain.com 四.重定向mydomin.com到www.mydomain.com 五.It's go time ...

  6. DP+BIT(优化复杂度) UESTC 1217 The Battle of Chibi

    题目传送门 题意:问n长度的序列,找出长度m的上升子序列的方案数. 分析:这个问题就是问:dp[i][j] = sum (dp[i-1][k]) (1 <= k <= n, a[k] &l ...

  7. MBR 基础

    1.简介 MBR,全称为Master Boot Record,即硬盘的主引导记录,它位于整个硬盘的0磁道0柱面1扇区,其主要对硬盘进行了组织,是在驱动器最前端的一段引导扇区. MBR是不属于任何一个操 ...

  8. BZOJ3356 : [Usaco2004 Jan]禁闭围栏

    首先将坐标离散化,考虑从左往右扫描线 碰到插入操作则插入 碰到删除操作的: 当前包含i的矩形数=y1在[1,y2[i]]之间的矩形数-y2在[1,y1[i]-1]之间的矩形数 用两棵树状数组维护即可, ...

  9. 【BZOJ】1191: [HNOI2006]超级英雄Hero(二分图匹配)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1191 一眼题,笑嘻嘻地写了匈牙利,提交..WA了?不科学!!!!!数组小了??不思考了,改大提交,. ...

  10. POJ 3071 Football(概率DP)

    题目链接 不1Y都对不住看过那么多年的球.dp[i][j]表示i队进入第j轮的概率,此题用0-1<<n表示非常方便. #include <cstdio> #include &l ...