DMOPC '19 Contest 4 P0 - Yikes

View as PDF

Submit solution


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

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 \leq |A| \leq 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


  • -3
    jfuN  commented on Feb. 15, 2020, 4:35 p.m.

    why is test case 21 not working :(


    • 1
      aydin  commented on March 21, 2020, 4: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.


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

    The superiority of JavaScript has been proven.

    enter image description here


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

      look up