当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1443:DEL command

Special Judge 特殊评判
题目描述
It is required to find out whether it is possible to delete given files from MS-DOS directory executing the DEL command of MS-DOS operation system only once. There are no nested subdirectories.


A note

DEL command has the following format: DEL wildcard


The actual wildcard as well as a full file name can be made up either of a name containing 1 up to 8 characters or of a name and extension, containing up to 3 characters. The point character "." separates the extension from the file name. The extension can be empty and this is equivalent to a name without any extension (in this case a wildcard ends with a point). In a wildcard the characters "?" and "*" can be used. A question mark substitutes exactly one character of the full file name excluding a point, an asterisk - any sequence of characters (containing no points) even empty one. An asterisk can appear only at the last position of the name and the extension.


MS-DOS system can permit maybe other wildcards but they can not be used in this task. File names and extensions consist only of Latin capitals and digits.

输入解释
Input contains a list of full file names without empty lines and spaces. Each name is written in a separate line of input data file and preceded with a control sign: "-" for delete or "+" for keep. Full file names are not repeated. The list comprises at least one file, and at least one file is marked to be deleted. There are no more than 1000 files.
输出解释
Write to the first line of output the required DEL command (only one proposal) or IMPOSSIBLE if there is no solution. A space should separate "DEL" from wildcard.
输入样例
-BP.EXE
-BPC.EXE
+TURBO.EXE
输出样例
DEL ?P*.*

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-1443

最后修改于 2020-10-29T06:04:16+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 10000