Page 2 of 2

Posted: Wed Jul 10, 2002 11:29 pm
by Caesum
thnx xenon, inspiration...... did it :)

Posted: Wed Jul 24, 2002 10:46 am
by somov
One more test :
-AAA.EXE
-AAB.EXE
+AA.EXE
Correct answer :
DEL AA?.EXE

Multiple input

Posted: Thu Oct 31, 2002 11:43 am
by MV
Although not mentioned in the problem description, the problem input is in the multiple input format as indicated by the green submit icon in the contents list.
If your program knows this and still gets WA, your problem is somewhere else.

Posted: Mon Dec 30, 2002 8:49 am
by epsilon0
this problem is easy, i'm surprised it only has 4-5% of AC.

as Picard put it, all you have to do is cook the tightest rule to describe the set of files to delete, then check wether this rule (wildcard) is incompatible with all files to keep.

there are 3 kind of rules:

1- the name of all files to be deleted have the same length.
2- the name of all files to be deleted have length greater than MIN
3- the name of all files to be deleted have character X in position P

1- is stronger than 2- (thus should be preferred)

this applies to both the name and extension of course.

either rule 1 or rule 2 should be considered each time.

rule 1 results in a wildcard of the form: *******
and rule 2: *****?

then rule 3 is used to replace the *'s by letters (or numbers)

i'm pretty sure you can't get a stronger specification of the files.

the checking part is straightforward. just note that in case NO file is to be kept, a good DEL *.* will do the trick :)

Re: 502 - DEL COMMAND

Posted: Sun Sep 19, 2010 8:14 pm
by ansiemens
following is my WA code, I have tried the input mention above and gotten correct answer.
But it can not pass.
I just can not figure out where is the error part.
Any tricky input or any flaws this code?
thks

Code: Select all

 delete after AC
 any one need my code for more thinking or any discussion, welcome to PM me.

Re: 502 - DEL COMMAND

Posted: Sun Sep 19, 2010 9:46 pm
by ansiemens
Sorry, I have found the error.
The input size of each line would be at most [+-]+8 chars+'.'+3+'\0' => 14, and I used only ten char to handle.
ansiemens wrote:following is my WA code, I have tried the input mention above and gotten correct answer.
But it can not pass.
I just can not figure out where is the error part.
Any tricky input or any flaws this code?
thks

Re: 502 - DEL command

Posted: Sun Apr 16, 2017 2:20 pm
by metaphysis

Code: Select all

-AAAAAAA.223
-AAAAAAA.22
-AAAAAAA.227
-AAAAAAA.233
+AAAAAAA.2

Code: Select all

DEL·AAAAAAA.2?*