DMOPC '19 Contest 4 P0 - Yikes

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Larry is having trouble making a problem for the DMOPC, and [REDACTED] is threatening to savage him, so he decides that he will make a nice string manipulation problem.

Given string A, determine if it is possible to make string B by changing exactly one character of string A to a different character. Both strings are of the same length, and will only consist of alphanumeric characters.

Input Specification

The first line of input will be string A (1 \le |A| \le 1000).

The next line of input will be string B (|A| = |B|).

Output Specification

LARRY IS SAVED! if it is possible to make string B from string A, given the restrictions.

LARRY IS DEAD! if it is not possible, given the restrictions.

Sample Input

abc
abd

Sample Output

LARRY IS SAVED!

Comments


  • -1
    jfuN  commented on Feb. 15, 2020, 9:35 p.m.

    why is test case 21 not working :(


    • 2
      aydin  commented on March 21, 2020, 8:25 p.m.

      Given string A, determine if it is possible to make string B by changing exactly one character of string A to a different character.

      Changing exactly one character, no more, no less.


  • -5
    c  commented on Jan. 9, 2020, 5:18 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • 12
      hewmatt10  commented on Jan. 11, 2020, 7:42 p.m.

      look up