编程介的小学生 2017-09-23 14:58 采纳率: 20.5%
浏览 804
已采纳

DEL command

Description

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

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.
Output

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.
Sample Input

-BP.EXE
-BPC.EXE
+TURBO.EXE
Sample Output

DEL ?P*.*

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-10-11 10:39
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据