The well known Hollywood student Greenlight Casting Couch is releasing one of their hits in a directors cut edition.  The editor starts with the scenes in the orginal order and repeatedly swaps pairs of scenes until they are in the new order. Given the order of the scenes in the old and new versions of the film.  Write a program to determine the smallest number of swaps required to edit the film.


Taken from the 2005 Informatics Olympiad.  

Click here to view all the competition tasks. 

© British Informatics Olympiad


About CDB 361 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.