Cody

Solution 319980

Submitted on 16 Sep 2013 by Tim
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% tic names={'Daniil Barantsev' 'Maria Balaba' 'Krisztina Barta' 'Patrice Archetto' 'Petra Arponen' 'Giovanna Almeida Leto' 'Tanith Belbin' 'Melania Albea' 'Lubov Bakirova' 'Mao Asada' }; exp=5; cost=sort_cost(names); assert(cost==exp)

2   Pass
%% names={'Fedor Andreev' 'Alessia Aureli' }; exp=1; cost=sort_cost(names); assert(cost==exp)

3   Pass
%% names={'Jeremy Allen' 'Vazgen Azrojan' 'Zabato Bebe' 'An Ni' 'Vladimir Belomoin' 'Julia Beloglazova' 'Irina Babenko' 'Vitali Baranov' 'Vadim Akolzin' 'Mai Asada' }; exp=7; cost=sort_cost(names); assert(cost==exp)

4   Pass
%% names={'Vitali Babkin' }; exp=0; cost=sort_cost(names); assert(cost==exp)

5   Pass
%% names={'Mary Grace Baldo' 'Dmitri Antoni' 'Andrew Bassi' 'Tanith Belbin' 'Emilia Ahsan' 'Adrian Alvarado' 'Michael Bahoric' 'Vitali Babkin' 'Charlotte Belair' 'Annie Bellemare' }; exp=7; cost=sort_cost(names); assert(cost==exp)

6   Pass
%% names={'Vitali Baranov' 'William Beier' 'Charlotte Belair' 'Andrei Bekh' 'Letizia Alessandrini' 'Oksana Baiul' 'Felicia Beck' 'Margaret Albia' 'Johanna Allik' 'Christiane Berger' }; exp=8; cost=sort_cost(names); assert(cost==exp)

7   Pass
%% names={'Vadim Akolzin' 'Dmitri Antoni' 'Petra Arponen' 'Felicia Beck' 'Letizia Alessandrini' 'Marina Anissina' 'Alisa Allapach' 'An Yang' 'Tobias Bayer' 'Imola Antal' }; exp=9; cost=sort_cost(names); assert(cost==exp)

8   Pass
%% names={'Stuart Beckingham' 'Ryan Arnold' 'Vazgen Azrojan' 'Oksana Baiul' 'Laurent Alvarez' 'Vitali Baranov' 'Tayfun Anar' 'Andrei Bekh' 'Evan Bates' 'Ilia Averbukh' }; exp=7; cost=sort_cost(names); assert(cost==exp)

9   Pass
%% names={'Alibel Alegre' 'Alla Beknazarova' 'Andrew Bassi' 'Megan Allely' 'Elladj Balde' 'Tatiana Basova' 'Olga Akimova' 'Marta Andrade' 'Mao Asada' 'Becky Bereswill' }; exp=5; cost=sort_cost(names); assert(cost==exp)

10   Pass
%% names={'Laurent Alvarez' 'Mary Grace Baldo' 'Julia Abolina' 'Krisztina Barta' 'Marina Aganina' 'Becky Bereswill' 'Olga Akimova' 'Vazgen Azrojan' 'Elena Berezhnaya' 'Yann Abback' }; exp=5; cost=sort_cost(names); assert(cost==exp)

11   Pass
%% names={'Mao Asada' 'Vitali Baranov' 'Rinata Araslanova' 'Margaret Albia' 'Giovanna Almeida Leto' 'Hanna Asadchaya' 'Andrew Bassi' 'Marina Anissina' 'Tayfun Anar' 'Birce Atabey' }; exp=8; cost=sort_cost(names); assert(cost==exp)

12   Pass
%% names={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' }; exp=3; cost=sort_cost(names); assert(cost==exp)

13   Pass
%% names={'Marina Anissina' 'Valentina Anselmi' 'Spencer Barnes' 'Ivan Bariev' 'Miki Ando' 'Alexandra Baurina' 'Maria Balaba' 'Andrew Bassi' 'Imola Antal' 'Anastasia Belova' }; exp=8; cost=sort_cost(names); assert(cost==exp)

14   Pass
%% names={'Felicia Beck' 'William Beier' 'John Baldwin' 'Julia Beloglazova' 'Margaret Albia' 'Colette Appel' 'Maria Balaba' 'Olga Akimova' 'Daniil Barantsev' 'Sara Beikircher' }; exp=8; cost=sort_cost(names); assert(cost==exp)

15   Pass
%% names={'Petra Arponen' 'Christina Beier' 'Alexei Beletski' 'Tayfun Anar' 'Saulius Ambrulevicius' 'Patrice Archetto' 'Rinata Araslanova' 'Sofia Bardakov' 'Alisa Allapach' 'Nadine Ahmed' }; exp=8; cost=sort_cost(names); assert(cost==exp)

16   Pass
%% names={'Jill Bakker' 'Kevin Alves' 'Adrian Alvarado' 'Florent Amodio' 'Andrei Bekh' 'Alisa Agafonova' 'Gabor Balint' 'Giovanna Almeida Leto' 'Letizia Alessandrini' 'Oksana Baiul' }; exp=6; cost=sort_cost(names); assert(cost==exp)

17   Pass
%% names={'Alisa Agafonova' 'Kevin Alves' 'Laurent Alvarez' }; exp=0; cost=sort_cost(names); assert(cost==exp)

18   Pass
%% names={'Miki Ando' 'Gloria Agogliati' 'An Yang' 'Felicia Beck' 'Tobias Bayer' 'Vitali Babkin' 'Andrei Bekh' 'Ivan Bariev' 'Melania Albea' 'Florent Amodio' }; exp=7; cost=sort_cost(names); assert(cost==exp)

19   Pass
%% names={'Alla Beknazarova' 'Erica Archambault' 'Fedor Andreev' 'Felicia Beck' 'Irina Babenko' 'Krisztian Andraska' 'Mai Asada' 'Marina Aganina' 'Melania Albea' 'Vadim Akolzin' }; exp=0; cost=sort_cost(names); assert(cost==exp)

20   Pass
%% names={'Michael Bahoric' 'Evan Bates' 'Olga Akimova' 'Emilia Ahsan' 'Vitali Baranov' 'Erica Archambault' 'Charlotte Belair' 'Alexandra Baurina' 'Tayfun Anar' 'Vera Bazarova' }; exp=7; cost=sort_cost(names); assert(cost==exp)

21   Pass
%% names={'Zabato Bebe' 'Vera Bazarova' 'Spencer Barnes' 'Annie Bellemare' 'Krisztina Barta' 'Olga Akimova' 'Vadim Akolzin' 'Veronika Benesova' 'Adrian Alvarado' 'Alexander Abt' }; exp=9; cost=sort_cost(names); assert(cost==exp)

22   Pass
%% names={'Zabato Bebe' 'Gloria Agogliati' 'Elladj Balde' 'Colette Appel' 'An Yang' }; exp=4; cost=sort_cost(names); assert(cost==exp)

23   Pass
%% names={'Hanna Asadchaya' 'Ian Beharry' 'Julia Beloglazova' 'Michael Bahoric' 'Shizuka Arakawa' 'Spencer Barnes' 'Vera Bazarova' 'Vladimir Belomoin' }; exp=0; cost=sort_cost(names); assert(cost==exp)

24   Pass
%% names={'Emilia Ahsan' 'Alisa Allapach' 'Felicia Beck' 'Engin Ali Artan' 'Valentina Anselmi' 'Alexander Abt' 'Jill Bakker' 'Jody Annandale' 'Nina Bates' 'Irina Babenko' }; exp=7; cost=sort_cost(names); assert(cost==exp)

25   Pass
%% names={'Evan Bates' 'Sergei Baranov' 'Rie Arikawa' 'Florent Amodio' 'Nadine Ahmed' 'Alla Beknazarova' 'Sofia Bardakov' 'Alexander Abt' 'Birce Atabey' 'Charlotte Belair' }; exp=7; cost=sort_cost(names); assert(cost==exp)

26   Pass
%% names={'Alexander Abt' 'Charlotte Belair' 'Kristen Avis' 'Nadine Ahmed' 'Tanith Belbin' }; exp=0; cost=sort_cost(names); assert(cost==exp)

27   Pass
%% names={'Bogdan Berezenko' 'Veronika Benesova' 'Sarah Abitbol' 'Christiane Berger' 'Tayfun Anar' 'Giovanna Almeida Leto' 'Michael Bahoric' 'John Baldwin' 'Elladj Balde' 'Jill Bakker' }; exp=8; cost=sort_cost(names); assert(cost==exp)

28   Pass
%% names={'Elvis Stojko' 'Evgeni Plushenko' 'KristiYamaguchi' }; exp=0; cost=sort_cost(names); assert(cost==exp)

29   Pass
%% names={'Krisztian Andraska' 'Katarina Babalova' 'Annie Bellemare' 'Melania Albea' 'Petra Arponen' 'Irina Babenko' 'Johanna Allik' 'Sara Beikircher' 'Charlotte Belair' 'Miki Ando' }; exp=6; cost=sort_cost(names); assert(cost==exp)

30   Pass
%% names={'Oksana Baiul' 'MichelleKwan' }; exp=1; cost=sort_cost(names); assert(cost==exp)

31   Pass
%% names={'Alexei Beletski' 'Joelle Bastiaans' 'Alisa Allapach' 'Alisa Agafonova' 'Vladimir Belomoin' 'Letizia Alessandrini' 'Krisztina Barta' 'Becky Bereswill' 'Benjamin Agosto' 'Michael Bahoric' }; exp=7; cost=sort_cost(names); assert(cost==exp)

32   Pass
%% names={'Margaret Albia' 'Johanna Allik' 'Daniil Barantsev' 'Camilla Andersen' 'Andrei Bekh' 'Alla Beknazarova' }; exp=5; cost=sort_cost(names); assert(cost==exp)

33   Pass
%% names={'Alisa Allapach' 'Andrew Bassi' 'Daniil Barantsev' 'Hanna Asadchaya' 'Imola Antal' 'Jeremy Abbott' 'Jill Bakker' 'Marina Anissina' 'Rinata Araslanova' 'Shizuka Arakawa' }; exp=0; cost=sort_cost(names); assert(cost==exp)

34   Pass
%% names={'Tayfun Anar' 'Rinata Araslanova' 'Nina Bates' 'Michael Bahoric' 'Julia Abolina' 'Jeremy Abbott' 'Ian Beharry' 'Engin Ali Artan' 'Colette Appel' 'Birce Atabey' }; exp=9; cost=sort_cost(names); assert(cost==exp)

35   Pass
%% names={'Melania Albea' 'Nadine Ahmed' 'Miki Ando' 'Alexei Beletski' 'Florent Amodio' 'Jake Bennett' 'Camilla Andersen' 'Jeremy Allen' 'Rie Arikawa' 'Kristen Avis' }; exp=7; cost=sort_cost(names); assert(cost==exp)

36   Pass
%% names={'Laurent Alvarez' 'Katarina Babalova' 'Shizuka Arakawa' 'Elladj Balde' 'Daniil Barantsev' 'Gabor Balint' 'Adrian Alvarado' 'Andrew Bassi' 'Anastasia Belova' 'Krisztina Barta' }; exp=8; cost=sort_cost(names); assert(cost==exp)

37   Pass
%% names={'Alexandra Baurina' 'Jake Bennett' 'Marina Aganina' 'Marina Anissina' 'Vadim Akolzin' 'William Beier' }; exp=0; cost=sort_cost(names); assert(cost==exp)

38   Pass
%% names={'Adrian Alvarado' 'Alisa Agafonova' 'Charlotte Belair' 'Evan Bates' 'Gloria Agogliati' 'Pascale Bergeron' 'Sarah Abitbol' 'Stuart Beckingham' 'Tayfun Anar' }; exp=0; cost=sort_cost(names); assert(cost==exp)

39   Pass
%% names={'Miguel Ballesteros' 'Julia Beloglazova' 'Eve Bentley' 'Spencer Barnes' 'Jeremy Allen' 'Megan Allely' 'Katarina Babalova' 'Birce Atabey' 'Jeremy Abbott' 'Vladimir Belomoin' }; exp=7; cost=sort_cost(names); assert(cost==exp)

40   Pass
%% names={'Engin Ali Artan' 'Christiane Berger' 'Petra Arponen' 'Veronika Benesova' 'Vera Bazarova' 'Andrew Bassi' 'Anastasia Belova' 'Kristen Avis' 'Margaret Albia' 'Alexei Beletski' }; exp=7; cost=sort_cost(names); assert(cost==exp)

41   Pass
%% names={'Alexandra Baurina' 'Gabor Balint' 'Emili Arm' 'Elena Berezhnaya' 'Tanith Belbin' 'Dmitri Antoni' 'Adrian Alvarado' 'Melania Albea' 'Andrew Bassi' 'Engin Ali Artan' }; exp=7; cost=sort_cost(names); assert(cost==exp)

42   Pass
%% names={'Gabor Balint' 'Imola Antal' 'Mao Asada' 'Jeremy Allen' 'Hanna Asadchaya' 'Charlotte Belair' 'Evan Bates' 'Alexei Beletski' 'William Beier' 'Michael Bahoric' }; exp=6; cost=sort_cost(names); assert(cost==exp)

43   Pass
%% names={'Giovanna Almeida Leto' 'Gabor Balint' 'Krisztian Andraska' 'Benjamin Agosto' 'Evan Bates' 'Maria Balaba' 'Marta Andrade' 'Ian Beharry' 'Tatiana Basova' 'Rie Arikawa' }; exp=5; cost=sort_cost(names); assert(cost==exp)

44   Pass
%% names={'Alexandra Baurina' 'Imola Antal' 'Evan Bates' 'Felicia Beck' 'Ian Beharry' 'Bogdan Berezenko' 'Becky Bereswill' 'Michael Bahoric' 'Tayfun Anar' 'Stuart Beckingham' }; exp=6; cost=sort_cost(names); assert(cost==exp)

45   Pass
%% names={'Charlotte Belair' 'An Yang' 'Paolo Bacchini' 'Olga Akimova' 'Vitali Baranov' 'Spencer Barnes' 'Valentina Anselmi' 'Annie Bellemare' 'Mary Grace Baldo' 'Ivan Bariev' }; exp=7; cost=sort_cost(names); assert(cost==exp)

46   Pass
%% names={'Katarina Babalova' 'Bogdan Berezenko' 'Marta Andrade' 'Vadim Akolzin' 'Spencer Barnes' 'Michael Bahoric' 'Krisztian Andraska' 'Alibel Alegre' 'Emilia Ahsan' 'Beril Bektas' }; exp=7; cost=sort_cost(names); assert(cost==exp)

47   Pass
%% names={'Birce Atabey' 'Anastasia Belova' 'Tobias Bayer' 'Kristen Avis' 'Rima Beliy' 'Andrew Bassi' 'Letizia Alessandrini' 'Alexei Beletski' 'Julia Abolina' 'Evan Bates' }; exp=8; cost=sort_cost(names); assert(cost==exp)

48   Pass
%% names={'Krisztian Andraska' 'Sarah Abitbol' 'Kristen Avis' 'Tayfun Anar' 'Vadim Akolzin' 'Letizia Alessandrini' 'Margaret Albia' 'Joelle Bastiaans' 'Pascale Bergeron' 'Elladj Balde' }; exp=6; cost=sort_cost(names); assert(cost==exp)

49   Pass
%% names={'Hanna Asadchaya' 'Johanna Allik' 'Nadine Ahmed' 'Sarah Abitbol' 'Elladj Balde' 'Jake Bennett' 'Saulius Ambrulevicius' 'Laurent Alvarez' 'Beril Bektas' 'Krisztina Barta' }; exp=5; cost=sort_cost(names); assert(cost==exp)

50   Pass
%% names={'Spencer Barnes' 'Shizuka Arakawa' 'Sara Beikircher' 'Ryan Arnold' 'Pascale Bergeron' 'Hanna Asadchaya' 'Bogdan Berezenko' 'Annie Bellemare' }; exp=7; cost=sort_cost(names); assert(cost==exp)

51   Pass
%% names={'Patrice Archetto' 'Vera Bazarova' 'Miki Ando' 'Beril Bektas' 'Rie Arikawa' 'Adrian Alvarado' 'Rima Beliy' 'Fedor Andreev' 'Megan Allely' 'Nina Bates' }; exp=8; cost=sort_cost(names); assert(cost==exp)

52   Pass
%% names={'Alexei Beletski' 'Letizia Alessandrini' }; exp=0; cost=sort_cost(names); assert(cost==exp)

53   Pass
%% names={'Sofia Bardakov' 'Julia Abolina' 'Tayfun Anar' 'Miguel Ballesteros' 'Daniil Barantsev' 'Elladj Balde' 'John Baldwin' 'Alisa Agafonova' 'Benjamin Agosto' 'Vera Bazarova' }; exp=7; cost=sort_cost(names); assert(cost==exp)

54   Pass
%% names={'Paolo Bacchini' 'Patrice Archetto' 'Anastasia Belova' 'Emili Arm' 'Ian Beharry' 'Evan Bates' 'Kevin Alves' 'Gabor Balint' 'Johanna Allik' 'Spencer Barnes' }; exp=7; cost=sort_cost(names); assert(cost==exp)

55   Pass
%% names={'Sergei Baranov' 'Mai Asada' 'Gabor Balint' 'Vazgen Azrojan' 'Christiane Berger' 'Alisa Allapach' 'Paolo Bacchini' 'An Yang' 'Lubov Bakirova' 'Stuart Beckingham' }; exp=8; cost=sort_cost(names); assert(cost==exp)

56   Pass
%% names={'Laurent Alvarez' 'Dmitri Antoni' 'Annie Bellemare' 'Veronika Benesova' 'Ivan Bariev' 'Emili Arm' 'An Yang' 'Colette Appel' 'Vitali Baranov' 'Fedor Andreev' }; exp=7; cost=sort_cost(names); assert(cost==exp)

57   Pass
%% names={'Birce Atabey' 'Camilla Andersen' 'Charlotte Belair' 'Daniil Barantsev' 'Krisztian Andraska' 'Mai Asada' 'Marina Aganina' 'Mary Grace Baldo' 'Shizuka Arakawa' 'Joelle Bastiaans' }; exp=1; cost=sort_cost(names); assert(cost==exp)

58   Pass
%% names={'Vitali Babkin' 'Colette Appel' 'Saulius Ambrulevicius' 'Fedor Andreev' 'Sofia Bardakov' 'Daniil Barantsev' 'Kevin Alves' 'Birce Atabey' 'Becky Bereswill' 'Letizia Alessandrini' }; exp=9; cost=sort_cost(names); assert(cost==exp)

59   Pass
%% names={'Ilia Averbukh' 'Jake Bennett' 'Julia Beloglazova' 'Petra Arponen' }; exp=0; cost=sort_cost(names); assert(cost==exp)

60   Pass
%% names={'Pascale Bergeron' 'Engin Ali Artan' 'Zabato Bebe' 'Shizuka Arakawa' 'Vazgen Azrojan' 'Elena Berezhnaya' 'Alisa Agafonova' 'Alisa Allapach' 'Laurent Alvarez' 'Marta Andrade' }; exp=8; cost=sort_cost(names); assert(cost==exp)

61   Pass
%% names={'Krisztina Barta' 'Marta Andrade' 'Andrei Bekh' 'Stuart Beckingham' 'Pascale Bergeron' 'Sara Beikircher' 'Ivan Bariev' 'Gabor Balint' 'Dmitri Antoni' 'Mao Asada' }; exp=7; cost=sort_cost(names); assert(cost==exp)

62   Pass
%% names={'Tanith Belbin' 'Marta Andrade' 'Zabato Bebe' 'Emilia Ahsan' 'Johanna Allik' 'Christina Beier' 'Alexander Abt' 'Shizuka Arakawa' 'Eve Bentley' 'Sara Beikircher' }; exp=8; cost=sort_cost(names); assert(cost==exp)

63   Pass
%% names={'Julia Abolina' 'Felicia Beck' 'Vadim Akolzin' 'Letizia Alessandrini' 'Gloria Agogliati' 'Olga Akimova' 'Christina Beier' 'Tayfun Anar' 'Adrian Alvarado' 'Elena Berezhnaya' }; exp=8; cost=sort_cost(names); assert(cost==exp)

64   Pass
%% names={'Alessia Aureli' 'Mao Asada' 'Mai Asada' 'Nadine Ahmed' 'Jeremy Abbott' 'Gabor Balint' 'Marina Anissina' 'Birce Atabey' 'Miguel Ballesteros' 'Beril Bektas' }; exp=7; cost=sort_cost(names); assert(cost==exp)

65   Pass
%% names={'Birce Atabey' 'Emilia Ahsan' 'Felicia Beck' 'Jeremy Allen' 'Oksana Baiul' 'Alisa Agafonova' 'Florent Amodio' 'Joelle Bastiaans' 'Michael Bahoric' 'Saulius Ambrulevicius' }; exp=4; cost=sort_cost(names); assert(cost==exp)

66   Pass
%% names={'Benjamin Agosto' 'Vitali Babkin' 'Vitali Baranov' 'Bogdan Berezenko' 'Mai Asada' 'Beril Bektas' 'Hanna Asadchaya' 'Camilla Andersen' 'An Yang' 'Rie Arikawa' }; exp=7; cost=sort_cost(names); assert(cost==exp)

67   Pass
%% names={'Tobias Bayer' 'Joelle Bastiaans' 'Alibel Alegre' 'Annie Bellemare' 'Alessia Aureli' 'Emili Arm' 'Florent Amodio' 'Julia Beloglazova' 'Birce Atabey' 'Sofia Bardakov' }; exp=9; cost=sort_cost(names); assert(cost==exp)

68   Pass
%% names={'Giovanna Almeida Leto' 'Alexandra Baurina' 'Marta Andrade' 'Julia Beloglazova' 'Felicia Beck' 'Johanna Allik' 'Rima Beliy' 'Gloria Agogliati' 'Rie Arikawa' 'Eve Bentley' }; exp=7; cost=sort_cost(names); assert(cost==exp)

69   Pass
%% names={'Zabato Bebe' 'Katarina Babalova' 'Elena Berezhnaya' }; exp=2; cost=sort_cost(names); assert(cost==exp)

70   Pass
%% names={'Zabato Bebe' 'Adrian Alvarado' 'Rinata Araslanova' 'Vitali Baranov' 'Yann Abback' 'Emili Arm' 'Marina Anissina' 'Engin Ali Artan' 'Jeremy Abbott' 'Alessia Aureli' }; exp=9; cost=sort_cost(names); assert(cost==exp)

71   Pass
%% names={'Jill Bakker' 'John Baldwin' 'Laurent Alvarez' 'Erica Archambault' 'Emilia Ahsan' 'Johanna Allik' 'Hanna Asadchaya' 'Alexandra Baurina' 'Vitali Babkin' 'Rinata Araslanova' }; exp=6; cost=sort_cost(names); assert(cost==exp)

72   Pass
%% names={'Fedor Andreev' 'Shizuka Arakawa' 'Oksana Baiul' 'Kevin Alves' 'Jody Annandale' 'Christiane Berger' 'Sofia Bardakov' 'Emilia Ahsan' 'Ryan Arnold' 'Tayfun Anar' }; exp=6; cost=sort_cost(names); assert(cost==exp)

73   Pass
%% names={'Sergei Baranov' 'Saulius Ambrulevicius' 'Michael Bahoric' 'Evan Bates' 'An Ni' 'Tobias Bayer' 'Christina Beier' 'Maria Balaba' 'Emili Arm' 'Jody Annandale' }; exp=8; cost=sort_cost(names); assert(cost==exp)

74   Pass
%% names={'Alexei Beletski' 'Florent Amodio' 'Marina Anissina' 'Margaret Albia' 'Michael Bahoric' 'Miki Ando' 'Gloria Agogliati' 'Evan Bates' 'Becky Bereswill' 'Alexandra Baurina' }; exp=5; cost=sort_cost(names); assert(cost==exp)

75   Pass
%% names={'Jill Bakker' 'Emilia Ahsan' 'Ian Beharry' 'Paolo Bacchini' 'Maria Balaba' 'Giovanna Almeida Leto' 'An Yang' 'Michael Bahoric' 'Fedor Andreev' 'Alisa Agafonova' }; exp=8; cost=sort_cost(names); assert(cost==exp)

76   Pass
%% names={'Jill Bakker' 'Vazgen Azrojan' 'Sara Beikircher' 'Eve Bentley' 'Alla Beknazarova' 'Pascale Bergeron' 'Tatiana Basova' 'Elena Berezhnaya' 'Oksana Baiul' 'Zabato Bebe' }; exp=7; cost=sort_cost(names); assert(cost==exp)

77   Pass
%% names={'Alessia Aureli' 'Alexei Beletski' 'Alisa Agafonova' 'Anastasia Belova' 'Colette Appel' 'Kevin Alves' 'Veronika Benesova' }; exp=0; cost=sort_cost(names); assert(cost==exp)

78   Pass
%% names={'Zabato Bebe' 'Tayfun Anar' 'Saulius Ambrulevicius' 'Miguel Ballesteros' 'Maria Balaba' 'Mai Asada' 'Lubov Bakirova' 'Edward Alton' 'Birce Atabey' }; exp=8; cost=sort_cost(names); assert(cost==exp)

79   Pass
%% names={'Miki Ando' 'Benjamin Agosto' 'Jeremy Allen' 'Adrian Alvarado' 'Alisa Allapach' 'Sofia Bardakov' 'Joelle Bastiaans' 'Margaret Albia' 'Erica Archambault' 'Kevin Alves' }; exp=8; cost=sort_cost(names); assert(cost==exp)

80   Pass
%% names={'Julia Beloglazova' 'Marina Aganina' 'Alisa Agafonova' 'Alexei Beletski' 'Camilla Andersen' 'Giovanna Almeida Leto' 'Colette Appel' 'Nina Bates' 'Tanith Belbin' 'Vitali Baranov' }; exp=5; cost=sort_cost(names); assert(cost==exp)

81   Pass
%% names={'Mao Asada' 'Dmitri Antoni' 'Marina Aganina' 'Annie Bellemare' 'Zabato Bebe' 'Andrew Bassi' 'Valentina Anselmi' 'Michael Bahoric' 'Jake Bennett' 'Mary Grace Baldo' }; exp=7; cost=sort_cost(names); assert(cost==exp)

82   Pass
%% names={'Shizuka Arakawa' 'Stuart Beckingham' 'Jeremy Abbott' 'Nadine Ahmed' 'Olga Akimova' 'Vadim Akolzin' 'Becky Bereswill' 'Charlotte Belair' 'Gabor Balint' 'Margaret Albia' }; exp=7; cost=sort_cost(names); assert(cost==exp)

83   Pass
%% names={'Beril Bektas' 'Stuart Beckingham' 'Jill Bakker' 'Daniil Barantsev' 'Sarah Abitbol' 'Benjamin Agosto' 'Andrei Bekh' 'Julia Beloglazova' 'Alibel Alegre' 'Nina Bates' }; exp=8; cost=sort_cost(names); assert(cost==exp)

84   Pass
%% names={'Charlotte Belair' 'Gloria Agogliati' 'Miguel Ballesteros' 'Hanna Asadchaya' 'Ilia Averbukh' 'Katarina Babalova' 'Tobias Bayer' 'Marta Andrade' 'Petra Arponen' 'Paolo Bacchini' }; exp=6; cost=sort_cost(names); assert(cost==exp)

85   Pass
%% names={'Evan Bates' 'Imola Antal' 'Eve Bentley' 'Miguel Ballesteros' 'Emili Arm' 'Rie Arikawa' 'Patrice Archetto' 'Julia Abolina' 'Jeremy Allen' 'Edward Alton' }; exp=6; cost=sort_cost(names); assert(cost==exp)

86   Pass
%% names={'Mary Grace Baldo' 'William Beier' 'Mai Asada' 'Vazgen Azrojan' 'Marina Anissina' 'Krisztian Andraska' 'Ivan Bariev' 'Tayfun Anar' 'Spencer Barnes' 'Maria Balaba' }; exp=8; cost=sort_cost(names); assert(cost==exp)

87   Pass
%% names={'Lubov Bakirova' 'Alexei Beletski' 'Mai Asada' 'William Beier' 'Shizuka Arakawa' 'Alla Beknazarova' 'Alessia Aureli' 'Miguel Ballesteros' 'Rinata Araslanova' 'Alexander Abt' }; exp=7; cost=sort_cost(names); assert(cost==exp)

88   Pass
%% names={'Vitali Baranov' 'Patrice Archetto' 'Charlotte Belair' 'Maria Balaba' 'Marina Anissina' 'Oksana Baiul' 'Alla Beknazarova' 'Shizuka Arakawa' 'Andrei Bekh' 'Zabato Bebe' }; exp=8; cost=sort_cost(names); assert(cost==exp)

89   Pass
%% names={'Krisztina Barta' 'Yann Abback' 'Johanna Allik' 'Andrew Bassi' 'Irina Babenko' 'Fedor Andreev' 'Emilia Ahsan' 'Mary Grace Baldo' 'Tanith Belbin' 'Spencer Barnes' }; exp=8; cost=sort_cost(names); assert(cost==exp)

90   Pass
%% names={'Shizuka Arakawa' 'Tanith Belbin' 'Hanna Asadchaya' 'Mai Asada' 'Krisztian Andraska' 'Gabor Balint' 'Sofia Bardakov' 'Gloria Agogliati' 'Valentina Anselmi' 'Alisa Agafonova' }; exp=7; cost=sort_cost(names); assert(cost==exp)

91   Fail