Cody

Problem 1883. GJam 2013 China Event: Happy Teams 100 Pairs

Solution 2977630

Submitted on 22 Sep 2020 by Rafael S.T. Vieira
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

2   Pass
names={{'Dr_Evil' 'Devastation'} {'Dr_Evil' 'Southpaw'} {'Dr_Evil' 'Lagomorph'} {'Dr_Evil' 'Rampage'} {'Dr_Evil' 'Unicron'} {'Dr_Evil' 'Magenta'} {'Dr_Evil' 'Silver_Swan'} {'Dr_Evil' 'Zaladane'} {'Dr_Evil' 'Jason_Kreis'} {'Dr_Evil' 'Lotso'} }; exp=1; TF=Make_Teams(names); assert(TF==exp)

3   Pass

4   Pass

5   Pass

6   Pass
names={{'Princess_Python' 'Abominatrix'} {'Mai_Shen' 'Devastation'} {'Abominatrix' 'Mai_Shen'} {'Devastation' 'Princess_Python'} }; exp=1; TF=Make_Teams(names); assert(TF==exp)

7   Pass

8   Pass

9   Pass

10   Pass
names={{'Spider_Girl' 'Blue_Snowman'} {'Blue_Snowman' 'Roulette'} {'Roulette' 'Spider_Girl'} }; exp=0; TF=Make_Teams(names); assert(TF==exp)

11   Pass
names={{'Rampage' 'Fury_Leika'} {'Tigress' 'Princess_Python'} {'Syndrome' 'Animora'} {'Maxima' 'Prank'} {'Queen_Of_Fables' 'Queen_Bee'} {'Queen_Of_Fables' 'Doctor_Cyber'} {'Magpie' 'Queen_Bee'} {'Shimmer' 'Golddigger'} {'Rampage' 'Queen_Clea'} {'Magpie' 'Abominatrix'} {'Maxima' 'Titania'} {'Tigress' 'Prank'} {'Decay' 'Prank'} {'Spider_Girl' 'Jewelee'} {'Magpie' 'Princess_Python'} {'Eviless' 'Abominatrix'} {'Shimmer' 'Doctor_Cyber'} {'Star_Sapphire' 'Animora'} {'Star_Sapphire' 'Jinx'} {'Yellowjacket' 'Blue_Snowman'} {'Star_Sapphire' 'Queen_Clea'} {'Black_Mamba' 'Jewelee'} {'Star_Sapphire' 'Blue_Snowman'} {'Magpie' 'Titania'} {'Spider_Girl' 'Abominatrix'} {'Lashina' 'Dr_Evil'} {'Margaret_Love' 'Prank'} {'Lotso' 'Fury_Leika'} {'Maxima' 'Abominatrix'} {'Decay' 'Queen_Clea'} {'Star_Sapphire' 'Doctor_Cyber'} {'Maxima' 'Queen_Clea'} {'Yellowjacket' 'Abominatrix'} {'Syndrome' 'Sun_Girl'} {'Rampage' 'Windfall'} {'Lotso' 'Titania'} {'Syndrome' 'Blue_Snowman'} {'Plastique' 'Queen_Clea'} {'Magpie' 'Sun_Girl'} {'Lady_Clay' 'Queen_Clea'} {'Eviless' 'Princess_Python'} {'Fake_Thomas_Jefferson' 'Blue_Snowman'} {'Rampage' 'Animora'} {'Fake_Thomas_Jefferson' 'Sun_Girl'} {'Star_Sapphire' 'Abominatrix'} {'Black_Mamba' 'Poundcakes'} {'Plastique' 'Sun_Girl'} {'Lady_Clay' 'Titania'} {'Fake_Thomas_Jefferson' 'Windfall'} {'Shimmer' 'Osira'} {'Lady_Clay' 'Ursa'} {'Syndrome' 'Queen_Bee'} {'Maxima' 'Blue_Snowman'} {'Lady_Clay' 'Dr_Evil'} {'Decay' 'Amy_Madison'} {'Tigress' 'Jinx'} {'Spider_Girl' 'Jinx'} {'Margaret_Love' 'Titania'} {'Star_Sapphire' 'Poundcakes'} {'Plastique' 'Doctor_Cyber'} {'Black_Mamba' 'Amy_Madison'} {'Tigress' 'Titania'} {'Lashina' 'Golddigger'} {'Eviless' 'Dr_Evil'} {'Magenta' 'Windfall'} {'Yellowjacket' 'Princess_Python'} {'Syndrome' 'Prank'} {'Shimmer' 'Poundcakes'} {'Decay' 'Fury_Leika'} {'Decay' 'Windfall'} {'Black_Mamba' 'Golddigger'} {'Rampage' 'Abominatrix'} {'Syndrome' 'Golddigger'} {'Maxima' 'Fury_Leika'} {'Eviless' 'Jewelee'} {'Lashina' 'Blue_Snowman'} {'Lady_Clay' 'Jinx'} {'Lady_Clay' 'Windfall'} {'Magpie' 'Ursa'} {'Eviless' 'Prank'} {'Tigress' 'Abominatrix'} {'Star_Sapphire' 'Eviless'} {'Tigress' 'Fury_Leika'} {'Magenta' 'Ursa'} {'Yellowjacket' 'Jewelee'} {'Yellowjacket' 'Ursa'} {'Plastique' 'Osira'} {'Tigress' 'Sun_Girl'} {'Tigress' 'Golddigger'} {'Spider_Girl' 'Windfall'} {'Fake_Thomas_Jefferson' 'Amy_Madison'} {'Magenta' 'Fury_Leika'} {'Star_Sapphire' 'Amy_Madison'} {'Magenta' 'Blue_Snowman'} {'Plastique' 'Ursa'} {'Fake_Thomas_Jefferson' 'Abominatrix'} {'Lotso' 'Jewelee'} {'Lotso' 'Jinx'} {'Maxima' 'Animora'} {'Magenta' 'Sun_Girl'} }; exp=0; TF=Make_Teams(names); assert(TF==exp)

12   Pass

13   Pass

14   Pass

15   Pass

16   Pass

17   Pass

18   Pass
names={{'Magpie' 'Blue_Snowman'} {'Magpie' 'Lafety_Le_Fei'} {'Magpie' 'Lady_Quark'} {'Magpie' 'Lady_Shiva'} {'Magpie' 'The_Crimson_Ghost'} {'Magpie' 'Purgatori'} {'Magpie' 'Titania'} {'Magpie' 'Nyssa_Raatko'} {'Magpie' 'Mephista'} }; exp=1; TF=Make_Teams(names); assert(TF==exp)

19   Pass

20   Pass

21   Pass

22   Pass
names={{'Genevieve_Savidge' 'Queen_Of_Fables'} {'Genevieve_Savidge' 'Spider_Girl'} {'Gru' 'Trinity'} {'Genevieve_Savidge' 'Trinity'} {'Gru' 'Spider_Girl'} {'Unicron' 'Queen_Of_Fables'} {'Unicron' 'Trinity'} {'Unicron' 'Spider_Girl'} {'Gru' 'Queen_Of_Fables'} }; exp=1; TF=Make_Teams(names); assert(TF==exp)

23   Pass

24   Pass
names={{'The_Lightning' 'Saturn_Queen'} {'The_Lightning' 'Tigress'} {'Princess_Python' 'Superwoman'} {'Princess_Python' 'Tigress'} {'The_Lightning' 'Black_Mamba'} {'The_Lightning' 'Osira'} {'Princess_Python' 'Osira'} {'Princess_Python' 'Saturn_Queen'} {'Princess_Python' 'Black_Mamba'} {'The_Lightning' 'Superwoman'} }; exp=1; TF=Make_Teams(names); assert(TF==exp)

25   Pass

26   Pass

27   Pass
names={{'Gru' 'Prank'} {'Lady_Shiva' 'Spider_Girl'} {'Gru' 'Spider_Girl'} {'Lady_Shiva' 'Prank'} }; exp=1; TF=Make_Teams(names); assert(TF==exp)

28   Pass

29   Pass
names={{'Mai_Shen' 'Windfall'} {'Syndrome' 'Queen_Bee'} {'Dr_Horrible' 'Mai_Shen'} {'Windfall' 'Animora'} {'New_Wave' 'Dr_Horrible'} {'Animora' 'Syndrome'} {'Queen_Bee' 'New_Wave'} }; exp=0; TF=Make_Teams(names); assert(TF==exp)

30   Pass

31   Pass

32   Pass
names={{'Mephista' 'Mothergod'} }; exp=1; TF=Make_Teams(names); assert(TF==exp) toc

Elapsed time is 1.195189 seconds.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!