Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

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

Created by Richard Zapor

This Challenge is derived from GJam 2013 China Bad Horse partial of data set #2. Cody appears to have a testsuite size limit so only 32 of 100 cases are loaded. Brute force of 2^100 permutations may time out. The problem is codified using a cell array of names.

The Challenge involves creating two teams with no pair of individuals on either team having a conflict. The input is a list of pairs of individuals who can not be placed on the same team. The Challenge is to determine if two teams can be created that do not have any players with conflicts.

Input: conflicted name pairs (cell array of pairs of names)

Output: TF (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)

Competition Summary: Best Time of 11 minutes, 707 out of 776 correct

Problem Group

Solution Statistics

19 correct solutions 10 incorrect solutions
Last solution submitted on Oct 14, 2013

Problem Comments

Solution Comments