Skip to content

Instantly share code, notes, and snippets.

@Eckankar
Created October 6, 2013 08:57
Show Gist options
  • Select an option

  • Save Eckankar/6851436 to your computer and use it in GitHub Desktop.

Select an option

Save Eckankar/6851436 to your computer and use it in GitHub Desktop.
Fwnies' solution to NCPC 2013 problem G
n = int(raw_input())
l1 = raw_input()
l2 = raw_input()
flipped = all(x <> y for x, y in zip(l1, l2))
if n % 2 == 0:
res = l1 == l2
else:
res = flipped
if res:
print 'Deletion succeeded'
else:
print 'Deletion failed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment