{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-16T00:12:35.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-04-16T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":1915,"title":"GJam 2013 Veterans: Baby Height Prediction","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard#s=p1 GJam 2013 Veterans Baby Height\u003e. Only the first 82 of 5958 test cases are evaluated.\r\n\r\nThe GJam story goes that a baby's final height can be bounded given its mom's and dad's height(Ht) and its sex.  Baby Nominal Ht is (Mom Ht+ Dad Ht + Baby Sex Adj)/2. A boy gets an Adjust of +5\" while a girl is -5\".  The range is +/- 4\" from nominal. However, for fractional inches the range is reduced until endpoints are whole inches.\r\n\r\n\r\n*Input:* str , String of Sex, Mom and Dad Height x'y\"\r\n\r\n*Output:* H , string of Predicted Height Range\r\n\r\n*Examples:* [str] [H]\r\n\r\n  B 5'11\" 6'2\"  spawns 5'11\" to 6'7\"\r\n  G 5'11\" 6'2\" spawns 5'6\" to 6'2\"\r\n  B 3'4\" 3'4\" spawns 3'3\" to 3'10\"\r\n  \r\n\r\n*Commentary:*\r\n\r\n  1) Provide input like fgetl per test case\r\n  2) 15 of 32 entrants completed this Challenge\r\n  3) This is a test of regexp and sprintf formatting (or just regexprep)","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard#s=p1\"\u003eGJam 2013 Veterans Baby Height\u003c/a\u003e. Only the first 82 of 5958 test cases are evaluated.\u003c/p\u003e\u003cp\u003eThe GJam story goes that a baby's final height can be bounded given its mom's and dad's height(Ht) and its sex.  Baby Nominal Ht is (Mom Ht+ Dad Ht + Baby Sex Adj)/2. A boy gets an Adjust of +5\" while a girl is -5\".  The range is +/- 4\" from nominal. However, for fractional inches the range is reduced until endpoints are whole inches.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e str , String of Sex, Mom and Dad Height x'y\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e H , string of Predicted Height Range\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [str] [H]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eB 5'11\" 6'2\"  spawns 5'11\" to 6'7\"\r\nG 5'11\" 6'2\" spawns 5'6\" to 6'2\"\r\nB 3'4\" 3'4\" spawns 3'3\" to 3'10\"\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Provide input like fgetl per test case\r\n2) 15 of 32 entrants completed this Challenge\r\n3) This is a test of regexp and sprintf formatting (or just regexprep)\r\n\u003c/pre\u003e","function_template":"function [H]=BabyH_V(str)\r\n H='';\r\n v= regexp(str,'[''''\"\\s]','split');\r\nend","test_suite":"%%\r\ntic\r\nvstr='G 7''4\" 9''11\"';\r\nvexp='8''1\" to 8''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''1\" 4''10\"';\r\nvexp='5''11\" to 6''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''3\" 2''9\"';\r\nvexp='3''5\" to 4''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''10\" 4''4\"';\r\nvexp='2''7\" to 3''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''0\" 9''7\"';\r\nvexp='7''3\" to 7''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''5\" 4''8\"';\r\nvexp='3''6\" to 4''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''3\" 7''9\"';\r\nvexp='7''6\" to 8''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 8''7\" 8''0\"';\r\nvexp='8''2\" to 8''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''10\" 1''3\"';\r\nvexp='4''0\" to 4''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''9\" 1''5\"';\r\nvexp='1''7\" to 2''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''11\" 8''9\"';\r\nvexp='7''4\" to 7''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''7\" 9''3\"';\r\nvexp='6''10\" to 7''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''2\" 7''11\"';\r\nvexp='4''11\" to 5''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''0\" 3''9\"';\r\nvexp='2''10\" to 3''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''5\" 3''3\"';\r\nvexp='3''10\" to 4''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''6\" 1''4\"';\r\nvexp='1''5\" to 2''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''8\" 8''7\"';\r\nvexp='8''1\" to 8''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''11\" 7''3\"';\r\nvexp='8''1\" to 8''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''0\" 1''2\"';\r\nvexp='4''7\" to 5''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''0\" 1''2\"';\r\nvexp='3''7\" to 4''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 5''6\" 5''7\"';\r\nvexp='5''5\" to 6''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''8\" 6''1\"';\r\nvexp='4''10\" to 5''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''7\" 2''3\"';\r\nvexp='2''5\" to 3''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''7\" 6''7\"';\r\nvexp='6''7\" to 7''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''6\" 6''5\"';\r\nvexp='7''10\" to 8''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''3\" 4''11\"';\r\nvexp='2''7\" to 3''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''0\" 5''6\"';\r\nvexp='3''3\" to 3''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''7\" 6''8\"';\r\nvexp='3''7\" to 4''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''3\" 5''11\"';\r\nvexp='4''0\" to 4''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''3\" 3''6\"';\r\nvexp='2''9\" to 3''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''10\" 1''9\"';\r\nvexp='5''8\" to 6''4\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''6\" 5''11\"';\r\nvexp='4''8\" to 5''4\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''6\" 1''2\"';\r\nvexp='3''10\" to 4''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 3''7\" 9''1\"';\r\nvexp='6''3\" to 6''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''9\" 9''11\"';\r\nvexp='7''10\" to 8''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 1''10\" 8''10\"';\r\nvexp='5''3\" to 5''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''11\" 7''4\"';\r\nvexp='6''7\" to 7''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 1''9\" 4''8\"';\r\nvexp='3''1\" to 3''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''8\" 6''3\"';\r\nvexp='7''10\" to 8''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 5''6\" 8''4\"';\r\nvexp='6''10\" to 7''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''7\" 9''6\"';\r\nvexp='6''6\" to 7''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''7\" 7''1\"';\r\nvexp='4''4\" to 4''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''1\" 7''10\"';\r\nvexp='5''11\" to 6''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''5\" 8''7\"';\r\nvexp='4''6\" to 5''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''0\" 1''0\"';\r\nvexp='2''0\" to 2''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''4\" 7''1\"';\r\nvexp='5''7\" to 6''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''1\" 8''1\"';\r\nvexp='5''1\" to 5''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''5\" 7''8\"';\r\nvexp='6''0\" to 6''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''7\" 8''2\"';\r\nvexp='7''4\" to 8''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''6\" 5''1\"';\r\nvexp='3''9\" to 4''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''9\" 6''9\"';\r\nvexp='6''3\" to 6''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''4\" 5''8\"';\r\nvexp='5''6\" to 6''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''4\" 2''10\"';\r\nvexp='5''1\" to 5''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''7\" 9''5\"';\r\nvexp='7''11\" to 8''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''6\" 5''7\"';\r\nvexp='6''5\" to 7''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''11\" 8''10\"';\r\nvexp='7''9\" to 8''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''4\" 3''2\"';\r\nvexp='4''3\" to 4''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''3\" 8''3\"';\r\nvexp='8''3\" to 8''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''7\" 1''4\"';\r\nvexp='2''11\" to 3''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''2\" 2''4\"';\r\nvexp='4''8\" to 5''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''2\" 5''8\"';\r\nvexp='6''11\" to 7''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''4\" 5''5\"';\r\nvexp='5''9\" to 6''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''6\" 7''7\"';\r\nvexp='8''5\" to 9''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''6\" 1''2\"';\r\nvexp='2''4\" to 2''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''10\" 3''7\"';\r\nvexp='4''1\" to 4''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''10\" 2''8\"';\r\nvexp='5''3\" to 5''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 8''5\" 4''3\"';\r\nvexp='6''3\" to 6''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''1\" 3''0\"';\r\nvexp='4''11\" to 5''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''1\" 9''3\"';\r\nvexp='4''8\" to 5''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''0\" 1''11\"';\r\nvexp='3''10\" to 4''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''6\" 9''9\"';\r\nvexp='7''0\" to 7''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''6\" 3''9\"';\r\nvexp='5''1\" to 5''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''5\" 2''7\"';\r\nvexp='4''11\" to 5''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''11\" 1''0\"';\r\nvexp='3''10\" to 4''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''3\" 3''9\"';\r\nvexp='4''6\" to 5''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''0\" 6''1\"';\r\nvexp='6''6\" to 7''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 1''1\" 3''11\"';\r\nvexp='2''5\" to 3''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''8\" 2''7\"';\r\nvexp='3''1\" to 3''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''2\" 3''3\"';\r\nvexp='2''8\" to 3''4\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''5\" 6''8\"';\r\nvexp='4''0\" to 4''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''8\" 3''8\"';\r\nvexp='3''1\" to 3''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''6\" 2''9\"';\r\nvexp='4''1\" to 4''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\ntoc","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-06T00:21:27.000Z","updated_at":"2013-10-06T02:46:32.000Z","published_at":"2013-10-06T00:35:38.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is derived from\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contest/2334486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 Veterans Baby Height\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Only the first 82 of 5958 test cases are evaluated.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe GJam story goes that a baby's final height can be bounded given its mom's and dad's height(Ht) and its sex. Baby Nominal Ht is (Mom Ht+ Dad Ht + Baby Sex Adj)/2. A boy gets an Adjust of +5\\\" while a girl is -5\\\". The range is +/- 4\\\" from nominal. However, for fractional inches the range is reduced until endpoints are whole inches.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e str , String of Sex, Mom and Dad Height x'y\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e H , string of Predicted Height Range\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExamples:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [str] [H]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[B 5'11\\\" 6'2\\\"  spawns 5'11\\\" to 6'7\\\"\\nG 5'11\\\" 6'2\\\" spawns 5'6\\\" to 6'2\\\"\\nB 3'4\\\" 3'4\\\" spawns 3'3\\\" to 3'10\\\"]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eCommentary:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[1) Provide input like fgetl per test case\\n2) 15 of 32 entrants completed this Challenge\\n3) This is a test of regexp and sprintf formatting (or just regexprep)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":1915,"title":"GJam 2013 Veterans: Baby Height Prediction","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard#s=p1 GJam 2013 Veterans Baby Height\u003e. Only the first 82 of 5958 test cases are evaluated.\r\n\r\nThe GJam story goes that a baby's final height can be bounded given its mom's and dad's height(Ht) and its sex.  Baby Nominal Ht is (Mom Ht+ Dad Ht + Baby Sex Adj)/2. A boy gets an Adjust of +5\" while a girl is -5\".  The range is +/- 4\" from nominal. However, for fractional inches the range is reduced until endpoints are whole inches.\r\n\r\n\r\n*Input:* str , String of Sex, Mom and Dad Height x'y\"\r\n\r\n*Output:* H , string of Predicted Height Range\r\n\r\n*Examples:* [str] [H]\r\n\r\n  B 5'11\" 6'2\"  spawns 5'11\" to 6'7\"\r\n  G 5'11\" 6'2\" spawns 5'6\" to 6'2\"\r\n  B 3'4\" 3'4\" spawns 3'3\" to 3'10\"\r\n  \r\n\r\n*Commentary:*\r\n\r\n  1) Provide input like fgetl per test case\r\n  2) 15 of 32 entrants completed this Challenge\r\n  3) This is a test of regexp and sprintf formatting (or just regexprep)","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard#s=p1\"\u003eGJam 2013 Veterans Baby Height\u003c/a\u003e. Only the first 82 of 5958 test cases are evaluated.\u003c/p\u003e\u003cp\u003eThe GJam story goes that a baby's final height can be bounded given its mom's and dad's height(Ht) and its sex.  Baby Nominal Ht is (Mom Ht+ Dad Ht + Baby Sex Adj)/2. A boy gets an Adjust of +5\" while a girl is -5\".  The range is +/- 4\" from nominal. However, for fractional inches the range is reduced until endpoints are whole inches.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e str , String of Sex, Mom and Dad Height x'y\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e H , string of Predicted Height Range\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [str] [H]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eB 5'11\" 6'2\"  spawns 5'11\" to 6'7\"\r\nG 5'11\" 6'2\" spawns 5'6\" to 6'2\"\r\nB 3'4\" 3'4\" spawns 3'3\" to 3'10\"\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Provide input like fgetl per test case\r\n2) 15 of 32 entrants completed this Challenge\r\n3) This is a test of regexp and sprintf formatting (or just regexprep)\r\n\u003c/pre\u003e","function_template":"function [H]=BabyH_V(str)\r\n H='';\r\n v= regexp(str,'[''''\"\\s]','split');\r\nend","test_suite":"%%\r\ntic\r\nvstr='G 7''4\" 9''11\"';\r\nvexp='8''1\" to 8''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''1\" 4''10\"';\r\nvexp='5''11\" to 6''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''3\" 2''9\"';\r\nvexp='3''5\" to 4''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''10\" 4''4\"';\r\nvexp='2''7\" to 3''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''0\" 9''7\"';\r\nvexp='7''3\" to 7''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''5\" 4''8\"';\r\nvexp='3''6\" to 4''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''3\" 7''9\"';\r\nvexp='7''6\" to 8''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 8''7\" 8''0\"';\r\nvexp='8''2\" to 8''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''10\" 1''3\"';\r\nvexp='4''0\" to 4''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''9\" 1''5\"';\r\nvexp='1''7\" to 2''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''11\" 8''9\"';\r\nvexp='7''4\" to 7''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''7\" 9''3\"';\r\nvexp='6''10\" to 7''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''2\" 7''11\"';\r\nvexp='4''11\" to 5''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''0\" 3''9\"';\r\nvexp='2''10\" to 3''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''5\" 3''3\"';\r\nvexp='3''10\" to 4''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''6\" 1''4\"';\r\nvexp='1''5\" to 2''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''8\" 8''7\"';\r\nvexp='8''1\" to 8''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''11\" 7''3\"';\r\nvexp='8''1\" to 8''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''0\" 1''2\"';\r\nvexp='4''7\" to 5''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''0\" 1''2\"';\r\nvexp='3''7\" to 4''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 5''6\" 5''7\"';\r\nvexp='5''5\" to 6''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''8\" 6''1\"';\r\nvexp='4''10\" to 5''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''7\" 2''3\"';\r\nvexp='2''5\" to 3''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''7\" 6''7\"';\r\nvexp='6''7\" to 7''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''6\" 6''5\"';\r\nvexp='7''10\" to 8''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''3\" 4''11\"';\r\nvexp='2''7\" to 3''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''0\" 5''6\"';\r\nvexp='3''3\" to 3''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''7\" 6''8\"';\r\nvexp='3''7\" to 4''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''3\" 5''11\"';\r\nvexp='4''0\" to 4''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''3\" 3''6\"';\r\nvexp='2''9\" to 3''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''10\" 1''9\"';\r\nvexp='5''8\" to 6''4\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''6\" 5''11\"';\r\nvexp='4''8\" to 5''4\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''6\" 1''2\"';\r\nvexp='3''10\" to 4''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 3''7\" 9''1\"';\r\nvexp='6''3\" to 6''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''9\" 9''11\"';\r\nvexp='7''10\" to 8''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 1''10\" 8''10\"';\r\nvexp='5''3\" to 5''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''11\" 7''4\"';\r\nvexp='6''7\" to 7''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 1''9\" 4''8\"';\r\nvexp='3''1\" to 3''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''8\" 6''3\"';\r\nvexp='7''10\" to 8''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 5''6\" 8''4\"';\r\nvexp='6''10\" to 7''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''7\" 9''6\"';\r\nvexp='6''6\" to 7''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''7\" 7''1\"';\r\nvexp='4''4\" to 4''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''1\" 7''10\"';\r\nvexp='5''11\" to 6''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''5\" 8''7\"';\r\nvexp='4''6\" to 5''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''0\" 1''0\"';\r\nvexp='2''0\" to 2''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''4\" 7''1\"';\r\nvexp='5''7\" to 6''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''1\" 8''1\"';\r\nvexp='5''1\" to 5''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''5\" 7''8\"';\r\nvexp='6''0\" to 6''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''7\" 8''2\"';\r\nvexp='7''4\" to 8''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''6\" 5''1\"';\r\nvexp='3''9\" to 4''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''9\" 6''9\"';\r\nvexp='6''3\" to 6''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''4\" 5''8\"';\r\nvexp='5''6\" to 6''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''4\" 2''10\"';\r\nvexp='5''1\" to 5''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''7\" 9''5\"';\r\nvexp='7''11\" to 8''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''6\" 5''7\"';\r\nvexp='6''5\" to 7''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''11\" 8''10\"';\r\nvexp='7''9\" to 8''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''4\" 3''2\"';\r\nvexp='4''3\" to 4''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''3\" 8''3\"';\r\nvexp='8''3\" to 8''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 5''7\" 1''4\"';\r\nvexp='2''11\" to 3''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''2\" 2''4\"';\r\nvexp='4''8\" to 5''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 9''2\" 5''8\"';\r\nvexp='6''11\" to 7''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''4\" 5''5\"';\r\nvexp='5''9\" to 6''5\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 9''6\" 7''7\"';\r\nvexp='8''5\" to 9''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''6\" 1''2\"';\r\nvexp='2''4\" to 2''11\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''10\" 3''7\"';\r\nvexp='4''1\" to 4''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''10\" 2''8\"';\r\nvexp='5''3\" to 5''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 8''5\" 4''3\"';\r\nvexp='6''3\" to 6''10\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''1\" 3''0\"';\r\nvexp='4''11\" to 5''7\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 1''1\" 9''3\"';\r\nvexp='4''8\" to 5''3\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''0\" 1''11\"';\r\nvexp='3''10\" to 4''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 4''6\" 9''9\"';\r\nvexp='7''0\" to 7''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 7''6\" 3''9\"';\r\nvexp='5''1\" to 5''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 7''5\" 2''7\"';\r\nvexp='4''11\" to 5''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 6''11\" 1''0\"';\r\nvexp='3''10\" to 4''6\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''3\" 3''9\"';\r\nvexp='4''6\" to 5''1\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 8''0\" 6''1\"';\r\nvexp='6''6\" to 7''2\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 1''1\" 3''11\"';\r\nvexp='2''5\" to 3''0\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 4''8\" 2''7\"';\r\nvexp='3''1\" to 3''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 3''2\" 3''3\"';\r\nvexp='2''8\" to 3''4\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 2''5\" 6''8\"';\r\nvexp='4''0\" to 4''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='B 2''8\" 3''8\"';\r\nvexp='3''1\" to 3''8\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\n%%\r\nvstr='G 6''6\" 2''9\"';\r\nvexp='4''1\" to 4''9\"';\r\nvout=BabyH_V(vstr);\r\nassert(strcmp(vout,vexp))\r\ntoc","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-06T00:21:27.000Z","updated_at":"2013-10-06T02:46:32.000Z","published_at":"2013-10-06T00:35:38.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is derived from\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contest/2334486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 Veterans Baby Height\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Only the first 82 of 5958 test cases are evaluated.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe GJam story goes that a baby's final height can be bounded given its mom's and dad's height(Ht) and its sex. Baby Nominal Ht is (Mom Ht+ Dad Ht + Baby Sex Adj)/2. A boy gets an Adjust of +5\\\" while a girl is -5\\\". The range is +/- 4\\\" from nominal. However, for fractional inches the range is reduced until endpoints are whole inches.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e str , String of Sex, Mom and Dad Height x'y\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e H , string of Predicted Height Range\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExamples:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [str] [H]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[B 5'11\\\" 6'2\\\"  spawns 5'11\\\" to 6'7\\\"\\nG 5'11\\\" 6'2\\\" spawns 5'6\\\" to 6'2\\\"\\nB 3'4\\\" 3'4\\\" spawns 3'3\\\" to 3'10\\\"]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eCommentary:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[1) Provide input like fgetl per test case\\n2) 15 of 32 entrants completed this Challenge\\n3) This is a test of regexp and sprintf formatting (or just regexprep)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"tag:\"veterans\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"veterans\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"veterans\"","","\"","veterans","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f0f548ece60\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f0f548ecdc0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f0f548ec500\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f0f548ed0e0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f0f548ed040\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f0f548ecfa0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f0f548ecf00\u003e":"tag:\"veterans\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f0f548ecf00\u003e":"tag:\"veterans\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"veterans\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"veterans\"","","\"","veterans","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f0f548ece60\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f0f548ecdc0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f0f548ec500\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f0f548ed0e0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f0f548ed040\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f0f548ecfa0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f0f548ecf00\u003e":"tag:\"veterans\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f0f548ecf00\u003e":"tag:\"veterans\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":1915,"difficulty_rating":"easy-medium"}]}}