You are not logged in. Please login at www.codechef.com to post your questions!

×

Weak test cases in HISTOSIM

https://www.codechef.com/ISCC2017/problems/HISTOSIM

In the problem HISTOSIM, the following test case should fail:

abcdefghijklmnopqrstuvwxyz bacdefghijklmnopqrstuvwxyz

Since all 26 characters of the alphabet are used there is no "temp" element to use for substitution in changing one string into another.

asked 18 Jul '17, 13:25

aayushagra101's gravatar image

2★aayushagra101
-1
accept rate: 0%


... That's explained in the rules right?

1. Replace only happens when new character doesn't already exists in P.

In short, if there's no free letter (all letter is used as you said) then the answer should be "NO".

link

answered 18 Jul '17, 18:11

seraphwedd_17's gravatar image

2★seraphwedd_17
654
accept rate: 9%

1

Explained in the rules, yes. There is no test case however that checks for YES or NO in such a condition. My code that gives YES got AC.

(20 Jul '17, 14:53) aayushagra1012★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,238
×361

question asked: 18 Jul '17, 13:25

question was seen: 458 times

last updated: 20 Jul '17, 14:53