Problem Statement
NOTE: There are images in this problem statement that help describe the problem. Please view the problem statement in the HTML window to view them.
In many GUI systems, the individual components (scrollbars, buttons, frames, etc.) are called Widgets. A Widget is a self-contained object which knows how to draw itself, and sometimes accepts user input. In some GUI systems, there are special Widgets called Manager Widgets which determine the layout of their children. A Manager Widget can have any number of children Widgets which will be drawn inside it. When a Manager Widget is expanded or contracted, it has the responsibility of resizing and relocating its children depending on how they need to be laid out. In some manager Widgets, this is done by "attaching" a side of the Widget to an attachment edge. Attachment edges can depend on each other so that they move in the correct fashion when the Manager Widget is resized.
There are two types of attachment edges, horizontal and vertical. Horizontal edges can only depend on other horizontal edges, and vertical edges can only depend on other vertical edges. Each attachment edge is defined with an optional reference edge, and an offset. The offset specifies how far in the X or Y direction from the reference edge that the attachment edge should be placed. If no reference is specified, then the edge is placed with absolute coordinates.
For example, we may have two horizontal attachment edges, and two vertical attachment edges. Let's say that the first horizontal is placed at Y = 60, the second is placed at an offset from the original edge of +100 (putting it at 160). Now let's say the first vertical edge is at X = 120, and the second vertical is at an offset from the first of -80 (putting it at 40). Here is a diagram of what this might look like:
If we place a widget with it's left edge at the second vertical edge, its right edge at the first vertical edge, its top at the first horizontal, and its bottom at the second horizontal, then the widget will be placed like this:
You will be given a
"<REF>+<OFFSET>" or "<REF>-<OFFSET>" or "+<OFFSET>"
In the above statements, <REF> and <OFFSET> represent non-negative integers. If <REF> is present, it will be an integer specifying the index of another edge in the same
Here is an example specifying the edges from the picture above:
edgesX = {"+120", "0-80"}
edgesY = {"+60", "0+100"}
Edge 0 of edgesX is placed at X coordinate 120.
Edge 1 of edgesX is placed 80 pixels to the left of edge 0, so it is at X coordinate 40.
Edge 0 of edgesY is placed at Y coordinate 60.
Edge 1 of edgesY is placed 100 pixels below edge 0, so it is at Y coordinate 160.
In addition to the edges, you will be given four
The return value should be a
Definition
- Class:
- Widget
- Method:
- getLayout
- Parameters:
- String[], String[], int, int, int, int
- Returns:
- int[]
- Method signature:
- int[] getLayout(String[] edgesX, String[] edgesY, int left, int right, int top, int bottom)
- (be sure your method is public)
Notes
- In this problem, the positive y axis is downards (towards the bottom of the screen), and the positive x axis is to the right.
Constraints
- edgesX will have between 1 and 50 elements, inclusive.
- edgesY will have between 1 and 50 elements, inclusive.
- Each element of edgesX and edgesY will have one of the following formats (quotes and angle brackets for clarity only):"+
""+ ""- " - Each instance of in elements of edgesX will be an integer between 0 and number of elements in edgesX - 1, inclusive, and will not contain extra leading zeros.
- Each instance of in elements of edgesY will be an integer between 0 and number of elements in edgesY - 1, inclusive, and will not contain extra leading zeros.
- In each element of edgesX and edgesY,
will be an integer between 0 and 1000, inclusive, and will not contain extra leading zeros. - No edge will depend on the location of itself.
- left and right will be between 0 and number of elements in edgesX - 1, inclusive.
- top and bottom will be between 0 and number of elements in edgesY - 1, inclusive.
Examples
{"+120", "0-80"}
{"+60", "0+100"}
1
0
0
1
Returns: { 40, 60, 120, 160 }
The example from above.
{"+120", "0-80"}
{"+60", "0+100"}
0
1
0
1
Returns: { }
These are the same attachment edges. Notice that we reversed the left and right attachments, so the widget layout is invalid.
{"+100", "+200", "0-1000"}
{"+100", "+200"}
0
1
0
1
Returns: { }
Notice that although the widget layout is valid given the attachments (It would be from (100, 100) to (200, 200)), the third attachment edge in edgesX is at -900, so this is an invalid edge.
{"+100"}
{"+100"}
0
0
0
0
Returns: { 100, 100, 100, 100 }
Widgets with 0 width and 0 height are allowed.
{"+50"}
{"+50"}
0
0
0
0
Returns: { 50, 50, 50, 50 }
{"+918", "2+170", "12+74", "12-10", "+666", "4+342", "3+262", "8+183", "+16", "0-665", "4-249", "6+935", "4-599"}
{"13+53", "13+925", "+14", "2+208", "2+920", "0+520", "8-180", "9+773", "13+109", "0+819", "+635", "3-106", "+599", "+90", "0+546", "10+740"}
9
3
8
13
Returns: { }
{"16-27", "26-720", "12+424", "36+340", "35+892", "6+387", "30-246", "9+996", "26+205", "29+844", "9-833", "6+558", "+222", "24+564", "24+126", "24+627", "15+97", "7+509", "16+803", "47+305", "31+904", "24+415", "41+957", "43-3", "29-366", "40-635", "15+927", "12+18", "7-313", "+467", "37-328", "24+916", "+579", "42-790", "7-955", "47-531", "13-491", "9-700", "16-104", "15-248", "+902", "37-33", "9+918", "42+797", "48+371", "31+843", "9-127", "29+87", "9+351"}
{"27-536", "3-397", "+586", "41+913", "18+565", "11+858", "18+255", "35-238", "18+621", "8+574", "42-177", "29+173", "39+599", "39-133", "11+915", "42+219", "29+317", "22+649", "39-28", "+374", "29-473", "22-42", "11-484", "19+775", "1-318", "26+508", "18+139", "11+939", "6+512", "39+453", "18+57", "13+63", "37-825", "32+452", "1+385", "18+100", "0-971", "+890", "6-316", "+223", "2+162", "2-193", "39+135", "2+131", "18+758"}
21
23
19
1
Returns: { 516, 374, 3023, 909 }
{"21+878", "5+1", "1+576", "14+768", "21+424", "+623", "23-20", "21+28", "16-359", "23+43", "18+815", "32+84", "32+48", "0+229", "16+265", "13+95", "31-484", "23+412", "21+260", "4-787", "26-809", "+383", "21+998", "31-624", "16-196", "27-134", "30+603", "5+741", "25+970", "13-578", "27-749", "+879", "4-264"}
{"2-396", "6-278", "16-98", "38+407", "2+464", "+337", "24+589", "5+217", "+562", "44+146", "5-78", "24-140", "22+328", "5+849", "35+699", "41-335", "38+362", "5+982", "28-995", "34+921", "17+811", "27+297", "6+945", "24+857", "+357", "24+179", "+531", "38-340", "38+436", "39-465", "38-766", "5+873", "4-356", "38+730", "24+428", "21+774", "2+230", "27+376", "+832", "16-187", "+546", "+828", "28+171", "31-299", "30+795", "14-143"}
18
21
27
18
Returns: { }
{"13+891", "3-187", "13+136", "+826", "2-436", "13-521", "13+149", "13+263", "5+43", "13+204", "5+92", "3+685", "3-312", "+530", "4+724", "7+481", "9+65", "+806", "1+600"}
{"13+787", "+652", "+416", "7-723", "6+891", "13-406", "7-878", "13+428", "0+22", "13-197", "13+908", "7+441", "0+575", "+532"}
0
3
10
8
Returns: { }
{"+472", "22+99", "5+768", "25-357", "19-844", "+155", "24+366", "10-310", "23-63", "17+204", "+455", "19-442", "5+882", "26+716", "20+214", "6+891", "19-217", "+5", "22+222", "22+831", "18-35", "23+51", "5-1", "5+138", "22+952", "5+955", "10+429", "5+664"}
{"29+961", "29-813", "32-138", "+77", "29+789", "29+776", "32+860", "8+492", "11+119", "+663", "23+249", "32+431", "31+325", "22-215", "27-2", "25+467", "29-484", "20+738", "21-324", "24-981", "3+914", "3+976", "+711", "20-514", "20+142", "3+14", "15+456", "2+900", "5-371", "9+241", "22-681", "11-266", "29-501"}
3
5
32
2
Returns: { }
{"37+810", "37+751", "5-956", "22+481", "37+858", "37+859", "15+850", "12+525", "10+932", "34+257", "37-63", "0+979", "5+927", "29+628", "13-36", "37+485", "37-120", "41-626", "41+170", "15-67", "15-324", "40+166", "15-180", "5+771", "14-134", "13+843", "37+119", "29-895", "9+252", "3+111", "4-781", "5+662", "35-77", "19+374", "37+713", "41+975", "+20", "+140", "22+196", "2+614", "22-442", "+923"}
{"1-287", "34+242", "38-220", "15+772", "32+474", "38+298", "+401", "33-353", "38+516", "+545", "7+940", "+734", "14+420", "33+643", "11+176", "9+155", "29+417", "41+326", "21-615", "9+70", "41+530", "9+331", "24+399", "41+784", "9+476", "43+515", "16+523", "6-215", "21+930", "+290", "19+89", "39-226", "1+427", "24-554", "11-246", "38+95", "14+869", "18+899", "11+437", "33+904", "28+690", "29-14", "19-559", "6-41"}
23
6
40
38
Returns: { }
{"+727", "+733"}
{"+712", "6+982", "19-676", "17-848", "+499", "19-601", "19-996", "19-520", "0-618", "20-818", "13+660", "24+283", "25-142", "19-467", "25+581", "23+229", "2+616", "19+719", "12-120", "23+863", "2-71", "12+102", "25+799", "+897", "21+471", "23+204", "12+181", "19-841"}
0
1
14
11
Returns: { 727, 1682, 733, 1815 }
{"42+839", "29+81", "18-607", "1+836", "5-889", "9+883", "25-355", "28-711", "15+189", "15+280", "8+491", "23-339", "26-104", "32+83", "42+432", "+649", "8+35", "28-320", "8+259", "43-384", "42+834", "42-27", "8+540", "+617", "+969", "35-235", "8+440", "18-666", "8+975", "42-134", "42+193", "36+427", "+536", "+244", "18-558", "42+372", "42+121", "16+420", "32+949", "13+179", "9+911", "5-64", "11+29", "15-124", "21+929", "2+473", "8-479"}
{"2-866", "8+220", "14+724", "16+538", "8+937", "10-249", "18+718", "8-796", "9+902", "22+290", "22-207", "9+10", "19-305", "8+209", "8-605", "4-805", "8+512", "12+199", "14+881", "9-288", "8+413", "+128", "+547", "14-815"}
44
28
21
6
Returns: { 1209, 128, 1813, 2733 }
{"2+62", "+557", "1+816", "+752", "1+412", "+993", "2-841", "3+6"}
{"7+351", "+185", "7+126", "9-325", "+18", "14+240", "+281", "+877", "+765", "+894", "14+818", "1+553", "9-47", "11-734", "6+933", "12-340", "8-279"}
1
1
9
16
Returns: { }
{"17+389", "25+823", "+548", "7+424", "12+529", "23-765", "3-813", "8+937", "10-627", "17+776", "+703", "2+997", "17-655", "1-520", "17+97", "24+786", "0-381", "+827", "17-272", "17+134", "8+449", "18+227", "3-442", "11-761", "23-28", "17+867"}
{"9-832", "14-497", "12-916", "2+459", "5-383", "12-622", "5-379", "8+269", "14+982", "14+591", "14+689", "14+105", "9+128", "14+672", "+930", "+818"}
3
9
6
9
Returns: { 1437, 648, 1603, 1521 }
{ "3+505", "+564", "+711", "7+80", "6+969", "9-204", "9+711", "6+708", "+768", "+364", "6-336", "16+963", "0+102", "16-955", "7+157", "8+6", "10+250" }
{ "29-211", "12-19", "8+623", "35+403", "27-714", "29+836", "29-118", "29-503", "33-731", "+538", "27-184", "7+685", "27+966", "0+467", "29-443", "20-739", "20+723", "0+418", "1-868", "31-804", "35+818", "0+800", "14+220", "20+708", "30+119", "23+364", "15+717", "35+654", "14+248", "+614", "29+170", "15+3", "35-707", "20-657", "3+572", "29+510" }
5
15
17
5
Returns: { 160, 821, 774, 1450 }
{"19+954", "17-3", "8+454", "18+7", "2-130", "+299", "2+634", "+861", "10+118", "6+2", "+901", "+117", "+415", "2-84", "2-854", "6+306", "6-178", "4-957", "10+533", "+211", "2-938", "10+972", "19+548"}
{"4-134", "4-236", "18+143", "35-657", "21+680", "9-739", "+704", "+957", "+48", "38+867", "35+729", "38+370", "+154", "18-6", "+1000", "+872", "+223", "+974", "38+309", "6+972", "14-607", "35+613", "+739", "+914", "+72", "21-157", "35-65", "32+243", "21-49", "17-283", "8-25", "40-296", "8+682", "4-977", "13-76", "6+952", "40-437", "29-459", "22-537", "9+129", "38+268", "29+61", "6-129", "28-366", "32-269", "48-171", "48-55", "7-265", "17-91", "+558"}
6
21
0
41
Returns: { }
{"8+939", "15-31", "11-208", "8+977", "+946", "3-229", "20-561", "0-866", "9+108", "14-584", "11+360", "15-90", "+169", "20+788", "+672", "+351", "15+203", "22+454", "20+360", "15+695", "12+838", "9+529", "+710", "22+59", "1-135", "13-158"}
{"11-89", "5+963", "35-476", "43+3", "+172", "+400", "46+13", "10+7", "18-189", "18+359", "5+413", "46+665", "42-21", "23-447", "27+619", "16+393", "18-304", "4+559", "+892", "18-287", "40+514", "5+918", "45+881", "35+598", "16-530", "39+8", "5+880", "18-266", "18-360", "40-265", "11+405", "27-215", "11-24", "30+749", "46+363", "18-10", "43-370", "35-636", "6+887", "43-165", "46+413", "42+367", "18-577", "11+173", "18-790", "46+53", "+109", "12-284"}
16
1
8
27
Returns: { }
{"45-687", "35+778", "+466", "43+699", "19-515", "43-1", "2-174", "+193", "+443", "41+190", "22+984", "+916", "19+323", "23+255", "19-213", "19+639", "23+403", "+307", "40-785", "+820", "23+138", "20+261", "2+616", "+652", "32+454", "7+357", "33+585", "29-411", "41-349", "7+287", "36+540", "43-284", "+432", "23+750", "22-116", "29+600", "19-785", "23+239", "41-98", "23-354", "35+780", "13-460", "26-324", "2+49", "23+908", "29+391", "7-25"}
{"24+173", "18+344", "24+88", "10-122", "23+88", "24+911", "0+115", "25-117", "34-575", "+216", "24+35", "17+948", "24-150", "17+736", "34-654", "34+614", "9+615", "+933", "34+964", "34+465", "0+448", "15+285", "5-410", "19-663", "9+486", "11+282", "34+684", "24+522", "24+158", "9+551", "34+16", "22+750", "2-458", "29+573", "9+763", "11-115", "5+839", "2+527"}
4
11
12
12
Returns: { 305, 552, 916, 552 }
{"5+941", "8-884", "7+601", "29+986", "7+369", "12+679", "11+582", "+19", "19+204", "20+428", "29-442", "7+437", "19-187", "2+950", "24-301", "7+303", "15+208", "24-36", "30+771", "+778", "19+516", "6-374", "23+923", "19-473", "8-490", "19-573", "17+506", "8+930", "30+93", "30+543", "+240", "19-683"}
{"+106", "11-472", "0-54", "+209", "12+847", "+542", "18-419", "+815", "9-43", "+230", "18+348", "3+534", "+728", "18-472", "+176", "12+653", "9+303", "+987", "+501", "+999", "0+119", "+456", "3+327", "15+982"}
5
10
23
1
Returns: { }
{"9+377", "+810", "23+427", "5+538", "5+864", "8+453", "26+113", "+568", "+908", "8-497", "15+947", "5-994", "23+617", "11-328", "19-880", "25-549", "4+494", "1-625", "23+748", "10+185", "8-162", "15+938", "26+944", "25+934", "19-642", "+634", "+47", "8+199", "23-164", "8-278"}
{"1+102", "+199", "+214", "+440", "1+146", "3-253", "4-270", "4+430"}
25
5
6
5
Returns: { 634, 75, 1361, 187 }
{"4+415", "12+586", "+938", "11+560", "1-901", "7+393", "+122", "+274", "4+613", "11+145", "12+363", "12-279", "+590", "5+476"}
{"15+680", "26+395", "16+868", "7-348", "26-5", "23+383", "29-310", "5-16", "6+267", "21+318", "5+697", "15+69", "14+991", "34+244", "11+444", "26+24", "17-366", "+647", "21+197", "40+512", "10+701", "11-149", "15+985", "15+112", "21+491", "18-106", "+231", "21-8", "30+535", "11+292", "40+612", "1-55", "7+516", "18+576", "29-527", "1-299", "+583", "+23", "21-113", "1+319", "+451"}
13
6
20
12
Returns: { }
{"6-128", "4+565", "8+242", "4+782", "+513", "+483", "4+874", "+872", "+563"}
{"16+478", "+769", "11-188", "12-14", "31-445", "11+803", "17+306", "43+418", "25-1", "19+11", "0-673", "+481", "+219", "1+941", "11+885", "+87", "42+895", "11-96", "8+812", "12+996", "34+490", "31-402", "+7", "41+936", "19-995", "42-376", "11+588", "15+195", "23+981", "35-71", "31-432", "+503", "1+878", "31+533", "1-314", "25+854", "31+457", "31+864", "8+721", "8+729", "31+144", "31-456", "22+890", "+425"}
3
1
18
39
Returns: { }
{"2+353", "9+985", "9+616", "9+754", "3+17", "2-744", "3+236", "9+296", "6-841", "+395"}
{"36+288", "22+514", "19-456", "5+194", "42-988", "43-188", "46-453", "+533", "14+940", "14+732", "45+555", "44+76", "14+522", "41+112", "+199", "1+36", "38+432", "22+736", "22+634", "1-557", "40+32", "1-269", "36+711", "20+217", "14+721", "+895", "30+235", "30+379", "38+132", "40+910", "37-355", "7+796", "38+756", "16-480", "25+356", "32+807", "30-191", "+992", "14+240", "14+478", "25-698", "14+578", "2+930", "+248", "36+498", "+30", "22-541", "19+372"}
6
8
24
24
Returns: { }
{"1-147", "5-142", "5+878", "5-82", "0+124", "+803"}
{"23+91", "4+280", "13-896", "24+729", "21-509", "9+877", "19+229", "30+506", "12+180", "22-396", "9+662", "23-118", "+937", "6-31", "31-869", "26+920", "3-137", "23+560", "4+163", "32+686", "21-523", "+567", "35+345", "35+818", "6-392", "21+477", "35+719", "19+714", "32+907", "12-178", "9+6", "19+153", "21-414", "8-106", "19+972", "21-300", "+883", "14+804", "35+300", "21+751"}
1
2
20
13
Returns: { 661, 44, 1681, 1037 }
{"19-64", "39+723", "34-581", "12+996", "+746", "22+793", "33-65", "33+809", "4+872", "5+347", "+924", "3-442", "+825", "28-258", "20-555", "1-214", "3+467", "31+322", "13+202", "33+956", "28+880", "8-750", "+42", "20+210", "9+314", "31-284", "3-801", "13+225", "22+237", "22+808", "28+257", "24+29", "+293", "22+130", "28+324", "+184", "37+253", "4+78", "5-799", "+67"}
{"26+653", "33-423", "26-200", "26-143", "44-494", "+101", "44-145", "10+362", "0-329", "13-467", "44+752", "33+695", "5+393", "34+939", "12+623", "22-66", "46-294", "28+793", "46-520", "+68", "40+976", "12+424", "+120", "5+221", "28+513", "46+753", "+756", "38-230", "+27", "16+26", "35-215", "34-67", "19-29", "15+373", "+672", "19+317", "16-95", "33+38", "46-438", "17-575", "38+150", "26-201", "44+28", "24-336", "13-762", "38-569", "5+960", "35+559", "33-399"}
30
29
23
20
Returns: { 536, 322, 850, 1749 }
{"32-180", "11+377", "35-585", "11-245", "2-272", "31+857", "36+20", "22+7", "22-183", "36+114", "37-508", "32+984", "+219", "31+732", "7+328", "8+155", "22+174", "32+989", "37+708", "34+162", "31+535", "15+87", "+447", "9-714", "15+627", "2+50", "18-246", "32+348", "32+391", "37+179", "11+826", "36-565", "22+43", "31-197", "36-568", "36-298", "7+869", "17-245"}
{"5+654", "16+976", "30+268", "30+712", "5+381", "33-99", "12+740", "14-318", "5+648", "33+406", "12-99", "4+708", "33+457", "33+163", "33+444", "20+683", "33-183", "5+153", "20+388", "5+82", "33+229", "26+296", "12+400", "26+498", "27-409", "19+333", "33+933", "5+548", "31+102", "12-567", "9-333", "20-302", "3-153", "+187"}
13
34
23
31
Returns: { }
{"20+550", "45+839", "13+285", "13+648", "33-302", "18+438", "13-830", "2-759", "14-976", "16+366", "31+896", "33+133", "18+469", "+977", "0+42", "45+297", "36+993", "18+611", "+37", "33-14", "+747", "18+916", "21+277", "42+367", "23-664", "19-380", "31-200", "46+500", "39-184", "21-291", "26-376", "16-508", "20-185", "36+329", "36-122", "42-175", "+432", "2-671", "+193", "29-368", "19-171", "35-195", "13-510", "41+762", "31-90", "+892", "13-687", "33-341", "33+657"}
{"42+552", "4+86", "5+359", "33+320", "33-194", "+533", "+111", "+185", "2+868", "44+252", "42+689", "33+416", "11-729", "27-483", "25-354", "11+531", "26+830", "12+979", "+488", "32+944", "27+163", "10+586", "26-166", "10-529", "13+248", "42+410", "+770", "42+304", "+407", "42-182", "44+438", "2-641", "31+815", "5-192", "22+546", "30+732", "2+725", "+75", "40+457", "5+190", "26+855", "29+637", "6+258", "16-713", "22-546", "1-144"}
46
43
22
35
Returns: { 290, 604, 859, 1228 }
{"1-135", "+792", "1+201"}
{"22+485", "21+881", "37+371", "42+977", "+78", "15-322", "0+372", "2-207", "10+445", "30+242", "42-276", "16+561", "42-428", "31-515", "42-210", "10+668", "+298", "10+572", "14-229", "18+690", "42-269", "42-931", "16+404", "8-460", "+121", "30+131", "6-778", "26+21", "6-812", "15-387", "10+313", "3+619", "30-155", "7-225", "31-86", "+161", "31-877", "42-838", "27-494", "7+517", "3+235", "32-156", "+965", "12+450", "22+425", "22+519", "25+254", "31-503", "10+912"}
0
2
21
24
Returns: { 657, 34, 993, 121 }
{"+282", "0-229", "26+29", "31-731", "32+804", "26+261", "+936", "4+94", "15+820", "5+686", "4-65", "7-808", "20+207", "26+530", "22-345", "29-848", "32+414", "26+446", "3+970", "8+997", "32+714", "20-629", "15+801", "29+704", "6-167", "20-210", "15+21", "15+629", "20-866", "32+471", "5-178", "20+22", "+403"}
{"+757", "4+47", "+498", "5-16", "0-530", "+639"}
29
30
5
1
Returns: { }
{"13-274", "10+418", "6+905", "6-563", "0+474", "9+152", "+608", "14+322", "7-509", "+30", "14+823", "13+953", "9+61", "10+681", "+584", "10+374"}
{"5+45", "2+559", "4+10", "4-152", "+859", "4+342", "5-850", "+704", "2-842"}
3
12
7
1
Returns: { 45, 704, 91, 1428 }
{"+836", "+516", "0+566", "34+293", "34-127", "34+367", "8-933", "1+191", "34+355", "32+868", "34-574", "0-483", "5+997", "+150", "1+73", "32+742", "+814", "35+808", "20+285", "3-190", "10+296", "38+587", "31+645", "4+625", "23-840", "16+763", "7+975", "36-143", "22-788", "+747", "38-595", "8+5", "34+196", "32+403", "+871", "32-454", "32-176", "10+540", "31-84"}
{"14+779", "14-651", "+151", "2+34", "+794", "+276", "12+792", "3+158", "19+336", "+786", "1+1000", "12-885", "14+300", "+795", "+706", "+245", "11-14", "10-667", "13-379", "+292", "9-410", "22-316", "12+235", "14-269", "2+976"}
6
32
9
24
Returns: { 293, 786, 1067, 1127 }
{"13+120", "32-786", "27+357", "0+419", "13+804", "18-48", "2-35", "10+268", "4+771", "4-800", "6+434", "13+559", "10-925", "+94", "32-544", "34+926", "21-267", "+114", "22+235", "25+517", "17+847", "18+677", "24-109", "22+412", "13+721", "38-834", "11+968", "13+235", "32+483", "18-134", "5-857", "5+883", "+785", "17+412", "27-223", "5-85", "17+945", "5+339", "24+308"}
{"13-168", "6+797", "15-467", "9-255", "1+138", "27+677", "22-643", "9-106", "29-326", "20+782", "12+293", "15+226", "3-538", "27-657", "22+23", "20+656", "20+342", "20+572", "24-224", "18+836", "27+75", "27-819", "27-97", "9+4", "20+347", "28+691", "5-547", "+847", "13+473", "13+763"}
30
38
29
15
Returns: { }
{"30+96", "25-753", "42+356", "26+176", "18+757", "46+918", "49-719", "42-609", "16+116", "45-465", "42+527", "46-307", "34-899", "35-900", "1-329", "37+957", "18+672", "45+804", "33-411", "+294", "19-42", "+63", "18+869", "46+970", "46-79", "35+825", "+921", "10-456", "7+753", "19+83", "24+510", "4+812", "18-78", "19+786", "46+676", "+899", "35+93", "21+706", "29+792", "18+944", "1-172", "35+446", "29+431", "40+868", "3+509", "27+972", "19+268", "19+201", "39-351", "17+779"}
{"14+153", "33+119", "42-843", "28-208", "35-517", "15+893", "+112", "33+196", "9-421", "46-517", "8+205", "46+529", "32-67", "37+606", "+525", "24+64", "14-236", "42+501", "+763", "3+816", "+82", "42-469", "41+750", "+389", "33+929", "36+335", "14+925", "20+758", "33-7", "32-604", "32-257", "34-137", "33+637", "+242", "+698", "2+673", "17-281", "31+813", "26-660", "14-52", "32-792", "45+20", "26+681", "36+3", "33-243", "6-85", "43+554"}
29
25
39
13
Returns: { }
{"+493"}
{"+557", "+613"}
0
0
0
1
Returns: { 493, 557, 493, 613 }
{"2-497", "21-440", "21-433", "26-663", "21-579", "4+148", "10-955", "19+223", "21+347", "16+518", "21+207", "25+272", "21+649", "2-597", "19+569", "23+2", "24+990", "5+144", "24+978", "26-647", "8+966", "24+689", "24-614", "22+890", "+613", "10+362", "2+754"}
{"2+356", "13-280", "14-334", "11+502", "6-800", "3-335", "11+416", "13+898", "11+920", "14+361", "9+414", "+383", "6+161", "14+801", "+429", "8+760", "14+90", "2+996"}
15
14
6
7
Returns: { }
{"11+445", "+604", "32-635", "23+792", "1-458", "32+695", "21-975", "21+558", "13-846", "17-588", "22+254", "21-656", "28+961", "6+697", "32+353", "17-946", "17-705", "18+901", "24-227", "24+192", "28-835", "1+802", "6-432", "18+386", "21+638", "32-484", "33-481", "22+781", "17-977", "24-292", "9+631", "26+647", "+636", "18+818"}
{"16-486", "24+242", "7+1000", "25-642", "25+113", "26+358", "19+732", "28-435", "21-499", "14-337", "7-41", "21+527", "7-411", "21-508", "25+918", "0-575", "2+110", "11-185", "23+148", "7-347", "23-481", "22+779", "2-318", "10+560", "25-289", "29-61", "28+499", "7+701", "+845", "28+899"}
27
9
3
9
Returns: { }
{"42+660", "5+509", "47-28", "9+113", "46+838", "+586", "46+328", "46+369", "21-408", "21+510", "47+224", "17+121", "17+612", "25-538", "10+358", "29-553", "3-840", "+700", "6+565", "4-729", "4+519", "46+722", "4-567", "21+324", "4+592", "46+803", "38+141", "8-205", "10+40", "25+960", "17-614", "3-174", "31-671", "19+161", "46+173", "+384", "47+462", "47-556", "47+623", "17+676", "4-67", "42+544", "25-842", "23-698", "23-945", "17+467", "+38", "46+558", "29+956", "8+134"}
{"16+76", "27+870", "18-109", "+764", "8+509", "13+578", "7+316", "8+695", "+738", "4+420", "8-83", "4-770", "20-428", "14+228", "27-701", "17+78", "8+439", "2+186", "27+214", "18-376", "18+633", "8-276", "27-69", "22+119", "+418", "2+495", "18-539", "+743", "8+891", "2-234"}
16
28
14
10
Returns: { }
{"3-216", "+807", "+133", "+263", "7+625", "+139", "+617", "3+209", "1-341", "18-534", "+74", "2+130", "18+89", "2+999", "5-101", "8-298", "14+637", "3+461", "+533"}
{"23-50", "3+527", "18+288", "33-1", "43+437", "41+455", "+568", "29+740", "40+779", "45-549", "20+98", "31-702", "38+358", "20+955", "21+36", "9+654", "1-754", "12-196", "19+822", "6+957", "45+707", "45+363", "45-696", "39+455", "29+552", "15+128", "32+520", "29-139", "3-241", "39+382", "33+103", "33+483", "7-541", "45-720", "43+958", "10+123", "3+203", "41+978", "+727", "33+210", "3-226", "+123", "43-246", "10+121", "31+630", "+961", "3+524", "39+202"}
14
10
22
38
Returns: { }
{"3+125", "3+678", "0-663", "+537"}
{"8+212", "12-122", "8-872", "9-436", "8-479", "13+447", "11-407", "0+384", "13+841", "8+784", "11+223", "8+254", "8-290", "+30"}
3
1
12
3
Returns: { }
{"26-257", "0+868", "25+917", "28+610", "23-35", "28+517", "14-129", "23+827", "23+77", "14+8", "11+892", "4-479", "15+60", "19+866", "23+125", "25-433", "13-706", "0-323", "15-39", "14-19", "26-168", "2-343", "2-142", "28+566", "5+581", "5+368", "+816", "8-761", "+117"}
{"24+72", "11+398", "21+88", "16+143", "6+358", "20+909", "24-638", "24-97", "2-78", "4-614", "24+491", "4+43", "10+61", "10-643", "21+75", "10-44", "7+79", "9-27", "4+686", "+612", "9+648", "24+435", "4+287", "12-245", "+920", "21+928"}
7
2
0
8
Returns: { }
{"+922"}
{"27+912", "27+878", "27+148", "20-85", "27-22", "15+448", "16-129", "22+363", "29+957", "26+926", "29+684", "28-609", "26-735", "11+300", "7+971", "27+17", "27+605", "27+290", "16+947", "4+867", "15-91", "20+145", "2-112", "29+572", "20+194", "17-76", "2+605", "+158", "20+734", "4+713"}
0
0
27
5
Returns: { }
{"13+947", "10-279", "16+576", "13+134", "26+336", "16+356", "29+749", "16+852", "7+172", "19-475", "27+675", "21+117", "+131", "12-132", "25+972", "10-57", "3+123", "25+548", "12+37", "25+166", "10+519", "3-107", "17-574", "22+935", "+448", "+558", "12-16", "18+640", "12+860", "25-554"}
{"3+647", "22+346", "+822", "+148", "+805", "10-217", "17+369", "+200", "+293", "+54", "4+462", "+535", "6+289", "20+239", "20-590", "10+325", "4-705", "11-61", "21+476", "3+245", "10-678", "10-211", "+249", "5+710", "17+395", "10+396"}
12
6
13
15
Returns: { }
{"45+309", "45+780", "22-26", "46-251", "15+908", "24-369", "44+215", "40-204", "2+684", "49+105", "21+922", "15-724", "17+282", "30+451", "3-760", "21+975", "45+308", "45-255", "16+771", "15+335", "45-53", "16-504", "40-235", "18+462", "45-179", "45+507", "24+929", "24-89", "15+746", "45+313", "5+918", "45+680", "1+191", "24+577", "21+973", "44-604", "31+558", "30+907", "15-543", "16+543", "15-749", "16+882", "4-591", "13+649", "24+944", "+547", "28+962", "40-41", "28+765", "16+387"}
{"38-380", "40+921", "26+279", "8-244", "15-325", "21+257", "34+390", "10-634", "32+380", "5+233", "32+408", "15+553", "3+149", "38-893", "+871", "32+600", "26+267", "+49", "27+717", "18-783", "36-470", "37+177", "10-21", "8+269", "32-95", "35+281", "3+634", "38-924", "4+50", "22+676", "3-613", "26+783", "+476", "32+112", "+490", "8+370", "32+69", "3+666", "32+685", "8-27", "15-834"}
26
44
13
24
Returns: { }
{"+574", "12+757", "5-699", "12+916", "10+618", "+922", "+345", "4+420", "+433", "13+829", "12-483", "7+127", "5-440", "+128", "2+605", "0+644", "7-899", "8+980"}
{"5+18", "5+323", "4-253", "1+438", "+747", "4-576"}
7
3
0
3
Returns: { }
{"14+455", "29+756", "20+654", "+401", "+380", "12+944", "+483", "19+730", "20+915", "+962", "12+22", "+701", "+544", "+296", "+858", "+807", "30+82", "30+185", "13+257", "35+491", "18-239", "12+147", "+345", "30-378", "12+559", "30+273", "3+344", "26-746", "+490", "37+536", "+394", "30+991", "10+560", "26+433", "30+408", "15+825", "30+355", "+461", "15-696", "3+67", "12-478", "13+424", "10+803", "31+297"}
{"5-281", "5-208", "13+615", "13+231", "+403", "12-633", "3+924", "0+165", "11+137", "19+701", "19+521", "18-538", "+913", "12-899", "4+689", "5+632", "2+42", "5+900", "12+886", "17-524", "12-373"}
3
14
0
5
Returns: { }
{"+781", "0-586", "+134", "2+528"}
{"9+695", "12-191", "21-765", "20+66", "21-515", "10+115", "14-271", "2+512", "18-214", "11-114", "9-333", "12+553", "+190", "4+217", "9-299", "4+675", "11+554", "1+447", "4+969", "9-208", "9-317", "+868", "4+295", "15+660"}
1
0
20
9
Returns: { }
{"6+383", "16-304", "16+71", "2+926", "8+238", "3-976", "21+316", "13-658", "16-193", "24-991", "21+567", "16+379", "16+724", "21+307", "2+758", "24+174", "+303", "15-613", "6+889", "1+721", "24-509", "+420", "24+544", "2+782", "16+981"}
{"8-156", "6+509", "0-207", "6+871", "6+497", "0-561", "8+938", "6-861", "+748", "8-749"}
8
12
6
4
Returns: { }
{"11-150", "11-197", "+210", "11+299", "11+304", "11+32", "11+423", "11+529", "12+577", "+105", "11-249", "+248", "11+109"}
{"2+325", "+656", "+240", "6-293", "1+628", "7-813", "+292", "1+648", "+571"}
9
12
6
5
Returns: { }
{"17+734", "11+427", "30-827", "29-542", "29-248", "23-323", "12+58", "8+16", "23-285", "23-447", "23-282", "+134", "+48", "12+513", "9+675", "35+309", "13-320", "1-286", "23-499", "9+777", "14+716", "3+220", "+543", "+540", "23+954", "5-14", "9+841", "1-105", "34+400", "+964", "14+240", "+482", "29-416", "23-541", "11+20", "+437", "9-56", "9+824", "30-183", "12+171", "+908"}
{"2+604", "11-558", "21-212", "18+307", "11+963", "14-547", "1+690", "4-586", "14-686", "1-43", "14-880", "19+362", "7-867", "1+763", "18-57", "18+885", "14+131", "2+754", "11+260", "+314", "19+536", "19-14", "11+361"}
32
30
20
4
Returns: { }
{ "+100", "+200", "0-1000" }
{ "+100", "+200" }
0
1
0
1
Returns: { }
{ "3+505", "+564", "+711", "7+80", "6+969", "9-204", "9+711", "6+708", "+768", "+364", "6-336", "16+963", "0+102", "16-955", "7+157", "8+6", "10+250" }
{ "29-211", "12-19", "8+623", "35+403", "27-714", "29+836", "29-118", "29-503", "33-731", "+538", "27-184", "7+685", "27+966", "0+467", "29-443", "20-739", "20+723", "0+418", "1-868", "31-804", "35+818", "0+800", "14+220", "20+708", "30+119", "23+364", "15+717", "35+654", "14+248", "+614", "29+170", "15+3", "35-707", "20-657", "3+572", "29+510" }
5
15
17
5
Returns: { 160, 821, 774, 1450 }
{ "+10", "+100", "0-800" }
{ "+10", "+100" }
0
1
0
1
Returns: { }
{ "+0", "0-1" }
{ "+0", "0-1" }
1
1
1
1
Returns: { }
{ "+1", "0-2", "+1" }
{ "+1", "0-2", "+1" }
2
2
2
2
Returns: { }
{ "+100", "+200" }
{ "+50", "+75" }
0
1
0
1
Returns: { 100, 50, 200, 75 }