{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.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":"2025-12-14T00: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":1875,"title":"GJam: 2013 China Event: Cannon Angle","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p1 GJam 2013 China Captain Hammer\u003e. The problem is modified to fit within Cody dimensions.\r\n\r\nThe Challenge is to return the lower angle of a cannon given a target distance and an initial cannonball velocity. Gravity is a constant at 9.8m/sec^2, A valid solution is assured. (Error tolerance 2e-6).\r\n\r\n*Input:* [v d]  Velocity and Distance in meters.\r\n\r\n*Output:* theta  in units of degrees with an accuracy of 2e-6\r\n\r\n\r\n*Competition Summary:*  Best Time of 8 minutes,  755/1070 completed\r\n\r\nThe winner completed all three GJam China Challenges in 26 minutes with second at 43 minutes.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p1\"\u003eGJam 2013 China Captain Hammer\u003c/a\u003e. The problem is modified to fit within Cody dimensions.\u003c/p\u003e\u003cp\u003eThe Challenge is to return the lower angle of a cannon given a target distance and an initial cannonball velocity. Gravity is a constant at 9.8m/sec^2, A valid solution is assured. (Error tolerance 2e-6).\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [v d]  Velocity and Distance in meters.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e theta  in units of degrees with an accuracy of 2e-6\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e  Best Time of 8 minutes,  755/1070 completed\u003c/p\u003e\u003cp\u003eThe winner completed all three GJam China Challenges in 26 minutes with second at 43 minutes.\u003c/p\u003e","function_template":"function theta=Cannon(v,d)\r\n  theta=0;\r\nend","test_suite":"%%\r\ntic\r\nvd=[249 6326 ];\r\nexp=44.5948575;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[77 41 ];\r\nexp=1.9429163;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[28 11 ];\r\nexp=3.9516039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 21 ];\r\nexp=0.5347917;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 51 ];\r\nexp=0.6626633;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3210 ];\r\nexp=10.2293872;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[219 61 ];\r\nexp=0.3570850;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[240 41 ];\r\nexp=0.1998405;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[179 3269 ];\r\nexp=44.5041154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3480 ];\r\nexp=11.1338133;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[102 81 ];\r\nexp=2.1878908;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[121 51 ];\r\nexp=0.9781434;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[138 31 ];\r\nexp=0.4570257;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 4500 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 3761 ];\r\nexp=44.4745779;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[37 41 ];\r\nexp=8.5337735;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[32 41 ];\r\nexp=11.5514232;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[199 81 ];\r\nexp=0.5742839;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3360 ];\r\nexp=10.7304643;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[233 71 ];\r\nexp=0.3671784;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[266 81 ];\r\nexp=0.3214027;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[27 21 ];\r\nexp=8.1988972;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[279 21 ];\r\nexp=0.0757408;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5230 ];\r\nexp=17.3572961;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[279 51 ];\r\nexp=0.1839431;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[218 21 ];\r\nexp=0.1240585;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7690 ];\r\nexp=28.4309587;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[89 31 ];\r\nexp=1.0990234;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[141 2028 ];\r\nexp=44.2618026;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[178 81 ];\r\nexp=0.7178094;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 71 ];\r\nexp=1.1443126;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 690 ];\r\nexp=2.1544417;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6970 ];\r\nexp=24.6861041;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[41 1 ];\r\nexp=0.1670142;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[123 21 ];\r\nexp=0.3897097;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[48 61 ];\r\nexp=7.5190650;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[77 81 ];\r\nexp=3.8470546;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 71 ];\r\nexp=0.8628902;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[267 11 ];\r\nexp=0.0433201;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[164 21 ];\r\nexp=0.2192071;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4310 ];\r\nexp=13.9947943;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[256 71 ];\r\nexp=0.3041622;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 41 ];\r\nexp=0.3122545;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7110 ];\r\nexp=25.3662790;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[98 31 ];\r\nexp=0.9063600;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[286 21 ];\r\nexp=0.0720786;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[44 91 ];\r\nexp=13.7142226;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8360 ];\r\nexp=32.7741901;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5060 ];\r\nexp=16.7170592;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[194 81 ];\r\nexp=0.6042720;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[96 61 ];\r\nexp=1.8595639;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[190 1 ];\r\nexp=0.0077770;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[237 51 ];\r\nexp=0.2549165;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[52 31 ];\r\nexp=3.2254600;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 71 ];\r\nexp=0.3189378;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[29 61 ];\r\nexp=22.6508544;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4030 ];\r\nexp=13.0143792;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[39 31 ];\r\nexp=5.7607904;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[62 61 ];\r\nexp=4.4733355;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 61 ];\r\nexp=0.2829993;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[86 51 ];\r\nexp=1.9374169;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[252 91 ];\r\nexp=0.4023216;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[275 11 ];\r\nexp=0.0408363;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 81 ];\r\nexp=9.6529702;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[127 11 ];\r\nexp=0.1914728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[223 61 ];\r\nexp=0.3443890;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[160 21 ];\r\nexp=0.2303047;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[196 31 ];\r\nexp=0.2265546;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[55 91 ];\r\nexp=8.5730698;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[110 1234 ];\r\nexp=44.0395169;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[274 61 ];\r\nexp=0.2281140;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6800 ];\r\nexp=23.8846446;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3310 ];\r\nexp=10.5630642;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[44 31 ];\r\nexp=4.5141266;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[295 1 ];\r\nexp=0.0032261;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[64 11 ];\r\nexp=0.7540525;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[240 21 ];\r\nexp=0.1023567;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[91 21 ];\r\nexp=0.7120327;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1870 ];\r\nexp=5.8744286;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1730 ];\r\nexp=5.4290641;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 51 ];\r\nexp=0.2134486;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[51 91 ];\r\nexp=10.0258563;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4200 ];\r\nexp=13.6075829;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[262 81 ];\r\nexp=0.3312919;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[74 81 ];\r\nexp=4.1674764;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[88 81 ];\r\nexp=2.9417237;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 91 ];\r\nexp=0.3929103;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[72 41 ];\r\nexp=2.2226617;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7900 ];\r\nexp=29.6707716;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1620 ];\r\nexp=5.0800699;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[253 71 ];\r\nexp=0.3114186;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[265 91 ];\r\nexp=0.3638145;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[248 1 ];\r\nexp=0.0045647;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6090 ];\r\nexp=20.7696393;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[158 71 ];\r\nexp=0.7985813;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2170 ];\r\nexp=6.8338053;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1500 ];\r\nexp=4.7002140;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[163 31 ];\r\nexp=0.3275780;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[139 31 ];\r\nexp=0.4504729;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[271 21 ];\r\nexp=0.0802786;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 41 ];\r\nexp=0.9016072;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[156 81 ];\r\nexp=0.9346125;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[100 61 ];\r\nexp=1.7135925;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[85 91 ];\r\nexp=3.5451226;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 61 ];\r\nexp=9.4316060;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 61 ];\r\nexp=5.3012744;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[136 61 ];\r\nexp=0.9260755;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5200 ];\r\nexp=17.2436039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[159 71 ];\r\nexp=0.7885653;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[86 61 ];\r\nexp=2.3180653;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8140 ];\r\nexp=31.2094004;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5190 ];\r\nexp=17.2057754;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 6845 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6570 ];\r\nexp=22.8379951;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[285 71 ];\r\nexp=0.2454102;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6460 ];\r\nexp=22.3511092;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[75 573 ];\r\nexp=43.3260450;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[46 41 ];\r\nexp=5.4730826;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[52 21 ];\r\nexp=2.1824862;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5950 ];\r\nexp=20.1913108;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[68 91 ];\r\nexp=5.5599659;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[64 21 ];\r\nexp=1.4399949;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[36 11 ];\r\nexp=2.3856596;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 21 ];\r\nexp=0.3283507;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[9 1 ];\r\nexp=3.4745532;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[143 31 ];\r\nexp=0.4256222;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[116 91 ];\r\nexp=1.9000393;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[23 41 ];\r\nexp=24.7121091;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8390 ];\r\nexp=33.0022766;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 51 ];\r\nexp=0.3579647;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[66 91 ];\r\nexp=5.9068209;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[203 21 ];\r\nexp=0.1430697;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 230 ];\r\nexp=0.7175455;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7250 ];\r\nexp=26.0668121;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[81 71 ];\r\nexp=3.0438586;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 91 ];\r\nexp=0.7547006;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[273 41 ];\r\nexp=0.1544470;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[224 91 ];\r\nexp=0.5091983;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[25 1 ];\r\nexp=0.4492173;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[243 51 ];\r\nexp=0.2424831;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4920 ];\r\nexp=16.1968290;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 840 ];\r\nexp=2.6239945;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2740 ];\r\nexp=8.6794304;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 91 ];\r\nexp=10.9018740;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[244 81 ];\r\nexp=0.3819768;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[197 31 ];\r\nexp=0.2242603;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[186 31 ];\r\nexp=0.2515707;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[278 71 ];\r\nexp=0.2579249;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[258 1 ];\r\nexp=0.0042177;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2990 ];\r\nexp=9.5002916;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[10 1 ];\r\nexp=2.8120066;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7390 ];\r\nexp=26.7901102;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 430 ];\r\nexp=1.3418485;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[46 215 ];\r\nexp=42.3568299;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6250 ];\r\nexp=21.4435357;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[109 1 ];\r\nexp=0.0236301;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 31 ];\r\nexp=0.3767088;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 41 ];\r\nexp=0.1368700;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[277 21 ];\r\nexp=0.0768385;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[136 81 ];\r\nexp=1.2298703;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 910 ];\r\nexp=2.8433535;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[224 21 ];\r\nexp=0.1175014;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2440 ];\r\nexp=7.7039453;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 71 ];\r\nexp=1.4081796;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[20 31 ];\r\nexp=24.7100694;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5120 ];\r\nexp=16.9419243;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1940 ];\r\nexp=6.0976449;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 1445 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 6635 ];\r\nexp=44.7753101;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 280 ];\r\nexp=0.8735777;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[219 41 ];\r\nexp=0.2400045;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[262 61 ];\r\nexp=0.2494890;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 970 ];\r\nexp=3.0315083;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7720 ];\r\nexp=28.6029416;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[189 31 ];\r\nexp=0.2436475;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[110 51 ];\r\nexp=1.1836603;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 61 ];\r\nexp=0.1928498;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[231 5445 ];\r\nexp=44.9999996;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[69 81 ];\r\nexp=4.7988649;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[107 11 ];\r\nexp=0.2697430;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[114 21 ];\r\nexp=0.4536767;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[47 225 ];\r\nexp=43.2757298;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[17 1 ];\r\nexp=0.9716372;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[130 81 ];\r\nexp=1.3460985;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4630 ];\r\nexp=15.1376561;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[121 91 ];\r\nexp=1.7460565;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[82 41 ];\r\nexp=1.7129065;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[199 31 ];\r\nexp=0.2197751;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[93 71 ];\r\nexp=2.3071761;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5540 ];\r\nexp=18.5513095;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[126 41 ];\r\nexp=0.7251166;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4260 ];\r\nexp=13.8184496;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 440 ];\r\nexp=1.3730779;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3130 ];\r\nexp=9.9634881;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 61 ];\r\nexp=0.8146500;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1170 ];\r\nexp=3.6596870;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 4081 ];\r\nexp=44.4955953;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[271 41 ];\r\nexp=0.1567351;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1490 ];\r\nexp=4.6685979;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[291 21 ];\r\nexp=0.0696230;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[139 51 ];\r\nexp=0.7411528;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[53 51 ];\r\nexp=5.1245500;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[42 71 ];\r\nexp=11.6156650;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[243 91 ];\r\nexp=0.4326773;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4430 ];\r\nexp=14.4204070;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 11 ];\r\nexp=0.0700282;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[112 61 ];\r\nexp=1.3657683;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[219 31 ];\r\nexp=0.1814659;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4910 ];\r\nexp=16.1599009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[44 11 ];\r\nexp=1.5959920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 11 ];\r\nexp=0.0837741;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[276 71 ];\r\nexp=0.2616766;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[75 91 ];\r\nexp=4.5611459;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 21 ];\r\nexp=0.2139567;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[195 41 ];\r\nexp=0.3027202;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[116 81 ];\r\nexp=1.6909858;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[282 8114 ];\r\nexp=44.6253583;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[37 11 ];\r\nexp=2.2581760;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1910 ];\r\nexp=6.0019356;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[182 1 ];\r\nexp=0.0084757;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[176 21 ];\r\nexp=0.1903338;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 1 ];\r\nexp=0.0194965;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1320 ];\r\nexp=4.1319681;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 9061 ];\r\nexp=44.6614758;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7700 ];\r\nexp=28.4881098;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[79 636 ];\r\nexp=43.5312934;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5280 ];\r\nexp=17.5474818;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[227 31 ];\r\nexp=0.1689006;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[275 41 ];\r\nexp=0.1522086;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[171 1 ];\r\nexp=0.0096012;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[229 91 ];\r\nexp=0.4872031;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 1 ];\r\nexp=0.0070187;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 41 ];\r\nexp=0.5327126;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[169 31 ];\r\nexp=0.3047300;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[133 41 ];\r\nexp=0.6507837;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1150 ];\r\nexp=3.5967945;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 1 ];\r\nexp=0.0129922;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[144 51 ];\r\nexp=0.6905672;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[30 51 ];\r\nexp=16.8668385;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[217 4805 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 1 ];\r\nexp=0.0163597;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[58 41 ];\r\nexp=3.4299252;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[116 61 ];\r\nexp=1.2731382;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 1 ];\r\nexp=0.1518392;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[167 21 ];\r\nexp=0.2114020;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[295 31 ];\r\nexp=0.1000086;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[217 51 ];\r\nexp=0.3040728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7220 ];\r\nexp=25.9148699;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[25 51 ];\r\nexp=26.5497777;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3620 ];\r\nexp=11.6073520;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[67 31 ];\r\nexp=1.9402732;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 31 ];\r\nexp=0.0967027;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8610 ];\r\nexp=34.8206771;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[81 91 ];\r\nexp=3.9060385;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 31 ];\r\nexp=2.6826598;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 180 ];\r\nexp=0.5615346;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[73 81 ];\r\nexp=4.2832883;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[201 21 ];\r\nexp=0.1459311;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[68 11 ];\r\nexp=0.6679330;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[159 51 ];\r\nexp=0.5663996;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[204 1 ];\r\nexp=0.0067462;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[189 81 ];\r\nexp=0.6366722;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 590 ];\r\nexp=1.8417362;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[149 61 ];\r\nexp=0.7714868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8980 ];\r\nexp=38.9553303;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[216 11 ];\r\nexp=0.0661918;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 91 ];\r\nexp=1.8053178;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[125 81 ];\r\nexp=1.4560313;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6750 ];\r\nexp=23.6536081;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 790 ];\r\nexp=2.4674046;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4520 ];\r\nexp=14.7419107;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6830 ];\r\nexp=24.0242561;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[94 51 ];\r\nexp=1.6213062;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[75 21 ];\r\nexp=1.0483648;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5630 ];\r\nexp=18.9049816;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[86 71 ];\r\nexp=2.6991243;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 31 ];\r\nexp=4.7284323;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[193 31 ];\r\nexp=0.2336526;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 31 ];\r\nexp=0.1297425;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[287 21 ];\r\nexp=0.0715772;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6870 ];\r\nexp=24.2115915;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 41 ];\r\nexp=3.5519442;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[239 11 ];\r\nexp=0.0540650;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 71 ];\r\nexp=0.5407548;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8470 ];\r\nexp=33.6315148;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[77 61 ];\r\nexp=2.8933815;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 1125 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 9183 ];\r\nexp=44.6530547;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7170 ];\r\nexp=25.6638839;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5560 ];\r\nexp=18.6296154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 980 ];\r\nexp=3.0628800;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 91 ];\r\nexp=1.2154985;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5820 ];\r\nexp=19.6630507;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[32 61 ];\r\nexp=17.8587444;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5270 ];\r\nexp=17.5093740;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[237 31 ];\r\nexp=0.1549479;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[168 1 ];\r\nexp=0.0099472;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[41 71 ];\r\nexp=12.2256701;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[207 11 ];\r\nexp=0.0720728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 61 ];\r\nexp=0.2740155;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 51 ];\r\nexp=0.1590921;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[161 51 ];\r\nexp=0.5524132;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[265 1 ];\r\nexp=0.0039979;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 21 ];\r\nexp=0.0974246;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[195 61 ];\r\nexp=0.4503988;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[160 2612 ];\r\nexp=44.6077195;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6150 ];\r\nexp=21.0206716;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[83 21 ];\r\nexp=0.8559461;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[160 61 ];\r\nexp=0.6690338;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[156 61 ];\r\nexp=0.7037899;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[162 1 ];\r\nexp=0.0106977;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 61 ];\r\nexp=0.6215362;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[107 51 ];\r\nexp=1.2510059;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[215 41 ];\r\nexp=0.2490182;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[212 91 ];\r\nexp=0.5684822;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[84 61 ];\r\nexp=2.4300259;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6630 ];\r\nexp=23.1071658;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 61 ];\r\nexp=1.2097168;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[7 1 ];\r\nexp=5.7684795;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6730 ];\r\nexp=23.5617578;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2860 ];\r\nexp=9.0724806;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[274 21 ];\r\nexp=0.0785303;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1510 ];\r\nexp=4.7318359;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[42 21 ];\r\nexp=3.3498826;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5220 ];\r\nexp=17.3193640;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8670 ];\r\nexp=35.3730578;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[18 31 ];\r\nexp=34.8306447;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8540 ];\r\nexp=34.2104815;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[256 21 ];\r\nexp=0.0899619;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[91 71 ];\r\nexp=2.4099422;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[247 51 ];\r\nexp=0.2346928;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[56 21 ];\r\nexp=1.8813698;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[135 91 ];\r\nexp=1.4023810;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3930 ];\r\nexp=12.6682378;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[97 41 ];\r\nexp=1.2237457;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 8000 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 41 ];\r\nexp=0.1468211;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 21 ];\r\nexp=0.2728412;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[23 11 ];\r\nexp=5.8790664;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[139 1 ];\r\nexp=0.0145308;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[78 620 ];\r\nexp=43.5307164;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 41 ];\r\nexp=0.1841728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[69 41 ];\r\nexp=2.4205902;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2730 ];\r\nexp=8.6467533;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[141 91 ];\r\nexp=1.2854868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3800 ];\r\nexp=12.2211854;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 11 ];\r\nexp=0.0367211;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[276 21 ];\r\nexp=0.0773963;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 11 ];\r\nexp=0.2801172;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[238 81 ];\r\nexp=0.4014801;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 91 ];\r\nexp=0.6387576;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[293 41 ];\r\nexp=0.1340815;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[299 9122 ];\r\nexp=44.6851269;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[21 1 ];\r\nexp=0.6366722;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[36 91 ];\r\nexp=21.7406299;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[270 7438 ];\r\nexp=44.5863296;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5870 ];\r\nexp=19.8652679;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[125 21 ];\r\nexp=0.3773380;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 81 ];\r\nexp=1.3055882;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4510 ];\r\nexp=14.7060881;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[111 91 ];\r\nexp=2.0753631;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[176 11 ];\r\nexp=0.0996981;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[76 81 ];\r\nexp=3.9496009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[183 51 ];\r\nexp=0.4275657;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[144 41 ];\r\nexp=0.5551429;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[111 11 ];\r\nexp=0.2506519;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[232 21 ];\r\nexp=0.1095376;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[153 2388 ];\r\nexp=44.3197033;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[264 41 ];\r\nexp=0.1651571;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[203 1 ];\r\nexp=0.0068128;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[206 1 ];\r\nexp=0.0066158;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[190 41 ];\r\nexp=0.3188632;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[67 51 ];\r\nexp=3.1962494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[59 21 ];\r\nexp=1.6946784;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8380 ];\r\nexp=32.9257979;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[108 51 ];\r\nexp=1.2279321;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[267 7274 ];\r\nexp=44.7042055;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 21 ];\r\nexp=0.0663905;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 9070 ];\r\nexp=40.4879078;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[247 31 ];\r\nexp=0.1426554;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1580 ];\r\nexp=4.9533543;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 310 ];\r\nexp=0.9672092;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 91 ];\r\nexp=0.4221877;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[110 81 ];\r\nexp=1.8807470;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[189 1 ];\r\nexp=0.0078595;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[299 91 ];\r\nexp=0.2857755;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4820 ];\r\nexp=15.8288860;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 41 ];\r\nexp=0.3399986;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[173 81 ];\r\nexp=0.7599105;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[201 61 ];\r\nexp=0.4239087;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1820 ];\r\nexp=5.7152103;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[130 41 ];\r\nexp=0.6811720;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[65 71 ];\r\nexp=4.7395084;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 91 ];\r\nexp=0.6931066;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[136 1887 ];\r\nexp=44.4506934;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[171 51 ];\r\nexp=0.4896861;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[236 91 ];\r\nexp=0.4587274;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[173 31 ];\r\nexp=0.2908008;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[35 41 ];\r\nexp=9.5737143;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 9020 ];\r\nexp=39.5832887;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[296 91 ];\r\nexp=0.2915978;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[33 41 ];\r\nexp=10.8258185;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4110 ];\r\nexp=13.2927675;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[277 1 ];\r\nexp=0.0036590;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[254 31 ];\r\nexp=0.1349008;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[82 81 ];\r\nexp=3.3899244;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[54 21 ];\r\nexp=2.0235395;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[54 91 ];\r\nexp=8.9040499;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[85 71 ];\r\nexp=2.7632032;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[14 1 ];\r\nexp=1.4329920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[170 81 ];\r\nexp=0.7869742;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[42 51 ];\r\nexp=8.2296248;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[35 125 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3390 ];\r\nexp=10.8310888;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[122 81 ];\r\nexp=1.5285870;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[74 31 ];\r\nexp=1.5901570;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8170 ];\r\nexp=31.4129069;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1660 ];\r\nexp=5.2068859;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 41 ];\r\nexp=0.6411051;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 3454 ];\r\nexp=44.4258154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[143 81 ];\r\nexp=1.1123483;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[67 91 ];\r\nexp=5.7294046;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[208 41 ];\r\nexp=0.2660616;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[169 81 ];\r\nexp=0.7963175;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[213 11 ];\r\nexp=0.0680695;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 61 ];\r\nexp=0.7413270;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 21 ];\r\nexp=0.0878899;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[174 71 ];\r\nexp=0.6584409;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[242 41 ];\r\nexp=0.1965510;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[265 31 ];\r\nexp=0.1239339;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6930 ];\r\nexp=24.4952155;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[177 1 ];\r\nexp=0.0089613;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8630 ];\r\nexp=35.0015489;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[281 8057 ];\r\nexp=44.7766386;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4450 ];\r\nexp=14.4916789;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[257 51 ];\r\nexp=0.2167838;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7210 ];\r\nexp=25.8644501;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8110 ];\r\nexp=31.0086245;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 31 ];\r\nexp=0.6044357;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4010 ];\r\nexp=12.9449893;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[85 737 ];\r\nexp=44.2615751;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[287 1 ];\r\nexp=0.0034084;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6900 ];\r\nexp=24.3530039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[107 81 ];\r\nexp=1.9878552;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[73 91 ];\r\nexp=4.8168446;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5830 ];\r\nexp=19.7034001;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[125 51 ];\r\nexp=0.9165221;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[174 31 ];\r\nexp=0.2874678;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[258 91 ];\r\nexp=0.3838254;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[88 51 ];\r\nexp=1.8502291;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 890 ];\r\nexp=2.7806630;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 71 ];\r\nexp=1.1618593;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5890 ];\r\nexp=19.9464871;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[275 81 ];\r\nexp=0.3007089;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[201 31 ];\r\nexp=0.2154232;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[103 61 ];\r\nexp=1.6151178;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[169 11 ];\r\nexp=0.1081282;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[234 81 ];\r\nexp=0.4153242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[127 41 ];\r\nexp=0.7137400;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[45 61 ];\r\nexp=8.5850615;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[268 71 ];\r\nexp=0.2775328;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 81 ];\r\nexp=1.5800158;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2520 ];\r\nexp=7.9631306;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[39 91 ];\r\nexp=17.9483177;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 31 ];\r\nexp=0.6816548;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 91 ];\r\nexp=1.1060655;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1260 ];\r\nexp=3.9429273;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6980 ];\r\nexp=24.7340581;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[212 61 ];\r\nexp=0.3810567;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[8 1 ];\r\nexp=4.4040343;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[153 61 ];\r\nexp=0.7316660;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[55 1 ];\r\nexp=0.0928099;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3080 ];\r\nexp=9.7977560;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[108 81 ];\r\nexp=1.9511562;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[81 41 ];\r\nexp=1.7555143;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[242 71 ];\r\nexp=0.3403741;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[46 81 ];\r\nexp=11.0165379;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[221 1 ];\r\nexp=0.0057482;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[249 71 ];\r\nexp=0.3215048;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7440 ];\r\nexp=27.0544802;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[45 21 ];\r\nexp=2.9165098;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[289 21 ];\r\nexp=0.0705899;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7520 ];\r\nexp=27.4846425;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[235 1 ];\r\nexp=0.0050837;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[299 1234 ];\r\nexp=3.8870928;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 1 ];\r\nexp=0.0044920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[176 51 ];\r\nexp=0.4622558;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8510 ];\r\nexp=33.9588221;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[151 31 ];\r\nexp=0.3817151;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[61 1 ];\r\nexp=0.0754501;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 31 ];\r\nexp=0.4995219;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[238 21 ];\r\nexp=0.1040843;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[238 91 ];\r\nexp=0.4510494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[101 31 ];\r\nexp=0.8533003;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[252 1 ];\r\nexp=0.0044210;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[101 41 ];\r\nexp=1.1286835;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 51 ];\r\nexp=0.6197772;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8830 ];\r\nexp=37.0236469;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[240 31 ];\r\nexp=0.1510984;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 51 ];\r\nexp=0.7975086;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1020 ];\r\nexp=3.1884039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[257 91 ];\r\nexp=0.3868183;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[128 11 ];\r\nexp=0.1884927;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6160 ];\r\nexp=21.0627029;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[213 31 ];\r\nexp=0.1918335;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 51 ];\r\nexp=0.2201977;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[126 11 ];\r\nexp=0.1945242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 51 ];\r\nexp=0.1826315;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[150 41 ];\r\nexp=0.5116148;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7480 ];\r\nexp=27.2684278;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4140 ];\r\nexp=13.3975114;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[133 51 ];\r\nexp=0.8095495;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[168 41 ];\r\nexp=0.4078483;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[281 71 ];\r\nexp=0.2524469;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 2205 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 1 ];\r\nexp=0.0219868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[242 61 ];\r\nexp=0.2924323;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[56 91 ];\r\nexp=8.2607465;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[260 21 ];\r\nexp=0.0872152;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[22 31 ];\r\nexp=19.4398009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[165 71 ];\r\nexp=0.7322451;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2190 ];\r\nexp=6.8980297;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7570 ];\r\nexp=27.7582308;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[141 41 ];\r\nexp=0.5790205;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4840 ];\r\nexp=15.9022391;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[142 11 ];\r\nexp=0.1531570;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7750 ];\r\nexp=28.7765421;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[232 81 ];\r\nexp=0.4225163;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[53 21 ];\r\nexp=2.1007558;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[123 81 ];\r\nexp=1.5038100;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 51 ];\r\nexp=0.3246830;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[273 1 ];\r\nexp=0.0037670;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[50 81 ];\r\nexp=9.2565056;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 1 ];\r\nexp=0.0031614;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 11 ];\r\nexp=0.1120718;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6260 ];\r\nexp=21.4861399;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[253 81 ];\r\nexp=0.3552825;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[144 91 ];\r\nexp=1.2324494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[288 8463 ];\r\nexp=44.6385985;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[268 7328 ];\r\nexp=44.5316039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[297 61 ];\r\nexp=0.1941507;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[62 41 ];\r\nexp=2.9999445;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[223 5074 ];\r\nexp=44.6458418;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[248 91 ];\r\nexp=0.4154052;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[106 61 ];\r\nexp=1.5249020;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[211 41 ];\r\nexp=0.2585494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 21 ];\r\nexp=0.4094400;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 1 ];\r\nexp=0.0063662;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4660 ];\r\nexp=15.2461386;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[172 71 ];\r\nexp=0.6738453;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[214 91 ];\r\nexp=0.5579047;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 11 ];\r\nexp=0.1799582;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[50 255 ];\r\nexp=44.1896883;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[227 51 ];\r\nexp=0.2778715;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4330 ];\r\nexp=14.0654935;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[115 1 ];\r\nexp=0.0212287;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[80 91 ];\r\nexp=4.0049368;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[228 21 ];\r\nexp=0.1134147;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[104 11 ];\r\nexp=0.2855301;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[260 61 ];\r\nexp=0.2533422;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 1 ];\r\nexp=0.0033383;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 81 ];\r\nexp=2.0644344;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 71 ];\r\nexp=6.1830728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 188 ];\r\nexp=42.5787456;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[214 71 ];\r\nexp=0.4352775;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[284 11 ];\r\nexp=0.0382891;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[267 41 ];\r\nexp=0.1614665;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[270 31 ];\r\nexp=0.1193862;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 51 ];\r\nexp=0.8344642;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[70 71 ];\r\nexp=4.0817971;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[21 41 ];\r\nexp=32.8296766;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[282 91 ];\r\nexp=0.3212706;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[24 11 ];\r\nexp=5.3933350;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[226 21 ];\r\nexp=0.1154310;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[227 11 ];\r\nexp=0.0599322;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4800 ];\r\nexp=15.7556484;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 81 ];\r\nexp=1.2668806;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[256 61 ];\r\nexp=0.2613212;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8860 ];\r\nexp=37.3715407;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[230 81 ];\r\nexp=0.4298969;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[182 91 ];\r\nexp=0.7713825;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[142 2057 ];\r\nexp=44.3369812;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[32 71 ];\r\nexp=21.4019868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[142 61 ];\r\nexp=0.8494455;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3170 ];\r\nexp=10.0963242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[191 61 ];\r\nexp=0.4694629;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[190 71 ];\r\nexp=0.5522004;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[205 71 ];\r\nexp=0.4743394;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[248 71 ];\r\nexp=0.3241029;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 31 ];\r\nexp=0.3158443;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 51 ];\r\nexp=0.6810732;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6050 ];\r\nexp=20.6033628;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[254 71 ];\r\nexp=0.3089712;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[185 71 ];\r\nexp=0.5824565;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3380 ];\r\nexp=10.7975318;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[296 71 ];\r\nexp=0.2275088;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[38 81 ];\r\nexp=16.6740056;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[24 1 ];\r\nexp=0.4874355;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 31 ];\r\nexp=0.1110109;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8690 ];\r\nexp=35.5640799;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4160 ];\r\nexp=13.4674481;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[252 61 ];\r\nexp=0.2696832;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[98 71 ];\r\nexp=2.0773304;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[209 81 ];\r\nexp=0.5206370;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2710 ];\r\nexp=8.5814338;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 21 ];\r\nexp=1.8158465;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[102 51 ];\r\nexp=1.3767520;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1770 ];\r\nexp=5.5561708;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8160 ];\r\nexp=31.3447605;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[74 71 ];\r\nexp=3.6499694;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[51 41 ];\r\nexp=4.4432920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[297 91 ];\r\nexp=0.2896374;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[48 71 ];\r\nexp=8.7887794;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[140 41 ];\r\nexp=0.5873229;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[284 61 ];\r\nexp=0.2123322;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[229 41 ];\r\nexp=0.2195007;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[294 81 ];\r\nexp=0.2630966;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[138 71 ];\r\nexp=1.0469250;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[84 11 ];\r\nexp=0.4376931;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[220 11 ];\r\nexp=0.0638067;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 650 ];\r\nexp=2.0293307;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[261 31 ];\r\nexp=0.1277617;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 11 ];\r\nexp=0.0460375;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[150 21 ];\r\nexp=0.2620364;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3580 ];\r\nexp=11.4717190;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[295 71 ];\r\nexp=0.2290539;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8330 ];\r\nexp=32.5500293;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[127 21 ];\r\nexp=0.3655463;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[196 91 ];\r\nexp=0.6651000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7230 ];\r\nexp=25.9654030;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[55 51 ];\r\nexp=4.7550987;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[118 61 ];\r\nexp=1.2303199;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[172 61 ];\r\nexp=0.5789235;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3990 ];\r\nexp=12.8756810;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 41 ];\r\nexp=4.8168001;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8400 ];\r\nexp=33.0792168;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[272 51 ];\r\nexp=0.1935327;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 51 ];\r\nexp=0.2366048;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[209 71 ];\r\nexp=0.4563550;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 51 ];\r\nexp=1.1216128;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[58 11 ];\r\nexp=0.9181841;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[90 21 ];\r\nexp=0.7279469;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5580 ];\r\nexp=18.7080845;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[26 1 ];\r\nexp=0.4153242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6020 ];\r\nexp=20.4792082;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[153 71 ];\r\nexp=0.8516442;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[231 71 ];\r\nexp=0.3735643;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[296 41 ];\r\nexp=0.1313774;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[218 51 ];\r\nexp=0.3012894;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[156 71 ];\r\nexp=0.8191945;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[244 91 ];\r\nexp=0.4291377;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[97 61 ];\r\nexp=1.8213680;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[33 21 ];\r\nexp=5.4466530;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[48 21 ];\r\nexp=2.5623281;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5180 ];\r\nexp=17.1679811;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3630 ];\r\nexp=11.6413032;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[164 81 ];\r\nexp=0.8456275;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[180 3306 ];\r\nexp=44.7534375;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 61 ];\r\nexp=7.2085690;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[89 21 ];\r\nexp=0.7444009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2110 ];\r\nexp=6.6413404;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[199 4040 ];\r\nexp=44.3892211;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[297 31 ];\r\nexp=0.0986662;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5920 ];\r\nexp=20.0686784;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7180 ];\r\nexp=25.7138602;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5210 ];\r\nexp=17.2814667;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[212 11 ];\r\nexp=0.0687132;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 1 ];\r\nexp=0.0046393;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 11 ];\r\nexp=0.0494119;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[47 1 ];\r\nexp=0.1270938;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[112 41 ];\r\nexp=0.9177847;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5110 ];\r\nexp=16.9043649;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6410 ];\r\nexp=22.1324926;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7030 ];\r\nexp=24.9752527;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7970 ];\r\nexp=30.1045540;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 1 ];\r\nexp=0.0043176;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[222 5028 ];\r\nexp=44.4345459;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[247 61 ];\r\nexp=0.2807124;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[40 163 ];\r\nexp=43.3665978;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[88 21 ];\r\nexp=0.7614192;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[91 51 ];\r\nexp=1.7300957;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 21 ];\r\nexp=0.2804200;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[170 61 ];\r\nexp=0.5926273;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[95 11 ];\r\nexp=0.3421957;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[137 1 ];\r\nexp=0.0149581;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[220 51 ];\r\nexp=0.2958362;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 51 ];\r\nexp=0.8218652;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6850 ];\r\nexp=24.1177523;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[271 61 ];\r\nexp=0.2331926;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 31 ];\r\nexp=0.2570695;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3250 ];\r\nexp=10.3626812;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[11 1 ];\r\nexp=2.3227865;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[148 81 ];\r\nexp=1.0384257;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5400 ];\r\nexp=18.0076051;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[287 31 ];\r\nexp=0.1056617;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[183 11 ];\r\nexp=0.0922168;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[278 81 ];\r\nexp=0.2942536;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[291 1 ];\r\nexp=0.0033154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[64 71 ];\r\nexp=4.8902189;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 61 ];\r\nexp=0.2036368;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[124 51 ];\r\nexp=0.9313695;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[230 21 ];\r\nexp=0.1114509;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[109 51 ];\r\nexp=1.2054913;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[84 91 ];\r\nexp=3.6304847;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[289 81 ];\r\nexp=0.2722793;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[138 1 ];\r\nexp=0.0147421;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[130 91 ];\r\nexp=1.5124296;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[182 21 ];\r\nexp=0.1779910;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8780 ];\r\nexp=36.4745305","published":true,"deleted":false,"likes_count":7,"comments_count":4,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":59,"test_suite_updated_at":"2014-02-10T18:16:06.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-15T23:22:36.000Z","updated_at":"2026-04-04T03:45:55.000Z","published_at":"2013-09-15T23:34:41.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/2933486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Captain Hammer\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The problem is modified to fit within Cody dimensions.\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 Challenge is to return the lower angle of a cannon given a target distance and an initial cannonball velocity. Gravity is a constant at 9.8m/sec^2, A valid solution is assured. (Error tolerance 2e-6).\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 [v d] Velocity and Distance in meters.\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 theta in units of degrees with an accuracy of 2e-6\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 8 minutes, 755/1070 completed\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 winner completed all three GJam China Challenges in 26 minutes with second at 43 minutes.\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\"}]}"},{"id":44075,"title":"GJam 2017 Kickstart: Parentheses (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p2 GJam 2017 Kickstart Parentheses\u003e. This is the first 100 large cases with  1\u003c=L+R\u003c=10^5.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\r\n\r\n*Input:* [L,R], the quantity of parentheses types\r\n\r\n*Output:* [V], the maximum number of parentheses pairings\r\n\r\n*Examples:* [L,R] [V]; [3,2] [3]\r\n\r\nFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for L+R=10^5. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p2\"\u003eGJam 2017 Kickstart Parentheses\u003c/a\u003e. This is the first 100 large cases with  1\u0026lt;=L+R\u0026lt;=10^5.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [L,R], the quantity of parentheses types\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the maximum number of parentheses pairings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [L,R] [V]; [3,2] [3]\u003c/p\u003e\u003cp\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=10^5. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=parenc(L,R)\r\n% L number of Left parentheses, R number of Right parentheses \r\n% Determine maxinum number of parenthese pairings\r\n% http://code.google.com/codejam/contest/6304486/dashboard#s=p2\r\n\r\nval=0;\r\n \r\nend","test_suite":"%%\r\nv=parenc(36499,40104);\r\nassert(~isempty(v))\r\nassert(v==666106750)\r\n%%\r\nv=parenc(75814,21934);\r\nassert(~isempty(v))\r\nassert(v==240561145)\r\n%%\r\nv=parenc(88684,2943);\r\nassert(~isempty(v))\r\nassert(v==4332096)\r\n%%\r\nv=parenc(63688,19182);\r\nassert(~isempty(v))\r\nassert(v==183984153)\r\n%%\r\nv=parenc(71034,19757);\r\nassert(~isempty(v))\r\nassert(v==195179403)\r\n%%\r\nv=parenc(95210,572);\r\nassert(~isempty(v))\r\nassert(v==163878)\r\n%%\r\nv=parenc(50000,50000);\r\nassert(~isempty(v))\r\nassert(v==1250025000)\r\n%%\r\nv=parenc(37583,54023);\r\nassert(~isempty(v))\r\nassert(v==706259736)\r\n%%\r\nv=parenc(13403,50583);\r\nassert(~isempty(v))\r\nassert(v==89826906)\r\n%%\r\nv=parenc(74324,16176);\r\nassert(~isempty(v))\r\nassert(v==130839576)\r\n%%\r\nv=parenc(95662,20);\r\nassert(~isempty(v))\r\nassert(v==210)\r\n%%\r\nv=parenc(84426,8859);\r\nassert(~isempty(v))\r\nassert(v==39245370)\r\n%%\r\nv=parenc(1764,75732);\r\nassert(~isempty(v))\r\nassert(v==1556730)\r\n%%\r\nv=parenc(75135,17355);\r\nassert(~isempty(v))\r\nassert(v==150606690)\r\n%%\r\nv=parenc(16014,48995);\r\nassert(~isempty(v))\r\nassert(v==128232105)\r\n%%\r\nv=parenc(100000,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(90812,5679);\r\nassert(~isempty(v))\r\nassert(v==16128360)\r\n%%\r\nv=parenc(55860,34690);\r\nassert(~isempty(v))\r\nassert(v==601715395)\r\n%%\r\nv=parenc(82678,16936);\r\nassert(~isempty(v))\r\nassert(v==143422516)\r\n%%\r\nv=parenc(50696,22228);\r\nassert(~isempty(v))\r\nassert(v==247053106)\r\n%%\r\nv=parenc(60183,19425);\r\nassert(~isempty(v))\r\nassert(v==188675025)\r\n%%\r\nv=parenc(88288,3180);\r\nassert(~isempty(v))\r\nassert(v==5057790)\r\n%%\r\nv=parenc(18628,32214);\r\nassert(~isempty(v))\r\nassert(v==173510506)\r\n%%\r\nv=parenc(99681,195);\r\nassert(~isempty(v))\r\nassert(v==19110)\r\n%%\r\nv=parenc(7,13);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(62367,35577);\r\nassert(~isempty(v))\r\nassert(v==632879253)\r\n%%\r\nv=parenc(54171,29950);\r\nassert(~isempty(v))\r\nassert(v==448516225)\r\n%%\r\nv=parenc(22417,8626);\r\nassert(~isempty(v))\r\nassert(v==37208251)\r\n%%\r\nv=parenc(37824,9490);\r\nassert(~isempty(v))\r\nassert(v==45034795)\r\n%%\r\nv=parenc(95981,624);\r\nassert(~isempty(v))\r\nassert(v==195000)\r\n%%\r\nv=parenc(57025,7699);\r\nassert(~isempty(v))\r\nassert(v==29641150)\r\n%%\r\nv=parenc(1,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(16007,35971);\r\nassert(~isempty(v))\r\nassert(v==128120028)\r\n%%\r\nv=parenc(2306,52078);\r\nassert(~isempty(v))\r\nassert(v==2659971)\r\n%%\r\nv=parenc(70555,4927);\r\nassert(~isempty(v))\r\nassert(v==12140128)\r\n%%\r\nv=parenc(19454,63092);\r\nassert(~isempty(v))\r\nassert(v==189238785)\r\n%%\r\nv=parenc(73352,18081);\r\nassert(~isempty(v))\r\nassert(v==163470321)\r\n%%\r\nv=parenc(71344,18591);\r\nassert(~isempty(v))\r\nassert(v==172821936)\r\n%%\r\nv=parenc(76452,13351);\r\nassert(~isempty(v))\r\nassert(v==89131276)\r\n%%\r\nv=parenc(88885,3106);\r\nassert(~isempty(v))\r\nassert(v==4825171)\r\n%%\r\nv=parenc(53619,9977);\r\nassert(~isempty(v))\r\nassert(v==49775253)\r\n%%\r\nv=parenc(39466,15681);\r\nassert(~isempty(v))\r\nassert(v==122954721)\r\n%%\r\nv=parenc(33791,51813);\r\nassert(~isempty(v))\r\nassert(v==570932736)\r\n%%\r\nv=parenc(40408,42624);\r\nassert(~isempty(v))\r\nassert(v==816423436)\r\n%%\r\nv=parenc(998,12);\r\nassert(~isempty(v))\r\nassert(v==78)\r\n%%\r\nv=parenc(58818,23613);\r\nassert(~isempty(v))\r\nassert(v==278798691)\r\n%%\r\nv=parenc(82533,6389);\r\nassert(~isempty(v))\r\nassert(v==20412855)\r\n%%\r\nv=parenc(73823,18704);\r\nassert(~isempty(v))\r\nassert(v==174929160)\r\n%%\r\nv=parenc(24046,69819);\r\nassert(~isempty(v))\r\nassert(v==289117081)\r\n%%\r\nv=parenc(83603,2337);\r\nassert(~isempty(v))\r\nassert(v==2731953)\r\n%%\r\nv=parenc(95719,1658);\r\nassert(~isempty(v))\r\nassert(v==1375311)\r\n%%\r\nv=parenc(9,11);\r\nassert(~isempty(v))\r\nassert(v==45)\r\n%%\r\nv=parenc(29910,7601);\r\nassert(~isempty(v))\r\nassert(v==28891401)\r\n%%\r\nv=parenc(59540,36291);\r\nassert(~isempty(v))\r\nassert(v==658536486)\r\n%%\r\nv=parenc(45871,53970);\r\nassert(~isempty(v))\r\nassert(v==1052097256)\r\n%%\r\nv=parenc(92763,325);\r\nassert(~isempty(v))\r\nassert(v==52975)\r\n%%\r\nv=parenc(9038,44798);\r\nassert(~isempty(v))\r\nassert(v==40847241)\r\n%%\r\nv=parenc(1,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(86549,6287);\r\nassert(~isempty(v))\r\nassert(v==19766328)\r\n%%\r\nv=parenc(14401,46864);\r\nassert(~isempty(v))\r\nassert(v==103701601)\r\n%%\r\nv=parenc(93424,6259);\r\nassert(~isempty(v))\r\nassert(v==19590670)\r\n%%\r\nv=parenc(52933,31692);\r\nassert(~isempty(v))\r\nassert(v==502207278)\r\n%%\r\nv=parenc(91388,2050);\r\nassert(~isempty(v))\r\nassert(v==2102275)\r\n%%\r\nv=parenc(83487,14454);\r\nassert(~isempty(v))\r\nassert(v==104466285)\r\n%%\r\nv=parenc(26996,20778);\r\nassert(~isempty(v))\r\nassert(v==215873031)\r\n%%\r\nv=parenc(88436,1856);\r\nassert(~isempty(v))\r\nassert(v==1723296)\r\n%%\r\nv=parenc(52967,22634);\r\nassert(~isempty(v))\r\nassert(v==256160295)\r\n%%\r\nv=parenc(24373,71635);\r\nassert(~isempty(v))\r\nassert(v==297033751)\r\n%%\r\nv=parenc(25964,41310);\r\nassert(~isempty(v))\r\nassert(v==337077630)\r\n%%\r\nv=parenc(89807,7750);\r\nassert(~isempty(v))\r\nassert(v==30035125)\r\n%%\r\nv=parenc(84029,12987);\r\nassert(~isempty(v))\r\nassert(v==84337578)\r\n%%\r\nv=parenc(23884,41559);\r\nassert(~isempty(v))\r\nassert(v==285234670)\r\n%%\r\nv=parenc(96652,1790);\r\nassert(~isempty(v))\r\nassert(v==1602945)\r\n%%\r\nv=parenc(72470,2981);\r\nassert(~isempty(v))\r\nassert(v==4444671)\r\n%%\r\nv=parenc(51157,44196);\r\nassert(~isempty(v))\r\nassert(v==976665306)\r\n%%\r\nv=parenc(5964,125);\r\nassert(~isempty(v))\r\nassert(v==7875)\r\n%%\r\nv=parenc(5011,79606);\r\nassert(~isempty(v))\r\nassert(v==12557566)\r\n%%\r\nv=parenc(54850,32315);\r\nassert(~isempty(v))\r\nassert(v==522145770)\r\n%%\r\nv=parenc(94427,666);\r\nassert(~isempty(v))\r\nassert(v==222111)\r\n%%\r\nv=parenc(61766,28774);\r\nassert(~isempty(v))\r\nassert(v==413985925)\r\n%%\r\nv=parenc(90805,8083);\r\nassert(~isempty(v))\r\nassert(v==32671486)\r\n%%\r\nv=parenc(50250,34260);\r\nassert(~isempty(v))\r\nassert(v==586890930)\r\n%%\r\nv=parenc(59514,16501);\r\nassert(~isempty(v))\r\nassert(v==136149751)\r\n%%\r\nv=parenc(21448,21340);\r\nassert(~isempty(v))\r\nassert(v==227708470)\r\n%%\r\nv=parenc(48294,20183);\r\nassert(~isempty(v))\r\nassert(v==203686836)\r\n%%\r\nv=parenc(0,100000);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(0,1);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(9321,9795);\r\nassert(~isempty(v))\r\nassert(v==43445181)\r\n%%\r\nv=parenc(33373,207);\r\nassert(~isempty(v))\r\nassert(v==21528)\r\n%%\r\nv=parenc(78080,18989);\r\nassert(~isempty(v))\r\nassert(v==180300555)\r\n%%\r\nv=parenc(89341,7009);\r\nassert(~isempty(v))\r\nassert(v==24566545)\r\n%%\r\nv=parenc(0,2);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(2,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(90124,7716);\r\nassert(~isempty(v))\r\nassert(v==29772186)\r\n%%\r\nv=parenc(36611,12311);\r\nassert(~isempty(v))\r\nassert(v==75786516)\r\n%%\r\nv=parenc(45498,3564);\r\nassert(~isempty(v))\r\nassert(v==6352830)\r\n%%\r\nv=parenc(28355,23958);\r\nassert(~isempty(v))\r\nassert(v==287004861)\r\n%%\r\nv=parenc(58516,24422);\r\nassert(~isempty(v))\r\nassert(v==298229253)\r\n%%\r\nv=parenc(42157,56858);\r\nassert(~isempty(v))\r\nassert(v==888627403)\r\n%%\r\nv=parenc(32854,55517);\r\nassert(~isempty(v))\r\nassert(v==539709085)\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T22:17:05.000Z","updated_at":"2026-03-24T12:06:44.000Z","published_at":"2017-02-25T22:18:40.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/6304486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Parentheses\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 large cases with 1\u0026lt;=L+R\u0026lt;=10^5.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given L left and R right parentheses determine the maximum number of parentheses pairings.\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 [L,R], the quantity of parentheses types\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 [V], the maximum number of parentheses pairings\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 [L,R] [V]; [3,2] [3]\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\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=10^5. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":44078,"title":"GJam 2017 Kickstart: Leader (Small) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p0 GJam 2017 Kickstart Leader\u003e. This is the first 61 small cases with no spaces in names.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\r\n\r\n*Input:* [names], a cell array of names using only A thru Z; max 100 names\r\n\r\n*Output:* [Leader], a string of the name of the leader\r\n\r\n*Examples:* [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']\r\n\r\nFor the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.\r\n\r\n*Theory:* Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p0\"\u003eGJam 2017 Kickstart Leader\u003c/a\u003e. This is the first 61 small cases with no spaces in names.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [names], a cell array of names using only A thru Z; max 100 names\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Leader], a string of the name of the leader\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']\u003c/p\u003e\u003cp\u003eFor the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function Leader=leader(names)\r\n% cell array of names 1xk\r\n% A:Z or Space in the large case. Note space precedes A alphabetically\r\n% Leader is name with most unique letters A:Z. Tie goes to first name alphabetic.\r\n%\r\nLeader=''; % string\r\n \r\nend","test_suite":"%%\r\nnamec={'ITWUORWMTIHLHXND','YWJRRIJNZBSVKLGZSTOS','ELAUQVVEKJMTWANC','EYHASDSIJOFKAJMOBES','FWWT','NCXHB','HL','RLFYACE','AGEOICCFQQQ','OA','HIIE','TCKTEPLEVQKUQEOWV','A','OARWWOWVOTHDV','PRZOIMYUVVENMEFTGND','TRTDGSTGO','XCNBHNURLC','QUDOEEPPPTOEK','CYCS','HLZHZXMWF','VTILQQXFLTHGW','JCLINHPIAFNTTJ','XXFYEVKXHHEODKH','MSMRUKZJGLXXAMZ','TCUPQXPTAECNWPX','YWPPGXGWQS','CMWGICOTZKVNXFJGPB','MJ','PEGZVIQZWWY','RAM','CDZ','BYHBVFDD','HJBUJRQ','BCYSCGACSNDEK','FAX','V','GDHUQRC','AEFTELYHXD','ZAJLLAHJTD','JTZINGJ','MUPIXBGXISKYTLFWEF','XI','DTFDCLELPYSXSTDTNPCL','QPR','IRTDYHWLDN','VGQCLWS','VZTYIFJRPKFENZU','S','CVWAFVIHLTVFFZYZAJ','HTJ','CFPPXYRGRJDAJD','YKZUWMAFLLOO','LUEP','DCIGCJBFQZ','FPITIZAL','GRNHJMHMHHLBRMHQAPDS','K','STNVAPRYZHYMGXPHKOT','V','AMZSA','HGQANFRDWECVUOO','QTDJYMJGHTXFBKHGNDPM','WJHN','QCANDRZEPCYONLCVIR','MEAR','MMUPHNMPQGELDXNQUNN','RZGVCAHMKZ','J','CYQAQULTG','SKRIQOSQJTFQXHLFR','DVTSYAQKECAW','IJQQSONVKAKKE','BPTSIFKWCZCFLOYZCHI','KJDUFENMXBMW','AGBYXTTYADT','SZUYKXYN','KDJNEQOUJDJVBYJSOG','SYKSOIBCKFDXBLH','NLBEBYUKFEDB','VIHKWHLQSIMLJXLBWY','XSPZPLYSMMQEU','OEPRNDZGFSRJBWLY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CMWGICOTZKVNXFJGPB'))\r\n%%\r\nnamec={'ZHWIEVQY','J','TLCILYLZBIY','FQDRXDBMLD','V','VDZCFZFVWOHRYEZ','EXIVJDONPLRYBSSMDNJY','BJUKZQGUNODOS','ZOWWHCMZ','PBPBN','CZTMQECVKFPDPOJRBKE','RFWTTBVG','LSU','NMRDJISMPYOPPBQRQF','AQOX','MFKXSJGWTB','TG','GMTVFGICOFOVL','NYFPRPZPHOQBDPDLFYQ','ZKJAIXOTXFMOGH','ONHHQFYAJR','YMDESSRM','ODUJTUPZ','OLRMFRNEWMI','PNJ','XSABDDN','EYGMT','SBNXXZNHZPDDSHDLC','YYLCARXECOAJRNIPAPK','SNKLYGHSEAJNXOPHDIIU','JGQHZFGVSQTWMF','M','QMZABHEHZNGWTXWO','A','IWSNMWEPVCQUVVSID','WWKOAMZASDPIVGSS','BMAWDVMNVPIOH','KDWDNRSMZHX','GHTSILNVPNATHRSKMKN','TXAGASW','YAEDJNTGS','ZHDYQVEVYJRN','JUZEFWDFTZJAS','VR','QZMQUWZZQFHLDLR','HOCXYNXM','HVLPIHZTLMPRWBME','W','ZU','KRQDDXKQEZYMWLXE','IYDXZ','GAAXUDATDVMNJAXVOGK','PEQIWYUYTNHQIH','UKRYPQDPBQXKLIG','IOSBQBICCHW','PQYBUJCGAXVCEVJYBS','YELCNJFSD','MENCFWQISHJFIGR','AOAYMFZBD','ERJBNWAHTOXCXHWF','RP','VUHINKNRTWKYGKXYJPTC','SQNYR','VDC','PJNLTP','LQSBGPKVEOUKI','ZWDTTSUCQ','NX','ZLBFCC','RFYNJWTWYWTMZI','FUZNVJGKXEYN','MS','EHO','GKJXLCUBUZPV','NRFCAVUNMCBEHIL','JAHZDCPWLMN','RWXOYX','GRIOHZEUXHMNSQSP','KASXYCVDKMRKLMH','JU','NTHZYRMMYIW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SNKLYGHSEAJNXOPHDIIU'))%%\r\nnamec={'ITWUORWMTIHLHXND','YWJRRIJNZBSVKLGZSTOS','ELAUQVVEKJMTWANC','EYHASDSIJOFKAJMOBES','FWWT','NCXHB','HL','RLFYACE','AGEOICCFQQQ','OA','HIIE','TCKTEPLEVQKUQEOWV','A','OARWWOWVOTHDV','PRZOIMYUVVENMEFTGND','TRTDGSTGO','XCNBHNURLC','QUDOEEPPPTOEK','CYCS','HLZHZXMWF','VTILQQXFLTHGW','JCLINHPIAFNTTJ','XXFYEVKXHHEODKH','MSMRUKZJGLXXAMZ','TCUPQXPTAECNWPX','YWPPGXGWQS','CMWGICOTZKVNXFJGPB','MJ','PEGZVIQZWWY','RAM','CDZ','BYHBVFDD','HJBUJRQ','BCYSCGACSNDEK','FAX','V','GDHUQRC','AEFTELYHXD','ZAJLLAHJTD','JTZINGJ','MUPIXBGXISKYTLFWEF','XI','DTFDCLELPYSXSTDTNPCL','QPR','IRTDYHWLDN','VGQCLWS','VZTYIFJRPKFENZU','S','CVWAFVIHLTVFFZYZAJ','HTJ','CFPPXYRGRJDAJD','YKZUWMAFLLOO','LUEP','DCIGCJBFQZ','FPITIZAL','GRNHJMHMHHLBRMHQAPDS','K','STNVAPRYZHYMGXPHKOT','V','AMZSA','HGQANFRDWECVUOO','QTDJYMJGHTXFBKHGNDPM','WJHN','QCANDRZEPCYONLCVIR','MEAR','MMUPHNMPQGELDXNQUNN','RZGVCAHMKZ','J','CYQAQULTG','SKRIQOSQJTFQXHLFR','DVTSYAQKECAW','IJQQSONVKAKKE','BPTSIFKWCZCFLOYZCHI','KJDUFENMXBMW','AGBYXTTYADT','SZUYKXYN','KDJNEQOUJDJVBYJSOG','SYKSOIBCKFDXBLH','NLBEBYUKFEDB','VIHKWHLQSIMLJXLBWY','XSPZPLYSMMQEU','OEPRNDZGFSRJBWLY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CMWGICOTZKVNXFJGPB'))\r\n%%\r\nnamec={'ZHWIEVQY','J','TLCILYLZBIY','FQDRXDBMLD','V','VDZCFZFVWOHRYEZ','EXIVJDONPLRYBSSMDNJY','BJUKZQGUNODOS','ZOWWHCMZ','PBPBN','CZTMQECVKFPDPOJRBKE','RFWTTBVG','LSU','NMRDJISMPYOPPBQRQF','AQOX','MFKXSJGWTB','TG','GMTVFGICOFOVL','NYFPRPZPHOQBDPDLFYQ','ZKJAIXOTXFMOGH','ONHHQFYAJR','YMDESSRM','ODUJTUPZ','OLRMFRNEWMI','PNJ','XSABDDN','EYGMT','SBNXXZNHZPDDSHDLC','YYLCARXECOAJRNIPAPK','SNKLYGHSEAJNXOPHDIIU','JGQHZFGVSQTWMF','M','QMZABHEHZNGWTXWO','A','IWSNMWEPVCQUVVSID','WWKOAMZASDPIVGSS','BMAWDVMNVPIOH','KDWDNRSMZHX','GHTSILNVPNATHRSKMKN','TXAGASW','YAEDJNTGS','ZHDYQVEVYJRN','JUZEFWDFTZJAS','VR','QZMQUWZZQFHLDLR','HOCXYNXM','HVLPIHZTLMPRWBME','W','ZU','KRQDDXKQEZYMWLXE','IYDXZ','GAAXUDATDVMNJAXVOGK','PEQIWYUYTNHQIH','UKRYPQDPBQXKLIG','IOSBQBICCHW','PQYBUJCGAXVCEVJYBS','YELCNJFSD','MENCFWQISHJFIGR','AOAYMFZBD','ERJBNWAHTOXCXHWF','RP','VUHINKNRTWKYGKXYJPTC','SQNYR','VDC','PJNLTP','LQSBGPKVEOUKI','ZWDTTSUCQ','NX','ZLBFCC','RFYNJWTWYWTMZI','FUZNVJGKXEYN','MS','EHO','GKJXLCUBUZPV','NRFCAVUNMCBEHIL','JAHZDCPWLMN','RWXOYX','GRIOHZEUXHMNSQSP','KASXYCVDKMRKLMH','JU','NTHZYRMMYIW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SNKLYGHSEAJNXOPHDIIU'))\r\n%%\r\nnamec={'LKVZZUM','IGFIF','LDWQNWLKKUZRSLNQPZUD','REYHMPLN','RCYUXMNRNM','KIXERSLPASSPBSZ','MOIJUM','CKLGNTVKPJUQVHFKOJYC','CLWO','F','HQBUXWNYFCKBHP','SZOUKQXZW','VTSUFMCZRBVWZXSX','LVSGFAJNPEAZQLQNXSJ','FKD','SHXDHEYZDVZMEKQXDL','OTXAYLGZXQYQUCUOTPHC','NSMRSGMRYNJNHRDBIJNP','UNCSUEFJWEOCCEAUVD','CLSFESORDOQ','VZCJFLXKE','BXRX','ULAQVGZMZDUQAKDZ','F','PQIRUOKFBEANPWHR','DNTYVUERHOWWWAX','NHMSAQTFXLWC','QGGAKSERLLBZMYS','XANXQC','CGRYIBLGJGITDGJXVQL','JMWZUQP','WCJ','DMXNGYCBWWBVWP','DXJHPUCLEYGNRJZJDIPC','LQHEATYFA','UOOAKBGYKHLTCMV','ECXDXYK','TPPFDLEZVFBHIBL','DXQZVMTOQSKGVGVEQH','MVGNOGJEKYUQCQWKONSU','YDXTWABNGHMVNNR','IHMQBV','EKORVOGNTFM','MTQZZAECALPQE','IIAXZLJMLPSWOXIFODF','FVMFSCOCO','KXF','APFP','CEUKJEFHPCE','HKQJYNMPT','ZEBJEIG','BAHVCJRQCCMX','WJKIOOPDLL','EMENSPOLPNYONCJPOC','LSLPVWSVSAZBKCHVR','FDTSF','ZUWDLZVKNYR','IFSFFUQJYEMFOSZBAJ','LFSNKMBHVGRSEWI','WGLBXIFWXQQPZ','AAC','NDKE','WFMWRVTOHZEVSUHQMWIM','LRTOVVMFQONLNCZ','DIUDEPSGTFKHY','PMOQT','BWONTNIT','LXXSEW','JCPZSFLQB','WJLMGE','URPRN','MJ','NJRHYNZWYDXJZDMBI','OZDCEA','ZMOGQE','VVPPYAQMZULHLP','NUC','H','FEFYDOVFMLNLLHM','KNPEI','YPYVMVIPFDDDOQCRHN','TUMWDLK','PSCZOXGBOLWRGXWLWETD','CZTFF','NPPDNACLYJX','SVMMODP','EBPEYFJCQFBIHNCILTP','ZSQXRMZYDOAICOQHPYHU','HKIEWXFRENDNUIHZVJ','UQIJF','XV','DRMGAISIOH','CCRXDBOU','DTAUYOKXRFPGD','FJFZDAMDODXIGERXXIC','NRPLMN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CKLGNTVKPJUQVHFKOJYC'))\r\n%%\r\nnamec={'RZBUJBVYEBGFA','UQQZUUEPNZQGWI','MEVRXOPONULOFXCNJC','OX','AI','KQDWMQ','GB','UGUXMZRPA','JLPXQPEYBGKUPNOVO','DUNZANKBCLMRE','ZUTGVIJRXWBG','YBLGDIAFTFWXGJFSIDJ','MKPDQB','EXZ','XSPHULXTUUH','YI','SDRNMNHGLLAGWPCAQCN','ZCJHBAXB','VTWJZEWCDZ','DCSV','K','CXTRGSSG','TZDBKEGTJODEI','OA','ZZ','SGGYYQWGS','UGRZHKKCKLRCM','CWU','GAHGFI','EHNRYUPAJHEJQALIXXN','VNUUMZUMVTLGQF','JOJ','DTVZWKINQSLWYC','HNIELOMQRNWSRSFOJP','WBN','AZZQ','WPCBLNHQVQ','FFPEGUSPFC','QZVDUHWFOYF','MODJT','YPTOMLGWCBEB','JPBDAHELDOWYAHOH','LTYAWWOYYKRJUY','LD','ATWGLRGLX','GYAQPCCBMTKYON','EJGXJQH','ZNCSTJONBCWQEYJIOUDU','BQHJZZ','RMKTA','UO','WISAENKNTWQJJJR','QDEOAVK','B','DP','QPIVRVKJLTARRYU','AUEWOQXHLNOH','AQURWTVDAV','RI','VKUZECHUBKDQSYIEGR','GQXG','QPIZPWFRE','LLVFWQVKKVGQ','BOHSFPVLG','QDGNJQKOA','KHSIXTK','X','HOMSMBH','JASGHSCEVJPZEBRWIPHP','MZF','EEX','LDWAANCPMTO','DFOSFACRRWBZSZRGP','UPKDRRIGWMB','TLYLODNZAI','RRMHCO','RQXDXZBHA','TNN','RCEUCCHTGPV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VKUZECHUBKDQSYIEGR'))\r\n%%\r\nnamec={'RIVNPYCJWCV','OGILAGJP','SEMHSESRIMDCHE','JRYPYYQBGCQDMUVYTK','PUOCTXXCFLSVMSNN','HMTLDFW','MHRCIQBMPZJSNWPR','B','WBRPSYSLQUTYTMIOMAAD','X','SHHZDMOTCYXKOEF','JDWI','GVGN','SF','FMZXHACXMMHQJCZFYEA','RVWR','UOHRSYKYJPSYXBFCBUAN','EGGFS','MFB','IXJEMEXV','VOSNTCBQAHVSMQ','ZYCS','GWLD','TQHICAYCAHNMD','ZUPTJKZXKY','NALYIAYH','YUVBDDYUR','JSUEAMBVXC','BCGACYPVUKQJF','SOAEDJRTMC','GIM','DDKQJMZKRYYQUUNXJPLS','WAGEH','ACDMUQHJX','UJUCPFLWIWA','ZNCENEADIUCYTDU','CVQ','OIUWAJ','PELUGQEKQHSBEJ','ZVWEBCDPDPZYWKUEB','MUIKNTXIKIGJWJYZR','UDIX','EQUINTBTACTNCVV','A','QRQCTCOFGAGFH','GVPKX','XXZYHYCQCQOWTXHCU','ZYXQBZB','TRZFYLHLGE','MYLXVXPROOQACCREXGNK','HW','K','O','YJDRWVCHIYNO','OGFIXBXOECV','MYIPYKDMC','LKAZRCB','HBQIYHWJGQVAQK','KAOEMQAEDRGCOSWN','PEVMKNMBNQHJOLZPPU','WQGFHUTZXNKXXSO','DATMPBAWIUI','HFMNTXAIINT','EYSGATS','ELMSTZUCYKGVW','AWELUDPHWE','WXXT','BYZGU','QTKIDJAZOLQJ','XCWQPWF','SHZMZNSIYTFWGJMIR','CQTBY','PAXDKIQ','QKPFHU','FRVKRIYOLC','EVLSGGJROSCDEESC','BNBKELFFEIHEZU','GTVPGG','ABAF','CAMHBXEMVJ','RJIQNECRLR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MYLXVXPROOQACCREXGNK'))\r\n%%\r\nnamec={'IPRJSIWLAUJOORGCCTGB','QNJUCJUG','UESLBPMHAOXY','MAEFTMSUCVADS','HSBZYCEBXHQUMMQEBUX','WG','NBCL','JAVVHRIWN','BZUAGAL','KJPLV','BWLWTYKMYR','ZFREZGVRDXAJAOUBBP','ZGTFGRNBOC','SRHLEKFXDGXR','QHTBROH','OFMXKGHMRZKZWWFTQ','ZBRNSZCLM','LSWQXPSVOWACZJSCLPU','I','WTAWIPAXWSOHLOJG','GHUAFRDMHYCPJ','QLXLWQWPDMQBOOI','OFFSREM','LN','IENTDWRP','PWJTIKZWKWGHQQC','N','YNAAY','RVOXH','DGFWIGPZN','TZVZQIAQZHERN','QLAFRTPG','DVMQPCEHDPZXONAS','NIJY','G','ZKEMNSRWZTYIVJ','JYMWYWPARPXPKVDUSH','YSPFGKNLLGXNWHUOI','VXPCGSWYZS','UAZEC','YNMOLESKERXT','ZMKMIUTTHPVIJ','MQAJNGBCLVWFRKSWS','TIAPONYPCBCIPGISAL','ORYFPRXZXX','IE','PGXIAXPUVYIVFSO','WTOJEJA','YVGYRWBQ','JQARHV','PFIZDXYZEIJJ','GDKETMNEOWBKEGPEYSSG','ZDOBW','GMFZQLV','DSBYFWGKQRP','OKSLQUECSIFYKZ','HSQWESAVJDLINXQZ','KNKSNMHISGTREFBAPYOY','MYNDRKEZMOJY','JMTUWXZPYKJA','WMYRZZ','ZWMBGVZUX','J','ODBT','BTAXXZCTOGCYZQ','XUNNFNWSRLTPMJPFD','IOJUDXHUVDFLQ','IWCTLMAAK','EUPCXRCH','BTWYMHV','LHTILDBDOIAEPCTDES','FNVZZIEBPBVH','VKWF','XFIHRDLRIANSU','OVQEBIKFAZLU','KIWIAQJ','VTMFDZELACMCC','HYYKOUVOLFEUUVTLKXQ','TMRTGV','APFAJVKQDXWHQKHUMX','RMDXJSWKZ','CLMNGGNYCOCEWWQPNETQ','EZC','HZKEARCWVRFYVIIEVEP','LZVOTGOJKGSEDCYZTL','SLTOZPVYLCTY','NWCT','EZDI','FYQZYTGEWRTRCKMFFXAL','MNZFJM','JDGETBAYXINCKQOHVAL','FYRAVEWGICVW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JDGETBAYXINCKQOHVAL'))\r\n%%\r\nnamec={'TWFDIRYHKZDLJ','OAUTRCAUOBITSYPN','PAKWLFO','FVJFD','WGVEMOMLKYA','KIEXGQAEEOBF','BUVHDRLRWWUQODSWHPIE','QERU','I','IHTJCQAMKELW','ZZAKYHSVEZIQG','GQSPFNXGZMIVXWZKR','ULZACQ','UYMSDLYLWJQYOOGOF','GABXROMOVULLPPKPNLYI','OWQPFTJUXRDJXCMISMK','XSOPYVSLTHSQSTHQMQ','ERNGWNQQPX','DQ','QH','TT','FSTEFBNQWEO','MKVWBRBPDAQOTROR','DNCLYLKRHCAQNCDG','GZNENCWTPH','SKDFRFDQGLVAPB','DSLVXBRXPNEWVRKBM','SKLIWJAGBCTJXMKM','ZF','TJVTOGYRCCF','BEZOA','TCZKOHTZZQOFXG','CCXERZETXKLHNYCKJJWE','VVLGRRILCFDLZPGO','RVRAPLCQUYVRHMVZ','IESUGXPJKNYQTMZCVRK','UOGRYOVPBJPGE','MOQS','YHEUKZHUTTI','MCRDTEB','COOEAYZCBH','SOQAE','WMIYA','TLBNUDLE','H','EDWEVYPFKPBDXJDJBA','EXEYTHVVOSRRCQOXKUNG','CBH','ER','IJTMAL','VZJERSOJECHSEIIMFF','FGUJCUULE','INLHAWVTXSOBGKJYSO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IESUGXPJKNYQTMZCVRK'))\r\n%%\r\nnamec={'IOEAKZJPRPKTJNOZB','ZDUMHXJNYNAWNLJWS','JDIVFVATR','VAUXI','JQKKVNTFBRHSBJ','YVYMIK','AIQXIMDFGMSSRTYHP','JRKZIHIGDJOMCPY','LOCSUGBZ','JDHKURUFELAHR','CCVOEQYXGOVAJNB','UDY','AOENHSMZWG','MUZRGTCEZXFGJTAKAKHP','HUJASMIYVGGXLBQ','PIEEOUGV','WQEHQWVXPM','VCOGCNVNRS','YIHHJVFZFE','DZLSACBUF','HNKGSYTVZ','ESWFBPOSHGVJJPZWZ','CWJVGEJBTXXZZM','WVZMWOABZPQ','RITAGYKDRKQ','XTMKTHWMNONMJVT','ABFYDJLYOLM','WCLCVKQZYA','BWTMWKMXPS','CNGQQSPIMSKEVSHSA','TWQXHFWEELMHYTPCBK','LMI','ABKAV','HONTGWQREXDXIFX','HF','TNLMBV','WMLVS','RHWJXBG','EJBWKITPT','PAIVD','ZGNNXXNHYJAFA','HOSHEELTT','XLVQ','GJJOP','USGTDZT','VQYRFAKIVB','RAOWZ','KQLWBYJUXWMQZNBVRZIZ','WJSJAURLTKMFLYEWL','KCS','EJPJLYFZZXZGOGRQL','FNXUQATQXZFOFQ','CDDVYFLVH','LNSED','CZPKXAGODGOFBRXWH','VLDRWIFTLYNJYVCWLQRJ','OKCADKJXABSLKP','N','FMLVZNNHVWIOHTROTIHR','ZSLGUEEIBRZO','YF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KQLWBYJUXWMQZNBVRZIZ'))\r\n%%\r\nnamec={'ZHRKFFVTV','AANVPJKOEXCCV','ISEFLF','QKPAVCV','UFTMUOFYH','UEJBWOMUWVAHVOPFZFKH','XFYUAXTSOIPXJNTWEMVR','TCXGANJ','LZJDTUVDUSRFRBJVXTRE','DKNY','SKTAVBVQWUNKGSTH','LAJUEWXHWXN','UPVUPDPHPMMZK','PR','SKWIGGYNEQJL','ZYIQJEBIT','VPPWWZ','KFKDDE','ANHJYSMUAGUDLLZLGA','LTPOPUXPZXQLTF','PJLIPCUTNJAJ','BZBVKHGWXNR','VFMMGXMNRCYBLQCXO','KPYV','WFQPYLFRDLQLSV','OXH','S','NBNGVZVPT','GJZRZGI','KPWEPURIZPHQDUBXJ','VQJRZEPDCL','ANCGGFSXOOBVWLQT','PLYUYVFUPJPI','JUPDBAJHBWTHJ','PMIBCCWWAIIXIGFPJGQL','RDHEIA','UIVWDFNZFW','NHRTMDVL','YQNTKFTZUMJXSPKPVGHK','K','VVRA','HNRSPOPCTTDMSXPRMGXT','EVYRMDRCK','LUIZ','P','JXOLDLBOXK','O','UHVCWYW','TEABOYYTSAVDXB','ITZKZSMJMCXBDYHW','QIQGRVCUTCJ','TBRYLVVFHOAXWXE','BEGAPORIDU','JLVDPGMDTE','FTJIU','GUVILARGMIYRLPYR','OUJTQOHF','PSUVIJ','QVFZT','OLBISRQC','R','QXVWIGCUUKYSMO','JUM','AJ','RR','JEJAKMJTOINCNFIHG','SMTFIGBRC','ND','CVLGLCGSIQSJHIOP','IYRTAIWPRFYIIWO','VNFVKW','LSRGYZADGAM','IB','NRIVKGDDT','ZQQJZODVGHTLKH','SMVTDXZXVWYDBLY','TDNZHBGP'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'XFYUAXTSOIPXJNTWEMVR'))\r\n%%\r\nnamec={'VAJSYAGAOJIWVEJDZGMI','YONPJGZITZJHLBGMHP','QHEYGNWOSH','ZZXOUYOYUGZFHD','CBADRA','JOJOEOQIM','YIOWQROUDIU','RUHZKCBBKCFNUAVEWW','FEJJEIWMHLIE','GDTHNVFMFKQTBAAHJQXA','PEXFTBA','ZNE','C','EYQFRQENRMGKNOWBT','MUZR','VRUHHYX','VCCI','IOVUGNVRQMWICRZUAEKL','WSRGZ','OBCFVASFRJJ','DSWYSE','IBCTTSZG','BHWWJCGFD','IWZY','WMWWGTDRUXNAM','VEWRGUWKYXYTR','DIWZAGDPFXAZHBHTWDD','CYYESJUIZFB','GVT','QRDYACFPBRAZ','FNQK','VHJENXP','WXYVKOVH','TIILZLAYPTYK','ZGJSV','KHCYMARUVUVCQCCQTJH','ADVG','JUVMQXUCCTBXKE','EGRPHHXLHS','NBDZPHWXFHNDKIO','XQYV','DFKNQRCCXZFSCFDZKC','GE','UIYHHSUFVKKCYSTUENRP','WSLZUMBZNNZHMYRCJ','BLLWRXTADEQRWUME','NVIIH','DZ','YBSHAVJPKJSOSIKZC','QCEZCG','TCOPDCOZYFB','FLWPINXSISEQMADOGXD','ISDCYUSAQTI','AWVJF','TFZPWH','ZWOTRPT','KVWXCOJVW','OHHPEO','KJMCI','TWEIKLTAWLWPFHQVYCU'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IOVUGNVRQMWICRZUAEKL'))\r\n%%\r\nnamec={'QYNQXKWTBWLQAV','QFZBOBFFKUV','SATCT','B','OEU','EDYMJLOSFVXKB','XPTUMA','YXQHUTMRWVXCFN','C','NMUKSZQAARPYKBOJO','VXSUODWMJEOFRT','TQFODG','MVAOPPXKPOYLKZP','AYOSNWPTZNEHFENU','HLAOZUDPGO','BVNYHTE','LLBZFACMMNT','FDCGRYMFSZKECAOD','PCGVWGPEKPRE','T','IQU','PHAJAXB','JZSWKRHOTFWHB','SXLJKBGJNSDVE','ZFOGYXBE','XDZZWSGBUATBEK','IB','FTUTZJGKFHOWSYRC','QZZQZ','RQHRGEQXGWDDVSC','SWAPIZKYUQDUCY','LAQKSCDQQHUHROUPZMPK','KUHXDFAYDTCFHE','YUIGRMJCHOJRLETBLSPH','UPZVBPVFI','GC','MDBPULJTNVIBPVKWICXY','WVQETK','CONDVZ','YFNHSVAQOSVWUG','VOZLYCFAH','VDCQAHPSI','WOJGQPZHGJCJZODPR','RZGYDQOLMCZMBQILF','MQHZBD','QNZIDLDMZOYTJNBDVLK','SWRFWEZZO','O','BRMETQKUMPVZ','BOHQXMICZPIJINBAMM','XZHKWHW','PIWTIMWDW','CSPMUYEFTM','WKQVYHCSKLCGA','FSSQOLQOPVTPSWX','QAILVSVYMY','ZMRDNBAVH','EDLNTXXI','L','FPT','NGEWBBCXSCAWFZTIWELG','AP','SUIWNKPKEIV','AFEUBXU','SEQZZIPOXRYFSI','PNYPEBPJFKU','ZJORBRZJBKSRPGZEC','VRFWCOLARBSMCCETVOOY','BBWSSU','JHDXBKEBTBOFKCQKKGD','VBRDW','CZMEFIYGRXBIZYQAOEB','RYWVQCXMOTJXRE','ASTBGVNOWKSD','FZ','OESEXTKXKGXRRZXAAHW','GCNJIDSJZWV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MDBPULJTNVIBPVKWICXY'))\r\n%%\r\nnamec={'OLBECAKH','WALVIPXKS','UKRKEEKP','ITYJJEIAJLK','LXFEYKGNJRXIAATYUH','S','CFFQVCOZTQBCNKTKIKJ','ADMOLGEQMVHGYZGS','LUIKBIIL','KICCEOKINPQZQXRCT','UIFD','HRHXRIRTEO','POJWXUJTLIXYJUTSP','EOVOWA','HVEVAOIPQHTQWN','ECFXJL','XYEIYBVBPVVKFSESTXO','RTRAHTQLTLKQEB','LPGZRDYFIMXHMOKTGV','RLJUFNHRFMHJGEJKF','NYKPGIMSJNI','SVMDJTMHYV','OLITWNGCMC','QUTJMRHYNI','RIVJRF','SREBXWFBLVVBM','NVYWUKFVPXYQG','NDUGBMD','PQQ','VMWOYCLPJ','OAUXTTK','JJXNESUVLYMXI','KCAZLCEJZ','GD','IEN','PEALDLHFHHSYLOPPVIFU','RIPLRWHJKUXK','VGQUYLBAHIQVQNDUBBIE','WMYSOG','YQZWY','QJJRZKAN','BGGBCNY','HMVFIHNDWALIMJQVJ','JRHXWKGQQFDHQCVQFV','JBWXLCQ','U','UNAMPIJF','MEVHUELFG','UYBBK','VRDQ','BBEKHE','DDOKPNHLFXBERY','HTPDIXJZYTYUMXSA','YFEUGAHWQDYQXZOJHAA','PA','QYKNVGZTGY','EU','MQN','QVX','NQTHFIMP','PVXZFAVR','EHXNBUURJQ','KMFZUNNDNRVEOMM','ZFUOZTXEIKSFIUKGPG','UTOPZCQLLXQFELQHY','ZWAPCWIRETB','ODSGLVJMCQT','FGYCQONLQDRLNXXDU','VWRMDYLJAA','TITDVATQS','WDQLGGUTUCYX','ZQLXPDNEEDARDL','NESRUPLFJKZEEUU','FLLYHOYZJFVXKJCWART','ONNXRSFCTNNH','YPWYQVYD','KAK','PUDMLOAVFUZEOY','INPQ','BMGWA','FULRYCCYXAANRTEL','EZZVVDUQZ','J','QVF','PIKBTC','UZCHTCMK','PA'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LPGZRDYFIMXHMOKTGV'))\r\n%%\r\nnamec={'THWUPQDIQCGC','PHRROUTOWKFBLHCMTBJ','FFZWHOUBDJUHXCQER','PRVUGWJP','OUTCTVJWJQPL','GTK','SQ','AWEJFQMXOBZ','XEGDMNGQUBRRLDH','ZMNYRGDGAXOOV','CEQTQEHJ','ZVYCZLGIFQAE','GKKYTXEWUU','GYKQHFBAYMYJOQ','ZWBFOM','Z','JRQMYCXC','UBCUROTDPZ','V','EWSSKGQGPDWU','QFVZZOTIXD','LORCVQQCFS','VZXYJFGKNGEDGZYJBDD','ZMHTRZAUMQ','SWS','M','SQ','YFZTAVZ','MME','BNGNTDVLNOVD','OWELIJBQLIPJELRCBWN','OYJUHFIWEZFFXZJSK','OJAYEYQRUWEWEL','EZQAUNFB','PPRFEXORKNUZKYRPGL','WMFKLS','O','ZKUCHI','UCQGSZNQCZBQO','JFATSOYNQHPY','UGLWWJLKXTMKMUJC','KECCXUIK','YRDKCXRFIBOLLAXBE','KLMCF','SOGOJXJLRDWLAWDUO','VKDYIGLD','HNLFTM','YPCWFOTTS','DHBFCRNIPQDMPRYUGGSF','Z','PYEOXJXSQQXSZSLPWPBJ','VHICFAEPWBHQQNZWUFRL','UTQGM','HZQHVIRP','TOFXMCSPXOSRHZCTECPV','EMRVAZWTJNRCSTUOGUPP','OLLEHNLX','DCVDNPHCJPVWKMZFJQ','F','YIOJIRL','NBMIBAJINBAXVMKLMFVJ','HKQSHURUVVKX','ABQYBBPFEEQQC','ZPNIPVYDTQO','BICYYSSEXWA','ICYZSXXBBAOVZ','C','QMYH','TDAQVASCMQM','BOCUUTAX','QSD','AOABNRE','ZY','LFETHZKRZKOU','LUNDNYWWQTRCUALDFACW','UJTAEMHDBKITB','MUGDTHGOEGJB','FUWZQEVXPZIEWJQVODQZ','WKG','TCWKECYVIGXY','IHFEUPHBA','VBNJXRDJACJXCXVWBU','RUUSZNXDIZ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EMRVAZWTJNRCSTUOGUPP'))\r\n%%\r\nnamec={'XHS','WZCIBW','PREIVONCYXIZGZP','AEGSLV','FHXOGTXEVVVRJTXV','RXHOMEOTXATLTXBL','XCBYOQUKHHHYAO','PLVIEU','EBQQAAPVBJFJVQRPD','SGRTRBFWDE','TFFLUTMWYONKXMRDIHB','GMFCNLRIPZMXBDMOZ','UAJNMJH','QAXPMUJXEBOYNHIT','ZZW','AXIUPAFWNZXBTMFUW','DKEWEJSZGPSVNSDU','IEBZCGKAS','OGBYKPBYQWXHNGZINIX','VBCXBNNH','OBVVWQLIWS','NOSXD','TZFNK','YGHAAWVVINCIFVOGXWKT','RQHIFXGMQGDIUY','DSIIBXODN','NDBKMRKUOZSLZALHQTC','CGNEDRZIMLQFNUI','JMEJXLRN','VDHTQHPFCZACHS','YPSOTBGBFHYIYN','YVCNHWIYH','AXZSIOHJVA','URPHIVPD','MCR','YRKRGC','X','KHUMUNTDAKIR','DBXJJYUNAWQPFPSI','BTABQCBZ','FRTKUUIUCWNQAOFCDZID','QTMRQOBSKNXPLGYLICC','TWHNUSZIF','GLKROXO','JZFZXDRQOQFHXSTLGI','MYNSZTOAOEPJXDG','JW','IHZKXRT','NXCTMPGBVHRNQLIWMS','LNYXV','EUR','OOIVOTFMWSMZEAGKLD','JTJW','NELD','RLHASFWXKXYXFFAUUVTN','QQAFDL','VBBORVQPHPJWN','TNTQDKJHORHLNLXJC','KIEYZTBC','X','TMVAVQ','L','KZFJGS','V','PAXEXKPY','SURWLRNTQPLUBJ','VXXWUUCFP','ZZMJBVPVDBHCNTZORR','POFFYC','BVCIXQXGTZNNA','JGXSGKZNRZSOTM','MCREZTN','ZYGBHQELCNWP','RZOACKCLGHR','KFQGQGCDFCZMZMA','KAEMYPLQOU','ZLCXJAJPDSAXFES'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'NDBKMRKUOZSLZALHQTC'))\r\n%%\r\nnamec={'QFUAHWIOOKR','ESSXWCVAAXUNPKZBP','XOHBWMTZWPVDBTZK','ZZIAKKZER','TCJNAIFFANO','IHFDHP','ZXVEQXNTNPI','XNQCBWRJOYWNPJGGYOA','DNXYBBWQG','YIDQFQKDCYQ','DOPKJAKR','PCLIEY','GTL','HFJ','I','SZCDBDD','MUKH','SDUFF','QQUNPTRTNRGEMJHMBUZ','TTW','JTF','KLVWALNQRKUIBBKFH','VQRKGXQII','SAGHQQFQ','HRZXSDNB','AMJPRLRVVPUW','NUEHDIBHCGJNNXODCSYT','PFWMVZJRQR','YG','SNO','OTPEWBHKRLCXZOVQB','JJJZPVFVFWF','HZVUBNI','HCANPJ','HFPROKYIHYAFKAX','SFWXOTAIUNXT','JCGZXAZALLS','ZDAPDIF','XQWPRQOFP','BATBRJYMEPH','HWLQMBPJR','ZFXBKAVDWCFKDVIPZP','DXHHBTCMUMMHRITW','MYUWULXGAMCXUB','RUTVCBDKKBKVCODTE','JPLGOLTIB','NKVYBPZFRTWD','DIKMPNLVRWVGP','TZFGVBXIVVKCN','ZQVV','LYUIEEXPSCVGXPAXGNOQ','TVDFNASELMQBMUFRF','TSAE','WTBZJNOXQMGJACUF','ORJDPAIHTADOOOIMKJR','CAFVCRS','BW','MSNRIFUX','XYG','DXNEAWGNPEFEI','CVCCTO','BKKRJFUYCMQVACQBUH','OUKRJQKTHTEKOGWNAJL','EH','CBVJJGAMPB','D','JCX','GDNERYKFLCEMFDGHBLIA','ME','OCVXQRKNLMDIPG','DKXJ','YIMDAGHEBVBDEQLWQZBU','RJOLHANYAZTAXYJ','UOGBZSXATOR','RPWKKLKMITC','ZEMNOKORQCIGT','EZSILXKGHAV','EKYJYDR','LYHVGIR','GIRVT','UTNQHEBGN','XCIRJWQPWZWDJMCHBA','NMAATFTNDCKEKOGY','VRR','HMPLHONBSDYSPYYA','CETSSXCAJBG','AACEYNLPMBJXZSX','GDETCLD','KRVKTREYTUWLQKCQGFNY','PWSNIKIOODMZCEHSS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GDNERYKFLCEMFDGHBLIA'))\r\n%%\r\nnamec={'AYGOJBGQSGJ','UXAWUQATLCHDBW','EMWESHWSFIE','LYDDIYTAFWCMZFZAJRI','PHAZNAPRSSDWVEICENY','LDXHZCQWCQKQQXJXCL','LYJTSODMNVPIGOZA','JDJI','QGFJ','Y','FHJQVEURGXMVQ','BTPBCD','AATAYYOWE','BRUVNITJXCXJHYUWZ','RFGRZELSDAEKRSP','RKBKMBECPVJDPUOOYZ','F','C','RESFUFHIJMVF','GPJXBWH','QCJNXDPKIZHUXDTBXF','DLNOP','G','TPRCBFEBBLVYG','RWIWDZLDWSE','CXBTNANPRQUAGKX','LHRGDVJRJT','DOHFZ','JQ','GHRGNOJ','ZMGESBZULEBZAPYLPYUF','Q','JZKXJTOBMBUOS','ZPDMPTGMAOMTA','X','Q','ZRXJG','VHRBOCEJ','DNPJ','TE','W','SSBFLCL','X','TVMWRYCCTPK','TSPJCVTUO','YQUOBBOVIMFZHRPAPD','BG','USIHMQUJNXQEBBT','BJFQJME','HHBFBWYBVGJLZSYKEUE','OXMPYRXDVDEFETK','OWRADONHAWNMQWFLOC','FLBZA','PDTOJDXJHOALT','XUIDOPAMCTYOWN','BIOCHVREN','QSONQOLLM','ZOHOAV','NMVVYUJDR','XDLH','TWXVFGJLNPLOQJFVM','YNSCRRKGN','EYLZ','YLCVZSWWKT','WKAVXKP','ZJDAIPTKSFN','AB','XDBZLVICXHWTIRJIRQGT','MCBDWUSNJNQWWNQPM','USFGSEZEQ','ZJPRVZNFVSL','FSQFHXFDPDVLLLG','SPDFIBSWLSQRO','ZHVWZ','XQCTIIQEEPEFDQYPZLMJ','HITWONOWQ','LQDK','HGR','DMA','PKTIITITLQGSC','WTMYNMBXQEFQIYHGNHGY','RHNONCQOYTSLBLERI','ZQ','TYZZBXTJ','RRQXASJHEPCG','EBNTNHG','IALSDUFLNWX','OADQT','ORS','LBYYIXQJPSSYVBNN','KKAKFIWWJIUUJOGKH'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LYJTSODMNVPIGOZA'))\r\n%%\r\nnamec={'JKO','OWGREQBHQQUMLNVUWQBK','UHVVBFHIGRXWTTAMJJKO','WJX','SFIBGZXGZUEM','BYSUOAWXKPCQSX','UPNYKWBRQSFGCGUZITC','ITVPOFOUKJAPQX','WVTUMGBJBBUWFZDZBX','CQZCXRSQ','KQWLOVEPOFFEDVG','PVNRITWZIAWKAA','DOQA','ACAPGNWKVMOVE','CWEFWFTQN','QVPNNRXCGHGMLKWAT','YNPWDBTIJYNG','YEFAQDSSZ','AQHQWOIRP','ZQRZLGACEUJSTROOGCJQ','SPL','TGBWXKJQJMW','NKBYESOH','YXYE','NXVGP','QRCYSWHKJUUNGEM','KMIECA','HXCGAIWRKJDQ','EVEMIQWSU','ORY','YHBAHCORMXPHBPM','GIE','ESSZLCMQD','PFNO','UBLFILHYXVAXRBVPTQSN','PYVGVUUQOCWW','VIMJNOMMZVWIMAHG','FURZKEJESYJB','FDM','BIFNVLU','T','AVCYWH','QQF','QK','GPRHV','GTOKJEMWEFGVN','GAXJID','CJHJ','APLORUKKCDHKL','XZPWEXZW','UOXFBFQXHS','GSJHWIYHAXSRPHIGG','G','OLF','TU','ARRKPSRLTB','KKFFBDJHHGSSG','VHNQKMLOR','YWXRSYYRAFNYDWRQA','CKVOWSUJGGXVY','PSUI','MUXJMK','EYTHUKVEVDFTJLDC','OOKYLAR','FTJNSQZVECEXE','EHSXVDTVNNYOWLL','UQJLAUKPOTTJQSJKWUX','JMSIXWHFIQEUIRAEY','XFIBXKZUXSLUIXNFWN','MNMERG','DLTERHWWCZDW','YVSISIWYDEHPARNM','QXI','CHFB','HSYWFLNPTX','LRHZFESLQYKVCHX','GD','JDQKKNOAMBFLFPXVMMI','DKV','DWVXMWJWT','FZM','TRYYOIHQVSNKVLCFRR','SK','APE','JNYDIADPTGRHTVWV','OINTXWT','MYSVMYHMUWAB','JJKWZUSBVXKR','V','C','XHCKOGAB','H','WGY','TEKKJMHVZR','DHBCBLI','DHFFTEMLQVWUYYSZGZ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'UBLFILHYXVAXRBVPTQSN'))\r\n%%\r\nnamec={'EYDUEHDLGIIFHA','XNIGHCY','AMLXIFMEBCIBX','EWMEKRLKZPZDXTT','LXYJTDUC','THUQYBENQVIBDTONJ','FMRIRMQQLHTW','PFQHNKKDYQI','PGCEPKNOHRAPVWKNOZT','CYDECVFCTMAVIP','WWBBORAFBCTQAJW','EWGJT','UCXMKAYWHQM','U','RB','BSBUKVUXOYEPWHVYGA','TKCUMOZNCSDEJ','ZAXTHJPOBNNWAU','EJYVWLFJQTUZPNV','YJJMKOZYGHJ','QZKISVFTHJTW','VSAWHHKYNRZYEUEIJJ','RVGZSNCHLCAKBCEPTBP','TUH','KQ','BPCICNHHES','DZSKRLZJHLRUOZBPCPEB','MIJWJNMJWGSEXRN','UWMSGMUCTRDYV','ZNUWDSZQQCZF','HEHFIHHCVNQDZJW','TMIUAPEQXYP','BMVTYNISYOOZEHLEFBEJ','NYYVNSDKJPA','EKRYBQPXC','T','RUBGXOTDRVMCSEBWP','NBLAQIPECGQ','XQFOAQRKIVM','FKDPYSY','TJBVPJOBINRFKVGU','YRPAKHWHIMHJNURPEKXR','GTMLLKGRSFCFXCJAMO','VZBWFUMLUCYB','ZNOLDI','LRTPCKGBHQCGJWADSCP','AV','ZNNKBC','DEXCWEMD','VRY','HMTWGLNLGMYTPZOCU','SJMKNBWQZGUODYZRAGA','EEQLXAGGKYPX','YLHLRDB','GSXSZPWALUIX','IVLSPD','RT','YBBYZ','MOKXBR','XBNCBE','ULCPP','FNGBCWSTFY','ZIFTHCMMEO','KNLFCQFIOKHQAECVCT','A','BNLUIXLNQP'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SJMKNBWQZGUODYZRAGA'))\r\n%%\r\nnamec={'WGYEJYVVSPVTUTIJXS','UUQ','KK','HNV','OHN','ZDMRXCBS','O','FSNHUPLNIDWJEGHBT','YWSMRUPRO','AWQQD','VDJJS','CZFZ','FMVEADNMWAGZWDAYJN','SXXGRYDF','JR','NRSVCSNIFGIPS','MZH','MPIAV','KKWMUFUZLLCGGBDVYUI','DPYHLZRVREWMVPRUEP','MVSTIJD','GUNJ','WBYOQS','DGYHNMEZDOXPPVQ','OICYPYRJIOSCWAAJONB','CRYRIKGQGKOQXYDDNG','FEKWGTZXNEXPKNCJMEX','YIPMUZAZYTV','VGLXLQFYASS','WO','NICUG','PGBZKWJQSUB','W','PC','RIM','CYPJBH','CZEY','MNYOFOFCHJJKISS','OUVW','LZYPTUYWEB','FCHD','RQBHPP','DHPYWWOMMA','IWYBPWUKTNQGVKGZC','ZJTJBZNGZJGJDIR','QSCZQP','WFOTIGIH','WUI','V','LZGMRVPLQXFQCTBCR','EBIEDK','QJNVGBMNMUGBZOZO','DAUURYORURRXCZC','IIJMVNCTOTEJZIASL','FRZFGSBMPC','QODAJXGTQYG','TQNGZJ','BT','ZCSOEDSMDDL','LFL','MAZAUJGQKR','VUPIXAEKXJ','MJAIVAZWMIAUGMCJ','ZKENPXEYPEIPAAUSSRGK','HYTQUHOWEU','TQYFVCMNCCBWNKVXBJ','UEL','XXFQJTP','GBDICDZMQGZB','EYTIFRXVXXHYMOPKQDLM','JHNXZIYYESOF','BHQVGLMSGUWGCDDSQ','NQMIMXORB','QIYGZSPCJADZVGUK','IXWNX','HOPAJ','FGZPNTQNLLACJNMPVHVE','SPGKGPJDNTHBSJCNS','REHDRD','RLTRDVVQRCE','GAIKLPUP','KWSK','ATJQVAJ','EX','Y','KEZQ','AGWPYYDZNCNO','FOSYLAMECGMZYDGWJUE','CEEMW','SCEORKXPICZT','BLPVKTFEKYIPWIJRG','BFWDAMZCHOIARQ','TFSX','EXPZQXEDAJYRYDESCLY','NHCKRRKWLZJ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EYTIFRXVXXHYMOPKQDLM'))\r\n%%\r\nnamec={'HXYQWEZERXBQFZECZB','S','DMMXSNMRHULVYIJW','HJNZMIEXBLDYQJGFI','MHSOVFVBKINKFJHUIAC','QXUPYMVPVJTU','DMZQFZKHWTHMTHGWYAM','YBVQQERRHBVCJHSROXNU','VZIQAYEL','NTYENEAFAUEL','KXRKXJFBRXXDUGUZRH','B','WDNCGMMYKFMU','N','WAKHZBTPTSPMKZMMXR','STVWJMFSDWTXXAI','TXYKWFIVOYBDQ','EUUW','RMTJBMY','UM','PXUMUR','LBPMXANROSK','TPWMFVZDGKXSAKBEDI','BGVOPFMPPJEWBIOZBNF','XGYKCKUZQDJYAGG','OPLGJT','PHMNOKB','MADXMUBPA','HBWMJZ','KHHZOQKAMALE','JQQIPY','RILSWUD','HRSXFVPEZIIV','ALYJ','KZSTZVVFTYLP','JTN','NOXKHEQILSJGJI','GTOCIJMFH','KW','YHOOKWWSVDGW','HB','NM','QMYRYVR','BJRRIXF','DGO','JU','DYLBWTNIIQBRFK','QKXGRHJSUENSBAVCW','HBCH','KDXTAHUESOKNL'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'QKXGRHJSUENSBAVCW'))\r\n%%\r\nnamec={'ALLW','LNSMSPJJY','RILSPNVFLULVXZVEFFBT','NHPU','QOAEOLWVQ','EVWYDNSUOKB','LUFQUUUGNU','TYYDKHYTYYEJU','TNAAFIIRG','PLLSBFEHB','BMUG','SMKYMCUJKUSR','DVNVSKRLVTQKKOMBDQM','UOJVZJEJECBKYTUDHXYJ','YBATREIH','RICJDCNUOZQV','CKJWAKLJGTIRPRAXOCQY','ANHKL','MOHIUTJIJHPAZAUBY','TDMYDRBFRZBYOFIOHHH','QYRXFHJXVYTSPNO','FOFMTDRGYDP','AOKHLHXAZJAPVVUKZRGH','BQEZMUFMZWEGVTHIA','TWZQYUDBUBCGUK','ZXGMHKSARUPAEEWMIMP','CJMWHCDRTS','BZLQQIOQELAEXI','BSCKWYRQE','PTUDPBTD','M','NQSFMDOU','YWGQJ','YTVGJLJQEUUFSC','XSOXR','NWHP','OBZWDZENZD','FAPOACK','QJEOQ','URAQBEARRMWWJP','RSRXVXJAQJWG','XOULTQLED','VMMMVDXB','OQGOOWPVENYYQCGHHK','SOIXGLQIAPHGVVO','E','DCESGRNXJ','MRKV','JVQUZIMJUQTXSXV','JQFCGOGSYYUPVVRHTEHB','JYVURETJOGIDUG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JQFCGOGSYYUPVVRHTEHB'))\r\n%%\r\nnamec={'GHEOXPV','ZHI','MNFY','YEWVTZJ','SQRXALITJVBJBKOGCNK','UW','VCGKSYD','LACBYWDZYRXUUMDSWEA','BVQBEXXMHPKBQPT','JHAT','ZD','A','XNEWHBIDQ','LBXERLUZYVJ','RIIJASYOPIVQQYYZ','YEZGD','XGT','DLM','LWXZHBIP','ZJBWEPIBCOE','MNXWRV','VHNV','NODYUAZMCNFYMBO','YGEPCRFJXSDDSSSPXP','GEOZMOVT','HNMWNBRLIXS','ADZSBCUVQ','FNHGFLKKEVWNP','BQMSNJCTSYQSHYQVT','CPPHYPDVXPBTLJBCV','HVXIWHTUBFRQ','LPGUVAJMLLFNC','CBARIUY','KZYTDHXK','JRVJSZM','ARXITRIJEIUCPWNSVGSG','F','JPGNHGAAGM','PVNPNDFHSULUZUGVMM','TKLQI','XWMBFIGMYRIVHITGKASG','UDWHDNWRSXWA','OVCEEBENVWLXWAADU','ZTUBMITFAPTYKXUO','QTQIBJAXBZFSNZJO','RZEJKYUBSAZIHUZZTEBN','T','UCWBQVB','WSFVAWJRFDUTNCH','WKOVPHAEUKB','KXNI','MIHKTNESPUOCU','RTEQLAVBCBQHBLTU','SAABESRXBX','VUFKQNNRDEKTEUAPKL','DDVGOWCFTHGEUPQ','TFGPZG','RXUQOEXSOXYE','BCSOJJAGDOXJHVT','GBMVF','QUF','QTZKJTICPIKNX','UHB','NYUEWII','NCQYPHQBOPBZUYHCXAK','YADQSMQRSMMIITHHFA','MBRCRQELQGKCH','LZZO','IRIG','EEHQAF','JNPMVWWYVIPYWUYTHCIG','MKIBIHSMPAZPTUNQDVTT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SQRXALITJVBJBKOGCNK'))\r\n%%\r\nnamec={'Z','DHOWAIFQBVLAERDIZZR','OI','IDHDDVZ','NZLLBCKEYOOPJ','MSSIHR','KYLNPGPUXHBEAEGEU','SKUS','IRNRYAZYHCBFJ','QX','QTCNBH','MN','O','MXZEKVRXPZNGLGBRZDSC','WKOVYXZ','SATCUZMGUZ','YXF','KXRRN','JP','ABVRKBJADWVVELBWGL','VWJ','FSTDKVQBRXVVOMZ','PQEFIDQCYHQDDO','WJBFZVEMWRDU','HGEGY','ASTQOOAHJVE','MDBQSSTJKBDJHYNFS','FHNNVOCUPXZMFNIX','RDZVE','PRNRM','WDQYYBSTFHJ','V','HFVDSTNTWSHBARXDRUB','FCFSUBZSWUSKY','VIEJQCXLMFIBGLG','IQVJMBBYMEQ','RYCQYUO','CTGERJCSRTBXYTRXBO','BY','OPZEAXLZVA','JRACFXQDLK','NBKBZMHLHD','ACOVTFVJGABIZO','I','NRBGNNN','VQTNLZW','SX','LZIAMEGC','WXJCY','HIUXVECXYWESAHFA'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MXZEKVRXPZNGLGBRZDSC'))\r\n%%\r\nnamec={'FZPHLCQSJ','ZJGB','OZEAVWJBIXGMNDIBHB','YUJKVLJUMREHVEUF','NNTS','PSXIZYTGWVQGCO','ANSZYBJHVURYFFRO','DKMKYZSAGDLS','AOMQHNPDDOJIXPBTR','LBJEQAY','LLTRPZUNPX','WYQPBSS','RWRSINKDCVGOJNLDY','CZNT','ODPRRYOFDTHNEA','BMRAURNBMA','XH','CBEPGYFUSLX','PM','YR','GPERILIKMEJBM','ZLNQVLPDTYDXFKJDN','YNJI','VQRYWDQZKL','VF','OCWRLSNYXBKGAAPB','R','XBMBOMSJFMLTWHEIASTG','LFJUCYAAEJOODRDCKDSZ','QRSWJSLZUFZLWUGEXA','ZZOGMDFVXUAORK','NWWAELWYHUVGGNWBAG','MKELXTBXDL','UYREQN','BAPNNWTONMMAWRLPG','ACQZOC','LSSLSEZBGTCTHPYI','LLHJQHDYZK','AVHKKSOFWDMEFBLMZ','EBLAJKZEFFASIKNPVQZN','SI','OLZVNQRDOJACJIBTGVO','ITHHHPSNOVIFEON','PXAQYXXXGNJP','QOCCYQQIQOEOSH','ZBSLZMI','LBRRLYMAGVZ','AZB','HEJPW','IKPDOXNSRWFUQJJ','PBEIXBHIDAPZEXMSMF','AOQ','DGGUVQVWPWVFXYFILK','IOUMLOEBBWHUI','TY','LJYGUSMUVOOWE','LJECMWKCAX','YFZZYUCGAGWUL','KIKTMLRIOVBYXXJ','SODFBPHH','NEVZIFFIIRMTVDROTK','KRFFXGUW','TKLPKQVSQABGWJ','PFTZPYAAAMWGCMQF','NLGALHGVHELLRSYMVYF','ILUVTZL','IONIZNOQ','OMQMXZWWTFGFCCN','WECRHJZVOEIKYY','GCWVGIS','NUGZXHADWNACB','KPBHZOOZ','SIPZLPMAXMVSEJ','GCGDMVXNVL','GXPHICLKI','ZUD','JOQEWVRQIYFDJN','KHV','GZMTURTBSJKWBBBJCG','HCPMZ','ZJXEEMZVCGPUP','EJSGSH','ZVHTHMPYYKDPILIZDDB','XJUSPSGWSXG','MFUPWZBS','EUHW','JPWGKNPJGDCE','HJ','ATZ','IU','KZTYEQ','YTQJOFASTIUQHT','PNACCYGUDBOWSQM','VEVJECRAOQIWY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'OLZVNQRDOJACJIBTGVO'))\r\n%%\r\nnamec={'YRMJICHXATZTRMJGAR','FKNDFFDBNZQRYNYGNX','WULIPQKVMQPRZUELHBF','XTWNMDKPSAH','HJXYQCTHAGWPICMC','OJKOGHWDOMMHX','NLEFJBMBM','NGPUQZOCKRIXVA','WSJGNDAGQHUO','YEQVSTBTYKTQW','FBJOFTUVSTLYXX','JJGUKEKOVNYKFBSZOGR','AQH','MQTLVPBSVWYUIELEZRN','LDLZDHCVLLKWKBH','MVZGDZCOAXTDBH','YE','TZSAKCU','F','XWA','RDCJXSS','ARRVMVB','IXKZJUAMN','EBBDOOYDWQMBHYO','ROFCLQUT','EDFUXWFQIVCUOBH','QMTPEIDOHXNEMUEBTMB','GNRIMIMRKWSRQK','CQUOEKTFWBZILEI','MHPZY','PIFDZOFL','NCWRELO','FMNFQSF','WER','UEYBYPDGXQAQETKXQXVJ','SLBWUKN','FMRYZSGCXQEQCGQPB','TNCVXGBSPXGNTDHET','MNJ','VAESXUHIBU','VUZRSYLATSEAW','NYGYKHJW','IAHCUOPIMEYPNZANS','SMPHROHJ','QKTHERTDFBV','ZEZZJNFRM','PAMPJCXL','AQBFZZQMNXIWH','MQJKYJWJLQYWIQIC','FADYJXGWRGGQDLCN','OZNVSOSQFYOTAG','UATQ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MQTLVPBSVWYUIELEZRN'))\r\n%%\r\nnamec={'OKYXOCHXC','WUCHNGRDZRBUAMKYBYR','KODKGIVSKXHNQQQEZKYZ','TXMPLWRRRTQXT','EVSLHETL','QWQHMKVVAD','YWNUODRFVUEZKI','BGCXWXN','DRBMONETDKXMHO','MCFUKSNOCEHQAK','JDBVKORRWAFZR','WDURIEMNLUFO','ORKOM','UKKPDHTHPCKU','WRTRXH','UEXFBNJNDTPKJT','SHDBQGVDATZNJGXMII','NSYSMFHI','GYETTAU','RZKRYICQAGF','WPPEMWES','UPJCPCZRM','LNGCVBZTYRJOB','SLNJWLEONBSDEX','HOHIMCTUIE','WOUFXRTVDKUUXBNYIBIB','VHGULPEBLOVIYKJN','YOSOQLWSHMJOK','SRS','PUJVLJT','TUKDPQAZARHPGMIUWR','CVAYCJFVZCYKSZGLEFBL','XPMQDN','EGVIOVX','CKWNOBHAIYYDCTQ','Q','HAK','GCVVXCLI','QJHHZXKTMU','AT','KJ','CM','XBRMN','EPSLCDVWQJMHJBLHELT','MKCZAUASYPSCSKK','WRUPHXMGDK','JWTLRTXKR','OFWYPCFLZOKSSIQN','YXLFUYUAQSGOXABAGAD','HN','RVB','OYN','MDGCWCOIHSAIS','BNAIMRK','SMIEZURUTTIDN','YVWMOWXUXGMXZ','LFSVJTJNIUYRYIBSV','WFIP','XOARJRU','LPQHDSU','IP','Y','WEGHMPEAJSWSTJIR','LYPLZBJI','UPNZWVOSSHKRSURGTVAC','WZSUALERZ','BVHUJHTUQHKNVRGRLE','GZ','CHMOLJUBXNCCOFBQBHHK','RVJSAWDMHDAEXR','RGLCMFSFMQ','NXTOXERFCYJYOFRBPA','MXJJROKRCQTCERFUSEP','AGLCGLYEAG','DCOLWJH','OT','CEOWMU','JWQEMMZFSDA','JLFSLCJRADNG','CTQCBVGZSWAZAMEJP','HJQQJT','QHCQRRRYOF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SHDBQGVDATZNJGXMII'))\r\n%%\r\nnamec={'NGLZHUMADA','AZILUVGRZ','WMNBT','GYSTYVINKIECZMNQZL','ECXQTL','VWRTULBMJDO','H','FLVVGYTKS','AFBDFORWDIZYJ','LRMVQUDKDTFILNE','KT','COTJDBNMWYLUVWJMUJXS','TTYII','XHYSDPTIT','HOPTKJHZNOIIXJI','YIVJUYGFB','XOUJPTEEDKMLZN','DMZTUQVCPMOJTRCSXWTI','PMHQKVAJRMFYNTV','PFCFOEPHTFHXUT','QFKAFLRJIHO','XFUACXQTNPISWBADXJ','Z','HSHHZZVOKF','UIGBVNKBFDYA','DBOMNWNRYE','EXVHV','IUED','XBCRBVM','QPDIGQRWMLFCTFE','CZEIKFKXJPNZ','QZHYNGQRELFP','JQKUTHSVFJPGYYZGLYA','PDZYOAJ','CZZIOGDFEKVCR','HDWYLVTGHZR','AMEMKIIBFM','HGBW','MFEKMJAJEFBQPRPA','UDRBQ','KBHPSSTTPQCXULJN','JVSOGFJRRCWGQEROTD','NSYBMKZ','JNETACZUZJDNGJDKPQ','DHQACXDZOVTMQKRCBFEH','EGPZFGLFAZNKQCPYMOLL','EJNWQYTPCSKHROERKWFF','QNHBHM','LPQPYVADQTSKURQE','PBMC','BSZNGEOPOSEZOYTXDX','AZAFTKXUUSEIRZNXKBH','FYTLSIEVYCMQ','FVQPOZYGMTLFWMENJC','I','QWTSFHBPIDNGIM','TPL','DYXTKYWIDOEINGXLMVLQ','BBPMULS','SUMCQUFARFFPZDVSH','BKMRLOZQEGPPYZF','TOYOGVMV','PFEOBGZNXGKOYQVBL','KFMVTGN','TV','YXRYSBJQUUBGWJBTG','LURDAGYJXMY','GMZ','IVGOGHE','NOUDGHGPVT','XSLETYJZUXBSWG','SBKSW','Q','WHSPWGNDCB','KKJDSBRQFKHIYHY','XDHH','MLEFRXPCDXV','YJWCGHSFBLYPEXR','EVNOGUL','YAAUJWLIRJHFPIJEYQI','DQOQXTBBFXFKYUWYXB','AJFEZVMFYULDLJS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DHQACXDZOVTMQKRCBFEH'))\r\n%%\r\nnamec={'NYKFHEYGIWDRNR','ZMFELMGVPAXXYYSGE','KUXLNNNRBRNGFVTO','FCVXASKDIEOVW','KGAXP','DOGJMZWJGXMA','WZAZZEBRSFTYMKUHQT','UOIAUGP','WOVRO','NKKWPLXNP','ZXDOBY','CQLIBFYTM','ZUIFAWEQDTVLGQ','JBTZVVL','WFAVVTDYPPZMQ','QYNPYDXMFQBAIXEKHB','WWXIIDLQVUK','RRUNL','SRKKOARPCHQWIPX','TJYBMUSCXCSL','GWLQLGOZFAKFI','JTEDUQQAIKYCYF','GNKJBIXFQHLY','UFG','ZPXZXELZZJMAMKNO','PWFEUVLBHFNMLUHOYLKF','LFLNKCRS','VIYBFOJL','QLDDNBCSAFPLSRHUFS','SSKNUIMRPXH','KJAMTWR','DFGDRLVJKEVSJKFQD','XWWZXONGQBCN','FXKSWCTC','DMHNSYQLJAFYKEJNA','SA','LKSEEDCLKPVYYYUDSXJ','EKFXCNEEBAJAV','ZCGKPDJBNWBPRDJ','NOP','LLUMUMZQHXKEGNTTPN','YQNQVBQNJRWLMIK','XM','TLKAAIHFMCNSSPMY','RWKZI','B','KPVIQOIPLNRZBNI','ICTRPGEPIYQMF','USOYXNGXPHNHPKE','TTWXBSMFPSZZYXM','HKPWROFP','UOY','ANFXBYIFVPXRDJK','JREXET','LDSZECJLWCBHSQWTCAV','FZZBGXNBEA','I','WKPMIMHQEEGGEYTGAHB','NQGHUHVZMXRT','FRMNOJLMFCLUJENO','UVDTQOXJBMHHBQ','OA','S','IPYE','IR','WMULVFEAIHFJ','JPQZZDGRBAVNBAG','ETZQWSOAZMBLVQ','M'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'WZAZZEBRSFTYMKUHQT'))\r\n%%\r\nnamec={'YGOPOXMMGZYEXIZJ','GRXPDHIVZADUYKEB','UWUCUPS','IIZZSDCF','JIZJWUBZDTFTLZOCK','LKLGJWEBFOCEW','WMLRLPFZJHU','AIARXBYZVMVVYMZEXKJ','TQAJAEARSFT','HJUGNDUAHPEX','NDGVDH','EOSWLGTWR','SABZSXYDR','C','YQDEEKWVNUKURM','LFEYIYLUYQMDLILT','CYEFWERUNWHYV','VHNP','ED','MQAYYWFF','AKWOG','EOLJT','MWSITBYMRKEOQ','FIUCWARXBBC','MYDEFDYGXICH','MMYYGQVGFICUAXCRS','WWPULNFLHM','LQNFPWNT','CKVWCGQT','HDBOPMTUYYNHLTNSLC','WVZCNJFLSQRMCE','SUKMDRPWWDZY','SIOUVYRY','EXVQO','FSHXIR','EVSTROF','YNUOG','VKUGYGUJLBIBRDF','QYZDIAJCOAIKYXJOZ','UQNFNOOIUUYOP','O','IWVIYUDSV','RIAEQMJQ','JGXPONWN','GHWIKCVUUULEQFFVOUTE','USATQADSTPSBWMSR','OBBZWUMHMXPJ','PDS','WDEXWSO','ICOLI'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GRXPDHIVZADUYKEB'))\r\n%%\r\nnamec={'VYH','QFSOIGSE','OCPFJTROG','ZBHEWWQ','LZJWJJFYDSDITO','ZUNUNN','KFNYNQ','IRKSHPFDSXGSNUOID','VQCISVNNHLNRJPNTXVQS','KRPEPCPGLKOJEOFPUOQF','UKOBUYSK','RG','MVPPBWGDTLRQSAFFUD','AJSMEGOQUGUEWGDWZO','MDBEAYZQREADG','LSXWSUMQXEMAQZAUZUH','GQQ','HJNBCZYQGGWZEV','MQPZDGCPEKYRDB','UZT','LZMCS','TODEMUWPSQBWS','WFULOCXD','VVJZKPOEKSOTOGVUSYK','EFXKO','NY','LIBOUCDINCXTPFKPXG','MDEXVSEEMXINRWKQNHIA','XFJDVCKCOFH','ZEBAJNOX','NJUVIN','O','TRCVTEZLWB','VZEFSLLUXYUOBS','PUEFRCWUOTX','KOQGLFROZL','PZIQXSABZKTASZMLZOR','VIANZLODOLNYKG','FDYXFKCIQBHRJAWLAC','LHO','QLRGGCEDMLKOHD','YMOJB','HBLMFTLT','TAL','NVXSLF','E','CVIARHWTKWIEEB','VVNPJYU','MY','GHEOHZYPRPHZLPP','HGATPAG','WKNRVYBTRFHCYGFVTU','W','IHSGEKQRADAZGOFR','LGZZZHRWJJQ','CMKVAOWRDNXRJWKDRU','OMNXOBJD','NDFF','TTMOCY','SUZVPFSGODKTYU','PLXUISCWQ','LKRABEVIJJOP','REBLYVBBCQWDEYW','KGAVXAOVWWOQLUTFLVF','VIEHXWRO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FDYXFKCIQBHRJAWLAC'))\r\n%%\r\nnamec={'Z','YTZFCBEEJ','IWSMGCQOIKDVQXNLY','WTZWBQUY','AGSCPCCZWIN','WRBBVZFW','XPVFODFMOAICPGQXLYPZ','AICVNQCH','AGYSIIQVXOIX','QTXIZADDYKEQAZWQW','YKDDXSJXFQMWFA','WWUZJWWZ','RSBJNRUQMNWGWPL','CERSTMDEXSWDT','IGNY','TUDREACBEH','IGNSZYVWJBGMUUTFG','QSDDOZQFEDR','NEMNYZLYHAFWPPZKM','H','LLX','GZDDNQCID','CKFXPTAAOCWSDAAL','PBDWR','PTSTYMVFHKF','QVFCNZYBKZCWUYLBMWSY','BVNEMMZRUJHPZAR','M','PYTRC','ZRIZFNHXBRFK','MFYROLOESPHWMZJ','FSCXZYPWBEXZEK','HQ','VDMU','QPFUMPKPAICYPZUQ','FEZPFZYWHCTMEQYRXCXJ','VVNZAEBZVJFPYK','NPPJWNGYSTPRYMNZQGM','TWLFT','YVDHKL','RMVASPSAWYEDTUBYUQR','ELLALVLJ','XWBELWJUECJFSSEFXXJ','XMRVSMGLIFWEYQQ','KZSOGYLDSFM','UYYRI','VGPLZBXDJGOYMKA','WDRTIXJYRSYVJAAMRFNV','TFKNJUFIEBRXBDD','MNUXMYPQODVYJVPW','M','QNKC','FCSKO','ZILNXGNWQONPEUO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IWSMGCQOIKDVQXNLY'))\r\n%%\r\nnamec={'ADAM','BOB','JOHNSON'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JOHNSON'))\r\n%%\r\nnamec={'NQKNNWHFEOHSLKTNVFLR','BTFNVWMDRERYJVAIT','MAZTVIYYSUSJJXCASTEF','FGOIZR','SIVFDJRBFAVOPY','EFKBLIU','WEKVXIWONZQBQJGIAN','QTTWWVZALMOCIY','VRANXGABHQKFQ','KKTA','LOMGOQKUSK','KCXCH','IAKHQMFDP','FHIVJHZJRFMBHGQJ','ZKNJ','BGR','WWGKGNTFKG','DTVKZAMA','OOOXPAPQOWFJVSVV','DLXWYZJYHKLNQRHODVLF','EKV','VENEYJPJXBEDEFRVRQ','MHSXMA','PNGSMCENJF','KBBFGPHXYTBMENMQU','OSGSUKBHICIJAOQVF','OAQPENVJ','DFWDYEFZMD','MFNTJSQYK','BHIOQK','ECIFYYJTWVQNKY','KKFMTFFPKX','KNIPHCQTRIFWKQVHST','QSJNXGCJRZSTISIVNTAN','OPNAH','K','COLCJEA','VLIFMKSEYFSJSSIJELR','OTCPPCEGFMF','RTQWFVCHJVHKMMNVODQF','LJZQNXVWMBDPBLRANAH','ELHSEBJHCEYPTH','CIZWPEZSRZRCAJSJRNVS','YX','JEOJPVAWRZCENTGFKI','TGCZ','UINFPXKVYAUVEIQEVJDU','LBJNSEBDTDRN','PZRGVSPLWGUZZKG','UWILYJONFBSJJNS','GAHHQY','P','EGMSUUWGDVI','QQWXQVOPLAJLHKHOO','KFRXTPQO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JEOJPVAWRZCENTGFKI'))\r\n%%\r\nnamec={'CSKVFETS','LBYGZSQJRQQOK','YBCUNSJGVADXYVV','JKJTLPGXMJCW','X','VCDMDU','K','NMVCXLJVSDZX','HZPEQR','VUHKKTVMLEYYRFAXYRM','CEQTVGTAVR','DRWHHUGAFBRS','U','TKZKQXBGEGZITHG','VNSDLKJETHKDUUNVSMCF','N','TLPDQGGPYEBGTST','JDWFNEASRN','GZWBLS','BRPFMTELBWXKBSDBLQE','PLQDVQIYOOGSJCCHU','ZNY','RKUFRMQEHIMDQGKWM','CODFQCBSEVEVBQTNP','VBALOIRRWMWBOPAL','ECPPHOWLMLMEHPSI','WOL','VSHCNE','MWXUHAOHJZMFZQZW','JZZT','YWTTXUENEJZSJFNC','CSJ','XTPKGEQWSFVDDEBFS','GGHTAVOKBAEMPGKMWCWT','OKTJOM','TAKRHJVJCW','OMYDES','QECXLKFMXRZCZQDIFAB','WFFRKQFSUHOFLYKPPADQ','UDVEVWPNUNWWKTYY','SQZZIULDKGC','AMFFCSTYRREGHWHISPZF','QJTPNND','ZJYOVPXRNAPGAPQHKWXX','PIKMVOCQPSFMYSTS','DKMBCTJKAXZSQADZ','IIRKRCWGPLSD','VFVOICPKCJFNZGIMJQN','AMRWSCZGTYRZCTLMOMK','IMJOZCRJLJ','FSCXCZVNTKGIJGGNPUAE','RFTYBQEEBEXDVGQ','YNWGOMUNYUJJ','OFLBGTFCUBR','OQBRKADPXKFRIGJX','UQBJNPNOVVIJCB','TIUWNLTXURCFUXVVYE','QLXWZOWE','OFDGSZLOELBHINWFIOY','JYOBUWPSULYAGFVNCZGB','UPZRXVXKUXTHHM','VUPDBBZR','BMLYPBJKKYXDE','PNZKJSS','LLIKKRPDSGLRV','CYTINFVIZYRFMW','XWSJZIF','OQJXHCYWHT','HOERTQJBB','TCDLCIAQ','JCYEUKSQ','HRVAECIN','CGGVABCCCYKTMFWYQKLZ','EAWICWNB','LILXC','ZTYG','DXTJHSRLSJMUCZNSHM','SNCWCSUJQYAJFJMPQPY','SPKWORDMAFYXRZBLZLQ','IVXXA','E','TOHASOQMXLNEHQNDRTCZ','MOJDSIWHOVHCNJICCOBW','FJAYM','FQBOLLPTRSYWPDVPQV','ROWOXWA','JGGCMRON','XNVP','QGNPCCLYR','JJYKPWNKRPWOIFQFPC','AVNYDDWINQ','UJYKLNEYCNUUOSMGXGBX','XXH','ECAFLCIYVDSP','QWUWVHGAFZCZRHHBBOY','KCAYQOUNTDD','B'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FSCXCZVNTKGIJGGNPUAE'))\r\n%%\r\nnamec={'FKIPG','FIEOUUQP','RN','MPPBIJRAXYE','CCVHLSNXIWIJBNV','JGGHIQWFKSAGPY','GBDYGYDJYFL','JVZ','IJPSUPQF','QDCUUIQONKOEZZTVFKJW','SHAOOFPBJ','VVKFJMPMZOBITLREWDUK','ERFTHS','IXBM','QOZQ','MMJCPWBZ','FRCCUBIFBBGANTRKZMSF','AGTHUZR','ADYQXRZUSSKYQEBOJKGP','FGLAPUWMPQ','ADPUNERYENYAPAJZQQD','TEI','MQ','CQASGO','YAEUN','UUUVHSHXVAMRANGMLOH','YOJIIJMUXCCFWX','KAYW','LW','RIULPYD','FKLNNZG','AHYVKGPCF','NDDRBZWLGMQUH','SIGRH','JRHFEJCYHGH','BYDIOZMXPMD','FNT','OYVDVAHHZOJBMPBTCO','JDFII','TFCRVXUEPKLPFYYCKEE','GWRLWRLWBFQLKBV','ISJDFYTZXKBQ','MIGDMEKZMV','GETOPJ','T','LIGBBAJUMKQWQM','MRQ','XMHTRRIMUQ','JTSBV','JNXOHBPGQXZQCFYHZ','DOL','D','KFN','GSCUSNZPYPLCRIQDUL','CMNQWSWBRCD','MYVIWUXI','LPEXAU','KOJPAX','OZNRUXDHQPPVLISOA','LCOURGNNV','A','JOMVNGMJRCRFIRNTLTJZ','EQPXQG','IMGVZ','YBDZQIEZNXHCDKCGZR','CLOOK','CYSAXVRBVVEHZCPR','SXH','ABJOITMK','GKVTTWKLLGSEUONCYBV','DWFLLRVVQL','HWNWYQDAXIHJCB','DPHFBLOOYAZKARPWDBR','TKVK','LBYSXXYMJXFZGK','JL','FAATKTSONFCGUOLIPFF','ACKDN','OD','HENGYHM','MHFCTBIBCQHUUCWXHD','LUHHZDFLCSLORQIGSRH','Z','TPNTVCTYOSXBOUNQ','Y','RKBYUKXCFVWMRL'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VVKFJMPMZOBITLREWDUK'))\r\n%%\r\nnamec={'PNJLGCFVJGHGWO','UYIONSVIG','CL','HUESTKNQX','SALYWREELNSZBP','BNJDZJKHOUSQDFKXCKJ','TNBIT','EMFHXOJXUALHZI','YBTCFQQZ','EDFYSBGQGC','PZZPG','DPLIWQLTYGDXJAR','XQFVWHRH','EPBSQBHQPXERQ','MKL','TAFGSLFLICJXG','YNZCPIXB','ZE','PFXEDL','IJIEPJV','NOHRGSWBSDZATZXPEYE','UTORC','XVIWAUSOTTYXILP','KLMSHODTREWLEGMEAKQM','BMHRB','UGFMAYIKPGKKGOODGQ','SMNATWYMABFAXVAZHBGB','EPS','VFTCJCYYSSYPRORKID','JHBQIAXTCCVXHHVFR','ZZLQENONICOQDBEEBTX','NPNHOUUUIIZPTLUY','ZDJLXCPTDEMUJTEQ','YHQYYTNGWZAJMZH','WY','LTJPKLFOBARRYL','RVQKALVBY','DKTOPDDQ','AZMQGL','QCPSYFPYQDHGYXAEMG','HJ','YBOHRMKQUE','IQOHTONIIIEC','PJQZRCC','OEFIFNNE','JDHEBJKIKGGAZFFA','NHM','VSXQHZLFCPMWWZUYVPIB','HAOSNCEVJDGBSFNOVSLP','GFHEAVXFPT','YSWXTKZRYXQHLTPNQV','NNRKFIZKXOKYVDNYXID','XTQABKRPUW','IYZILFCRELKHZAZBLKR','LLKSWMIAD','KAZJAGOZGIZR','FHTUHMLKNV','ITAHVAFRTDBP','VCNJOSINAUVMBXZ','DETK','LHFAKGPZHUIIETIK','XBAQSPFVUY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'NOHRGSWBSDZATZXPEYE'))\r\n%%\r\nnamec={'SPTOMHCELYFKFSX','WINRFF','LTHAOJDIFHHEFCBPZD','RAAHGELRLLOI','PDRMKYDG','FHHWZSPSTXKR','NEBYKBDR','MVHGZ','UWNHIZZFDFQPDP','HQOKRJTOV','VS','J','TKYOPUXP','BEZJKFTUZDLGQBML','OSGYFMB','CYK','UDHMGNBAIMJ','RVCXB','RGNKBHEDHQG','XKCEUASFAMWNHPOH','NMEGU','JTIHPXRJWVM','UXTUFDZMKBMOYAM','WNAUDPIMVLMFXFQ','CTAH','CT','INJVBQXR','JRBIIEMGJW','MMEL','ANGNWTDYQTJDISMB','UXDLVHXRSS','SXOXQDTCTILOJWCL','AEIKGXTQEF','LUNOBPJCKTVNWANST','KEIVXZZUVXBDI','OEGDI','TVLQBVZMSWAJFPC','NKTGDWFEQZON','FBMAYLMQUSBW','PZIEBETGIRXZ','NKTPM','ILYTPLBDMPGTKPYMTNK','WZWGAYZC','EKLVVCOWGCFMGYRQNJM','IMWZBYZFG','RZMXJTPHRTXVJNZHSJD','EQWFKORZPK','LIMZG','OGJNP','I','ONHKJCTRSHXHQJOWX','MEUJMQQLV','BYXNMK','TAQPQRJKTWKZML','V','DMMDGTLE','REA','VRXWMNMOJQZJX','EHKSVVRZFEVGEXV','NZCZJDDED','IH','IJTEWCNJHJ','N','UPMHRIMYEQQRRZVLAE','F','FEKEQRQXHBJBSV','FJAA','NSURBUOO','SQVEDH','WGUCHJUXRAPJHGWRBKIP','DDCQXSU','AOJTYNTKWS','OGEPINA','IZTZQJ','AKSGBUDUO','KQBCPHX','UPWLLPTVEQNGETYOTB','VRCMMJATCBSL','VX','KGDSLBPWAJHLCIZUCH','DNG','AXBVUCA'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EKLVVCOWGCFMGYRQNJM'))\r\n%%\r\nnamec={'IGOYRFKIVTERT','DKOHDARM','TMIKMYTDSFH','CSGTIZWEFDBR','KADAEBAPFYIYGO','IQMGMBMQLTWUWC','RYRKYYPTUYFTI','QCZFOSRARULJLZEXMCW','IEJYJY','RKCMPQAZRSHUTKQPUGNV','NZEHCBZTDXKOXFXD','NPPALM','KZAOBCZ','GZR','BOZQSAAZPVZD','UNUUTLWODUMUIDS','JFSTFKOMXCBS','JXWNPDGVSZT','UMAWLBCOZUPOAIYXEQH','LFDKXVWELNQDK','PDCDJTPREPZ','IVGPDJUMGUE','XJK','LKEPMYBODR','MPPPZGHZSDMEHBQJBV','RPCVEXLWWPHHBYXWSUW','TPJEKMWTTYCYJG','BVPBOKODUYWCQPWBQ','FSZH','NCJWIZ','VCQGMOUIGWWHVPXE','L','JKHOMQMDNEFAK','GWKDCDMJQYN','FSMYMUWYPU','AOOYMCYLVNYWK','KKDOPSAWIV','NLXFXCY','VKFODHFF','AYXHMQMHKU','DKNUGCMEJL','QQFRLYDQQEJDVTKCMQ','YMJZP','DCFLDAWFITJERJEMQFI','SJDKAPWAEREJZ','UFAKJ','UFCVECPWEE','OHVLIZVXZ','R','ATUFSOTWJEP','JZCKJKHATGYHWY','ONJUBQJQZF','IGSE','NPUPRTJQHYKIQ','JORJFKJLQLVZELEXNUA','WTHARCXT','YADUX','BUTHBXDQXRIEAPC','AWW','QOGEM','C','J','LCFAVHFYMSYMK','GTWZZSHIQ','KDVUBLNOSKNP','ETPUXRV','MQYBPYJJEMRSFBTJD','RWVHLWYCNXGWJDJ','HGNQQSPJARNYEHCETYU','ANTOWTNRUWQSDF','SOPFTC','QJEMUUDZMIPB','CKIQNAB','K','ITAJGBFKW','NRIWYPM','ZUPWJOCSZKQDAIEKKIYW','GUZV','QQHBBQVPSCKKFVT','TVMTHCDKAJWSW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'UMAWLBCOZUPOAIYXEQH'))\r\n%%\r\nnamec={'FSZESYIDKESTRMQPSS','JLKMFOSQF','XSBMEJHOGEXIMA','AJTVMJGOW','MTFXUJVQEEIN','MNXEOMSSEOUKURY','AN','XZHMRQQGU','TRZKZBO','UKKU','THKLUBIIJRQZXENQYAST','CYVFVXRWFYDQ','NPWCNJ','EFAUAA','T','YOPBR','GLPWSLDTFMV','QPIICXOJWDKJPI','AXBDUFDCCHPRQL','GALFAFUOOERRGD','TZKUVBRQZMXKBNCINF','FKZTRF','NQLYCRQKEOWFDUC','AUJTLFQFT','QFCLOKNSBJCHVN','QDHZHFPSDCPWXVE','BSVCTXXGBXCAKU','JEMNZFC','CFJMEBL','UJSNCVNELBNFCUDODMGO','ISU','LXB','DUODTCGVHKSW','OUDTEGTWSBEMYPG','MBXGAOODYIZKO','JSNQPEIY','ZVBBZGZTMZZPMXXXA','YS','HEAVRWFKQWQLLRNANXGJ','RQMGGNETWSYCRTUKLCJ','BOEVUNAHWEGJKRBUEJVH','DRPGWQSPAWHMGTDZSNF','KBCTWJT','SRZRKLFZD','YPZXPODCDBANCDYREO','XXWCZZHNHNWXJHMXDO','EOCJPOLM','EXWVAFTSMY','F','KRTFX','BADJAHPDL','IVVLKBFMBOQVTBVUB','UDQTK','AJ','IIYAWVDYOIGM','V','XCWGXPBFKJQ','VQACRASJWBMQ','UPUWKP','YWPCPMMYDHH','BYUDKVPTHETUYFQQ','CSGAVUENWJMXMDIXCFTV','NNPEXJBWJOTEXLNMAG','EGJDMVLZGDQKZDSJY','WCBZDSVJTFBCCME','IJRJMXXJSVKNQUESSPXG','TFFVIKZJZAFBJUZKAI','FYDB','NRFTYRXHZZZQF','IYRKEAOAFTXMG','RSEEFDWXAULIPUKLUHR','EHDE','CIULRIHVFZVPD','KJANVABEAIWYIMFNE','SCIPMSAZVJ','EXSTWLXTF','YC','HGRIZZXHXEAKZBVYQT','BQRYGORWQPVWGIBBQ','LUXVPYULSREP','KDYSKHKQIDJEU','P','DGSUSJBJKIBQE','TUSPGYQCORQ','PEF','FYHFFNWCMPBCGIAA','CGOLOTDDPAAMZIJV','XNDRRSLMYLMQGHWM','HLKGGKGKFOUSMFXPWLZ','PMPN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'THKLUBIIJRQZXENQYAST'))\r\n%%\r\nnamec={'ROVISHNKWIRVFYOZTG','PICZ','GF','XEGMHFSRFTX','SOFGDDVBTDOWBLEQQBWU','IROHUFREDPGGBRXUFZO','SZSFPXMWFRJCMZ','TX','VVW','TTVZCJYTTNPQAUI','AMJBBCWQJOUUD','PMCQ','PCJOYAWISWUQOW','GANMU','HXKE','MUMUOVEJVABVLQEACK','IWL','EOTQBINUTEP','ZHARSQNTKXDIBTVWZK','MDMDQZOGNYGGDRW','GDJJDCPXUKZYOJHXX','OOTB','ZEAJ','EOHIRXCJZUZCSX','RJBPDMQQHNII','GNCGVLZ','OEBDO','HYXEZJHRQGAQOPT','VK','IQIMSELNLZUFL','AMYCA','DSDXJQZMYMUWZJFGLIM','UYTW','LLQA','BJPVBBE','X','BUIANDSLTA','CLHKD','MNMBOCAGRVKUIKSV','CYCDDL','VUWTHN','GQJGTCSWRM','MKGKFJNUFMEZPYKE','SFO','SQFKFPXM','ZSATEUQQQDNCTPLDCJ','VSSBPZQOLHNLSR','EKBES','ZDVCMEXAO','PKDEYGDASVRMRFOQG','EGGEJWXNOWJY','BWTNFXXDJ','CO','IKRABUNQM','ANSJAKLQZJURSVU','VJCIJ','UOKNFBZIR','EYNHPDXHCUIUQ','UVLCBHWEYNM','ZI','TVZWTEEJVGJ','CLNXKFUODS','VZCJQAZHFVIUAJ','IWSKUIYLLMOCA','FBRSOXGLRGIT','IDSSXEFAQLC','FJWSCYRVD','BJUJXUIJQMO','URLWCIH','BOTVBWWLYUO','FALLJCUWNWWUFWWLKDJY','IQLCJIQINJLZSFQ','OMUTEEBHCBD','JWOM','WB','EXRCBRWAYEMNJQGIH','JLESZSASLVTJ','PYARZJJRDOA','PIHXQIYTME','XYSFFAUVWAICBZHRG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EXRCBRWAYEMNJQGIH'))\r\n%%\r\nnamec={'MCQZORMCFCE','YZJFNXKRLAFWI','VSTPICWP','JNOAAMOXWBMYCECBRUVY','KNRBWAKNG','NSRCKZGETDUM','DHBGDGXIMOAP','GSDRFXLH','SMVCUZNPCPVGNHVLDVB','OHLLSTWXVLZ','HBTJICHVJFVAJX','YTPXEQP','BGGKNUVOUXWLZ','QQLFZFNLQJ','DRYTBDIDQYXKJPVEAMHF','MSLVRMAMA','CTSFTN','JHTIO','N','CZJ','ZOKFTLCDWW','BDPHMOGBPUEOP','DAAYT','YNJJJXDDTKBZJDKV','AGIWRLWRFLHCFMDGWKZQ','RQMTUDTXTSKW','UTNTWKBZRXOTK','KACSGHKKTGDIQ','XKZMXOQONBCENEPW','VWXLZ','LMYEOLJISFETJKDXX','TIGVVDPY','DCTCRBDRT','VPWEIZBCRBXXPHABRZVT','YGITXGMUIPGVJYOZ','CVZPJREYDD','WSVNZZKPDXKUY','TNZKBKT','HFNKHUKPPMXKEQMYCIN','KXUEBIDGNNFLD','NTCSEM','MZI','ZWXYR','YNHDQNIVKTQFZHNBL','NGFCTZNO','TJJSERXMIDYRALO','YQLNVRSTLA','NWZZXFFTW','CXYSKZQQPC','YHIFKIFJWUFJFCOZQN','JAHLRDNWXD','WLGCULEEXJFDTYTZNZM','MKW','PHASPWVV','LZVHSAMJZCDOTIFOUI','WWRHSRHCJ','T','PKU','CYBEHBJ','OJBG','LGXXAXYVFHHQC','OVKHZJIFXOOQ','ICMYMHPROGQD','SQKSFCVMJHDRFWL','GNGKTXFEDNYNCW','WM','NYOMUCJMNDBTWDOO','KRKFXMTEBJJZYNPSX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DRYTBDIDQYXKJPVEAMHF'))\r\n%%\r\nnamec={'ISLN','SRIFXUBZGWBYHFRIN','SYXUWQKTDINJFGVZRXXB','RBWEBFPTVICNRWPSY','BZZQXYJJZ','UJXWGBDBFCKUSJIMBQ','P','ZLKBGXVPJF','KJLDG','OYXOAMBPYMLZSIZ','OJAPNDNTRCNCLQSIQQU','XGABKPCNQ','FXEJGXSIGVRRRQZHSOSG','WJRRQDKM','JFORL','QUZFUBIF','PMJOXFRZFP','WSHBJEABJCR','NYJWX','LMQIDEZJCJYVIZ','FNAGWWJCWSF','ESQHTLNK','QLHHUYZVXWNYQC','HQAIOUAANFMUEYGZLGJE','O','GQIYYQZWMZTPTPIZNMPR','WFJUOFKEIPECBUTXCPE','WPGWKTYKZ','WJBCAF','HKMIWCBZJPX','NQXCMLXHNSCFU','HUBJTDVZPMQZUK','DWGIDVHQ','CVVUDUWPNLDJ','HFRJNS','NOUNAVHOFEEAREPCRF','VOYSBMTGXMQZACFFKP','MSPJXWH','XZAONDLMLDLAJIULG','RKQYTBQSAPERICXHP','STAIWDI','EUECSNMEHYYM','BIPJKIIRSGTWWRTCLYK','WBMKUAQS','FODMQMBPJZSDFPZXQ','NMJQDJCV','IXBOFYVOTJSZQFSZNB','BFWRJXMWXUMMKF','QKHIZJFNKCVPZJ','TCEIQUJWEOJPVR','KHX','JRRNY','GFWAJXINHAEPHLYFI','ECN','YAYKWPLOZE','QJWQ','XGWAEAFIYCOOSGAVDX','GHBCWJDPDDTJDLKEH','B','ETUFC','UJNTCP','MTI','WTX','XDRCRRDXOPFTRNBUVE','DPV','OWWX','KEUTWY','GJKRXKXLAGPZJAQ','WWIEKSIAAWYUDAN','PZCVKWDFCU','QSITT','DNQJZPBJRIT','IN','FBEZPMPJQPQK','FMXEFYVNUCESKJ','HKQZUKWTFBPCT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SYXUWQKTDINJFGVZRXXB'))\r\n%%\r\nnamec={'NENLZQOIKIIPVDBO','PHKZPOEAQQVMCC','LAZADBYKWMHVGXONHKOQ','DHAGCRYRMYIHZCSSW','RFT','ZGFFOYIVQGPIXJZD','VPBUHKZSXFRVCWSALF','NOGAMCBPYQJGPTBDHQAY','C','VJISIBO','XSTTTENFNLMZEHCV','TNCCXGDLGAEVZJOJKO','QJLAQFNQYSWVDUYGT','CCDDRAC','PVFDWQDAOR','IFWSNMCUEXVHCVCWP','BGFUOILE','AE','UZXQKGPNRFSYCT','AQPUWXLETYHUWB','R','SODDLNI','HCLXDIXUXEQMMMKEFMON','E','EHARHWQJ','JMWJ','MCYUHPCTZ','YAFHAJEINPSAYVBOLTSN','JMDBQCRQHQIIUF','RSXKKTEBZ','UNUDWD','CUGSU','UFB','OMWLOYAKZR','PBILPD','DVYRGUFRZBLSMREFAW','HPPSBS','CGUXLV','UKXUEKZBAZPICBXN','MUUOD','MVRDGH','RIHZLY','LLLTGMNTRBTXODFHM','OGWBDX','HEIKNBVL','X','DNGCIMBHQIVHO','FPJUEQZFEKLNIE','EJESIZY','IXONWWTAG','DRHJZDPMLTWMTR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LAZADBYKWMHVGXONHKOQ'))\r\n%%\r\nnamec={'E','VADUTZCEK','QTZWFSQEKKR','XDOCFRCBNYJGO','REPMDAJN','NXLXZEJXUPKOICUECCR','GYXBQDOZIH','XYKUEZCLGJTIPUJUE','NCIMJMDCGFOCBRN','SYJBZKPWLP','JRGWHPECSCACFBLKW','FVIIIJXBEG','GPGOVYRBSREXKPECPBXP','XPAQOYMMXS','VIMFYVGNIKKSCMZZKZU','ZCLDPFN','SOJXIXANXKMEUOQP','GSO','RQMXX','ULBWFKPFPIHMEVNG','BZHPJQYFJUQWCROVENVD','BGRHEIFQJWCGU','GZVY','UN','QSGTN','NTLUQJUPOYAXT','MRVDDPPJBTMCVZO','PAD','PKCIZTXHHGCCVJLNCXC','ZYKJRBWPRCMLKBG','YFABOIFTKVQ','PREOSVDIIEGAUDNC','CUIEKVZHJMLPXH','MCNHTUTPTCJEMYHIEV','GBRQTQPYFSHCR','WGDEJNAARRAZNRFKC','SNWEHTW','VBDGH','CILYJLBQZWZWTFYZXAJ','DGLEBJEDMLNBJORMTRJF','ZFNOFDSLHWMQSDU','OKGQTNDILIVR','ZEABTHADVMUKH','DWM','IXWDXEDURNPMRPFGMCFM','TQRVXL','HXZHJKDCGGPXTAH','DFLFLPCWXUNIBQRQPS','SUCZRGT','NSLXWGZOHTAJSQSE','GXMZQNFFLYIWPX','WKMVSBVLPHXNABSRX','PVJVSYOQQYAMVN','YNICVYRXMFCF','RSZJFNPOV','MVWFQMKQOAI','RXFOZDMNVBXO','LGKPTZDYLQWXFUVTIYY','HPOW','XPDXQDBESSMPBDJ','VWFGGTDMSQQDZOWITP','RPSXMTNZDK','CMHIKDEYXMNEDE','SLBEPVRCQZSO','AVSXNZSGBKDVGQCRJGY','XJU','IHJTZ','EIQOOIHRLXTBDHTVWQAE','T','NJWFFXVUQCSCN','MKQZCCRGYGLW','QXSVLNTKEIVMAS','LEDNUMX','XIWJBKXWND'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BZHPJQYFJUQWCROVENVD'))\r\n%%\r\nnamec={'MBU','PKVORAQRK','QPVRFOM','OHYGVGHL','PVVAVSXP','AGRSDGYGGJMFDSKSA','ZOQOUPCGXVGAQDHKYFID','OHDJIDKZRJDYWKDREZKN','RXWWCSBIZ','LV','GIQPLKWTRIQMSKFWZ','YNMCAFJMYSJABNUBGGNY','QVULCO','HJIZGEKUOAVOAWTNU','LEORUFHX','N','HOJYNFXRNYIT','BIPGVNRZHYZAQJX','PCJIWQNIYYCRYKXP','LCMJ','ZBPYALSCCRKQZPYUBSH','BLNEFR','HQUIXQZPUFROPT','KQAAXRXWTXK','ASFBD','SS','XGRI','JTOZLLOL','BOXPIZAINJQKTONDB','MDCUGIEJFGLVNL','NTWKVIV','P','UFXXBOBSJQH','HU','PBH','OITZFICBDOZEQGJZR','QPJBLCBJRJVEOVG','UIH','ZMZLKGNXZVAEPLGQ','XZTB','GANVRWYT','XZQRMIRQXVXJ','IWBQZBMJUZSNTIQNZ','WIC','YR','JSK','O','IEQTA','PTPEXJWZBAU','RHRG','OGG','WWM','YTRBYGYZVLTVBOABBTV','GYAIWV','IKJCDOX','DHIRHBKS','COUAAKAIGPVOXYKZUNU','FQFXUVC','VMFAKUVYGHFXKN','IDQGXYDWNEESGJJKP','UX','ZWMSMWYW','PMJBXUXTAVJCGLWZVSDB','RZ','K','HASIYHX','ANOVP','CSIGKZDMSMKOGJ','QRJXLP'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'PMJBXUXTAVJCGLWZVSDB'))\r\n%%\r\nnamec={'NFPFLMH','GAFVH','SHEZMDSY','JIJZGWWNDRDMYDR','QQMX','WMMQGRHFEFUTRAPFDTGO','PSDARUKGIRQPPUVFRC','KJTFKQDDFGECQ','EPXNZ','UKVDPBFLOT','EVMBIHENGAPWRMCZY','HYLDZIDPOHTFLM','TJSZJJSIIMZZPCVC','ZTOUSR','XXRCJEDFNWFOEAJMZWO','RDGNFRAQLVJ','ALLFOJKOQZHRH','KVYTQ','LWOGBFHZGSDZIF','OOKNBR','LAYXJREXHYHOFNVDYU','TUDFRHK','QSOJMHSDLKEQ','SHSMUQ','CMTKCFROCQCXUF','KH','XOZDSHULKCAJXTLSY','FIDNCZSFGGBVMTZAHLGB','IQATEQVBYYPS','CRBI','BPLUC','RJOPKRXSFXES','VECJRE','KENJGUMXPFCVFRGYLRXE','GQNDQHKZFWACPPHKH','H','BFIKUAPSNFBICRIEF','FPMMPOLVTYOYZQ','RXEFHBHDQPNZKGONNL','HCYWTBJMGLFTXNWRR','YRMWICLIANCOCDQPA','UTHNCEFVWHBJQ','BRBKTINOYU','QIGQJAMGVZRZWSYIZ','HTQTVZ','DCVL','T','WUXLTOMJAU','ZSGGRZRNIM','AXTNTJGS','RHLXTUPCTDU','JIFFRKNRFWOZEEORFV','DKOFVRRATZFQMHLYFZJ','XFL','FQCZHFFOCS','LTMQKYUNSRBTJQ','FDFAUNSAGUDRZCEPE','KAOLUPTGFQE','VUXIXPPGT','XNIRSGTMABTHD','DDTXHXCXAJTDOCCOMM','BXZ','YPN','KLFWT','MOWEPNYTTSN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DKOFVRRATZFQMHLYFZJ'))\r\n%%\r\nnamec={'DGQCQLGJ','IBNJOGJBGPPIJBQLK','GJXJFBIQKZILAJSF','AESPLZNFPV','YGNAI','IHYDPEYHDWSZSHL','MXGAONGONU','UGSZ','OZJGN','YMIQAY','SAQDN','JEYJCFHUTVPVU','GDWDYNKXS','DLAHOBKTAAJVHWDSCAG','EWBYPMZZXPRXASZTS','UBYMVWWU','SMHTGO','TJ','EZXTZDO','VBORBLBYKPOSDTZOR','ZKXZFIOALVYWJCMDNXSU','NBSPRJIEHJSUJP','QQOVT','BJQOKGDVSATEWK','RSMDGSYIUJIMGDK','ZVXTVM','HI','ZNEXBMBUCDHEKAAFRVCK','PXRPCEUHWKPJNKHDREBT','BQOWMIYWPSJXMNNLD','BONKTPSWDOYWKRJQCV','SFCOZDUJOXPDSTGL','UOA','PRAELEJ','YMXZTQXEITWI','ASSGLRORNYRWAIEVZXA','UAAMSIDSAVCP','WZZIPNBPDBMRF','IRJIWIZHIQ','GLNTZIG','YTBPNYRLDZUEZMX','HBDQ','CTENOFTKBHWQCPBDVBEQ','DJTTAVIFEPKQZBR','PZXNIGQLJKYZTF','JFJCZY','LMFUHVPAEIDUU','VW','RKGORHTQ','OMZPHYGOPN','LSPOAHWLQBVPPIW','RBKGXMLIRLGCSVRMC','NXLYDZLCQIMTNPT','DXHLFTUSVQXHWXBJEUGG','GSOLEEMHTARPUU','EVTNRJMPPPNZAZOTROD','ZYHWOMFE','WFNGMJBXWAKJOIEDZC','GGR','Y','HPAUOFVMOZGQEMHWLRPF','DHBEORFBKKFGZYYX','NBSLOZZRYECVU','VCFACXJEHVXXPHHI','KWMFJCEUWBLFDQGCKD','DGNNMDVNODLPYNL','NSCIEILOIGJDGJHB','GH','BSWXELUJ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ZKXZFIOALVYWJCMDNXSU'))\r\n%%\r\nnamec={'FPMUJIS','HTMLYGHYLNM','AGBTPKMRJ','SSWGUVSDZMBCNLL','DRPGG','XTEZNPFNRTBMOONIMM','QXTCFLIXRRIWDEA','MSMOASUGYSLK','BAFDNNUXVTHRPG','QSCURWGROJRCTOAWTN','MQTOBZ','JOVI','DSBQKFOTVDJIWXQDHRB','FONRHGIY','FMQTCJXWSUXCFJGFT','GQCMFHVN','VWDAHFTQELVINRY','ZSXBRGGBQPAI','FACVSATHNHXZY','KRUJPOGMAOEIGC','HUAUVGUDNZCUBXOVCFA','FOAGVCEUXQFKWZN','MPZDESSR','JPMFMGKKIPA','EIOA','UGOBBKLLTBVNSJ','QTEZESAEJHECT','AQHX','JEVMRDXJI','HTDQHKHXDXWDC','DXMHCHAFKHGZFF','IVCICJXFDPXGJQB','VBBSD','RCCEAHTANIBXXG','JQSIKFVLC','MUPIJKDJRO','I','KJFEHXFBPLU','OOBTEQZHVFQ','HZRKWOHLRJQMJXQQFP','MGBUE','HNTGZWFGJOYRTDPIOYRW','CDBPFXKKTQ','DODMJB','RUUDHNCJJKFHSIJ','FMKIQBPKVVULLXSYS','PWZUVYKBYT','AXAAJXQTHQW','BCFTWBGTJNUVHBLRDANP','M','CXYFOTWLRLUGQC','QIPNMPJJGOQQJKUDHL','SEMFHZMYJKPSRWDIBBOJ','LSTYNTFXHB','FJWJDMSNAUZNKWOK','IYFJHGCQLT','WYAMQDEOIWZBUB','JTTGQNLSOKVGVT','KOJY','BLXNETEFIXMKZ','NZGEYKPUIHNBKPPST'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BCFTWBGTJNUVHBLRDANP'))\r\n%%\r\nnamec={'OGLCMJBGUVZRYIQ','IAMGPYOLQRXBPWETMFUS','LFEFOVWUSDWNRZHN','JUFJK','VUCXCORYGMQJV','WMJZYKBSPZ','JQIPDYEJGULDLWRQS','NIPIYZGNRUVPHQH','C','MB','PHNNR','REMZRZEHIU','PGRAJVBZXFCGPVZCRWGQ','XDOXLEWSCUCVLRKXKPIA','DZRBFRJLKM','YXJGVDCGEPIUDRMMUJ','XPFKQQMUX','NYETXVLWZ','AHVRMDILF','EUNGVKSGIYWEMDUDOMV','MXAKTAWYASGFR','SOYII','VLOQS','UBGGXIZP','TPLZMVARFYPOY','FQN','NOUT','FHUMXNJNEJW','ZIPLCMQSSK','BQMCBF','NXLGMDKNTAFLJ','ITAQMINQG','SDAXMOC','RMANBAJMHICQTYYCC','SAXDYOXOPFOVHATLAT','IICKXBVXZTSLZRJX','PBHAWOQKGFHGG','IICOLCA','LJWNYXM','HBHVKJU','QNWWNNTS','VSXYT','FALWHF','UP','CWRGCUHRZFMK','FFMM','REIBDNXXQUDRSFF','N','KIMMFRQROZNWQ','MJZHXG','LSEDGGWOS','LUUMQ','FTXJ','SK','ORFNYJYWPQVKQDBL','YIYJJPAZOPEUZGA','HFZSILOBJRFZVEFXGQIV','U','PD','QLCOG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IAMGPYOLQRXBPWETMFUS'))\r\n%%\r\nnamec={'DAB','EIXCAFT','TOCEGNSLVURCYGXYH','VHWLWNNWLSLJ','SLDYYVHDOBBJHQZGKQ','CTPCUS','XTLDBORFZZICB','KY','HAOTVBCDRVP','W','SK','GAPVLDXBFIUTFBKEDMUE','KSGVU','TJOTZA','MXSRCIGHK','DFNCZJJHSKYHUAPUSFCM','UOYNI','LC','ULQKSEVEMLFASZTPX','RGMWDMYOOMFPGZLBITDK','WDGKCC','GRLSDSDHX','AXAWWINMLYJE','HGACOLRR','FMVUD','NWEEXSBYIFSJ','PJ','HDFGOWPULKAPXWLHAYBQ','GELTA','RORCEHVHKVWDFE','FJGMDMQVDSBISR','FTNKXXUSVYDSMMY','ICBWKYWUKPZVFAY','PJYAKSXMEJUCEL','VKMJ','M','TGF','WBIYWSRXTQZXUVLL','VPMMEJQOZLS','FLKPDEIUTD','BONRSRVZURJJF','UXAKLFHECVSZ','XMPLMGIW','SJIMJEJMH','ROXFKZUMYOZCRNGPVX','RCSAEOBQWZGVBJIUUGFH','OUPWMFPVX','B','GQQOIG','OTCXWPJVMJ','VGTDMRFGKUESEULXWMHD','QOTNGYBIUKFTVR','JPEGLYJIAPXNFJ','ZOVITVARNFD','UHU','BVTJ','TR','YWNOR','CIWVZWRFWI','EP','TIPARSTWGTMGQ','HFBNIKWGVTVPIVXJ','LUSQXXOCI','HMAMMWEENPRV','IOZJZHGVSOHLBLM','KYBWVGCSLSFCEGQVHEU','ZITYLR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'RCSAEOBQWZGVBJIUUGFH'))\r\n%%\r\nnamec={'TTXYV','FH','ZTCNWGXIBALWVRJEBQ','OKSHHRPY','JHVFGPYOQQEISOFLSZZG','PRWOSAGQGVKMT','DYYOWEDKYQCWBLOIA','OIMSYDORNPBGUQL','YFMRJZBDJJQ','TCYTFJIVMUYIFDDREWE','SGOEEGPEAXBGFIEA','BUAXXDKUSG','GMCKRI','FEQUFEDFWDOQXOJIJ','RQ','AKFR','OZFSDRQHFTEOSGYPEUX','GFQCOQIJNTMAFM','QQZWXV','IMJECDKAAPIYAQ','BWOV','STGTPACIOIFRLPJDWSOE','QE','WREKGB','NUOFONFNKHRRRUCFSQJ','YF','QXWSXRE','BBTGHKTJRGEVBHDL','ICBWV','HATF','VQUSOZSKOJEN','HQDPQFJASYSNELVKQRIX','WAHHOCW','XWK','VUXSCTJM','SDMLYIZOIXNHHVHPFJC','ZGBHPGEBZIFLQASQPBX','JOICR','VQLTK','IHXBYBGJQ','GRCVQSIN','CWNP','YEYXZ','UYQXYILKM','TXTCVYYBKMG','GZQQXYHISQAVSEV','KRMJLFIKDEIDQOTKWT','ALMSQZFFO','JYWX','YDZZLBSWPMPLQEMWYJGR','WGKOCBFSNEOO','AOSH','EDOIZI','YSVQYXXXZQLBEYDBMJX','ANXECVMPP','YJRZWZPPEYQIDB','WBBQUKT','WDZUFNAYE','FJSV','VWOOQHWNCYQYVTLDYQ','QOHSNMTXHGKNMU','CSSWB','ZFCMITSSCASZRYHAG','MDTXBI','QJLOWPODZEVYVEQKVKRN','ERLYKNCWD','CKDKQGMVLT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HQDPQFJASYSNELVKQRIX'))\r\n%%\r\nnamec={'PGOBRMNZXGEFGZTNN','SWP','HDHNVNTTTJXCERAAFGBR','OBW','QVFMSDDRXWIEDRGNH','OMEFFWRLXJRCWOOMD','HMZUDITBNSTBEYSLKLMT','ETIH','PTYHBXCBFZPXYEQUVPIY','MHGZDKPEJGTUAWPU','MPIG','F','WBUQNTXAPDHLN','AZFTRNBLZRLBTQ','LEPERCJ','RKFUJQZPJ','UUAZVLVIPOXA','IFHCPTRDBTTL','CYKCTCGKKNZ','G','BRZTFXAWYLHNWHIABC','AFMRFLHODYSQOMNRMDQU','SKRDD','UAD','KYRFULXATNJNWVIJDM','GDGJGHXJDG','PRZPQUIVNVAO','EDAHBBOWBNPCCLF','FMWRIKZAPI','V','EYRERTKJUXZWZTED','XZUCEWUHUXWO','CA','DMVJTHFWA','K','XGFNCELUZMBAB','AENTWO','TXKDLZBIADFDPAAXAUT','MSSZHKJQJUBAW','EREJWJNHJNZGROCRQ','TRJVHKVWGRBZ','LRX','YZVUFAEVGFYQJPP','HSIJNWMBQG','LIBDAVVDMYUDOXTNLO','URGYFJWFKRGHITC','CQWWGPZMSXSMFHADB','MPCOYINCUHUOZHGRFF','BJU','ZVRQOFIEAJRYYPNTO','HT','BMROUHB','DSXYRCVVLIHK','OPGUN','FGOXUAVIZBTZH','U','BBAEQHLWAG','GVQD','DIXX','KBHAWAYNXABNCKTIGR','WMENHMGBKR','JJIKDNDXFDZSWDF','STYWCCEBZGK','QT','PYVAYZSIOR','DWCVLFFVKGQQQ','CIUFCLFC','XUGSDVUQYJWVWCIKGF','FZBIHCWWCVVUQEDD','EZLTJFIDEEI','IVK','LYUYPCLLFGBKBFHMGE','OALIWBIFUTWBFE','NHYESO','XNBSFGRFRR','SSYIHIBENSRMRMQFWXZP','OQBUFRJ','DRWM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KYRFULXATNJNWVIJDM'))\r\n%%\r\nnamec={'SKHQPUKYYWHWEZCMJIH','ZJKCBUJTATQISUF','EML','QUUAUOHQJAHWBWMOBJO','VTYXGJVJTD','TUSLTKNHZZNSHSQBGJ','MKRBXOLNKUYWIFLLKSBQ','UXERKIPJZQYCTHM','XE','V','NBRLSYAMVBVQRYWLGW','HPTJGSOAFZPOPPTG','CCYHALBWOOWKIX','DKUSRZDIA','KYBCZ','LYBKX','UYVSJMVTYBVRLV','ATIZAYSLSLXEYM','ZCWTXOHTXEQECA','DTJULIOOLISFMBEZSSKC','ARWIOYIXTTZBXVJHM','HKTAOTRC','ZGRGUEHGXSBZLOTLBSLI','RTFLSDAGXHPWTDFRWVK','K','LBOG','BR','NGMNMUUKJLFOUCLEINSM','LKX','CDGQIEQBG','GMKAKVFL','PXJLLT','BNMUVYMZDNXATKMAYJLV','WUIDC','PWQFFOWR','ZA','RLOUPPO','SSPTB','ODCL','QQVEIAFZWVMEYLFIGXQ','QRXXUSBEQRSUZKRMDBY','TKTQTRZUZMFSZXHUXNAG','K','MNYMPJPDXXISND','KO','EVOYOQUTGBCWOAJVD','PIDBDEMRWIA','YHZKOGZHISHPSIGVA','KAZDDVPNOXFM','MITKWAPLDKRXVSAQCIIX','UDJWLVKJ','YMKUDMYGPQSBSS','SMUJ','HDUCMDBH','SKQREOFLWQNLEV','SAPJIHMUJQQCPPFZNNW','KEMJPXGBRHJSHQXTRJFL','VIMJWRXDTPQWJCGLR','CQGLORUCKTVNILVYBF','VTYJGNIWFMPCZLXV','GPRJKLPCLZVULUZX','XIKTOZCVCVHLAJW','GQCARMRCQKBLPMWA','ZVBQUFITYGGNAAVKUAMG','BIN','MGRLXAFBVKJMZSIKZI','VBKDJUBHNWAS','NUZZTUGJVQVKYM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CQGLORUCKTVNILVYBF'))\r\n%%\r\nnamec={'KRMMAQO','ZYQ','Y','JVBKJWEEIV','WPA','ZFGRNMWIHAABJ','OADLKMZGAV','NZVZWQW','DFCROJROCQJTMXHEPCP','UKWDMXAPLOQ','VLRMNKYEZXAKNDJDVAS','ZANHQCQOPBOBHQZLLKLO','OXNKHNJUBURGYP','ZVCANF','XJ','IXLVZSEP','FGICSRYYLBLOHXOUS','IFNXIETSAEZCZWME','GQJJHYQAISZYIXYEE','AARZ','JHVSGPGNYHWWCSSN','PJ','MJENAEESKEIZCVTJF','AIOCDJJMFNVBMSO','OLXYHBLJXXLTLDJZ','EEHQKUDZ','KAXVPRUJVY','KOZVNWI','MYEOHESCNYHLJQBSAM','DAQKJKIOCCJGJDLK','H','DRZACTYP','PQBXFPZHGFPA','OTQFQTOFPO','FZXMQIRBZZXYBBQKHOVY','IFFUCESAOGVY','RLMEMFHF','VRNEJHIFTMDKGD','JCFEDDHIIZ','RIXQXPNUFZQHXTCKVI','MDJLLSJCNTOVIWG','FUXFUQ','JLATDEWMQZAZTOQIU','IMGYRDGKASTQAETTHYDM','UMJSFJIFSUL','AGCCG','VW','VACYFIZMP','BVGBQOHMGNOILADIV','IY','CVRUJAFF','LQWTWBEIHHFHCN','Y','OD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'RIXQXPNUFZQHXTCKVI'))\r\n%%\r\nnamec={'BNQDWNHIZMZIYPJDXE','ZOUOKBHYDE','DZDXCESGTXGU','CNPVALPBNO','J','KHAFDXAHDGWVEECG','RSJBZKGBLGKIQKIONXO','M','LEWPVZQLG','MBFTDI','FIDPIR','BXKUGBCNI','EEIPKZTDXIXZE','VTK','KECUYATRYYZQRFBMQFF','ZMXDTZEVLPUWCOQWGT','DNOUKLHFKLFZPQNLHEJS','LOFTEQNLJQS','TATOHFSMCTXOSEP','ZMLLDLCIOLZDZO','HUYESE','MPCDGQSVDWDOSGQUTNPH','COKSSOTC','VUYTMLCGIH','RDQGJCNGTIHAVTA','LM','ALUDNJ','NQFALWUQETMQ','LQDFSQIB','BMFR','WWDXEZOQLKFQZMV','KJIKCYLOAXOQB','CTHLWRQAOLUS','MNBHMFGMUMCGLFP','IYZWIMPQRLSBWTJRM','RKYPSYJFIJEULGHORP','JGPRZUE','HNBCVUSAZC','IWYOIEQQXRWI','JDFZFLCIJYSRFKEMJ','QRJ','USNVNLTIIWAQFJKB','VLEBPQDTDUSERAWWOZ','ERZEDX','FQEJEZ','YUFEZXEJHKHDFH','XDZIAXZFTOGJL','CFGIJBXFCAQCDV','C','PXQUQLZRXQYDWYEPR','KJKMFXELPRBAE','ST'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VLEBPQDTDUSERAWWOZ'))\r\n%%\r\nnamec={'WVNPIGSHWNWEYZXVGD','UMGSKUBDCBPB','UMNZDCMZFVJDMV','W','U','KOOAIPPBAGWE','SIFAGBRDPHSJ','IVWKHKFOSGHQ','LTJLYBSSSVDPUWDVZDNR','KQYI','EOAUFDJGPDHZNI','DAUZBZFOGVAOOEUGQ','KZYRVCMEUUNPLNNYJOT','UZNBE','OCCMVSMMDJ','YWJFF','GLM','GC','AGDOIINNERJIZCS','YTVWSC','AHPAFSGFKOKXDPKE','RRIDQBXZCWCYUX','WFHCU','F','UOQWACOSPL','JDRWAT','OSVWNDCLALXOKVENJ','UUKW','SHUY','JHWDU','DXTKXVJOOQVEGBWVG','DFPIHXSJRV','XRUYYIIKNQXBA','IAKFHSMWGEKHVYK','R','DMNLUXLZCE','CKYUCCAHYLGCVIPISM','VZTC','V','JPBGCNJEGIUFTRDNIEJ','INTAI','YVPIHIHBV','FTYRQFMSQJGCRUVJA','TVDUULV','FSOVW','ZEGWUPW','LOEBGW','TZDKAXPMSKNGSM','AKPXNTPEQX','UPMFMQWSJPKAHNPUEXB','JAKUMRCRKNVXLFMOBC','IPWVL','KEUGMAZSUM','ASBULEZPSS','ZTDRKHGMDKJADZVRAAJ','XVQGIFQDY','MTS','WGLYHONYFBQCVYRLKQT','CPXOTZIU','OBENPRAUK','RFNAWDB','X','DACJTOFEPEFTJUJCBSLG','MFHHGIWHDWCMMQ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KZYRVCMEUUNPLNNYJOT'))\r\n%%\r\nnamec={'EPLXOSPBMNFLSVDG','DTILFFBMPHCWF','LUK','NOBSCFX','EPDPPGUNHYLPCFULNBX','UGVQYO','LZKFJXFD','MYLRRLUCBSYOESDSV','VSZ','TKPWUXBUS','C','DUG','YQNEOEZGP','ZVJZLKE','WO','YOZHALURQOQMUB','HXROEIQAIOX','DMI','LIBXFTJTFNCXJSRSYNL','STUDO','PWNS','HLVJXEDNUFBHXM','HBSREYCMRIAKP','ADRBV','BDKDKZXILBIUFDXJ','XCOIGOLXHGMAC','DMKYS','BTB','QGSIUWSKDFJB','CDYFIEAOOZHMEDKWDCE','XOPEJV','KBHOZF','ALGLCCLGGGIUKCQ','WNABLFRW','BOHFVKPNFNU','ZWIDLE','QMXHBR','AKAPNCG','PLZFRUTRXBV','JRGWCGXXX','XDCPLHRRUCVPAAGLRVEA','OJQGLWVHXMD','OQOXGIGW','GMPTQHVAQAU','MQWFZORJAXYHCBV','HLG','WXWOXBOONMBUHHHI','BDGZTDIKBTZHENSJDO','QHUXOUYONUI','KSKPVDEQKJMXTN','ENFDUSQOYV','OVSQKUAAGDBKVX','RMUYDACJYXNBOXJR','GNE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MQWFZORJAXYHCBV'))\r\n%%\r\nnamec={'MNXBEGBOOMKSS','AAZTPDMQEO','TUHWOCETRPPADJKVLKNG','JEHFKQYAQRG','N','TLCFCBFDHORCMRBV','ASYIFQQOXKIANN','GKABRTPVTGOKT','VFXWJ','HJGWWTQVVQW','FAETTKDWWSNDBLELSCC','AQMLDDCLSCJSHBXXLEV','FCLINFL','GP','WTUEHONR','DYPQIAUVGQJEPH','NRATMPUOKXBRU','MHJSZZUW','FSKSG','A','PPYEIGVJYDSMHVS','RIFD','WPHURHYCPKGNTNUW','LCRCTZIPWHHERMNTTYSC','XURWMZEPVSJJSYXP','BLUSPZELJQCTEQ','WLAJ','SKUEFNQJICEI','QRFYMQU','JFCHFLSXNANRFGEEHMG','MFTWKGYFBSEG','WVMOEVUWTQ','UDADALRK','NOHSWOJPOYLQRFFKBF','BRWEECKSUSNYIUVO','PLXCUMWAXCKL','HAARTVR','VRQNBTF','WRR','NJO','QJKWILPW','PJYHTCUMVKREZVJKW','JVKLYYTJHTHXUX','JZMWROBNJKB','ECCGFSWZPYCXRQRJSMV','D','HYAKZTGTNEZBU','MOGYEXDWFRYPBOOCYJN','USEPLXLFEHD','LBYKMNZCO','Q','EZNQBXXMQ','XO','WRXOQWATENOHYXVL','KT','DMRM','LUDNFTONTDKYJROC','RNXTYWHQYTWPO','MGRSTVXBIHLLGQFRLZB','L','EWULHSYNE','QMTQMIXGOUXRQYT','XMF','LPVQNZCCNSHCFTCY','IAZXRLSGWCWHX','PFSBLIFZTIU','QMSCWVUOWMCWJC','LRFRUSZNRDZLMIOWVM','KZCEBBILHZAFHSCYNG','YKTQYLUYWTRZPLPWZCOX','DTMTYSITUU','OXJOKUBFMYNLQLEZGP','ZKRZVHHK','BGBK','MBVJDMWHZDY','TXSVLOEKVOYO','ZZCSPJRDEVLMN','PVDJCJFNXTHXQCRQUC','VYDDKBOOKJLEWEPN','IRPTLCKJYXZSZLB','LSFPOTLVCP','BO','JZTLFYQRTPVRYOWBULN','FCEKHALVASPR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'TUHWOCETRPPADJKVLKNG'))\r\n%%\r\nnamec={'FLUEJJOMBLRDXEKQCCRU','LIYYDJ','OGTSXHBKSCDOEMQGVDC','SGWHEQZX','WUBXLLDNHSJT','PKDSEKIWIAMFRNY','GIW','XELJSPLL','BPHRHTSHY','DUXFYRXHOZRILQBS','WJHWDWVGEGLBABTS','SYLQBFT','HDFKJSBPPTQAUKGPEKE','LBJVIZZFNWB','BLQJPEPKXZIIWS','MWN','NEAINWUGPYOQM','G','HQCZZDRFPV','VNDZGDRZRBIXIYIZGA','PHKKYNLYUDODIR','GUICHJCXRXEYPCWAMJTZ','NHPLQGCWTKQ','TSDGDBDXDSXHMYJRBZH','LNGZYQMNWQSFVWI','RQPLKZDUFIXLOKF','WKUHTIYVUYNPHZ','UFZUFBPGKWRTUL','CAB','IJ','ZZQQALONCTOJUOOJE','DPDASWBKPMHTUBAEVK','SAKYBOLEFTAHWCZMU','UTTKNLHEVDO','NIWTMTZBTXIL','FJK','BAGMDT','KYPNASBVHNKYGJG','XEHDPYEHBRKUD','GSDRVABVNDP','ZZRKWNVKGW','RFWHDCDCMQCNHHQPSLCG','MU','STTUZEBEBPERPXEPBVW','YYRZHPQOBS','OOUYNTPVFUGGDZO','PMMAVJTPULZORKLP','GNJETMYHJ','MQNQRERGPCTSUZGAWRH','GG','PCSTZVH','H','GZPOECJ','IBWSJPQHVC','JNGEERMGZUNUFJJTJAUX','VIEVIXMGL','KURQLWQTHSKSKBUOU','NDXNTI','WBPHX','QEME','XXRQF','ARCFUSSRHARNWQKXXJ','ZMKVSZGFLLFEHJTRU','ZMHIEPKIU','GHRIVF','DHBID','HFKRRAMHMDWXWWFUMGZD','XGYYOU','OZSBMKFLSRGCCRHR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GUICHJCXRXEYPCWAMJTZ'))\r\n%%\r\nnamec={'KMQK','NOAQIPAOFRHAMMR','YVCDENPUPB','VYENYLJYROVQEIPEM','NCGEJIBYURR','ALNNGYOAM','N','YNSSDMYHIDH','TUTLKDZIBAC','OWITMHACTQCUTJW','VLUOBXBJNDB','RPARMIEFDQVGDGDB','KPRDR','JMUYVFQAY','BE','JBNMLITMCTMZAEKU','X','YMUZDIVKR','XWNEAZIYQGLHH','TUWLIMXZHB','SKALCOICJQTZGZZYQ','KAFVJJOERHNSNIMTI','UZIXNKITGATLNNUYAH','UYGP','XPIGOTGDHMDQJQ','DVCKEHHQCF','JUGYEISLDRPGBI','AHR','ZUBVTBHVUWTS','SPQMHDL','FTGF','PTFFMZFEIERBXJDMSBA','I','DOJOUGCRHDAUBUB','N','HPTUDMUZNYZMJCGGL','BLCVBZECFRLMCACF','WSBMPQ','VOWCMYG','HHBLB','MKXFNVK','F','VKFSSVBDFEPCVJWKKBX','Z','FIAZFRPZE','VFROTTGAJ','X','ZNPZNKADTQ','J','UAL','RRXOTDRSERENERUXX','S','IBN','VFBROKKMYVA','JTXXXCTWZMOGQWHWMFQM','SQBKRULGFVWXHHTL','ZTOCLWJYANBT','DVIPYGNXJIVQ','CTGTIU','UJFVZGZRVISC','MRONZFKHKJSVJIW','RMZGHFTHXSJJATX','OERO','PDRQDKX','TFMRFR','MKZOUDFBJEGXMWBHCR','MC'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MKZOUDFBJEGXMWBHCR'))","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":19,"test_suite_updated_at":"2017-02-26T21:57:50.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-26T21:47:39.000Z","updated_at":"2026-01-30T12:45:57.000Z","published_at":"2017-02-26T21:53:21.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/6304486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Leader\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 61 small cases with no spaces in names.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is to determine the rightful leader. The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\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 [names], a cell array of names using only A thru Z; max 100 names\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 [Leader], a string of the name of the leader\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 [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']\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\u003eFor the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force processing appears to be the way. Methodical processing and function usage can minimize code size.\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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":1916,"title":"GJam 2013 Veterans: Hedge","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard Hedgemony\u003e. This is the Large data set with N\u003c=1000.\r\n\r\nThe GJam story goes that the Baron trims the bushes(1:N) starting with bush 2 thru the next to last bush(N-1).  A bush is trimmed to the average of the adjacent bushes. If the bush is less than the adjacent average the bush is left alone.  Report the final Height of the next to last bush following its trimming. \r\n\r\n\r\n*Input:* hin , Vector length N\u003c=1000 with values between 1 and 1000.\r\n\r\n*Output:* hout , Final Trimmed Height of the next to last bush (accuracy \u003c2e-4)\r\n\r\n*Examples:* [hin] [hout]\r\n\r\n  [1 2 3 6 7] [5.000000]\r\n  [5 8 9 9 9] [8.500000]\r\n  [1 2 2 2 2 2] [1.937500]\r\n\r\n*Commentary:*\r\n\r\n  1) Best Time: 7 minutes\r\n  2) Solved by 27 of 32\r\n\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard\"\u003eHedgemony\u003c/a\u003e. This is the Large data set with N\u0026lt;=1000.\u003c/p\u003e\u003cp\u003eThe GJam story goes that the Baron trims the bushes(1:N) starting with bush 2 thru the next to last bush(N-1).  A bush is trimmed to the average of the adjacent bushes. If the bush is less than the adjacent average the bush is left alone.  Report the final Height of the next to last bush following its trimming.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e hin , Vector length N\u0026lt;=1000 with values between 1 and 1000.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e hout , Final Trimmed Height of the next to last bush (accuracy \u0026lt;2e-4)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [hin] [hout]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 2 3 6 7] [5.000000]\r\n[5 8 9 9 9] [8.500000]\r\n[1 2 2 2 2 2] [1.937500]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Best Time: 7 minutes\r\n2) Solved by 27 of 32\r\n\u003c/pre\u003e","function_template":"function h=Hedge_V(hin)\r\n h=0;\r\nend\r\n","test_suite":"%%\r\ntic\r\nhin=[766 537 321 480 419 738 736 848 636 789 829 282 275 732 350 318 886 646 737 272 775 516 399 84 767 567 589 992 361 141 42 126 677 714 605 447 452 693 295 87 833 475 369 107 206 70 425 443 68 513 715 842 380 465 926 498 31 866 489 744 6 883 869 34 948 826 480 399 870 126 838 702 600 558 161 157 627 585 600 694 449 666 888 828 130 165 326 513 382 166 256 387 400 124 772 348 301 251 98 170 ];\r\nhexp=98.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[296 334 370 405 439 472 504 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 ];\r\nhexp=984.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[89 668 662 805 922 799 390 948 856 108 343 985 287 208 866 62 270 471 141 717 997 953 616 739 418 429 967 875 551 327 828 991 994 841 796 268 640 537 215 847 996 558 831 282 117 696 696 386 518 188 103 867 140 70 957 557 498 923 783 400 601 962 391 595 803 538 214 794 74 428 640 70 337 823 351 454 518 398 191 388 585 293 254 724 715 562 280 564 484 414 964 436 376 706 30 530 243 595 323 668 ];\r\nhexp=323.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[343 713 209 730 52 457 191 342 286 988 415 29 867 460 629 360 451 733 677 536 287 975 835 202 487 189 178 104 222 6 933 565 70 493 646 121 949 836 462 586 175 876 615 42 687 243 401 489 327 78 24 613 404 858 166 890 398 344 345 620 701 629 536 770 121 533 242 421 368 703 7 894 930 973 935 968 215 688 457 893 117 480 857 872 690 23 113 87 718 458 58 770 86 945 891 559 477 132 979 196 ];\r\nhexp=164.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[752 415 809 465 166 690 876 258 217 362 49 765 508 532 889 262 222 933 39 741 125 452 683 129 382 827 793 159 242 199 396 993 965 557 457 482 598 685 91 166 46 139 930 905 22 818 166 243 102 557 335 578 8 17 706 389 195 499 547 437 49 295 429 365 203 886 846 800 570 288 965 967 427 246 872 448 415 37 43 517 593 377 94 952 746 800 693 940 650 239 376 698 885 157 414 439 394 259 590 315 ];\r\nhexp=287.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[56 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ];\r\nhexp=90.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[1 2 3 4 7 ];\r\nhexp=4.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[621 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 ];\r\nhexp=879.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[114 599 12 672 886 403 231 280 268 212 173 879 456 671 733 238 423 824 70 634 389 448 687 367 911 508 890 214 697 762 512 810 361 523 481 246 278 63 877 545 275 50 775 82 72 859 319 846 682 740 831 70 539 517 788 450 24 29 663 721 791 527 882 151 401 363 748 678 777 624 222 403 25 348 484 448 206 154 293 888 894 123 309 432 639 449 881 15 477 896 87 619 774 968 121 526 682 868 204 459 ];\r\nhexp=204.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[18 27 36 45 54 63 72 81 90 99 108 117 126 135 144 153 162 171 180 189 198 207 216 225 234 243 252 261 270 279 288 297 306 315 324 333 342 351 360 369 378 387 396 405 414 423 432 441 450 459 468 477 486 495 504 513 522 531 540 549 558 567 576 585 594 603 612 621 630 639 648 657 666 675 684 693 702 711 720 729 738 747 756 765 774 783 792 801 810 819 ];\r\nhexp=810.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[823 304 810 336 956 450 271 376 574 27 300 513 154 825 384 662 69 765 915 473 794 229 24 568 883 911 820 507 554 938 670 729 241 831 64 196 280 334 572 853 361 223 365 866 48 748 528 116 865 442 941 658 670 964 225 904 226 44 410 131 982 79 859 574 261 275 770 540 608 693 392 320 915 109 186 962 208 713 430 72 154 370 82 176 685 306 79 262 702 841 744 35 271 955 960 532 229 729 71 836 ];\r\nhexp=71.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[213 995 315 894 909 497 72 335 149 956 89 10 82 156 180 840 748 514 526 117 115 973 746 339 261 758 62 591 981 526 74 193 872 388 438 781 885 862 467 385 817 555 747 250 62 278 89 810 791 614 278 905 938 23 595 198 132 8 141 112 533 214 656 405 954 446 537 190 307 3 574 123 557 672 724 618 949 812 779 739 777 408 995 66 430 589 264 561 949 404 24 481 969 32 885 274 829 773 463 135 ];\r\nhexp=314.125000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[73 946 695 109 440 590 735 26 838 968 49 851 398 47 95 334 537 741 687 390 391 108 584 368 754 27 668 232 88 446 11 512 743 57 972 182 646 707 560 835 26 608 38 423 7 132 756 895 872 442 284 614 901 867 333 655 245 352 238 684 150 600 195 244 656 167 778 653 873 337 487 898 296 524 673 302 8 780 196 231 222 479 197 122 697 529 128 942 233 365 625 734 964 820 977 971 338 754 623 562 ];\r\nhexp=521.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[753 846 188 652 335 841 336 171 360 918 547 868 478 629 319 749 181 906 990 776 163 10 176 620 990 707 967 494 861 499 418 966 696 957 617 382 798 304 904 509 221 450 728 50 78 47 799 610 952 140 385 467 501 913 86 491 619 404 336 831 254 753 148 301 62 764 682 859 68 585 719 640 386 446 42 815 492 192 425 796 331 161 614 183 73 699 673 691 454 360 874 708 465 21 8 526 137 42 384 556 ];\r\nhexp=299.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[872 131 311 224 991 903 306 952 664 730 757 229 152 570 929 908 524 546 799 742 206 282 637 964 585 581 250 867 291 42 647 515 172 957 738 515 859 395 466 874 476 222 102 627 791 31 535 667 928 333 408 133 966 44 96 551 976 345 417 619 738 63 485 910 371 574 424 230 968 889 103 443 463 557 70 605 587 956 271 866 640 30 998 606 426 445 156 753 790 924 371 879 339 855 788 709 780 563 290 747 ];\r\nhexp=290.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[175 24 584 259 980 687 164 433 990 754 407 551 483 167 505 829 781 779 92 463 740 717 80 428 286 149 930 302 553 241 114 80 616 697 338 596 735 501 380 725 607 787 275 89 953 131 269 85 262 360 899 1 77 330 428 362 478 709 15 31 302 128 462 917 176 799 864 911 651 244 635 257 30 261 345 334 743 965 771 4 325 669 356 401 999 135 114 476 196 129 858 497 608 319 765 784 469 629 46 120 ];\r\nhexp=46.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[805 273 983 761 557 499 163 895 512 86 153 471 211 830 970 364 287 987 172 751 767 289 186 348 753 835 126 830 440 200 582 596 824 917 356 380 767 870 274 279 308 426 749 518 607 719 233 246 57 756 348 823 396 885 170 500 719 647 329 158 198 263 753 21 179 461 752 297 682 26 927 989 803 28 858 762 746 442 7 154 197 706 977 593 590 498 92 308 497 773 818 46 35 922 419 565 734 170 861 416 ];\r\nhexp=293.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[599 667 619 323 861 571 994 33 188 819 130 813 783 966 171 562 744 726 352 808 3 568 962 807 454 696 846 473 878 234 700 828 253 671 502 113 593 847 497 780 18 978 944 152 295 466 713 390 191 65 197 545 984 158 352 790 854 549 262 83 134 313 262 386 983 764 850 576 962 699 707 979 28 3 130 323 468 195 712 659 611 261 203 594 418 906 383 623 454 996 705 588 309 319 325 291 82 175 218 395 ];\r\nhexp=218.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[147 43 560 990 988 677 348 370 557 84 176 195 164 740 583 844 760 737 407 168 753 609 171 123 132 251 711 910 111 642 155 609 37 66 598 376 742 297 745 651 380 920 845 896 11 779 91 770 867 497 937 971 458 460 94 589 710 156 499 172 797 653 780 833 718 729 208 812 25 952 462 756 223 658 651 233 788 93 354 6 590 643 976 399 454 69 987 163 224 485 334 373 489 465 205 559 193 765 722 569 ];\r\nhexp=513.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[978 102 195 364 899 588 178 743 779 602 538 109 763 151 292 187 201 316 230 654 676 103 713 140 475 721 665 611 762 400 166 739 853 713 102 751 300 632 493 79 585 382 539 699 884 182 886 436 850 115 442 525 217 154 16 43 874 32 654 987 783 171 78 635 235 531 737 887 162 582 317 747 315 207 445 199 389 330 986 238 444 427 114 12 581 129 55 806 512 60 145 294 582 222 280 169 752 16 407 266 ];\r\nhexp=141.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[7 7 8 10 13 17 22 28 35 43 52 62 73 85 98 112 127 143 160 178 197 217 238 260 283 307 332 358 385 413 ];\r\nhexp=385.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[738 971 183 448 70 885 407 371 397 636 318 487 627 427 569 879 960 313 750 815 768 572 413 61 287 382 520 43 814 125 344 903 447 878 702 868 762 461 590 511 448 907 997 74 333 918 953 644 230 54 810 349 625 222 409 264 955 280 306 120 756 1 22 203 878 76 422 991 536 12 853 983 918 850 57 603 767 361 598 348 766 408 696 743 981 104 6 936 383 663 55 138 15 429 692 244 504 114 234 39 ];\r\nhexp=76.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[949 418 285 925 330 782 174 240 219 993 381 33 468 987 500 404 530 442 78 267 962 838 245 813 143 604 15 846 997 914 367 945 332 4 869 661 785 395 252 355 387 632 739 206 618 239 962 499 32 39 765 345 228 10 158 371 965 172 216 961 85 935 905 768 938 126 428 74 520 31 428 258 662 167 816 632 757 777 130 140 167 247 484 394 256 641 116 220 812 332 532 249 618 788 16 555 913 796 628 784 ];\r\nhexp=628.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[761 55 67 660 932 860 312 853 64 448 912 166 21 43 742 359 371 780 697 578 808 681 716 982 322 724 74 32 379 536 339 491 590 406 502 521 265 814 373 680 261 285 845 281 679 587 992 401 366 40 330 525 720 46 858 41 769 283 424 499 818 763 989 407 168 491 280 784 656 4 463 916 640 660 548 319 598 539 71 315 578 401 191 297 446 401 689 566 683 113 65 501 875 405 907 394 247 538 529 902 ];\r\nhexp=529.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[34 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 ];\r\nhexp=137.996826;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[1 2 2 2 2 2 ];\r\nhexp=1.937500;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[53 620 927 157 752 915 161 819 988 233 579 783 691 30 575 597 350 744 845 242 87 868 271 729 743 745 144 75 853 148 862 906 767 140 414 518 55 574 688 394 807 267 176 849 648 102 445 349 197 641 942 283 508 212 364 603 308 507 29 512 654 243 417 421 382 182 290 788 756 978 181 914 596 356 762 595 809 558 943 6 550 884 640 410 447 3 12 754 861 392 265 515 634 34 287 16 567 928 803 322 ];\r\nhexp=479.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[125 335 606 923 25 58 911 104 813 458 985 932 324 642 768 104 856 242 345 984 168 373 327 851 465 195 993 526 416 805 750 541 491 707 463 515 117 725 619 929 535 955 212 210 948 980 313 803 573 9 139 740 382 465 943 198 11 935 75 427 91 176 319 581 883 133 448 351 858 418 279 744 372 842 953 672 173 265 474 745 626 964 485 7 428 779 204 439 713 278 217 803 453 535 735 687 667 182 37 876 ];\r\nhexp=37.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[844 777 213 220 125 697 668 330 202 960 569 95 83 230 879 73 678 111 87 506 358 525 125 131 493 597 657 174 465 212 984 660 340 197 879 464 893 546 146 446 858 66 893 292 295 771 364 324 233 803 830 591 327 306 73 819 254 81 345 70 644 328 729 984 524 960 447 768 505 944 566 362 10 458 653 304 228 369 628 812 523 809 754 849 466 827 20 719 259 716 789 903 43 869 238 919 828 36 38 685 ];\r\nhexp=38.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[186 337 90 467 309 376 434 875 415 890 767 531 722 624 402 763 998 867 849 715 324 259 836 409 555 726 967 384 857 298 931 42 986 20 508 647 748 941 873 162 183 992 45 256 967 798 18 964 664 218 30 987 828 865 748 383 590 66 118 446 715 48 839 701 420 346 347 519 638 571 680 172 562 76 779 528 874 796 843 537 366 872 876 193 88 623 927 677 40 44 474 755 444 312 455 863 9 153 381 999 ];\r\nhexp=381.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[477 87 21 394 288 429 996 406 141 594 753 907 1 448 649 333 903 6 268 637 668 675 126 34 103 818 277 606 283 510 996 759 948 368 504 587 149 500 992 289 445 744 547 797 543 195 129 445 552 749 81 571 423 207 604 877 376 880 834 10 742 829 120 41 196 975 628 696 474 619 985 270 715 883 66 257 430 547 702 981 647 134 552 69 692 155 945 419 35 130 780 776 958 251 816 505 226 795 201 699 ];\r\nhexp=201.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[826 407 394 840 925 209 823 33 337 952 172 855 550 8 600 805 648 716 376 812 47 259 60 664 47 427 570 311 222 549 447 400 307 840 239 232 400 61 616 88 364 140 942 914 147 541 70 146 256 446 309 654 56 368 317 102 147 238 765 720 786 211 119 93 402 357 676 153 769 291 240 485 782 181 398 928 73 467 426 329 264 734 334 320 454 3 773 600 240 537 319 26 99 790 470 500 498 145 4 267 ];\r\nhexp=4.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 ];\r\nhexp=449.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[89 294 485 74 327 84 520 93 930 809 722 465 940 173 837 183 482 390 771 235 228 987 190 889 791 317 684 110 217 895 566 657 188 402 731 514 485 602 606 767 410 328 583 701 500 772 884 333 161 654 919 740 993 461 629 135 129 312 244 346 206 161 2 394 562 84 259 399 685 865 165 447 544 99 499 395 870 382 79 382 388 997 122 732 457 750 866 938 413 109 283 971 270 636 716 183 72 974 581 108 ];\r\nhexp=217.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[77 98 98 98 98 98 98 98 98 98 98 ];\r\nhexp=97.958984;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[352 744 346 117 530 347 100 769 855 38 203 142 758 38 66 587 519 111 639 319 941 571 8 532 733 247 351 444 80 214 776 432 309 473 548 190 819 999 958 673 389 160 166 146 550 584 733 68 694 723 386 987 646 745 870 378 343 573 822 423 786 949 206 446 421 105 635 591 104 593 615 492 104 133 637 653 716 721 721 761 796 458 99 441 555 321 170 249 893 343 671 678 291 876 123 63 981 109 653 436 ];\r\nhexp=272.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[980 603 46 989 60 51 292 639 771 271 803 293 431 556 141 896 382 512 967 993 227 107 247 622 327 484 892 155 519 281 839 498 884 236 838 295 638 482 286 408 752 88 700 535 643 193 782 377 56 748 721 635 206 967 608 533 802 499 39 320 779 229 170 14 464 7 661 454 840 946 213 592 385 265 478 27 457 259 755 864 7 475 498 564 793 105 96 594 955 134 266 86 362 787 99 178 145 759 983 985 ];\r\nhexp=774.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[503 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 ];\r\nhexp=933.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[639 297 43 644 114 112 303 812 536 562 30 793 511 826 121 341 350 737 607 961 238 790 232 341 217 876 109 914 771 275 778 761 924 820 756 37 283 58 200 170 971 229 962 481 406 83 173 107 819 779 419 409 921 651 749 137 878 857 403 648 483 180 760 406 351 515 794 986 924 345 155 246 925 469 726 331 551 251 789 369 29 208 777 301 210 877 438 87 85 840 87 568 371 198 325 73 65 471 58 340 ];\r\nhexp=58.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[674 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 847 829 ];\r\nhexp=846.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[547 140 404 702 167 262 463 264 703 821 417 252 526 745 196 115 595 287 774 91 411 591 488 445 865 258 361 598 428 574 13 326 713 417 379 879 30 193 142 84 13 910 335 890 655 530 356 249 169 130 691 579 72 530 376 288 788 736 886 567 309 250 892 373 666 623 251 47 815 744 131 180 654 817 69 660 347 425 908 867 906 950 797 977 479 524 617 266 260 502 832 920 751 76 293 769 698 895 815 864 ];\r\nhexp=809.562500;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[680 621 166 694 202 867 507 772 747 333 602 547 825 129 377 315 246 763 612 783 183 775 431 691 591 404 507 878 113 587 884 792 207 401 837 409 619 343 180 365 28 782 263 204 262 991 518 507 754 481 642 288 255 424 978 197 827 836 74 291 423 309 435 981 709 271 389 679 966 921 43 993 54 658 196 315 648 65 174 753 545 167 41 151 590 370 699 768 206 124 58 980 433 492 960 493 115 701 524 80 ];\r\nhexp=199.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[964 504 962 499 817 893 64 751 294 127 860 461 487 196 172 989 670 389 769 140 221 767 853 559 614 357 547 107 629 774 71 944 277 33 795 93 277 858 843 571 984 702 31 470 249 203 458 919 943 227 410 515 345 263 73 958 619 971 64 599 744 135 895 20 519 689 464 795 546 306 365 882 359 748 351 960 302 161 230 596 739 639 110 83 901 534 392 872 504 456 470 599 942 716 618 460 404 433 606 302 ];\r\nhexp=367.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[653 629 919 453 323 366 52 695 536 116 217 727 839 118 576 623 304 650 290 456 940 338 538 898 400 964 822 249 990 178 80 994 806 998 799 480 364 850 175 899 317 743 978 156 861 905 778 516 906 419 971 845 108 508 742 859 823 916 107 165 445 187 158 250 184 956 81 899 157 255 150 474 998 127 981 210 383 110 77 288 529 48 484 988 907 578 847 730 845 953 894 289 139 403 890 675 711 970 573 867 ];\r\nhexp=573.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[542 343 817 181 2 717 851 599 255 922 265 833 322 456 481 119 856 170 36 538 634 100 38 860 857 297 253 103 834 133 5 375 475 173 556 477 889 406 427 496 679 692 680 352 499 160 470 354 681 506 243 314 957 281 173 813 929 777 268 762 909 624 489 384 148 44 212 389 801 638 884 480 681 563 183 179 74 653 532 755 510 775 68 818 407 241 983 335 369 602 448 278 225 936 13 372 331 224 112 484 ];\r\nhexp=112.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[700 796 621 453 757 624 511 627 473 878 492 222 436 207 958 857 592 529 436 87 883 927 455 471 821 924 259 754 703 344 400 754 491 21 206 599 996 69 226 469 946 717 42 382 275 999 590 218 880 377 656 114 303 111 937 475 386 195 228 440 890 979 193 733 351 399 331 699 467 556 519 764 624 560 497 250 911 86 468 142 814 475 255 116 937 191 590 322 738 169 761 627 500 954 359 202 704 42 900 522 ];\r\nhexp=282.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[785 773 843 714 450 688 70 161 944 838 458 560 551 786 673 678 788 880 929 483 135 335 407 908 857 578 767 378 156 248 269 292 372 111 5 821 150 426 334 446 615 791 5 517 928 677 194 68 908 122 550 42 808 309 302 664 886 420 41 41 668 309 684 39 771 688 212 921 465 545 366 79 687 722 595 614 398 140 33 657 261 583 698 420 891 999 84 128 771 476 520 438 137 203 828 907 242 391 179 706 ];\r\nhexp=179.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[442 462 811 738 337 483 391 344 263 587 575 836 417 771 309 466 651 437 407 235 153 383 968 469 554 297 439 891 402 414 804 844 875 615 933 563 449 323 907 63 261 833 898 30 955 559 495 957 347 901 192 499 635 511 319 189 807 110 431 561 523 235 756 749 849 688 311 297 362 569 712 975 753 609 4 59 519 498 16 865 750 559 716 384 421 34 572 580 495 3 140 17 237 895 117 437 934 780 85 295 ];\r\nhexp=85.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[300 957 991 928 515 271 288 77 529 376 640 372 800 648 520 231 667 764 64 111 271 648 246 135 274 546 654 464 977 652 304 628 609 647 555 475 269 843 552 797 570 543 168 369 190 39 951 209 802 366 319 424 365 564 558 638 461 563 454 437 215 757 64 175 755 970 1 23 812 904 171 381 799 690 101 988 728 403 196 882 120 866 305 485 429 215 122 241 777 575 677 343 684 92 869 790 62 870 813 873 ];\r\nhexp=655.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[717 12 670 985 590 200 954 732 205 219 93 986 326 541 228 107 261 95 285 655 462 684 339 134 429 448 122 424 810 712 408 526 75 429 510 664 628 816 747 833 386 839 170 711 731 750 817 991 844 453 646 657 136 336 142 917 783 264 692 592 975 99 118 401 528 979 416 155 146 162 339 531 1000 861 593 83 610 761 73 805 214 70 462 701 757 603 617 540 218 309 483 544 407 952 944 286 283 711 441 428 ];\r\nhexp=395.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[775 389 609 683 60 332 653 361 495 783 99 271 191 446 336 972 386 951 885 334 706 260 815 27 291 51 300 119 824 763 605 950 151 213 985 562 544 637 922 38 771 373 660 961 818 348 933 203 650 817 889 356 76 703 382 719 105 33 189 928 147 794 230 297 6 214 211 902 202 132 291 972 856 303 933 25 650 217 580 299 385 468 6 460 522 739 530 626 772 71 906 270 864 135 919 221 700 129 474 253 ];\r\nhexp=191.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[953 115 502 480 98 330 781 222 833 663 162 633 91 86 112 337 594 600 596 548 571 334 128 131 165 76 403 523 471 967 807 424 82 308 255 531 637 388 752 469 50 913 453 140 351 917 829 944 516 424 843 439 110 971 569 626 398 323 500 221 642 306 996 723 613 250 253 602 637 356 422 687 268 227 178 618 143 6 913 10 782 108 448 891 430 369 516 179 43 367 399 684 673 394 758 637 996 362 590 632 ];\r\nhexp=497.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[7 8 7 9 9 ];\r\nhexp=8.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[564 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 ];\r\nhexp=908.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[507 172 26 449 868 808 866 620 533 792 983 584 15 861 470 374 370 289 708 886 891 819 311 813 171 911 521 604 300 682 971 806 853 997 254 720 156 471 691 689 614 26 624 629 238 445 354 608 85 413 845 976 232 507 140 402 418 660 5 69 694 976 874 898 972 480 618 479 302 660 167 916 37 143 544 275 587 249 234 672 662 78 999 893 585 490 646 354 502 651 422 195 626 647 92 949 478 61 779 780 ];\r\nhexp=420.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[589 550 266 629 51 743 468 234 813 337 733 325 365 902 42 882 463 694 280 215 182 928 357 527 772 765 775 953 311 745 607 251 646 872 879 49 967 347 634 779 683 367 104 399 620 497 632 82 190 263 649 723 542 357 602 313 474 376 266 136 472 872 386 469 96 616 517 414 962 151 192 996 517 647 746 136 144 378 570 685 640 570 760 534 926 361 846 751 736 111 886 559 335 623 27 782 239 896 195 552 ];\r\nhexp=195.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[194 693 979 12 991 375 518 854 825 355 93 775 220 472 768 138 912 302 153 626 750 682 840 23 620 651 542 846 79 714 942 624 759 272 636 101 647 505 954 823 212 398 949 431 870 68 568 133 370 720 758 471 753 949 845 725 952 387 570 382 452 864 6 210 135 641 662 133 145 615 307 708 365 255 138 586 675 706 718 396 777 828 866 882 776 710 606 727 448 527 461 900 390 466 461 877 458 123 361 954 ];\r\nhexp=361.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[744 864 989 387 489 924 127 23 119 623 554 45 268 302 556 77 859 465 740 297 238 716 689 386 333 730 710 361 144 616 992 887 831 981 625 319 904 103 694 374 725 599 418 345 900 326 421 110 790 160 406 27 876 446 764 560 527 474 272 22 441 263 260 624 243 236 942 499 338 987 872 415 937 290 759 836 967 531 297 756 690 54 134 917 500 897 828 378 722 99 400 163 714 659 786 308 895 79 158 584 ];\r\nhexp=158.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[905 984 587 852 691 348 446 500 257 740 857 807 975 496 216 421 499 579 526 359 322 143 225 308 176 863 323 742 791 477 416 47 812 2 251 855 702 48 706 958 788 562 116 762 57 683 535 907 613 60 618 287 202 842 594 729 705 916 823 847 744 238 893 908 591 143 762 292 191 467 602 330 28 69 91 436 104 977 343 716 37 960 2 238 153 595 319 209 862 141 55 958 378 300 865 320 442 978 612 984 ];\r\nhexp=612.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[317 556 286 294 527 303 996 355 931 835 560 798 184 88 302 843 401 736 980 845 42 116 363 823 229 13 90 785 964 635 98 633 191 383 926 69 37 922 423 319 108 983 116 291 422 769 485 823 504 464 19 898 932 382 720 160 746 161 296 709 795 745 341 337 479 267 405 867 540 180 185 647 162 301 289 935 421 125 757 925 588 776 174 871 157 245 382 254 405 678 962 199 422 655 888 901 273 644 119 164 ];\r\nhexp=119.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[872 680 376 253 292 73 586 386 37 356 742 361 377 97 113 375 584 579 202 131 59 412 627 18 730 391 801 551 371 846 670 242 877 397 846 520 469 432 906 858 139 999 570 515 95 683 241 30 613 443 160 23 854 138 40 935 881 193 485 251 38 506 493 267 903 690 786 723 121 43 580 612 41 150 478 488 184 719 517 148 513 29 170 366 518 561 652 398 753 489 649 791 994 493 409 248 182 194 971 303 ];\r\nhexp=248.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[941 503 851 883 141 176 209 828 359 769 616 66 629 324 53 146 997 350 959 906 740 73 671 272 736 44 357 518 350 620 96 290 122 946 525 263 121 733 442 831 502 57 249 130 380 653 275 728 2 586 985 93 658 8 365 393 51 73 263 400 692 358 42 166 656 566 780 128 298 221 959 151 277 559 280 9 211 907 88 564 492 425 656 149 432 20 893 482 92 155 233 136 865 274 301 520 191 80 647 841 ];\r\nhexp=460.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[377 935 872 328 492 32 485 119 968 436 164 768 453 51 595 934 567 272 446 948 438 53 686 189 529 457 536 829 60 634 351 788 568 574 115 412 605 951 882 924 738 45 43 542 448 637 476 14 261 273 314 698 678 999 886 206 456 774 386 867 407 736 654 326 309 768 737 265 71 618 540 160 15 582 702 462 219 529 827 479 801 140 528 830 491 765 35 946 538 421 164 296 156 817 622 465 936 710 81 6 ];\r\nhexp=81.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[287 544 784 973 617 730 939 14 869 971 670 481 905 720 900 147 70 335 274 840 811 793 629 947 995 457 205 236 199 384 941 486 279 76 810 896 157 100 909 377 71 931 209 327 2 461 474 71 795 747 911 957 892 539 903 886 347 108 474 898 491 766 383 769 842 192 16 350 292 925 727 714 207 935 40 560 395 865 630 542 612 892 498 503 783 753 740 481 860 213 378 702 979 112 822 172 304 838 521 947 ];\r\nhexp=521.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[444 565 313 823 633 756 258 736 732 952 804 120 911 157 358 416 104 28 624 317 168 31 274 897 330 490 216 123 467 827 459 262 743 771 436 376 878 694 463 962 997 618 81 908 775 790 323 878 817 298 546 984 328 820 880 9 661 448 132 480 626 590 741 369 712 529 96 590 574 558 903 570 176 983 477 302 773 151 531 589 801 76 925 480 247 156 489 908 603 620 739 581 561 831 949 272 359 44 213 932 ];\r\nhexp=213.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[51 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 ];\r\nhexp=99.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[328 834 946 94 643 121 288 291 244 792 962 420 200 322 600 338 25 5 23 234 995 908 950 163 639 768 623 582 556 243 608 236 428 553 329 422 25 616 713 620 759 26 391 958 699 990 647 723 347 670 308 693 577 257 856 568 376 830 149 932 424 109 519 851 13 847 272 390 462 336 9 572 714 400 529 412 741 528 487 439 197 794 484 125 403 339 692 778 520 193 61 943 653 579 793 665 425 64 406 238 ];\r\nhexp=151.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[5 8 9 9 9 ];\r\nhexp=8.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[746 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 847 829 810 790 769 ];\r\nhexp=789.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[68 183 324 291 192 327 875 979 419 229 984 360 223 311 758 676 380 97 190 955 933 875 327 774 339 532 332 531 648 53 99 715 587 774 5 778 452 232 108 223 812 443 934 34 753 692 709 132 140 898 439 72 124 765 845 462 648 528 344 295 932 442 10 518 567 366 647 371 597 106 593 760 548 526 793 301 569 853 784 60 102 574 132 225 339 328 686 986 856 29 633 787 822 642 657 741 359 655 111 308 ];\r\nhexp=111.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[804 393 542 618 301 963 222 887 918 845 752 557 874 101 514 651 545 21 404 686 945 126 565 635 333 704 343 112 267 633 859 422 377 752 39 677 714 260 915 983 456 18 891 682 470 757 332 14 777 735 700 721 213 616 707 545 319 50 656 937 34 866 358 762 617 396 790 682 8 56 16 463 425 259 144 894 15 828 259 791 914 310 864 126 925 570 670 596 971 326 532 356 543 242 117 160 637 258 193 996 ];\r\nhexp=193.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[612 765 224 468 419 508 492 68 76 71 718 460 890 76 272 411 814 801 37 937 871 942 207 86 428 125 307 127 253 132 379 216 248 954 683 666 462 527 733 537 949 803 349 839 878 620 249 43 420 285 980 643 578 538 728 5 14 386 131 266 518 861 833 765 815 516 783 628 394 867 516 342 669 864 180 898 483 429 941 255 65 272 897 643 809 976 647 822 362 130 439 231 990 271 347 156 138 129 135 531 ];\r\nhexp=135.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[1 2 3 6 7 ];\r\nhexp=5.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[12 15 579 322 49 851 15 663 888 517 846 428 402 653 74 764 682 500 440 437 256 453 191 765 452 488 377 499 452 550 537 815 916 467 489 965 317 855 627 556 372 824 335 125 476 409 240 158 908 679 946 515 131 136 280 934 623 8 432 427 909 968 241 825 786 81 789 455 936 767 10 307 590 345 783 418 753 374 927 12 52 872 879 534 360 158 820 982 517 251 760 425 571 353 249 356 433 389 810 368 ];\r\nhexp=378.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[398 738 548 266 737 645 401 232 374 322 916 366 243 675 899 521 387 744 271 122 207 509 32 893 131 411 674 369 306 220 921 703 309 820 968 45 464 720 276 838 394 544 203 636 218 101 156 957 196 779 78 402 287 462 294 769 872 319 138 529 890 58 231 199 229 550 243 44 269 871 881 14 414 435 650 983 887 157 939 83 287 369 836 925 830 130 694 53 800 831 581 690 240 811 888 468 712 482 863 332 ];\r\nhexp=407.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[546 906 281 324 151 504 124 566 541 166 434 485 894 527 437 639 678 129 931 327 719 658 376 956 814 789 394 207 399 984 521 945 889 154 620 392 657 743 309 549 260 742 34 154 268 822 144 298 950 426 624 20 84 352 327 249 140 721 808 539 56 680 835 296 833 806 687 842 901 995 390 160 88 775 665 356 596 161 5 897 586 628 269 21 331 595 622 471 315 429 361 722 108 547 18 293 352 56 486 252 ];\r\nhexp=154.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[7 7 7 ];\r\nhexp=7.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[674 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 847 829 ];\r\nhexp=846.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[56 195 928 440 459 405 819 267 663 573 131 21 400 980 585 544 437 32 138 743 518 755 828 879 541 927 408 37 37 390 21 445 937 948 884 395 704 54 14 367 979 496 739 378 827 675 921 263 707 410 6 224 164 185 454 56 111 214 93 500 603 465 944 891 765 179 286 468 233 651 186 211 146 925 940 972 951 212 587 657 622 944 232 137 128 686 545 591 899 989 442 853 805 385 744 569 563 381 389 147 ];\r\nhexp=264.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[723 412 522 637 488 301 164 361 96 7 249 461 230 124 6 318 98 932 346 138 328 820 892 771 483 698 985 844 850 717 842 924 128 363 560 967 15 76 679 111 434 928 923 663 51 280 980 149 564 326 286 891 497 177 13 331 874 349 174 75 65 367 350 544 82 262 863 96 689 541 558 122 468 833 784 519 112 116 19 675 441 304 917 289 832 281 619 57 629 145 483 45 863 184 941 944 445 803 392 133 ];\r\nhexp=275.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[577 722 692 926 200 672 135 934 134 563 221 14 610 57 1 517 986 847 598 830 800 491 470 290 893 711 316 603 32 241 822 608 314 513 533 514 537 19 447 670 582 20 35 543 428 35 411 413 882 8 594 33 498 63 674 743 125 990 697 156 230 870 764 895 735 648 408 271 19 207 292 952 578 326 846 5 712 257 769 945 264 362 329 114 776 3 856 900 344 904 407 925 774 522 819 508 170 579 130 540 ];\r\nhexp=130.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[421 815 156 688 923 693 1 130 405 430 554 910 151 635 437 187 292 516 448 345 356 192 379 626 146 339 157 374 419 580 561 192 746 68 231 668 760 231 149 516 13 702 426 515 688 214 702 980 729 501 324 436 692 55 414 189 745 922 914 515 501 827 58 246 894 288 265 654 519 766 521 883 819 298 397 507 512 98 838 240 951 513 28 642 919 441 183 663 362 448 530 215 274 587 812 168 227 77 173 745 ];\r\nhexp=173.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[403 227 764 490 2 428 197 949 940 201 846 526 181 114 898 511 60 519 333 375 947 45 448 407 591 817 51 295 873 888 898 627 114 13 116 115 793 313 64 732 865 261 609 45 726 507 908 785 377 240 511 324 637 959 82 579 127 484 873 999 371 123 977 484 135 93 951 279 757 366 11 621 626 971 18 703 477 277 487 854 868 350 529 504 660 962 83 786 445 307 137 167 429 113 650 916 205 952 194 313 ];\r\nhexp=194.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[167 565 586 92 33 663 774 583 913 562 303 294 121 432 594 682 660 383 121 745 222 207 664 944 756 340 17 820 810 426 512 977 342 97 68 374 759 193 308 24 106 963 317 227 746 262 260 405 645 380 149 866 938 164 162 694 504 178 865 313 955 376 641 297 824 60 22 583 252 330 958 358 644 274 936 389 535 195 145 179 575 646 397 512 809 558 557 312 87 422 977 393 149 617 41 973 677 63 907 280 ];\r\nhexp=171.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[190 97 554 733 196 405 479 417 786 557 799 525 554 272 256 362 373 121 299 785 582 933 107 851 569 822 33 992 796 966 99 985 62 5 70 257 409 548 674 546 105 824 71 10 447 326 723 819 799 22 955 380 306 62 582 874 883 966 217 30 931 316 15 993 320 84 601 728 983 626 273 87 801 695 96 247 373 819 65 171 192 372 902 497 433 835 723 667 800 939 697 83 606 63 427 925 498 27 4 480 ];\r\nhexp=4.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 ];\r\nhexp=419.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[343 949 254 811 781 390 681 893 505 51 919 297 706 188 585 889 468 555 945 449 699 779 845 562 962 785 857 407 939 248 891 282 197 497 444 329 886 476 573 390 526 492 686 583 679 622 471 498 176 415 946 875 545 143 788 506 927 644 264 218 244 155 851 440 651 646 768 888 121 693 277 998 184 314 580 214 935 50 63 110 816 9 336 712 503 123 217 429 119 481 646 362 987 848 153 989 493 272 876 613 ];\r\nhexp=442.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[96 139 180 220 259 297 334 370 405 439 472 504 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 ];\r\nhexp=999.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[996 3 873 16 866 52 914 701 832 206 307 897 477 555 539 637 530 185 810 243 314 248 473 656 870 172 163 360 300 298 242 647 300 114 663 517 518 576 217 701 781 875 597 609 429 487 245 311 672 54 553 337 653 378 344 874 549 507 585 200 804 827 847 455 292 509 971 161 436 540 862 568 414 810 176 195 297 772 505 320 177 409 8 181 786 704 54 686 210 991 886 365 817 732 819 460 592 789 621 27 ];\r\nhexp=316.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[787 243 751 569 775 500 848 848 318 273 528 934 359 861 253 812 863 377 763 103 266 433 480 364 222 949 216 720 445 219 338 583 462 440 151 236 939 351 435 608 975 962 541 333 823 145 496 685 522 610 787 787 395 618 502 616 566 717 687 362 288 376 945 749 815 95 336 105 797 771 65 772 732 605 104 554 102 952 591 975 561 729 761 955 347 262 923 912 331 961 274 618 337 570 718 503 16 405 960 813 ];\r\nhexp=609.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[43 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 ];\r\nhexp=54.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[375 314 89 711 136 792 516 6 189 707 745 774 351 350 497 65 911 129 629 746 542 944 181 269 649 563 798 243 157 472 262 531 138 351 242 625 142 109 630 330 815 726 455 518 75 952 582 985 432 562 82 973 857 263 594 505 825 743 99 981 567 361 512 704 711 105 328 852 213 310 533 380 35 988 897 462 291 830 446 722 392 880 46 248 142 639 105 318 734 203 298 300 915 161 355 625 617 682 828 830 ];\r\nhexp=756.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[621 566 424 26 223 971 692 223 387 865 975 931 383 15 433 324 737 131 91 294 606 149 273 390 992 232 883 106 284 406 537 904 323 960 281 898 282 973 120 668 189 94 950 572 109 382 247 197 864 338 490 470 838 762 859 829 345 93 287 629 850 823 884 173 783 165 422 416 489 541 84 677 634 33 600 94 415 847 290 630 184 779 99 373 892 310 201 589 754 487 217 604 662 452 128 444 968 549 859 456 ];\r\nhexp=502.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[219 259 297 334 370 405 439 472 504 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 ];\r\nhexp=993.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[31 926 357 528 202 296 851 153 860 437 809 481 732 41 969 860 78 513 802 976 853 243 180 658 979 923 226 893 655 966 40 37 892 748 564 93 396 415 245 255 203 54 735 935 446 55 146 523 568 947 850 420 541 29 429 519 304 655 411 310 972 450 347 863 550 262 956 945 676 200 199 231 605 933 165 50 339 662 924 906 608 773 678 500 154 106 18 457 112 428 766 436 230 464 298 779 726 605 723 753 ];\r\nhexp=679.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[597 723 364 264 281 160 462 21 490 447 258 285 226 723 649 806 203 55 963 714 466 107 7 47 680 286 567 432 654 973 49 602 47 412 865 328 571 678 700 412 477 958 49 702 32 697 859 235 103 821 300 568 280 659 966 959 944 885 742 949 857 142 551 256 905 767 935 476 445 634 239 273 943 287 326 975 335 184 209 789 356 860 356 987 518 674 946 814 558 39 762 766 181 664 21 85 431 955 912 227 ];\r\nhexp=449.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[225 925 374 252 927 855 926 746 49 638 404 659 898 607 605 667 512 339 290 318 335 346 905 995 664 581 285 97 107 855 492 331 131 217 935 57 71 860 802 472 849 558 482 98 164 86 117 27 425 406 344 759 751 600 753 415 181 389 511 639 595 354 970 725 570 256 133 641 467 287 464 316 844 945 765 359 31 881 385 455 286 81 565 389 680 669 803 212 409 665 851 4 19 172 728 588 779 861 580 245 ];\r\nhexp=447.562500;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 ];\r\nhexp=909.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[534 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 ];\r\nhexp=921.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[313 209 811 89 467 954 982 833 133 241 623 47 550 838 172 827 408 842 422 730 519 953 86 61 194 554 572 183 812 765 530 476 325 340 565 143 646 898 975 778 490 949 824 40 787 996 866 546 189 639 627 59 591 712 119 137 618 691 671 781 807 200 608 131 540 524 273 185 422 599 314 911 547 138 302 685 485 519 582 25 157 209 83 100 272 553 236 889 243 258 21 49 457 629 531 996 152 155 532 925 ];\r\nhexp=532.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n\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":28,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-06T03:35:15.000Z","updated_at":"2026-01-04T05:37:36.000Z","published_at":"2013-10-06T03:39:55.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\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHedgemony\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Large data set with N\u0026lt;=1000.\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 the Baron trims the bushes(1:N) starting with bush 2 thru the next to last bush(N-1). A bush is trimmed to the average of the adjacent bushes. If the bush is less than the adjacent average the bush is left alone. Report the final Height of the next to last bush following its trimming.\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 hin , Vector length N\u0026lt;=1000 with values between 1 and 1000.\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 hout , Final Trimmed Height of the next to last bush (accuracy \u0026lt;2e-4)\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 [hin] [hout]\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 2 3 6 7] [5.000000]\\n[5 8 9 9 9] [8.500000]\\n[1 2 2 2 2 2] [1.937500]]]\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) Best Time: 7 minutes\\n2) Solved by 27 of 32]]\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\"}]}"},{"id":44074,"title":"GJam 2017 Kickstart: Parentheses (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p2 GJam 2017 Kickstart Parentheses\u003e. This is the first 100 small cases with max L+R\u003c=20.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\r\n\r\n*Input:* [L,R], the quantity of parentheses types\r\n\r\n*Output:* [V], the maximum number of parentheses pairings\r\n\r\n*Examples:* [L,R] [V]; [3,2] [3]\r\n\r\nFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for L+R=20. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p2\"\u003eGJam 2017 Kickstart Parentheses\u003c/a\u003e. This is the first 100 small cases with max L+R\u0026lt;=20.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [L,R], the quantity of parentheses types\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the maximum number of parentheses pairings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [L,R] [V]; [3,2] [3]\u003c/p\u003e\u003cp\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=20. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=parenc(L,R)\r\n% L number of Left parentheses, R number of Right parentheses \r\n% Determine maxinum number of parenthese pairings\r\n% http://code.google.com/codejam/contest/6304486/dashboard#s=p2\r\n\r\nval=0;\r\n \r\nend","test_suite":"%%\r\nv=parenc(19,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(14,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(4,15);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(8,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(14,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(10,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(10,10);\r\nassert(~isempty(v))\r\nassert(v==55)\r\n%%\r\nv=parenc(3,7);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(3,13);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(4,12);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(2,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(6,11);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(4,12);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(15,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(14,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(20,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(12,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(0,10);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(16,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(3,12);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(8,12);\r\nassert(~isempty(v))\r\nassert(v==36)\r\n%%\r\nv=parenc(8,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(1,8);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(7,13);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(7,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(11,8);\r\nassert(~isempty(v))\r\nassert(v==36)\r\n%%\r\nv=parenc(17,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(4,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(1,6);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(5,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(1,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(7,13);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(6,12);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(15,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(14,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(12,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(4,15);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(12,7);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(5,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(19,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(6,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(11,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(8,12);\r\nassert(~isempty(v))\r\nassert(v==36)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(18,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(13,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(3,6);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(6,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(3,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(19,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(9,11);\r\nassert(~isempty(v))\r\nassert(v==45)\r\n%%\r\nv=parenc(10,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(0,11);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(11,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(3,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(1,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(9,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(1,19);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(4,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(13,7);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(8,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(7,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(16,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(16,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(7,8);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(13,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(4,14);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(7,8);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(9,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(4,7);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(12,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(10,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(17,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(4,13);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(11,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(10,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(7,7);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(6,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(5,13);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(10,10);\r\nassert(~isempty(v))\r\nassert(v==55)\r\n%%\r\nv=parenc(14,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(8,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(14,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(0,20);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(0,1);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(1,10);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(13,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(0,9);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(1,17);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(0,2);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(2,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(4,12);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(11,9);\r\nassert(~isempty(v))\r\nassert(v==45)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(15,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(16,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(17,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(14,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":4,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T21:52:46.000Z","updated_at":"2026-01-02T17:52:37.000Z","published_at":"2017-02-25T22:07: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/6304486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Parentheses\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 small cases with max L+R\u0026lt;=20.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given L left and R right parentheses determine the maximum number of parentheses pairings.\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 [L,R], the quantity of parentheses types\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 [V], the maximum number of parentheses pairings\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 [L,R] [V]; [3,2] [3]\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\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=20. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":1894,"title":"GJam 2014 China Rd A: Library Sorting (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting\u003e.  Subset of cases.\r\n\r\nThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations. \r\n\r\n*Input:* V   a vector\r\n\r\n*Output:* Vout  a sorted vector Odds Increasing/Evens Increasing\r\n\r\n*Example:*\r\n\r\nV= [-5 -12 87 2 88 20 11]\r\n\r\nVout=[-5 88 11 20 2 -12 87]\r\n\r\n\r\n*Contest Performance:*  Best Time to Complete: \u003c 10 minutes","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p2\"\u003eGJam 2014 China Sorting\u003c/a\u003e.  Subset of cases.\u003c/p\u003e\u003cp\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V   a vector\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Vout  a sorted vector Odds Increasing/Evens Increasing\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eV= [-5 -12 87 2 88 20 11]\u003c/p\u003e\u003cp\u003eVout=[-5 88 11 20 2 -12 87]\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e  Best Time to Complete: \u0026lt; 10 minutes\u003c/p\u003e","function_template":"function vout=Sort_CH(v)\r\n vout=v;\r\nend","test_suite":"%%\r\ntic\r\nv=[1 ];\r\nvexp=[1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2 1 ];\r\nvexp=[2 1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 ];\r\nvexp=[1 2 3 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 4 5 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5 2 3 4 1 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[994 994 -981 -975 -971 980 -971 976 -969 -969 968 968 958 -963 -957 948 -955 932 926 -935 924 -931 -923 -917 922 -917 -909 -899 916 914 -899 -877 -871 -871 -867 -847 912 -829 912 -825 -819 -817 910 -811 -805 -803 -801 904 -791 -783 -745 -731 902 -725 -725 -715 900 896 -707 896 -705 -705 -693 -691 882 -687 -685 -683 -671 -663 882 -663 880 880 -651 -651 -637 876 -637 -623 -613 -605 -601 -577 -577 862 -571 -565 856 848 -559 -559 -555 -553 844 -551 840 828 -547 -539 -527 812 -525 806 802 -505 -503 -497 -497 -495 798 -493 -491 -483 -481 798 770 770 -481 770 762 758 -477 -469 -463 -457 756 -455 -451 -441 -439 -431 -429 752 -427 -413 -409 742 -403 726 -391 722 -389 -385 718 -379 -365 -363 -359 712 702 -355 -351 682 -347 682 674 672 -343 672 -325 664 -319 -319 -315 -309 -297 -287 -285 -279 662 658 -277 658 656 650 -275 644 -259 -259 -259 630 -255 -251 -245 -231 -231 -225 -221 -219 -215 628 616 -213 612 -209 -209 598 -207 -203 -193 594 -191 -165 594 574 -163 -137 -129 -129 -119 -119 -119 -113 -111 572 564 560 -101 -99 -93 -91 546 -91 546 -91 542 -67 534 -63 528 -57 -55 -55 -49 -39 -37 522 -35 -31 520 -29 -25 -21 -17 -15 -11 -11 514 510 500 -9 494 -5 15 17 490 23 490 484 33 476 33 47 464 49 59 63 77 462 462 77 460 458 77 77 81 444 444 95 442 97 99 105 105 107 111 113 117 434 424 420 119 133 416 408 394 380 376 135 143 143 376 374 147 368 175 342 338 338 336 185 187 195 195 336 197 197 334 201 326 203 316 312 312 308 308 300 211 286 219 219 237 239 247 249 251 253 259 265 273 284 277 262 258 283 285 287 289 297 248 242 303 305 319 327 335 351 357 385 385 238 232 220 397 399 401 210 403 407 210 210 409 204 411 200 415 425 425 200 429 198 429 198 196 192 190 186 433 435 441 451 463 473 473 182 483 182 495 176 170 154 507 507 150 148 509 529 533 148 130 128 124 112 539 96 551 555 70 561 70 565 577 581 581 585 599 70 609 58 56 611 44 613 44 621 625 625 36 627 28 26 2 627 637 647 651 0 685 689 689 689 0 693 693 693 0 -10 -14 -40 -42 -44 697 -56 705 707 715 -56 -64 715 719 -66 -66 721 729 729 731 741 741 763 763 -74 767 775 811 815 819 827 833 -78 845 845 -80 -82 847 847 847 851 867 -84 869 869 869 871 -86 873 -98 -98 -104 875 875 879 887 911 935 -118 935 -120 949 951 965 973 975 979 -128 -132 -138 -140 -150 -154 -154 -164 -172 -174 -188 -196 -198 -200 -204 -208 -214 -216 -224 -228 -238 -242 -242 -250 -260 -260 -280 -286 -294 -296 -298 -302 -304 -308 -324 -330 -336 -336 -340 -342 -342 -344 -352 -352 -360 -360 -364 -364 -366 -368 -370 -378 -384 -384 -384 -392 -392 -396 -402 -402 -406 -410 -410 -416 -420 -420 -420 -432 -436 -440 -442 -458 -462 -470 -478 -482 -494 -500 -502 -504 -514 -520 -524 -530 -532 -534 -546 -548 -550 -550 -552 -558 -560 -566 -572 -572 -594 -598 -600 -602 -616 -626 -632 -638 -640 -650 -652 -664 -666 -676 -676 -684 -694 -700 -704 -710 -714 -720 -728 -728 -732 -738 -750 -758 -758 -776 -778 -782 -792 -794 -798 -798 -808 -810 -812 -814 -814 -818 -826 -836 -846 -856 -858 -858 -858 -860 -866 -866 -886 -892 -896 -900 -902 -906 -910 -910 -910 -924 -926 -926 -934 -938 -940 -942 -944 -946 -952 -952 -966 -966 -968 -968 -976 ];\r\nvexp=[994 994 -981 -975 -971 980 -971 976 -969 -969 968 968 958 -963 -957 948 -955 932 926 -935 924 -931 -923 -917 922 -917 -909 -899 916 914 -899 -877 -871 -871 -867 -847 912 -829 912 -825 -819 -817 910 -811 -805 -803 -801 904 -791 -783 -745 -731 902 -725 -725 -715 900 896 -707 896 -705 -705 -693 -691 882 -687 -685 -683 -671 -663 882 -663 880 880 -651 -651 -637 876 -637 -623 -613 -605 -601 -577 -577 862 -571 -565 856 848 -559 -559 -555 -553 844 -551 840 828 -547 -539 -527 812 -525 806 802 -505 -503 -497 -497 -495 798 -493 -491 -483 -481 798 770 770 -481 770 762 758 -477 -469 -463 -457 756 -455 -451 -441 -439 -431 -429 752 -427 -413 -409 742 -403 726 -391 722 -389 -385 718 -379 -365 -363 -359 712 702 -355 -351 682 -347 682 674 672 -343 672 -325 664 -319 -319 -315 -309 -297 -287 -285 -279 662 658 -277 658 656 650 -275 644 -259 -259 -259 630 -255 -251 -245 -231 -231 -225 -221 -219 -215 628 616 -213 612 -209 -209 598 -207 -203 -193 594 -191 -165 594 574 -163 -137 -129 -129 -119 -119 -119 -113 -111 572 564 560 -101 -99 -93 -91 546 -91 546 -91 542 -67 534 -63 528 -57 -55 -55 -49 -39 -37 522 -35 -31 520 -29 -25 -21 -17 -15 -11 -11 514 510 500 -9 494 -5 15 17 490 23 490 484 33 476 33 47 464 49 59 63 77 462 462 77 460 458 77 77 81 444 444 95 442 97 99 105 105 107 111 113 117 434 424 420 119 133 416 408 394 380 376 135 143 143 376 374 147 368 175 342 338 338 336 185 187 195 195 336 197 197 334 201 326 203 316 312 312 308 308 300 211 286 219 219 237 239 247 249 251 253 259 265 273 284 277 262 258 283 285 287 289 297 248 242 303 305 319 327 335 351 357 385 385 238 232 220 397 399 401 210 403 407 210 210 409 204 411 200 415 425 425 200 429 198 429 198 196 192 190 186 433 435 441 451 463 473 473 182 483 182 495 176 170 154 507 507 150 148 509 529 533 148 130 128 124 112 539 96 551 555 70 561 70 565 577 581 581 585 599 70 609 58 56 611 44 613 44 621 625 625 36 627 28 26 2 627 637 647 651 0 685 689 689 689 0 693 693 693 0 -10 -14 -40 -42 -44 697 -56 705 707 715 -56 -64 715 719 -66 -66 721 729 729 731 741 741 763 763 -74 767 775 811 815 819 827 833 -78 845 845 -80 -82 847 847 847 851 867 -84 869 869 869 871 -86 873 -98 -98 -104 875 875 879 887 911 935 -118 935 -120 949 951 965 973 975 979 -128 -132 -138 -140 -150 -154 -154 -164 -172 -174 -188 -196 -198 -200 -204 -208 -214 -216 -224 -228 -238 -242 -242 -250 -260 -260 -280 -286 -294 -296 -298 -302 -304 -308 -324 -330 -336 -336 -340 -342 -342 -344 -352 -352 -360 -360 -364 -364 -366 -368 -370 -378 -384 -384 -384 -392 -392 -396 -402 -402 -406 -410 -410 -416 -420 -420 -420 -432 -436 -440 -442 -458 -462 -470 -478 -482 -494 -500 -502 -504 -514 -520 -524 -530 -532 -534 -546 -548 -550 -550 -552 -558 -560 -566 -572 -572 -594 -598 -600 -602 -616 -626 -632 -638 -640 -650 -652 -664 -666 -676 -676 -684 -694 -700 -704 -710 -714 -720 -728 -728 -732 -738 -750 -758 -758 -776 -778 -782 -792 -794 -798 -798 -808 -810 -812 -814 -814 -818 -826 -836 -846 -856 -858 -858 -858 -860 -866 -866 -886 -892 -896 -900 -902 -906 -910 -910 -910 -924 -926 -926 -934 -938 -940 -942 -944 -946 -952 -952 -966 -966 -968 -968 -976 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-979 990 -975 -973 -971 -955 990 -953 -943 -937 -925 -921 986 -917 -913 -911 -909 984 -905 -903 -901 -897 -897 -889 -877 -875 980 968 -875 -871 -861 966 -861 -859 -855 948 942 -823 -821 -811 -805 -805 -797 -795 -793 -793 -793 938 -791 936 -781 -779 936 924 -775 -775 -767 924 920 -757 -755 914 -755 -751 -751 -749 906 -749 906 -745 -745 902 -741 902 -737 898 -735 -729 -727 894 882 868 -723 -709 862 858 858 -705 842 842 838 -693 -681 -679 838 -665 -651 -641 -629 -627 836 -627 828 -623 -623 824 -617 -585 -575 -571 -563 816 -561 -561 -559 -559 -549 808 -539 -539 -535 796 -533 -533 -527 792 -525 788 -525 -521 -517 788 -517 -511 -511 -493 756 -491 756 752 -485 -477 736 -465 -455 -453 716 -451 -441 -429 714 712 712 -427 -407 710 -399 -393 -393 -391 -385 -381 710 -379 702 700 698 -371 -371 -371 -359 -349 684 -341 672 -339 -337 -331 -319 652 636 -315 636 -315 -303 630 630 630 -301 -301 -297 -297 630 -297 -295 -291 -287 -281 624 -267 -267 624 -255 624 -247 616 -247 608 -245 -243 -241 -237 -237 -233 -231 -225 -221 -205 -201 604 -193 602 -185 602 600 -175 -167 -167 598 594 594 -163 -143 -143 588 584 -139 582 578 -133 -121 -117 -103 -95 -91 -89 -65 -65 -55 574 -49 572 -45 572 -39 572 -39 -35 -35 570 -31 -23 -19 560 -7 560 548 7 542 7 9 532 11 11 31 33 37 532 55 532 522 71 77 520 506 504 500 85 91 91 496 494 91 490 93 93 95 448 105 448 440 107 109 111 117 436 125 416 125 404 129 133 384 137 139 141 143 378 378 143 374 364 362 360 147 147 151 352 157 352 338 159 169 181 336 187 203 332 205 330 207 207 219 223 326 318 229 308 231 231 298 294 239 292 239 243 253 292 257 259 261 273 286 284 275 281 287 295 295 297 297 299 307 307 311 313 313 282 278 276 272 264 327 250 329 333 248 343 246 343 242 349 351 353 357 359 363 377 379 381 385 242 385 385 240 389 226 226 401 226 403 405 417 419 226 429 429 429 431 222 461 463 216 477 481 483 483 214 495 204 198 188 497 507 507 184 184 517 519 531 182 533 182 535 539 539 545 567 573 587 180 589 595 174 154 595 595 144 597 144 609 623 144 631 637 637 657 142 659 132 663 130 665 665 669 679 689 126 693 124 693 106 697 701 100 707 100 709 715 715 98 721 723 733 88 737 72 66 52 52 50 40 737 749 749 34 755 759 767 34 769 32 771 26 26 26 773 26 779 14 783 8 0 787 791 0 791 793 0 793 0 815 817 819 819 -10 819 819 819 821 821 823 827 -14 827 831 845 -38 859 861 -42 865 873 877 881 891 893 909 -44 -50 911 913 915 921 923 935 945 945 951 -50 -52 -54 953 -64 -66 -68 -80 959 961 -82 -84 -92 967 975 -98 -98 -106 -110 -110 -112 -122 -126 -140 -140 -144 -148 -154 -154 -154 -154 -162 -162 -168 -172 -182 -182 -204 -204 -208 -220 -220 -228 -232 -240 -248 -252 -254 -256 -256 -264 -266 -276 -280 -286 -286 -286 -294 -294 -294 -296 -300 -300 -300 -306 -310 -312 -314 -314 -320 -346 -346 -362 -362 -366 -368 -368 -370 -378 -380 -380 -384 -392 -392 -410 -410 -412 -424 -430 -430 -434 -434 -434 -436 -436 -438 -438 -442 -444 -444 -448 -462 -468 -480 -488 -494 -506 -512 -512 -518 -530 -530 -536 -536 -536 -546 -546 -548 -550 -554 -556 -560 -560 -578 -580 -590 -590 -596 -596 -598 -598 -610 -612 -616 -616 -618 -626 -630 -634 -636 -638 -640 -642 -644 -644 -644 -648 -652 -654 -664 -674 -674 -686 -698 -700 -702 -708 -714 -714 -716 -718 -722 -726 -728 -728 -740 -742 -744 -750 -752 -756 -762 -766 -766 -768 -770 -770 -770 -778 -778 -780 -782 -786 -786 -792 -792 -798 -806 -810 -812 -820 -828 -844 -858 -858 -858 -860 -872 -874 -880 -882 -882 -888 -888 -890 -896 -902 -910 -912 -924 -924 -936 -938 -956 -956 -968 -980 -980 -980 -982 -988 -990 -994 -996 -998 ];\r\nvexp=[-979 990 -975 -973 -971 -955 990 -953 -943 -937 -925 -921 986 -917 -913 -911 -909 984 -905 -903 -901 -897 -897 -889 -877 -875 980 968 -875 -871 -861 966 -861 -859 -855 948 942 -823 -821 -811 -805 -805 -797 -795 -793 -793 -793 938 -791 936 -781 -779 936 924 -775 -775 -767 924 920 -757 -755 914 -755 -751 -751 -749 906 -749 906 -745 -745 902 -741 902 -737 898 -735 -729 -727 894 882 868 -723 -709 862 858 858 -705 842 842 838 -693 -681 -679 838 -665 -651 -641 -629 -627 836 -627 828 -623 -623 824 -617 -585 -575 -571 -563 816 -561 -561 -559 -559 -549 808 -539 -539 -535 796 -533 -533 -527 792 -525 788 -525 -521 -517 788 -517 -511 -511 -493 756 -491 756 752 -485 -477 736 -465 -455 -453 716 -451 -441 -429 714 712 712 -427 -407 710 -399 -393 -393 -391 -385 -381 710 -379 702 700 698 -371 -371 -371 -359 -349 684 -341 672 -339 -337 -331 -319 652 636 -315 636 -315 -303 630 630 630 -301 -301 -297 -297 630 -297 -295 -291 -287 -281 624 -267 -267 624 -255 624 -247 616 -247 608 -245 -243 -241 -237 -237 -233 -231 -225 -221 -205 -201 604 -193 602 -185 602 600 -175 -167 -167 598 594 594 -163 -143 -143 588 584 -139 582 578 -133 -121 -117 -103 -95 -91 -89 -65 -65 -55 574 -49 572 -45 572 -39 572 -39 -35 -35 570 -31 -23 -19 560 -7 560 548 7 542 7 9 532 11 11 31 33 37 532 55 532 522 71 77 520 506 504 500 85 91 91 496 494 91 490 93 93 95 448 105 448 440 107 109 111 117 436 125 416 125 404 129 133 384 137 139 141 143 378 378 143 374 364 362 360 147 147 151 352 157 352 338 159 169 181 336 187 203 332 205 330 207 207 219 223 326 318 229 308 231 231 298 294 239 292 239 243 253 292 257 259 261 273 286 284 275 281 287 295 295 297 297 299 307 307 311 313 313 282 278 276 272 264 327 250 329 333 248 343 246 343 242 349 351 353 357 359 363 377 379 381 385 242 385 385 240 389 226 226 401 226 403 405 417 419 226 429 429 429 431 222 461 463 216 477 481 483 483 214 495 204 198 188 497 507 507 184 184 517 519 531 182 533 182 535 539 539 545 567 573 587 180 589 595 174 154 595 595 144 597 144 609 623 144 631 637 637 657 142 659 132 663 130 665 665 669 679 689 126 693 124 693 106 697 701 100 707 100 709 715 715 98 721 723 733 88 737 72 66 52 52 50 40 737 749 749 34 755 759 767 34 769 32 771 26 26 26 773 26 779 14 783 8 0 787 791 0 791 793 0 793 0 815 817 819 819 -10 819 819 819 821 821 823 827 -14 827 831 845 -38 859 861 -42 865 873 877 881 891 893 909 -44 -50 911 913 915 921 923 935 945 945 951 -50 -52 -54 953 -64 -66 -68 -80 959 961 -82 -84 -92 967 975 -98 -98 -106 -110 -110 -112 -122 -126 -140 -140 -144 -148 -154 -154 -154 -154 -162 -162 -168 -172 -182 -182 -204 -204 -208 -220 -220 -228 -232 -240 -248 -252 -254 -256 -256 -264 -266 -276 -280 -286 -286 -286 -294 -294 -294 -296 -300 -300 -300 -306 -310 -312 -314 -314 -320 -346 -346 -362 -362 -366 -368 -368 -370 -378 -380 -380 -384 -392 -392 -410 -410 -412 -424 -430 -430 -434 -434 -434 -436 -436 -438 -438 -442 -444 -444 -448 -462 -468 -480 -488 -494 -506 -512 -512 -518 -530 -530 -536 -536 -536 -546 -546 -548 -550 -554 -556 -560 -560 -578 -580 -590 -590 -596 -596 -598 -598 -610 -612 -616 -616 -618 -626 -630 -634 -636 -638 -640 -642 -644 -644 -644 -648 -652 -654 -664 -674 -674 -686 -698 -700 -702 -708 -714 -714 -716 -718 -722 -726 -728 -728 -740 -742 -744 -750 -752 -756 -762 -766 -766 -768 -770 -770 -770 -778 -778 -780 -782 -786 -786 -792 -792 -798 -806 -810 -812 -820 -828 -844 -858 -858 -858 -860 -872 -874 -880 -882 -882 -888 -888 -890 -896 -902 -910 -912 -924 -924 -936 -938 -956 -956 -968 -980 -980 -980 -982 -988 -990 -994 -996 -998 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-999 968 -991 -983 -977 -975 -973 952 -945 -935 -931 -919 -915 -905 -903 -885 -861 -847 940 -847 -841 938 -825 -821 -811 -809 936 924 902 -791 -779 -771 -767 884 884 880 -757 -735 -735 -717 -717 -715 -715 878 876 -699 -689 -665 -655 -655 -651 -581 -577 -567 -559 -555 -549 -547 -539 858 840 -515 -513 -507 -505 832 804 -477 -473 -467 -457 -443 802 -441 796 -407 -403 -389 792 -385 780 774 -383 -377 -325 -303 770 770 754 -281 742 -257 724 -251 -249 -237 -233 -227 -217 -211 -203 -195 712 704 -179 -177 -147 -119 -99 -77 -57 -49 700 682 670 -49 -39 -35 646 -31 640 -27 624 -5 15 23 31 620 33 588 580 35 53 578 65 560 65 67 71 75 77 79 546 522 506 91 95 103 504 109 117 119 121 478 125 143 145 155 462 163 165 167 175 458 456 454 452 181 189 195 215 229 231 231 257 448 257 448 265 273 432 283 420 325 341 408 343 365 365 397 399 399 411 415 423 423 429 386 435 382 380 437 443 364 364 455 467 364 354 479 330 495 505 505 306 537 539 278 561 563 567 567 573 595 619 258 623 625 647 665 693 699 713 719 721 258 733 737 749 757 819 252 839 238 853 855 224 863 867 871 182 883 893 897 182 182 903 176 150 903 913 136 919 931 933 128 965 967 118 975 993 108 102 98 88 60 42 30 18 14 12 -2 -10 -22 -22 -44 -48 -52 -52 -60 -70 -82 -88 -88 -110 -112 -116 -124 -130 -130 -132 -156 -174 -184 -204 -206 -210 -232 -234 -242 -252 -254 -264 -316 -330 -332 -338 -342 -348 -352 -354 -360 -364 -370 -372 -376 -380 -408 -428 -452 -462 -462 -462 -482 -486 -496 -506 -510 -516 -524 -526 -528 -532 -542 -572 -592 -604 -606 -624 -636 -642 -662 -670 -686 -686 -706 -728 -728 -736 -776 -788 -792 -792 -798 -804 -840 -902 -904 -910 -918 -952 -962 -962 -968 -978 -990 -994 -998 ];\r\nvexp=[-999 968 -991 -983 -977 -975 -973 952 -945 -935 -931 -919 -915 -905 -903 -885 -861 -847 940 -847 -841 938 -825 -821 -811 -809 936 924 902 -791 -779 -771 -767 884 884 880 -757 -735 -735 -717 -717 -715 -715 878 876 -699 -689 -665 -655 -655 -651 -581 -577 -567 -559 -555 -549 -547 -539 858 840 -515 -513 -507 -505 832 804 -477 -473 -467 -457 -443 802 -441 796 -407 -403 -389 792 -385 780 774 -383 -377 -325 -303 770 770 754 -281 742 -257 724 -251 -249 -237 -233 -227 -217 -211 -203 -195 712 704 -179 -177 -147 -119 -99 -77 -57 -49 700 682 670 -49 -39 -35 646 -31 640 -27 624 -5 15 23 31 620 33 588 580 35 53 578 65 560 65 67 71 75 77 79 546 522 506 91 95 103 504 109 117 119 121 478 125 143 145 155 462 163 165 167 175 458 456 454 452 181 189 195 215 229 231 231 257 448 257 448 265 273 432 283 420 325 341 408 343 365 365 397 399 399 411 415 423 423 429 386 435 382 380 437 443 364 364 455 467 364 354 479 330 495 505 505 306 537 539 278 561 563 567 567 573 595 619 258 623 625 647 665 693 699 713 719 721 258 733 737 749 757 819 252 839 238 853 855 224 863 867 871 182 883 893 897 182 182 903 176 150 903 913 136 919 931 933 128 965 967 118 975 993 108 102 98 88 60 42 30 18 14 12 -2 -10 -22 -22 -44 -48 -52 -52 -60 -70 -82 -88 -88 -110 -112 -116 -124 -130 -130 -132 -156 -174 -184 -204 -206 -210 -232 -234 -242 -252 -254 -264 -316 -330 -332 -338 -342 -348 -352 -354 -360 -364 -370 -372 -376 -380 -408 -428 -452 -462 -462 -462 -482 -486 -496 -506 -510 -516 -524 -526 -528 -532 -542 -572 -592 -604 -606 -624 -636 -642 -662 -670 -686 -686 -706 -728 -728 -736 -776 -788 -792 -792 -798 -804 -840 -902 -904 -910 -918 -952 -962 -962 -968 -978 -990 -994 -998 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[984 -997 -985 980 -983 978 -971 968 966 958 -969 952 -969 950 -963 944 -957 -955 936 -949 936 -949 -941 926 -935 -931 -917 -913 -913 -907 -903 -891 -861 924 922 918 916 912 902 894 -849 -847 -845 884 -837 878 878 -833 -827 876 862 836 834 832 822 822 -817 -809 -805 -803 -797 -791 804 786 784 -785 -773 778 -773 -763 -749 -749 -745 776 -741 -737 770 -737 -737 -735 -735 -731 -725 770 -723 -707 768 768 -707 762 760 -693 -683 -669 -667 750 746 740 -661 -649 -639 -637 -635 -609 730 728 -603 -595 728 -593 -589 -589 -585 -581 -581 728 -577 -567 -561 -547 724 -541 -539 -539 -539 -527 -525 -523 716 -517 -517 -515 714 702 702 676 -513 -487 -475 -471 672 -469 660 -467 652 -467 -467 634 632 -461 -457 -455 624 -455 -453 -451 624 618 -441 618 614 604 -439 -427 -413 -413 -409 -399 600 -399 594 -397 -387 594 -383 586 582 -377 580 580 -365 -359 -343 -337 578 -329 -327 -325 -323 -323 -315 -313 -301 -293 576 -275 576 572 572 572 -275 572 564 -273 -269 -259 560 -249 -249 560 -233 -233 552 -231 550 -219 -215 -215 -203 -197 -191 -189 -171 -169 -169 -163 -161 -159 -157 546 -155 -153 546 -151 -147 540 -147 -143 -143 -133 -131 -109 -109 -105 518 -105 -99 -99 -99 -99 -75 508 -73 -67 -63 -59 -55 508 -51 -39 -35 -35 506 504 -33 500 -21 -7 496 -7 3 7 11 11 486 482 11 13 15 27 33 35 35 37 37 41 53 55 65 65 77 97 101 113 117 121 476 125 129 472 133 135 468 143 143 151 462 151 151 167 462 462 167 167 167 169 462 189 189 191 193 460 193 195 207 215 217 221 225 225 231 239 460 239 249 448 446 253 265 265 273 283 442 297 299 301 440 307 311 436 436 434 319 325 331 428 418 331 416 333 339 339 349 416 349 359 359 363 363 363 377 385 395 399 399 403 407 417 408 423 431 435 402 400 445 451 453 396 465 467 386 374 364 477 481 364 497 507 507 511 360 511 511 523 531 551 569 577 344 583 587 340 589 330 318 316 595 312 609 310 310 609 609 611 611 611 615 619 621 623 631 637 308 284 284 278 272 272 262 254 641 651 667 252 252 244 669 671 683 242 685 242 234 234 689 234 693 228 693 701 713 224 220 214 713 715 721 725 212 733 735 735 735 210 206 206 737 741 741 198 196 745 753 763 767 196 771 196 188 186 184 182 771 182 783 789 803 811 817 817 823 835 837 839 182 839 841 847 849 853 182 853 861 182 180 865 869 873 875 879 180 176 881 881 891 897 176 174 172 172 897 897 911 921 923 160 156 923 152 144 144 931 943 138 134 122 118 114 112 949 112 949 112 949 953 959 959 959 961 961 104 971 92 90 88 975 979 991 993 80 78 72 72 70 70 66 58 46 40 36 28 28 14 10 2 0 0 0 0 0 -2 -10 -22 -28 -32 -40 -40 -44 -54 -54 -66 -76 -78 -82 -84 -94 -110 -126 -134 -140 -146 -148 -154 -154 -162 -166 -168 -174 -182 -182 -184 -196 -196 -202 -202 -204 -206 -206 -208 -216 -220 -220 -232 -234 -242 -244 -254 -270 -286 -286 -288 -292 -294 -300 -306 -314 -322 -328 -336 -336 -340 -352 -360 -366 -368 -368 -374 -378 -392 -396 -396 -396 -396 -404 -404 -408 -416 -420 -422 -422 -424 -424 -426 -426 -432 -434 -436 -440 -440 -442 -444 -448 -448 -450 -460 -462 -464 -472 -474 -476 -480 -494 -494 -504 -506 -514 -516 -520 -520 -542 -542 -562 -564 -564 -572 -572 -572 -574 -584 -590 -590 -594 -600 -608 -616 -616 -616 -618 -622 -624 -626 -628 -654 -656 -664 -664 -676 -680 -682 -686 -700 -700 -702 -704 -704 -712 -722 -728 -728 -728 -730 -742 -742 -758 -768 -770 -778 -780 -780 -780 -782 -782 -784 -784 -786 -790 -792 -792 -812 -816 -818 -822 -834 -856 -858 -858 -866 -870 -870 -876 -880 -884 -886 -894 -902 -916 -916 -918 -918 -924 -924 -926 -926 -928 -936 -940 -948 -952 -952 -956 -962 -966 -966 -968 -976 -988 -988 -990 -992 -998 ];\r\nvexp=[984 -997 -985 980 -983 978 -971 968 966 958 -969 952 -969 950 -963 944 -957 -955 936 -949 936 -949 -941 926 -935 -931 -917 -913 -913 -907 -903 -891 -861 924 922 918 916 912 902 894 -849 -847 -845 884 -837 878 878 -833 -827 876 862 836 834 832 822 822 -817 -809 -805 -803 -797 -791 804 786 784 -785 -773 778 -773 -763 -749 -749 -745 776 -741 -737 770 -737 -737 -735 -735 -731 -725 770 -723 -707 768 768 -707 762 760 -693 -683 -669 -667 750 746 740 -661 -649 -639 -637 -635 -609 730 728 -603 -595 728 -593 -589 -589 -585 -581 -581 728 -577 -567 -561 -547 724 -541 -539 -539 -539 -527 -525 -523 716 -517 -517 -515 714 702 702 676 -513 -487 -475 -471 672 -469 660 -467 652 -467 -467 634 632 -461 -457 -455 624 -455 -453 -451 624 618 -441 618 614 604 -439 -427 -413 -413 -409 -399 600 -399 594 -397 -387 594 -383 586 582 -377 580 580 -365 -359 -343 -337 578 -329 -327 -325 -323 -323 -315 -313 -301 -293 576 -275 576 572 572 572 -275 572 564 -273 -269 -259 560 -249 -249 560 -233 -233 552 -231 550 -219 -215 -215 -203 -197 -191 -189 -171 -169 -169 -163 -161 -159 -157 546 -155 -153 546 -151 -147 540 -147 -143 -143 -133 -131 -109 -109 -105 518 -105 -99 -99 -99 -99 -75 508 -73 -67 -63 -59 -55 508 -51 -39 -35 -35 506 504 -33 500 -21 -7 496 -7 3 7 11 11 486 482 11 13 15 27 33 35 35 37 37 41 53 55 65 65 77 97 101 113 117 121 476 125 129 472 133 135 468 143 143 151 462 151 151 167 462 462 167 167 167 169 462 189 189 191 193 460 193 195 207 215 217 221 225 225 231 239 460 239 249 448 446 253 265 265 273 283 442 297 299 301 440 307 311 436 436 434 319 325 331 428 418 331 416 333 339 339 349 416 349 359 359 363 363 363 377 385 395 399 399 403 407 417 408 423 431 435 402 400 445 451 453 396 465 467 386 374 364 477 481 364 497 507 507 511 360 511 511 523 531 551 569 577 344 583 587 340 589 330 318 316 595 312 609 310 310 609 609 611 611 611 615 619 621 623 631 637 308 284 284 278 272 272 262 254 641 651 667 252 252 244 669 671 683 242 685 242 234 234 689 234 693 228 693 701 713 224 220 214 713 715 721 725 212 733 735 735 735 210 206 206 737 741 741 198 196 745 753 763 767 196 771 196 188 186 184 182 771 182 783 789 803 811 817 817 823 835 837 839 182 839 841 847 849 853 182 853 861 182 180 865 869 873 875 879 180 176 881 881 891 897 176 174 172 172 897 897 911 921 923 160 156 923 152 144 144 931 943 138 134 122 118 114 112 949 112 949 112 949 953 959 959 959 961 961 104 971 92 90 88 975 979 991 993 80 78 72 72 70 70 66 58 46 40 36 28 28 14 10 2 0 0 0 0 0 -2 -10 -22 -28 -32 -40 -40 -44 -54 -54 -66 -76 -78 -82 -84 -94 -110 -126 -134 -140 -146 -148 -154 -154 -162 -166 -168 -174 -182 -182 -184 -196 -196 -202 -202 -204 -206 -206 -208 -216 -220 -220 -232 -234 -242 -244 -254 -270 -286 -286 -288 -292 -294 -300 -306 -314 -322 -328 -336 -336 -340 -352 -360 -366 -368 -368 -374 -378 -392 -396 -396 -396 -396 -404 -404 -408 -416 -420 -422 -422 -424 -424 -426 -426 -432 -434 -436 -440 -440 -442 -444 -448 -448 -450 -460 -462 -464 -472 -474 -476 -480 -494 -494 -504 -506 -514 -516 -520 -520 -542 -542 -562 -564 -564 -572 -572 -572 -574 -584 -590 -590 -594 -600 -608 -616 -616 -616 -618 -622 -624 -626 -628 -654 -656 -664 -664 -676 -680 -682 -686 -700 -700 -702 -704 -704 -712 -722 -728 -728 -728 -730 -742 -742 -758 -768 -770 -778 -780 -780 -780 -782 -782 -784 -784 -786 -790 -792 -792 -812 -816 -818 -822 -834 -856 -858 -858 -866 -870 -870 -876 -880 -884 -886 -894 -902 -916 -916 -918 -918 -924 -924 -926 -926 -928 -936 -940 -948 -952 -952 -956 -962 -966 -966 -968 -976 -988 -988 -990 -992 -998 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-891 962 792 -851 784 730 -789 -781 662 662 -765 -737 -713 644 -567 -525 -465 534 -451 526 454 -427 -399 -173 -15 454 -1 77 378 175 202 185 170 275 313 367 82 407 459 473 507 621 691 707 731 805 825 935 981 52 48 46 -10 -66 -162 -168 -192 -196 -218 -232 -262 -280 -288 -332 -358 -402 -438 -448 -490 -502 -516 -572 -590 -598 -832 -834 ];\r\nvexp=[-891 962 792 -851 784 730 -789 -781 662 662 -765 -737 -713 644 -567 -525 -465 534 -451 526 454 -427 -399 -173 -15 454 -1 77 378 175 202 185 170 275 313 367 82 407 459 473 507 621 691 707 731 805 825 935 981 52 48 46 -10 -66 -162 -168 -192 -196 -218 -232 -262 -280 -288 -332 -358 -402 -438 -448 -490 -502 -516 -572 -590 -598 -832 -834 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[990 988 -999 -995 -993 -993 -991 976 970 958 -989 -973 946 -965 -963 -957 -957 -941 938 -939 -937 -937 -913 -907 -901 938 938 924 -901 -893 924 -891 -889 918 -869 912 910 -869 -869 -845 -827 -811 -793 -741 906 868 -715 -715 844 836 -711 -709 812 -693 -693 -687 -665 808 786 774 -665 -663 -663 -615 -603 -593 -589 770 762 -587 756 -585 -581 -565 -565 -561 -555 -555 -553 -541 706 704 -539 -505 694 -503 -493 -455 -451 672 -427 -399 670 -385 658 -373 -359 656 -339 -335 654 -333 -327 636 -325 -313 -297 -297 -273 616 -263 -253 614 -251 604 590 -219 -209 550 -207 -203 -187 -185 -181 -177 -167 -159 546 -157 -145 -137 544 -135 -105 -77 -71 -67 -65 -41 540 -39 532 528 -37 526 -33 -31 -23 -21 -13 524 11 15 19 520 506 27 37 41 43 494 77 488 89 101 105 127 486 129 131 472 468 458 133 133 139 450 139 171 171 428 175 428 189 203 219 410 237 251 396 255 265 271 273 273 273 293 392 297 376 299 301 315 315 351 373 374 377 377 379 385 387 389 397 407 374 368 409 411 425 433 439 449 451 481 507 535 342 537 553 338 338 575 322 312 577 577 581 583 585 308 306 603 292 264 619 248 242 228 224 623 637 645 220 661 663 208 671 681 204 186 693 693 701 719 721 178 170 737 749 154 763 154 767 154 769 789 154 144 142 130 793 793 795 803 803 805 815 817 819 821 120 823 120 825 86 86 78 74 72 825 62 839 841 861 861 861 873 875 56 875 42 897 935 935 949 12 949 955 955 8 975 979 0 0 0 0 0 -52 -56 -60 -70 -70 -72 -94 -96 -98 -110 -110 -114 -116 -126 -126 -136 -158 -160 -176 -178 -182 -188 -196 -200 -206 -208 -208 -222 -224 -228 -276 -278 -296 -302 -316 -318 -324 -334 -346 -350 -350 -358 -364 -368 -370 -378 -378 -378 -386 -404 -416 -416 -418 -420 -432 -448 -462 -480 -482 -490 -502 -514 -516 -520 -546 -546 -546 -550 -564 -570 -570 -572 -574 -580 -600 -602 -624 -626 -626 -634 -650 -658 -658 -662 -686 -712 -716 -720 -726 -730 -732 -756 -756 -770 -780 -790 -798 -802 -824 -836 -882 -894 -906 -914 -914 -932 -950 -952 -966 -968 -978 -978 -990 -990 ];\r\nvexp=[990 988 -999 -995 -993 -993 -991 976 970 958 -989 -973 946 -965 -963 -957 -957 -941 938 -939 -937 -937 -913 -907 -901 938 938 924 -901 -893 924 -891 -889 918 -869 912 910 -869 -869 -845 -827 -811 -793 -741 906 868 -715 -715 844 836 -711 -709 812 -693 -693 -687 -665 808 786 774 -665 -663 -663 -615 -603 -593 -589 770 762 -587 756 -585 -581 -565 -565 -561 -555 -555 -553 -541 706 704 -539 -505 694 -503 -493 -455 -451 672 -427 -399 670 -385 658 -373 -359 656 -339 -335 654 -333 -327 636 -325 -313 -297 -297 -273 616 -263 -253 614 -251 604 590 -219 -209 550 -207 -203 -187 -185 -181 -177 -167 -159 546 -157 -145 -137 544 -135 -105 -77 -71 -67 -65 -41 540 -39 532 528 -37 526 -33 -31 -23 -21 -13 524 11 15 19 520 506 27 37 41 43 494 77 488 89 101 105 127 486 129 131 472 468 458 133 133 139 450 139 171 171 428 175 428 189 203 219 410 237 251 396 255 265 271 273 273 273 293 392 297 376 299 301 315 315 351 373 374 377 377 379 385 387 389 397 407 374 368 409 411 425 433 439 449 451 481 507 535 342 537 553 338 338 575 322 312 577 577 581 583 585 308 306 603 292 264 619 248 242 228 224 623 637 645 220 661 663 208 671 681 204 186 693 693 701 719 721 178 170 737 749 154 763 154 767 154 769 789 154 144 142 130 793 793 795 803 803 805 815 817 819 821 120 823 120 825 86 86 78 74 72 825 62 839 841 861 861 861 873 875 56 875 42 897 935 935 949 12 949 955 955 8 975 979 0 0 0 0 0 -52 -56 -60 -70 -70 -72 -94 -96 -98 -110 -110 -114 -116 -126 -126 -136 -158 -160 -176 -178 -182 -188 -196 -200 -206 -208 -208 -222 -224 -228 -276 -278 -296 -302 -316 -318 -324 -334 -346 -350 -350 -358 -364 -368 -370 -378 -378 -378 -386 -404 -416 -416 -418 -420 -432 -448 -462 -480 -482 -490 -502 -514 -516 -520 -546 -546 -546 -550 -564 -570 -570 -572 -574 -580 -600 -602 -624 -626 -626 -634 -650 -658 -658 -662 -686 -712 -716 -720 -726 -730 -732 -756 -756 -770 -780 -790 -798 -802 -824 -836 -882 -894 -906 -914 -914 -932 -950 -952 -966 -968 -978 -978 -990 -990 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-997 -995 994 -981 -977 -975 -971 988 -969 -931 -929 986 968 -903 -903 956 -897 -895 -887 -883 948 -879 -871 -871 -865 -863 946 -863 -861 -861 944 -853 934 924 -853 914 914 -847 -845 910 -829 898 -819 890 -807 -807 888 880 -803 -797 880 874 868 -793 860 842 -791 -783 840 -771 838 -767 -765 832 826 -763 826 -759 814 -759 -753 -733 812 -733 -729 -727 -727 -723 804 -715 802 -715 -707 798 -693 -671 -669 -669 -665 792 -663 -663 -663 -663 790 -653 -643 -635 -615 778 774 770 752 -611 -587 -579 746 -569 -569 -561 740 -555 -555 -553 -539 740 -537 -523 728 -517 -513 -509 -505 -497 -497 -493 -483 728 -479 -479 -475 -475 -467 722 722 -439 -431 -429 -425 706 -413 -407 704 702 690 678 676 -407 674 -393 -385 -385 672 670 -385 664 -383 -377 -371 -367 -355 -353 -353 -351 -347 658 -345 656 -327 652 -325 -323 650 616 -319 -315 616 604 602 602 -315 596 594 -313 572 572 566 -311 562 -295 -287 -285 -285 -275 -273 -273 -271 -261 -259 -259 -253 -249 550 -239 542 538 530 -233 -231 -231 -231 526 -217 520 -203 518 -189 518 -187 -183 516 -177 510 508 506 -173 -171 -145 506 504 504 -143 -143 494 492 482 -133 -129 478 474 -129 -125 -113 -111 -99 -93 -91 -81 472 -81 -77 -75 -63 -53 -45 -39 468 462 -39 -39 -13 7 9 13 21 23 35 43 452 43 450 49 49 51 55 67 71 448 73 77 77 81 91 446 93 97 101 105 115 119 121 125 428 151 422 151 171 173 181 187 420 189 195 410 400 392 197 207 211 211 392 221 221 376 376 223 225 364 229 231 231 342 235 241 340 241 336 332 245 326 247 253 322 253 312 255 308 261 269 306 279 291 286 309 286 315 323 266 258 323 329 341 343 256 347 357 379 381 385 397 401 403 403 407 421 427 244 427 429 242 429 433 433 238 433 437 441 234 220 208 443 208 196 451 455 459 467 469 186 182 178 469 475 483 483 505 511 513 539 539 557 559 561 565 168 168 567 166 156 575 156 585 593 154 150 593 148 144 136 130 595 597 597 609 613 617 120 633 637 639 647 661 671 118 114 112 679 110 679 679 110 681 683 687 106 98 98 693 693 695 98 76 699 72 699 713 715 721 64 727 62 731 733 62 56 735 739 741 745 52 749 749 52 28 22 20 759 14 759 763 8 763 765 767 8 6 4 0 0 0 0 0 0 767 767 785 791 801 -2 803 805 -8 -22 819 -24 825 833 -40 839 845 -44 847 847 847 -60 847 865 -64 865 871 909 -84 913 913 915 -84 919 -108 923 -110 929 933 933 -112 939 -114 949 963 965 -142 967 969 973 -144 -150 -156 981 983 987 989 993 995 995 -156 -164 -170 -174 -182 -188 -188 -208 -220 -240 -244 -252 -254 -262 -264 -268 -274 -280 -284 -286 -294 -318 -322 -330 -336 -338 -348 -350 -350 -356 -358 -370 -374 -384 -422 -422 -428 -432 -434 -434 -436 -436 -438 -440 -440 -458 -476 -476 -478 -482 -494 -494 -504 -504 -504 -506 -508 -512 -524 -526 -526 -528 -530 -532 -536 -538 -562 -564 -566 -570 -574 -580 -582 -592 -596 -596 -612 -614 -614 -616 -616 -618 -620 -620 -630 -632 -636 -642 -646 -648 -652 -656 -658 -658 -660 -664 -672 -672 -672 -690 -694 -714 -716 -730 -742 -748 -750 -768 -770 -770 -774 -778 -790 -794 -798 -806 -808 -812 -814 -822 -826 -830 -850 -858 -858 -878 -888 -892 -896 -900 -906 -910 -910 -910 -912 -922 -922 -926 -928 -950 -952 -976 -986 -986 ];\r\nvexp=[-997 -995 994 -981 -977 -975 -971 988 -969 -931 -929 986 968 -903 -903 956 -897 -895 -887 -883 948 -879 -871 -871 -865 -863 946 -863 -861 -861 944 -853 934 924 -853 914 914 -847 -845 910 -829 898 -819 890 -807 -807 888 880 -803 -797 880 874 868 -793 860 842 -791 -783 840 -771 838 -767 -765 832 826 -763 826 -759 814 -759 -753 -733 812 -733 -729 -727 -727 -723 804 -715 802 -715 -707 798 -693 -671 -669 -669 -665 792 -663 -663 -663 -663 790 -653 -643 -635 -615 778 774 770 752 -611 -587 -579 746 -569 -569 -561 740 -555 -555 -553 -539 740 -537 -523 728 -517 -513 -509 -505 -497 -497 -493 -483 728 -479 -479 -475 -475 -467 722 722 -439 -431 -429 -425 706 -413 -407 704 702 690 678 676 -407 674 -393 -385 -385 672 670 -385 664 -383 -377 -371 -367 -355 -353 -353 -351 -347 658 -345 656 -327 652 -325 -323 650 616 -319 -315 616 604 602 602 -315 596 594 -313 572 572 566 -311 562 -295 -287 -285 -285 -275 -273 -273 -271 -261 -259 -259 -253 -249 550 -239 542 538 530 -233 -231 -231 -231 526 -217 520 -203 518 -189 518 -187 -183 516 -177 510 508 506 -173 -171 -145 506 504 504 -143 -143 494 492 482 -133 -129 478 474 -129 -125 -113 -111 -99 -93 -91 -81 472 -81 -77 -75 -63 -53 -45 -39 468 462 -39 -39 -13 7 9 13 21 23 35 43 452 43 450 49 49 51 55 67 71 448 73 77 77 81 91 446 93 97 101 105 115 119 121 125 428 151 422 151 171 173 181 187 420 189 195 410 400 392 197 207 211 211 392 221 221 376 376 223 225 364 229 231 231 342 235 241 340 241 336 332 245 326 247 253 322 253 312 255 308 261 269 306 279 291 286 309 286 315 323 266 258 323 329 341 343 256 347 357 379 381 385 397 401 403 403 407 421 427 244 427 429 242 429 433 433 238 433 437 441 234 220 208 443 208 196 451 455 459 467 469 186 182 178 469 475 483 483 505 511 513 539 539 557 559 561 565 168 168 567 166 156 575 156 585 593 154 150 593 148 144 136 130 595 597 597 609 613 617 120 633 637 639 647 661 671 118 114 112 679 110 679 679 110 681 683 687 106 98 98 693 693 695 98 76 699 72 699 713 715 721 64 727 62 731 733 62 56 735 739 741 745 52 749 749 52 28 22 20 759 14 759 763 8 763 765 767 8 6 4 0 0 0 0 0 0 767 767 785 791 801 -2 803 805 -8 -22 819 -24 825 833 -40 839 845 -44 847 847 847 -60 847 865 -64 865 871 909 -84 913 913 915 -84 919 -108 923 -110 929 933 933 -112 939 -114 949 963 965 -142 967 969 973 -144 -150 -156 981 983 987 989 993 995 995 -156 -164 -170 -174 -182 -188 -188 -208 -220 -240 -244 -252 -254 -262 -264 -268 -274 -280 -284 -286 -294 -318 -322 -330 -336 -338 -348 -350 -350 -356 -358 -370 -374 -384 -422 -422 -428 -432 -434 -434 -436 -436 -438 -440 -440 -458 -476 -476 -478 -482 -494 -494 -504 -504 -504 -506 -508 -512 -524 -526 -526 -528 -530 -532 -536 -538 -562 -564 -566 -570 -574 -580 -582 -592 -596 -596 -612 -614 -614 -616 -616 -618 -620 -620 -630 -632 -636 -642 -646 -648 -652 -656 -658 -658 -660 -664 -672 -672 -672 -690 -694 -714 -716 -730 -742 -748 -750 -768 -770 -770 -774 -778 -790 -794 -798 -806 -808 -812 -814 -822 -826 -830 -850 -858 -858 -878 -888 -892 -896 -900 -906 -910 -910 -910 -912 -922 -922 -926 -928 -950 -952 -976 -986 -986 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-999 -993 -987 -983 -979 998 -975 -975 -973 994 -953 -951 -949 -947 -943 -935 -925 -923 -919 994 -919 -909 -901 986 970 970 966 -897 962 -897 952 -891 950 -885 938 -885 -877 924 916 -869 916 916 906 906 -855 -847 902 -845 -825 -819 898 -819 -815 -813 -813 -805 -803 -799 -797 892 -793 888 -791 -781 884 -779 878 -777 876 -773 -763 -763 872 870 -759 -757 870 862 -753 -749 -747 858 -745 854 -741 -737 -737 -735 -731 -727 -727 -721 -715 854 -715 -713 836 -711 -709 -709 -699 832 824 -693 -689 -689 822 818 816 -689 -689 -687 -683 -679 -677 812 -671 -671 802 -667 798 798 796 786 -667 -643 784 -637 -637 784 -637 -637 782 774 -635 -627 -615 -611 -609 -595 770 -595 766 -585 760 758 754 -573 -559 -559 -547 -531 744 -517 -517 -515 -511 744 -505 738 -495 -493 738 -455 -455 -439 738 -439 -435 734 -431 734 -429 -423 728 728 728 -411 -407 728 -403 -403 728 -401 706 -401 704 -395 -389 700 -385 700 -375 694 -375 -373 -369 692 -359 -351 -351 -341 -337 -335 -329 -327 -309 -301 -297 -297 -295 -289 686 -285 676 -281 -275 -273 674 670 668 -253 658 -253 -247 656 -241 -237 650 -235 -235 648 -227 644 644 -223 -221 -211 -209 638 626 -195 -189 -175 -169 624 624 622 -163 616 -155 -155 616 602 -143 -143 -137 -115 -99 -99 -95 -91 -89 594 -85 -75 -73 -63 -55 592 -49 592 572 -39 -37 572 570 -33 -23 568 -21 -3 564 -1 564 -1 562 560 558 -1 546 13 13 542 19 27 31 49 532 69 77 83 528 85 91 91 97 101 105 498 119 125 127 498 129 131 137 139 143 145 149 151 165 494 165 169 175 195 201 490 203 209 486 484 211 211 480 217 221 225 476 231 239 239 239 472 464 239 245 253 464 259 462 259 462 273 462 273 279 287 287 291 291 307 311 462 313 317 319 321 325 331 341 343 351 359 365 369 373 375 462 377 448 385 385 448 389 440 391 438 407 411 413 429 435 432 441 441 445 447 432 428 451 451 457 418 459 467 471 416 414 475 386 483 485 495 495 497 499 507 517 382 380 521 525 368 360 356 525 527 336 318 531 531 312 308 292 286 539 268 266 539 559 567 571 264 262 260 571 577 581 585 593 595 252 595 605 609 611 611 611 252 613 248 621 244 242 238 621 623 623 623 234 627 234 627 627 234 639 234 643 645 647 649 649 651 651 226 653 675 679 224 685 689 220 689 689 697 214 705 705 206 707 709 711 715 725 200 735 735 198 737 741 196 196 749 753 196 753 759 194 771 777 777 787 789 178 799 803 811 813 176 174 815 815 158 154 819 827 827 833 841 845 847 847 154 851 851 859 154 861 861 863 867 154 875 154 885 887 891 154 895 154 895 907 909 913 915 154 917 148 921 923 136 931 130 937 130 118 949 957 957 961 112 963 110 110 971 979 102 979 98 98 92 88 985 987 84 84 76 66 56 46 42 42 42 40 28 24 14 0 0 0 0 -2 -6 -26 -26 -26 -34 -34 -42 -42 -42 -44 -52 -58 -92 -94 -98 -100 -108 -110 -120 -126 -126 -134 -142 -144 -146 -150 -154 -154 -154 -154 -156 -156 -158 -174 -176 -182 -196 -228 -252 -252 -260 -264 -266 -266 -278 -278 -282 -286 -290 -296 -304 -310 -312 -316 -320 -326 -330 -334 -340 -342 -346 -348 -352 -362 -364 -374 -378 -382 -386 -388 -390 -392 -396 -404 -406 -406 -412 -414 -418 -426 -428 -432 -438 -442 -450 -462 -464 -468 -468 -472 -476 -486 -490 -492 -518 -520 -526 -526 -532 -532 -534 -546 -546 -546 -546 -548 -550 -560 -566 -572 -578 -580 -596 -596 -598 -614 -616 -620 -622 -640 -660 -664 -670 -672 -676 -686 -696 -698 -698 -702 -708 -726 -728 -728 -742 -750 -752 -754 -754 -764 -770 -770 -780 -784 -788 -792 -794 -806 -806 -818 -820 -822 -822 -824 -830 -852 -862 -864 -868 -868 -868 -872 -878 -896 -902 -906 -910 -910 -914 -922 -924 -924 -924 -924 -926 -936 -936 -938 -940 -956 -958 -962 -968 -988 -994 -994 -994 -994 -1000 ];\r\nvexp=[-999 -993 -987 -983 -979 998 -975 -975 -973 994 -953 -951 -949 -947 -943 -935 -925 -923 -919 994 -919 -909 -901 986 970 970 966 -897 962 -897 952 -891 950 -885 938 -885 -877 924 916 -869 916 916 906 906 -855 -847 902 -845 -825 -819 898 -819 -815 -813 -813 -805 -803 -799 -797 892 -793 888 -791 -781 884 -779 878 -777 876 -773 -763 -763 872 870 -759 -757 870 862 -753 -749 -747 858 -745 854 -741 -737 -737 -735 -731 -727 -727 -721 -715 854 -715 -713 836 -711 -709 -709 -699 832 824 -693 -689 -689 822 818 816 -689 -689 -687 -683 -679 -677 812 -671 -671 802 -667 798 798 796 786 -667 -643 784 -637 -637 784 -637 -637 782 774 -635 -627 -615 -611 -609 -595 770 -595 766 -585 760 758 754 -573 -559 -559 -547 -531 744 -517 -517 -515 -511 744 -505 738 -495 -493 738 -455 -455 -439 738 -439 -435 734 -431 734 -429 -423 728 728 728 -411 -407 728 -403 -403 728 -401 706 -401 704 -395 -389 700 -385 700 -375 694 -375 -373 -369 692 -359 -351 -351 -341 -337 -335 -329 -327 -309 -301 -297 -297 -295 -289 686 -285 676 -281 -275 -273 674 670 668 -253 658 -253 -247 656 -241 -237 650 -235 -235 648 -227 644 644 -223 -221 -211 -209 638 626 -195 -189 -175 -169 624 624 622 -163 616 -155 -155 616 602 -143 -143 -137 -115 -99 -99 -95 -91 -89 594 -85 -75 -73 -63 -55 592 -49 592 572 -39 -37 572 570 -33 -23 568 -21 -3 564 -1 564 -1 562 560 558 -1 546 13 13 542 19 27 31 49 532 69 77 83 528 85 91 91 97 101 105 498 119 125 127 498 129 131 137 139 143 145 149 151 165 494 165 169 175 195 201 490 203 209 486 484 211 211 480 217 221 225 476 231 239 239 239 472 464 239 245 253 464 259 462 259 462 273 462 273 279 287 287 291 291 307 311 462 313 317 319 321 325 331 341 343 351 359 365 369 373 375 462 377 448 385 385 448 389 440 391 438 407 411 413 429 435 432 441 441 445 447 432 428 451 451 457 418 459 467 471 416 414 475 386 483 485 495 495 497 499 507 517 382 380 521 525 368 360 356 525 527 336 318 531 531 312 308 292 286 539 268 266 539 559 567 571 264 262 260 571 577 581 585 593 595 252 595 605 609 611 611 611 252 613 248 621 244 242 238 621 623 623 623 234 627 234 627 627 234 639 234 643 645 647 649 649 651 651 226 653 675 679 224 685 689 220 689 689 697 214 705 705 206 707 709 711 715 725 200 735 735 198 737 741 196 196 749 753 196 753 759 194 771 777 777 787 789 178 799 803 811 813 176 174 815 815 158 154 819 827 827 833 841 845 847 847 154 851 851 859 154 861 861 863 867 154 875 154 885 887 891 154 895 154 895 907 909 913 915 154 917 148 921 923 136 931 130 937 130 118 949 957 957 961 112 963 110 110 971 979 102 979 98 98 92 88 985 987 84 84 76 66 56 46 42 42 42 40 28 24 14 0 0 0 0 -2 -6 -26 -26 -26 -34 -34 -42 -42 -42 -44 -52 -58 -92 -94 -98 -100 -108 -110 -120 -126 -126 -134 -142 -144 -146 -150 -154 -154 -154 -154 -156 -156 -158 -174 -176 -182 -196 -228 -252 -252 -260 -264 -266 -266 -278 -278 -282 -286 -290 -296 -304 -310 -312 -316 -320 -326 -330 -334 -340 -342 -346 -348 -352 -362 -364 -374 -378 -382 -386 -388 -390 -392 -396 -404 -406 -406 -412 -414 -418 -426 -428 -432 -438 -442 -450 -462 -464 -468 -468 -472 -476 -486 -490 -492 -518 -520 -526 -526 -532 -532 -534 -546 -546 -546 -546 -548 -550 -560 -566 -572 -578 -580 -596 -596 -598 -614 -616 -620 -622 -640 -660 -664 -670 -672 -676 -686 -696 -698 -698 -702 -708 -726 -728 -728 -742 -750 -752 -754 -754 -764 -770 -770 -780 -784 -788 -792 -794 -806 -806 -818 -820 -822 -822 -824 -830 -852 -862 -864 -868 -868 -868 -872 -878 -896 -902 -906 -910 -910 -914 -922 -924 -924 -924 -924 -926 -936 -936 -938 -940 -956 -958 -962 -968 -988 -994 -994 -994 -994 -1000 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[994 -969 988 986 -957 -931 966 -889 -889 -883 -881 -877 -877 960 -873 914 -861 912 -847 -845 -841 -835 900 -805 -803 -793 -793 886 864 -785 -765 -765 -737 -713 -713 -701 -661 -655 -621 840 -619 -615 -599 832 -595 -567 -553 828 -541 -497 -467 -455 -429 -419 -415 -387 794 -377 792 -375 -371 -365 -337 -333 -331 -321 -285 780 -285 762 -271 -263 758 -259 -257 732 728 -249 -235 -231 -231 -189 726 -189 -181 -175 698 -153 -149 696 684 -127 672 -119 -115 652 -115 -113 644 -93 -91 608 -91 602 -77 -49 -45 594 -35 -5 562 -3 11 540 538 518 506 41 43 506 57 111 121 474 123 161 177 191 203 207 217 217 247 259 269 273 468 464 442 297 303 319 321 333 343 349 420 418 353 410 397 406 427 384 427 429 384 455 455 467 378 370 493 505 364 525 364 533 348 336 539 541 583 589 611 330 316 619 627 647 651 681 717 719 308 725 739 757 767 282 777 274 779 797 847 264 262 252 853 873 242 933 947 969 971 979 232 208 182 999 999 174 170 138 132 126 110 108 98 98 70 44 44 22 4 0 0 0 -2 -22 -58 -66 -74 -94 -116 -148 -158 -182 -210 -214 -222 -226 -238 -248 -252 -256 -286 -310 -320 -336 -342 -370 -388 -402 -402 -416 -440 -440 -458 -460 -460 -490 -504 -514 -528 -560 -572 -588 -596 -600 -616 -638 -642 -654 -660 -676 -684 -702 -706 -708 -720 -726 -742 -746 -766 -786 -812 -832 -840 -846 -864 -910 -912 -916 -948 -966 -982 -986 -992 ];\r\nvexp=[994 -969 988 986 -957 -931 966 -889 -889 -883 -881 -877 -877 960 -873 914 -861 912 -847 -845 -841 -835 900 -805 -803 -793 -793 886 864 -785 -765 -765 -737 -713 -713 -701 -661 -655 -621 840 -619 -615 -599 832 -595 -567 -553 828 -541 -497 -467 -455 -429 -419 -415 -387 794 -377 792 -375 -371 -365 -337 -333 -331 -321 -285 780 -285 762 -271 -263 758 -259 -257 732 728 -249 -235 -231 -231 -189 726 -189 -181 -175 698 -153 -149 696 684 -127 672 -119 -115 652 -115 -113 644 -93 -91 608 -91 602 -77 -49 -45 594 -35 -5 562 -3 11 540 538 518 506 41 43 506 57 111 121 474 123 161 177 191 203 207 217 217 247 259 269 273 468 464 442 297 303 319 321 333 343 349 420 418 353 410 397 406 427 384 427 429 384 455 455 467 378 370 493 505 364 525 364 533 348 336 539 541 583 589 611 330 316 619 627 647 651 681 717 719 308 725 739 757 767 282 777 274 779 797 847 264 262 252 853 873 242 933 947 969 971 979 232 208 182 999 999 174 170 138 132 126 110 108 98 98 70 44 44 22 4 0 0 0 -2 -22 -58 -66 -74 -94 -116 -148 -158 -182 -210 -214 -222 -226 -238 -248 -252 -256 -286 -310 -320 -336 -342 -370 -388 -402 -402 -416 -440 -440 -458 -460 -460 -490 -504 -514 -528 -560 -572 -588 -596 -600 -616 -638 -642 -654 -660 -676 -684 -702 -706 -708 -720 -726 -742 -746 -766 -786 -812 -832 -840 -846 -864 -910 -912 -916 -948 -966 -982 -986 -992 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-991 -989 998 -987 -983 -973 996 982 980 -971 978 -965 -959 974 -957 -951 -947 966 -941 966 966 962 -931 -931 -909 -903 -895 -893 -889 -885 -883 944 -883 936 -869 912 -845 896 894 -845 -837 -833 -829 886 882 -817 880 -803 872 -791 -791 -777 -769 -765 -759 -753 870 -743 -729 864 -717 864 854 -711 -707 850 -695 -689 -683 840 826 -665 -661 -659 812 798 -659 766 -657 760 -653 -637 756 -631 -627 -621 -611 748 -609 -605 -605 -601 -597 -589 -573 -567 -541 -539 -539 740 730 -539 -535 -507 -483 728 -475 -469 714 -455 -453 710 704 -451 -447 -433 -433 -431 -421 -417 -417 686 -405 682 -403 680 -399 678 -391 672 -387 670 668 -385 660 -381 -381 636 -377 -367 -363 -353 -331 626 618 -325 -303 616 -299 -297 -291 584 -281 -277 578 578 572 570 -245 -243 -239 -231 -223 -221 -209 570 -205 -201 -185 -183 -175 -165 -163 -159 -157 568 -147 564 -139 562 -125 548 -117 544 542 -103 -101 528 -95 524 -95 -79 -71 -71 -61 -49 520 -41 -37 520 518 -33 -27 502 -25 490 -21 482 474 -17 474 -17 -9 -7 -7 7 13 15 446 17 23 446 31 35 440 35 39 45 49 49 426 59 418 406 67 91 404 93 103 388 105 107 113 388 117 119 121 123 131 141 143 143 161 173 173 179 378 195 358 197 203 231 257 356 263 271 273 275 277 287 297 338 301 303 338 305 323 325 336 330 369 381 399 322 308 407 308 413 308 296 419 419 296 425 439 292 445 280 451 451 260 451 453 246 469 469 469 483 246 495 242 501 242 511 517 232 212 529 539 206 180 178 539 178 549 549 553 559 561 561 565 567 573 585 585 595 607 623 633 641 657 683 689 719 727 733 735 741 759 168 779 783 166 164 791 807 817 819 823 861 865 869 869 162 903 907 138 907 913 913 917 923 132 132 941 130 953 957 126 122 965 971 981 985 993 995 104 98 98 94 88 88 86 80 78 76 68 66 66 60 58 52 36 36 22 16 0 0 0 -14 -20 -22 -26 -28 -52 -54 -56 -58 -70 -70 -72 -76 -118 -126 -126 -140 -140 -142 -154 -154 -168 -172 -174 -182 -188 -196 -196 -206 -208 -220 -220 -222 -226 -236 -262 -286 -300 -308 -308 -322 -322 -336 -342 -346 -366 -396 -396 -404 -444 -446 -450 -462 -462 -466 -468 -468 -486 -486 -490 -498 -498 -506 -520 -532 -546 -548 -588 -594 -594 -596 -596 -604 -608 -612 -616 -616 -616 -622 -622 -626 -626 -656 -656 -656 -664 -672 -680 -682 -682 -714 -718 -744 -750 -750 -756 -770 -788 -800 -806 -814 -816 -850 -858 -858 -864 -868 -868 -870 -882 -884 -910 -924 -928 -932 -942 -946 -950 -952 -980 -986 -988 ];\r\nvexp=[-991 -989 998 -987 -983 -973 996 982 980 -971 978 -965 -959 974 -957 -951 -947 966 -941 966 966 962 -931 -931 -909 -903 -895 -893 -889 -885 -883 944 -883 936 -869 912 -845 896 894 -845 -837 -833 -829 886 882 -817 880 -803 872 -791 -791 -777 -769 -765 -759 -753 870 -743 -729 864 -717 864 854 -711 -707 850 -695 -689 -683 840 826 -665 -661 -659 812 798 -659 766 -657 760 -653 -637 756 -631 -627 -621 -611 748 -609 -605 -605 -601 -597 -589 -573 -567 -541 -539 -539 740 730 -539 -535 -507 -483 728 -475 -469 714 -455 -453 710 704 -451 -447 -433 -433 -431 -421 -417 -417 686 -405 682 -403 680 -399 678 -391 672 -387 670 668 -385 660 -381 -381 636 -377 -367 -363 -353 -331 626 618 -325 -303 616 -299 -297 -291 584 -281 -277 578 578 572 570 -245 -243 -239 -231 -223 -221 -209 570 -205 -201 -185 -183 -175 -165 -163 -159 -157 568 -147 564 -139 562 -125 548 -117 544 542 -103 -101 528 -95 524 -95 -79 -71 -71 -61 -49 520 -41 -37 520 518 -33 -27 502 -25 490 -21 482 474 -17 474 -17 -9 -7 -7 7 13 15 446 17 23 446 31 35 440 35 39 45 49 49 426 59 418 406 67 91 404 93 103 388 105 107 113 388 117 119 121 123 131 141 143 143 161 173 173 179 378 195 358 197 203 231 257 356 263 271 273 275 277 287 297 338 301 303 338 305 323 325 336 330 369 381 399 322 308 407 308 413 308 296 419 419 296 425 439 292 445 280 451 451 260 451 453 246 469 469 469 483 246 495 242 501 242 511 517 232 212 529 539 206 180 178 539 178 549 549 553 559 561 561 565 567 573 585 585 595 607 623 633 641 657 683 689 719 727 733 735 741 759 168 779 783 166 164 791 807 817 819 823 861 865 869 869 162 903 907 138 907 913 913 917 923 132 132 941 130 953 957 126 122 965 971 981 985 993 995 104 98 98 94 88 88 86 80 78 76 68 66 66 60 58 52 36 36 22 16 0 0 0 -14 -20 -22 -26 -28 -52 -54 -56 -58 -70 -70 -72 -76 -118 -126 -126 -140 -140 -142 -154 -154 -168 -172 -174 -182 -188 -196 -196 -206 -208 -220 -220 -222 -226 -236 -262 -286 -300 -308 -308 -322 -322 -336 -342 -346 -366 -396 -396 -404 -444 -446 -450 -462 -462 -466 -468 -468 -486 -486 -490 -498 -498 -506 -520 -532 -546 -548 -588 -594 -594 -596 -596 -604 -608 -612 -616 -616 -616 -622 -622 -626 -626 -656 -656 -656 -664 -672 -680 -682 -682 -714 -718 -744 -750 -750 -756 -770 -788 -800 -806 -814 -816 -850 -858 -858 -864 -868 -868 -870 -882 -884 -910 -924 -928 -932 -942 -946 -950 -952 -980 -986 -988 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-295 -303 -181 -373 3 955 107 217 -418 89 37 186 29 -19 -459 -780 -990 -971 673 821 820 403 317 -844 104 187 403 910 897 -684 -440 259 555 -773 -28 -509 559 507 546 -394 602 889 -602 -945 717 -503 -931 56 5 -913 965 927 980 926 -255 960 -385 539 546 -187 -504 -138 -673 443 955 913 335 -902 -814 -182 564 -335 676 813 394 945 -234 -181 -445 11 -463 693 -346 -778 -383 -724 747 227 -554 897 -495 -139 623 98 -217 -845 153 461 298 -689 487 -466 698 -159 -569 439 786 80 -751 -366 259 528 955 704 -313 71 468 -9 -341 277 315 966 999 -138 -449 -869 636 951 -266 -417 -127 -429 385 -406 -395 -75 -802 -929 -377 -290 882 -554 -529 233 -979 830 330 -737 845 309 670 -415 341 339 479 -550 -139 -47 -357 627 351 320 39 -291 182 -956 882 455 -308 781 -151 -349 33 -506 149 -325 315 -895 273 943 143 -357 -968 -923 163 526 446 -505 -497 59 -580 -89 -161 -39 777 671 832 -939 -185 263 -473 -321 514 -351 -276 294 231 699 -429 899 29 -678 -402 -958 -88 938 -80 285 -553 203 925 -790 471 -684 271 420 -559 -15 -582 -81 22 600 -903 455 -285 914 -382 -692 319 -986 363 -23 795 253 -257 -467 211 -908 -559 845 -478 687 -515 387 134 931 203 -7 303 572 737 669 945 -547 379 911 -117 882 704 454 -269 -488 756 -567 -125 -59 715 265 147 429 243 574 -197 -523 -462 -987 937 -305 347 394 462 373 517 -673 640 532 -720 32 185 -821 -749 -727 106 308 -572 721 -34 -803 -613 537 836 -489 -658 168 331 -368 871 -602 399 992 729 -325 -173 -765 -793 -901 -728 -109 -705 -40 -825 972 -46 884 76 471 -814 -753 -169 837 -499 381 178 -363 509 -847 -855 359 65 149 -481 -468 89 417 814 -358 -357 5 91 -924 -738 765 -15 -881 -634 -303 -769 -105 225 -245 -109 -437 -165 625 704 964 539 659 -357 -373 889 173 825 -963 -627 -529 -700 537 851 6 273 -637 -840 -576 -343 -992 9 145 551 -447 870 286 88 -850 440 661 -729 -279 556 588 870 -110 -723 429 -759 -616 361 815 60 861 -522 -29 455 -91 -917 -781 -469 -89 406 -231 -569 289 -84 -847 -199 912 64 748 389 781 -224 -525 -504 287 -605 559 722 -775 -879 991 689 721 -504 -362 988 99 949 202 -931 -920 -284 -213 616 581 847 495 363 -418 608 49 -832 157 763 -203 -581 -689 -632 -231 -91 376 -309 -352 672 253 -301 418 885 85 321 812 501 -79 366 -249 -175 65 737 -849 -453 871 -468 868 919 952 425 351 -935 -301 -595 372 -155 -21 913 50 597 548 825 299 465 -501 249 -583 734 -983 -224 19 -218 476 -364 392 211 580 717 557 942 255 972 -88 -420 -763 -438 -721 351 -289 661 -741 904 -949 -954 -103 858 155 -251 -245 429 -149 -752 657 -781 -583 -224 -202 -771 525 442 978 -13 681 430 198 -623 937 -897 -910 -155 708 -383 -800 169 981 -910 7 -896 -544 633 -812 533 462 482 22 -231 251 415 -450 631 -631 234 -23 622 19 -175 -160 -638 868 -112 119 -203 671 520 490 273 -857 -842 -499 721 -77 273 993 181 910 -922 -421 -728 -627 -451 -279 -739 607 -839 -444 -910 56 -740 -715 923 -344 -825 -91 -690 728 -429 -104 393 -270 -788 -585 -507 -44 -663 905 -589 801 -681 473 430 -247 -957 468 676 -726 99 543 -179 314 96 283 -285 -871 15 759 545 510 437 123 -689 171 -335 -580 -403 -154 741 782 -416 857 -307 346 325 -109 -929 -325 -618 -243 -377 -231 370 -197 -598 -668 735 553 -506 -616 -90 119 -235 -853 -248 -313 65 136 -305 -476 -350 459 888 347 651 -737 -775 211 567 809 -411 -634 -178 92 -702 741 449 -703 -608 -438 -199 180 -978 -957 -308 -883 -993 -357 -845 -429 938 -367 679 912 755 233 -589 983 -537 523 975 -775 -754 -855 -676 295 651 -327 624 -514 -572 -906 150 504 24 946 552 834 -256 252 374 882 368 -920 -828 -696 -274 -294 898 -664 616 932 966 -728 86 912 -640 -636 -428 -364 470 -922 570 326 -206 -514 188 96 -412 -472 702 -156 -682 188 -462 560 -350 426 -2 -818 774 0 436 280 712 302 -26 -352 224 -290 -24 -630 -746 -418 692 -294 252 238 178 214 -858 -196 -672 846 968 0 972 312 700 -804 -858 -284 -690 216 -660 -210 504 -280 -822 -138 276 -438 -104 442 240 352 -252 460 -246 -180 66 -574 60 -922 760 -934 -86 -922 -82 -82 374 -84 158 242 216 530 -628 -386 -876 974 630 -528 -682 402 -242 752 -74 -704 98 462 344 252 800 920 -70 -994 -628 -220 852 -768 -282 -890 634 14 -266 848 428 580 -288 308 650 -518 -700 434 -872 -146 -950 500 -132 -254 -810 316 -376 580 630 -300 -688 242 46 -224 38 -716 12 84 642 -766 -992 -730 -568 1000 542 422 190 -744 796 -594 442 -938 616 -512 724 -72 -522 536 224 -804 252 32 704 -892 -728 806 -28 112 592 346 -256 210 -610 -374 872 918 102 -616 668 84 -546 -836 584 456 -810 -380 -910 420 -540 14 -628 -286 -40 -504 -224 686 890 -902 -294 -448 -672 198 ];\r\nvexp=[-993 -987 -983 -979 -971 -963 -957 -957 1000 -949 -945 992 -939 -935 -931 988 980 -931 -929 -929 978 -923 -917 974 972 -913 -903 972 -901 972 968 -897 -895 -883 966 -881 -879 -871 966 964 960 -869 952 -857 -855 -855 -853 946 -849 -847 -847 -845 942 938 -845 938 -839 -825 932 -825 926 920 -821 -803 -793 -781 -781 918 914 912 912 -775 912 -775 910 -775 910 -773 -771 -769 -765 -763 904 898 -759 890 -753 -751 888 -749 -741 -739 -737 884 -737 -729 -727 -723 882 -721 -715 882 882 -705 -703 -689 882 872 -689 870 -689 870 -681 868 -673 -673 868 -663 -637 -631 -627 858 -627 852 -623 -613 848 -605 846 -595 -589 -589 -585 836 -583 -583 834 -581 -569 832 830 820 -569 -567 -559 814 812 -559 -553 -547 806 -537 -529 -529 -525 800 -523 -515 -509 -507 -505 796 -503 -501 786 782 774 -499 760 -499 -497 -495 -489 756 -481 -473 -469 -467 -463 -459 -453 -451 752 -449 -447 748 734 -445 -437 -429 728 -429 -429 -429 -421 -417 724 -415 -411 -403 -395 -385 722 -383 712 708 -383 -377 -377 -373 -373 704 704 704 704 702 700 -367 -363 -357 -357 698 -357 692 -357 686 -357 -351 676 -349 676 672 -343 -341 -335 670 668 650 -335 642 -327 -325 -325 -325 -321 -313 -313 640 -309 -307 636 -305 -305 -303 634 -303 -301 -301 -295 630 -291 -289 -285 -285 -279 -279 -269 630 624 622 -257 616 616 -255 -251 -249 -247 -245 -245 -243 -235 616 -231 -231 608 -231 -231 -217 -213 602 600 -203 -203 -199 592 588 584 580 -199 -197 -197 -187 580 580 574 -185 572 -181 -181 -179 570 -175 564 560 -175 556 -173 552 -169 548 -165 -161 -159 -155 -155 -151 546 -149 -139 546 -139 542 536 532 530 -127 528 -125 -117 -109 -109 -109 526 -105 -103 -91 -91 -91 -89 -89 -81 520 -79 -77 514 510 -75 -59 -47 504 504 -39 -29 -23 500 -23 -21 -19 -15 -15 -13 -9 -7 3 490 482 5 5 7 9 11 15 19 19 29 29 476 33 37 470 39 49 468 468 59 462 65 65 65 71 462 462 460 456 454 85 89 89 446 442 442 442 91 99 99 440 107 119 436 119 434 123 143 145 147 149 149 153 430 155 157 163 430 169 171 428 426 422 173 181 420 185 420 187 203 203 418 211 211 211 217 225 406 402 394 227 231 394 233 392 376 233 374 243 249 251 253 374 372 253 370 255 259 259 263 265 368 271 273 366 273 352 346 273 273 346 277 283 285 344 287 289 330 295 299 303 309 315 315 317 326 320 319 316 321 325 331 335 339 314 341 347 347 312 351 308 351 351 359 361 363 363 308 373 302 379 298 294 286 280 381 276 385 387 252 389 252 252 252 393 242 399 403 403 415 417 242 425 240 429 238 429 429 437 439 443 234 449 455 455 224 224 455 459 216 216 461 465 214 210 471 471 473 202 479 198 487 198 495 501 190 507 188 188 509 186 517 182 180 178 523 525 533 178 537 537 168 539 158 539 543 150 136 134 112 545 551 553 106 104 555 557 102 559 559 567 581 597 607 98 98 623 96 625 627 631 633 651 651 96 92 88 86 657 659 84 661 661 84 80 669 76 671 66 64 671 673 60 679 681 687 689 693 699 60 715 717 56 56 50 717 721 721 46 38 721 729 735 737 737 741 32 741 747 755 759 763 32 765 24 777 22 22 781 781 14 795 801 809 813 14 815 821 825 12 825 6 0 837 845 0 -2 -24 845 847 851 -26 857 861 -28 871 -28 -34 871 -40 885 889 889 897 897 899 905 911 -40 -44 -46 -70 913 913 919 -72 -74 923 -80 -82 925 -82 927 931 937 937 943 -84 945 945 -84 949 951 955 955 955 965 975 981 -86 983 -88 991 993 999 -88 -90 -104 -104 -110 -112 -132 -138 -138 -138 -146 -154 -156 -160 -178 -180 -182 -196 -202 -206 -210 -218 -220 -224 -224 -224 -224 -224 -234 -242 -246 -248 -252 -254 -256 -256 -266 -266 -270 -274 -276 -280 -282 -284 -284 -286 -288 -290 -290 -294 -294 -294 -300 -308 -308 -344 -346 -350 -350 -352 -352 -358 -362 -364 -364 -366 -368 -374 -376 -380 -382 -386 -394 -402 -406 -412 -416 -418 -418 -418 -420 -428 -438 -438 -438 -440 -444 -448 -450 -462 -462 -466 -468 -468 -472 -476 -478 -488 -504 -504 -504 -504 -506 -506 -512 -514 -514 -518 -522 -522 -528 -540 -544 -546 -550 -554 -554 -568 -572 -572 -574 -576 -580 -580 -582 -594 -598 -602 -602 -608 -610 -616 -616 -616 -618 -628 -628 -628 -630 -632 -634 -634 -636 -638 -640 -658 -660 -664 -668 -672 -672 -676 -678 -682 -682 -684 -684 -688 -690 -690 -692 -696 -700 -700 -702 -704 -716 -720 -724 -726 -728 -728 -728 -728 -730 -738 -740 -744 -746 -752 -754 -766 -768 -778 -780 -788 -790 -800 -802 -804 -804 -810 -810 -812 -814 -814 -818 -822 -828 -832 -836 -840 -842 -844 -850 -858 -858 -872 -876 -890 -892 -896 -902 -902 -906 -908 -910 -910 -910 -910 -920 -920 -922 -922 -922 -922 -924 -934 -938 -950 -954 -956 -958 -968 -978 -986 -990 -992 -992 -994 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))","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":20,"test_suite_updated_at":"2013-09-26T04:17:32.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-26T04:12:00.000Z","updated_at":"2026-01-22T14:04:54.000Z","published_at":"2013-09-26T04:14:37.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/2924486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sorting\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Subset of cases.\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\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\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 V a vector\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 Vout a sorted vector Odds Increasing/Evens Increasing\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\u003eExample:\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\u003eV= [-5 -12 87 2 88 20 11]\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\u003eVout=[-5 88 11 20 2 -12 87]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time to Complete: \u0026lt; 10 minutes\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\"}]}"},{"id":42780,"title":"GJam March 2016 IOW: Password Single","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p3 GJam March 2016 Annual I/O for Password Security\u003e. This is the small-1 case of only a single password\r\n\r\nThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'. \r\n\r\n*Input:* [PW], string of 1 to 26 characters\r\n\r\n*Output:* [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\r\n\r\n*Examples:* [PW] [Pstr]\r\n\r\n  [X] [IMPOSSIBLE] \r\n  [QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ] \r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Theory:* Single password case is a three liner.\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p3\"\u003eGJam March 2016 Annual I/O for Password Security\u003c/a\u003e. This is the small-1 case of only a single password\u003c/p\u003e\u003cp\u003eThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [PW], string of 1 to 26 characters\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [PW] [Pstr]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[X] [IMPOSSIBLE] \r\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ] \r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Single password case is a three liner.\u003c/p\u003e","function_template":"function Pstr=Password(c)\r\n% c is a string [A:Z]\r\n% create Pstr that contains [A:Z] such that no c exists in Pstr\r\n% if not possible return Pstr='IMPOSSIBLE'\r\n Pstr='IMPOSSIBLE';\r\n\r\nend","test_suite":"%%\r\ntic\r\nm='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nvexp='ZYXWVUTSRQPONMLKJIHGFEDCBA';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='X';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QQ';\r\nvexp='QABCDEFGHIJKLMNOPRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VLCIFDXB';\r\nvexp='BXDFICLVAEGHJKMNOPQRSTUWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='Z';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IKFBJUXSECAHNYLRVWDQPTZOMG';\r\nvexp='GMOZTPQDWVRLYNHACESXUJBFKI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XQOHEJIUZVFRSMLGYNWDBATP';\r\nvexp='PTABDWNYGLMSRFVZUIJEHOQXCK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JO';\r\nvexp='OJABCDEFGHIKLMNPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UJ';\r\nvexp='JUABCDEFGHIKLMNOPQRSTVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JQ';\r\nvexp='QJABCDEFGHIKLMNOPRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PJ';\r\nvexp='JPABCDEFGHIKLMNOQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JK';\r\nvexp='KJABCDEFGHILMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AJILRWDVYFQNUPOSKXGTCME';\r\nvexp='EMCTGXKSOPUNQFYVDWRLIJABHZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JV';\r\nvexp='VJABCDEFGHIKLMNOPQRSTUWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UOFVH';\r\nvexp='HVFOUABCDEGIJKLMNPQRSTWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZBITRKUX';\r\nvexp='XUKRTIBZACDEFGHJLMNOPQSVWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RXHYDMIVCWTQN';\r\nvexp='NQTWCVIMDYHXRABEFGJKLOPSUZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VONM';\r\nvexp='MNOVABCDEFGHIJKLPQRSTUWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LPNXTMRA';\r\nvexp='ARMTXNPLBCDEFGHIJKOQSUVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PKBAYN';\r\nvexp='NYABKPCDEFGHIJLMOQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JBHWXAPIKGZLYDSVNEQRFCU';\r\nvexp='UCFRQENVSDYLZGKIPAXWHBJMOT';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JD';\r\nvexp='DJABCEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JL';\r\nvexp='LJABCDEFGHIKMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CENHVFYD';\r\nvexp='DYFVHNECABGIJKLMOPQRSTUWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CIJTQSGVWKEXLO';\r\nvexp='OLXEKWVGSQTJICABDFHMNPRUYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AJ';\r\nvexp='JABCDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RJ';\r\nvexp='JRABCDEFGHIKLMNOPQSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QJ';\r\nvexp='JQABCDEFGHIKLMNOPRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LJ';\r\nvexp='JLABCDEFGHIKMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RUTGILBYCWO';\r\nvexp='OWCYBLIGTURADEFHJKMNPQSVXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WJ';\r\nvexp='JWABCDEFGHIKLMNOPQRSTUVXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JI';\r\nvexp='IJABCDEFGHKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RPFLXJAUNZDYBCQHKOGEW';\r\nvexp='WEGOKHQCBYDZNUAJXLFPRIMSTV';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JC';\r\nvexp='CJABDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZZ';\r\nvexp='ZABCDEFGHIJKLMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NJ';\r\nvexp='JNABCDEFGHIKLMOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JN';\r\nvexp='NJABCDEFGHIKLMOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OJ';\r\nvexp='JOABCDEFGHIKLMNPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YJ';\r\nvexp='JYABCDEFGHIKLMNOPQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ASQHIYWOVDK';\r\nvexp='KDVOWYIHQSABCEFGJLMNPRTUXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JR';\r\nvexp='RJABCDEFGHIKLMNOPQSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IAQPHFOVLZRXK';\r\nvexp='KXRZLVOFHPQAIBCDEGJMNSTUWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='TJ';\r\nvexp='JTABCDEFGHIKLMNOPQRSUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JB';\r\nvexp='BJACDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SKTMEYDBNQFGH';\r\nvexp='HGFQNBDYEMTKSACIJLOPRUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HJ';\r\nvexp='JHABCDEFGIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LCIUBXSAMQJYNDRKTHPWEOV';\r\nvexp='VOEWPHTKRDNYJQMASXBUICLFGZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LEBIYF';\r\nvexp='FYIBELACDGHJKMNOPQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QDUFXPLKWJYOV';\r\nvexp='VOYJWKLPXFUDQABCEGHIMNRSTZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZJ';\r\nvexp='JZABCDEFGHIKLMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VNTIKRQLEUJZDSAYFHMG';\r\nvexp='GMHFYASDZJUELQRKITNVBCOPWX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JU';\r\nvexp='UJABCDEFGHIKLMNOPQRSTVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CJ';\r\nvexp='JCABDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VJ';\r\nvexp='JVABCDEFGHIKLMNOPQRSTUWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GJ';\r\nvexp='JGABCDEFHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MJ';\r\nvexp='JMABCDEFGHIKLNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JM';\r\nvexp='MJABCDEFGHIKLNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JWPOBESYCLURKTMXGAQFHZ';\r\nvexp='ZHFQAGXMTKRULCYSEBOPWJDINV';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YXWVPTANLC';\r\nvexp='CLNATPVWXYBDEFGHIJKMOQRSUZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DHTGFSRVMWKNXOBUPCLAIQYEJZ';\r\nvexp='ZJEYQIALCPUBOXNKWMVRSFGTHD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BHZLJATP';\r\nvexp='PTAJLZHBCDEFGIKMNOQRSUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XJ';\r\nvexp='JXABCDEFGHIKLMNOPQRSTUVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AA';\r\nvexp='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='FKMWBLNRQUDHOGZVCIAE';\r\nvexp='EAICVZGOHDUQRNLBWMKFJPSTXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NQCHZXIUTVLKD';\r\nvexp='DKLVTUIXZHCQNABEFGJMOPRSWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JP';\r\nvexp='PJABCDEFGHIKLMNOQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OYSLPBQVHDZE';\r\nvexp='EZDHVQBPLSYOACFGIJKMNRTUWX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JT';\r\nvexp='TJABCDEFGHIKLMNOPQRSUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JA';\r\nvexp='AJBCDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SJ';\r\nvexp='JSABCDEFGHIKLMNOPQRTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='FJ';\r\nvexp='JFABCDEGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ITQXRCOULKH';\r\nvexp='HKLUOCRXQTIABDEFGJMNPSVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EJ';\r\nvexp='JEABCDFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DJ';\r\nvexp='JDABCEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VDSHZWRBAYUJEMFIONXPTKL';\r\nvexp='LKTPXNOIFMEJUYABRWZHSDVCGQ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PWGUA';\r\nvexp='AUGWPBCDEFHIJKLMNOQRSTVXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IMPOSSIBLE';\r\nvexp='ELBISOPMACDFGHJKNQRTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XBYKNRGLJVFEPTUO';\r\nvexp='OUTPEFVJLGRNKYBXACDHIMQSWZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JH';\r\nvexp='HJABCDEFGIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KTMDLQ';\r\nvexp='QLDMTKABCEFGHIJNOPRSUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LUNSVKPGFJOXEAQMBDZ';\r\nvexp='ZDBMQAEXOJFGPKVSNULCHIRTWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IJ';\r\nvexp='JIABCDEFGHKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VOKCMQBHWUNZGJ';\r\nvexp='JGZNUWHBQMCKOVADEFILPRSTXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JY';\r\nvexp='YJABCDEFGHIKLMNOPQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='A';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JW';\r\nvexp='WJABCDEFGHIKLMNOPQRSTUVXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JX';\r\nvexp='XJABCDEFGHIKLMNOPQRSTUVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JF';\r\nvexp='FJABCDEGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SLMAWBIKZCXOHQFGPYUDNJV';\r\nvexp='VJNDUYPGFQHOXCZKIBWAMLSERT';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XDLNMWTESQIFYRHCPOA';\r\nvexp='AOPCHRYFIQSETWMNLDXBGJKUVZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KJ';\r\nvexp='JKABCDEFGHILMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MHZAXUFKDVQORNWYTCGEISBJ';\r\nvexp='JBSIEGCTYWNROQVDKFUXAZHMLP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DCAZKJ';\r\nvexp='JKZACDBEFGHILMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BJ';\r\nvexp='JBACDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JZ';\r\nvexp='ZJABCDEFGHIKLMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JG';\r\nvexp='GJABCDEFHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SAMWRULICJGBEFYKVQTONPDZXH';\r\nvexp='HXZDPNOTQVKYFEBGJCILURWMAS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JS';\r\nvexp='SJABCDEFGHIKLMNOPQRTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JE';\r\nvexp='EJABCDFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YXUMAFB';\r\nvexp='BFAMUXYCDEGHIJKLNOPQRSTVWZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n\r\n\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":16,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-20T00:37:14.000Z","updated_at":"2025-12-07T18:55:37.000Z","published_at":"2016-03-20T00:52:13.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/8274486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Password Security\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the small-1 case of only a single password\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 random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\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 [PW], string of 1 to 26 characters\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 [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\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 [PW] [Pstr]\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[[X] [IMPOSSIBLE] \\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Single password case is a three liner.\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\"}]}"},{"id":1913,"title":"GJam 2013 Veterans: Ocean View (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View\u003e. This is the Small data set witn N\u003c=50 and Q\u003c=4, guaranteed.\r\n\r\nThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\r\n\r\n*Succinct Challenge statement:* Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\r\n\r\n*Input:* V , Vector length N\u003c=50 with values 1 thru 1000.\r\n\r\n*Output:* Q , minimum quantity of removed values to produce a valid vector [0:4]\r\n\r\n*Examples:* [V] [Q]\r\n\r\n  [1 4 3 3] [2]  for [1 4] or [1 3]\r\n  [1 2 3 4 5] [0]\r\n  [4 3 2 1] [3]\r\n\r\n*Commentary:*\r\n\r\n  1) The GJam Small test suite is not robust\r\n  2) nchoosek(50,4) is too slow for Cody and the 100 cases\r\n  3) The Large test suite is N\u003c=1000 with some delete cases \u003e4\r\n  4) A Good Algorithm that solves the Large case is usually best to pursue\r\n  5) GJam Competition allows one Large submission within 10 minutes of download \r\n  6) \u003cLarge Suite Challenge\u003e","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard#s=p2\"\u003eGJam 2013 Veterans Ocean View\u003c/a\u003e. This is the Small data set witn N\u0026lt;=50 and Q\u0026lt;=4, guaranteed.\u003c/p\u003e\u003cp\u003eThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\u003c/p\u003e\u003cp\u003e\u003cb\u003eSuccinct Challenge statement:\u003c/b\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V , Vector length N\u0026lt;=50 with values 1 thru 1000.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Q , minimum quantity of removed values to produce a valid vector [0:4]\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [V] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 4 3 3] [2]  for [1 4] or [1 3]\r\n[1 2 3 4 5] [0]\r\n[4 3 2 1] [3]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) The GJam Small test suite is not robust\r\n2) nchoosek(50,4) is too slow for Cody and the 100 cases\r\n3) The Large test suite is N\u0026lt;=1000 with some delete cases \u003e4\r\n4) A Good Algorithm that solves the Large case is usually best to pursue\r\n5) GJam Competition allows one Large submission within 10 minutes of download \r\n6) \u0026lt;Large Suite Challenge\u003e\r\n\u003c/pre\u003e","function_template":"function Q = Monotonic_V(vin)\r\n  Q=0;\r\nend","test_suite":"%%\r\ntic\r\nvin=[4 33 36 47 63 79 146 159 176 191 178 215 226 228 261 262 291 295 322 368 456 461 465 473 479 500 512 527 570 572 613 639 641 654 667 684 699 701 746 751 763 767 786 819 872 925 932 959 965 972 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 33 63 78 82 85 92 101 113 125 138 175 183 196 211 224 250 287 345 368 388 426 447 477 491 504 524 575 579 581 621 694 712 720 737 745 747 784 793 802 813 827 829 853 858 919 924 929 939 960 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 19 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 35 63 72 76 122 103 171 185 221 238 294 318 325 341 355 350 359 365 407 409 438 467 514 548 592 585 599 606 636 646 652 697 708 737 770 773 798 819 832 835 849 881 879 893 904 907 932 967 983 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 72 94 114 136 147 177 185 199 216 214 230 243 252 264 417 285 426 428 445 450 463 465 467 482 485 495 531 537 547 575 558 598 654 677 678 692 685 785 853 891 894 897 905 906 910 918 933 963 979 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[21 18 33 53 158 179 200 225 230 259 261 262 280 319 338 368 369 376 423 449 481 505 517 531 545 588 598 614 607 615 647 655 657 684 702 706 734 756 768 791 806 792 834 889 895 896 957 960 971 995 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[52 53 66 83 119 129 132 145 202 237 274 281 284 296 298 326 442 386 451 456 475 476 486 493 499 520 523 525 589 605 612 626 630 638 694 718 740 763 791 798 800 801 811 839 868 874 895 891 971 984 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 9 21 43 89 106 117 141 150 211 158 220 233 282 296 311 324 353 372 376 407 452 414 455 482 494 503 522 527 531 545 548 552 563 568 586 593 629 673 691 682 703 724 738 787 822 861 882 907 937 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 51 80 105 109 114 129 154 175 167 188 198 227 266 270 437 345 446 459 469 470 478 479 520 582 587 591 611 618 619 658 677 670 683 686 689 710 758 728 815 821 852 870 912 937 946 960 969 985 998 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 34 65 81 83 91 105 114 125 127 132 162 154 176 198 201 222 269 272 296 297 321 345 355 377 402 403 407 444 454 450 493 517 533 546 589 592 593 639 698 700 729 764 798 785 850 909 917 950 988 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[30 94 106 118 125 136 151 161 162 176 233 240 272 290 320 337 347 352 370 433 412 499 504 510 513 572 593 621 629 640 646 710 712 721 735 741 750 786 804 812 814 817 822 844 893 932 944 945 954 972 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 5 6 1 7 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[25 37 40 56 62 81 86 136 95 140 225 228 274 236 297 332 417 516 545 549 573 582 583 595 600 601 603 624 673 699 714 716 719 720 746 737 762 790 802 814 821 835 852 868 860 871 899 910 923 984 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 1000 1000 1000 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 15 42 44 68 69 108 109 126 120 145 148 154 176 199 221 245 266 271 299 325 309 326 411 514 518 552 568 589 607 663 692 723 711 746 754 771 776 780 818 840 843 858 868 878 882 883 904 906 975 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[17 13 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 21 82 107 99 135 136 144 174 183 211 222 259 283 304 333 348 353 366 399 412 491 512 507 526 557 590 593 613 619 634 663 683 689 710 714 719 720 738 754 807 832 885 880 932 934 941 984 990 996 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[5 37 46 52 54 79 125 140 192 294 318 323 333 343 346 354 360 361 372 403 414 435 445 454 471 480 482 503 514 527 583 624 645 632 726 746 760 764 771 791 801 803 812 819 846 885 893 956 976 1000 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 12 36 45 50 101 113 119 131 168 237 250 254 261 281 324 343 401 421 437 442 499 500 501 512 522 523 529 532 545 561 585 586 590 623 679 695 782 798 823 830 843 852 878 891 902 923 922 972 981 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 23 111 61 127 138 144 147 174 194 261 262 279 272 288 318 350 356 396 425 439 441 454 466 473 487 482 590 615 617 632 637 662 688 699 704 734 780 800 803 814 808 828 843 868 922 943 985 987 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[49 73 118 140 194 202 218 249 261 342 272 347 355 403 438 462 466 469 473 488 499 511 514 515 525 532 538 545 588 665 610 707 714 719 716 723 739 751 763 789 809 868 874 899 916 937 939 947 979 994 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 14 67 76 98 107 125 150 151 194 244 248 251 270 289 271 309 354 434 453 468 454 484 487 507 523 526 569 578 601 624 684 690 696 725 752 765 800 813 815 826 906 888 948 963 970 984 993 996 1000 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[15 57 92 105 110 172 125 182 202 213 233 263 282 291 289 293 353 404 421 440 447 469 491 495 504 498 505 543 549 579 597 633 655 671 693 748 768 801 798 811 838 858 859 865 883 889 901 945 959 964 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[30 61 112 126 137 147 154 158 224 266 282 294 303 307 328 320 377 379 391 411 430 423 446 453 461 463 468 493 517 531 536 546 588 613 667 643 683 684 712 722 784 821 848 889 900 919 921 928 931 1000 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[34 18 92 103 108 110 143 200 248 283 284 297 326 365 369 400 439 470 489 498 526 593 596 605 631 684 720 687 754 770 781 793 803 826 811 855 863 886 888 901 916 928 943 954 968 972 982 983 984 987 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 24 74 48 137 172 199 209 224 227 234 293 297 305 324 336 338 377 418 395 432 437 446 474 505 510 529 536 541 568 613 641 645 695 677 735 792 797 805 830 853 869 882 883 888 925 910 970 982 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[25 39 54 55 57 101 117 124 142 143 185 161 196 210 214 237 243 267 282 288 304 394 435 427 458 491 509 519 550 557 582 607 608 634 652 640 681 705 695 753 785 840 871 889 903 912 918 921 966 987 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[30 75 123 160 156 176 202 215 254 264 310 318 354 368 390 435 453 457 474 476 479 510 529 532 603 623 635 637 644 671 686 706 723 725 726 730 732 767 806 807 829 852 869 902 897 912 927 957 994 996 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[40 44 45 46 121 89 141 155 167 179 207 226 263 265 327 337 338 364 373 453 456 478 512 537 543 561 568 577 637 604 641 648 672 687 697 709 701 737 789 808 813 819 820 828 835 911 921 938 947 964 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[40 42 43 60 63 70 78 124 103 131 133 149 161 164 170 227 232 260 266 275 316 323 368 335 372 377 413 418 420 441 553 463 574 576 643 656 665 678 733 741 743 815 762 883 908 928 930 968 974 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[16 78 79 134 151 219 224 240 251 280 295 388 406 483 489 505 507 534 538 539 549 554 555 564 573 583 609 660 672 681 687 711 732 738 745 746 783 792 812 834 837 841 887 866 908 957 961 978 987 994 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[18 20 33 34 35 54 94 123 140 162 169 220 205 250 258 278 299 320 349 362 397 434 492 449 499 504 508 515 531 552 606 647 652 678 695 703 714 735 763 785 836 799 854 858 863 864 929 933 960 984 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 17 37 50 66 96 99 155 107 184 218 257 260 279 285 327 332 337 354 369 398 430 423 437 574 631 656 660 668 676 680 700 709 750 747 761 789 774 813 857 860 886 898 904 949 952 964 976 984 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 78 23 90 101 106 132 141 146 191 206 222 244 270 304 325 332 379 383 392 401 412 417 436 454 465 487 551 499 553 557 562 570 581 613 650 682 691 732 781 782 789 814 816 844 890 965 971 986 998 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[20 65 69 128 131 157 173 175 211 194 216 229 266 278 286 292 320 335 377 358 423 424 463 472 529 531 545 553 557 576 589 585 601 613 657 672 699 711 725 786 789 810 897 923 936 960 996 969 997 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 54 61 67 119 131 153 167 178 199 197 246 256 273 329 321 348 350 353 392 394 402 413 486 511 530 515 539 569 582 586 594 686 763 819 821 829 840 832 848 858 864 870 904 933 944 947 952 967 998 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 40 106 68 118 132 148 162 180 182 200 207 246 283 287 288 320 295 321 325 338 343 349 362 364 371 378 418 503 535 554 562 568 571 577 587 682 699 760 709 769 844 920 938 941 948 960 973 977 983 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 38 43 45 67 75 150 154 173 178 184 189 254 227 278 282 289 315 297 365 373 396 403 505 509 513 521 555 580 583 600 614 643 649 667 678 695 722 732 761 801 824 805 841 879 894 915 926 930 975 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[56 65 94 119 149 165 157 166 198 220 297 302 305 316 321 327 351 347 359 368 380 386 387 403 431 447 448 449 463 528 533 556 562 590 634 610 640 658 693 750 786 759 792 800 825 842 864 889 911 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[5 11 40 95 110 134 138 160 187 208 228 210 240 278 352 354 381 390 414 503 440 507 513 526 528 534 540 543 570 604 609 613 625 632 647 653 658 661 668 708 718 780 846 855 862 860 891 910 936 949 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[6 57 71 73 100 112 134 165 173 189 190 194 197 227 239 229 246 252 278 288 316 319 371 393 450 462 521 585 567 620 625 636 654 689 675 694 701 716 720 741 743 746 820 868 873 879 935 938 979 989 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[5 50 77 74 113 128 129 169 173 179 201 210 228 236 242 251 255 262 279 283 301 369 373 387 380 412 417 441 444 459 476 492 493 532 541 574 644 646 665 720 728 773 802 810 821 853 849 860 912 964 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[10 21 84 97 107 109 123 120 128 137 143 161 254 266 278 301 307 315 361 389 395 408 492 517 549 584 551 597 602 603 618 648 653 657 658 682 723 753 790 799 820 824 831 844 855 866 858 894 916 918 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 4 3 3 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 43 49 54 80 84 104 107 149 171 180 197 210 226 312 340 347 356 363 387 407 420 439 463 478 465 485 499 568 590 598 627 646 654 656 675 693 707 760 761 776 798 840 853 856 909 929 947 951 984 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[49 60 70 76 80 96 144 161 203 269 274 296 343 346 400 359 401 428 430 451 454 455 477 480 500 506 522 591 573 598 653 655 657 733 748 736 763 771 784 813 835 855 869 894 920 932 948 956 981 986 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 4 6 7 10 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[26 37 95 122 117 149 183 194 195 239 245 253 272 285 287 330 300 335 349 371 380 390 401 421 489 426 519 521 538 598 626 640 645 665 685 698 704 712 723 791 822 834 859 860 920 900 960 977 986 997 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[70 76 80 97 102 105 113 157 141 161 163 217 251 295 310 320 323 350 355 357 390 391 397 422 428 460 486 472 487 536 570 579 631 665 666 676 681 683 690 693 705 726 813 819 821 850 874 916 935 999 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[51 58 63 80 90 120 157 164 172 190 208 259 278 336 324 348 368 374 379 383 426 436 446 506 536 553 569 589 591 596 637 607 645 708 716 725 735 741 745 764 773 831 884 853 902 905 956 978 982 997 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[33 40 65 72 122 84 130 137 156 227 255 314 333 335 343 345 350 372 373 374 387 417 404 422 433 469 470 495 499 532 571 580 603 630 622 653 660 681 698 752 801 808 816 836 859 889 909 931 961 962 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 42 34 53 59 87 98 141 143 158 188 221 317 319 324 351 346 359 374 390 393 407 430 458 485 488 502 514 559 567 595 598 596 610 629 631 647 719 699 759 769 782 803 805 907 928 934 943 983 987 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[59 61 82 96 100 160 176 194 242 223 259 266 275 282 318 328 357 349 367 370 376 409 416 442 447 475 489 504 507 553 598 603 637 616 684 710 722 712 756 776 783 784 806 814 833 847 879 922 973 992 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 87 98 120 173 139 184 187 214 222 276 310 333 348 356 364 376 382 401 461 422 475 501 509 524 575 579 588 594 596 622 624 652 683 699 751 737 781 827 831 844 863 868 875 892 909 910 975 977 980 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[119 152 207 221 215 245 250 257 269 327 336 345 370 371 382 404 408 440 443 448 458 492 498 509 609 580 614 620 623 653 692 709 713 723 743 760 770 812 784 814 830 862 875 877 916 926 932 947 963 984 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[6 25 46 48 85 102 114 126 179 223 233 238 243 294 276 330 338 386 349 387 418 423 434 463 470 474 487 523 546 559 591 634 667 671 681 696 739 752 772 791 808 830 840 873 862 882 959 965 978 995 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 35 39 58 88 73 89 108 143 186 196 243 253 270 297 271 349 358 368 369 402 420 453 459 464 489 499 568 607 646 653 705 710 712 717 716 721 780 743 793 826 849 916 918 947 950 958 959 961 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 57 88 92 162 186 187 268 297 307 310 342 332 368 391 402 408 422 435 487 447 522 530 535 546 558 571 574 594 628 631 648 651 660 664 675 693 707 715 738 718 762 794 851 853 854 870 902 935 980 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[16 36 61 88 110 205 120 230 243 264 265 270 297 313 316 317 342 346 391 368 401 411 441 472 574 584 587 591 605 645 618 670 675 693 695 736 741 796 804 801 811 824 829 884 915 929 934 984 989 990 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[27 41 59 70 96 145 149 175 274 264 278 297 298 358 361 392 403 413 432 444 480 498 520 542 544 622 626 631 636 641 692 704 715 736 740 805 818 823 828 856 865 875 890 891 913 931 941 966 977 991 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[39 44 48 56 62 94 105 109 195 210 199 211 223 272 311 317 419 435 446 448 467 472 492 483 536 540 609 610 646 638 710 719 740 781 795 798 814 835 858 861 869 876 903 913 936 931 948 965 968 999 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[17 19 42 49 88 94 130 149 215 250 251 288 297 326 334 335 344 372 377 411 406 425 429 436 440 478 488 496 550 554 560 578 585 594 603 607 608 610 631 796 813 820 850 901 937 979 955 989 990 997 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 5 7 21 26 52 128 154 168 192 195 209 225 282 227 284 352 355 363 395 406 432 443 478 501 513 553 577 625 624 658 672 696 699 733 739 750 760 768 817 822 861 869 870 883 913 978 931 993 994 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 18 20 78 110 111 114 117 123 126 138 180 198 214 235 250 286 316 335 409 422 475 476 525 527 593 615 634 657 672 664 682 711 727 729 740 761 781 790 820 837 840 842 853 868 896 971 981 986 995 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 17 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[8 4 42 77 104 141 158 169 192 217 234 244 340 356 343 367 374 393 427 430 433 468 475 477 481 483 507 526 549 557 609 616 611 644 645 678 695 704 758 745 772 794 803 806 825 836 841 858 885 943 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[15 49 77 101 107 140 129 151 156 158 185 219 224 235 236 243 264 271 302 304 329 335 346 435 436 453 472 479 480 496 563 568 571 591 633 673 651 712 718 741 765 775 782 815 859 893 912 918 935 988 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[26 69 77 115 121 141 151 217 243 244 275 293 301 309 313 341 345 366 365 372 391 398 510 516 518 520 542 522 553 572 652 657 660 661 674 705 717 723 789 799 810 849 856 859 876 900 906 942 996 1000 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[7 26 40 48 55 100 118 139 205 246 235 248 269 292 297 356 361 372 393 403 417 435 491 533 544 555 569 572 582 599 597 636 676 692 730 702 758 767 802 807 808 850 884 889 903 911 912 946 968 975 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 48 100 115 131 180 204 205 214 218 247 284 316 289 335 362 382 391 399 403 410 468 469 546 479 550 559 571 592 603 647 654 735 746 751 768 796 795 808 853 859 881 882 905 936 938 941 949 968 981 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[23 57 72 82 90 121 131 165 149 228 243 252 274 285 289 290 306 349 366 385 399 394 405 464 473 530 562 568 604 665 684 693 741 759 797 800 804 805 860 861 866 881 872 885 891 904 905 972 985 995 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[84 29 96 105 134 147 175 179 224 238 255 263 281 290 295 331 332 357 366 406 422 427 442 474 495 509 510 578 606 613 635 665 676 695 714 719 722 726 732 816 819 820 886 915 957 972 975 984 985 991 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 61 76 82 106 122 128 142 136 164 182 183 251 263 332 325 334 385 400 402 410 446 490 504 508 556 571 609 623 629 638 644 660 709 694 714 726 776 793 794 834 842 847 857 899 901 944 919 990 997 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 28 34 47 37 66 116 143 171 213 235 247 309 320 351 330 370 386 397 415 416 474 484 495 512 513 522 572 594 642 681 643 689 707 732 756 760 773 777 799 795 800 830 840 853 866 867 899 951 975 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 12 16 63 79 82 104 121 109 123 141 152 164 208 243 277 327 358 363 382 410 451 483 502 516 524 590 630 633 657 687 658 696 703 706 739 745 761 774 769 780 841 872 880 883 926 929 954 956 986 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 10 17 73 102 122 188 246 252 299 318 325 336 338 343 363 388 401 402 410 419 425 433 435 463 524 535 567 590 637 671 677 698 716 752 753 773 779 797 874 893 896 895 918 921 923 928 940 957 969 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[41 53 50 80 104 122 127 131 148 171 198 235 254 258 299 300 312 334 355 390 404 442 424 445 469 509 545 544 598 639 647 651 653 692 702 747 800 810 822 826 865 868 871 921 938 942 949 948 960 965 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[51 60 84 94 114 121 125 128 138 134 178 192 195 252 277 328 342 333 418 419 462 482 512 550 578 582 584 607 611 612 614 636 680 659 714 733 735 736 743 783 791 792 798 824 864 879 866 910 951 961 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 55 33 60 118 148 253 278 287 289 308 337 339 350 359 385 392 398 417 420 462 511 555 568 587 596 602 643 655 670 692 700 696 734 766 770 793 817 818 855 859 874 884 897 911 915 920 923 938 999 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[9 22 26 48 38 98 110 132 135 156 160 163 180 220 262 266 283 292 316 311 335 363 411 412 424 436 484 502 540 541 571 545 572 585 610 633 656 679 743 764 754 812 814 870 880 902 949 964 985 997 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 3 2 1 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[10 23 27 39 56 73 125 164 171 184 195 209 213 232 244 260 264 447 459 465 478 486 519 520 543 554 556 570 579 586 595 596 621 637 644 673 657 677 678 680 688 704 754 763 880 891 910 912 942 984 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[18 16 37 54 59 75 91 101 142 154 194 199 205 234 259 268 317 284 342 351 363 378 417 418 425 491 505 536 563 608 617 624 649 688 709 716 727 821 824 829 850 832 893 903 950 955 957 964 979 988 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[12 61 20 64 70 81 150 158 170 175 201 282 304 307 338 391 366 397 407 428 432 473 492 501 508 533 563 557 579 589 603 631 636 645 648 656 714 685 718 740 742 814 824 842 863 871 927 941 965 986 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[6 14 24 31 39 48 52 60 82 125 164 141 195 213 234 239 255 287 318 334 357 387 369 410 417 421 431 444 446 510 514 547 680 653 684 709 720 765 791 802 823 840 858 871 891 892 950 927 983 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[12 15 37 48 71 74 101 95 104 148 153 162 208 215 269 227 320 356 359 372 406 455 463 477 486 498 559 596 645 651 664 693 665 751 756 779 785 827 804 844 852 874 887 904 905 936 961 982 983 991 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 65 68 71 124 173 181 190 195 204 221 220 304 339 321 352 362 363 368 369 403 415 490 514 520 536 548 550 586 589 592 623 655 638 700 744 755 762 779 789 842 850 865 881 916 924 956 938 987 998 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[48 52 94 107 134 113 186 202 231 233 253 257 274 296 324 332 338 351 356 357 358 393 489 482 519 527 534 537 560 568 604 612 611 617 705 707 730 755 782 812 784 828 867 916 937 948 966 967 971 988 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[55 15 107 117 155 157 198 236 240 245 285 288 302 364 376 380 402 416 421 434 478 488 501 504 567 568 629 644 646 673 657 686 690 740 744 755 769 770 783 792 818 860 855 865 904 905 917 935 971 984 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[80 30 92 103 143 182 200 202 217 222 229 245 273 278 283 303 360 445 446 466 486 489 505 516 547 576 614 630 624 643 671 695 697 709 715 730 739 743 746 768 786 810 872 888 949 938 951 952 959 982 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[41 61 83 126 142 188 214 218 242 249 269 265 315 334 362 369 371 438 454 459 484 464 485 497 501 522 548 568 586 605 614 686 654 701 706 726 732 736 742 765 792 810 823 842 832 846 853 877 891 980 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[20 22 27 74 91 77 144 147 154 269 287 327 328 348 349 386 432 433 438 470 491 550 556 586 588 592 610 640 686 716 722 733 734 736 740 758 779 796 804 805 836 857 901 912 938 940 942 981 990 989 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 13 52 28 149 156 187 223 262 268 269 292 309 332 347 379 373 462 484 501 505 506 524 527 539 544 627 656 660 666 669 677 704 679 712 752 780 783 863 877 882 891 904 937 910 970 979 988 993 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[16 46 60 67 71 77 81 102 123 140 143 145 178 249 271 260 336 366 409 470 471 489 497 529 536 596 597 610 664 662 673 677 694 698 718 742 755 759 783 807 850 844 879 880 903 913 915 922 945 959 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[988 988 988 988 988 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[7 13 14 122 128 154 170 184 193 191 224 241 260 296 299 305 311 316 375 381 424 425 429 437 476 477 488 503 546 532 564 585 665 669 677 689 823 838 831 857 859 877 883 897 918 927 935 948 973 987 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(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":18,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-05T02:13:07.000Z","updated_at":"2026-03-11T10:04:13.000Z","published_at":"2013-10-05T03:12:16.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=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 Veterans Ocean View\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Small data set witn N\u0026lt;=50 and Q\u0026lt;=4, guaranteed.\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 as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\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\u003eSuccinct Challenge statement:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\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 V , Vector length N\u0026lt;=50 with values 1 thru 1000.\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 Q , minimum quantity of removed values to produce a valid vector [0:4]\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 [V] [Q]\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 4 3 3] [2]  for [1 4] or [1 3]\\n[1 2 3 4 5] [0]\\n[4 3 2 1] [3]]]\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) The GJam Small test suite is not robust\\n2) nchoosek(50,4) is too slow for Cody and the 100 cases\\n3) The Large test suite is N\u003c=1000 with some delete cases \u003e4\\n4) A Good Algorithm that solves the Large case is usually best to pursue\\n5) GJam Competition allows one Large submission within 10 minutes of download \\n6) \u003cLarge Suite Challenge\u003e]]\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\"}]}"},{"id":2186,"title":"GJam 2012 Qualifier: Tongues","description":"This Challenge is a Warm-Up for \u003chttp://code.google.com/codejam/schedule.html Google Code Jam 2014\u003e Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.\r\n\r\nThis Challenge is \u003chttp://code.google.com/codejam/contest/1460488/dashboard Tongues from 2012 Qualifier\u003e, an alphabet substitution. The \"Googlerese\" needs to be translated back to normal. Normal to G samples are  'a' -\u003e 'y', 'o' -\u003e 'e', and 'z' -\u003e 'q'. This means that \"a zoo\" will become \"y qee\" in G. \r\n\r\nAdditional samples of G to Normal to determine translation are:\r\n\r\n  ejp mysljylc kd kxveddknmc re jsicpdrysi\r\n  rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd\r\n  de kr kd eoya kw aej tysr re ujdr lkgc jv\r\n  to:\r\n  our language is impossible to understand\r\n  there are twenty six factorial possibilities\r\n  so it is okay if you want to just give up\r\n\r\n*Input:* str  of G\r\n\r\n*Output:* str of translated letters\r\n\r\n*Google Code Jam Notes:*\r\nThe contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.\r\n\r\n\r\n\r\n\r\n  ","description_html":"\u003cp\u003eThis Challenge is a Warm-Up for \u003ca href = \"http://code.google.com/codejam/schedule.html\"\u003eGoogle Code Jam 2014\u003c/a\u003e Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.\u003c/p\u003e\u003cp\u003eThis Challenge is \u003ca href = \"http://code.google.com/codejam/contest/1460488/dashboard\"\u003eTongues from 2012 Qualifier\u003c/a\u003e, an alphabet substitution. The \"Googlerese\" needs to be translated back to normal. Normal to G samples are  'a' -\u0026gt; 'y', 'o' -\u0026gt; 'e', and 'z' -\u0026gt; 'q'. This means that \"a zoo\" will become \"y qee\" in G.\u003c/p\u003e\u003cp\u003eAdditional samples of G to Normal to determine translation are:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eejp mysljylc kd kxveddknmc re jsicpdrysi\r\nrbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd\r\nde kr kd eoya kw aej tysr re ujdr lkgc jv\r\nto:\r\nour language is impossible to understand\r\nthere are twenty six factorial possibilities\r\nso it is okay if you want to just give up\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e str  of G\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e str of translated letters\u003c/p\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam Notes:\u003c/b\u003e\r\nThe contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.\u003c/p\u003e","function_template":"function str = Tongues(sin)\r\n  str=sin;\r\nend","test_suite":"%%\r\nsin='ejp mysljylc kd kxveddknmc re jsicpdrysi';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'our language is impossible to understand'))\r\n%%\r\nsin='rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'there are twenty six factorial possibilities'))\r\n%%\r\nsin='de kr kd eoya kw aej tysr re ujdr lkgc jv';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'so it is okay if you want to just give up'))\r\n%%\r\nsin='hello i am the google code jam test data';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'xoggk d yl wxo vkkvgo ekso uyl wonw sywy'))\r\n%%\r\nsin='how are you';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'xkf yto akj'))\r\n%%\r\nsin='aynny iynny aynny iynny aynny iynny aynny iynny aynny iynny aynny iynny aynny iynny aynny ieeeeeeeee';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'yabba dabba yabba dabba yabba dabba yabba dabba yabba dabba yabba dabba yabba dabba yabba dooooooooo'))\r\n%%\r\nsin='y n f i c w l b k u o m x s e v z p d r j g a t h a q set k oset xa ynfd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'a b c d e f g h i j k l m n o p q r s t u v y w x y z now i know my abcs'))\r\n%%\r\nsin='schr rkxc tesr aej dksl tkrb xc';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'next time wont you sing with me'))\r\n%%\r\nsin='wep rbedc tbe dvcyo ks y resljc ie ser dvcyo re erbcp vcevmc';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'for those who speak in a tongue do not speak to other people'))\r\n%%\r\nsin='seneia jsicpdrysid rbcx dksfc rbca ypc dvcyoksl xadrcpkcd ks rbc dvkpkr';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'nobody understands them since they are speaking mysteries in the spirit'))\r\n%%\r\nsin='rbkd kd de chfkrksl k bygc re le rbc nyrbpeex';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'this is so exciting i have to go the bathroom'))\r\n%%\r\nsin='kr tyd rbc ncdr ew rkxcd kr tyd rbc nmjpdr ew rkxcd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'it was the best of times it was the blurst of times'))\r\n%%\r\nsin='mcr mkvd ie tbyr bysid ie';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'let lips do what hands do'))\r\n%%\r\nsin='rbkd bcpc kd ljsveticp yfrkgyrci rtcsra dcgcs fymkncp wjmm yjre se okfonyfo sykmrbpetksl xyabcx';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'this here is gunpowder activated twenty seven caliber full auto no kickback nailthrowing mayhem'))\r\n%%\r\nsin='k bygc ncdrci wpjkr dvkoc ysi xees set k dbymm ncdr aej rbc lja';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'i have bested fruit spike and moon now i shall best you the guy'))\r\n%%\r\nsin='eb byk kx ks jp fexvjrcp cyrksl aejp fbccqnjplcpd ysi leelmcpcdksl aejp rchrq';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'oh hai im in ur computer eating your cheezburgers and googleresing your textz'))\r\n%%\r\nsin='ys cac wep ys cac ysi y vklces wep y vklces';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'an eye for an eye and a pigeon for a pigeon'))\r\n%%\r\nsin='ymm aejp nydc ypc ncmesl re cppep rbc dveesa nypi';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'all your base are belong to error the spoony bard'))\r\n%%\r\nsin='aej vkddci eww rbc fbkfocs myia';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'you pissed off the chicken lady'))\r\n%%\r\nsin='set kd rbc djxxcp ew ejp myfo ew ikdfesrcsr';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'now is the summer of our lack of discontent'))\r\n%%\r\nsin='na rbc vpkfoksl ew xa rbjxnd dexcrbksl tkfoci rbkd tya fexcd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'by the pricking of my thumbs something wicked this way comes'))\r\n%%\r\nsin='ks y tepmi ew ikpctemgcd ysi mkesd dexcrkxcd rbc pypcdr fpcyrjpc kd y wpkcsi';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'in a world of direwolves and lions sometimes the rarest creature is a friend'))\r\n%%\r\nsin='lpccrksld fbccdc vevdkfmc rbc sjxncp aej bygc ikymci kd fjppcsrma ejr ew vepofbevd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'greetings cheese popsicle the number you have dialed is currently out of porkchops'))\r\n%%\r\nsin='tba ie vpelpyxxcpd ymtyad xkh jv bymmetccs ysi fbpkdrxyd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'why do programmers always mix up halloween and christmas'))\r\n%%\r\nsin='kx fexxysicp dbcvypi ysi rbkd kd xa wygepkrc vpenmcx es rbc leelmc feic uyx';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'im commander shepard and this is my favorite problem on the google code jam'))\r\n%%\r\nsin='w ew rte czjymd w ew esc czjymd esc';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'f of two equals f of one equals one'))\r\n%%\r\nsin='wep k ncrtccs rbpcc ysi s w ew k czjymd w ew k xksjd esc vmjd w ew k xksjd rte';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'for i between three and n f of i equals f of i minus one plus f of i minus two'))\r\n%%\r\nsin='bet ypc aej bemiksl jv ncfyjdc kx y veryre';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'how are you holding up because im a potato'))\r\n%%\r\nsin='ip qykjd ip qykjd ip qykjd ip qykjd eeeeeeeeeeeeb ip qykjd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'dr zaius dr zaius dr zaius dr zaius ooooooooooooh dr zaius'))\r\n%%\r\nsin='tbeeeeeeeeeeeeeeeeeeeyyyyyyyyy k oset f vmjd vmjd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'whoooooooooooooooooooaaaaaaaaa i know c plus plus'))\r\n","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":19,"test_suite_updated_at":"2014-02-16T18:14:55.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-02-16T18:04:01.000Z","updated_at":"2026-01-28T10:40:23.000Z","published_at":"2014-02-16T18:11:52.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 a Warm-Up for\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/schedule.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2014\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.\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\u003eThis Challenge is\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/1460488/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eTongues from 2012 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, an alphabet substitution. The \\\"Googlerese\\\" needs to be translated back to normal. Normal to G samples are 'a' -\u0026gt; 'y', 'o' -\u0026gt; 'e', and 'z' -\u0026gt; 'q'. This means that \\\"a zoo\\\" will become \\\"y qee\\\" in G.\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\u003eAdditional samples of G to Normal to determine translation are:\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[ejp mysljylc kd kxveddknmc re jsicpdrysi\\nrbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd\\nde kr kd eoya kw aej tysr re ujdr lkgc jv\\nto:\\nour language is impossible to understand\\nthere are twenty six factorial possibilities\\nso it is okay if you want to just give up]]\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e str of G\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 str of translated letters\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\u003eGoogle Code Jam Notes:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.\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\"}]}"},{"id":1902,"title":"GJam 2014 China Rd A: Read Phone Number (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number\u003e. Large Case.\r\n\r\nThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively. The \u003e 10 repeats occurs in the Large Data set.\r\n\r\n\r\n*Input:* [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\r\n\r\n*Output:* Text, a string of the reading based upon segments\r\n\r\n*Examples:*\r\n\r\n  [Number,Segments]  [Text]\r\n    ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n    ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n    \r\n\r\n*Contest Performance:* Best Time of 12 minutes with 1094 of 3058 able to process the Large data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard\"\u003eGJam 2014 China Read Phone Number\u003c/a\u003e. Large Case.\u003c/p\u003e\u003cp\u003eThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively. The \u003e 10 repeats occurs in the Large Data set.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Text, a string of the reading based upon segments\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Number,Segments]  [Text]\r\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Time of 12 minutes with 1094 of 3058 able to process the Large data set.\u003c/p\u003e","function_template":"function Text = Phone_CH(str,v) %\r\n Text='';\r\nend\r\n\r\n% One method for inserting strings from a cell array\r\nfunction valuestr=Phone_number(x)\r\n valuecell={'zero' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine'};\r\n valuestr=valuecell{x+1};\r\nend\r\n\r\nfunction qtystr=Phone_qty(x)\r\n qtycell={'' 'double' 'triple' 'quadruple' 'quintuple' 'sextuple' 'septuple' 'octuple' 'nonuple' 'decuple'};\r\n qtystr=qtycell{x};\r\nend","test_suite":"%%\r\ntic\r\nzstr='0000000000';\r\nzv=[10 ];\r\nvexp='decuple zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';\r\nzv=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ];\r\nvexp='one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';\r\nzv=[1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ];\r\nvexp='one double one triple one quadruple one quintuple one sextuple one septuple one octuple one nonuple one decuple one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6701604014038409645317871541814818042765712319652041768196456846465134589785405932716870450845696942';\r\nzv=[18 53 27 2 ];\r\nvexp='six seven zero one six zero four zero one four zero three eight four zero nine six four five three one seven eight seven one five four one eight one four eight one eight zero four two seven six five seven one two three one nine six five two zero four one seven six eight one nine six four five six eight four six four six five one three four five eight nine seven eight five four zero five nine three two seven one six eight seven zero four five zero eight four five six nine six nine four two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7948353719781965623468317824953101456187089254894578076436069073736717501261569457261541306241739435';\r\nzv=[67 24 2 7 ];\r\nvexp='seven nine four eight three five three seven one nine seven eight one nine six five six two three four six eight three one seven eight two four nine five three one zero one four five six one eight seven zero eight nine two five four eight nine four five seven eight zero seven six four three six zero six nine zero seven three seven three six seven one seven five zero one two six one five six nine four five seven two six one five four one three zero six two four one seven three nine four three five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4278368013428262027948460184086902458706181428387549853031942964639495026306271567618562640383239305';\r\nzv=[99 1 ];\r\nvexp='four two seven eight three six eight zero one three four two eight two six two zero two seven nine four eight four six zero one eight four zero eight six nine zero two four five eight seven zero six one eight one four two eight three eight seven five four nine eight five three zero three one nine four two nine six four six three nine four nine five zero two six three zero six two seven one five six seven six one eight five six two six four zero three eight three two three nine three zero five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9464820841980697178401716583034690432403485084358767843859195212565106243810816790591659815789420929';\r\nzv=[23 54 6 3 12 2 ];\r\nvexp='nine four six four eight two zero eight four one nine eight zero six nine seven one seven eight four zero one seven one six five eight three zero three four six nine zero four three two four zero three four eight five zero eight four three five eight seven six seven eight four three eight five nine one nine five two one two five six five one zero six two four three eight one zero eight one six seven nine zero five nine one six five nine eight one five seven eight nine four two zero nine two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1239417614204605186382638961928216123515856310156537949350505058426185417564013152480630168120385902';\r\nzv=[9 20 68 3 ];\r\nvexp='one two three nine four one seven six one four two zero four six zero five one eight six three eight two six three eight nine six one nine two eight two one six one two three five one five eight five six three one zero one five six five three seven nine four nine three five zero five zero five zero five eight four two six one eight five four one seven five six four zero one three one five two four eight zero six three zero one six eight one two zero three eight five nine zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5705658716138187897089238034926826854932909071213569698472175680807126039351827987289593273256549721';\r\nzv=[23 49 6 21 1 ];\r\nvexp='five seven zero five six five eight seven one six one three eight one eight seven eight nine seven zero eight nine two three eight zero three four nine two six eight two six eight five four nine three two nine zero nine zero seven one two one three five six nine six nine eight four seven two one seven five six eight zero eight zero seven one two six zero three nine three five one eight two seven nine eight seven two eight nine five nine three two seven three two five six five four nine seven two one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5496587298081832124197901212051639570370452063174067189290683532890857290152921651676725291709858268';\r\nzv=[84 12 1 1 2 ];\r\nvexp='five four nine six five eight seven two nine eight zero eight one eight three two one two four one nine seven nine zero one two one two zero five one six three nine five seven zero three seven zero four five two zero six three one seven four zero six seven one eight nine two nine zero six eight three five three two eight nine zero eight five seven two nine zero one five two nine two one six five one six seven six seven two five two nine one seven zero nine eight five eight two six eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6046727253505468724903978269465059754529308478929632170216741630304035454232162816186394257019613649';\r\nzv=[21 13 16 7 19 17 7 ];\r\nvexp='six zero four six seven two seven two five three five zero five four six eight seven two four nine zero three nine seven eight two six nine four six five zero five nine seven five four five two nine three zero eight four seven eight nine two nine six three two one seven zero two one six seven four one six three zero three zero four zero three five four five four two three two one six two eight one six one eight six three nine four two five seven zero one nine six one three six four nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9709324183067148146829125827086805141425714050976780595295963087561738097976891946025083503270131874';\r\nzv=[19 40 15 25 1 ];\r\nvexp='nine seven zero nine three two four one eight three zero six seven one four eight one four six eight two nine one two five eight two seven zero eight six eight zero five one four one four two five seven one four zero five zero nine seven six seven eight zero five nine five two nine five nine six three zero eight seven five six one seven three eight zero nine seven nine seven six eight nine one nine four six zero two five zero eight three five zero three two seven zero one three one eight seven four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5935294040195821091284183159414635231362074061646489573631084519431981565623091096745285242356956132';\r\nzv=[49 2 47 2 ];\r\nvexp='five nine three five two nine four zero four zero one nine five eight two one zero nine one two eight four one eight three one five nine four one four six three five two three one three six two zero seven four zero six one six four six four eight nine five seven three six three one zero eight four five one nine four three one nine eight one five six five six two three zero nine one zero nine six seven four five two eight five two four two three five six nine five six one three two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='68420979858341861054645438226544';\r\nzv=[9 14 9 ];\r\nvexp='six eight four two zero nine seven nine eight five eight three four one eight six one zero five four six four five four three eight double two six five double four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='95673537815030404160202058788558325698592015367995915420';\r\nzv=[3 12 11 12 7 10 1 ];\r\nvexp='nine five six seven three five three seven eight one five zero three zero four zero four one six zero two zero two zero five eight seven double eight double five eight three two five six nine eight five nine two zero one five three six seven double nine five nine one five four two zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2917155597708068980673145819211425430909609607407685919790633007543533613';\r\nzv=[8 4 12 5 15 4 8 12 5 ];\r\nvexp='two nine one seven one triple five nine double seven zero eight zero six eight nine eight zero six seven three one four five eight one nine two double one four two five four three zero nine zero nine six zero nine six zero seven four zero seven six eight five nine one nine seven nine zero six double three double zero seven five four three five double three six one three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7898081583437702364634490213008907725195448';\r\nzv=[10 12 6 12 2 1 ];\r\nvexp='seven eight nine eight zero eight one five eight three four three double seven zero two three six four six three four four nine zero two one three double zero eight nine zero double seven two five one nine five double four eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='437260442554900624648844197922288914270446';\r\nzv=[11 6 9 6 3 1 3 2 1 ];\r\nvexp='four three seven two six zero double four two double five four nine double zero six two four six four double eight double four one nine seven nine triple two eight eight nine one four two seven zero double four six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2789225013517271635527397201226697731452904643719381232152395186872927418002375223547884014744';\r\nzv=[5 9 7 2 15 1 6 4 8 9 9 3 7 5 4 ];\r\nvexp='two seven eight nine two two five zero one three five one seven two seven one six three double five two seven three nine seven two zero one double two double six nine double seven three one four five two nine zero four six four three seven one nine three eight one two three two one five two three nine five one eight six eight seven two nine two seven four one eight double zero two three seven five double two three five four seven double eight four zero one four seven double four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='745443046641006460911871735664538092408084394952066353448004450489821840381778094629976796';\r\nzv=[9 1 15 14 15 8 14 7 3 2 1 1 ];\r\nvexp='seven four five double four three zero four six six four one double zero six four six zero nine double one eight seven one seven three five double six four five three eight zero nine two four zero eight zero eight four three nine four nine five two zero double six three five three double four eight double zero double four five zero four eight nine eight two one eight four zero three eight one seven seven eight zero nine four six two double nine seven six seven nine six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9389581629278714115270272359258386234328448241872301648883';\r\nzv=[15 3 1 13 6 5 7 5 3 ];\r\nvexp='nine three eight nine five eight one six two nine two seven eight seven one four double one five two seven zero two seven two three five nine two five eight three eight six two three four three two eight double four eight two four one eight seven two three zero one six four eight double eight three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='638110728463471172123321819781344177341197656065297520823913148755582611608';\r\nzv=[10 6 8 1 15 12 5 7 2 3 4 1 1 ];\r\nvexp='six three eight double one zero seven two eight four six three four seven double one seven two one two double three two one eight one nine seven eight one three double four one double seven three four double one nine seven six five six zero six five two nine seven five two zero eight two three nine one three one four eight seven double five five eight two six double one six zero eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1133185809510432';\r\nzv=[15 1 ];\r\nvexp='double one double three one eight five eight zero nine five one zero four three two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='238728670935325997878047006508522404463678112601608414215085957397966';\r\nzv=[13 8 4 13 10 15 6 ];\r\nvexp='two three eight seven two eight six seven zero nine three five three two five double nine seven eight seven eight zero four seven zero zero six five zero eight five double two four zero double four six three six seven eight double one two six zero one six zero eight four one four two one five zero eight five nine five seven three nine seven nine double six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='85658191899305236022867183837318073902283214947760248177452103132443861485891';\r\nzv=[1 10 15 8 4 6 7 15 8 1 1 1 ];\r\nvexp='eight five six five eight one nine one eight double nine three zero five two three six zero double two eight six seven one eight three eight three seven three one eight zero seven three nine zero two two eight three two one four nine four double seven six zero two four eight one double seven four five two one zero three one three two four four three eight six one four eight five eight nine one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='21770416464691789037472471701235435696232613781886745983083308143822448829';\r\nzv=[2 8 11 10 8 14 6 11 1 1 1 1 ];\r\nvexp='two one double seven zero four one six four six four six nine one seven eight nine zero three seven four seven two four seven one seven zero one two three five four three five six nine six two three two six one three seven eight one double eight six seven four five nine eight three zero eight three three zero eight one four three eight double two double four eight eight two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='983249024136170290772296855218428763965301110152249';\r\nzv=[2 15 14 15 4 1 ];\r\nvexp='nine eight three two four nine zero two four one three six one seven zero two nine zero double seven double two nine six eight double five two one eight four two eight seven six three nine six five three zero triple one zero one five double two four nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3480983214378717507995103066016574662185732516268288798294927774350570';\r\nzv=[13 10 15 11 3 3 14 1 ];\r\nvexp='three four eight zero nine eight three two one four three seven eight seven one seven five zero seven double nine five one zero three zero double six zero one six five seven four double six two one eight five seven three two five one six two six eight two double eight seven nine eight two nine four nine two triple seven four three five zero five seven zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='839728044162856119809065784052255130156664';\r\nzv=[9 7 10 15 1 ];\r\nvexp='eight three nine seven two eight zero double four one six two eight five six one one nine eight zero nine zero six five seven eight four zero five double two double five one three zero one five triple six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1299716932675600468864013262733864936641800591739546149687053359054618';\r\nzv=[5 7 14 1 12 3 14 6 4 2 1 1 ];\r\nvexp='one two double nine seven one six nine three two six seven five six double zero four six double eight six four zero one three two six two seven double three eight six four nine three double six four one eight zero zero five nine one seven three nine five four six one four nine six eight seven zero five double three five nine zero five four six one eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7896269726657598138802619158139810768633428179202282443571484595761847181128041281628185246';\r\nzv=[2 7 8 5 6 6 11 9 5 10 12 3 7 ];\r\nvexp='seven eight nine six two six nine seven two double six five seven five nine eight one three double eight zero two six one nine one five eight one three nine eight one zero seven six eight six double three four two eight one seven nine two zero double two eight two double four three five seven one four eight four five nine five seven six one eight four seven one eight double one two eight zero four one two eight one six two eight one eight five two four six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='477658486684842559974665174626263159299857463838945503033';\r\nzv=[11 11 6 14 10 2 3 ];\r\nvexp='four double seven six five eight four eight double six eight four eight four two double five double nine seven four six six five one seven four six two six two six three one five nine two double nine eight five seven four six three eight three eight nine four double five zero three zero double three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='06875538368304839162889133713';\r\nzv=[3 10 1 14 1 ];\r\nvexp='zero six eight seven double five three eight three six eight three zero four eight three nine one six two double eight nine one double three seven one three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='45256104997445504657800410480176721551263917689055037098246476060427763254223140';\r\nzv=[14 10 11 2 3 5 12 15 1 4 2 1 ];\r\nvexp='four five two five six one zero four double nine seven double four five five zero four six five seven eight double zero four one zero four eight zero one seven six seven two one double five one two six three nine one seven six eight nine zero double five zero three seven zero nine eight two four six four seven six zero six zero four two double seven six three two five four double two three one four zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6500507266637983912546668295413265536254049737120594152282943472025861287250184';\r\nzv=[3 9 4 9 13 7 7 15 10 1 1 ];\r\nvexp='six five zero zero five zero seven two triple six three seven nine eight three nine one two five four triple six eight two nine five four one three two six double five three six two five four zero four nine seven three seven one two zero five nine four one five double two eight two nine four three four seven two zero two five eight six one two eight seven two five zero one eight four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='90536923431844238372096379800359312024577754107934353901';\r\nzv=[9 14 14 11 5 3 ];\r\nvexp='nine zero five three six nine two three four three one eight double four two three eight three seven two zero nine six three seven nine eight double zero three five nine three one two zero two four five triple seven five four one zero seven nine three four three five three nine zero one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='194851729139154581103404918805045722094939046615745185586389015707908521547319803514384134067';\r\nzv=[6 4 13 10 9 14 6 11 3 9 2 2 3 1 ];\r\nvexp='one nine four eight five one seven two nine one three nine one five four five eight double one zero three four zero four nine one double eight zero five zero four five seven double two zero nine four nine three nine zero four double six one five seven four five one eight double five eight six three eight nine zero one five seven zero seven nine zero eight five two one five four seven three one nine eight zero three five one four three eight four one three four zero six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7180221794361';\r\nzv=[3 7 3 ];\r\nvexp='seven one eight zero double two one seven nine four three six one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='328104734424917711259192901583138150643217809';\r\nzv=[3 8 8 15 5 5 1 ];\r\nvexp='three two eight one zero four seven three double four two four nine one double seven double one two five nine one nine two nine zero one five eight three one three eight one five zero six four three two one seven eight zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4012446744';\r\nzv=[8 1 1 ];\r\nvexp='four zero one two double four six seven four four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='75159567609950672038714189757246751900662587864067030579646570165557726996672';\r\nzv=[13 15 11 7 1 15 8 3 4 ];\r\nvexp='seven five one five nine five six seven six zero double nine five zero six seven two zero three eight seven one four one eight nine seven five seven two four six seven five one nine double zero six six two five eight seven eight six four zero six seven zero three zero five seven nine six four six five seven zero one six triple five double seven two six double nine double six seven two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3799620377074233419333355599242743805155864309640885130882726110701418994547411411126234428060';\r\nzv=[7 9 1 15 13 7 8 15 8 2 6 3 ];\r\nvexp='three seven double nine six two zero three double seven zero seven four two double three four one nine quadruple three triple five double nine two four two seven four three eight zero five one double five eight six four three zero nine six four zero double eight five one three zero double eight two seven two six double one zero seven zero one four one eight double nine four five four seven four double one four triple one two six two three double four two eight zero six zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4044617922891601574869890265644168731524925085154541620867323759734908590210726392474762696192267779';\r\nzv=[11 10 11 14 12 2 4 1 11 7 10 2 1 4 ];\r\nvexp='four zero double four six one seven nine double two eight nine one six zero one five seven four eight six nine eight nine zero two six five six double four one six eight seven three one five two four nine two five zero eight five one five four five four one six two zero eight six seven three two three seven five nine seven three four nine zero eight five nine zero two one zero seven two six three nine two four seven four seven six two six nine six one nine double two six triple seven nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='496013127684385845636701597670212145677337967472957547809568709115873526515';\r\nzv=[3 3 8 7 2 10 9 4 15 9 5 ];\r\nvexp='four nine six zero one three one two seven six eight four three eight five eight four five six three six seven zero one five nine seven six seven zero two one two one four five six double seven double three seven nine six seven four seven two nine five seven five four seven eight zero nine five six eight seven zero nine double one five eight seven three five two six five one five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='820821167030568093577157791027439613729645803722099835506620383';\r\nzv=[10 5 12 5 9 7 12 1 1 1 ];\r\nvexp='eight two zero eight two double one six seven zero three zero five six eight zero nine three five double seven one five double seven nine one zero two seven four three nine six one three seven two nine six four five eight zero three seven double two zero double nine eight three double five zero double six two zero three eight three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='408657487448884114668701663855295152810754544275633734090577026733934929585122688051672821523';\r\nzv=[9 12 14 7 13 4 11 14 5 1 1 2 ];\r\nvexp='four zero eight six five seven four eight seven double four triple eight four double one four double six eight seven zero one double six three eight double five two nine five one five two eight one zero seven five four five double four two seven five six double three seven three four zero nine zero five seven seven zero two six seven double three nine three four nine two nine five eight five one double two six double eight zero five one six seven two eight two one five two three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='83666830362426720310982782694422780383449883455418709';\r\nzv=[12 1 5 6 9 9 3 2 5 1 ];\r\nvexp='eight three triple six eight three zero three six two four two six seven two zero three one zero nine eight two seven eight two six nine double four double two seven eight zero three eight three double four nine eight eight three four double five four one eight seven zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='70';\r\nzv=[2 ];\r\nvexp='seven zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='65766688929471206192343267171090766327239398418349595012751051227962607';\r\nzv=[3 11 13 6 13 11 9 5 ];\r\nvexp='six five seven triple six double eight nine two nine four seven one two zero six one nine two three four three two six seven one seven one zero nine zero seven double six three two seven two three nine three nine eight four one eight three four nine five nine five zero one two seven five one zero five one double two seven nine six two six zero seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='48133338660378550326078225767453276529';\r\nzv=[11 14 13 ];\r\nvexp='four eight one quadruple three eight double six zero three seven eight double five zero three two six zero seven eight double two five seven six seven four five three two seven six five two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='36891843662484180026365939189054753849425696106318144849957054540856';\r\nzv=[1 5 14 8 6 13 11 4 2 3 1 ];\r\nvexp='three six eight nine one eight four three double six two four eight four one eight double zero two six three six five nine three nine one eight nine zero five four seven five three eight four nine four two five six nine six one zero six three one eight one double four eight four double nine five seven zero five four five four zero eight five six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='34612462486594272419457058352837598957197066493857794521556931700796417114875';\r\nzv=[4 3 13 11 10 4 7 7 6 8 4 ];\r\nvexp='three four six one two four six two four eight six five nine four two seven two four one nine four five seven zero five eight three five two eight three seven five nine eight nine five seven one nine seven zero double six four nine three eight five double seven nine four five two one double five six nine three one seven double zero seven nine six four one seven double one four eight seven five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='589307734140137421765302377855535665358764079941118868097';\r\nzv=[5 11 10 15 1 13 1 1 ];\r\nvexp='five eight nine three zero double seven three four one four zero one three seven four two one seven six five three zero two three seven seven eight triple five three five double six five three five eight seven six four zero seven double nine four triple one double eight six eight zero nine seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3672631606882947123107630174376653028408088502237547432460099875379219240390535201264402423';\r\nzv=[12 1 6 4 1 9 13 15 7 12 6 2 3 ];\r\nvexp='three six seven two six three one six zero six double eight two nine four seven one two three one zero seven six three zero one seven four three seven double six five three zero two eight four zero eight zero double eight five zero two two three seven five four seven four three two four six double zero double nine eight seven five three seven nine two one nine two four zero three nine zero five three five two zero one two six double four zero two four two three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='071297839181663799718842689232241580363293469938821908366311';\r\nzv=[8 9 3 4 4 1 4 9 15 2 1 ];\r\nvexp='zero seven one two nine seven eight three nine one eight one double six three seven nine nine seven one double eight four two six eight nine two three double two four one five eight zero three six three two nine three four six double nine three double eight two one nine zero eight three double six three one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='76980639645671034156972091320389208';\r\nzv=[5 9 7 9 2 2 1 ];\r\nvexp='seven six nine eight zero six three nine six four five six seven one zero three four one five six nine seven two zero nine one three two zero three eight nine two zero eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5521307963254865684315120841260812155841496873543096528814951132569054';\r\nzv=[13 5 14 11 13 8 1 3 2 ];\r\nvexp='double five two one three zero seven nine six three two five four eight six five six eight four three one five one two zero eight four one two six zero eight one two one double five eight four one four nine six eight seven three five four three zero nine six five two double eight one four nine five double one three two five six nine zero five four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9288';\r\nzv=[2 1 1 ];\r\nvexp='nine two eight eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0477182564467935086';\r\nzv=[15 3 1 ];\r\nvexp='zero four double seven one eight two five six double four six seven nine three five zero eight six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1433203960656799099205210173223686919427402173272324965993447708611755416843183525933643187989942239';\r\nzv=[8 10 1 14 8 13 15 6 1 13 8 3 ];\r\nvexp='one four double three two zero three nine six zero six five six seven double nine zero nine nine two zero five two one zero one seven three double two three six eight six nine one nine four two seven four zero two one seven three two seven two three two four nine six five double nine three double four double seven zero eight six double one seven five five four one six eight four three one eight three five two five nine double three six four three one eight seven nine eight double nine four two two three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='82446767675781104095354046763771917813590078380710445861437926027908370597627610';\r\nzv=[9 1 2 4 4 3 2 15 14 9 4 6 1 5 1 ];\r\nvexp='eight two double four six seven six seven six seven five seven eight double one zero four zero nine five three five four zero four six seven six three double seven one nine one seven eight one three five nine double zero seven eight three eight zero seven one zero double four five eight six one four three seven nine two six zero two seven nine zero eight three seven zero five nine seven six two seven six one zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='305859569860086103046061825673705281159146364994491117222909271811137063811520971285027239387660793';\r\nzv=[12 2 7 15 6 3 1 6 3 8 7 10 5 10 4 ];\r\nvexp='three zero five eight five nine five six nine eight six zero zero eight six one zero three zero four six zero six one eight two five six seven three seven zero five two eight one one five nine one four six three six four nine nine double four nine double one one seven two double two nine zero nine two seven one eight triple one three seven zero six three eight double one five two zero nine seven one two eight five zero two seven two three nine three eight seven double six zero seven nine three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5190986793820061002';\r\nzv=[8 7 4 ];\r\nvexp='five one nine zero nine eight six seven nine three eight two double zero six one double zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='732818804656837051738362946791984298270657440266341399683255575214033229065283049378339674351';\r\nzv=[10 3 8 14 3 4 13 7 3 4 14 9 1 ];\r\nvexp='seven three two eight one double eight zero four six five six eight three seven zero five one seven three eight three six two nine four six seven nine one nine eight four two nine eight two seven zero six five seven double four zero two double six three four one three double nine six eight three two triple five seven five two one four zero double three double two nine zero six five two eight three zero four nine three seven eight double three nine six seven four three five one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='22878757492589018002205051162666163148087357471571794221657045672188988933603952144766843';\r\nzv=[7 10 8 14 13 5 11 4 15 1 1 ];\r\nvexp='double two eight seven eight seven five seven four nine two five eight nine zero one eight double zero double two zero five zero five double one six two triple six one six three one four eight zero eight seven three five seven four seven one five seven one seven nine four double two one six five seven zero four five six seven two one double eight nine double eight nine double three six zero three nine five two one double four seven double six eight four three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='68748245479848622009943617274780676690467343336858764026953343';\r\nzv=[1 11 14 3 10 13 5 1 1 2 1 ];\r\nvexp='six eight seven four eight two four five four seven nine eight four eight six double two double zero double nine four three six one seven two seven four seven eight zero six seven double six nine zero four six seven three four triple three six eight five eight seven six four zero two six nine five three three four three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='812443820860567150296801089721522978252459617325444234454527699088834091962915459804249813572793576';\r\nzv=[2 8 1 1 15 4 8 14 1 10 8 8 15 1 2 1 ];\r\nvexp='eight one two double four three eight two zero eight six zero five six seven one five zero two nine six eight zero one zero eight nine seven two one five double two nine seven eight two five two four five nine six one seven three two five triple four two three four four five four five two seven six double nine zero triple eight three four zero nine one nine six two nine one five four five nine eight zero four two four nine eight one three five seven two seven nine three five seven six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='00993661068572459991536596938758768256572549986877220';\r\nzv=[9 11 7 7 12 7 ];\r\nvexp='double zero double nine three double six one zero six eight five seven two four five triple nine one five three six five nine six nine three eight seven five eight seven six eight two five six five seven two five four double nine eight six eight double seven double two zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='27715163656297176275418439056931612320615454463000744707732526889213294949588908195775568';\r\nzv=[15 2 13 1 3 6 2 15 4 1 10 9 7 1 ];\r\nvexp='two double seven one five one six three six five six two nine seven one seven six two seven five four one eight four three nine zero five six nine three one six one two three two zero six one five four five double four six three triple zero seven double four seven zero double seven three two five two six double eight nine two one three two nine four nine four nine five double eight nine zero eight one nine five double seven double five six eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='66836591190528744386233121519205009660791065830470';\r\nzv=[9 10 6 12 13 ];\r\nvexp='double six eight three six five nine double one nine zero five two eight seven double four three eight six two double three one two one five one nine two zero five double zero nine double six zero seven nine one zero six five eight three zero four seven zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9908105226888800867627299504353445485000888760967649670742';\r\nzv=[5 6 8 5 2 10 6 7 3 3 3 ];\r\nvexp='double nine zero eight one zero five double two six eight triple eight double zero eight six seven six two seven two nine nine five zero four three five three double four five four eight five triple zero double eight eight seven six zero nine six seven six four nine six seven zero seven four two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='23013192041633596995161673827352665194498573133742450639121977';\r\nzv=[14 9 11 9 10 5 4 ];\r\nvexp='two three zero one three one nine two zero four one six double three five nine six double nine five one six one six seven three eight two seven three five two double six five one nine double four nine eight five seven three one double three seven four two four five zero six three nine one two one nine double seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='561876161628602626933868362823471568496758529903516004832334874950999565539';\r\nzv=[2 14 12 12 1 3 10 14 1 5 1 ];\r\nvexp='five six one eight seven six one six one six two eight six zero two six two six nine double three eight six eight three six two eight two three four seven one five six eight four nine six seven five eight five two double nine zero three five one six double zero four eight three two double three four eight seven four nine five zero double nine nine five six double five three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0659336967718923857487379930716973116724796708015053702806099696109';\r\nzv=[15 10 2 5 12 9 11 2 1 ];\r\nvexp='zero six five nine double three six nine six double seven one eight nine two three eight five seven four eight seven three seven nine nine three zero seven one six nine seven three double one six seven two four seven nine six seven zero eight zero one five zero five three seven zero two eight zero six zero double nine six nine six one zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2544353234854864102426825493629094429744221828448703587259611510954048582897631523802527480763958';\r\nzv=[9 9 5 9 1 11 2 9 5 4 1 10 12 10 ];\r\nvexp='two five double four three five three two three four eight five four eight six four one zero two four two six eight two five four nine three six two nine zero nine double four two nine seven double four double two one eight two eight double four eight seven zero three five eight seven two five nine six one one five one zero nine five four zero four eight five eight two eight nine seven six three one five two three eight zero two five two seven four eight zero seven six three nine five eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='743482174037207702159915214008';\r\nzv=[2 10 10 7 1 ];\r\nvexp='seven four three four eight two one seven four zero three seven two zero double seven zero two one five double nine one five two one four double zero eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='971685936861297496680545';\r\nzv=[2 1 3 3 8 3 2 2 ];\r\nvexp='nine seven one six eight five nine three six eight six one two nine seven four nine double six eight zero five four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='06384119765848786807703567200612243886752458257039700258908161';\r\nzv=[10 1 12 5 9 7 1 8 5 2 2 ];\r\nvexp='zero six three eight four double one nine seven six five eight four eight seven eight six eight zero double seven zero three five six seven two zero zero six one double two four three double eight six seven five two four five eight two five seven zero three nine seven double zero two five eight nine zero eight one six one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='661888688696858666215517613281167258136127005883725278169489607542378190912692984613629598';\r\nzv=[12 6 4 10 8 13 9 12 8 2 2 3 1 ];\r\nvexp='double six one triple eight six double eight six nine six eight five eight triple six two one double five one seven six one three two eight double one six seven two five eight one three six one two seven double zero five double eight three seven two five two seven eight one six nine four eight nine six zero seven five four two three seven eight one nine zero nine one two six nine two nine eight four six one three six two nine five nine eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='11869488318253809620396499';\r\nzv=[8 8 4 4 2 ];\r\nvexp='double one eight six nine four double eight three one eight two five three eight zero nine six two zero three nine six four double nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3247242326877973396352267916489703639981791';\r\nzv=[10 6 9 1 14 3 ];\r\nvexp='three two four seven two four two three two six eight double seven nine seven three three nine six three five double two six seven nine one six four eight nine seven zero three six three double nine eight one seven nine one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='8446827840499583394994945831973919523300569749298887484989096588752282260';\r\nzv=[13 4 10 14 13 11 8 ];\r\nvexp='eight double four six eight two seven eight four zero four double nine five eight double three nine four double nine four nine four five eight three one nine seven three nine one nine five two double three double zero five six nine seven four nine two nine triple eight seven four eight four nine eight nine zero nine six five double eight seven five double two eight double two six zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='411450';\r\nzv=[3 2 1 ];\r\nvexp='four double one four five zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4392336769670743812140126277793124578244122498979213427064735267724740372712';\r\nzv=[11 12 7 15 6 5 10 5 4 1 ];\r\nvexp='four three nine two double three six seven six nine six seven zero seven four three eight one two one four zero one two six two triple seven nine three one two four five seven eight two double four one double two four nine eight nine seven nine two one three four two seven zero six four seven three five two six double seven two four seven four zero three seven two seven one two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='787130205914703441344904';\r\nzv=[5 6 7 4 1 1 ];\r\nvexp='seven eight seven one three zero two zero five nine one four seven zero three double four one three double four nine zero four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='12774525496510270478837791597218598140900';\r\nzv=[3 3 14 8 5 1 6 1 ];\r\nvexp='one two seven seven four five two five four nine six five one zero two seven zero four seven eight eight three double seven nine one five nine seven two one eight five nine eight one four zero nine zero zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='8337240067278766126028792694666601545641';\r\nzv=[1 3 2 9 7 3 12 3 ];\r\nvexp='eight double three seven two four double zero six seven two seven eight seven six six one two six zero two eight seven nine two six nine four quadruple six zero one five four five six four one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='07284423399956161619055960652374322967216';\r\nzv=[3 1 12 6 10 8 1 ];\r\nvexp='zero seven two eight double four two double three triple nine five six one six one six one nine zero five five nine six zero six five two three seven four three double two nine six seven two one six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='014588023080298629688';\r\nzv=[1 11 4 4 1 ];\r\nvexp='zero one four five double eight zero two three zero eight zero two nine eight six two nine six eight eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='391932612615185460799778659969591684168549057796895984';\r\nzv=[13 7 2 2 7 3 14 2 3 1 ];\r\nvexp='three nine one nine three two six one two six one five one eight five four six zero seven nine nine seven seven eight six five double nine six nine five nine one six eight four one six eight five four nine zero five double seven nine six eight nine five nine eight four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='85267068576145';\r\nzv=[9 3 1 1 ];\r\nvexp='eight five two six seven zero six eight five seven six one four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-29T21:50:16.000Z","updated_at":"2013-09-29T21:58:27.000Z","published_at":"2013-09-29T21:58:27.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/2924486/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Read Phone Number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Large Case.\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 Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively. The \u0026gt; 10 repeats occurs in the Large Data set.\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 [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\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 Text, a string of the reading based upon segments\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\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[[Number,Segments]  [Text]\\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 12 minutes with 1094 of 3058 able to process the Large data set.\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\"}]}"},{"id":42778,"title":"GJam March 2016 IOW: Polynesiaglot Medium","description":"This Challenge is derived from GJam March 2016 Annual I/O for Polynesiaglot. This is a subset of small set 2. The max Qraw is 2^50 (\u003c1.1259e15) for C[1,50], V[1,50], L[1,15].\r\nThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\r\nInput: [C V L] , C[1,50], V[1,50], 1\u003c=L\u003c=15\r\nOutput: [Q] max Qraw is 2^50 (\u003c1.1259e15); Q=mod(Qraw,1E9+7)\r\nExamples: [C V L] [Q]\r\n[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\nGoogle Code Jam 2016 Open Qualifier: April 8, 2016\r\nTheory: This is a large value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(-1)\r\nQ3    V          C\r\nQ2  V   C       V\r\nQ1 V   V       V\r\n\r\nThis medium challenge has eps(Qraw) \u003c0.25 so normal matlab doubles work. For the unbounded case a solution method is to convert this Challenge algorithm to Matlab BigInteger java calls. Solution sizes are on the order of (C+V)^L with the large case being C=50,V=50,L=500.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 522.625px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407.5px 261.312px; transform-origin: 407.5px 261.312px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 21px; text-align: left; transform-origin: 384.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is derived from\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. This is a subset of small set 2. The max Qraw is 2^50 (\u0026lt;1.1259e15) for C[1,50], V[1,50], L[1,15].\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 21px; text-align: left; transform-origin: 384.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=15\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e [Q] max Qraw is 2^50 (\u0026lt;1.1259e15); Q=mod(Qraw,1E9+7)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExamples:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e [C V L] [Q]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 40.875px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404.5px 20.4375px; transform-origin: 404.5px 20.4375px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eare {bbaa, aaab} \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eare {ab,eb,bb}\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"font-weight: 700; \"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 42px; text-align: left; transform-origin: 384.5px 42px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eTheory:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e This is a large value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(-1)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 81.75px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404.5px 40.875px; transform-origin: 404.5px 40.875px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eQ3    \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e          \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eC\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eQ2  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e   \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eC\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e       \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eQ1 \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e   \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e       \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384.5px 31.5px; text-align: left; transform-origin: 384.5px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThis medium challenge has eps(Qraw) \u0026lt;0.25 so normal matlab doubles work. For the unbounded case a solution method is to convert this Challenge algorithm to Matlab BigInteger java calls. Solution sizes are on the order of (C+V)^L with the large case being C=50,V=50,L=500.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Q=Polyglot(m)\r\n% Q total words of length L using C consonants and V vowels\r\n% Q is modulo 1E9+7\r\n C=m(1); V=m(2);L=m(3); %\r\n Q=0;\r\n\r\nend","test_suite":"%%\r\ntic\r\nm=[2 8 15 ];\r\nv=Polyglot(m);\r\nvexp=[6938704 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 7 15 ];\r\nv=Polyglot(m);\r\nvexp=[853390015];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 2 ];\r\nv=Polyglot(m);\r\nvexp=[8];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 3 ];\r\nv=Polyglot(m);\r\nvexp=[24];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 15];\r\nv=Polyglot(m);\r\nvexp=[32342016 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 2];\r\nv=Polyglot(m);\r\nvexp=[12];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 3];\r\nv=Polyglot(m);\r\nvexp=[40];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 4];\r\nv=Polyglot(m);\r\nvexp=[176];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[44 2 15];\r\nv=Polyglot(m);\r\nvexp=[916593151];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 3 15];\r\nv=Polyglot(m);\r\nvexp=[397629405];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 3 15];\r\nv=Polyglot(m);\r\nvexp=[105078522];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 4 15];\r\nv=Polyglot(m);\r\nvexp=[133836675];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 8 15];\r\nv=Polyglot(m);\r\nvexp=[6938704];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 8 14];\r\nv=Polyglot(m);\r\nvexp=[624439943];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[50 50 2];\r\nv=Polyglot(m);\r\nvexp=[5000];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[50 50 3];\r\nv=Polyglot(m);\r\nvexp=[375000];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[50 50 7];\r\nv=Polyglot(m);\r\nvexp=[249885158];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[10 20 10];\r\nv=Polyglot(m);\r\nvexp=[998720967];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 10 13];\r\nv=Polyglot(m);\r\nvexp=[746816099];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 13 ];\r\nv=Polyglot(m);\r\nvexp=[377 ];\r\nassert(isequal(vexp,v))\r\n\r\n\r\ntoc\r\n","published":true,"deleted":false,"likes_count":10,"comments_count":2,"created_by":3097,"edited_by":7,"edited_at":"2023-07-14T16:27:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":12,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-19T18:33:48.000Z","updated_at":"2025-05-06T02:18:33.000Z","published_at":"2016-03-19T20:24:10.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is a subset of small set 2. The max Qraw is 2^50 (\u0026lt;1.1259e15) for C[1,50], V[1,50], L[1,15].\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=15\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 [Q] max Qraw is 2^50 (\u0026lt;1.1259e15); Q=mod(Qraw,1E9+7)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 [C V L] [Q]\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 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}]]\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e This is a large value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(-1)\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[Q3    V          C\\nQ2  V   C       V\\nQ1 V   V       V\\n]]\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis medium challenge has eps(Qraw) \u0026lt;0.25 so normal matlab doubles work. For the unbounded case a solution method is to convert this Challenge algorithm to Matlab BigInteger java calls. Solution sizes are on the order of (C+V)^L with the large case being C=50,V=50,L=500.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":1893,"title":"GJam 2014 China Rd A: Library Sorting (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting\u003e. \r\n\r\nThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations. \r\n\r\n*Input:* V   a vector\r\n\r\n*Output:* Vout  a sorted vector Odds Increasing/Evens Increasing\r\n\r\n*Example:*\r\n\r\nV= [-5 -12 87 2 88 20 11]\r\n\r\nVout=[-5 88 11 20 2 -12 87]\r\n\r\n\r\n*Contest Performance:*  Best Time to Complete: \u003c 10 minutes\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p2\"\u003eGJam 2014 China Sorting\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V   a vector\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Vout  a sorted vector Odds Increasing/Evens Increasing\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eV= [-5 -12 87 2 88 20 11]\u003c/p\u003e\u003cp\u003eVout=[-5 88 11 20 2 -12 87]\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e  Best Time to Complete: \u0026lt; 10 minutes\u003c/p\u003e","function_template":"function vout=Sort_CH(v)\r\n vout=v;\r\nend","test_suite":"%%\r\ntic\r\nv=[1 ];\r\nvexp=[1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2 1 ];\r\nvexp=[2 1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 ];\r\nvexp=[1 2 3 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 4 5 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5 2 3 4 1 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 -87 -85 -83 -71 -71 98 96 -67 -63 -59 -53 -47 -41 96 -41 82 -37 -29 82 -25 -25 80 -21 -13 -11 5 76 72 72 66 66 66 9 60 15 31 35 56 52 52 46 42 39 45 42 40 36 45 30 24 18 51 18 12 53 0 63 -6 65 -10 -12 67 69 79 85 85 -14 89 -16 -22 89 -24 91 -24 -26 -30 -38 -38 -38 -42 -44 -58 -58 -60 -62 -66 -68 -70 -70 -82 -82 -86 -86 -86 -94 -100 ];\r\nvexp=[-87 -87 -85 -83 -71 -71 98 96 -67 -63 -59 -53 -47 -41 96 -41 82 -37 -29 82 -25 -25 80 -21 -13 -11 5 76 72 72 66 66 66 9 60 15 31 35 56 52 52 46 42 39 45 42 40 36 45 30 24 18 51 18 12 53 0 63 -6 65 -10 -12 67 69 79 85 85 -14 89 -16 -22 89 -24 91 -24 -26 -30 -38 -38 -38 -42 -44 -58 -58 -60 -62 -66 -68 -70 -70 -82 -82 -86 -86 -86 -94 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-95 98 -81 -55 90 -29 -19 35 37 75 79 85 93 97 56 54 14 14 0 -14 -22 -34 -38 -46 -62 -90 -98 ];\r\nvexp=[-95 98 -81 -55 90 -29 -19 35 37 75 79 85 93 97 56 54 14 14 0 -14 -22 -34 -38 -46 -62 -90 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-89 -75 -73 -65 86 86 68 66 -41 -37 -25 56 5 21 25 52 36 26 14 27 29 35 45 6 51 63 87 93 -22 95 -26 -48 -54 -70 95 -86 -92 -96 ];\r\nvexp=[-89 -75 -73 -65 86 86 68 66 -41 -37 -25 56 5 21 25 52 36 26 14 27 29 35 45 6 51 63 87 93 -22 95 -26 -48 -54 -70 95 -86 -92 -96 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[76 -7 ];\r\nvexp=[76 -7 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-93 96 -91 86 -87 -87 -67 -53 68 30 -33 0 -33 -13 1 0 3 -10 3 -10 -16 19 23 45 51 -18 53 -30 -36 -72 79 -82 -96 83 91 ];\r\nvexp=[-93 96 -91 86 -87 -87 -67 -53 68 30 -33 0 -33 -13 1 0 3 -10 3 -10 -16 19 23 45 51 -18 53 -30 -36 -72 79 -82 -96 83 91 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 100 96 -81 86 -79 -79 -77 -73 -69 -69 -65 82 -59 -59 70 70 -57 -49 -47 70 -43 -41 54 -35 -31 -31 -29 -25 -17 -13 -5 50 -5 -3 7 21 25 46 27 27 44 31 33 35 37 44 49 42 38 49 51 34 69 34 75 83 20 85 87 91 91 14 12 10 6 0 0 0 -8 -8 -20 -24 -26 -34 -36 -40 -52 -56 -60 -66 -68 -68 -72 -72 -80 -84 -84 -90 -90 ];\r\nvexp=[-87 100 96 -81 86 -79 -79 -77 -73 -69 -69 -65 82 -59 -59 70 70 -57 -49 -47 70 -43 -41 54 -35 -31 -31 -29 -25 -17 -13 -5 50 -5 -3 7 21 25 46 27 27 44 31 33 35 37 44 49 42 38 49 51 34 69 34 75 83 20 85 87 91 91 14 12 10 6 0 0 0 -8 -8 -20 -24 -26 -34 -36 -40 -52 -56 -60 -66 -68 -68 -72 -72 -80 -84 -84 -90 -90 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 100 -81 -75 96 86 -71 -71 86 -33 -27 -25 82 -21 76 -11 68 5 7 9 13 68 15 25 41 41 51 61 56 61 56 67 54 67 48 83 89 91 99 34 30 28 16 16 10 10 4 0 0 0 0 -24 -26 -26 -34 -48 -50 -62 -66 -92 -100 ];\r\nvexp=[-87 100 -81 -75 96 86 -71 -71 86 -33 -27 -25 82 -21 76 -11 68 5 7 9 13 68 15 25 41 41 51 61 56 61 56 67 54 67 48 83 89 91 99 34 30 28 16 16 10 10 4 0 0 0 0 -24 -26 -26 -34 -48 -50 -62 -66 -92 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-93 -89 -87 88 -85 -75 -65 -63 -61 -59 -49 84 -39 -37 80 80 -37 -25 -11 -7 78 -5 78 72 3 5 9 58 11 50 46 23 29 29 31 35 44 37 49 67 71 44 40 30 71 30 28 24 75 75 79 83 18 97 99 6 6 2 0 -4 -8 -10 -16 -18 -30 -32 -34 -36 -38 -46 -46 -48 -48 -52 -54 -56 -66 -68 -88 -90 -100 -100 -100 ];\r\nvexp=[-93 -89 -87 88 -85 -75 -65 -63 -61 -59 -49 84 -39 -37 80 80 -37 -25 -11 -7 78 -5 78 72 3 5 9 58 11 50 46 23 29 29 31 35 44 37 49 67 71 44 40 30 71 30 28 24 75 75 79 83 18 97 99 6 6 2 0 -4 -8 -10 -16 -18 -30 -32 -34 -36 -38 -46 -46 -48 -48 -52 -54 -56 -66 -68 -88 -90 -100 -100 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[90 -89 90 74 -87 62 -83 -79 58 -77 -75 -75 -63 52 52 -59 46 42 -49 -39 -31 36 12 -25 6 -13 -11 5 9 17 23 29 39 -2 -8 -10 47 63 -28 -54 -70 -74 -78 63 65 83 -82 -84 91 97 97 ];\r\nvexp=[90 -89 90 74 -87 62 -83 -79 58 -77 -75 -75 -63 52 52 -59 46 42 -49 -39 -31 36 12 -25 6 -13 -11 5 9 17 23 29 39 -2 -8 -10 47 63 -28 -54 -70 -74 -78 63 65 83 -82 -84 91 97 97 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-97 88 -93 74 70 46 38 36 -91 -85 -83 -77 -67 -63 -55 34 -45 32 -37 16 0 0 -23 -21 -2 -4 5 13 27 -10 -32 -38 -38 -50 39 -56 45 49 -56 77 -56 87 95 97 -62 -62 -68 -68 -72 -80 -94 ];\r\nvexp=[-97 88 -93 74 70 46 38 36 -91 -85 -83 -77 -67 -63 -55 34 -45 32 -37 16 0 0 -23 -21 -2 -4 5 13 27 -10 -32 -38 -38 -50 39 -56 45 49 -56 77 -56 87 95 97 -62 -62 -68 -68 -72 -80 -94 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[81 29 29 -71 -70 16 -70 -93 25 97 51 3 -8 39 -83 97 98 -86 -53 69 58 86 19 75 9 87 -84 66 75 82 85 -87 53 7 65 99 -93 59 -74 4 1 -15 -22 59 -35 -15 51 -10 -27 -98 60 -17 37 29 -98 69 83 9 51 13 -12 -13 50 -39 45 5 -34 75 -84 15 -91 18 -97 -8 0 -44 34 79 -13 -74 -92 80 -84 -92 -32 -46 -26 46 -16 -32 -72 16 84 -46 22 -32 84 58 28 -60 ];\r\nvexp=[-97 -93 -93 -91 98 86 84 -87 -83 -71 -53 -39 84 -35 -27 -17 82 80 -15 -15 66 60 -13 -13 1 3 58 58 5 50 7 9 9 13 15 19 25 29 46 34 29 29 28 37 39 45 51 22 51 18 16 51 53 59 16 59 65 69 69 75 4 75 0 75 79 81 -8 83 -8 85 87 -10 97 -12 -16 -22 -26 97 99 -32 -32 -32 -34 -44 -46 -46 -60 -70 -70 -72 -74 -74 -84 -84 -84 -86 -92 -92 -98 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[10 50 52 3 -29 51 29 -89 55 -34 -77 -41 65 7 -89 0 -44 -98 61 -21 11 -57 -10 95 -12 -25 91 28 90 -49 -57 97 57 -47 33 -59 7 -39 55 91 -89 -41 -7 -18 -61 -93 78 -57 97 45 44 -59 5 38 9 28 -38 11 -36 -92 15 -70 44 -84 18 -24 38 20 -54 0 2 44 28 12 42 -22 74 6 -72 -52 34 -50 30 -44 -6 -42 98 -96 42 38 64 92 -36 92 -90 2 -6 -44 -98 -2 ];\r\nvexp=[98 92 92 -93 -89 -89 -89 -77 -61 90 -59 -59 -57 -57 -57 78 74 64 -49 -47 -41 -41 52 -39 50 -29 -25 44 44 -21 -7 3 5 7 7 9 11 11 15 29 33 45 51 44 55 55 42 57 61 65 42 91 91 38 95 38 38 97 34 30 97 28 28 28 20 18 12 10 6 2 2 0 0 -2 -6 -6 -10 -12 -18 -22 -24 -34 -36 -36 -38 -42 -44 -44 -44 -50 -52 -54 -70 -72 -84 -90 -92 -96 -98 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[34 46 -93 78 -26 11 77 26 47 73 75 53 -89 -52 71 19 -52 -47 16 -19 74 49 21 1 -33 -89 5 -74 67 -55 88 -85 1 -41 93 53 -97 61 -71 -85 77 -45 -1 0 74 95 67 -65 -27 -2 -44 -8 -37 27 36 -58 71 -8 -95 43 17 -19 25 -5 -10 42 10 -64 27 94 41 -69 37 81 -97 -50 -54 66 -22 40 -62 90 -70 40 48 48 52 48 20 98 -42 92 88 40 36 -28 -10 -44 -52 96 ];\r\nvexp=[98 96 -97 94 92 -97 -95 90 -93 -89 -89 -85 -85 88 -71 -69 88 -65 78 -55 74 -47 -45 -41 -37 -33 -27 74 -19 -19 66 -5 -1 1 1 5 11 17 19 21 25 27 27 52 48 37 41 43 47 48 48 46 49 53 42 40 53 40 61 67 67 71 71 73 40 36 36 34 75 26 77 77 81 93 95 20 16 10 0 -2 -8 -8 -10 -10 -22 -26 -28 -42 -44 -44 -50 -52 -52 -52 -54 -58 -62 -64 -70 -74 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-27 ];\r\nvexp=[-27 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[53 75 55 -92 23 -19 83 -70 95 43 -57 1 -11 -9 42 -98 -30 -35 -35 94 -95 -43 -11 -44 96 53 23 -80 -77 -32 -34 45 -16 -2 -77 56 -92 0 -15 38 36 4 -18 72 -84 88 48 58 82 -4 88 -62 -10 -30 10 -100 22 0 -12 -40 -48 -74 ];\r\nvexp=[-95 -77 -77 96 -57 -43 -35 94 -35 -19 -15 -11 -11 -9 88 88 82 1 23 72 23 43 45 58 56 53 53 48 55 42 38 75 36 22 83 10 4 0 95 0 -2 -4 -10 -12 -16 -18 -30 -30 -32 -34 -40 -44 -48 -62 -70 -74 -80 -84 -92 -92 -98 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 63 -79 74 66 5 -51 -9 69 -58 -23 77 -75 -71 91 0 -40 41 -79 32 27 90 66 -56 100 -48 -80 14 -24 ];\r\nvexp=[-87 -79 -79 100 90 -75 -71 -51 -23 74 -9 5 27 41 63 66 66 69 77 32 91 14 0 -24 -40 -48 -56 -58 -80 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[91 34 34 -92 -34 42 99 51 0 54 17 -51 -31 -45 35 -33 92 7 -33 -45 0 -15 76 58 58 100 85 -68 5 -20 -13 83 -39 89 55 89 -90 84 -40 20 90 54 -84 -90 38 -100 60 64 54 32 -30 86 -60 90 -46 -58 -50 ];\r\nvexp=[-51 100 92 90 90 86 -45 -45 84 76 -39 -33 -33 -31 -15 -13 64 5 7 17 60 35 58 58 54 54 51 54 55 42 83 85 89 89 91 99 38 34 34 32 20 0 0 -20 -30 -34 -40 -46 -50 -58 -60 -68 -84 -90 -90 -92 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-41 25 30 -41 20 51 -75 -72 45 -73 75 -77 60 -79 -45 80 19 49 -25 -99 -16 71 55 -79 -35 31 -66 61 -19 -45 -55 -34 73 -55 17 -29 -41 65 -93 51 -58 62 99 73 59 -66 83 -95 -23 62 -82 -81 -31 -33 -9 -41 1 83 36 92 82 80 0 10 78 38 70 0 -52 4 -56 88 -92 -14 56 -6 -74 -90 92 96 86 96 -88 ];\r\nvexp=[-99 -95 96 -93 96 -81 -79 92 -79 -77 -75 -73 92 -55 -55 88 -45 -45 -41 -41 86 -41 -41 -35 -33 -31 82 -29 -25 -23 -19 80 -9 1 17 19 25 31 45 49 80 78 51 51 55 70 59 61 65 62 62 71 73 73 75 83 83 99 60 56 38 36 30 20 10 4 0 0 -6 -14 -16 -34 -52 -56 -58 -66 -66 -72 -74 -82 -88 -90 -92 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-55 93 -57 -68 25 48 -100 75 11 -82 -60 64 74 19 11 -87 -56 -10 45 74 -21 -5 1 12 55 66 -72 73 37 85 -97 -80 51 44 55 -54 -15 -79 32 -93 1 23 -77 -86 90 -71 82 4 14 -100 55 -51 33 -60 65 -30 -34 -37 -75 75 90 33 -35 38 -97 -72 49 4 24 42 88 -60 -78 -68 0 48 -44 -56 24 -12 -48 -78 100 68 -32 -58 24 -44 94 ];\r\nvexp=[-97 -97 -93 100 -87 94 90 -79 -77 90 88 82 74 -75 -71 -57 74 68 -55 66 -51 -37 -35 64 -21 48 48 -15 -5 1 1 44 11 42 11 38 19 23 32 25 33 33 37 24 24 45 24 14 12 4 49 51 55 4 55 0 -10 55 65 73 -12 75 75 -30 85 -32 93 -34 -44 -44 -48 -54 -56 -56 -58 -60 -60 -60 -68 -68 -72 -72 -78 -78 -80 -82 -86 -100 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-41 97 83 0 -33 87 29 18 21 30 90 4 -10 -56 -66 79 -25 55 -40 -55 1 1 0 85 -66 -15 36 -68 -100 65 -8 -77 64 -47 -60 -96 83 -67 12 -85 11 24 -63 -50 17 -60 ];\r\nvexp=[-85 -77 -67 90 -63 -55 -47 64 -41 36 30 24 18 12 4 -33 -25 -15 0 1 1 11 0 17 -8 21 -10 -40 -50 29 -56 55 -60 65 -60 -66 79 83 -66 83 85 -68 87 -96 97 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-75 77 13 57 62 43 -9 13 -61 -37 -19 49 -1 65 -53 -87 -40 -73 -33 80 -11 15 73 -42 -58 -20 85 -97 -57 22 -46 -60 8 62 30 -84 66 40 58 -44 -100 ];\r\nvexp=[-97 -87 -75 -73 80 -61 -57 -53 -37 -33 -19 -11 -9 -1 13 13 66 15 43 62 49 57 65 62 58 40 73 77 85 30 22 8 -20 -40 -42 -44 -46 -58 -60 -84 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[80 30 85 -54 -87 -32 47 33 57 -57 -64 50 67 -84 58 -79 37 -39 77 65 55 26 -58 47 -24 50 -34 72 65 30 38 -57 -49 13 -81 -3 -90 73 -69 91 -38 -49 -52 87 81 -70 51 -98 82 80 0 96 -68 -34 -54 -96 ];\r\nvexp=[96 82 -87 80 -81 80 -79 -69 -57 -57 72 58 -49 50 50 -49 -39 -3 13 33 37 38 30 47 30 26 0 -24 47 -32 -34 51 55 57 65 65 -34 67 73 77 -38 81 -52 85 87 -54 91 -54 -58 -64 -68 -70 -84 -90 -96 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[45 7 -49 57 7 -11 -7 53 -83 99 -90 9 87 100 16 -58 45 33 -98 30 -58 -50 -29 15 -66 76 -86 58 4 -82 ];\r\nvexp=[-83 -49 -29 -11 -7 7 7 9 15 33 100 45 45 76 58 30 53 57 16 4 -50 -58 87 99 -58 -66 -82 -86 -90 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-13 20 -29 34 47 -38 -55 -25 37 41 -87 47 31 -63 -27 -68 -35 32 77 11 -7 -91 -67 -32 59 41 -11 -81 10 96 -50 -11 74 0 -42 -22 92 -72 46 0 0 -80 78 -32 58 4 24 -22 -56 -34 60 ];\r\nvexp=[-91 96 -87 92 -81 78 -67 -63 -55 -35 -29 -27 -25 -13 -11 74 -11 60 -7 11 31 37 41 58 41 47 47 59 46 34 32 77 24 20 10 4 0 0 0 -22 -22 -32 -32 -34 -38 -42 -50 -56 -68 -72 -80 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[35 69 33 35 -7 -54 -89 95 -95 -72 2 42 -89 -10 17 -65 -99 -43 27 95 71 61 -5 -95 -82 21 47 79 -59 52 -44 -10 -19 53 35 -92 -35 -61 -95 -43 35 -98 95 -2 -19 66 89 -54 32 -18 36 72 -64 -10 -88 -50 -8 38 88 -50 ];\r\nvexp=[-99 -95 -95 -95 -89 88 -89 -65 -61 72 66 52 -59 42 -43 -43 -35 -19 -19 -7 -5 17 21 27 38 33 35 35 35 36 32 2 35 47 53 -2 61 69 71 79 89 -8 95 -10 95 -10 95 -10 -18 -44 -50 -50 -54 -54 -64 -72 -82 -88 -92 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(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":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-26T03:58:52.000Z","updated_at":"2026-03-11T15:29:23.000Z","published_at":"2013-09-26T04:09:37.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/2924486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sorting\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\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 V a vector\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 Vout a sorted vector Odds Increasing/Evens Increasing\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\u003eExample:\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\u003eV= [-5 -12 87 2 88 20 11]\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\u003eVout=[-5 88 11 20 2 -12 87]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time to Complete: \u0026lt; 10 minutes\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\"}]}"},{"id":42777,"title":"GJam March 2016 IOW: Polynesiaglot Small","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p2 GJam March 2016 Annual I/O for Polynesiaglot\u003e. This is the first very small set.\r\n\r\nThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels.\r\n\r\n*Input:* [C V L] , C=1, V=1, 1\u003c=L\u003c=15\r\n\r\n*Output:* [Q]\r\n\r\n*Examples:* [C V L] [Q]\r\n\r\n  [1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n  [1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Contest Theory:* The small case is a warm up of only a single vowel and consonant. For L\u003c16 this can readily be solved by brute force generation of valid sequences followed by size of array. Subsequent challenges will be a subset of small-2 with eps(Q) \u003c0.25 and then the unbounded size case of small-2/large. For the unbounded case a solution method uses Matlab java calls. Solution sizes are on the order of (C+V)^L with the large case C=50,V=50,L=500.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p2\"\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/a\u003e. This is the first very small set.\u003c/p\u003e\u003cp\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [C V L] , C=1, V=1, 1\u0026lt;=L\u0026lt;=15\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Q]\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [C V L] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Theory:\u003c/b\u003e The small case is a warm up of only a single vowel and consonant. For L\u0026lt;16 this can readily be solved by brute force generation of valid sequences followed by size of array. Subsequent challenges will be a subset of small-2 with eps(Q) \u0026lt;0.25 and then the unbounded size case of small-2/large. For the unbounded case a solution method uses Matlab java calls. Solution sizes are on the order of (C+V)^L with the large case C=50,V=50,L=500.\u003c/p\u003e","function_template":"function Q=Polyglot(m);\r\n% Small case C=V=1  L [1:15]\r\n% Determine number of unique words of length L with the constraint:\r\n% All consonants are followed by a vowel\r\n C=m(1);V=m(2);L=m(3);\r\n Q=0;\r\nend","test_suite":"%%\r\ntic\r\nm=[1 1 4 ];\r\nv=Polyglot(m);\r\nvexp=[5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 7 ];\r\nv=Polyglot(m);\r\nvexp=[21 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 1 ];\r\nv=Polyglot(m);\r\nvexp=[1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 13 ];\r\nv=Polyglot(m);\r\nvexp=[377 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 5 ];\r\nv=Polyglot(m);\r\nvexp=[8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 6 ];\r\nv=Polyglot(m);\r\nvexp=[13 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 14 ];\r\nv=Polyglot(m);\r\nvexp=[610 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 2 ];\r\nv=Polyglot(m);\r\nvexp=[2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 11 ];\r\nv=Polyglot(m);\r\nvexp=[144 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 8 ];\r\nv=Polyglot(m);\r\nvexp=[34 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 3 ];\r\nv=Polyglot(m);\r\nvexp=[3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 10 ];\r\nv=Polyglot(m);\r\nvexp=[89 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 9 ];\r\nv=Polyglot(m);\r\nvexp=[55 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 12 ];\r\nv=Polyglot(m);\r\nvexp=[233 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 15 ];\r\nv=Polyglot(m);\r\nvexp=[987 ];\r\nassert(isequal(vexp,v))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-19T16:06:15.000Z","updated_at":"2025-06-26T19:27:46.000Z","published_at":"2016-03-19T16:17:17.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/8274486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first very small set.\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 words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels.\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 [C V L] , C=1, V=1, 1\u0026lt;=L\u0026lt;=15\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 [Q]\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 [C V L] [Q]\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 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eContest Theory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The small case is a warm up of only a single vowel and consonant. For L\u0026lt;16 this can readily be solved by brute force generation of valid sequences followed by size of array. Subsequent challenges will be a subset of small-2 with eps(Q) \u0026lt;0.25 and then the unbounded size case of small-2/large. For the unbounded case a solution method uses Matlab java calls. Solution sizes are on the order of (C+V)^L with the large case C=50,V=50,L=500.\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\"}]}"},{"id":44079,"title":"GJam 2017 Kickstart: Leader (Large) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p0 GJam 2017 Kickstart Leader\u003e. This is the first 61 large cases with spaces in some names.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\r\n\r\n*Input:* [names], a cell array of names using only A thru Z; max 100 names\r\n\r\n*Output:* [Leader], a string of the name of the leader\r\n\r\n*Examples:* [names] [Leader]; {'ADAM' 'BOBOS' 'AD AM'} ['AD AM']\r\n\r\nFor the example the all have have three unique letters. Alpahabetically 'AD AM' precedes 'ADAM' and 'BOBOS'.\r\n\r\n*Theory:* Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p0\"\u003eGJam 2017 Kickstart Leader\u003c/a\u003e. This is the first 61 large cases with spaces in some names.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [names], a cell array of names using only A thru Z; max 100 names\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Leader], a string of the name of the leader\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [names] [Leader]; {'ADAM' 'BOBOS' 'AD AM'} ['AD AM']\u003c/p\u003e\u003cp\u003eFor the example the all have have three unique letters. Alpahabetically 'AD AM' precedes 'ADAM' and 'BOBOS'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function Leader=leader(names)\r\n% cell array of names 1xk\r\n% A:Z or Space in the large case. Note space precedes A alphabetically\r\n% Leader is name with most unique letters A:Z. Tie goes to first name alphabetic.\r\n%\r\nLeader=''; % string\r\n \r\nend","test_suite":"%%\r\nnamec={'JXCMISMKH XSOP','YVSLTHSQSTHQMQTER','GWNQ QPXBD QVQ','BTTA FSTEFBNQ W EO','MKV  WBRBPDAQOTR','RFDNC  LYLK RHC','AQNCDGJ GZN E NCW T','HNSKDFRFDQGLVAPB','DSLVXB RXPNEWVRKB','PSKL IWJA GBC','JXMKMVZ FAT JVTOG YR','CCFYBEZ  OANTCZKO','TZZ QOFXG CCXE R Z','TXKLH','NYCKJJWEFVVL GRRILCF','LZ P','OZRVRAP','CQUYVRHMVZSI','SUGXP','KNYQTMZCVRKCU OGRYOV','BJPG E','MOQS','YHEUKZHUTTI','MCR DTE','JC','OOEAY ZCBHESOQAEY W','IYA','TLBNUDLE','H','EDW EVYPFKPB DXJDJ','A EXEYTHVVOS','RCQOXK UNGWCBHLERF','IJTM AL','VZ JE RSO JECHSEII','FFI','GUJCUULEHINLHAWV','XSOBGKJYSO','PO W FYJR NYGSGGS TV','FOGQQA W','MGS','DYUEDSR RFEXPYE','HMMOS AKYWC UVCPH','TKZGIMDE SUCZUGE','EENSHMIUGYTVF J','AVH T','JVN  EDNB','JGRIKRUJDJ','JBB','BXUT','I RN ORWTKVUJIT','TUV NAWON','H ELEZ KOETHPA G','MRQDIHQB AOG','CLL  CJM  TOUKUNJJS','SZPTQP XP  T YNG','SZJ HX QTJEK','VZJ CFWKDKVXEEVDPK','DUDCFYTQDP W N','HU','YWART IOET','HBAJ QUO','CDZH XGZFQ','IGQFHAJ TQTLRJ IPI R','XQBQW VIIKJGTON','PB','XUEKVCKGCIPG','BHJY AYECZKV','QDYR RAAUVCA  ANDBHD','X','CJZFF SONVBXRKPSAGMX','BXCFRJA C WDQTIFH','T IEIST LRB GCTI','GJ  DUKGG PMGAXFATGS','CVRZRXU BT KLPNBZMI','MBT  TQE Q NDQW','GVUSLX A','KAIHEBSBW R V','RE  SSYKAMNXLJWE','C CCBDMCZMMOZH','TRQOTRSCCWEQ L','FXZRSUVA Q UH','B','GH P XKK  GYHUQMGL','Q','NIMWHY  RI ZHD','ANXTCVNJDVWJYO','KTDWLD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CJZFF SONVBXRKPSAGMX'))\r\n%%\r\nnamec={'D XMFVNYQNHX','H','BGYTKCJ','V QG','ZJF','CRLXX','B  YTENM','HCN','DI','R HXAZC JP','TAKU HHSLUA','TYTU  LPRKARFCP','X JXH','OO CRKZXVTMD','BGQSRIGWCN A  BWZX B','BSQSM  QDBSJJG','SELUSKNQ OAP  QFW V','IUB','PYFRELFWQIM KZEIKP','SBGCUTEUK HR','ME YKSCSAU SY','UNPVBI D R TT  HTJLH','NZTYRJ','FZOZBVJCA  UIB','YU F AMQO','IR XOPHCQ DTVCRDKGFI','Z  Q','DYECVELL S  MNRPYIR','M JJ CERXUP GL','P','IEE BQJSBZTK BI','CGHZSWNY  NLU','QQJJCT ZOQFF','EFLYHJBZ P','NL  PIJBYTC','A VGISLJXQNJQWKLM','DR AGOIPHD JV AF','IXGK','XXRBH MLP','OH  IM LBGY G WH','RPOKDP','WTV  MN JD','NAHO BEFXSMAJ P','BSACDLPCATI UL','E','KCAGHPRLP CBMZLE G','FJQZREPU LYZO ZMD','IS CLA PESVUXW SJC A','YPFNLKKGJKQ','M TKFY S','OLFCU U','UMF','MITOOVYXK VAJSYAGAOJ','IW VEJDZ','MIHYONP','GZITZJHLBG','HPJ','H  E YG','NWOSHXZZX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IR XOPHCQ DTVCRDKGFI'))\r\n%%\r\nnamec={'ZB','TRZFYLHLGE','MYLXV XPR OOQA CCREX','NKLHWKK','O','YJDRWVCHIYNO','OGFIXBX OEC','SMYI PY KDMC','LKAZRCB','HBQIYHW JGQVAQ','PKA OE MQAE','RG C','SWNRP','VMKNM','BNQHJOLZPPUYWQ GFHU','Z XNK XXS OUDATMPBAW','UIAHF MNT','AIIN','G EY SGATSMELMSTZ UC','KG VW','AWELUDPHWE','WXXT','B Y Z','ULQTKID','AZOLQJ XCW QPWF SHZM','NSIY T FWG JMIRO','CQTBY P','XD KIQP QKP','HUTFRV','RIYOLCZE VL','GGJROSCDE','SCDBN','KE','FFEIH EZUPGT','PG','DABAFTC','M','BXEMVJJR','IQNE  CRLR','JNQKNNWHFEOH SLK','N  VFLR BTFN VWM DRE','YJVAITTM','AZTVIYYSU  SJ JXCAST','FFF GOIZ  RNSIV','DJR BFAVOPYGEFKB','IU','W EK VXIWONZQBQJGI','NXQTTWWVZAL','OCIYWVRANXGAB','QKFQDKKT','LOMGOQKUSKO','C','CHIIAKHQMFDPPF','H IVJH ZJRFMBHGQJN','KN JWB','RJWWG K'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'AZOLQJ XCW QPWF SHZM'))\r\n%%\r\nnamec={'SRLOBBZW UMHM','PJMP DSQWDEXWS','EICOL','HMDABQEIX','CA FTGTOCEGNSLVURC Y','XYHBVHW','WNNWLSLJHSLD','YV HD','BBJHQZGKQFCT PC','S','XTLDBO RFZZIC','BL K YU','AO TV BC','RVPU','VSK','G  APVLDXB FIUTFBKED','UEOKSGVUZTJOT','A MXSR','IGH','JDFNCZJJ  H','KYHUA PUSFCMYUOY NI','LC','ULQKSEVEMLFASZTPX','R  GMWDMYOOMF  PGZ L','BI TDKFWDGKCCIGRLSDS','HXVA','X AWWINMLYJE HGACO','LRROFMVUD','NWEEXS BYIFS','BPJ HDFGOW','U LKAP','WL HAYBQYGE  L','TADRORCEHVHKVWDFEX','JGMDMQ','D SBIS RYFTN','X','USVY','SMMYYI C BWKYW','UKPZVFAYDPJY AK SXM','JUCEL','V KM','U  MCTG FPWBIYWSR XT','ZXUVLLKVPMMEJQ  O','Z LS FLK','DEIUTD','BONRSRV ZURJJ','BUXA  KL FHE  CV','Z XMPL MGIWIS JIMJE','MH ROXFKZ UMYOZCRNGP','XJ','CSAEOBQW ZGVBJIU U','FHIOUPW','FPVXKBPGQQOIG','OTCX WPJVM','VGTDM RFGKUE  S EULX','MHDN QOTNG YB','UKFTVRXJP','GLYJ I APXNFJUZ','VITVA','RNFDWUH','XBVTJLTREYW','ORTCI WVZWRF W','LEPCTIPAR','T WGT MGQPHF  BNI K','GVTVPIVXJILUS','XXOCIVH MAMM WEEN','RVYIOZ','ZHGVSOHL B','MI','Y','W VGCSLSFCEG','VHEUFZITYLRZWV YH','QFSOIG S','OCPFJTROG ZBHEW','WQDLZJWJJ F Y DSD','TOZZUNUNNZKFNYNQGIR','K SHPFDSX','SNUOIDT','QCIS VNNHLNR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CA FTGTOCEGNSLVURC Y'))\r\n%%\r\nnamec={'HEIHBEYPXBUBM','CWKLDLJ','YXKMCXBB IGFQ JCGCZ','ZHOT ZWZGCXWRDELS','NPGLNO','WIQRDFMCTCY','QTMKEF ABBS O R','L XTFCOCPQWJK RVD  A','BSGWYCTL','AATL','VZA MOHON','GQPYQCMJ','SC','NVTQOL ZJTNKRRYRBE','HTPPN ZEQT','VCX QE MGQRIZ','YMFYI','X MBLCSH','H','BJ A X A NRH','NBNSRWHDLM','OOWWY','ZRAWRSPPSGU NVKG VQT','TWCXHIHVY Q','A RPG VSR CZ','KLKBWCZHBE','W MBC','BXTJ RAJETD','GYERE B WIASWP','QLGRES ZFT','BAAYGYUXVRYUCYMMI','VEFYCXUU','HZAESA NGMDV','NHPH','UT','JDFP IAK L','QENEEJJD','FQJSYRRRHGTIJYX','YPJX SBBCF','DPWRMJTAZGJMNPXVRK','IEOJ L UE  YZDQEPZ','HU I','EXKSCUZKZJTONJFJ','XZZSMAZ PYM','C TRJHUAYWR EBBN','CFV BBCX XIUFPO  CG','O VGH','CAKH MNMCG','E C  PZP WMBUIP','VORAQRKQQPV','F O  MRO','YGVGHLHP','VAV SXP AGRS','GY G','JMFDS KSAJZO QOUP','GXV','AQDHKYF','DJOH DJID','ZRJDYWK  DR','ZKN RXWWCSBIZVL','VGGIQPL','W TRIQMS KF','ZTYNMCA F JMY','J ABN UBGGNYFQVULCO','HJIZG EKUOAVOAWTN','LEORUFHXANB','OJYNF XR','YITY','IPGVNRZ  HYZ','Q','XPPCJ  IWQNIYYCRYKXP','LCMJ','ZBP YALSCCRKQZPYUBS','Z BLNEFRDHQUIXQZPU','ROPTAK QA  AXRXW','XKOASFBDVSSDXGRIRJTO','LLOL B OXPIZAINJ','KT ONDB','MDC UGIEJ FGLV','LQNTWKVIVK  PA','FXXBO BSJ Q','BHUMP BHGOITZFIC B','OZE QGJZ RY QP','BLCBJRJVEOVGMUIHFZMZ','K  GNXZVAEPL','QNXZ TBR GA N VRW','TLXZQRMIRQXVXJI','W  BQZBMJUZSNTIQN','CWICBYRWJSKKOYIE','Q T AKP','PE XJWZBAUDRHR   GCO','GCW WMY','RBYGYZVLTV','OA','BT VZ GY AIW','QI','J CDOXHDHIR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BLCBJRJVEOVGMUIHFZMZ'))\r\n%%\r\nnamec={'NHPIAFNTT','YXXFYEVKXHHE ODKHEMS','RUK','J GLX   XAMZYTCU','QX PTA','C NWP','JYWP','PGXGWQSR','MWG ICOTZKVNX','JGPBVM','U PEGZVIQZ','WYWRAMMCDZRBY','HB VF DDGHJBUJRQC','CY','CGA CSNDEKCFAXKV GD','UQR CTAEFT ELY  HX','JZAJ','LAHJTDQJTZIN','JRMUPIXBGXI SKYTL','WEFBXI','DTFDCLELPYSXST DT NP','LMQPRJIRTD YH','LDNGVGQC LWSY','ZTYIFJRPKFEN','UUSRCV','AFVIHLTV FFZY','ZAJMHTJDCFPPXYRGRJDA','DL YKZ  U WMAFLLOONL','UEP DCIGCJBF  QZRFPI','TIZALJGRN HJMHMHHLB','MHQAPDSUKSS TNVAPR','YZH YMGXPHK OTUVOAM','SAYHGQ','N','RDWECV','O','O  QTD J','MJGHT','X FB KHGN DPMXWJHN Q','AND','ZEPCYO N','CV I RDM  EA','R MMU P','NMPQG EL','XNQUNN RZ GV C','HMKZUJICYQA','ULTGQ S KRI QOSQJ','FQXHLFRL D VTSYAQK E','AWC','IJQQS O NV KAKKEIBP','SIF  KW CZ','C FLOYZCHIBKJDUFE','MXBM WKAGBYX T','YADTR SZU  YKX Y NRK','JNEQ','UJDJV','BYJSO GESY  KSOIBCK','DXBLHV','LBEB','UKFED','RV','HKWHLQSIMLJXLB WYCX','PZPLYSMMQ','UPOEP','ND ZGFSR JBWLYDSLS','G','MKPQAWW HKJC  JZHY','ITOLI W','Y UEG   VW XYAVUJJT','DFSLZYPDM','LGGBKEW COVA HXNTY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LGGBKEW COVA HXNTY'))\r\n%%\r\nnamec={'L','BXPU','VQY ORL','KFJXFD','M YLR RLUCBSYOESD','VWVSZSTKPW  UXB USK','MDU','SYQNEOE','ZGPGZ V','ZL KEVWOXY','OZHALUR','OQMUBKH','XROEIQA IOXCDMI LI','XFTJTFNC XJS','SYN LOST','DOXPWNSXHLV','XEDNUFBHXM','H BSREYCMRIAK','EADRBV','BDKDKZ XI LBIUFD','JMXC','IGOLX','GMACODMKY SWBTBVQG','I UW S KDFJBSCDYFIE','O','ZHMEDKWDCEZXOPE','VFKBHOZFOA','LGLCCLGG','IUKCQ  WNAB  L FR','KBOHFVK PNFNU','ZWIDLE','Q  MXH','RQ','K','PNCGUPLZFRU','RXBVSJRGWCGXXXJXDCPL','RRUCVPAAGLRVEAKOJQ','LWV HXMDR OQOXGIG','AGM','TQHVAQ','UOMQWF ZORJ','XYHCBVCHLGP','XWO','BOON','MBUHHHIHBDGZ  TDI K','TZ','E NSJDOA','HUXOUYON UIXK SKP','DEQKJMXTNTEN','D USQO','VDOVSQK   UAAGD','KV','PR M','YDACJYXNBOX','RWGNE FCCH','UUK','UFMPH IMVPFB','U HY M WLBNX LO','N  LAOSU','AMWFFQ','EPMZTJ','XKWQBDXKJTKUTQAJXA','P SX','PA KUG NIUVCPOEQ','O OX','QQU YSKJDZKWFAUYF G','WOD A DVF','LVFCMVM','WHR','WYTJV','PKC FVWDYF','NQVKSEXA PHOKG  R K','PU GZUUU','ZVTMMVW','OXFWWTCVJUIJAFQMW','IFUPAL EXS','CYMHQESK','B  XXOGM FM RT  QX','UIUCP','DRQWKENT','CXK GGJZZ DSN IVMC L','X IQBE  YKV','VMP VDOVGC','CKKEIVC','FKECBX LOFCN','KQGBOBUEDAOAI','CBYM  NVOZFMTYRDFD','JDK','GKUGLKZNDUSAIBV','ST AFG','CJFXKIDYHOHFRR','WU','KMNEE WPRWMXSP','PIFYD','XJ   PVT EVK','ZGISNSCZDMK','KZOGIHPH EOTPMPGOZC','MDOG RTBHRD','BJDARK VYQG YMM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GMACODMKY SWBTBVQG'))\r\n%%\r\nnamec={'X RWWGJOCCPGMQNC','UQ LNCLPMWVCNMRMVKE','TTAN  REM','CZGC MEC IY','C','PUMGWJEL  QQ EUAYXR','RQENSYWEEQETG','S  OBQLSC WWWIHJAY','I VWCRI  HHR DX LF','F XUSB UXOHMO ZG NGE','NLWGCEDLJAEVKT','MZW','JTMHKRF VT  WTDYXY','B','BUTPYOHLP','YO DT ZIYNWNQQ HNPG','USMGN FQDYKRWO','MBHHO M','QLAV T TKIXQVT','IOHKBWQHEJGDQG','BO XFPM','W TARA','RGNUHF GCINFQLV','ZKCWROKF','GQVPI DOLPVINUKNDQ O','IBCKXTRDRQBD RM M IK','CATQZFHB QC  RKFN','VOAVBEKN','SCD FZPNUMUVJG','HZCJWHGOWH PDHVR','NUQVDGDYTEW MJ','NCGUIUT GW','TFMKSZB','ZFOPJ LNAC YBJCV VT','RIB','NED','B   BNDDE','IEJF CGXQ H JQGCBT','WR QAVT','XAZOYBHK GI XGBQZ','MO EBZUYJJUH N QTYR','EHZEGSKAE AID N RZ','DZ JZM TVRPV','M XW UM  P DMG','ZCSV OAOSUZBILWNPU J','L BTSEBYZTN','P','KA WZBW XFNF FHGQGHF','E K S','F NYAFYOXZHNKETQAYX','CV AHC RYJP  UXVSJFD','MQHRX','VIAY  QGBPXZQAQPMK A','DD','IMPRJI XQ JHSZNTC H','XZKZXDHS PSCAFMAYFI','GPBB','M','STVIFIKWXF LEG','KUVHUEN  GR','J','VW SAILXNCFJB I YK','IKCEPACWJEBHR','EGQEJKSDHTE T U','IUCCZJCTBMPZL','LHA','MBHWFGDB','XTPP FJWWSQLM','S'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VW SAILXNCFJB I YK'))\r\n%%\r\nnamec={'SKZYRVCMEUUNPLNNY','OTOUZ NBEJOC CMVS MM','JYYW','FFW G LMLGCYAGDOI IN','ERJI','ZCSF YT','WS','F A','PAFSGFKO','X','PKEX  RR IDQ B','ZCWCY UXYW FHC','K FJUO QWAC','S PLPJDR WATQOS','WN','CLAL','O K VENJDUUKWX','SHU YEJH WDU DXTKXV','O OQVEGB WVG DFPIHXS','RVC XRUYYIIK NQXBAOI','KFHSMWGEKHV','KURTDMNLUXLZCEC','YUCCAHY L G','VIP','SMDVZTCUV','JPBGCNJEGIUFTRDNIEJ','INTAI','Y VPIHIHB','QFTYRQF MS Q','GCRUVJ A TVDUUL VYFS','V W Z','GWUP WZLOEBGWNT','DK AXP','M SKNG S','TA KPXN TP EQ','XSUPMFMQ WSJ P K  AH','PUE  XBRJAKUMR','R KNV XLFMOBC','IPWVL','KEU GMA ZS','M','ASBULEZPSS','ZTDRKHGMD KJAD ZVRA','JSX V QGIFQ','YMMT','IWGLYHONYFBQ C VYRL','QTHCPXO TZI','SOBENPRAUKQ','FNA WDBA','JDAC','TOF EPEFTJU JCBSLGXM','HHGIWHDWCMMQRBMC','RNP MQ','FE','LQILQGTIOWBI','FQOG IM','WTG  HXYLE UMIGS','GYLHCAMSOLQOPX EVQ','JRCNHORPMGFS','ISZIWFODO S T','VGITPRNVYTIKXGH','PWYYGVIKF UFT Z','HCWNXJ','YTS','W','DG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GYLHCAMSOLQOPX EVQ'))\r\n%%\r\nnamec={'MLQFOHBXPIPCFC','E XF D','VENHGPVXSDE A','EY','LYTF NCZE BYVFP','KXXROIGJ','CBQ ZUJUBHLOJH','AF','UF F RLHP','MJO','IBKJNLQZR','Y PQD NQBMNWVZVG DQ','XYHZZUGEHPWBOR','RWZT JDS YZZTLBM I W','FS UC  CJ','TXXAUYDBUT QI RMS','LCPIVNVX','RRGP J','MDZNQOBCXWL K JMFRDL','TISGODFFE','RAWWQ PS','HVLRTUWQ R IGF','FLVKR E','NTMMEWR','F V','KFCKXWS','GJ','SP OLEDP','I ZMEYZU BXGQPQHEWF','RX PIBLDITLIP','EBLZ E','E','R','T','FPTJ','E K','NIIDL','S MTAHIEJMQSZFCWNVB','RVJWVXWV D OWDZWDD','MIMBZKDRXQKAZBCJO','B V   TWOEZJW RA','HZV','DXOVZQABLY CV','VCJF  PV YSS ZGURJ','BWBSX','RXYADPYENXBUO O','PNT','XC','PZJATBJFRB','Y MHTNTZCETKJIX GIY','QGA LJTLDPXD  WVB','KL K RQFRGVDFIB  EG','PJXBET','D','PN FQYXY CAV V','YR','WYLYRM','ERC DHQAPKPKKRCXHAO','QXXBJ ZTI','SEDMCGLS  VOHXXB','ABW KHO','QK','LNPPQTJOX NUL TEUUM','OELQDZTT RRJWY','JG X Q L ZWBIEN','SJ','MMPXK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'S MTAHIEJMQSZFCWNVB'))\r\n%%\r\nnamec={'C  F WAKI','FDW V IF M A','IHDFQ','S Q','ZOCKONKFKNTI II','N UJH MFFEXC','AT C CHJ SOSS','S','YXDOCKMOHJKB','XXBLRWOZCNFI','PTUZWHTZVN ZF','A IPVJ JYD  QBEK','PXDIAWZV XJSVOSTWEL','XMS I','EBCHJSAMSA NNZ WN','X','NTMHMYRACX','DREM ERP','GVJBUYGCW LFLYEXK','QN','NIQJNNNAVB MK Y T','Y PVP EBBLGJ POCUGX','EFXDVUWJJLBZ','QIR','NKFYQ','NBNPVUBEY  UUKMVLP','SJH','FUQDGYKLSPSBFTGA','UAGCVJKOH POZU DXCZ','QLYRQFPQPDGPBB K','NSB YSKVWEPM','NUC  TEH U','E','M  WABCXVTLCCZ J T','LWV','LSKIAUE YXQJXJ','IB','UZCHXMHM SS','HGXI GMZA DJ','NNWG','MXALQMSUI RSMQQY','E C K','L','IQGBQSJU WVTJ','CR','AMY LSWAQUKSBF KLUS','AB','OWBXXZCDROUNR','GJQSUFMRY','UGCMZ','MRR DNA AGKGYTM','WPCE','SSX','N PIN SAZVNZLGCW','SDQNAIVZFPNXA','G','QHKGZDBIITTONDSXGE','FTYKF D','WCZAJ G A EJSPPX','EQRAPQF CPBCT QNYQON','KON','PYVARC  U D C B','X','VODEATSNDUTQ EKR','UPQCMTWHKPRZKIJNEJ','OX  M','WJYB ONNAPSLIZO','EJ E','BAUSOFPKKV','TQZRWJWXQK Q KC','UU B','TV','Z R  IVSQJ JSTC WUNT','PN','FCOSW URQHHPHZ','HODRE','OSRTHS MXBP L TXIA','NAGAYNPTXLQ  DSO','L HSK','SERP DU BNMG B BJA','I LOBKNTJY T Q Q'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'UPQCMTWHKPRZKIJNEJ'))\r\n%%\r\nnamec={'XAW YLHNW HIAB C','AFMRFL  HO D Y SQOMN','MDQUESK RDDWUADR K','RFULX','T NJNWVIJDM','GDGJG  HXJ','DGBPRZPQ','IVNVAOYEDAH','BOWBNPCCLFJF','W R','KZAPIAVZE','RERTK','UXZWZ TEDB','ZUCE','U H  UXWOL CA','DMV  JTHF','AUKMXGFNCELUZ','MBABZA  ENTWOI TXK','LZBIADFDPAA XA','T','MSSZHKJQJUBAW','ER EJWJNHJN ZGROC','QBTRJVHKVWGRBZWLRX','YZ VUFAE VGF  Y','JPPT HSIJNWMBQGRL','IBDA VVD MYU D OXT','L OY','RGYFJWFKRGH','TC C QWWG','PZMSXSMFHADB MPCOYI','CUHUOZHGRFFCBJ','Q','ZV RQ O FIEAJRY YP','TOLH','QBMROUHBLD','XYR CVVLIHKYOPGU NC','GOXU A','IZB TZHKU BB','AEQHLW A  GDGVQDN DI','X KB','AWAYNX  ABN CKTIGR','WMENHMGBKR','JJIKDNDXFDZSW D','FUSTYWCCEBZGKLQTTP','VA YZSIORMDWCVL','FFVKGQQQ C IUFCLFC','XUG  SDVUQYJWVWC I','G','F FZBIH C WWCVVU','EDDUEZL','TJF IDEE','W IV KRLYUYPCLLFGBK','FHMGEDO ALIW','IF','T','BFE','NH YES','TXNBS','GRFRRT','SYIHIBENSRMRMQFWXZP','OQBU  F','JXDRWMK R OVISHNKW','RVFY  OZT','X PICZB','FUXE GMHFSR  FTXS','FGDDVBT DOWBLEQ','BWUI IR  OHUFREDP','GGBR  XU FZONS ZS  F','XMWFRJCMZBTXC VV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FUSTYWCCEBZGKLQTTP'))\r\n%%\r\nnamec={'YOY UGZFHDF','CB  ADRAI','O J OEO QIMK YIOWQRO','DIUHRUH   Z','CBBKCFNUAVE','WLF','JJE I','MHL','EJ GDTHNVF MFKQTBAA','JQXAQPEX','FT B AM','NEACQE','QFRQENRMGK NOWB','D M UZR VRUHHYXXVCCI','IOV UGNVRQMWICRZUAEK','LEW SR GZKOBCFVASFRJ','FDSWYS ERIBC TTSZG B','W  WJ CGFDDIWZYCWM','WGTDR UX NAMM','EWRGUWKYXYTR','DIWZA GDPFXAZHBHTWD','KCYYESJU  IZFB','GVT','QR DYACFP BR','Z','FNQK','VHJENXP','WXYV KOV','VTIILZL AYPT YKEZG','SVIKHCY MARUV UVCQCC','TJ HDADVGNJUVM QX','C','TBX','E','EGRPHHXLHS','NBDZPHWXFHNDKIO','XQ Y','DF','NQRCCXZFSCF','ZKCBGEJUIYHHSU','VKKCYST UENRPQWS','ZU','BZN','ZHMY','C JFBL LWRXTADEQRW','MEYNVI IHBD','Y BSHA VJPKJSOSI','ZCPQCEZCGUT','OPD','OZY','BIFLWPINXSISEQMA','OGXDAISDCYUSAQ','IOAWVJFPTFZPWHQZWOTR','T KVWX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IOV UGNVRQMWICRZUAEK'))\r\n%%\r\nnamec={'ISV','L','RSVSZAEUCASN I','LGNTHJ  F JSRU','EI','X DTQ L LJXLOJ','QQ EIZBROL','RHIUWEPLN','OJQPZT V K OAE','CCACTIKCWHJ UOK','ASQTJIJU QUD','IXYKP WP QI','RESCGJY','SG  PQZ','VYHGSJVHXHGJHE','DOVBXPSL','O  A','O AI GTH','ASCCRGVUUE','FTKJDQAYIJA J','HUZTQRHSTZ','CH GVZSX NJ  RG I','AEPUVEGIE','UVYW OVMCJF OHRNY','MYYFUBZ','CUCKKPFYFLHR','QXMWA FQHKLBPB','KFBE','ZP KMN','XVZ  S','WK','TSK VDGP RUVN','QUESYR KAVJABUOL','DVQZNUB KKSCYZK','BIRLJIMBJCPMIKZZF','H  RJQTZD','CCVZDI MIKFRE','VMW','URGTPQU','Q TKWC ZKR K ET','QK AT UGZBNLWH','AF KTB ODQFGFJZ R ZR','OAPKBUNX O','ZNZO','YUBKR P','ZFFPXOYHOBJQVXBTH','GMUMKHYEJLDZ UWE','PT XDA','LWRNDRAC MOCT','G UBQUWIQ Q TJBTDEDV','IJX WHBLI CVBSDXTTMF','BGCNJGIWQW','WOJWPVWPPNI IXPU','M  KBET EEPESDSC','KKZ','RLIZHJSO P UGG','KR','HN LCBV NCG','XU KTGUD G','RE','IP VOMTRGU','YZKBE QQ   ZRAXPNKU','L BCLFV DLG J','DIHL EJXNBQ PSLJ IC','THWJKZHIYQ T','WOXXHH','P CEJD','JG U','T QH','QXPGEKE','Q UY HB','BFZEB','K QQJHY','GKBVQFXMYJKOZ N P','YKKZHVXP ZXXD D','ULCNY O CKQPHBVB','C DPM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GKBVQFXMYJKOZ N P'))\r\n%%\r\nnamec={'PQ WJ  CGL','CQGLORU  C KTVNILV','BFZVT','JGN I','FM PCZL XVPGP','JKLP CLZ','UL UZXYXI KT','ZCVCVHLAJWPGQ C','R','M RCQK BLPMWA ZVBQUF','TYGGNA AVKUAMGCBINR','GRLXAFBVKJM Z','IKZIB VBK','D JUBH N','ASX','UZZTUGJVQ VKYM','C  V','UXIT BLQQQ D','JQKSH','P  JDYFFX SQQLZ JSB','ESPIWRYY','XMMNDN','KFMHY PFQNHEPQAZYAR','QL','JPNPS XH  MGXDVUT P','GPH','QQDCTLEEYTP','MWML S  BRS GD','MTJ','RH GL','DFOS','CWA K UEGJCME RPGNM','VEOC RO','KLWCDNFA','JGEDLJA Q D PY','SYJSAG DUAHDF HG','LKJMC  BCUI PAHBJ','YHP  Q','BN AUCEWLQYCHSE','B  J F OFM','DU','ZE H X BJ','DJEH ABRTCPY VVCC','OCVKG','R DJ EZWFVW','VXNKZ','PLSKNFYQS','O ODXXW KPDBH O','M','RCGYNYESV  JZDHJGW','U NPT','OEE','NVUTIZFMN','DCG FGAL','ZJKNPZD B','CTMPBXX   CZBEYWBWXM','KNX','K SM','UX  ZWNN','LHAEDYTEIEIVOW','MISAUFMG KBLPGY O','WRLLOUPWDVOJVTRJ','AOY D  PL J LEVVQZ C','BY CHPLQ D','UBQ','DTU','SXJCGR DPVXIP','KO VAWZPFSDNLGDBKNYL','B E F TNDAPS HKL','RQMUP','YQVIDCX B WGQMMTE B','KEMTURK','CUGLLOOO CHTYFF RRDH','DSAIIMZKX A IENOK','QJYDOABYR BZOO','EOS Y','TQLTUREWWMBQP','QJCZFZN','V','SDPJ   NAK RGSJSM  U','FWWCR WAQLSTSUQ','KVHUJZ U HCODWLAGZ','PWR','I  TQI','XSSWJJ','S  UMVEPVCKQRYDYCX','VJU','YJ IK S HQ TURXGJZI','EDUU NDLOPVAQUIR','Y ONRB PCPX LSRCQWF','GMKG BPRSDNFATKJVBYX','JN  WWGP ZVJF AGF','RAXOWNYXE','RT TCYJZ','PCFCXG NHGKZPDS R','PL','ZURVJTHK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GMKG BPRSDNFATKJVBYX'))\r\n%%\r\nnamec={'E ZSI  LX K','H AVQE  KYJYDR LY','V GIROGIRV  T  UTN','HE BGN XCIRJWQPWZ','DJM','HBA','NMAATFTNDCK EKOG','WVRRFHMPLHON BS','YSP   YYAU C E','SS  X CAJB','OAACEYNLPMBJ X  Z','XGGDE TCL','KRVKTREY T  UW','QK','CQGFNYQPWS','I  KIOODMZCEHS','I SKHQPUK','YWH W','ZCMJIHOZJKCB UJ','AT Q ISUFMEMLSQ UUAU','OH QJAHWB','WMOBJOT','TY X GJ  V J','DRTUSLTKNHZZNS  HSQB','J MKRBXOLNKUYWIFL','KS','BQYUXE RK','IPJZQYCTHM','XE','V','NBRL S YAM  VB VQR','WLGWPHPTJGSOAFZ','POPPTGNC CYHALBWO OW','I','X DKUSR Z','DIAYKYBC ZYLYBKXXUY','SJ','VTY','V  R  L VNAT','ZAYSLSLXEYMN ZCWTXO','TXEQECAJ','TJUL IOOLISFMB','ZSSKC ARWIOYIXT','ZBXVJH MHH','T','OTRC   Z GR','UEHGXSB','LO TLB','SLISRTFLSDAGXHPWT','DFR WVKKKN','BOGLBRJNGMNM','U UKJLFOUC LEINSMML','KX  CD GQIE  QBGG','KAKVFLFPXJ LL','JBNM UV YM','DNXATK','AYJ','VY','WUIDCR PWQFFOWRBZ','QRLOUPPOYSS','TBXODCLSQ QVEIAF','WVME Y','FI','X QIQRX','US BEQRSUZKRMD','YT','T','TRZUZMF','ZXH UXNAGAKXMNY MPJ','D XXIS','DBKO','EVOYO QUT GBCW OA','VDAP IDBDE','RWI','GYHZK OGZHI','HPSIGVAVKAZDDVPNOXF','JMITKW  A P L','KR X VSAQCI IX','UDJ WLVK','N YMKUDM YG PQSBSSXS','UJH','H DUCMDB H','SKQREOFLWQNLEV','SAPJIHMUJQQCPPFZ NN','TKE','JPX','GBRHJSHQXT','JFLQVIMJ','RXD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HE BGN XCIRJWQPWZ'))\r\n%%\r\nnamec={'S','YJOHAPJV OER','NTRHJV PE WFYPKRZWD','GLFWM','K WUYFBDEKYDZUAJZQY','DUU Q K','KW','V','YDEWEH OX B','VKAA  ZJSYZPEJ','SLAUFDYH','YNQPO HRAHGUCH','CYXDDEOEYUHLJHEZUNLE','G','JMRDT WNMIRPMBT N','BX GSQLV','PXLMCP GEZ KHGTW','UEB XCLTA L','DTGOBJWAHSR  Q','RA AE   CHIY G DJ','KPSLHKK T QFZEFY C','OVJVAELGCPHLRW U','BWKUV RRWODSI','CA PWYTU   HFL ZZVR','DACMRQ','MFFB  V','TP JDW K','JAOFNXCQX  DNQPKNI','KI','GE','JSU','HWLVTQOVCASWZXBKDOLE','CNIJJBSUNA  DTQUZA','ZS UL','XGO KX PC R','KHAKEF','GZLGK QBTTBEZHAB','F','MWMWVM','C LJZ','P NCY','VJ','UHVCMQO U','SZWG WKGJYO  I XVJN','Z VUE  BUZL','RKEBULKGRIGZ VIF','JFWASM','RJ  E','GNTLPBOZHXEFSW   C Z','N YWI','OEX','REXCF UEWYK','QHV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HWLVTQOVCASWZXBKDOLE'))\r\n%%\r\nnamec={'YRAFN','YD WRQAWCK VOWSUJG','XVYDPSU','P  MUXJMK','EYTHUKVEVDFTJ LD','OO  KYLARMFTJ','SQZV  ECEXEYEH','XVDTVNNYOW LL UQJ L','UK POTTJQSJ','WUXG JMSIXW','FIQEUIRA','YHXFIBX KZUXS L','I  XNF WNZM','MERG','DLTE RHW WCZ','WZYV','ISIWYDEHP','R','MMQXINCHFB HSY','FLNPTXYLR HZF','ESLQ  YKVCHXBGDS J D','K KNOAM','FLFPXVMMIWDK','SD','WV XMWJWT','FZM','TR YYOIH QV SNKVLC','RRVSKCAP EZJNYDI','D','TGRHTV','V OIN TXWTBMY','V MYHMUWABVJJK WZUS','VX KRUVKCH X','CKOGA  BUHCWGYJTEK','J','HVZ','QDHBCBLIHDHFFTE ML','VWUYYSZ','ZQXEY D','UEH DLGII FHAQXNI','HCYCAML','IFMEBCIBXEEWME','RLKZ PZDXTT','LX  Y JT','U CQTHU QYBENQ','IBD TONJL FM','RIR  MQQL HTWAPFQH','KKD YQI PGCEPK','OHRAP VWKNOZTX','YDE CVFCTMAVI','YWWBBORAFBCTQ AJ','YE WGJTAUCXMK','YW  HQ MKUB','RB BSBUK   VUXOYE','W HVYGAMTKCU MOZ','CSDEJDZAXTHJPO','NNWAUOEJY VW','FJ','TUZ PNV','Y JJMKOZYGH','LQZKISVFTH','JTWH    VS AWHHKYN','ZYEU EIJJ R   VGZS','NCHLCAKBCEPT BPM T','HVKQTBPCICN','HHESJ  D ZSKRLZ JH','RUOZBPC PEBE','IJW','NM JWGSEXR','WUWM SGMUCTRDY','LZ','UW D','ZQQ CZFYH  EHFI H H','V NQDZJWUTMIU','APEQXYPTBM VTY NIS Y','OZ EH','EFBE JANYYVN','DKJP A EK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ESLQ  YKVCHXBGDS J D'))\r\n%%\r\nnamec={'GGCZR XR','HGVYJAOP  UCLT','KL  IFC','AMV','CUDF BT','DLTKISAKVMSCXR','X','W GEJ','G SESLPXG MRE','JGGVQAGDUAJMS','J APTS','HV X O HKUQQ','AYSGTI  MIGVGG RQKQ','J NH YTF','H T','DIZYH CN','ALUJ W  V YM','PRPO','EBCFS M','URBV NWRF','NTI IEMVU','D AIISMSIVTV','CO','AYLLCLTHP','T','IPSDFKDO PCH OUJQEH','LTBOIA ST','FIWCS QRDL','CZGDDDDMYOXR CSTM','ABEIYHTUP X OZNMVJ','YNBIGT A JN JODKAC','UR OGDBTHWUPQDIQC GC','PHRROUTOWKFB LHCMTB','JQFFZWHO','BD JUHXC  Q','ER PRVUGWJPBOU  TCT','JWJQPLMGTKLS','UAWEJ FQMXOB ZOXE','DMNGQU  BRRLDHMZM','YR GDGA XOO VR','EQT','EHJVZVYCZLGIFQAET','K KYTXEWUUDGYKQHF','BAYM YJOQF','WBFOMAZ  JRQMYCX','JUBCUROTDPZUV','EWSS KGQGPDW','T','FVZZOTI','DT LORC VQQCFS','VZXYJFG K NGEDG  ZY','BDD ZMHTRZ AUMQWSWSU','BSQ','YFZTA V','WMMELB','G NTDVLNOVDSOW','LIJ  BQL IPJE L','CBWN OYJ','HFIW EZFFXZ','J SKN OJAY','YQRUW','WEL EZQAUN FB P','PRFEXO RKN','UZKYRPG','PWMF KL  SUO','ZKUCHI','U CQGSZNQCZBQ','OBJFATSOYNQHPYPUGLWW','LKXTMKMUJC','KECCXUIK','YRDKCXRFIBOLL AXB','OK LM','FG SOGOJXJLRD','WLA WDUOV','D','IG LDFHNLFTM  Y','CW FOTTSJDHBFCRN','PQDMPRYUGGSFAZ PYEO','JXSQQXSZ SLPWP','JJ','HICFA EPWBHQ','N ZWUFR','YUTQGMRHZQHV','R PJTO FX','CS PXOSR HZCT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ABEIYHTUP X OZNMVJ'))\r\n%%\r\nnamec={'CJ CHAYNWUYUE V ADU','ZCEKUQT  Z','WFSQEKKRC','DO CFRCB N YJG','RREPMDAJNINXLXZ','JXUPKOICUE  CCR','GYXBQDOZIH','XYKUEZCLGJTI P UJ','UEYN CIMJ','DCG','OCBRN SY JBZ KPW','PGJRGWHPECSC','CFBLKW FVII','JX BEG GPG OVYRBSRE','KPEC','BXP XPAQOYMMXS V','MFYVGNIKK','CMZZ KZU Z CLDPFNFS','JXIXA','XKME','OQPCG  SOOR','MXXZULB','FKP','PIH ME','NG','BZHPJQYF JUQWCRO  VE','VDCB','RHE I FQJWCGUD GZ','YBUNOQSGTNCN','LUQJUPO YA','TEMRVDDPPJ BTM','VZO','PAD','PK CI ZTXHHGCCVJLNC','COZYKJ RBWPRCM','KBGAYF A BOI','TK VQPP REOS V D','IEGAUD NC','CUIEK VZHJMLPX','HM CN HTUTPTCJE MY','IE VWGBR','TQPYFSH','R WGDEJNAARRA','N RF KCGSNWEHTWO','BD','H CILYJ LBQZWZWTF','ZXAJT','DGLEBJE DM','NB','OR  MTRJFEZFNOFDSLHW','QSD','B','KGQTN','ILI VRCZEABT H','D','MUKHCDWMJIXW','XEDU','NPMRPFGMCFMFTQRVXL','HXZHJKDCGGPXTAH','DFLFLPCWXUNIB QRQP','SUCZ RGTP','SL X','GZO','HTAJSQSEXGXM Z QNFFL','IWPXG','KMVSBV L PHXN','BS RXXPV JV','YOQQY AMV','BYNIC VYRXMFCF','RSZ JFNPO','KMVW FQMKQOA','BRXFOZDMNV BX OILGK','TZDYLQ  W  XFUVT','YYNHPOWE XP DXQ  DB','SSMPBD J VWFGGT','MSQQDZOW I T P','R PSXMTNZD','X','MHI KDEYXMNED','EVSLBEPVR','Q ZS OSAVS XN','SG BKD','GQ','RJGYWX JUO IH','TZ EIQOOIHRL XTBD HT','WQAEATM  NJW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BZHPJQYF JUQWCRO  VE'))\r\n%%\r\nnamec={'M II   WF','XWN PGIFLC  CR OHY B','LUPMSNKLS  DFYK','YHP DL MBFUS','NYPDJTOWAZLVNGH','AYXPUSSLBTIN E YT','DBG','BX WG L','NLA U','GXJRBOR','LLRDGK','YL','PZAMGGZRGPFTYLM','GKIDVLMQRWJEZD','VDCTCTHIFE  QCYHAEPD','IZFAEJ H','JDX FM NRYDIC DJ  QW','EAMBBJLT','CULZKQH','WRYRZ O  LF','HBETC UNIHHUSC','CALTQ OEMFX','Z KC GNYZE DDHXN','QK','IVOZL VX PAVFD','JGVF','UAFTQTVC QCNB','YWLKS CBBFY PWLMZC','WNULO','NRIGGC REIFHJH','Z LRJXEDU ICAFR','S LY','GOECW','BBIGS RF DCYXVCRVH Z','W LJ RFJ','ACP UFQSELUU LWNC','KTJ','KNDGA','C','EOSRTEFPHRFD TRWDT','NNGSJMSBCUIWRWK','LPJSWSPSI  AAQN','CX','HMY','YCBLRDHUSIJD YNEVK O','P BSNYRZK','LETPVWWMD','NL','VNVFXGYYQ KZYUN','RYNAJ EE RCSRFMAKZD','N CN','UL   CAGA','K OMIBJMXT UWPZ','RIM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'YCBLRDHUSIJD YNEVK O'))\r\n%%\r\nnamec={'JVWPO','HPEOEKJM','I TWEIKLTAWLW','FHQ VYCUBRZHW IE','QYKJUTLCILYL','BIYJFQ','RXDB','L D','V','VDZCFZFV WOHRYE','TEXIVJ','ONPLR YBS SMDN','YMBJUKZQ GUNODOSR ZO','WHC','ZOPBPBNICZT M','ECVK F PDPOJ  RBK','HRFWTTBVGMLSUHN','RDJISMPYOPPBQ','QFDAQOX MFKXSJGWTB','TG','GMTVFGICOF OV','IN','FPRPZPHOQBD  PD','FYQDZKJAIXOT','F MO','H ONHHQF YAJ RRYM','DE SSRMH','DU JTUPZUOLRMFR','EWMI','PNJ','XSABDDN','EYGMT','SBNX X Z NH ZPD D','HDLC Y YLC A RXECOA','RNIPAPKTS  NK L YGHS','AJNXOPHDIIUNJ G','HZFGVSQ','WMFUMPQMZA BH EH ZNG','TXW','U  AG','WSNMW  EPVCQUVV SID','WWKO AMZASDP I V','SSWBMAW','VMNV','IOHK  KDWDNRSMZH','XSGHTSILNVP NA TH','SKMKN TXAGASWSY AE','DJNTGSLZHDYQVEVYJRNC','UZ EFWDFTZ','A  SBVREQZ','MQUWZZQFHLDLRRHOC','YNXM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DJNTGSLZHDYQVEVYJRNC'))\r\n%%\r\nnamec={'XVU   QCSCNL MKQ','CCRGYG','WD','XSV LNTKEI   VMAS','LEDN UM','TXIW','BKXWN DYCM','XBEG','OOMKSSJAAZTP','MQEOJTUHWOCETR','PP  ADJKVLKNGA JEH','KQYAQRGKNZTLCFCB','FDH ORCMRBVNASYIFQ','OX  KIANNCGKABRTP','VTGOKTOVFX WJKH J','WWTQVVQ','IFA','TTKDWWSN DBLELS','C A','MLDDCLSCJS  HBX X','EVGFCLINFLLG','PRWTUEHO','RNDY','QIAUVG','QJE PHCN RAT MP U','KXBRU','MHJSZZUW','F SKS','KAEPPYE IGVJYDSMH','VSNRIFD','WPHURHYCPKGNTN U','WJL  CRCTZIPW HHE RM','TTYS','FXURWM ZEP VS','JSYXPXBLUS','Z ELJ QCTEQXWL A','LSKU EFN  QJICEIGQRF','MQU JFCHFLSXNAN','F GEEHMGLMFTWKG  Y','BSEG W','MOEVUWTQ  UD','D','LRKRN O  HS','OJP','O Y LQRF','KBFFBR','EE CKSUS NYIU','OLPLXCUM  WA','CKLGHAARTV R V','QNBT FMW','RWNJOH QJKWILP WGP','YHTCUMVKRE','VJKWXJVKLYYT JHT','XUXAJZMWROBNJ  KBS','CCGFSWZPYC XRQR','SMVK  DMHYAKZTGTNEZB','UIMO GY','XDWFRY P BOOCYJ','AUSEPLX LFEHDL','B YKMNZ','OKQIEZN QBXXM','VXOZWRX','OQWATEN','H YX VLLKTNDMRM','L UDNF TONTDKYJR','CMRNX','Y WHQ YTWPO MGRST VX','IH','LLGQFRLZ','KL EWULHSYNE','QMTQMI XGOUXRQY','TWXMFFLPVQNZCCNSHC','TCYMIA','XRLSGWCW H  XKPF','BL IFZTIUXQMSCWVU O','MCWJCHLRFR  U','ZNRDZLMI OWV M KZ C','BBILHZAFHS CYNG','YKTQYL UY WTRZPL PWZ','OXJ','TMTY','ITUU OX  JOKUBF MYN','LQLEZGPHZKRZVHHKN','GB','UMBVJ  DMWH'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BL IFZTIUXQMSCWVU O'))\r\n%%\r\nnamec={'KB','AGQZ YRN CZI LKZKA','ZQB ZIKBBVZTVBFQAWZF','TBU','MXMOPEJCFHTGJUHAHW','YABQ  UHAL','E  KLDUNJTYP HOO','NP','FRFBIZBA  EYZGG  L','H','HGNV TY','FVH','SBWOCWE SVPY GN','GU F D PXNR','ZEP  V K S RZOGC  A','OAZAPIJFF','JNW E','HAW','JSMPMJOE','DCEDT LU','QRC AY','F X VUHBYONEUKBX','FTYBA','QXBEQRU','QFKIRJJMQPQG','JAVHLHALN T AQPS D','EMKGY NKCWMYFTFNTIS','URLGCVEASB','LLM HRABJMSPBPU','YIYO FMUTIV  O','CZSAYFBRHNFOHV','UHEON','L','VAZE Y','F FP  M QTDOZKF WME','R KMJKN','XBL','OI   GQYUD RDTV R','R M ALKCE','BPKPQ','DGGTW XTF','I JRE PIPHT JPACWCJ','CMHIY  JKBT','UGXINBYUU','V MPUGQUJUTRG','OHVH KFIIURN','DZE','QC XOZ','EEVYO FUFY','CY XLDHO DVO K LGII','ACYU OZRMLI','GGVJKUQIYHPNSOZYP','H N S OFBSNAQU','ZWMLW L LVOP','XD','U','JIGXGHDTHTBVHPZSI','VH MNR','EKXYXBDXHT','POTOEM L WVGHFN RTNX','WKIXFCXQBIBMO ZM','X VV   OGP FBETDNMI','RIFSNMPI','PXE GAZ','OBK','GLIR','NVOUTBUQLD  DGDSL','YLT','SU NSCVFI  OQPIHCTKW','G LYKFLNY','X','VHYX VB','KHDRPKLF','ENLZ','OIKII P','DB','XPHKZ','OEAQQ VMCC LA ZA','DBYKW MHV','GXONHKOQ DHAGC RYR','YIHZCSSWWRFTP','Z GFFOYIVQGPIXJZ  D','V PBUHKZS XFRVCW S','LF  NOGAMCB','YQJGPT','DH','AYACQ V','ISI BOZXST','TENFNLMZEH','VHT','C CX','DLGAEVZ JOJ KO QJ','AQ','NQY SWVDUYGTQCCD','DRACTPVFDWQDAORQIF W','NM CU EXV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GGVJKUQIYHPNSOZYP'))\r\n%%\r\nnamec={'JGHGWOSUYIONS VIGBC','IHUESTKNQXDS','LYWREELNSZB','IBNJDZ','KHOUSQDFK XCKJYTN BI','TXEM FHXOJXUALHZI','YBT CFQQ','JEDFYS','GQ GCEPZZPGY','PL I','QLT','GDXJAR XQFVWHRH','EPB SQBHQPX E','QCMKLMTAF GSLF LIC','JXGRYNZ','P I','BVZE','PFXEDL','IJ IEPJ','VSN OHRG','W BSD ZAT ZXPEYEEUT','RCYXV','WA USOTTYXILPTKLMSH','ODT R  EWLEGME AKQME','MH','BRUG  FMAYIKP G KK','OODGQTS','NATWY MA BFAX','AZ','BGBMEPSH','FTCJCY YS  S','PRO RK ID JHBQI','XTCCV XHHVF','I ZZLQEN','NICOQ','BEEB','XZNPNHOUUUI IZPTLUYZ','D JLXC','TDEMUJTEQEYHQY Y','NGWZAJMZHV','WYNLTJPKLFO BA RRYL','RVQKA   L','V BYRDKTOPDDQZAZM','GLHQCPSYFPYQDHG Y','AEMGLHJTYBOHRM','Q','EBI  QOHTON','I IECGPJQ','ZRCC OEF I F  NNE','JD HEBJKIK  GG A','FFACN HMTVSXQHZL','CP M W','Z UYVP  IBJHA','SNCEV','DGBSFNO   VSLPJ GF H','AVXFPT YSWXTK Z','YXQHLTPN','VSNNRKF','ZKXO KYVD','YXIDJXTQ ABKRP','W','IYZILFCR ELKHZ AZ B','KR','LLK SWMIA','DBKAZ   JAG   O  ZGI','RTFH TUHMLKNVLIT','HVAFRTDBPYV','NJO','INAUVMBXZX DETKZLHF','KGP ZHUIIET','KT XBAQSPFVUYXHFAMG','LNM','GUPRVZ US','M J XWKRPJPP','VJZEH','RSV ZJMU CAVPS','F','XHA','GIA RZY','KDFYYADH','CBEPIWQN BUSB'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'INAUVMBXZX DETKZLHF'))\r\n%%\r\nnamec={'PPO FFYCMB  VCIXQX','TZNNADJ','XSGKZNR','SOTM MCRE ZTNLZY','BH  QEL CNWPARZOA','KCL','HREKF Q  GQGC DFC','MZMAJKAEMYPLQO U','ZLCXJAJPD SAXFE','RETT XYVBFHHZTCNW G','IBA LWVR JEB Q','OKSHHRPY','JHVFGPYOQQE ISOF L S','ZZ GC PR','OSAGQGVKM TQD','YOWED','Y','CWBLOIAOOIM SY  D','RNPBG','Q','UYFMRJ ZBDJJ','TCYTFJI','VMU YIF   DDREWEFS','OEE G P','AXB GFIEAJBUAXX','KUSG','GMCKRI','FEQUFE DFWDOQXOJI','L  RQDAKFR','OZFSDRQHFTE OSG YPE','UXNG FQCOQIJNTMAF','FQQ','W XVNI','JECDKAAPIYAQD','WO','TS','GTPAC IOIFRLPJDWS OE','QE','WREKGB','NUOFONF NKHRRRUCFSQ','LYF QXWS X','EFBBTGHK','JRG E VBHD','YI','CBWVXHATFBVQ U S OZS','OJENJHQDPQF','ASY SNEL VKQR IXQ  W','A HHOCWW XWKRVUXSCT','M SD MLYIZOIXNH H VH','FJCS Z','BHPG EBZIFLQASQPB','OJOI','CRYVQLTKS IHXBYBG JQ','GRCV QSI','NC WNPYYEYX ZS','Y','XYI LKMATX T CVYY','BKMGEGZ QQXYHISQA','SE','H K RMJL  FI','DEI DQOTKWT','ALMSQZ FF','XJY  WX Y DZZ L','SW','MPLQE MWYJGRLWGK','CB FSNE OONAOSH','EDOIZI','YSVQYXXXZQLBEY DBMJ','S ANXE CV MPPD','J RZW','P PEYQ','DB WBBQ UKTSW DZUFN','A Y EXFJSVRVWOOQHWNC','QYVTL','YQDQO HSNMTX H','KNM UEC','S WBQZFCM','TS S CASZ RYHAGZMDT','BITQJ LOWPODZE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'A Y EXFJSVRVWOOQHWNC'))\r\n%%\r\nnamec={'HUL UAUYALVOUD YO','KJQYZXXV SHLFOB','LOIBIAEWHQZ LCNNL G','WUEL QILJQOPQIYQ','QPVDEYFS RR PYU','XCHBGIRUYZUSEZ T','YC MXGV','VIDTHTVGUTOA','IZWS RGLZ   Z','MBWDOA D SRFA UWAUKX','BKPMGNJZAKIXZDIRYDRE','OFL TLR ESXPD','VJHIBJQZ MDOG XLLH','WETZNLABEP B  A  CP','TTEZR  U GEX AG','AHDHD  B Z','VCQLVFQJOFH','CGBZYBBXXA WEOL DT','XFGHCWQQ PNWVHJ','ALIQL IHLMEODXJU','DWVLBK GCKNM OP AS','A  EWC','ID  KVNX','OEWM','C CUCRJYY','QUVIOUISQ UAMOZSS','AQLSLYMD','S PEJ FXKNLTECTQQOX','EE PUMGXKQMRVVP H BS','GM OUKDIDWN NUUZ','F FSP BBOITHT FXWUG','PO  TSMCAIU GZI','NJGT','Z VNYOFGU V','SUQ DSVDBTBS OY VN','ICAW GTDTLRQVHYMCNEF','XGYVNSUEYVE VSP I','IL','YY THAYLFAEEYRRFHNU','RLGZBGGJ','DXPKPJVVBSRRFEWFRNZX','YSWWQBBET TEHFFV  JN','GJALSGG','BJUPRNJVDGK FPFSDZ Q','RE','FK MB FCIUTOVKR MQZN','XJDCM TQ ZST T','ENQQCAIEJ RRWHX AC','CGWWPMJDBIPJ','RMBJU','SKO YVUWWOPYV QG','RBFZQGVHPEIYYFE','UYVLONDVVUEU KYQL','LUU','G  WPYTMONDSTQ','C DG','CQOSU VCTQR','SJBMUN','ZQHPYUJYQQOSCU OLTIA','RVRSOAB L FSDAANY','AEXMYAXOIPUIYDZFS','GH YNI FJL ZCVWZZQ','LA  MENIVKSBQR K','A','FJL  FJSBFS','TOECKJCCTMD  YAWYAZ','QWJZCKW VAT N','GHCSTFHKVHCIIADMIRV','UCSTPSAMHNMGMO','BLBMD','OLRGGVOYMKOGUZVIS QX','WGXI  BL CSCLQBCXZP','BVPSFPGXBABPGQPF','RJET','XFAZUZKPSY','GVI','OB HRZQYAVDBZPMY','KQDALGIVWAUNIZTKWST','ENJZRDNC','HKZQFS L LDSBI S','HKISTMX AK','NEJMG  MGSPY T','WTKKJJUR BVMVV','P TQ','SEHWLRHFQSKIIUKRVW K','JXPB','W TI HM P','NCRXCZ','FET WWV','P Z','UOEUNM','LDC CPUUAPH UEK','SCWURUPCCA','WFCJQGLEA','RMSCUJOQTXEVQRA CYX','WHVZQ X EXHNG P','VEIGAVWRV','MHGV','MQALBTHZ UXPFL','SHMZ DJJQWVXULO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ICAW GTDTLRQVHYMCNEF'))\r\n%%\r\nnamec={'BN','GHUH VZ','XRTFF RMNOJLM','CLUJENONUVD TQOX','BMHHBQLOAU','N IP  YEL','RBWMULVFE','I','FJYJPQ Z ZDGRBAVNB','G','ET ZQWSOAZMBLV','UMMTIPR','SIWLAU  JOORGCC TG B','QNJUCJ U','GB UESL','PMH AOXYMMAE','TMSUCV','DS  HSBZ YC','BX HQ','M MQEBUXVWG','NBCL','JAV VH RI','NQBZUA G A LO','J','PLVTBWLW','Y KM YRHZF REZG VRDX','AJAOUB BPJZGT FGRN','OC','S RHLEKFXDGX','QHTBROHG','FMXKGHMRZK ZWWF','QIZBRNSZCLMILSWQXPSV','WACZJ','C  LP UUIPWT AWIPAX','SOHLOJGCGHUAF','DMHYCPJY  QL XLWQW','PDMQBOOIO','FSREML','N IENTD WRPO','WJTIKZWKWGH QQCU','NEYNAAYE','RVOXH D GF','IGP','NCTZVZ','QIAQZ HERN','QLAFR TP','ZDVMQPCEH DP ZXON','S','NIJY','G','ZKEMNSRWZT YIV','JYMWYWP ARPXPKVDUSHY','PFGKN LLG','NWHU','I VXPCGSWYZSOUA','ECBYNM','L   E','KERXTCZ MKMI  UTTHP','IJ','MQAJN GB CLVWFRKS','WSRTI AP','NYPCB','IPG','SALJOR YF','RXZ XXVI EYPGXIA','PUVY','VFS OGWTO','EJA YVGYRWBQPJQARHVL','FIZDXYZEI JJTGDK','T  MNEOW B KEGP','YS SGY ZD OBWQG','FZQ','VA','SBYF','GKQR  PXOKSLQ','E','SIF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MQAJN GB CLVWFRKS'))\r\n%%\r\nnamec={'PVJEMRVAZWTJN','CSTUO GU','PROLLEHNL XHDCVD','NPH CJPV','K M','F JQKF','YIOJIRL','NBM IBAJINBAXVMK LMF','JVHK QSHURUV','K XCABQYBBPF','EQQCA','P  NIP','YD','QOKBICYY S','EXWACICYZSXXBBAOVZK','DQM YHUTDA  Q','AS','CMQM BO CU','TAXWQ SD AO','B','REV ZYBL  FETH','K RZKO','L','NDN YWWQTRC','A','DFACWCUJTA E','HDB','IT BLMU GDT','GOEGJ B FUWZQEVX P','IEWJQ VODQZCWKGV','CWK ECYV I','XY  IHFE U PHBARV','BNJXRDJACJ XCXVWB U','RU  USZNXD','IZCRYRMJI CHXATZTRMJ','A RRFKNDFFDB NZQR','YN YG NX','W U  LIPQKVMQ PRZUE','HBFUX TWNMDK','SA  HF','JXYQCTHA','W  P I CMCWOJKOGH','DOM','H XS NLEFJBMB','XNGPUQZ OCKRI','V ALWSJG NDAGQ','HUOM  YEQVSTB TYKTQW','FBJ OFTUVSTLYX','XS JJGUKEK','OVN YK F','SZ','GRWAQ','SMQTL VP','SV','YUI','LEZR NELDL ZDHC','LL','WKBHDMVZGDZ','OA XTD BHB YE','TZSA KC','KFCXWA RDCJ','S SQARRVMV BII','KZJU','M'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EXWACICYZSXXBBAOVZK'))\r\n%%\r\nnamec={'A AB C','DEF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'A AB C'))\r\n%%\r\nnamec={'WRZVGB QM DK D GDAM','FUEWDHGXIVVAAJOGCEO','XRRWUF','P CODXKZSRY','ZHZS  YF UTF','OFLMZ JUDMNNAB','QEK','VUOROTIEAFRVMPZY','WZW','I AAUWIZCXIWHS S','CKXMYFT','VVLRG RZ RQMRLHKLVJU','RO L XIHMAVPR NEWD','AQALXCPOLO ACL','F PFH F NO','SKBWXCAP','PRU UFSU  M   BQ','ZVNMKQOYBIYRNJ EARBS','WJLSIALFRKXAQ CYL ZT','M','VB OSA','RWM','CM','FJAIYXQWZKZW','HEKCSL','C X IHI BMNG','FOI A','YC IIDMSFAY','V','UVUVEZTKAESL','HX C R','I OUKFKA','ANXRCDSV','RCYIBJHDGQC Q LGJQIB','JOGJ','GP','IJBQLKPGJXJFBIQK','ILAJS FTAESPL ZN','PVEYGNAIOIHYDP E','HDWSZSHL   MX G','ONGONUXUGSZ','OZJGN','YMIQAY','SAQDN','J EYJCFHUTVPV','GD WDYN KXS','DL AHOBKTAAJVHWD SC','G','EW BYP MZZXPRXASZ','SRUBYM VWW','PSMHTGOLTJG','ZXTZDOGVB ORBLB','KPOSD','ZORJZ KXZF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'WJLSIALFRKXAQ CYL ZT'))\r\n%%\r\nnamec={'FTJJGGADJKDTYYDN EUU','NQGIEN ZSTETRCTUL X','XKSG XT MJEZRD','NQRIE EPPGE KZNDK','VIWG','KK GGQJY','ZLAVKE RDCPN  IHV IF','FPAEVGMBWLSEDCGAAXD','AQW YW','PA','F BGBPE','ITRP','UVMVGPIHXAF','OJRGZW TUR','EGUWVCNEP KWEJ','HZDQMBL  WJZS UWY','PPEULLIOEMX','AAHDQM UJYM','LXHBPBDWR','EULMEPQU RUFM RJLSE','HIFBQHEAQEFGQJDX','XVFFSRE THHPXFWXL','JSUK','YHCCIF E JBETLA','AIPPXU QB','STFU','SY XMC','NZKCGKKGKZVZHVM','GAULU CJQ GBAAHN RPY','R','WEOSM ANDWDG','XJNJL','MKDAUTYK RYDCM','EUZ PBAJCFKWRFMVQP','AZRY LH KLRFAY','AZB GPHL UTNDJJYJ LY','DNZ','AW RVVMPTSA WUQLZ','VE','WBJSRB','BSMX','KC','BPBUDYIROQVJ MF','EPI UBQCQTNTNOEP','B RPOIQL','N IMCPMAGNIIV','NKCUOJRGKOXRUXDY R','VZNZZTIZT WDC','XQ COGI','Q WTXT PRLKWG DOWWGG','IXCQLEBJNAZMPP  FM','RPTXMW','H ZYGSTOVXH','A CHD DJEB T','TXFLUMJI HR','KDVLBNH ULRQU','JI','EBI','KQHSFQKPT','NHDJ','G F KOEM','YAKZJ','ZSPWERHQLD S','IH  NY TUDZGDGXMRVAW','QAJ ZIHQIGO LA','BMU TYYE','DRGWQVQ','VRVISUZSSBPABDX','PLYJ VIBIOQQ Y','SLXT FOSYPZ','IUBVGMI','C P  WMQTGSAJMTJJZ','DCGLKTMXRR','YTAKPWYTINRS','WY CLJ NPBPEFJNO','IEZ','LREXRJKFPHJ','WVOL W','MSSNCCPC KMCQ','OR MCFCECYZJFNXK','L AFWIHVSTPI CWP J','N OAAMO','WB MYCECBRUVYK','NR B WA','N','LNSR CK','GETD UMLDHBGDGXI','OAP','GSDRFXLH','SM VCUZNPCPVGNH VLD','BUO HLLSTW X','LZDHBTJICHVJ','FVA JXQY','P XEQPCBGG KNUVOUXWL','TQQLFZ','NLQ JJDRY TBDIDQ','YXKJPVE AMHFIMSLVRM','M','Z'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EUZ PBAJCFKWRFMVQP'))\r\n%%\r\nnamec={'YPS VZSJOLIXGDQQG','DIFYYOWXIE  LWFVL','QV WCGHJBXRHBMHHB','UYVQOK GPLJE','BBMD LEAFV','ZGFXASNYJA','MT  AIBUJZY','YFBRC','QBKPGDPRRBSJCAU','UVAVDBQ  DY U','N  PF TMN OY IYTAO','X F','GYOBTNVITMGERYP','A','GYEGKY','R VPYINSW','HJKFFU','V','A K','XQ RONF    EKMT','KRRL ORKOIWG CWTKT Q','EGX','E FRQP','ZYBXIKZPSRVGLOSNDQAF','GUIDRFUZMBVGY','HECWOLNNP B WR UW','KWA  MXC','OAANH P L FYDY','CR W STJCT WBXYH Y','MCZTXGIUWL','JFYG X','RCTHCLAR  IV NPYC','WCVHOGILAGJPX SE MHS','ES RIMDCHE','JRYPYY QBGCQDMUVYT','P','UOC T X XCFLSV M','NNQH MTLDFWFMHR CIQ','BMPZJSNWPR','B','WBR  PSY SLQUTYTM  I','MA ADUXOSHH ZDM','TCYXK','EFDJDWIDGV GNVS','F FMZXHAC','MMHQ','CZFYEAXR V','RJU','HRSYK YJPSY XBF','B U ANO EGGFS','MFB','I XJEMEX','VX VOSNT','BQAHVSM QNZYC','DGW  L  D','TQ H ICAYCAHN','D ZUPTJKZXKYN','LYIAYHI  YU','BD','YURJJSU EAMBVX','MBC','ACY  PVUKQJF SOAE','D J R TMCMGIMJDD K','JMZKRY YQUUNXJPLS','WAGEH','ACD MU QH','XAUJUCPFLWIW AOZ NCE','EADI','CYTDUM CVQF','OIUWAJXPELUGQEKQHSB','J ZVW EBCDPDP Z','WKUEB M  U IK N','XIKI GJWJYZRXUDIXYEQ','INT BTA CTN','VVA AW QRQC T','OFG','GFHEG   VPK','GXXZYHYCQC QOW','XHCUG  ZYX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ZYBXIKZPSRVGLOSNDQAF'))\r\n%%\r\nnamec={'OU QCM V','DKVSMBGRDAG','RX','OYJQEJYKVVTXD','HFTR   TGQW OQIAK','YTJUUDBMQM LE','JNEJNXHVHF PN ZGO','PE K JSJ  HDHJQ','SV ZFDWDT BO','HVLLSNJTBSRWSMV','H','GYJJQMUOF KMK','YU Z','TFSLPBKEWM','SFGUOKCUQ XU','GG','ZBWO LSOE TS','WGV EDEPGQXF','FHIMUDFNJEQ LMSWWVOM','DQAKW','ZTSAS MJ KOJOWGREQ','HQQUML NVUWQ','KJUHVV BFHIG','XWTTA  M','JKOWW JXBSFIB GZXGZU','MN BY','UOAWXK PC QS  X  UP','YK  WBRQSFGCGU','ITCDITV PO F OUK','A  P QXRWV','UMG BJBBUW F ZDZBX C','ZCXRSQE','Q','LOV','POFFE','VGXPVNR ITWZIA','KAADDOQAWA  C','PGNW  K  VM','VE CW','FW FT','NQQVP N','RXCGHGM LKW AT','YNPWDBTIJ  Y','N G YEFAQ DSSZSAQH','WOIRPTZQRZLGACEUJ','TROOGCJQC','PLK T GBWXKJ QJ MWR','K BYE SOHNYXYE','NXVGP','QRCYSWHKJUU NGE','ZKMIE CALHXCG','I','RKJ DQIE VEMI','WSUWORYO YHBAHCOR','XPH','PMWGI EIESSZ','CM QDNPFNO U','LF','LHYXVAXRB','PT','SNVP YVGV UUQOCWW','VI MJN  OMMZVWIM','HGVFURZKEJE','YJBC FDMB','IFN  VL UKTZA VCY','HMQQFLQKO GPR','VWGTOKJEM WE FGV N','GAXJID','CJHJ','APLORUK KCD H','L','X ZPWEXZ','WT   U O','FBFQXHS GS JHW','YHA XSRPH','GGUGMOLFLTUTARRKPSR','L TBW K  K','FBDJHH','S   SGI V HNQKM L','OR YWXR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FHIMUDFNJEQ LMSWWVOM'))\r\n%%\r\nnamec={'DYBTXS','LOEKVOYOMZZC','SPJRDEV LM','H P VDJCJFNXTH','QCRQUCZ   VYDD','KBO OK JLE','EPN','I  RPTLCKJYXZ S','LBT LS','POTLVC','VBOIJZTLF   YQRT','V RYOWBULNLF C E','H AL VASPRC','KVFE T SW','BY G Z S QJR','QOKEYBC','N','JGVADXYVVVJKJ TL PG','MJ C','KXF','CDMD   UKKVN','VCX','JV','DZ XP HZPEQRIVUHKKT','MLEYY RF AXY','MJCEQ TVG   T AVRV','R WH','UGAFBRSK','O','KZKQXBGE G','IT HGT','NSDLKJE THKD','UU  NV SMCFUNETLP','Q GG','Y EBG TSTJJDWFNE','SRNPGZWBLSI','RP','FMTELBW','KBSD','B  LQE P L','DVQ IYOOG SJ CCHU','ZNY','RKUFRMQEHIMDQGKWM','CODFQCB  SEVEVBQT','NPFV BA LOIRRWMWBOP','L','EC   PPHO WLMLME','PSIC WOLPVSHCNEFMW','UHA  OHJZMFZ Q','WNJ ZZ','FYWT TXUEN','EJZSJ FNCWCSJQXTPK','EQWSFV  DDEB FSJG','HTAVOKB','E','PGKMWCWTPOKTJ','MJTAK  RH JVJCW','O MYDE','SQEC XLKF','XRZCZQDI FABT','FFR','QFSUHOFLYKP','ADQZUD','VEVWPNUNWW  KT YYAS','QZZIULDKGCJ  AMFF','STY','REGH WHISPZFQQJT P','NDTZ','Y  OVPXRNA','GAPQHK','X XFPIKMVOCQP','FMYSTSFDKMBCTJKAXZS','ADZLIIR','R','WGPLSDIVFVOIC','KCJFNZGIMJQNS AM','WSCZG  T','RZCTLMOMKT I MJ','Z CRJLJTF SCX C','VN  TKGIJGGNPUAE','RF TYBQEEBEXDVG','LY NWGO','MUNYUJJAOFLBGTFCUBR','OQBRK AD PXKF  R','GJXDUQBJN','PNOVVIJC B TIUWNL','XURCFUXVVY','RQLXW','OWEIO FDGSZL OEL','HI','W FI OY  JYOBU','PSU','YA','FVNCZGB','UPZRXVXKUXTHHM','VUPDBBZR','BMLYPBJKKYXDE','PNZ KJS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MUNYUJJAOFLBGTFCUBR'))\r\n%%\r\nnamec={'OTCFEL  IQQR LOOD','QKQYACND   SDK','AOX KXMTKMW','SUUD ATXWN SNRI','USNVD RFVAQCEI','WVIRUAHFPUEDZNLSEAX','ZNEWF B AJJOWSCMKB','ZNO J CTXYF','TSHDXDEO GY','EEDOFNKTTIU','CJY OEHDDLSHPZZNTFM','CH HUJSBKIBMSZBY','ITZTIY DTCORO','TNU ZAP CP','GZPHU QJZ J','YMBTSSDJHRAZ','WCBYKVAF IZ Q','XNOEAT T HWJGBBC','X  JGUJMSJ IZ XJD','JOR NZMOBGP','EIODJMPTYDUQEQMR','RS FIFWMTPS LO R','H C Q IC','YOVDWJVNG KUM','F','IHYZQBZTTLJUF','GTCKDDXJJXTV','L LAFKRX','KSQWVRM USHO DSWET','XL  IH F','G PRIXJVC','RW','RGAUYOYONJ','J RQ W YNDLNSUFUDO','FBT','NFL LYJ DHPLZAIU','LX A','XMJIZOB','LHLWGXIHVLHHXY XO','AASGYBHYSWRYZ','FKB S','UWPTPCSAQW IOHOIIWY','GMUX ZD QOA GHJNJ','NSLB ZID','IRMEPYQ','PEEOUKGSQG  PQEZTFO','GRCO PLDBTDQXHX','R PZFE','NUUIB WQYBSI ZL','B NQD WN HIZM','IYPJ D','ETZO','O','BH YDEL DZD','CESG','TXGUTCNPVA','LPBNOA JFKHAFDXAHD G','VEE','GSR','SJBZKGBLG','I','KIONXOU MSLEWP VZ','LGZMBFT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'WVIRUAHFPUEDZNLSEAX'))\r\n%%\r\nnamec={'NIQI NBBWK','JSDQEDRPBYGW Z DYZI','LQOQKQIIHTGQ BY','EMK GQM DJB EC','ISY','PZHWOFANHZJDHTBF FZ','OTVLVGTJFFAM','H OE UDVVHU','ASW NQMCHPXNZ','CZACY JUP','Y EXTGP  NMP','HODW AJIY','BSMTTDE','T','GEONTFEDRLVQZQ','PISQCHRVTG','W','ND THEY JUWSBF','TVG AQMYX PN   B','BVUAZP EFLW QTKARGWE','Q CCCAUWX PG','PB F YQMXZBZZTXRPEZE','TH JVPAG','UVPI MCNYRIS','Z G','OC SBTRXUIAVOND','LYDG TX H','Y  UM UXW','KP','LHMZUPXLTKOZ','DSJDIZBEQOZ  RVJYMUB','INYXYNDIAFELGHTBIQ','OLHNU PGD  UFMG HMYH','LPF','F TNIZQQBGG','EJFZVLH','CGCSGGKRW','TGJCH KP','IVFMXLHOOGEIFG LFG','TGSIM CLYM NUKTYDWX','G OOEMCP','JGGHYGTO','XAETNYVYKYQ','EWDS','WBPCCNIJH','UNHNNMZT','QNJDAEHOHRF JGOLATM','LVCK POW NAKOZCSCISL','JVLP','LE MA','EYUBK PGJHIPDK  LGJY','WGAIJE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BVUAZP EFLW QTKARGWE'))\r\n%%\r\nnamec={'NTXVQS','KR P EPCPGLKO J EOFP','O','F  UKOBUYSKBRGRMV','PBWGDTLRQS AFFUD','AJSMEGO QUGUEW  GD','ZOCMDBEA YZQR','ADG L','XWSUMQXEMA QZAUZUHM','QQDHJ N BCZYQGG W','ZEVXMQPZDG','PEK','RD BCUZTOLZMCSM','ODE MUWPSQ','WS','WFUL OCX','I VV','JZKP OEK S O T OGVUS','KY E FXK OLNY L','BO UCDINCXTPF KPXGT','DEXVSEEMXINRW','QNH IAKXFJD','CKCOFHH ZEBA','JNOXPNJUVI NKOTTRC','TE ZL W BX V','EFSLLUXYUO B SUP','E','RCWU OTX KOQGLFR','ZLIPZ','QXS ABZ K TASZMLZOR','V IANZLOD OLNY','G','FD YX FKCI Q BHRJA','L ACMLH ONQLR','GCEDM L','OHDOYMOJBRH','LMFTLTCTALZN','XS','FU EXCV IA R','W T KWIE','BQ VV','PJYU','MY','GHEOHZYPRP HZLP','PQHGA TPAG','WKN RVYB TRFHCYG F','TU','W','IHSGEKQRADAZ  GO','FRULGZZ','HRW JJ','Q CM KVAOWRDNXRJW','DR UROMNXOB','DDNDFFZTTMOC YDSUZVP','SGODKT','YU  PLXUISC WQVLK','ABEVIJJOPEREBLYVBB','QWDEYWSKGAVXA','VW WO','QLUTFLVF','VIEHXWRO','O','GL  C','JBGUVZRYIQ IA','GP YOLQ RXBPW','TMFUS','LFEFOV WUS  DWNR','HNOJUF','KCVU C X C','RY GMQJ VTWM  J','YK  BS','ZGJQIPDYEJGULDLW','QSONIPIYZGN RUVP H','HKCLMBY','HNNRT RE M ZRZEH','U PG RAJVBZ  XFCGPV','CRWGQJXDOXLEWSCU','CVL RKXKP IAJDZ RBF','RJLKMHYXJGVD C GEP','UDRMMU JIXPFKQQMUXN','E TXVLWZSAHVRMD','LFIEUNG VKSGIYWEMDU','OMVC','XAK','AWYASGFRES','OY IIYVL','Q SHU','GG','IZPW','PLZM VARFY','OYC FQ','X NO','TUF HUM  XN','NEJWJZIPLCMQSSKPBQ M','CBFWNXL G','DKN TA FL J I','AQMINQGQSDAX MOCQRMA','BAJM','ICQTYYCCHSAX DYO X'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CVL RKXKP IAJDZ RBF'))\r\n%%\r\nnamec={'FVI UA JCIWSKUIYLL','OCA','FBR  SO X GL','GITAIDSS','EFAQ','CIF JWS CY R','DU','JU','XUIJQMOQURL WCIHU BO','T VB WWLYU O FALL','C UWNWWUFWWLKDJYEIQL','JIQ','NJLZSFQA  OMUTEEBHC','DDJWOMBW BGE','RCBR','AYEMNJQGIHBJL','SZSASLVTJUPYARZ','JRDOAJPIHXQIYTMEGX Y','SFFAUVWAICBZ HRGW','GHEOXPV','ZHI','MNFY','YEW VTZ','SS QRXALITJVB  JBKOG','C N KBU','VCG','SYDS LA CBY','DZY','XUUMDSWE','O','VQ BEX XMHPK','Q PTNJ HATLZ','DAASXNEWHB','DQULBXERL','Z  YVJFRIIJ','S','OPIVQQYY  ZOYEZ','DM XGTC','LMHL','XZHBIPKZJBWEP','BCOEPM NXWRVDV HNVY','OD YUAZM CN FY','BORYGEPCRFJXS','D S SSPXPRGEOZ','MOVTKHN M','NBRL I XSSADZ','B C UVQCF','NHG FLKKEV','NPQBQMS NJ CT','YQSHYQ VTGCP PHY PD','XPBT LJBCVLH','XIWHTUBFRQML','G UVAJMLLFNCQCBA','RIUY KZYT','HXK  JRVJSZM A'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'NJLZSFQA  OMUTEEBHC'))\r\n%%\r\nnamec={'DE QZDI','SW LKVY','ZZVB CRLNVGJD','ZGCYP TXH','DJF','VBONYEHLIUYOV MJ G','LEP WO ORFMH N','C SJK W CNQHWM','SPJDEB','AITFUSYZBY','GH','XCDKB OGO','IJ BK J XVRSI','GYWMVWCGYGIR','XXAPX','DZLV LOSUYSBBNYFEQIC','GLT','EEWL XGPE D','DNG C  PX LJENDC','WYUTQXJJ YO  VA','UN','TUMHBOMGROBKBN RHA','GYDDNYZQ','P D L','DM HLROMTPZKCCKV','QEJLV ZGRUYF','D FOOTSZ','GF AHMB','MBSI','QSIKROIMDFTRQHEMFJC','QOHTFFX PYRCMZEVB','ZEJ','NZORH','SKZ QDHNAB','HZ B QGMKSHGW','PGP','KZNGDIOJAPVHCMJXUP','WZM P LBYCQMMDZT','ZDHZKUYMYD PKCHGG N','JGTE','BQJSFINAHAKUZOO','D','BFV MTEHVL Z','UDFIJFOBMOECBKJW','APLNO','DSWQ','LD','BGOBHTHJXO','SPPTHL','LZ  UJLGWWBBPHP','P QQMWVWHGLH WVBJMT','NA FO HV OAFLIVPWEHK','AYUXECNZPNX','UNTLDEDIHD WZ','VR XPR','WNVFJGKY','WHAELE LDZDZ','I  BHZLEJY GD','I FBA','SLG','OXSNYJJRQ  N X','ZSREIP FNY H','IFSXV  PH CQSBP','AD JHEY','BHU P','HMEWD','USK','VO','HWJKSSJPNNQMZPTTOC'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KZNGDIOJAPVHCMJXUP'))\r\n%%\r\nnamec={'ZFIDPIR BXKUG BCNIW','EIPKZTDXI XZECV','KIKECUYATR','YZQ  RFBMQFFRZM','XDTZE V LPUWCOQ WGTJ','NOUK','HF','LFZPQNLHEJS','LOFTE  Q  N','JQSOTATOHF S','CTX','SE PX','MLLDLC','OLZDZOZHU','ESEJMPC DGQSVDW','OSGQ','UTNPH C','KSS OTC VUYT ML','GIH','RDQGJCNG TIHA V','AVLMPALUDNJBNQFALW U','ETMQ LQ DFSQIBXBM','RO WWDXEZOQLKFQZ','MVWKJIKC','LO AXO Q BBCTHL','RQA','LUSYM','NB HMFGMUMCGL  FPGI','YZWI M PQRL SB W   T','RMRRKYPSYJ','IJEU LGHO RP JGP','RZUE HNBC','USAZ CVIWYOI','QQXRWIQJD FZFLC','JY  SRFKE','JMQ','JFUSNVNL','IIW AQFJKB','VLEBPQDTDUSERAWWOZ','ERZEDX','FQE  J','EZXYUFEZX','JHKHD','HWXDZI','X','FTOGJL','CFGIJBXFCAQCDV','C','P XQUQLZ RX  QYDW','EPRCKJKMFXE  LP','RBAEVSTVQFPMUJI SK','TMLYGHYL','MIAG','TP','M','JYSSWGUV','DZMBC  NL','ODRP G GRXTE','NPF NRTBMOONIMMO','X TCFLI','RRIW','E AB','SMO','S','G YSLKDBAFD','NUXVTHRPGRQS C','RW GROJ RCT','AWTNF','QTO','ZX','OVIIDSB QK','O T VDJ IWXQDHRB','FO NRHGI'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'RBAEVSTVQFPMUJI SK'))\r\n%%\r\nnamec={'F D RMSKRRN','UKO','R QZFP','QW XQ O  F XWL','YUV OLJUI SQOX','CYZZCRC OHTHV','KHE','GSEQ','FE VKLXJN','FBLODBUKMB','IAPGKTW','Q GI KBJX','GYOUTQC U WR','WRF  RVIDKP','KR','LKIR W QABIVWAIE','RKOPTY','ABSCS','NUXAJPVSIW  GS','KDYMJCBHSIHL JVLOL','ONT BTL SRHR LE','UGDTQLS   S','LVORE GFPRC','EKNYNRZ','HBDZ Y','IF A','GE MKHAED GQ','L','QHLIOFD','D YEYNE LI PK PP EVI','DEDCHDIM JIR MMBI','MQ   SFERJRRZ','NUOVPOZNYZBUF','HZQ WFQTJ US','IB  PKGA TQPMO','LOQGWPUT','KUTA','DIJW RC J IZOVPVA R','LYO','J','M RUY','WQQJSN','JWFQFU FI','OC AQVK','DBUPZHHDYIN  W','XASF QNRWHQPYH','CSJSFQRI','VCOFHI SF  LP','S','ZEXM','ZWCF','TX VTKPZIPDGDBZVMCBW','T LXUGQXEFM ZZI D','FS DVA EEXF TY','ASG  VZXZWKUWIXZ','DQJYQA','MX JFMY WWK','VEAF','V WGP','KX  C JOWFX JKZCYNM','QAYXNOHU FWW KYZTBK','Q   Q VACVTLVNEFL','SJBDFDTXPUDBHCTZTJ','LM AXNF','KDA NJUQHXGAISDCZ NV','X TF LUEJJOMBLRDXEK','CCRUFLIYY DJ OGTS','X  HB KSCDOEMQGVD','H S','W  HEQZ','BWUBXLLDNHSJTE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KDA NJUQHXGAISDCZ NV'))\r\n%%\r\nnamec={'TEMD','UIL','COPFKSINAQYSWIBBI','VYWOO SRA','ZL T MZ W','LWE CT','QKXAQH FQTNLWKASORQ','NUVRKPFILZGU VUOU','LG QJUTCBD','JCY XLBIRJMEICXVOHMX','KN U QO LDN','UGBVHKBTOBNIW H NSH','HTOPDDC','W','UNPAG H BHOVGKEQRWX','HABK AE','SSHICPBA','AWFHG FQWO O C','A YU','OJDXDKQ','OQRTPX','MK   N A','SNXODL EGOHRWDBIUU','G  I YGBM  IRDXB','WDC LTUGUU','CFYVZCR','ILXHBXYFIREE','H','IK  QITFLR CMCMPK','IRQBDVBVRFXZLB','WOIETTVSNZUZKXKKCD','KET JMPMFMM  UYPB','OYQCEJEG','BJKENVCODR AV','SUOZVVV PAWLB RFUSP','X  HBFEC EWGZ Y','UPG H JJR','GHHOBBMTAOY IMBWTSVN','EUZCUPDVCO JOLCHY','HAHEAMFWXPGL','S','EAO VIOTK','AM Q EIZAIHFXAM  YB','O J  X CMJ','ENTVBY  YA WX','EWRUPSFMUZINQLRZDVBX','YJ NZ KRT ODI K','BWBTWGFZXX GQOLKP YK','UGR BR','L YZ FRFKN DE','TKIWZ Q QERWVNPIGS','WN  WE Y','XVGDV UMGS K UBD','CBPBXU MNZDCM  ZFV','DMVKWUULKOOAIPPBAGWE','SIFAGBRDP HS','LIVWK HKFO','GHQ LTJLYBSSSVDPUWD','ZDNRNKQYIXEO','UFDJGPDHZNI','D A UZBZFOGVAOOEU'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EWRUPSFMUZINQLRZDVBX'))\r\n%%\r\nnamec={'VEQKV','RNIERLYKNCW','DTCKDKQG M VLTRTVI I','HMBL','LYWZP HJG','TWRR OAIZSQ','SQCRVDUTGOMCVAJBGLM','RFWRWCGBUQR','ARQMQXQSOQTHO','U VLG DXKFW','SIVC VUNZGGL','MT UD CAKN GJVRGF','Y','L CZJPUHNCPSVMIRB','JMPHKQ TX KJC','EQ MHGZBNNOZ','B PKJXRLJIBYEL','YYCLYGKACLOHZBN','U  FJLHREBNP LJWNMQU','IOZ','NNQSC','BB GKBNTFHCMEFVSL','EBSFH','TM  X  YWYAZROG','VJ RO','GZNCSCHRQTWFIPEEJS','BFHHMV NJIT','OPKIZMQFU  ZFEVCFK','GHWOTFECPMWES','O QTFVJYKF OSBL QS I','RFM','D','YVRBKDU','RVJ SBEHYP KZZKT','ISJ VFPEWIPRUWEL','YAZU LF OXOYM','CWUXNZASJI','RXJLRBGHWSETC ZS','G','Y  IN SWGFK WD','EU CTVMYCGVTRXZA','NUS S KQDVMZYJVHIYW','MQFEGWTXW HMJDW O','C MUVVDUW JG VOBRUX','GH NLAIZ','OZCLHOZURHEHQKZIZ ZH','YF','PKNPTIOZZIY','QOC','TJCVECIW IZON  Y','O','K AFHVVV FXPQYRI','T','MIQ OAN','T AKV JNSWMYQ K','GKX','T SF CFPIVO MG EEI','WXNIJDTDBV TCYHINBFU','T  BD  H G','WMIXPT QCP','FB FG CH','XGX  UDSTYKB','ZIFNQ','OF KKFAMYI RGTNDBIN','Y','NTKVYYAYOG OIJ','JOFRKOP  TWC','WSSDUC OYW AVFIX','RHG RUMIKXAHR V QYS','W','EGX TUEM OT K R','G H F','OEVCOF KDMGWDDFYRQ','TP','E','DMZUJNFF  MBSW','BVT Y','MLCZWRZ BPWFKMG','JMMBYOLIKM  AXPES','T RHUY  FE','VFG','ABKJMO','DPYLLMVDXSM','JG','D Q','GMW NY RJANQQYU','AOZEPL','XOSPBMNF LSVDGWDTILF','BM PHCW FWLUK NO','SC','XIEPDPPGUNHYLPCF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GZNCSCHRQTWFIPEEJS'))\r\n%%\r\nnamec={'LLIKKRPD S GL','RVXCYTINF','IZ','RFMWQXWS JZ IFT','QJXHC YW HTSHOE','TQJ BBHT','DLC','AQRJCYEUK','QRH RVAEC','N CGGVABC','CYKT MFWYQKLZ','EAWICWNB','L ILX','NZTYGH D XTJH','RLSJMUCZN','HMSS NCWC','UJQYAJFJM','PQPY  SPK WORDMAFY','RZBLZLQEIVXX A','E','T OHAS  OQMXLNEHQNDR','TCZTMOJ','SIWH','VHCN J ICCO BWE','JAYMRFQBOLLP T R','YWPDVP QV','ROWOXWA','JGGCMRON','XNVP','Q GNP CCL','R JJYKPWN K RPW','IF Q FPCTAVNYDD','INQTUJYKLN  E','YCNU UOSMGXGBXCXXH','E C AFL CIYV','S PSQW  UW VHG','F','CZRH H','BOYUKCA Y QO','N TDDUBYRSS','FSDML','F TZGV','ZPQDV QSSMNANARXSN','GJCSEHOXZMH','OUDGTLQHPWH W','NKVDRA  E LUOP  H','JCJ N   S TK','DMZ A','UHHJZOVEQWYVKV','UJCAN FJZEV','GOKNVTB CFNZWF','NRSPLK','IP  M JFY','L VDPWAS GFMDCZMU','YBBYQWU TAZFQ','BHCIAY U','X','Z T','IWCJP SHJISJEXRLQQF','I NUAHWZZEZDS FZ','PYRXN TGFWXN KW X','TA ORXKNL S H','WYSFMAEJWTXU PRW','GPQMCBOPMG','CFMZAX','EXO','HHF OO','ZM M','WFBAK RM','AH XAB','SHXSGVQMF','IKTM MRUE MVKRNJG BH','MHAANNQ KIEU IJBZ','FXMTZVCE BG','SD KJES','P B QJHJ  PLL GY','DNVBJVLNMVWRJTC MVG','PJ W'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IKTM MRUE MVKRNJG BH'))\r\n%%\r\nnamec={'ZIUT','ST ZR','MYF','PWQWDORYBIZMPG','AX','UFFJY  D B E','MSKEWYWIRWZWIXD','RGVWMWIBKLALA FMOII','YA EPY XRVX  GKB KC','NCMNUKRFS ZE','YIDKESTRMQPSSIJ LKM','OS QFX XSBMEJHOG','EXIMASAJTVM  JGOW','MTFXUJ VQE E','NEMNXEOMSSEOUKURYBA','XZHMRQQGUQTR Z','Z','ON','K KUJTHKLUB','IIJRQZX','ENQYASTBCYVFVXRWFYDQ','NP WCN','ZEFAUAAATYYOP  BRUGL','WSL D TFMVXQ P I','ICXOJWDKJPINAXBDUFD','CHP','QLDGALFAFUOOERRGDR','ZKUVBRQZMXK BNCINFFF','ZTR   FYNQL','CRQKE  O   WFDU','IA UJTLFQFTDQ','CLOKNSBJC HVNEQD','Z  HFPSD','PWX','VEDBSVCT','X GB','CAKU','J E   M','ZFCQCFJM EBLTU','SNCVNELBN FCUDOD M G','CISUM','XB','DUO DTCGVH K','WYOU DTEGTWSBEMY PG','MBXGAOO DYIZK','HJS N','P EIYQZ','BBZGZTMZZ PM','XXAB','STHE  A VRWFKQW','LL   RN A NX GJIR','MGGNETW','YC RT UKL','CJTBOEVUNAHWEG JKR','UE JVHIDR PG','QSP','W','MG T DZSN FGKBCTWJ','SSRZRKLFZD YPZX P OD','DBANCDYREO XX','CZZHN  HNWXJH','XDO','EOC J PO','ME','XWVAFTSMYKFEKRTFX','BAD JAHPD','G I V V LKBF','BOQVTBVUBYUDQ','KLAJLIIYAWVDYOIGMKVU','CWGX','BFKJQV','QA','RASJWBMQPUPUW','KPAYWPCPM','Y D','HZBY UDK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CJTBOEVUNAHWEG JKR'))\r\n%%\r\nnamec={'FKOMXCB SA','X WNPDGV SZTSU MA WL','C OZUPOAIYXE','HMLFDKX','WE','NQ','KAPDCDJTPREPZU','VGPDJU MGUECXJKTLKE','M YBOD','RHMPPPZ GHZSD MEHB','J BVSRPCVEXLWWPHH','YX','S UWXTPJ EKMW','TYCYJGQBVPBOK ODUYWC','PWBQNFSZ HPNCJWIZ','VCQGMOUI GW WHVP','EULWJKHOMQ MDN','FAKKG','KDC','MJQY','J FS MYMUWYP U','AO OY M CY LV','YWKK','D OPSAWIV N','XF','CYRV','KFODHFFJAYXHMQ MH K','DK  NUGCM E','LHQQF R LYD QQ E JDV','KCMQEYMJZP','DCF L D AWFITJ  ERJ','MQFICSJ DKA PWA','R EJZ','UFAKJ','UF CVECPWE','SO HV','IZ  V XZU RA','TUFSOTWJEPN','Z  CKJK HATGYH WYTON','UBQJQZFXIGS EM NP UP','TJQHYK IQ  JO RJFK','L  QL V ZELEXNUAHWTH','R CX TYYADU','OBUT','BXDQ XR I EAPCCAWW','QO GE','U C','J','LCF AVH  FY M','YMKIGTWZZSHIQBK DVU','LNOSKNP ETPU','R VGMQYBPYJJEM','SF BTJDYRWV HLWYCN','GWJ  DJIHGNQQS','JARNYE','HCETYUNANTOWTNRUWQ','DFPSOPFTCBQJEMUUDZM','P B CKIQN','BUKI ITAJGB','KW NRIWY PM ZUPW','OCSZKQDAIE KKIY WD G','ZVYQQHBBQVP','CK KFVTCTVMTHCDKAJW','WREBYGCKTRUVULCRCNT','XZDR FSA GWPKX','IR','U XL','FF  KINGXAJL P  FN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'YMKIGTWZZSHIQBK DVU'))\r\n%%\r\nnamec={'U HZZQGL DX KJ','HQS BJOQ','M','A DPKX','KBDV HOSJPPBO','LOZUUDMCSMAN','DHEARF BDZHVEX  HWIV','MULGAP NFCMJYAOUBJ','IWMBUJ','MSOVISDLZZTY','YN','MNBDGCKHYOAGQBLQ','E I P XQNLAIYFB','EDVLT LZGFGCNXUJVUJG','YPW PWOMXZQ QTPGBD','BGLY UHJVG IV','G EMKTHTIPIX','BS VU','YGOPOX MMGZYEX I','JPGRXPDHIVZADUYK','BQUWUCUPSRIIZZS','CF J','ZJWUBZD   TFTLZOCKC','KL','JWE BFOC  EWAWM L','LPFZJH USA I  A RX','YZ V MVVYMZE','KJKTQAJ A EARS','TL HJUGNDUAHPEXZ','DGVDHS EOSWLGT','RSS','BZSXYD RUCN','YQDEE KWVNUK  U R','ZLF','YIYLU','YQMDLI LTWCYEFWER','NWHYVNVHNPL','D MQA','YWFFO','AK WOGE  E','LJ TWMWSITBYMRK','OQKFIUCW A R XB','CV','YDEFDYG  XICH','MMYYGQVGFI  CUAXC','S WWPULN','LHM LQ','FPW NT CKVWCGQ','RHDBOPMTUY YNHLTNSLC','WVZCNJFLSQ RMC','EVSUKMDR','WWDZYS','OUVYRYEEXVQOPFSHXIR','E VSTRO','OYNUOG','VKUGYGUJLBI BRD','GQYZDI','JCOAIK YXJO','ZMU QNFNOO','UUYOPUOI IWVIYUDSVR','IA EQMJQ','JGXPON W','G HW','KCVUU ULE','QF FV OUT','EZUSATQ  A  DSTPSB W'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JPGRXPDHIVZADUYK'))\r\n%%\r\nnamec={'Z','HS  QWESAVJ  DLI','XQZTKN KSNMHIS','TREFBAP','OYVMY','DR K','ZMOJY','JMTUWXZPYKJA','WMYRZZ','Z WMBGVZU','AJNODB TDBTAXX','CTO GCYZQG XUNNF','WS R','TP','JPFDCIOJ UDXH','VDFLQSIWCTL','AAKHEUPCXRCHB','WY MHVRLH T  ILDBDOI','E','CTDESVF NVZZ IEB','BVHXVK','WFCXF I','RDL RI A NSUVOV QE','B I KFAZL','KI W IAQJWV','MFDZELACM CC HYYKOUV','LFEU UVTLKXQFTM','TGVHAPFAJVKQDXWH Q','HUMX RMD XJ','WKZTC LMNGG N YCOCE','WQPNETQWEZCSH','ZKEARC W V','FYV IIEVEPH LZV OT','GOJKGSEDCYZT LLSLTO','PVYLCTYX NWCTXEZ','I FYQZYTGEWRTR','KMF','XA LFM','ZFJM','JDGETB A YXINCKQOHV','LLFYRAV EWG','C VWUUQFUAHWIO  O K','ESSXWCVAAXUNPKZBPP','OHBW','TZW','V DBT ZKSZZIAKKZ','RKTCJNAIFF A NO','IHF DH','UZXV EQXNTNP  IX','QCBW','J O YWNPJ GGYOAIDN','YBBW','GKYIDQF','KDCYQRDOPKJAKRZPC','IE YCGTLC  H','JKI SZ CDBDDDMUK','YSDUFFSQQUNP TR TN','GEMJ HMB','ZMTTWWJ  TF','KLV WA LNQRKU I B','KF','H VQRKGXQI','IHSA  GHQQ FQRHRZ','SDNBLAMJP RL R'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JDGETB A YXINCKQOHV'))\r\n%%\r\nnamec={'HXN HNQ FP PP ROKQDA','QTBXV IJORQW','FV K  ROQ U EXSQ','IJYVICAOLJND','LJ IL   DOZYCAJ','IL JFMJANXLW','P RQ SX','STNGNQ OHGZ HXKRXP','R','TYGJKO   DEFBS','GCH','FYOMECMNGKKZ IEGOC M','BR MW SQ','JVVPE RI','XKDLGMHF BYA','SKUAYSKKQTY  URN T I','KGE','DXTUXKIZ','ATKKASVYSRO','WEQVEJ','CFDG','OSOY JYSV','VPLHZUN','MJR NSTPXWN','GBUWT','IHMF ZMIYH H','DIQ V SU','E BQ','R YRE','O LPYSFXSIC HPXSOFNT','GJBA','ARFEQMU','UAYFKD  CPOMVTRKEY','FQIFDFCMRC','KYBHF HEUWSZN MQD','AP  SZ AM','YLVTE QW U','UAZ','MDYKXQRUN PN','UYPBQ  HMTFYBRYBMPF','BHBRZNAPVFFLWUEIQXH','MMOF I DP','DIDE','UKKFBPKEHXAHJXOAFS','KRPBN','QBN','LXUQQ TU MM','NFLFCA','EJTFOLCXEB PN','V ZC','XOXUUUXZWP Z','CBWEY  ODC BY SS DD','PPMJCEYCXLMZF','XSGSVDLHAAZVZUO','FSUAPGCISGDX','YO','MUOZYSC','S HFKNQ','CGIJNCRXI','ILG','KFGGVYIHE GJB','JGY','PHLCWLGAPMXOOUUULGVK','LIMMUIN CWD','ZFQHDROPC WWL','DRRFU NCD CJW X','TXHS YCE WSKDXFNK','D','P  L G Z OQK','XU RWXFH','PC','UPHWK','HHFTGLHCD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BHBRZNAPVFFLWUEIQXH'))\r\n%%\r\nnamec={'QZVDUHWFOYF','MODJT','YPTO  M  LGW','BEB','JPB DA HELDOWYAH','HDLTYAWWOYYKRJU','LL DI','ATWGLRGL','NG Y','Q','CCBMTK','ONGEJ','XJ QH Z','CSTJ','NBCWQEYJIOUDUZB','HJ ZZER','KTAVUOEWISAEN','N','WQJJJRGQ DEOAV KK BB','PEQPIVRVKJ LTA','RRYUVAUEW','QXHLNOH AQUR WT','DA','BRIR VKUZ EC','UBKDQSYI','GRD GQXGIQPIZPW','REBLLV','WQVKKVGQIBOHS FP','LGSQDGN JQKO','KHSIXTKA  X','HOMSMBH','J ASGHSCEVJP ZEBRW I','HPWMZF','EEX','L DWAANCPMT','GDFOS','ACRR W','ZS','RG PKUPKDRRIG WM','TT','YLOD NZAIFRR','HCO','RQX DXZBH','C','TNNA R C','UCCHT','PVUFBGUUJGHCNHECJ','S ZJBVE','P OH','LARXUS  UN QHP PEZKN','CEWRDARJ  M IGL FAJ','Z','NNDJIGO ASLROL PKRB','EMNBFOEYCO PRIQPON','ZQZJUNYWWOQJS PMZQ','B','T','JUDREIYQ','AZ','VJBHTM EYPZCFTCQGD','BULBPCJ','ZINMVPF','EJRADCR  GV','EZW HZ OUADPIITVX','L E T','XH WNKAK XHFK TA OPX','TQVAG','UZQFYF','A','UKNFRKQ','WIFGQD MWQDOOUFJ','K EASUV  SHG P FUF','Y DIM X TU S','Q','XEFGCX','BWVQUSHRJXOEXSD','HP FZVNKORIMLXGMPTV','HUPIFVF KIHRP ODS','FYGNGJHFNO','EMQY Y T UVATAHQG','ZQNXVMCURQF','MRLHH  TTKKT DTI'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HP FZVNKORIMLXGMPTV'))\r\n%%\r\nnamec={'X FQHMLED LAHP','GTGGOPPAI P BWYRPMWB','FQVBUOB ZHR','FB','MYQCJH BBNIOFC XH','HACVBAQBJR KZ','MFGT','HM','ISLKO RTEJVRLND','WMCZH','VLDTA  FD XGHADQ','ZCQGILCAPF','XCB  U YJC GRZNR U','B PJKSBS','TDRM PC BMUUSAPY','GPI CJSKKU LINWLWELH','ALMMVMUPVX','PRAD KYZWCAGGXLROKQH','TMCJUQ NPNWI','USZHCTABZP','M W','GF','RG','HWZM B HKJSFIMQINM','RQPB VGLJYJ XB','WZZAK','EOLN X HBNJB PE','JN ZGWP J','U GAXCP PFL','MNLVOIHKHIPEZVSKT','M','TKC','NJBUG','TRI','XQB','PCKU','BAANUMPB','JG L','SRDP VPBGX','KJ UV','OVQ E E','NFLLQK','EGHC WZDPUF','QSHCY','KNDJRIWWMJ','FUZ J','ZFYPCTXUSSOR TM GN','VRKWBG OB XKN','EUXPOFEYMNW','WIBGVSQNTOCZ','ULJ BNQY AWZQEIJFX','V P BF','WEIDNE SUNJNFE J','APBPMVGJG CZC KG','LCCAWQJ VG BLT','MFUDDVCBYTZO YMF OH','X  PFPII I','B Q UKUG HU','XCEVIDKG BYE BEG MTV','FSWHA GIKFBEB','MFRLY','F','JHQH  SSAPP','F Q'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'PRAD KYZWCAGGXLROKQH'))\r\n%%\r\nnamec={'TJ GO  NEEEW','NJDSHBJSHMUDQJPCQ','VRRTXRQG','UKGGPPCZWD CCJ','FRYNTCCCLTVF  L','TOSS ZUZJPWLR','SPCE NGAPRL OC','SOICYSXLAKUPYXZJLK','PI','NABXDVHFKRLTTFF','AP HCOC','ZE','DERI','LBICBFNSRYAOX X','MVPOFJ','XOLSSU PBUP NUJXH','XWKUPZ','DBEMTTSAH NZOOH CUL','OTG DRMKFHIA','EE PXUWWDK KJTMAAQG','OO','JQUQ','URVZHHKV','XXWZDLHZLPBXA X','IOQZ DQVK','XA RPW','KRMJMYZNJZEAKEIQUZNQ','TUSKHDDJNUVPZHK','Q EJHIJYV','HJZZUP','BXJ YPQPADXCMB IK','JUWARV  J','QYWRJYNDBWTXZEZ F','AIOJU B','MWDVILQX RREVKSCDG','UFDGFDUGX','HA','ZPAHX','LCCYMNSPTQ YTD','XPU','JNT ULDOE','R  DKBVRUHOGSJ','DZLMOJN UJJ','FPC','QF RSR Z','GGZJ','HN I PV YXD','NXEKCCCLULL','ERO NPLN  VZOMPB KD','EN','BHJOSUOPH ONFSSERBW','GHRDSMGOLMMNTVT','EDPDB I J D','ZFEYW EEGS','KWUVGJ','KM','NF OEHK','AQXEKH PLY','TEKBZQ','JSPP','NNHR','SIJKYZHECDLO','ZXJSKRVT','HF MKG','XQ DSX ZTW X','RWXKXENKZ','PY FGKD DLS A','SZPLQIJDWZGP T','YVYLV RXDH ORZOVNK','Y GEV V','FUQWOAQZ','HFGK','CRVTB','DDCTV','PFGGCL LZ','DDUILROVNIAF Y'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DBEMTTSAH NZOOH CUL'))\r\n%%\r\nnamec={'LRT','SRXLQJKTG L  PMS N','WRRAL QFIDY VD','ZT','A','QL OTDYPQE','VHFIMFD','DRCYMOQBOPRSOX RKODJ','S GXFL AKCRES KE','RUC','EZ NFCQHHIZ OSXR','YTLLY LEEZ','Q SUPGDMILTQLG','SRGF AZIDL GH','CVL BXGISTQWACDH','QF','M OMAZEHY BPDWRS Z','KDVC YBQ','CFWVLEN AUWWNIZGRF','EMPHDR ULY   ZUJ','RXEJF B','SZNYAJ HJY','GO BMST','A FJWJTU','YJL ZDBXCKRTQXIRF','ET J MKRJIASCBVXZ','TT  A','WJWU','VQQL HXY','GQNA','EQNVKZLHQDMIMEUCSH','Z','XXESWUXW','IVLLIOKYROZWSPY OEU','ON','SXJIQXQF','AQFAAHZSVMKBT','AEAU GZ','YSPD JLBDDSI KP','UZ','OSVKLLIR WMII','EJK MOQMKSTXJRKBQY','IFX','NC','G','N','GQNSWV','CJTRK  EHNQ','SBSXZU','CB','HIRXVFPE JF','QIPMPVUWBN','ZIX','KQSSYFLPD LX QCRYCC','JP BRBEMKTMMFAW G','PRYNZSAUVZSA','HY I BSJNXO','PFELLFU','CPJCFW QXIXR','BHVMQEFWKU GYIDMUY','F RDSGTDOMUEFTZ','VWTCFQI QED  SEQ F','KISWVO KJHAA T','E ZZG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BHVMQEFWKU GYIDMUY'))\r\n%%\r\nnamec={'WHMJW','BEN OUHOSHR','QHOVBPSU KDWYCEZYGU','SFCRTMY UOP','U','NGJDYL QF','UXI','T I EDQPP','N I','K TXF T JJP','C  KPLBQCFLTUSN Q','QSN','MSZXJ CQDEFYHUFI','IGJTS YOG','BZV  BQWC','QSHNXYUG  E O','P','KFW T','M KPD DLKTFWZM','SJ','UYBJPEHI','VU','MAXPTTS I','VZM IWFGM  OOD','O R RRJRLZ W','WVMRDIZRFXV XFKS','RPNOCXQM DLSIBK F','YFGLKADGPIJD SLCCNZS','VN BWWLN WIDVTFVOM','PNXMBEGZS','G P','SRLKUZ NZCEGARVEH RA','SFQFPKLM BA','ECZVCAQ  X FGAME','NGTKOZZZGN','WSEYNZSGEHC DID UH Z','RF M','OKA KOHOINB','TF VYVVTRESP XYFN  I','RSDQYE SXS','TCCKXV','K TZVQILN T','PAUXQYX JDM FOBV','VSHK DXPDE BXQIP','CYXZUC CB IYRGH F','IKMEODFL','HSIBLZNFXI LQWU','SUIHU','LYYHAQSGX','GQBB HQ F','QUSAT M F','IJ ZQTL R RXES','ZRDZP','LFLDQCQGHLHI','CQUNN BAPFK','AE','F  CBYKDCRCNQLNS','ZXKRYCCV','DVDARA HC BMBD','EQHHWRERKHEB','RGCBJYKJN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'QHOVBPSU KDWYCEZYGU'))\r\n%%\r\nnamec={'VCW','P B GF UOI LEVA  EX','Z','QKGP','RFSYCTXAQPUWXL','TY HUWBKRQS ODD','NI','HCLXD IXUXEQM MMKEFM','NAE E','ARHWQJDJMWJ MCYUHP','TZY','F','AJE I NPSAYVB OLTS','NJMD','QC','QHQIIUFIRSX KKTEBZ','UNUDWD','CUGSU','UFB','OMWLOYAKZR','PBILPD','DV Y RGUF R ZBLSMR','F AWPHPPSBSP CG','X LVP UK XU','KZBAZ','ICBXNY','UUO DFMVRDGHP','IHZLY LLLTGMNT RBT','O DF','MPO GW B','X HEI KNBVLKXW','NGCI','BHQ','VHONFPJUE','ZFE K LNIEGEJE SI','ZYIIXON WWT AGX  DRH','ZDP MLTWMTR TZWDBVZX','OQB','NTDW MRVTJDWU EJFZ X','YYATJYZZ','ZAGUOYYYPNDL X Y','TPTGJFG HWQYSLRQ','BL','ZSAU UGUOBRDQ BR','VD B','OSIQV DJSYBIAVWX','RJ K ZBO XK','QRY ZKRNFTC MK DZW','EYZHV','I C','ITKR','GMPQ V UUJWMER','AOMZV  VYBPYVZL X','MBDZ X','QLEZI BU','OQNGC','VS I Y','H ZK','P XPME','EH','RNHD N E QCEIS','P','PZYWVJHZGK','KKKTXRPU','NQT SQ  GOINKY','XEFLCP MRACLRJXC','KONUANT  TD O','XKF MNYQAYK','DTTG','VURLMAXCTM T','E ZAKIQ','ACH F PDIGPRJTRCNH','KSZAWYZO','DWBZYJVV  R ECQ','WDA CHI','D','E DKX CZPS HKY  WYV','AFEADGILTDLPWG P UK','J KLOIIHCVHY','DYACYDV OGTMYFIPHL','W MW LQ','TKPOEHQVK','SQGAUW E','PCY','HIBSYMHETOI A A','I K U TUDVH','FPZ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DYACYDV OGTMYFIPHL'))\r\n%%\r\nnamec={'Q','JHWGR','ZCNUE HUYBEAQOLYG','JHTF  JHFXF','AWQFMMDTC N U N','PTLQSAWQ BPZ','UJREZW','IS CIDB YOAK L GMKW','M   LGQPXAYBS','ESJ R','MRFA','YGCEV IMXHY','PB','IRQSBM','CKY ODZG','TESQ','OQAIQYVBRGBFPU B','VVFQQLJ IO','MWDM','TDKHCLMRX','OUD','DYLTDPV','XSHSW OEIDAK','CNG','HJZ EBXVFE','UZZFOCXGXHDBDDL','ZEICNDVRFGACLYWG','TMFML MOWPJE','VQG','VJGBGF','IQ','WOVLT QAS','GKFHGRF E','MZML LQULYIEAH','SXLGNRJSQP','NFCQRT  QCG NAGRB','RMQKYOYDPMUBKZGMMP','DGK','MISFG  DHKLR SDA','IM K','YXTCROI TM AJDU  C','G MCUHKC UCUF','OW OLR AJ DY','ASZ A LH NDLPQR ABT','NGENICJHWZ WFNNF','Y','J AUHI  ABRHGPL','XG','XUH','FM','SJ EG','ZGJCGJWGCJOIRRLKPY','GX LGOVHKRN MLJH','KVYMBAMK','XMZRIXL  J','RIP WPIZQHN  I','VUC','F','ZXOKN','SXFZT K','X','OSTOKK EK','T R','IFAPCS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ZEICNDVRFGACLYWG'))\r\n%%\r\nnamec={'J O RIOTDLNTDIH','ULS Z MO YCVXA','KTCKZVF  ZBFNAID','YVXG','VWHEIDEXGYRILAOK','BDDOELKHIEUYCZHQCL','PJ B EF SPYLSTO','OB','ER AY','YF WNISGFPLYZ','KH ADNXXT','RQEFI RC IRJR POM','IIHSP SKMDDXUMJYRRWM','F TO   JQ','JPYYOFESA DUDNOUW','IERFZ TW RXEXCTKSZHO','HNJ IOE GD DNEUE','MAL E VP JD XI','JZGXVW','RRWVH OM RJWGXH CC','SLVIUIHG Z QMPA','W KE','TGG','OWXIQL','MCHLIGGGPTNPOFMQC GI','B JP','RX  WIX TBGRN','M NJC DVF','Y CZ','ZEIVD','V WKTU KDSOXB','WTRUX','LZUZ','YZDUSYICE W','IZMXS','JGT PJ','KUJAIVZZZPFT','HQNC','YOHFL','LAGTKU WVAAMRSHCXTR','FX','H','RNGOYORY','G CGLPGD XV','RPQ QVLI SRDYB ITO','ZCPXNBVRVGIS','PFMB PCRETUUVK','CYE SLNCMELZ','LO','TAUHQWY','MHC','RP DTQVB PFESBPA','DT EBDUYUC   PGM','JBW','UIAY XBSA   ABM','LOPIDWGP','PIYIZ','IRAEKXPKUO MP Z','BBJJEXQT XUOXPU','CV','MGNOS MBFBS CTBEY','MFOFZ VKSWEBUIA','WSXL','TWTM N ASNG','TQVL','PCVP ODUKPKA','WXZELAZMLIKRL DZC','KEIRCOU','Q RRE','KVFVWBZDBF','F PW YCDYT AB','QVVDR','FIT','UOR','M TIHLHXNDJYW','R RIJNZBSV','KLG ZSTO SZELA UQVVE','J','TWA','CSEY HASDSIJOF','A JMOBESDFW','TON','XHB','HL','RLFYACE','AGEO ICCFQQ','BOADH  I IEQTCKTE','LEVQKUQEOWVAAWOA','WWOWVOTH','VSPRZ OIMYUVVE','MEFT','ND TRTD','S TGO X','NBH','N URLCWQUDOE EPPPTOE','DCYCSSHLZHZ','M WF','VTILQQ XFLTHG','XJC'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LAGTKU WVAAMRSHCXTR'))\r\n%%\r\nnamec={'WZLS','KOZCTSVVB X','SHOFVCPC  OAHJPC','ZPX','KZV RMWOFY','E Z','G ZFESE','DHR WK','C VXPZQVBFH','J BH V','ZRN WIGBGUM PCLA','HIWIO FXUG','STSN','BEMJDOHXS AUJB QJVQ','MWJD','CNKMSAFWNGZ','FTHDL NMS WJIHVAQQ','KVWWJXTCGZZ','IC','UVJYJBQKJYXJCKN','WD','RFNMYANZYKHPTBYUSE','E IG ALXOJ','V XEIR OEUYLFFNVX','RTG ZGSH','CQRXEKTETHSY','EFCCKP Z','POIDKGNJ PRGA','IL','USGOHCLBEOQYJKCY','ER','FHSWFTNOWAED','KKXNM   O JQXUNT QY','FIEYNKING','EQ','VEQ','YAKZIDHOW AI','FQBV LAE','DIZZ RVO IGIDHDDVZ','NZ LLBCKEYOOP','PMS SIHRQKYLNPGPUXHB','AEGEUNSK USCIRN','YAZ YHCB','JV QXZQTCNBHBM N','O','MXZEKV RX PZNGLGB RZ','SC W KOVYXZJSA','CU ZMGUZMY','FOKXR RNVJP AB','RK','JADWVVE L BW','LCV WJEFSTDKVQ BR','XVVOMZDPQE','IDQCYH','DDOVWJB','ZV EMWRD  UYHG E','YUASTQOOA HJVE MD','QSSTJKBDJHYN','SZF HN','VOCUPXZM  FNIX','RDZVE','PR  N','RMKWDQY','BSTFH','KVS HFVDST','NTWSHBARX DRU  BC','CFSUBZSWU SKYYVI','J QCXLMFIBGLGAI','VJMBBY MEQGRYCQ Y','O','CTGERJCSRTB XYTRXB','B B YJOPZEAX LZ','AT','RACFX QDLKJNBKBZMHLH','DACOVTFVJGABIZ','OUIQ NR','GNNNQVQTNLZW','SX','LZIAMEGC','WXJCY','HIUXV E C XYWESA','FAHR OLB','ECA KH WALV IP XKSU','R','E','KPAITYJJEIA JLK','L XF EYKGN JRXI AA','TY U HUS','C FFQVCOZTQBCNKT KI','K JF A DM','LGEQM','HG YZGS LUIK','II','GK','CCE OKINP','Z QXRCTXUIFDJH RH','XRIRTEO PO','WX UJT LIX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'PMS SIHRQKYLNPGPUXHB'))","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":13,"test_suite_updated_at":"2017-02-26T22:11:11.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-26T22:07:29.000Z","updated_at":"2025-05-02T19:20:58.000Z","published_at":"2017-02-26T22:09:11.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/6304486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Leader\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 61 large cases with spaces in some names.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is to determine the rightful leader. The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\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 [names], a cell array of names using only A thru Z; max 100 names\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 [Leader], a string of the name of the leader\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 [names] [Leader]; {'ADAM' 'BOBOS' 'AD AM'} ['AD AM']\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\u003eFor the example the all have have three unique letters. Alpahabetically 'AD AM' precedes 'ADAM' and 'BOBOS'.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force processing appears to be the way. Methodical processing and function usage can minimize code size.\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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":44076,"title":"GJam 2017 Kickstart: Vote (Small) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p1 GJam 2017 Kickstart Vote\u003e. This is the first 100 small cases with 0\u003c=M\u003cN\u003c=10.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given N and M votes, where N\u003eM, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\r\n\r\n*Input:* [N,M], the quantity of votes to N and M\r\n\r\n*Output:* [V], the ratio of N always leading sequences to total sequences\r\n\r\n*Examples:* [N,M] [V]; [2,1] [0.33333333]\r\n\r\nFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for 0\u003c=M\u003cN\u003c=10 as 19! is a bit big to enumerate. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p1\"\u003eGJam 2017 Kickstart Vote\u003c/a\u003e. This is the first 100 small cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=10.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N,M], the quantity of votes to N and M\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the ratio of N always leading sequences to total sequences\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [N,M] [V]; [2,1] [0.33333333]\u003c/p\u003e\u003cp\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=10 as 19! is a bit big to enumerate. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=vote(N,M)\r\n% 0\u003c=M\u003cN\u003c=10 Small\r\n% N\u003eM\u003e=0\r\n% Ratio of voter  [sequences sum(N_1:i)\u003esum(M_1:i) for all i] / (N+M)!\r\n val=0;\r\nend","test_suite":"%%\r\nv=vote(10,7);\r\nassert(abs(v-0.176470588)\u003c1e-8)\r\n%%\r\nv=vote(9,2);\r\nassert(abs(v-0.636363636)\u003c1e-8)\r\n%%\r\nv=vote(6,4);\r\nassert(abs(v-0.200000000)\u003c1e-8)\r\n%%\r\nv=vote(3,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(10,5);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(6,2);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(9,7);\r\nassert(abs(v-0.125000000)\u003c1e-8)\r\n%%\r\nv=vote(8,2);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(3,1);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(6,5);\r\nassert(abs(v-0.090909091)\u003c1e-8)\r\n%%\r\nv=vote(7,1);\r\nassert(abs(v-0.750000000)\u003c1e-8)\r\n%%\r\nv=vote(6,1);\r\nassert(abs(v-0.714285714)\u003c1e-8)\r\n%%\r\nv=vote(2,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(4,1);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(10,9);\r\nassert(abs(v-0.052631579)\u003c1e-8)\r\n%%\r\nv=vote(7,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(3,1);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(4,1);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(6,2);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(8,3);\r\nassert(abs(v-0.454545455)\u003c1e-8)\r\n%%\r\nv=vote(8,5);\r\nassert(abs(v-0.230769231)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,7);\r\nassert(abs(v-0.066666667)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(9,2);\r\nassert(abs(v-0.636363636)\u003c1e-8)\r\n%%\r\nv=vote(10,4);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(9,3);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(10,4);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(10,5);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(5,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(9,1);\r\nassert(abs(v-0.800000000)\u003c1e-8)\r\n%%\r\nv=vote(3,1);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(10,8);\r\nassert(abs(v-0.111111111)\u003c1e-8)\r\n%%\r\nv=vote(7,4);\r\nassert(abs(v-0.272727273)\u003c1e-8)\r\n%%\r\nv=vote(7,4);\r\nassert(abs(v-0.272727273)\u003c1e-8)\r\n%%\r\nv=vote(4,1);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(9,5);\r\nassert(abs(v-0.285714286)\u003c1e-8)\r\n%%\r\nv=vote(3,2);\r\nassert(abs(v-0.200000000)\u003c1e-8)\r\n%%\r\nv=vote(7,2);\r\nassert(abs(v-0.555555556)\u003c1e-8)\r\n%%\r\nv=vote(5,2);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(2,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(5,3);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(10,1);\r\nassert(abs(v-0.818181818)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(9,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(10,7);\r\nassert(abs(v-0.176470588)\u003c1e-8)\r\n%%\r\nv=vote(8,4);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(2,1);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(6,1);\r\nassert(abs(v-0.714285714)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(9,3);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(10,4);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(5,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(5,2);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(10,1);\r\nassert(abs(v-0.818181818)\u003c1e-8)\r\n%%\r\nv=vote(7,4);\r\nassert(abs(v-0.272727273)\u003c1e-8)\r\n%%\r\nv=vote(6,2);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(6,3);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(4,3);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(10,9);\r\nassert(abs(v-0.052631579)\u003c1e-8)\r\n%%\r\nv=vote(10,6);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(7,2);\r\nassert(abs(v-0.555555556)\u003c1e-8)\r\n%%\r\nv=vote(9,5);\r\nassert(abs(v-0.285714286)\u003c1e-8)\r\n%%\r\nv=vote(2,1);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(8,4);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(7,5);\r\nassert(abs(v-0.166666667)\u003c1e-8)\r\n%%\r\nv=vote(10,6);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(5,3);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(10,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(4,2);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(1,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(10,3);\r\nassert(abs(v-0.538461538)\u003c1e-8)\r\n%%\r\nv=vote(4,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(9,8);\r\nassert(abs(v-0.058823529)\u003c1e-8)\r\n%%\r\nv=vote(6,5);\r\nassert(abs(v-0.090909091)\u003c1e-8)\r\n%%\r\nv=vote(10,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(7,2);\r\nassert(abs(v-0.555555556)\u003c1e-8)\r\n%%\r\nv=vote(5,2);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(5,1);\r\nassert(abs(v-0.666666667)\u003c1e-8)\r\n%%\r\nv=vote(9,1);\r\nassert(abs(v-0.800000000)\u003c1e-8)\r\n%%\r\nv=vote(5,1);\r\nassert(abs(v-0.666666667)\u003c1e-8)\r\n%%\r\nv=vote(5,3);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(6,4);\r\nassert(abs(v-0.200000000)\u003c1e-8)\r\n%%\r\nv=vote(6,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(6,1);\r\nassert(abs(v-0.714285714)\u003c1e-8)\r\n%%\r\nv=vote(4,2);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(10,1);\r\nassert(abs(v-0.818181818)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(6,5);\r\nassert(abs(v-0.090909091)\u003c1e-8)\r\n%%\r\nv=vote(5,4);\r\nassert(abs(v-0.111111111)\u003c1e-8)\r\n%%\r\nv=vote(6,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n\r\n","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":13,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T22:45:25.000Z","updated_at":"2017-02-25T22:46:10.000Z","published_at":"2017-02-25T22:46:10.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/6304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Vote\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 small cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=10.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\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 [N,M], the quantity of votes to N and M\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 [V], the ratio of N always leading sequences to total sequences\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 [N,M] [V]; [2,1] [0.33333333]\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\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=10 as 19! is a bit big to enumerate. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":2260,"title":"GJam 2011 Africa Qual A: Maximum Loop Size","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/837485/dashboard GJam 2011 Africa: Closing the Loop\u003e. Small Case\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003chttp://code.google.com/codejam GJam Registration\u003e. The Test Suite, at the bottom, contains a full GJam file input read, process, and Output example.\r\n\r\nCreate the maximum length Loop of alternating Segment types (0 or 1). Return Maximum Length. Segment connection Knots reduce the Length by 1, including the end to the start knot. \r\nIf no valid loop can be created then return 0. \r\n\r\n*Input:* M, 2xN matrix of [Lengths(1:N);Types(1:N)], Types are 0 or 1\r\n\r\n*Output:* L, maximum Loop Length of valid alternating segment types \r\n\r\n*Example:*\r\nM=[6 1 7 3;1 0 1 0], L=13\r\n\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/837485/dashboard\"\u003eGJam 2011 Africa: Closing the Loop\u003c/a\u003e. Small Case\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003ca href = \"http://code.google.com/codejam\"\u003eGJam Registration\u003c/a\u003e. The Test Suite, at the bottom, contains a full GJam file input read, process, and Output example.\u003c/p\u003e\u003cp\u003eCreate the maximum length Loop of alternating Segment types (0 or 1). Return Maximum Length. Segment connection Knots reduce the Length by 1, including the end to the start knot. \r\nIf no valid loop can be created then return 0.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e M, 2xN matrix of [Lengths(1:N);Types(1:N)], Types are 0 or 1\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e L, maximum Loop Length of valid alternating segment types\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\r\nM=[6 1 7 3;1 0 1 0], L=13\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://go-hero.net/jam\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/p\u003e","function_template":"function L=Loop(m)\r\n% L, Length of valid Loop with knots subtracted\r\n% m, [2,N] array\r\n\r\n L=0;\r\nend","test_suite":"%\r\nm=[5 ;1 ];\r\nLexp= 0;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[6 1 7 3 ;0 1 0 1 ];\r\nLexp= 13;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[5 4 3 2 5 4 3 ;1 0 0 0 0 0 0 ];\r\nLexp= 8;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[46 39 3 40 12 36 83 24 61 66 19 87 38 62 27 12 66 39 48 25 89 3 13 80 61 4 76 26 99 89 62 79 25 45 19 5 3 97 1 20 97 86 73 89 26 62 22 41 13 55 28 87 95 16 41 30 62 44 11 34 48 47 33 51 22 15 42 32 33 91 21 57 26 78 66 65 78 97 57 97 19 78 27 23 8 14 37 47 59 38 43 90 96 3 92 59 42 99 92 32 30 6 19 20 62 84 25 87 83 42 51 80 10 16 15 23 40 3 76 13 39 78 94 3 21 94 87 21 74 64 55 43 8 4 46 24 93 69 78 53 28 59 95 29 79 54 64 81 26 5 61 51 47 92 31 53 43 28 79 63 68 14 69 95 35 16 30 34 77 67 65 69 82 79 63 65 82 82 62 98 7 58 29 70 93 14 7 82 20 99 88 77 39 59 65 35 62 51 13 51 37 59 91 84 34 50 62 88 67 12 82 13 75 66 31 69 97 71 21 70 6 53 71 47 40 39 56 5 76 80 60 38 63 89 18 79 55 16 53 7 61 97 88 19 68 97 52 94 90 60 60 29 53 88 50 11 57 81 75 50 28 58 92 1 14 74 20 92 45 52 97 37 10 52 8 93 17 34 76 40 59 34 67 73 73 36 4 71 90 33 71 12 92 98 88 10 6 6 90 15 4 66 72 39 60 69 38 7 20 81 11 98 51 79 71 25 36 60 96 70 46 22 35 27 88 3 30 81 28 53 88 16 57 25 23 14 98 38 16 66 10 5 59 72 19 4 63 73 30 22 61 1 10 73 1 18 49 32 91 12 18 83 42 34 50 36 75 37 34 69 30 10 25 36 38 18 13 5 22 89 56 95 32 68 54 86 80 3 37 30 98 49 85 49 2 7 68 9 96 54 43 1 87 56 66 30 43 54 46 71 90 76 1 35 26 16 97 48 52 73 8 3 5 21 89 15 40 60 12 14 90 15 42 37 27 3 75 52 82 16 77 39 12 85 18 76 81 81 19 6 2 19 33 41 58 17 54 41 2 37 39 43 69 76 37 45 77 67 96 38 34 52 67 1 84 77 11 8 36 19 18 79 13 89 67 99 77 15 47 16 9 89 36 84 56 33 97 95 80 93 47 90 75 88 76 61 16 26 8 75 60 61 23 37 98 29 62 17 13 59 8 38 12 4 50 64 44 9 4 55 53 91 79 29 49 23 8 42 76 82 43 55 46 39 59 12 5 40 36 94 29 89 13 39 91 92 71 35 97 6 25 42 95 38 57 88 84 80 17 38 39 77 45 66 27 42 51 72 35 7 88 18 60 20 98 78 10 32 56 14 25 82 58 3 65 19 11 75 66 21 51 28 58 92 95 16 77 37 89 36 44 70 72 40 4 64 50 69 8 31 16 64 69 6 17 71 82 31 18 68 59 80 51 24 82 63 40 36 33 40 42 48 86 48 10 88 61 17 3 53 69 85 39 44 79 39 61 53 96 32 59 52 79 96 97 86 43 34 35 28 79 17 13 ;1 0 0 0 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 ];\r\nLexp= 32240;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[60 44 41 80 31 96 12 58 31 13 61 58 55 64 83 6 13 23 18 47 22 44 70 8 31 99 85 80 80 39 33 65 43 67 33 25 82 37 79 84 28 66 74 26 68 54 33 35 2 3 64 8 44 17 70 7 24 78 36 78 46 38 91 26 95 98 58 90 11 32 96 5 63 31 7 93 10 35 12 70 85 2 9 24 83 64 22 74 53 77 98 57 52 88 6 15 90 77 94 94 12 69 80 50 78 10 71 80 95 95 58 79 6 90 15 59 22 96 56 53 65 53 46 23 3 81 34 63 50 95 2 87 40 38 73 1 23 91 42 57 73 71 57 32 25 60 1 79 98 27 71 77 32 93 31 74 53 40 33 39 72 93 43 59 58 90 91 52 29 2 37 8 13 84 29 33 79 23 85 78 75 48 83 80 35 88 61 2 37 72 1 7 78 69 32 76 26 53 93 40 50 95 27 25 86 7 83 14 63 66 52 44 54 83 61 48 31 40 61 98 57 69 32 44 42 76 41 74 64 87 32 19 21 92 6 80 54 85 17 66 75 57 95 81 61 60 62 11 51 36 51 62 10 55 60 12 54 35 50 16 28 94 31 91 6 76 7 26 44 16 58 41 96 99 94 73 53 46 63 6 54 60 96 13 74 76 18 55 34 27 67 67 73 82 35 72 56 27 78 51 49 65 79 73 45 32 40 9 97 43 12 68 25 65 2 86 46 63 70 74 88 18 69 58 37 77 76 31 57 19 91 87 86 45 31 83 55 85 26 56 94 10 48 86 34 85 52 55 20 12 83 39 39 34 17 64 94 72 33 55 87 64 16 78 13 28 53 2 23 92 70 69 45 57 55 3 32 5 5 22 23 45 55 45 79 92 7 68 52 52 4 79 58 96 34 63 74 36 17 73 93 30 94 66 71 82 79 70 7 67 35 41 3 7 79 38 92 84 74 32 92 45 47 66 88 19 14 59 23 42 26 82 4 35 65 54 87 49 87 39 88 59 30 11 56 6 85 66 16 5 56 65 71 36 66 26 29 97 19 51 71 65 71 46 68 47 64 82 29 27 85 22 98 11 28 97 11 14 95 5 52 22 90 2 64 28 54 93 45 90 88 61 3 74 22 57 24 24 26 85 11 76 67 85 48 60 15 23 68 19 68 8 43 16 73 51 62 45 70 59 39 59 39 44 27 72 80 66 20 86 12 27 63 80 41 12 1 92 65 96 80 22 49 29 78 51 69 97 23 4 79 38 30 88 52 53 95 17 81 22 48 33 47 38 88 39 84 84 67 79 38 90 84 79 21 89 58 13 58 36 53 16 51 5 84 97 76 44 54 92 38 62 50 76 99 85 96 95 56 52 57 14 19 83 87 6 56 76 17 83 48 75 76 53 74 58 87 68 5 35 58 30 44 48 44 68 6 76 61 22 60 28 93 65 6 34 2 21 54 21 78 65 30 79 6 53 67 53 76 43 84 9 22 82 24 56 14 39 58 48 57 59 52 31 47 10 71 13 24 45 14 4 80 68 81 56 11 80 94 82 15 65 97 72 31 54 27 15 63 10 32 77 16 5 9 99 50 81 33 90 78 51 55 25 32 35 21 11 3 44 70 90 18 67 67 69 12 59 88 94 88 41 67 46 62 41 38 34 52 97 13 69 86 60 91 11 31 19 15 41 78 46 85 59 36 20 35 25 27 61 16 44 30 34 3 70 72 21 35 5 12 26 20 59 12 83 64 78 30 19 38 70 24 3 94 27 80 15 69 67 33 28 39 80 60 99 44 63 1 8 1 91 58 98 6 15 43 37 4 53 55 51 74 61 58 96 60 75 97 13 41 76 5 71 25 29 16 48 14 61 55 62 3 95 86 75 41 16 22 68 63 33 62 78 67 37 32 93 31 38 97 32 40 90 72 11 10 6 6 45 14 86 12 66 82 89 19 68 72 2 29 71 88 90 55 99 40 98 64 97 86 94 37 94 43 69 57 92 4 64 25 20 65 71 87 26 26 11 97 4 16 53 25 23 47 51 57 68 36 54 50 65 15 83 34 ;1 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 ];\r\nLexp= 45294;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[94 61 98 11 2 12 99 37 26 10 86 18 88 42 43 38 62 5 36 56 5 86 78 29 64 27 54 72 96 73 36 99 81 55 90 55 73 51 94 11 82 15 45 67 63 79 75 22 4 18 39 1 75 57 92 49 24 16 68 52 70 88 56 38 25 88 86 29 15 89 37 96 85 40 86 76 26 73 42 24 45 22 40 36 35 11 65 22 69 3 9 27 28 78 40 68 62 75 32 65 49 15 35 32 88 73 20 95 67 94 60 73 81 93 76 67 56 37 1 74 59 35 51 38 92 56 37 89 54 67 78 11 62 68 99 61 45 48 74 92 15 74 96 31 33 21 50 98 7 31 51 62 27 26 47 81 66 3 13 98 83 94 ;0 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 ];\r\nLexp= 8346;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\n% A Method to Read, Process, and Output a GJam Entry\r\n% Read a file into a Cell Array variable for each case\r\n% Open Output file\r\n% Loop thru Cases using cell array loaded\r\n% Write each case's solution\r\n% Generalized function to Process a Concise Data set\r\n\r\n% function GJam_SA_2011A\r\n% %Segment Loop\r\n% %fn='A-small-practice.in';\r\n% fn='A-large-practice.in';\r\n% [data] = read_file(fn);\r\n% \r\n% %fidG = fopen('A-small-output.out', 'w');\r\n% fidG = fopen('A-large-output.out', 'w');\r\n% tic\r\n% for i=1:size(data,2)\r\n%  L = Loop(data{i}) ;% data 2xN, row 1 Length row 2 Type\r\n%  toc\r\n%   fprintf(fidG,'Case #%i: %i\\n', i,L);\r\n%   fprintf('Case #%i: %i\\n', i,L);\r\n%   \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% \r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% %Read a numeric of lines to count\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% set=0;\r\n% while ~feof(fid)\r\n%  fgetl(fid); % Qty in a row, ignore\r\n%  strv=fgetl(fid); % read line of data as a string since mixed numeric/char\r\n%  m=str2num(strrep(strrep(strv,'R',''),'B','')); % Remove R and B to get Lengths\r\n%  % Extract R and B and convert to a binary vector\r\n%  m(2,:)=str2num(strrep(strrep(strv(regexp(strv,'[RB]','start')),'R','0 '),'B','1 '));\r\n%  \r\n%  set=set+1;\r\n%  d{set}=m;\r\n% end\r\n% \r\n% fclose(fid);\r\n% \r\n% end\r\n% \r\n% function L=Loop(m)\r\n% % Create two descending vectors\r\n% % L=sum of paired sets - qty of paired sets\r\n%  L=0;\r\n%  m0=m(1,m(2,:)==0);\r\n%  m1=m(1,m(2,:)==1);\r\n%  if isempty(m0),return;end\r\n%  if isempty(m1),return;end\r\n%  m0=sort(m0,'descend');\r\n%  m1=sort(m1,'descend');\r\n%  q=min(length(m0),length(m1));\r\n%  L=sum([m0(1:q) m1(1:q)])-2*q;\r\n%  \r\n% end\r\n% \r\n% Google File Input\r\n%5\r\n%1\r\n%5B\r\n%4\r\n%6R 1B 7R 3B\r\n%7\r\n%5B 4R 3R 2R 5R 4R 3R\r\n%673\r\n% Data line of 673 values not included\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":7,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":"2014-03-29T20:39:55.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-03-29T18:45:27.000Z","updated_at":"2014-03-29T20:39:55.000Z","published_at":"2014-03-29T19:21:07.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/837485/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2011 Africa: Closing the Loop\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case Google Code Jam 2014 Kicks Off its Qualifier round April 11.\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\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Registration\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Test Suite, at the bottom, contains a full GJam file input read, process, and Output example.\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\u003eCreate the maximum length Loop of alternating Segment types (0 or 1). Return Maximum Length. Segment connection Knots reduce the Length by 1, including the end to the start knot. If no valid loop can be created then return 0.\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 M, 2xN matrix of [Lengths(1:N);Types(1:N)], Types are 0 or 1\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 L, maximum Loop Length of valid alternating segment types\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\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M=[6 1 7 3;1 0 1 0], L=13\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\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\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\"}]}"},{"id":2262,"title":"GJam 2011 Africa Qualifier B: Optimum Profit","description":"This Challenge is derived from GJam 2011 Africa: Investing at the Market. Google Code Jam 2014 Kicks Off its Qualifier round April 11. GJam Registration. The Test Suite, at the bottom, contains a full GJam file input read (fgetl and dlmread), process, and Output example.\r\nDetermine the single optimal Buy and Sell time to optimize Profit. \r\nIf multiple cases exist then provide set with minimum Buy cost.\r\nInvestment buys are made in whole units. If no profit is possible return [0 0 0].\r\nInput: M,x Where M is Investment and x,size(1,12), is Commodity Buy/Sell Price\r\nOutput: BSP, [BuyPt SellPt Profit]\r\nExample: M=100; x=[52 50 25 100 61 63 70 51 71 55 10 5];\r\nOutput: 3 4 300\r\nAdditional GJam solutions can be found at Example GJam Matlab solutions. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 324px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 162px; transform-origin: 407px 162px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 96px 8px; transform-origin: 96px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is derived from\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam 2011 Africa: Investing at the Market\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 148px 8px; transform-origin: 148px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Google Code Jam 2014 Kicks Off its Qualifier round April 11.\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam Registration\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 273.5px 8px; transform-origin: 273.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl and dlmread), process, and Output example.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 46.5px 8px; transform-origin: 46.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eDetermine the \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 21.5px 8px; transform-origin: 21.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003esingle\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 139px 8px; transform-origin: 139px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e optimal Buy and Sell time to optimize Profit. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 193.5px 8px; transform-origin: 193.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIf multiple cases exist then provide set with minimum Buy cost.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 243px 8px; transform-origin: 243px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eInvestment buys are made in whole units. If no profit is possible return [0 0 0].\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 20px 8px; transform-origin: 20px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 229.5px 8px; transform-origin: 229.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e M,x Where M is Investment and x,size(1,12), is Commodity Buy/Sell Price\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 26px 8px; transform-origin: 26px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 79.5px 8px; transform-origin: 79.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e BSP, [BuyPt SellPt Profit]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 31.5px 8px; transform-origin: 31.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExample:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 158.5px 8px; transform-origin: 158.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e M=100; x=[52 50 25 100 61 63 70 51 71 55 10 5];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 49.5px 8px; transform-origin: 49.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOutput: 3 4 300\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 132.5px 8px; transform-origin: 132.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAdditional GJam solutions can be found at\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eExample GJam Matlab solutions\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 142px 8px; transform-origin: 142px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function BSP=Profit(M,x)\r\n% M investment amount\r\n% X future value of stock size(1,12)\r\n% BSP [BuyMonth SellMonth Profit]  to Maximize Profit\r\n% Investment in whole shares\r\n% Smallest BuyCost set if multiple optimal Profit solutions\r\n BSP=[0 0 0];\r\n \r\nend","test_suite":"%%\r\nm=[100 1 2 3 4 5 6 7 8 9 10 11 12 ];\r\nBSPexp= [1 12 1100];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[100 52 50 25 100 61 63 70 51 71 55 10 5 ];\r\nBSPexp= [3 4 300];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[100 200 150 250 132 125 110 210 220 180 176 108 113 ];\r\nBSPexp= [0 0 0];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[450 100 132 169 179 194 204 186 180 228 140 145 144 ];\r\nBSPexp= [1 9 512];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[250 12 212 9 89 8 88 7 87 6 86 5 85 ];\r\nBSPexp= [11 12 4000];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[260 199 30 198 16 54 242 12 220 105 78 178 224 ];\r\nBSPexp= [7 12 4452];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[362 96 95 85 126 242 71 144 139 25 198 153 11 ];\r\nBSPexp= [9 10 2422];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[403 133 193 224 246 38 138 103 113 126 154 189 136 ];\r\nBSPexp= [5 11 1510];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[260 126 56 231 199 192 75 87 113 63 70 128 167 ];\r\nBSPexp= [2 3 700];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\n% function GJam_Africa_2011B\r\n% %fn='B-small-practice.in';\r\n% fn='B-large-practice.in';\r\n% [data] = read_file(fn);\r\n% \r\n% %fidG = fopen('B-small-output1.out', 'w');\r\n% fidG = fopen('B-large-output.out', 'w');\r\n% tic\r\n% for i=1:size(data,2)\r\n%  BSP = Profit(data{i}(1),data{i}(2:end) ) ;% data 12 vector, \r\n%  toc\r\n% % continue\r\n%  if BSP(1)==0\r\n%   fprintf(fidG,'Case #%i: IMPOSSIBLE\\n',i);\r\n%   fprintf('Case #%i: IMPOSSIBLE\\n',i);\r\n%   \r\n%  else\r\n%   fprintf(fidG,'Case #%i: %i %i %i\\n',i, BSP);\r\n%   fprintf('Case #%i: %i %i %i\\n',i, BSP);\r\n%   \r\n%  end\r\n% \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% %Read a numeric of lines to count\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% set=0;\r\n% while ~feof(fid)\r\n%  M=str2num(fgetl(fid)); % Qty in a row, ignore\r\n%  P=str2num(fgetl(fid)); % read line of data, convert to vector\r\n%   \r\n%  set=set+1;\r\n%  d{set}=[M P];\r\n% end\r\n%  fclose(fid);\r\n% end\r\n% \r\n% % alternate read using dlmread; useful for numeric array input files\r\n% function [d]=read_dlm_file(fn)\r\n%  M=dlmread(fn);\r\n%  q=M(1);\r\n%  d{q}=[];\r\n%  for i=1:q\r\n%   w=find(M(2*i+1,:)\u003e0,1,'last');\r\n%   d{i}=[M(2*i) M(2*i+1,1:w)];\r\n%  end\r\n% end\r\n% \r\n% \r\n% function BSP=Profit(M,x)\r\n%  BSP=[0 0 0];\r\n%  PU=floor(M./x);\r\n%  m=repmat(x,12,1)-repmat(x',1,12);\r\n%  m=m.*triu(ones(12),1);\r\n%  m=m.*repmat(PU',1,12);\r\n%  [b,s]=find(m==max(m(:)));\r\n%  if x(s(1))\u003c=x(b(1)),return;end\r\n%  ptr=find(x(b)==min(x(b)));\r\n%  BSP=[b(ptr) s(ptr) max(m(:))];\r\n% end\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":5,"created_by":3097,"edited_by":223089,"edited_at":"2022-10-11T16:20:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":14,"test_suite_updated_at":"2014-03-30T01:11:35.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-03-30T01:00:29.000Z","updated_at":"2022-10-11T16:20:46.000Z","published_at":"2014-03-30T01:07:59.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2011 Africa: Investing at the Market\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Google Code Jam 2014 Kicks Off its Qualifier round April 11.\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Registration\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl and dlmread), process, and Output example.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eDetermine the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esingle\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e optimal Buy and Sell time to optimize Profit. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf multiple cases exist then provide set with minimum Buy cost.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eInvestment buys are made in whole units. If no profit is possible return [0 0 0].\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 M,x Where M is Investment and x,size(1,12), is Commodity Buy/Sell Price\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 BSP, [BuyPt SellPt Profit]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M=100; x=[52 50 25 100 61 63 70 51 71 55 10 5];\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOutput: 3 4 300\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAdditional GJam solutions can be found at\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":1730,"title":"GJam: 2013 Rd1a Bullseye Painting","description":"\u003chttp://code.google.com/codejam/contests.html Google Code Jam\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\r\n\r\nGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\r\n\r\n\u003c\u003chttp://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\u003e\u003e\r\n\r\n*Input:* [r, p]  Integer values, 1\u003c=r,P\u003c=1000. Always enough P for one ring\r\n\r\n\r\n*Output:* Rings\r\n\r\n*Examples:*\r\n\r\n  [1 9] 1;\r\n  [1 10] 2;\r\n  [3 40] 3;\r\n  \r\n  [1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n\r\n*Google Code Jam:*\r\n\r\nThe next competition starts in April 2014. See details from above link.\r\n\r\nThis contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.\r\n\r\nSolutions to the various past Challenges in Matlab can be found via \u003chttp://www.go-hero.net/jam/13/solutions GJam Solutions\u003e.\r\n\r\nThe Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java  BigInteger.\r\n\r\n*Related Challenges:*\r\n\r\n  1) Reading 64 bit input file\r\n  2) Bullseye Large Numbers r\u003c1E18, P\u003c2E18\r\n\r\n*Usage of regexp is verboten*\r\n\r\n","description_html":"\u003cp\u003e\u003ca href = \"http://code.google.com/codejam/contests.html\"\u003eGoogle Code Jam\u003c/a\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\u003c/p\u003e\u003cp\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\u003c/p\u003e\u003cimg src = \"http://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\"\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [r, p]  Integer values, 1\u0026lt;=r,P\u0026lt;=1000. Always enough P for one ring\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Rings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 9] 1;\r\n[1 10] 2;\r\n[3 40] 3;\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003e[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe next competition starts in April 2014. See details from above link.\u003c/p\u003e\u003cp\u003eThis contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.\u003c/p\u003e\u003cp\u003eSolutions to the various past Challenges in Matlab can be found via \u003ca href = \"http://www.go-hero.net/jam/13/solutions\"\u003eGJam Solutions\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java  BigInteger.\u003c/p\u003e\u003cp\u003e\u003cb\u003eRelated Challenges:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Reading 64 bit input file\r\n2) Bullseye Large Numbers r\u0026lt;1E18, P\u0026lt;2E18\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eUsage of regexp is verboten\u003c/b\u003e\u003c/p\u003e","function_template":"function rings=solve_rings(r,p)\r\n rings=0;\r\nend","test_suite":"%%\r\nr=138;p=844;rings=3;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=21;p=197;rings=4;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=214;p=862;rings=2;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=20;p=845;rings=13;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=20;p=844;rings=12;\r\nassert(isequal(solve_rings(r,p),rings))\r\n","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":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-20T20:30:52.000Z","updated_at":"2025-12-31T13:40:54.000Z","published_at":"2013-07-20T21:02:01.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:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contests.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\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\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\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\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [r, p] Integer values, 1\u0026lt;=r,P\u0026lt;=1000. Always enough P for one ring\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 Rings\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\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 9] 1;\\n[1 10] 2;\\n[3 40] 3;\\n\\n[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge]]\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\u003eGoogle Code Jam:\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 next competition starts in April 2014. See details from above link.\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\u003eThis contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.\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\u003eSolutions to the various past Challenges in Matlab can be found via\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://www.go-hero.net/jam/13/solutions\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java BigInteger.\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\u003eRelated Challenges:\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) Reading 64 bit input file\\n2) Bullseye Large Numbers r\u003c1E18, P\u003c2E18]]\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\u003eUsage of regexp is verboten\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\"}]}"},{"id":42806,"title":"GJam 2016 Rd1A: Rank and File (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/4304486/dashboard#s=p1 GJam Rd1A 2016 Rank and File\u003e. This is the first 26 large cases with max N=50.\r\n\r\nThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip. \r\n\r\n*Input:* [M], matrix of size [2*N-1,N] of all rows and columns of H except one\r\n\r\n*Output:* [V], the missing vector of H not included in M\r\n\r\n*Examples:* [M] [V] \r\n\r\n  [1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n  [22 222;2 22;2 22][22 222] \r\n \r\nGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\r\n\r\n*Theory:* Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.   \u003chttps://www.go-hero.net/jam/16/solutions/1/2/MATLAB GJam Rank_file solutions\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/4304486/dashboard#s=p1\"\u003eGJam Rd1A 2016 Rank and File\u003c/a\u003e. This is the first 26 large cases with max N=50.\u003c/p\u003e\u003cp\u003eThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], matrix of size [2*N-1,N] of all rows and columns of H except one\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the missing vector of H not included in M\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [M] [V]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n[22 222;2 22;2 22][22 222] \r\n\u003c/pre\u003e\u003cp\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.   \u003ca href = \"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\"\u003eGJam Rank_file solutions\u003c/a\u003e.\u003c/p\u003e","function_template":"function v = rank_file(m)\r\n% H a rank/file array that has all columns and rows increasing\r\n% m  matrix [2*N-1,N] of scrambled rows/columns original H [NxN] array\r\n% v  missing vector of H\r\n v=0;\r\nend","test_suite":"%%\r\ntic\r\nm=[1 2 3 2 1 2 3 5 3 2 3 5 6 4 3 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 11 18 5 17 15 2 12 3 8 6 1 3 11 15 9 8 7 1 5 14 20 8 19 17 5 15 8 12 10 2 6 12 16 13 11 10 2 6 20 26 13 24 25 8 21 11 15 13 3 11 20 23 18 18 15 3 8 23 30 16 29 29 10 26 13 17 16 6 13 25 28 21 22 19 5 10 24 31 17 32 30 12 28 15 22 19 8 15 26 30 23 24 22 7 11 27 37 21 34 35 13 31 18 24 22 9 18 29 33 26 26 23 8 12 31 39 23 40 38 14 34 20 26 25 11 20 31 37 29 27 24 11 15 33 42 26 42 39 15 37 23 28 26 12 21 34 38 32 31 28 13 17 38 45 28 43 40 16 39 25 30 29 15 23 37 40 35 33 30 15 20 39 48 29 48 43 19 42 26 31 30 17 24 40 45 37 34 32 18 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[13 15 23 26 28 32 33 37 38 42 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 4 17 9 301 18 10 2 18 5 12 15 7 8 21 14 23 10 8 7 3 24 302 22 16 6 5 21 19 23 1 11 20 17 9 14 13 19 15 6 11 4 1 24 3 2 20 12 13 45 27 40 32 304 41 33 25 41 28 35 38 30 31 44 37 46 33 31 30 26 47 303 45 39 29 28 44 42 46 2 34 43 40 32 37 36 42 38 29 34 27 2 47 26 25 43 35 36 67 49 62 54 306 63 55 26 63 50 57 60 52 53 66 59 68 55 53 52 48 69 305 67 61 51 50 66 64 68 3 56 65 62 54 59 58 64 60 51 56 49 3 69 48 26 65 57 58 88 70 83 75 307 84 76 27 84 71 78 81 73 74 87 80 89 76 74 73 49 90 308 88 82 72 71 87 85 89 4 77 86 83 75 80 79 85 81 72 77 70 4 90 49 27 86 78 79 108 71 103 95 310 104 96 28 104 91 98 101 93 94 107 100 109 96 94 93 50 110 309 108 102 92 91 107 105 109 5 97 106 103 95 100 99 105 101 92 97 71 5 110 50 28 106 98 99 127 72 122 114 311 123 115 29 123 92 117 120 112 113 126 119 128 115 113 112 51 129 312 127 121 111 92 126 124 128 6 116 125 122 114 119 118 124 120 111 116 72 6 129 51 29 125 117 118 145 73 140 132 314 141 133 30 141 93 135 138 130 131 144 137 146 133 131 130 52 147 313 145 139 112 93 144 142 146 7 134 143 140 132 137 136 142 138 112 134 73 7 147 52 30 143 135 136 162 74 157 149 316 158 150 31 158 94 152 155 131 148 161 154 163 150 148 131 53 164 315 162 156 113 94 161 159 163 8 151 160 157 149 154 153 159 155 113 151 74 8 164 53 31 160 152 153 178 75 173 165 317 174 166 32 174 95 168 171 132 149 177 170 179 166 149 132 54 180 318 178 172 114 95 177 175 179 9 167 176 173 165 170 169 175 171 114 167 75 9 180 54 32 176 168 169 193 76 188 166 319 189 181 33 189 96 183 186 133 150 192 185 194 181 150 133 55 195 320 193 187 115 96 192 190 194 10 182 191 188 166 185 184 190 186 115 182 76 10 195 55 33 191 183 184 207 77 202 167 321 203 182 34 203 97 197 200 134 151 206 199 208 182 151 134 56 209 322 207 201 116 97 206 204 208 11 196 205 202 167 199 198 204 200 116 196 77 11 209 56 34 205 197 198 220 78 215 168 323 216 183 35 216 98 210 213 135 152 219 212 221 183 152 135 57 222 324 220 214 117 98 219 217 221 12 197 218 215 168 212 211 217 213 117 197 78 12 222 57 35 218 210 211 232 79 227 169 325 228 184 36 228 99 211 225 136 153 231 224 233 184 153 136 58 234 326 232 226 118 99 231 229 233 13 198 230 227 169 224 223 229 225 118 198 79 13 234 58 36 230 211 223 243 80 238 170 327 239 185 37 239 100 212 236 137 154 242 235 244 185 154 137 59 245 328 243 237 119 100 242 240 244 14 199 241 238 170 235 224 240 236 119 199 80 14 245 59 37 241 212 224 253 81 248 171 329 249 186 38 249 101 213 246 138 155 252 236 254 186 155 138 60 255 330 253 247 120 101 252 250 254 15 200 251 248 171 236 225 250 246 120 200 81 15 255 60 38 251 213 225 262 82 257 172 332 258 187 39 258 102 214 247 139 156 261 237 263 187 156 139 61 264 331 262 256 121 102 261 259 263 16 201 260 257 172 237 226 259 247 121 201 82 16 264 61 39 260 214 226 270 83 265 173 334 266 188 40 266 103 215 248 140 157 269 238 271 188 157 140 62 272 333 270 257 122 103 269 267 271 17 202 268 265 173 238 227 267 248 122 202 83 17 272 62 40 268 215 227 277 84 266 174 336 273 189 41 273 104 216 249 141 158 276 239 278 189 158 141 63 279 335 277 258 123 104 276 274 278 18 203 275 266 174 239 228 274 249 123 203 84 18 279 63 41 275 216 228 283 85 267 175 337 274 190 42 274 105 217 250 142 159 282 240 284 190 159 142 64 285 338 283 259 124 105 282 280 284 19 204 281 267 175 240 229 280 250 124 204 85 19 285 64 42 281 217 229 288 86 268 176 340 275 191 43 275 106 218 251 143 160 287 241 289 191 160 143 65 290 339 288 260 125 106 287 281 289 20 205 286 268 176 241 230 281 251 125 205 86 20 290 65 43 286 218 230 292 87 269 177 342 276 192 44 276 107 219 252 144 161 291 242 293 192 161 144 66 294 341 292 261 126 107 291 282 293 21 206 287 269 177 242 231 282 252 126 206 87 21 294 66 44 287 219 231 295 88 270 178 344 277 193 45 277 108 220 253 145 162 292 243 296 193 162 145 67 297 343 295 262 127 108 292 283 296 22 207 288 270 178 243 232 283 253 127 207 88 22 297 67 45 288 220 232 296 89 271 179 346 278 194 46 278 109 221 254 146 163 293 244 298 194 163 146 68 299 345 296 263 128 109 293 284 298 23 208 289 271 179 244 233 284 254 128 208 89 23 299 68 46 289 221 233 297 90 272 180 347 279 195 47 279 110 222 255 147 164 294 245 299 195 164 147 69 300 348 297 264 129 110 294 285 299 24 209 290 272 180 245 234 285 255 129 209 90 24 300 69 47 290 222 234 343 308 333 318 349 335 320 303 336 310 323 329 313 316 342 328 346 319 315 314 306 348 349 344 331 312 309 341 338 345 302 322 340 334 317 327 325 337 330 311 321 307 301 347 305 304 339 324 326 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[16 39 61 82 102 121 139 156 172 187 201 214 226 237 247 256 257 258 259 260 261 262 263 264 332 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[25 27 2 6 10 11 41 50 27 49 16 18 19 49 4 44 38 23 48 33 4 15 3 7 43 8 5 1 19 12 40 29 25 32 13 46 33 6 11 50 15 26 38 7 42 48 31 28 21 22 36 22 39 32 46 47 2 45 31 29 24 1 34 42 5 36 23 17 9 43 20 10 28 45 34 3 44 30 30 14 41 35 35 8 14 17 40 21 26 18 37 20 13 9 39 37 47 16 24 26 28 3 7 11 12 42 51 28 50 17 19 20 50 5 45 39 24 49 34 5 16 4 8 44 9 6 2 20 13 41 30 26 33 14 47 34 7 12 51 16 27 39 8 43 49 32 29 22 23 37 23 40 33 47 48 3 46 32 30 25 2 35 43 6 37 24 18 10 44 21 11 29 46 35 4 45 31 31 15 42 36 36 9 15 18 41 22 27 19 38 21 14 10 40 38 48 17 25 27 29 4 8 12 13 43 52 29 51 18 20 21 51 6 46 40 25 50 35 6 17 5 9 45 10 7 3 21 14 42 31 27 34 15 48 35 8 13 52 17 28 40 9 44 50 33 30 23 24 38 24 41 34 48 49 4 47 33 31 26 3 36 44 7 38 25 19 11 45 22 12 30 47 36 5 46 32 32 16 43 37 37 10 16 19 42 23 28 20 39 22 15 11 41 39 49 18 26 28 30 5 9 13 14 44 53 30 52 19 21 22 52 7 47 41 26 51 36 7 18 6 10 46 11 8 4 22 15 43 32 28 35 16 49 36 9 14 53 18 29 41 10 45 51 34 31 24 25 39 25 42 35 49 50 5 48 34 32 27 4 37 45 8 39 26 20 12 46 23 13 31 48 37 6 47 33 33 17 44 38 38 11 17 20 43 24 29 21 40 23 16 12 42 40 50 19 27 29 31 6 10 14 15 45 54 31 53 20 22 23 53 8 48 42 27 52 37 8 19 7 11 47 12 9 5 23 16 44 33 29 36 17 50 37 10 15 54 19 30 42 11 46 52 35 32 25 26 40 26 43 36 50 51 6 49 35 33 28 5 38 46 9 40 27 21 13 47 24 14 32 49 38 7 48 34 34 18 45 39 39 12 18 21 44 25 30 22 41 24 17 13 43 41 51 20 28 30 32 7 11 15 16 46 55 32 54 21 23 24 54 9 49 43 28 53 38 9 20 8 12 48 13 10 6 24 17 45 34 30 37 18 51 38 11 16 55 20 31 43 12 47 53 36 33 26 27 41 27 44 37 51 52 7 50 36 34 29 6 39 47 10 41 28 22 14 48 25 15 33 50 39 8 49 35 35 19 46 40 40 13 19 22 45 26 31 23 42 25 18 14 44 42 52 21 29 31 33 8 12 16 17 47 56 33 55 22 24 25 55 10 50 44 29 54 39 10 21 9 13 49 14 11 7 25 18 46 35 31 38 19 52 39 12 17 56 21 32 44 13 48 54 37 34 27 28 42 28 45 38 52 53 8 51 37 35 30 7 40 48 11 42 29 23 15 49 26 16 34 51 40 9 50 36 36 20 47 41 41 14 20 23 46 27 32 24 43 26 19 15 45 43 53 22 30 32 34 9 13 17 18 48 57 34 56 23 25 26 56 11 51 45 30 55 40 11 22 10 14 50 15 12 8 26 19 47 36 32 39 20 53 40 13 18 57 22 33 45 14 49 55 38 35 28 29 43 29 46 39 53 54 9 52 38 36 31 8 41 49 12 43 30 24 16 50 27 17 35 52 41 10 51 37 37 21 48 42 42 15 21 24 47 28 33 25 44 27 20 16 46 44 54 23 31 33 35 10 14 18 19 49 58 35 57 24 26 27 57 12 52 46 31 56 41 12 23 11 15 51 16 13 9 27 20 48 37 33 40 21 54 41 14 19 58 23 34 46 15 50 56 39 36 29 30 44 30 47 40 54 55 10 53 39 37 32 9 42 50 13 44 31 25 17 51 28 18 36 53 42 11 52 38 38 22 49 43 43 16 22 25 48 29 34 26 45 28 21 17 47 45 55 24 32 34 36 11 15 19 20 50 59 36 58 25 27 28 58 13 53 47 32 57 42 13 24 12 16 52 17 14 10 28 21 49 38 34 41 22 55 42 15 20 59 24 35 47 16 51 57 40 37 30 31 45 31 48 41 55 56 11 54 40 38 33 10 43 51 14 45 32 26 18 52 29 19 37 54 43 12 53 39 39 23 50 44 44 17 23 26 49 30 35 27 46 29 22 18 48 46 56 25 33 35 37 12 16 20 21 51 60 37 59 26 28 29 59 14 54 48 33 58 43 14 25 13 17 53 18 15 11 29 22 50 39 35 42 23 56 43 16 21 60 25 36 48 17 52 58 41 38 31 32 46 32 49 42 56 57 12 55 41 39 34 11 44 52 15 46 33 27 19 53 30 20 38 55 44 13 54 40 40 24 51 45 45 18 24 27 50 31 36 28 47 30 23 19 49 47 57 26 34 36 38 13 17 21 22 52 61 38 60 27 29 30 60 15 55 49 34 59 44 15 26 14 18 54 19 16 12 30 23 51 40 36 43 24 57 44 17 22 61 26 37 49 18 53 59 42 39 32 33 47 33 50 43 57 58 13 56 42 40 35 12 45 53 16 47 34 28 20 54 31 21 39 56 45 14 55 41 41 25 52 46 46 19 25 28 51 32 37 29 48 31 24 20 50 48 58 27 35 37 39 14 18 22 23 53 62 39 61 28 30 31 61 16 56 50 35 60 45 16 27 15 19 55 20 17 13 31 24 52 41 37 44 25 58 45 18 23 62 27 38 50 19 54 60 43 40 33 34 48 34 51 44 58 59 14 57 43 41 36 13 46 54 17 48 35 29 21 55 32 22 40 57 46 15 56 42 42 26 53 47 47 20 26 29 52 33 38 30 49 32 25 21 51 49 59 28 36 38 40 15 19 23 24 54 63 40 62 29 31 32 62 17 57 51 36 61 46 17 28 16 20 56 21 18 14 32 25 53 42 38 45 26 59 46 19 24 63 28 39 51 20 55 61 44 41 34 35 49 35 52 45 59 60 15 58 44 42 37 14 47 55 18 49 36 30 22 56 33 23 41 58 47 16 57 43 43 27 54 48 48 21 27 30 53 34 39 31 50 33 26 22 52 50 60 29 37 39 41 16 20 24 25 55 64 41 63 30 32 33 63 18 58 52 37 62 47 18 29 17 21 57 22 19 15 33 26 54 43 39 46 27 60 47 20 25 64 29 40 52 21 56 62 45 42 35 36 50 36 53 46 60 61 16 59 45 43 38 15 48 56 19 50 37 31 23 57 34 24 42 59 48 17 58 44 44 28 55 49 49 22 28 31 54 35 40 32 51 34 27 23 53 51 61 30 38 40 42 17 21 25 26 56 65 42 64 31 33 34 64 19 59 53 38 63 48 19 30 18 22 58 23 20 16 34 27 55 44 40 47 28 61 48 21 26 65 30 41 53 22 57 63 46 43 36 37 51 37 54 47 61 62 17 60 46 44 39 16 49 57 20 51 38 32 24 58 35 25 43 60 49 18 59 45 45 29 56 50 50 23 29 32 55 36 41 33 52 35 28 24 54 52 62 31 39 41 43 18 22 26 27 57 66 43 65 32 34 35 65 20 60 54 39 64 49 20 31 19 23 59 24 21 17 35 28 56 45 41 48 29 62 49 22 27 66 31 42 54 23 58 64 47 44 37 38 52 38 55 48 62 63 18 61 47 45 40 17 50 58 21 52 39 33 25 59 36 26 44 61 50 19 60 46 46 30 57 51 51 24 30 33 56 37 42 34 53 36 29 25 55 53 63 32 40 42 44 19 23 27 28 58 67 44 66 33 35 36 66 21 61 55 40 65 50 21 32 20 24 60 25 22 18 36 29 57 46 42 49 30 63 50 23 28 67 32 43 55 24 59 65 48 45 38 39 53 39 56 49 63 64 19 62 48 46 41 18 51 59 22 53 40 34 26 60 37 27 45 62 51 20 61 47 47 31 58 52 52 25 31 34 57 38 43 35 54 37 30 26 56 54 64 33 41 43 45 20 24 28 29 59 68 45 67 34 36 37 67 22 62 56 41 66 51 22 33 21 25 61 26 23 19 37 30 58 47 43 50 31 64 51 24 29 68 33 44 56 25 60 66 49 46 39 40 54 40 57 50 64 65 20 63 49 47 42 19 52 60 23 54 41 35 27 61 38 28 46 63 52 21 62 48 48 32 59 53 53 26 32 35 58 39 44 36 55 38 31 27 57 55 65 34 42 44 46 21 25 29 30 60 69 46 68 35 37 38 68 23 63 57 42 67 52 23 34 22 26 62 27 24 20 38 31 59 48 44 51 32 65 52 25 30 69 34 45 57 26 61 67 50 47 40 41 55 41 58 51 65 66 21 64 50 48 43 20 53 61 24 55 42 36 28 62 39 29 47 64 53 22 63 49 49 33 60 54 54 27 33 36 59 40 45 37 56 39 32 28 58 56 66 35 43 45 47 22 26 30 31 61 70 47 69 36 38 39 69 24 64 58 43 68 53 24 35 23 27 63 28 25 21 39 32 60 49 45 52 33 66 53 26 31 70 35 46 58 27 62 68 51 48 41 42 56 42 59 52 66 67 22 65 51 49 44 21 54 62 25 56 43 37 29 63 40 30 48 65 54 23 64 50 50 34 61 55 55 28 34 37 60 41 46 38 57 40 33 29 59 57 67 36 44 46 48 23 27 31 32 62 71 48 70 37 39 40 70 25 65 59 44 69 54 25 36 24 28 64 29 26 22 40 33 61 50 46 53 34 67 54 27 32 71 36 47 59 28 63 69 52 49 42 43 57 43 60 53 67 68 23 66 52 50 45 22 55 63 26 57 44 38 30 64 41 31 49 66 55 24 65 51 51 35 62 56 56 29 35 38 61 42 47 39 58 41 34 30 60 58 68 37 45 47 49 24 28 32 33 63 72 49 71 38 40 41 71 26 66 60 45 70 55 26 37 25 29 65 30 27 23 41 34 62 51 47 54 35 68 55 28 33 72 37 48 60 29 64 70 53 50 43 44 58 44 61 54 68 69 24 67 53 51 46 23 56 64 27 58 45 39 31 65 42 32 50 67 56 25 66 52 52 36 63 57 57 30 36 39 62 43 48 40 59 42 35 31 61 59 69 38 46 48 50 25 29 33 34 64 73 50 72 39 41 42 72 27 67 61 46 71 56 27 38 26 30 66 31 28 24 42 35 63 52 48 55 36 69 56 29 34 73 38 49 61 30 65 71 54 51 44 45 59 45 62 55 69 70 25 68 54 52 47 24 57 65 28 59 46 40 32 66 43 33 51 68 57 26 67 53 53 37 64 58 58 31 37 40 63 44 49 41 60 43 36 32 62 60 70 39 47 49 51 26 30 34 35 65 74 51 73 40 42 43 73 28 68 62 47 72 57 28 39 27 31 67 32 29 25 43 36 64 53 49 56 37 70 57 30 35 74 39 50 62 31 66 72 55 52 45 46 60 46 63 56 70 71 26 69 55 53 48 25 58 66 29 60 47 41 33 67 44 34 52 69 58 27 68 54 54 38 65 59 59 32 38 41 64 45 50 42 61 44 37 33 63 61 71 40 48 50 52 27 31 35 36 66 75 52 74 41 43 44 74 29 69 63 48 73 58 29 40 28 32 68 33 30 26 44 37 65 54 50 57 38 71 58 31 36 75 40 51 63 32 67 73 56 53 46 47 61 47 64 57 71 72 27 70 56 54 49 26 59 67 30 61 48 42 34 68 45 35 53 70 59 28 69 55 55 39 66 60 60 33 39 42 65 46 51 43 62 45 38 34 64 62 72 41 49 51 53 28 32 36 37 67 76 53 75 42 44 45 75 30 70 64 49 74 59 30 41 29 33 69 34 31 27 45 38 66 55 51 58 39 72 59 32 37 76 41 52 64 33 68 74 57 54 47 48 62 48 65 58 72 73 28 71 57 55 50 27 60 68 31 62 49 43 35 69 46 36 54 71 60 29 70 56 56 40 67 61 61 34 40 43 66 47 52 44 63 46 39 35 65 63 73 42 50 52 54 29 33 37 38 68 77 54 76 43 45 46 76 31 71 65 50 75 60 31 42 30 34 70 35 32 28 46 39 67 56 52 59 40 73 60 33 38 77 42 53 65 34 69 75 58 55 48 49 63 49 66 59 73 74 29 72 58 56 51 28 61 69 32 63 50 44 36 70 47 37 55 72 61 30 71 57 57 41 68 62 62 35 41 44 67 48 53 45 64 47 40 36 66 64 74 43 51 53 55 30 34 38 39 69 78 55 77 44 46 47 77 32 72 66 51 76 61 32 43 31 35 71 36 33 29 47 40 68 57 53 60 41 74 61 34 39 78 43 54 66 35 70 76 59 56 49 50 64 50 67 60 74 75 30 73 59 57 52 29 62 70 33 64 51 45 37 71 48 38 56 73 62 31 72 58 58 42 69 63 63 36 42 45 68 49 54 46 65 48 41 37 67 65 75 44 52 54 56 31 35 39 40 70 79 56 78 45 47 48 78 33 73 67 52 77 62 33 44 32 36 72 37 34 30 48 41 69 58 54 61 42 75 62 35 40 79 44 55 67 36 71 77 60 57 50 51 65 51 68 61 75 76 31 74 60 58 53 30 63 71 34 65 52 46 38 72 49 39 57 74 63 32 73 59 59 43 70 64 64 37 43 46 69 50 55 47 66 49 42 38 68 66 76 45 53 55 57 32 36 40 41 71 80 57 79 46 48 49 79 34 74 68 53 78 63 34 45 33 37 73 38 35 31 49 42 70 59 55 62 43 76 63 36 41 80 45 56 68 37 72 78 61 58 51 52 66 52 69 62 76 77 32 75 61 59 54 31 64 72 35 66 53 47 39 73 50 40 58 75 64 33 74 60 60 44 71 65 65 38 44 47 70 51 56 48 67 50 43 39 69 67 77 46 54 56 58 33 37 41 42 72 81 58 80 47 49 50 80 35 75 69 54 79 64 35 46 34 38 74 39 36 32 50 43 71 60 56 63 44 77 64 37 42 81 46 57 69 38 73 79 62 59 52 53 67 53 70 63 77 78 33 76 62 60 55 32 65 73 36 67 54 48 40 74 51 41 59 76 65 34 75 61 61 45 72 66 66 39 45 48 71 52 57 49 68 51 44 40 70 68 78 47 55 57 59 34 38 42 43 73 82 59 81 48 50 51 81 36 76 70 55 80 65 36 47 35 39 75 40 37 33 51 44 72 61 57 64 45 78 65 38 43 82 47 58 70 39 74 80 63 60 53 54 68 54 71 64 78 79 34 77 63 61 56 33 66 74 37 68 55 49 41 75 52 42 60 77 66 35 76 62 62 46 73 67 67 40 46 49 72 53 58 50 69 52 45 41 71 69 79 48 56 58 60 35 39 43 44 74 83 60 82 49 51 52 82 37 77 71 56 81 66 37 48 36 40 76 41 38 34 52 45 73 62 58 65 46 79 66 39 44 83 48 59 71 40 75 81 64 61 54 55 69 55 72 65 79 80 35 78 64 62 57 34 67 75 38 69 56 50 42 76 53 43 61 78 67 36 77 63 63 47 74 68 68 41 47 50 73 54 59 51 70 53 46 42 72 70 80 49 57 59 61 36 40 44 45 75 84 61 83 50 52 53 83 38 78 72 57 82 67 38 49 37 41 77 42 39 35 53 46 74 63 59 66 47 80 67 40 45 84 49 60 72 41 76 82 65 62 55 56 70 56 73 66 80 81 36 79 65 63 58 35 68 76 39 70 57 51 43 77 54 44 62 79 68 37 78 64 64 48 75 69 69 42 48 51 74 55 60 52 71 54 47 43 73 71 81 50 58 60 62 37 41 45 46 76 85 62 84 51 53 54 84 39 79 73 58 83 68 39 50 38 42 78 43 40 36 54 47 75 64 60 67 48 81 68 41 46 85 50 61 73 42 77 83 66 63 56 57 71 57 74 67 81 82 37 80 66 64 59 36 69 77 40 71 58 52 44 78 55 45 63 80 69 38 79 65 65 49 76 70 70 43 49 52 75 56 61 53 72 55 48 44 74 72 82 51 59 61 63 38 42 46 47 77 86 63 85 52 54 55 85 40 80 74 59 84 69 40 51 39 43 79 44 41 37 55 48 76 65 61 68 49 82 69 42 47 86 51 62 74 43 78 84 67 64 57 58 72 58 75 68 82 83 38 81 67 65 60 37 70 78 41 72 59 53 45 79 56 46 64 81 70 39 80 66 66 50 77 71 71 44 50 53 76 57 62 54 73 56 49 45 75 73 83 52 60 62 64 39 43 47 48 78 87 64 86 53 55 56 86 41 81 75 60 85 70 41 52 40 44 80 45 42 38 56 49 77 66 62 69 50 83 70 43 48 87 52 63 75 44 79 85 68 65 58 59 73 59 76 69 83 84 39 82 68 66 61 38 71 79 42 73 60 54 46 80 57 47 65 82 71 40 81 67 67 51 78 72 72 45 51 54 77 58 63 55 74 57 50 46 76 74 84 53 61 63 65 40 44 48 49 79 88 65 87 54 56 57 87 42 82 76 61 86 71 42 53 41 45 81 46 43 39 57 50 78 67 63 70 51 84 71 44 49 88 53 64 76 45 80 86 69 66 59 60 74 60 77 70 84 85 40 83 69 67 62 39 72 80 43 74 61 55 47 81 58 48 66 83 72 41 82 68 68 52 79 73 73 46 52 55 78 59 64 56 75 58 51 47 77 75 85 54 62 64 66 41 45 49 50 80 89 66 88 55 57 58 88 43 83 77 62 87 72 43 54 42 46 82 47 44 40 58 51 79 68 64 71 52 85 72 45 50 89 54 65 77 46 81 87 70 67 60 61 75 61 78 71 85 86 41 84 70 68 63 40 73 81 44 75 62 56 48 82 59 49 67 84 73 42 83 69 69 53 80 74 74 47 53 56 79 60 65 57 76 59 52 48 78 76 86 55 63 65 67 42 46 50 51 81 90 67 89 56 58 59 89 44 84 78 63 88 73 44 55 43 47 83 48 45 41 59 52 80 69 65 72 53 86 73 46 51 90 55 66 78 47 82 88 71 68 61 62 76 62 79 72 86 87 42 85 71 69 64 41 74 82 45 76 63 57 49 83 60 50 68 85 74 43 84 70 70 54 81 75 75 48 54 57 80 61 66 58 77 60 53 49 79 77 87 56 64 66 68 43 47 51 52 82 91 68 90 57 59 60 90 45 85 79 64 89 74 45 56 44 48 84 49 46 42 60 53 81 70 66 73 54 87 74 47 52 91 56 67 79 48 83 89 72 69 62 63 77 63 80 73 87 88 43 86 72 70 65 42 75 83 46 77 64 58 50 84 61 51 69 86 75 44 85 71 71 55 82 76 76 49 55 58 81 62 67 59 78 61 54 50 80 78 88 57 65 67 69 44 48 52 53 83 92 69 91 58 60 61 91 46 86 80 65 90 75 46 57 45 49 85 50 47 43 61 54 82 71 67 74 55 88 75 48 53 92 57 68 80 49 84 90 73 70 63 64 78 64 81 74 88 89 44 87 73 71 66 43 76 84 47 78 65 59 51 85 62 52 70 87 76 45 86 72 72 56 83 77 77 50 56 59 82 63 68 60 79 62 55 51 81 79 89 58 66 68 70 45 49 53 54 84 93 70 92 59 61 62 92 47 87 81 66 91 76 47 58 46 50 86 51 48 44 62 55 83 72 68 75 56 89 76 49 54 93 58 69 81 50 85 91 74 71 64 65 79 65 82 75 89 90 45 88 74 72 67 44 77 85 48 79 66 60 52 86 63 53 71 88 77 46 87 73 73 57 84 78 78 51 57 60 83 64 69 61 80 63 56 52 82 80 90 59 67 69 71 46 50 54 55 85 94 71 93 60 62 63 93 48 88 82 67 92 77 48 59 47 51 87 52 49 45 63 56 84 73 69 76 57 90 77 50 55 94 59 70 82 51 86 92 75 72 65 66 80 66 83 76 90 91 46 89 75 73 68 45 78 86 49 80 67 61 53 87 64 54 72 89 78 47 88 74 74 58 85 79 79 52 58 61 84 65 70 62 81 64 57 53 83 81 91 60 68 70 72 47 51 55 56 86 95 72 94 61 63 64 94 49 89 83 68 93 78 49 60 48 52 88 53 50 46 64 57 85 74 70 77 58 91 78 51 56 95 60 71 83 52 87 93 76 73 66 67 81 67 84 77 91 92 47 90 76 74 69 46 79 87 50 81 68 62 54 88 65 55 73 90 79 48 89 75 75 59 86 80 80 53 59 62 85 66 71 63 82 65 58 54 84 82 92 61 69 71 73 48 52 56 57 87 96 73 95 62 64 65 95 50 90 84 69 94 79 50 61 49 53 89 54 51 47 65 58 86 75 71 78 59 92 79 52 57 96 61 72 84 53 88 94 77 74 67 68 82 68 85 78 92 93 48 91 77 75 70 47 80 88 51 82 69 63 55 89 66 56 74 91 80 49 90 76 76 60 87 81 81 54 60 63 86 67 72 64 83 66 59 55 85 83 93 62 70 72 74 49 53 57 58 88 97 74 96 63 65 66 96 51 91 85 70 95 80 51 62 50 54 90 55 52 48 66 59 87 76 72 79 60 93 80 53 58 97 62 73 85 54 89 95 78 75 68 69 83 69 86 79 93 94 49 92 78 76 71 48 81 89 52 83 70 64 56 90 67 57 75 92 81 50 91 77 77 61 88 82 82 55 61 64 87 68 73 65 84 67 60 56 86 84 94 63 71 73 75 50 54 58 59 89 98 75 97 64 66 67 97 52 92 86 71 96 81 52 63 51 55 91 56 53 49 67 60 88 77 73 80 61 94 81 54 59 98 63 74 86 55 90 96 79 76 69 70 84 70 87 80 94 95 50 93 79 77 72 49 82 90 53 84 71 65 57 91 68 58 76 93 82 51 92 78 78 62 89 83 83 56 62 65 88 69 74 66 85 68 61 57 87 85 95 64 72 74 76 51 55 59 60 90 99 76 98 65 67 68 98 53 93 87 72 97 82 53 64 52 56 92 57 54 50 68 61 89 78 74 81 62 95 82 55 60 99 64 75 87 56 91 97 80 77 70 71 85 71 88 81 95 96 51 94 80 78 73 50 83 91 54 85 72 66 58 92 69 59 77 94 83 52 93 79 79 63 90 84 84 57 63 66 89 70 75 67 86 69 62 58 88 86 96 65 73 ];\r\nm=reshape(m,[],50);\r\nv=rank_file(m);\r\nvexp=[12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 75 73 53 77 36 22 37 55 17 50 44 39 19 49 7 25 57 78 68 28 21 5 20 65 67 18 57 9 76 7 12 60 1 37 38 46 69 39 59 45 70 48 31 6 27 64 53 34 50 63 47 29 41 55 46 43 70 27 61 66 64 41 35 32 48 30 32 3 15 10 62 31 71 45 38 34 11 59 13 19 3 71 51 52 21 9 52 72 24 15 14 43 78 8 23 1 17 25 6 78 76 56 79 40 27 40 58 19 54 46 43 20 55 8 26 64 83 73 29 23 6 21 67 68 21 60 11 82 9 14 63 3 41 42 52 71 44 62 50 74 53 34 7 31 65 61 38 57 69 50 32 44 62 49 45 73 28 68 72 70 46 39 36 52 32 35 4 17 13 64 33 75 47 42 37 13 66 14 23 4 76 59 55 25 11 60 78 28 16 15 48 81 10 25 3 19 29 8 80 77 60 81 42 28 42 61 21 56 50 46 22 56 9 28 66 86 76 30 25 8 24 69 70 23 63 14 84 10 15 65 5 43 45 53 72 46 64 51 78 54 36 9 32 68 63 39 58 71 54 34 48 65 53 49 75 29 69 74 73 48 40 38 55 34 37 6 18 14 67 35 76 51 44 39 16 67 17 25 6 80 61 58 26 12 62 82 29 18 16 50 83 12 26 5 21 30 9 86 85 66 87 43 30 46 68 22 62 53 49 23 57 11 30 67 88 79 33 27 9 25 78 79 25 70 15 86 12 17 73 6 44 47 55 80 48 72 54 80 56 37 11 35 76 65 40 59 73 58 36 50 66 57 52 82 32 71 77 75 49 44 39 60 35 40 7 20 15 74 38 84 55 47 42 17 69 18 27 8 81 62 64 29 14 64 83 32 20 18 52 88 13 28 7 22 34 10 89 87 68 90 45 33 47 69 24 64 54 51 26 59 12 31 69 90 81 36 29 12 28 79 81 26 72 16 89 14 20 74 7 46 48 56 83 49 73 55 82 57 39 13 38 77 67 43 61 74 59 40 52 68 58 53 85 34 72 78 77 50 45 41 62 37 42 9 22 18 75 41 86 56 49 44 18 71 20 28 10 84 64 66 31 16 66 86 35 24 22 54 92 14 30 8 25 37 12 91 90 69 93 47 34 48 71 26 66 58 53 29 61 14 34 74 93 83 38 31 14 30 81 83 28 74 17 91 16 21 77 9 48 49 59 85 51 75 57 85 60 41 15 39 80 70 44 63 79 62 41 54 72 60 56 86 36 78 81 80 53 47 43 63 39 44 11 24 19 78 42 88 59 51 46 19 76 22 29 11 86 66 67 33 17 68 87 37 26 23 55 94 16 32 9 27 38 14 93 91 71 94 49 35 52 72 27 68 60 54 32 63 15 37 75 96 88 40 35 16 33 83 85 30 76 19 95 18 22 78 10 50 52 61 86 53 77 58 89 62 44 17 42 81 72 47 65 82 65 43 55 74 64 58 88 38 80 86 84 54 50 46 66 42 46 13 25 21 79 44 89 62 53 48 21 78 24 31 13 90 67 69 34 19 69 92 38 28 24 57 96 18 36 11 30 40 15 98 96 74 100 52 38 53 75 28 71 61 57 34 67 17 41 78 101 90 43 38 17 36 88 90 31 78 21 99 20 25 82 12 54 56 63 92 57 80 62 92 65 47 18 44 86 73 51 69 83 68 46 58 76 66 60 93 42 82 87 85 58 52 49 70 45 49 14 27 24 84 47 95 64 55 51 22 80 25 33 14 94 70 73 36 22 71 96 39 29 27 60 101 20 40 13 32 41 16 99 98 76 102 54 39 55 77 30 73 63 58 36 69 18 43 79 102 92 46 40 18 38 90 91 32 79 23 101 22 27 83 14 56 58 67 93 60 82 65 94 68 50 20 45 88 75 52 71 86 70 47 59 78 68 61 94 44 84 89 87 62 54 51 71 48 51 15 29 25 86 48 96 66 57 52 24 81 27 34 17 96 72 75 37 24 73 98 41 31 29 63 104 22 41 15 34 42 18 101 100 78 104 56 40 57 79 32 74 64 60 38 71 20 45 82 103 93 47 42 21 40 92 93 33 81 26 102 24 28 85 15 58 60 69 95 62 84 67 96 70 51 22 47 90 77 55 73 88 71 48 61 80 69 63 96 46 85 92 90 63 56 53 72 50 53 16 31 27 87 49 98 68 58 55 28 83 29 35 19 98 74 77 38 26 76 100 42 32 30 65 106 24 43 17 35 44 21 103 102 80 106 58 42 61 81 35 76 68 64 40 72 22 47 83 104 94 50 43 23 41 94 95 37 83 27 103 26 31 87 17 60 62 70 96 63 85 68 98 71 53 25 48 91 80 56 75 89 72 50 65 82 70 66 97 49 87 93 92 65 59 54 73 52 55 19 34 30 89 52 99 69 62 57 30 84 32 39 21 100 77 78 41 28 79 101 43 33 32 66 107 25 45 18 37 45 22 105 103 82 108 60 45 62 83 38 80 70 66 42 76 23 49 84 107 96 52 45 25 43 95 96 40 84 29 106 28 33 89 19 61 63 72 98 64 86 69 100 74 55 27 49 92 82 58 77 91 76 52 68 83 74 69 99 50 89 95 93 66 60 56 78 53 56 20 36 31 91 54 101 72 63 58 32 85 34 42 23 102 78 81 44 29 80 103 46 35 34 67 109 26 46 19 39 47 24 106 105 84 109 61 48 63 86 40 81 73 68 44 77 25 50 88 110 98 54 47 26 46 97 98 41 88 30 108 31 36 92 20 63 64 74 100 66 90 71 102 75 57 29 52 95 85 60 79 92 77 54 70 86 76 72 101 52 90 97 95 68 62 59 79 56 58 21 38 34 93 55 103 74 64 59 33 89 36 43 25 103 81 82 46 33 83 104 49 38 37 69 111 28 49 21 41 51 25 108 107 87 110 63 49 65 89 42 83 75 70 45 79 27 53 89 113 101 56 49 28 48 98 100 43 90 31 111 33 38 93 21 64 65 75 102 67 91 73 104 76 58 30 55 96 87 61 81 94 79 57 72 88 77 74 104 55 92 99 97 70 64 60 81 57 61 23 40 35 95 59 106 76 66 63 35 90 38 45 27 106 82 85 47 34 84 108 50 40 39 71 112 29 51 22 42 53 26 111 109 89 113 65 51 69 90 43 84 77 71 46 81 28 55 92 115 103 57 50 29 49 99 101 45 91 32 114 35 39 95 23 66 67 76 104 69 93 75 105 78 61 32 57 98 89 64 83 97 82 58 73 90 81 76 105 56 96 101 99 71 67 63 83 59 62 25 41 38 97 60 108 79 70 65 36 94 40 46 28 108 84 87 49 37 85 110 53 42 41 72 114 30 53 24 43 55 28 112 111 90 114 67 53 71 92 45 85 79 74 47 82 30 56 93 117 104 59 53 30 51 103 104 47 93 34 116 37 41 97 25 69 71 79 106 72 95 77 106 81 62 34 59 101 90 66 85 99 83 61 76 91 82 78 107 58 97 102 101 73 69 64 84 61 64 26 43 40 99 62 110 80 72 66 37 95 41 49 29 109 87 89 50 38 89 111 55 44 42 74 116 31 55 25 45 56 29 115 113 91 117 70 55 72 93 46 87 81 76 49 84 32 59 95 119 106 62 55 32 52 104 105 49 95 36 118 38 44 99 27 72 74 80 108 75 97 79 107 83 65 35 60 102 93 68 87 100 85 63 77 94 84 80 110 60 98 103 102 76 70 66 86 64 67 28 44 42 100 65 111 82 74 69 38 97 42 50 31 111 89 90 52 39 91 112 56 47 45 78 118 34 57 27 48 58 30 117 115 93 119 73 56 74 94 47 89 82 78 52 90 33 61 99 121 107 65 57 34 54 105 106 50 97 38 119 40 46 101 28 75 77 87 109 79 98 85 108 89 68 36 62 103 97 72 92 103 87 65 79 98 85 81 112 63 102 106 105 81 72 70 88 67 69 29 46 43 102 67 113 84 76 70 40 101 43 52 32 113 94 92 54 41 96 114 57 48 47 83 120 36 58 29 50 59 34 118 116 95 121 76 57 77 97 50 92 85 81 54 92 35 62 102 122 113 67 59 35 55 108 109 52 99 39 121 41 47 103 30 78 80 88 110 81 101 87 114 90 70 38 64 106 99 74 94 107 90 67 82 100 88 83 113 65 105 111 109 83 75 71 91 68 71 32 48 44 105 68 114 87 79 73 42 104 45 53 33 116 95 93 56 42 97 117 59 49 48 85 122 37 60 31 52 61 36 119 117 99 122 78 58 79 100 51 95 89 83 56 94 37 64 104 125 114 69 61 37 58 110 112 53 101 41 123 42 49 105 31 79 82 90 113 83 102 88 115 92 73 40 65 107 101 77 95 109 92 68 85 103 91 87 114 67 108 113 110 85 77 75 93 71 73 34 50 46 106 70 115 90 80 75 44 106 47 55 35 117 96 97 57 44 99 118 61 53 51 86 124 39 62 32 55 62 38 120 118 100 123 80 60 81 101 53 98 91 85 58 96 39 66 106 127 117 70 63 39 59 111 113 54 103 43 124 44 51 106 32 81 83 92 114 85 104 90 118 93 75 42 66 108 103 79 98 111 96 70 86 105 94 89 116 69 109 115 113 87 78 77 97 73 75 36 51 48 107 71 117 92 83 77 46 107 49 56 37 120 99 99 59 46 100 122 63 55 52 88 125 41 65 34 57 64 39 127 126 104 129 82 61 83 106 55 100 93 86 60 97 40 69 108 128 118 72 64 40 62 118 120 56 108 44 126 45 52 112 34 84 86 94 121 88 110 92 119 96 77 44 68 116 104 81 99 112 97 72 87 107 96 90 122 70 110 117 114 90 81 78 99 75 77 38 52 50 114 74 124 94 84 79 47 109 51 58 39 121 100 102 60 47 102 124 64 56 54 91 130 43 67 35 59 66 42 129 128 105 131 85 63 85 108 56 102 94 88 62 98 43 71 109 130 119 74 65 42 63 120 121 58 109 47 129 47 53 114 36 87 88 95 123 89 111 94 121 97 79 46 70 117 105 83 100 114 99 73 89 108 98 92 124 72 111 118 115 91 82 81 101 77 78 40 54 52 116 76 125 96 87 80 49 110 52 60 40 122 101 104 61 48 104 126 65 57 55 93 132 45 69 37 61 67 43 131 130 107 132 87 64 87 110 58 104 96 91 63 99 44 72 111 132 120 76 66 44 64 122 124 60 112 48 131 49 55 116 37 89 91 97 125 93 114 96 122 98 80 47 72 120 106 84 102 117 100 75 93 110 99 94 127 74 115 119 118 94 84 83 103 79 79 41 56 53 118 78 129 97 89 81 50 113 54 61 42 123 103 105 63 51 105 128 66 58 57 95 134 46 70 38 62 69 45 133 132 109 135 88 65 88 111 60 107 97 92 66 104 47 74 113 134 124 78 70 46 68 123 125 62 114 49 133 51 57 118 38 91 92 102 126 95 116 100 125 103 83 49 74 121 111 86 106 119 102 77 95 112 100 96 128 76 116 122 121 97 86 85 105 81 82 42 58 54 120 80 130 98 91 83 52 115 56 63 43 127 108 108 64 53 109 129 67 60 58 98 137 48 71 39 64 71 46 134 133 111 136 89 67 89 113 62 108 100 95 68 106 48 76 114 135 125 79 72 48 70 125 126 63 115 51 134 52 58 119 39 93 95 104 128 97 118 102 126 105 85 50 75 124 112 87 107 121 104 79 97 113 103 98 129 77 118 123 122 98 88 86 107 82 83 44 60 55 122 81 132 102 93 85 53 116 57 64 44 129 109 110 66 54 111 131 69 61 59 99 139 49 73 41 65 72 48 135 134 113 137 92 70 91 114 63 110 101 97 69 109 49 78 116 139 128 81 74 49 72 127 128 65 117 53 137 53 60 122 41 94 96 106 130 98 120 104 130 108 87 52 76 125 114 90 110 123 106 81 98 115 105 100 131 80 119 126 125 100 90 89 109 83 85 46 62 58 124 83 133 104 94 87 54 118 58 66 45 131 112 111 68 56 113 132 71 63 61 102 141 50 76 43 66 73 50 139 138 116 141 94 71 93 118 65 112 104 98 70 111 52 79 120 140 131 82 75 50 73 130 131 66 120 55 138 54 61 124 43 96 97 108 133 100 122 105 132 110 89 53 78 128 117 93 112 126 108 83 99 119 106 102 135 81 124 129 127 101 91 91 110 85 86 48 63 60 126 85 137 105 95 88 57 122 60 67 46 133 114 114 69 58 116 134 72 64 63 104 142 54 77 44 68 74 51 141 140 118 142 96 73 94 119 67 113 105 100 72 112 54 80 123 142 132 84 76 51 74 131 132 68 122 57 139 56 64 125 45 97 98 109 135 102 123 106 133 111 90 55 79 129 119 94 114 128 109 85 102 121 107 104 136 82 125 130 129 104 92 92 112 87 88 50 65 62 127 87 139 106 96 90 58 124 62 69 47 134 116 115 71 59 117 135 75 68 66 105 143 55 79 45 69 77 53 145 143 119 146 98 75 95 120 69 116 108 102 74 113 55 82 124 144 134 85 77 53 76 133 134 70 124 59 141 58 66 128 46 99 100 111 137 103 126 107 135 112 91 57 80 131 121 96 116 129 113 87 104 123 111 106 138 84 127 132 130 105 94 94 114 88 90 52 67 64 130 88 141 109 97 92 61 125 63 72 49 136 118 117 74 60 120 137 76 69 68 106 147 56 81 46 70 79 54 147 144 122 148 99 76 97 124 70 118 110 103 76 117 56 83 125 146 135 87 79 54 77 134 135 71 125 60 143 59 68 130 48 100 102 113 139 104 127 109 136 115 92 58 83 132 122 97 118 131 115 89 105 124 112 108 140 85 128 134 132 106 96 96 116 90 92 53 68 65 131 90 143 111 98 93 62 126 65 74 50 137 120 120 75 62 121 138 78 71 70 108 150 57 82 47 72 81 56 148 146 123 149 101 79 98 125 71 120 111 104 78 118 57 84 128 148 140 88 81 55 79 135 137 72 126 61 147 62 70 131 49 103 105 114 140 107 129 112 142 116 93 60 84 133 124 99 120 134 117 90 106 126 113 109 141 86 132 138 136 109 97 97 118 91 94 55 69 66 132 92 145 112 99 96 63 130 67 76 52 143 121 121 77 63 122 144 81 72 71 110 152 59 83 48 73 82 58 149 147 124 151 102 81 100 126 73 121 112 106 80 120 59 85 129 149 141 89 83 56 81 136 139 75 128 63 148 64 71 132 50 104 107 116 141 108 130 113 143 118 95 62 87 134 125 100 121 135 118 92 107 127 116 110 142 87 133 139 137 110 99 98 120 92 95 57 71 68 133 94 146 114 102 98 65 131 69 77 54 144 122 122 79 66 123 145 83 74 73 112 154 61 84 50 76 85 61 151 149 126 153 104 82 101 128 74 122 114 108 81 121 62 89 130 151 143 92 85 58 82 138 141 77 130 66 150 66 73 134 51 105 108 117 143 110 131 115 144 120 97 64 89 137 127 102 122 136 120 94 109 129 118 112 145 90 134 140 139 111 100 99 121 93 96 59 72 69 135 95 147 116 103 99 67 132 70 78 55 145 124 124 81 67 125 147 84 77 75 114 155 64 87 52 78 87 62 152 151 128 154 105 84 104 129 76 123 116 109 82 123 64 90 132 154 145 93 87 60 84 141 143 79 131 68 153 68 74 135 52 107 109 119 145 111 133 118 146 122 99 66 91 139 129 104 124 137 121 96 111 131 120 113 146 91 135 142 140 113 102 100 122 95 99 60 73 71 137 97 148 117 105 100 69 134 71 80 56 148 126 125 83 69 128 149 85 78 76 116 156 66 89 53 80 89 63 154 153 129 155 108 87 105 130 77 125 117 111 83 125 65 92 133 155 146 94 89 61 86 142 144 80 133 70 154 69 75 137 53 110 111 120 147 113 135 119 147 124 100 68 93 141 130 106 126 139 122 97 112 132 121 114 148 93 137 144 142 114 104 101 124 97 101 61 75 72 138 99 149 119 106 103 72 136 73 82 58 149 128 127 85 71 129 150 89 79 77 118 157 67 90 55 81 90 65 156 154 131 158 109 88 108 132 80 127 119 112 84 126 66 93 136 157 147 97 90 63 88 143 145 82 134 72 156 72 78 139 55 112 114 124 149 115 136 122 149 125 101 70 94 142 133 108 128 141 124 98 113 134 123 115 151 95 138 145 144 117 107 103 126 99 103 62 78 76 140 100 152 121 110 105 74 137 76 83 60 150 130 129 86 74 131 151 90 81 79 120 160 68 91 57 83 91 66 158 155 132 159 111 89 109 133 82 129 120 113 86 129 67 95 137 158 148 98 91 64 90 146 148 83 136 74 157 73 80 140 57 114 116 126 150 118 137 123 150 127 102 72 95 144 135 110 130 143 125 99 114 136 124 116 153 97 140 147 145 120 108 104 128 101 104 64 79 77 141 102 154 123 111 106 75 139 78 84 62 152 131 130 88 75 133 154 92 84 82 122 162 69 93 59 85 93 67 160 157 134 162 114 90 110 136 83 131 122 115 89 131 69 97 140 160 150 101 93 65 92 147 149 84 137 76 159 74 82 142 59 116 118 128 152 119 139 125 152 130 105 73 97 145 137 112 132 145 126 101 116 139 125 118 154 99 143 148 147 122 109 106 130 103 106 66 81 78 143 104 155 124 113 107 78 142 80 85 63 153 134 132 89 77 135 156 94 85 83 124 163 71 95 60 87 95 69 162 158 135 163 116 92 111 137 85 133 124 116 91 132 71 99 141 163 152 102 95 67 93 149 150 87 138 78 161 75 84 143 61 118 120 130 153 122 140 127 153 131 106 74 98 146 138 114 133 147 128 102 118 140 127 119 155 100 144 149 148 124 110 107 132 105 108 68 84 79 144 105 157 125 115 109 80 143 82 89 64 155 135 134 90 78 137 158 96 87 86 126 164 72 97 62 89 97 71 164 160 137 166 117 94 114 139 88 135 126 119 92 133 73 101 144 165 154 103 96 68 95 151 153 89 141 79 163 77 86 145 63 120 121 131 154 124 143 129 156 132 107 76 100 148 141 116 134 148 131 103 121 142 129 123 156 102 146 151 149 125 112 108 134 106 109 69 86 81 147 107 159 128 117 111 82 145 83 91 65 157 137 136 92 80 139 160 97 90 88 128 167 74 98 64 91 99 73 165 161 140 168 120 97 115 142 90 137 127 121 95 135 75 103 146 167 156 105 98 69 97 153 154 92 144 80 166 79 88 147 64 122 123 133 156 125 145 131 158 134 110 78 102 149 142 118 136 151 132 105 122 143 130 125 157 104 149 155 153 127 114 111 136 108 110 70 87 83 148 109 160 129 118 113 84 147 85 93 67 159 138 139 95 81 141 162 99 92 90 130 170 77 99 65 94 101 74 167 163 142 169 121 99 118 144 92 139 129 122 96 137 77 104 148 169 157 106 100 70 98 155 156 93 145 81 168 81 90 148 66 124 125 134 157 126 147 132 160 135 112 79 103 151 144 120 139 153 134 106 123 145 132 126 158 105 150 156 154 128 117 113 138 109 113 72 89 85 149 111 161 130 119 115 86 149 87 95 68 162 141 140 97 83 143 163 101 93 91 131 172 78 101 67 95 102 76 169 164 145 171 123 101 119 146 93 141 131 124 98 140 79 106 150 172 159 109 102 72 100 156 157 94 147 83 170 83 92 150 68 125 126 137 159 128 148 135 162 139 113 80 106 154 147 121 141 154 135 107 125 149 134 128 160 108 153 157 156 130 118 114 140 110 114 73 92 86 152 113 162 132 120 117 88 152 90 96 71 164 143 143 98 85 145 165 103 95 93 133 173 81 104 69 96 104 78 171 168 146 173 124 104 121 147 96 143 132 125 99 141 80 107 153 173 160 112 104 75 101 158 160 98 149 85 171 85 93 152 70 127 128 138 162 129 150 136 164 140 114 82 107 156 148 122 142 156 136 108 126 151 135 130 164 110 155 158 157 131 119 116 142 113 115 74 94 88 153 114 166 133 122 118 89 154 92 100 73 166 145 144 102 86 146 168 105 96 94 135 175 82 105 70 97 106 80 173 169 148 174 125 106 122 149 98 144 133 127 101 145 81 110 154 175 162 113 106 76 103 159 162 100 150 86 172 86 95 153 71 129 130 141 164 132 152 139 166 143 115 84 111 157 149 124 146 159 137 113 129 152 136 131 166 111 157 161 160 133 121 117 143 114 117 76 96 89 155 116 168 134 123 120 90 155 94 102 75 168 147 145 103 88 148 169 108 98 96 137 176 84 108 71 99 109 82 175 171 149 176 128 108 126 150 100 145 134 129 103 146 83 111 155 176 164 115 107 77 105 162 163 101 151 87 175 87 96 156 72 130 132 143 165 133 154 140 168 144 117 85 112 160 153 126 147 160 138 114 131 154 137 132 168 113 158 163 161 134 124 118 144 116 118 78 98 91 158 117 169 135 128 122 92 157 96 103 76 169 149 147 104 90 151 171 110 100 98 138 177 86 109 73 102 111 83 177 173 151 178 129 109 127 153 101 147 136 131 105 148 84 112 158 180 169 117 108 80 106 164 165 102 155 89 179 89 98 157 74 131 133 145 167 134 156 141 171 147 119 86 116 162 154 127 149 164 140 117 133 156 139 135 170 115 162 167 165 135 125 120 145 118 121 80 100 93 159 119 171 138 130 123 93 160 98 104 78 173 151 148 105 91 152 175 112 101 99 139 180 88 111 75 103 114 84 179 175 153 180 131 111 129 154 102 148 138 133 108 149 86 114 159 182 171 119 110 81 109 166 168 103 156 91 180 90 100 159 76 132 135 146 170 136 157 142 173 148 122 87 118 163 155 129 151 166 143 119 134 158 141 137 171 117 163 169 168 137 126 123 147 121 123 82 101 94 161 121 172 139 131 124 95 162 99 106 79 174 153 150 108 93 154 176 114 104 102 141 181 89 113 77 106 116 86 180 176 154 182 132 113 130 155 103 149 140 134 109 152 88 116 162 183 173 120 112 83 111 167 169 104 157 93 181 92 101 160 78 134 137 147 172 139 158 143 175 150 124 88 119 165 157 130 154 167 146 121 135 160 144 139 173 118 164 172 170 141 128 125 148 122 125 83 102 96 163 122 175 142 132 127 96 163 101 107 81 176 155 151 110 94 156 177 115 106 104 142 183 90 114 78 107 117 ];\r\nm=reshape(m,[],50);\r\nv=rank_file(m);\r\nvexp=[74 80 83 84 88 89 93 98 100 101 102 104 105 109 112 114 116 117 119 121 123 125 127 130 131 133 135 136 138 139 140 145 147 148 151 153 155 156 157 159 162 164 165 167 170 171 173 177 178 180 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 6 1 1 6 2 3 2 4 5 7 7 3 6 7 2 2 7 3 4 3 5 6 8 8 4 7 8 3 3 8 4 5 4 6 7 9 9 5 8 9 4 4 9 5 6 5 7 8 10 10 6 9 10 5 5 10 6 7 6 8 9 11 11 7 10 11 6 6 11 7 8 7 9 10 12 12 8 11 12 7 7 12 8 9 8 10 11 13 13 9 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 8 9 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 13 4 2 9 3 1 5 14 8 6 10 7 2 9 15 12 10 11 11 3 13 16 16 14 12 15 4 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 4 6 4 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[6 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[33 55 94 119 106 74 42 176 132 15 170 135 242 282 134 264 186 180 333 193 308 23 38 212 62 213 111 204 70 19 152 214 233 262 15 258 220 252 232 153 46 127 330 189 55 86 297 196 86 55 85 118 131 114 81 53 199 158 23 173 142 294 306 162 326 224 205 355 218 322 26 57 233 93 266 129 257 98 26 165 245 271 305 19 284 248 299 286 163 72 138 342 247 66 104 314 225 103 60 93 141 166 156 116 60 222 171 33 197 185 319 317 188 350 238 208 374 232 351 53 85 253 110 294 161 280 129 55 189 264 284 346 42 307 283 332 299 188 87 158 372 269 108 154 336 236 117 87 123 164 198 170 126 85 244 192 38 224 201 340 357 200 376 253 229 399 263 370 72 109 297 133 328 177 308 142 57 222 317 338 365 46 342 331 353 335 223 109 191 386 286 124 169 367 280 133 93 126 186 206 203 129 108 260 224 55 279 216 369 392 244 408 307 300 440 283 425 85 123 305 142 350 201 318 183 66 268 339 372 394 55 377 358 380 365 227 124 216 435 316 126 186 412 285 136 110 129 204 225 222 155 116 271 231 74 301 228 395 410 266 418 308 307 471 289 432 93 133 314 155 365 207 350 188 81 278 340 382 404 62 406 375 401 380 247 126 226 446 327 142 204 424 298 156 125 136 210 242 235 162 117 285 262 86 309 253 401 432 271 456 337 324 477 298 462 95 137 331 156 381 225 352 196 103 292 349 411 435 68 413 388 423 391 263 133 245 473 346 161 217 437 318 167 129 186 227 270 263 188 141 293 309 94 365 281 471 454 330 511 398 374 514 323 488 98 142 350 204 455 245 433 227 118 352 353 415 504 70 438 402 483 465 290 164 287 494 412 183 242 464 325 196 154 201 242 284 284 204 161 301 319 111 386 296 490 468 332 523 415 394 517 335 513 104 169 371 207 456 256 443 245 129 371 380 427 520 86 461 421 510 474 299 177 288 514 440 186 256 480 338 217 156 206 263 300 300 222 166 341 337 119 400 312 500 480 348 543 442 419 535 345 525 114 170 377 225 476 284 469 270 131 394 383 461 536 106 478 439 519 478 334 198 324 529 451 203 284 490 347 235 158 216 287 324 312 226 185 344 347 135 413 336 545 506 364 573 461 441 554 368 541 138 191 404 228 503 288 500 281 142 412 408 471 571 127 495 446 564 521 342 201 336 543 475 216 296 522 380 245 171 227 309 337 334 231 188 372 350 153 438 347 568 524 382 600 462 450 597 379 559 158 192 421 247 523 319 519 290 163 433 440 496 599 132 507 456 589 538 350 223 342 584 494 224 299 547 398 262 188 260 330 348 341 266 222 399 372 176 467 364 580 542 399 620 510 487 603 413 563 162 200 456 271 530 332 523 293 199 442 465 499 611 134 511 489 608 546 382 244 344 591 513 244 301 559 431 271 189 283 352 394 345 278 232 442 379 193 489 412 584 582 413 644 532 493 633 451 610 165 222 499 289 571 371 549 323 218 451 515 550 643 152 571 527 622 583 433 263 368 623 543 268 335 592 476 292 197 285 365 400 347 301 236 467 398 196 508 413 602 583 431 655 533 518 646 489 618 173 224 511 298 583 386 571 325 225 476 520 566 654 170 574 539 623 590 438 280 380 643 560 279 338 617 508 309 208 305 374 419 377 307 253 487 421 212 511 441 641 605 456 699 537 529 682 493 650 205 229 529 314 619 394 601 350 233 499 533 585 684 180 594 563 660 635 450 297 404 661 579 300 371 625 518 324 238 339 398 442 383 308 264 510 440 214 520 461 666 625 465 707 544 533 692 532 658 224 253 537 340 635 415 608 353 245 515 544 595 699 186 617 581 670 653 462 317 408 668 594 307 380 644 533 337 269 358 412 451 439 327 283 513 456 220 539 475 671 659 489 726 581 563 744 543 705 247 286 579 375 643 440 637 402 248 527 594 637 724 189 646 617 684 670 494 331 446 726 617 316 421 684 560 346 280 372 433 469 461 350 284 523 496 233 566 500 677 680 499 760 595 585 752 549 715 257 308 601 382 663 443 645 415 271 550 608 645 740 204 669 637 696 673 519 338 471 748 637 318 427 707 571 352 294 377 455 476 478 365 307 530 507 258 574 503 699 690 511 785 617 594 783 571 734 266 328 619 406 676 456 669 438 284 571 635 663 742 213 676 643 705 684 523 342 495 773 646 350 461 727 583 381 299 392 465 478 480 380 317 546 524 282 583 521 718 707 542 797 625 605 812 583 751 286 335 635 410 690 474 680 454 306 582 653 673 760 232 684 670 721 707 538 357 506 795 659 365 468 749 590 391 319 412 471 500 490 395 336 580 547 297 617 545 768 718 559 821 644 625 836 584 779 294 340 641 424 727 490 707 464 314 592 666 677 807 242 699 671 792 749 568 367 522 816 684 369 480 768 602 401 332 425 483 519 525 401 351 608 559 308 618 564 779 721 563 830 658 650 844 622 796 299 353 660 432 734 510 715 488 322 610 670 696 827 252 705 684 796 751 589 370 541 837 705 380 513 792 623 423 346 435 504 536 529 404 372 611 584 330 643 571 816 760 591 864 668 661 852 643 827 305 365 684 446 773 520 748 494 342 623 699 740 847 262 742 724 837 795 599 386 543 847 726 394 514 807 654 435 350 440 511 543 535 418 374 620 597 333 646 573 836 797 603 884 692 682 884 644 830 326 376 699 471 783 523 752 514 355 633 707 760 852 264 785 726 844 812 600 399 554 864 744 408 517 821 655 456 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[68 95 125 137 161 162 167 210 225 242 253 263 285 298 318 331 349 388 411 413 432 437 462 473 477 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[10 2 1 4 1 8 4 3 7 9 5 7 8 10 6 9 3 2 6 11 3 2 5 2 9 5 4 8 10 6 8 9 11 7 10 4 3 7 12 4 3 6 3 10 6 5 9 11 7 9 10 12 8 11 5 4 8 13 5 4 7 4 11 7 6 10 12 8 10 11 13 9 12 6 5 9 14 6 5 8 5 12 8 7 11 13 9 11 12 14 10 13 7 6 10 15 7 6 9 6 13 9 8 12 14 10 12 13 15 11 14 8 7 11 16 8 7 10 7 14 10 9 13 15 11 13 14 16 12 15 9 8 12 17 9 8 11 8 15 11 10 14 16 12 14 15 17 13 16 10 9 13 18 10 9 12 9 16 12 11 15 17 13 15 16 18 14 17 11 10 14 19 11 10 13 10 17 13 12 16 18 14 16 17 19 15 18 12 11 15 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 9 10 11 12 13 14 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 22 2 22 222 22 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[22 222 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[47 37 13 3 25 53 39 5 32 41 12 4 36 20 9 16 28 41 8 26 49 49 34 23 52 2 2 21 27 19 46 6 51 14 31 17 23 33 24 19 18 44 11 44 13 29 20 32 40 48 39 15 6 28 56 43 7 39 42 14 6 42 23 10 18 31 44 9 32 50 51 37 29 54 4 3 28 33 24 47 9 53 17 36 20 25 40 31 21 21 45 14 45 15 34 26 36 41 53 47 16 9 32 62 47 11 40 52 16 7 44 26 13 21 33 49 13 38 55 57 44 34 59 6 5 33 39 28 54 11 58 21 37 22 29 42 36 22 25 52 15 53 18 35 30 41 50 56 49 20 10 35 64 50 13 44 56 18 9 49 27 16 22 37 51 16 39 57 61 47 37 61 9 8 35 42 29 60 13 60 23 41 24 31 47 38 24 28 53 17 58 20 40 32 46 53 58 52 22 14 38 68 53 16 48 57 19 14 52 28 17 23 41 54 18 45 59 64 50 41 65 12 11 38 47 30 62 15 63 26 45 27 33 49 43 25 29 57 19 59 21 42 35 49 54 62 58 24 15 40 70 56 18 49 62 22 15 54 29 20 25 43 57 20 47 64 66 55 43 69 13 13 41 49 34 64 16 66 29 47 32 34 50 44 26 33 59 21 63 24 44 36 53 59 68 61 29 17 41 79 59 21 52 63 23 18 56 34 22 31 45 62 23 48 71 72 58 45 76 14 16 43 51 39 69 21 73 31 48 35 37 54 46 33 36 65 26 66 25 46 40 54 62 69 64 32 20 43 80 61 22 54 68 25 21 58 38 24 35 48 65 24 53 72 74 62 47 78 17 19 46 54 41 72 22 75 33 51 36 40 55 50 36 37 68 27 70 26 50 42 59 65 73 67 33 21 46 82 64 25 56 72 28 23 61 40 27 36 51 66 28 54 75 77 65 50 79 18 20 47 56 42 74 26 77 34 54 38 41 57 53 37 40 71 29 73 29 52 44 60 69 76 69 34 24 49 86 67 28 61 75 33 25 64 42 31 39 54 70 29 57 77 80 68 52 83 19 23 51 59 45 78 29 80 37 59 40 45 62 54 41 41 72 30 76 34 56 48 62 70 79 70 36 26 51 89 70 30 63 77 38 28 67 44 35 40 57 71 32 60 82 84 69 56 88 20 25 53 63 49 81 32 85 41 61 43 48 64 59 42 46 73 35 78 40 59 51 67 71 82 81 41 28 53 93 74 33 66 86 41 31 72 47 37 43 59 77 35 67 84 95 78 62 90 21 28 59 70 54 92 33 87 45 64 48 51 69 65 46 51 79 38 89 43 62 57 75 84 83 84 43 29 56 94 77 34 68 88 42 34 75 50 40 45 62 79 37 69 87 97 81 64 93 23 29 62 71 56 95 35 88 46 67 50 52 72 66 47 52 80 41 90 44 64 59 76 87 87 86 44 31 59 97 81 36 70 92 45 36 78 53 41 46 65 82 38 72 90 98 82 67 95 24 31 64 73 59 96 37 93 48 69 51 54 74 69 50 54 85 43 94 47 66 61 79 89 89 87 47 32 60 102 83 38 75 94 48 39 79 54 44 48 67 85 39 75 91 102 86 68 99 26 32 66 78 61 99 40 96 52 72 54 57 78 70 53 56 87 45 96 49 69 63 83 92 92 91 49 33 63 105 84 39 78 96 49 40 82 56 47 51 70 88 42 78 93 105 89 72 102 27 33 69 80 62 102 42 97 54 73 55 59 80 74 54 57 90 47 97 50 71 64 86 93 94 95 51 35 66 106 86 40 81 99 52 42 83 58 49 52 73 90 45 79 97 108 92 75 103 30 36 72 82 64 103 44 99 56 77 58 60 82 78 56 61 93 48 100 54 74 67 88 98 96 97 53 36 67 108 89 41 83 102 53 43 88 60 50 54 75 93 46 83 100 111 93 77 105 32 39 74 84 67 104 47 103 59 79 61 62 86 81 59 64 94 49 103 56 76 70 89 100 99 98 55 37 69 111 93 44 86 104 54 44 92 65 51 58 78 96 47 85 102 113 96 79 106 34 41 77 88 70 109 49 105 62 82 65 68 89 82 62 66 97 50 107 57 81 71 93 101 102 100 58 39 70 112 97 47 87 106 57 45 95 67 53 61 81 98 49 87 105 115 97 80 111 37 44 79 90 72 110 52 108 65 86 68 69 91 85 64 71 100 52 108 59 84 73 94 104 105 102 59 41 71 115 100 50 92 109 58 48 98 69 56 62 84 101 53 89 108 117 99 83 113 40 47 82 92 76 113 53 109 68 89 69 70 93 87 65 73 104 54 112 62 87 79 96 105 109 105 62 42 77 118 102 52 94 111 59 50 99 72 57 63 86 104 56 91 111 118 102 87 116 41 49 84 93 77 114 55 112 71 92 72 75 96 90 68 75 106 57 113 64 88 82 100 108 112 108 63 45 78 120 103 53 96 112 63 53 100 73 60 66 89 107 58 96 113 119 105 88 119 44 51 87 97 80 118 58 116 73 94 75 76 97 93 70 77 108 59 116 66 90 85 103 109 113 111 64 47 81 122 104 54 99 116 65 54 103 74 61 69 92 109 60 99 114 121 106 93 120 46 52 90 102 83 120 59 118 76 96 78 78 102 95 72 79 110 62 119 69 95 88 105 113 117 112 66 51 84 124 111 57 102 118 68 56 108 77 64 72 95 113 61 102 118 124 111 94 121 49 53 93 105 86 122 62 119 79 98 80 80 105 97 74 82 115 64 120 70 97 89 108 115 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[30 35 40 45 48 51 52 56 58 60 66 73 74 77 81 82 83 86 90 93 94 97 99 103 106 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[35 23 18 30 62 42 46 10 64 1 4 47 35 51 49 2 14 57 4 17 38 8 33 43 24 27 5 43 33 1 28 6 34 12 25 34 47 21 39 13 32 57 53 17 37 41 21 60 36 38 26 20 32 65 44 47 14 69 2 5 51 40 53 51 5 15 58 6 19 43 10 35 47 28 31 10 46 35 4 32 13 36 13 28 38 48 23 45 18 33 60 57 18 44 46 25 64 41 47 28 22 37 70 50 57 18 71 4 6 58 46 62 70 10 18 74 12 20 48 12 40 62 31 34 15 54 40 8 33 17 43 14 31 44 66 24 56 19 36 66 64 22 52 60 27 69 49 49 30 32 42 81 56 61 20 85 5 10 65 49 68 73 13 19 79 14 28 52 15 43 63 35 38 17 57 43 12 36 18 46 17 35 45 68 25 59 24 39 73 70 24 55 62 33 77 50 52 32 33 43 84 58 65 24 87 6 13 67 51 69 74 15 21 80 18 31 56 17 46 68 39 40 19 62 47 14 41 21 51 18 37 47 72 28 62 28 45 74 72 26 59 64 35 80 56 56 34 40 48 87 62 66 30 90 10 14 68 52 73 78 18 24 82 22 37 57 18 50 71 42 46 24 64 50 17 47 26 52 20 44 51 76 33 63 34 49 76 74 30 61 68 43 81 58 59 40 42 53 89 65 71 33 92 13 18 72 58 75 81 23 28 87 24 38 61 19 55 72 44 50 25 68 55 21 51 28 58 24 46 57 79 37 66 37 53 81 79 34 65 69 45 83 60 63 43 46 54 92 71 76 34 95 17 19 77 63 80 83 26 31 89 28 43 67 20 57 74 47 52 30 72 58 23 54 32 60 28 53 60 81 38 70 40 55 82 81 37 67 73 50 84 64 70 46 50 55 96 73 79 42 100 18 20 83 65 87 89 28 33 93 31 47 70 22 60 81 50 53 35 75 64 24 58 39 68 32 57 63 85 42 77 44 61 92 89 40 75 80 54 95 74 72 50 53 58 98 76 81 46 103 21 25 87 67 89 90 31 35 100 34 52 71 27 63 84 54 55 38 79 68 27 63 40 69 33 59 66 89 45 79 50 64 94 90 43 77 81 55 97 75 76 53 55 60 102 78 85 48 104 25 28 88 71 91 95 32 37 101 37 54 73 31 66 87 57 59 42 82 72 30 67 43 74 35 60 67 93 46 83 53 68 99 95 44 81 84 58 101 77 81 54 60 67 108 83 90 50 112 28 32 92 76 96 103 35 41 106 40 57 80 33 70 97 58 63 43 86 76 33 70 46 80 36 66 74 100 51 93 55 72 101 97 47 89 95 63 105 85 84 55 63 68 112 85 94 51 115 32 33 96 79 100 106 38 45 109 44 60 83 36 72 101 61 64 45 88 79 34 74 47 83 39 67 77 104 53 96 57 77 103 102 49 91 100 66 108 86 88 58 65 72 116 86 98 52 120 33 35 101 83 103 111 40 47 115 46 63 85 40 76 104 64 68 49 91 83 35 76 51 86 43 71 79 107 55 99 58 79 109 107 50 95 103 67 110 90 89 60 70 74 120 88 99 57 123 34 36 104 86 106 113 43 51 122 48 67 87 43 80 107 68 69 52 92 85 38 80 56 87 46 73 83 109 58 102 61 83 111 108 52 99 104 71 115 93 90 63 73 76 122 90 103 62 126 35 38 107 88 110 116 44 52 126 50 71 89 47 81 111 70 72 56 96 86 42 83 58 88 49 78 84 112 59 104 65 85 114 111 56 102 106 76 116 95 96 64 75 77 126 95 107 64 127 36 41 108 90 111 123 46 56 130 54 72 93 49 85 115 74 75 57 97 91 43 86 62 92 50 82 86 119 60 108 68 88 115 113 58 103 112 79 120 97 103 67 79 81 128 102 111 66 130 37 44 112 95 116 124 47 59 133 57 76 99 52 89 119 75 77 61 103 98 46 90 65 99 55 85 91 122 65 113 71 94 121 119 61 111 117 81 122 107 107 70 83 83 129 104 113 68 133 39 45 115 99 117 127 51 62 134 58 77 102 56 93 120 77 79 65 108 101 47 92 67 104 59 88 96 125 66 115 72 96 125 122 63 112 119 87 126 108 110 73 87 84 132 106 117 73 134 41 46 119 103 120 130 53 64 136 62 80 104 60 95 123 80 81 68 112 103 51 96 69 106 62 91 100 128 69 117 75 100 127 125 68 116 120 89 129 111 111 74 89 87 137 111 119 74 140 43 47 120 104 123 132 57 68 137 64 81 107 62 97 127 81 84 70 115 107 53 97 72 108 63 95 101 129 72 122 79 102 131 127 71 119 125 90 135 113 114 81 92 93 140 112 122 76 143 47 48 125 107 128 134 60 72 140 66 82 109 66 100 131 85 89 73 119 109 57 101 74 111 68 99 104 132 79 125 81 103 132 129 76 121 127 94 137 115 116 83 95 95 142 116 124 81 145 49 51 127 111 130 139 64 74 144 69 84 113 70 103 135 89 90 77 123 110 60 105 80 115 73 101 106 137 81 126 83 108 134 132 78 122 129 97 139 120 122 86 96 97 146 122 127 87 150 53 56 131 114 132 142 65 77 147 70 92 118 72 105 137 92 96 81 124 116 62 108 84 120 76 102 107 140 84 129 89 112 136 134 79 128 132 98 143 126 126 89 100 101 147 126 133 90 153 57 58 134 115 136 145 69 80 153 71 95 122 74 106 140 93 100 85 130 120 64 112 87 123 79 104 109 143 87 133 92 115 140 137 82 130 134 103 144 127 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[53 56 72 76 77 79 84 86 92 96 97 105 107 114 118 122 124 127 131 132 134 136 143 146 150 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 2 22 222 22 222 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 22 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 3 1 1 6 4 4 4 5 2 2 8 6 5 6 8 3 4 9 8 6 8 9 5 6 12 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 10 12 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 13 4 10 8 1 5 6 2 8 3 7 10 15 18 5 14 11 2 8 7 4 11 4 9 12 19 21 10 17 15 5 10 11 5 12 8 13 18 22 25 12 20 19 8 11 15 7 15 11 17 20 25 28 17 23 25 10 13 20 9 17 14 23 27 28 30 19 25 28 11 15 22 11 19 15 25 29 29 32 21 27 30 13 18 25 12 20 18 28 32 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[1 3 4 6 7 8 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 91 7 1 11 31 51 4 9 8 21 5 61 71 3 1 41 81 10 16 92 17 11 12 32 52 14 19 18 22 15 62 72 13 2 42 82 20 26 93 27 21 13 33 53 24 29 28 23 25 63 73 23 3 43 83 30 36 94 37 31 14 34 54 34 39 38 24 35 64 74 33 4 44 84 40 46 95 47 41 15 35 55 44 49 48 25 45 65 75 43 5 45 85 50 56 96 57 51 16 36 56 54 59 58 26 55 66 76 53 6 46 86 60 66 97 67 61 17 37 57 64 69 68 27 65 67 77 63 7 47 87 70 76 98 77 71 18 38 58 74 79 78 28 75 68 78 73 8 48 88 80 86 99 87 81 19 39 59 84 89 88 29 85 69 79 83 9 49 89 90 96 100 97 91 20 40 60 94 99 98 30 95 70 80 93 10 50 90 100 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[2 12 22 32 42 52 62 72 82 92 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[13 5 11 6 15 2 9 12 9 2 4 6 14 3 10 8 4 8 10 18 7 16 9 19 4 12 16 12 3 6 7 18 5 14 10 5 11 14 20 10 17 11 21 6 13 18 13 4 9 9 19 7 16 12 6 12 16 22 13 20 14 24 8 14 20 17 5 12 10 21 10 18 13 7 16 19 23 14 22 15 25 9 15 21 18 6 13 11 22 12 19 14 9 17 20 25 18 23 19 26 10 17 25 22 8 16 12 26 14 20 16 11 20 23 26 20 25 22 27 11 18 28 25 9 17 13 29 16 22 17 12 23 26 27 22 26 23 28 13 20 30 26 10 20 16 32 18 23 19 14 25 27 30 24 28 25 32 15 21 32 27 12 21 18 33 19 25 20 16 26 28 32 26 29 28 33 16 22 34 31 14 22 19 36 21 26 21 18 29 32 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[16 21 22 26 28 29 31 32 34 36 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[21 36 28 46 26 29 18 38 8 32 49 12 35 15 42 41 4 5 19 41 10 17 36 13 49 32 23 1 9 51 2 13 34 22 53 45 52 5 26 42 7 39 18 1 27 28 40 32 56 30 34 21 42 17 36 60 13 43 20 52 43 11 9 26 49 18 19 44 19 54 36 29 5 11 57 9 14 40 25 64 53 59 13 27 47 15 46 23 2 29 30 41 38 61 37 38 28 46 20 40 64 15 44 26 55 50 14 11 28 52 21 20 46 22 57 42 33 9 14 61 11 18 43 31 67 59 64 15 32 51 17 47 25 4 34 33 43 40 64 39 41 32 49 25 41 68 18 50 30 61 53 15 13 30 57 27 24 54 29 64 46 34 12 15 66 13 22 49 36 70 63 69 18 37 57 21 56 29 5 38 39 58 52 74 43 44 42 60 28 54 76 21 55 38 66 61 18 15 36 64 32 29 57 36 68 49 41 13 17 69 14 26 53 46 80 70 72 22 47 63 26 60 32 7 48 43 59 57 78 48 52 46 61 33 58 82 25 56 41 71 65 20 17 37 67 35 33 58 38 72 54 46 17 20 74 19 28 55 50 84 74 75 24 54 66 29 64 36 8 56 45 65 61 79 50 54 47 68 36 63 85 27 59 42 74 71 25 18 40 71 38 35 61 41 77 56 48 18 21 81 23 32 57 53 88 77 83 29 58 72 32 68 38 10 60 47 69 65 82 53 55 51 70 37 68 88 29 63 48 80 72 28 19 45 76 40 38 66 45 79 59 50 19 22 84 26 36 62 54 92 81 86 30 61 76 36 72 41 13 64 51 76 69 91 57 60 52 80 43 72 95 30 69 51 84 84 30 20 48 78 45 41 73 47 92 64 54 21 26 94 28 38 66 58 99 87 98 33 64 88 39 74 42 15 68 52 80 72 93 61 64 58 81 46 75 99 32 71 54 88 87 33 21 51 83 48 46 77 50 94 67 58 23 28 95 29 42 70 61 101 89 100 34 65 90 41 79 47 18 71 58 83 77 95 65 68 61 86 48 80 102 36 78 57 90 89 37 25 54 86 50 50 80 53 97 72 61 26 31 98 30 46 75 65 103 92 104 39 67 91 43 81 53 22 75 64 85 80 97 67 70 64 87 52 83 106 37 81 60 92 93 38 27 61 90 54 54 85 55 101 75 65 29 32 105 34 47 79 68 107 95 106 41 70 95 44 89 58 26 77 68 89 84 100 75 77 67 90 54 85 107 38 84 64 96 97 42 29 64 95 56 56 88 59 104 79 71 32 34 106 36 48 83 72 108 99 109 46 75 99 49 91 60 27 79 69 91 86 104 77 80 70 94 55 88 109 40 89 66 100 99 43 32 65 99 57 57 92 62 108 84 72 34 38 109 40 52 86 75 112 102 111 49 79 102 53 95 61 28 83 72 92 89 110 80 83 71 95 56 90 112 41 90 69 107 103 44 36 68 103 59 58 94 63 110 85 75 35 40 112 43 54 88 78 116 108 116 50 81 104 55 97 63 32 84 76 95 92 116 83 85 77 97 58 94 119 43 92 73 111 104 46 40 69 104 61 59 95 66 111 89 80 36 41 115 44 58 91 80 120 114 117 54 85 106 57 100 65 36 88 80 100 95 119 86 87 79 103 64 97 123 49 95 74 114 108 47 42 70 108 68 61 97 72 113 90 81 39 46 116 46 60 94 81 124 115 120 56 89 110 60 103 68 38 91 84 104 99 121 89 93 83 108 67 103 124 53 103 78 115 111 52 43 72 111 71 65 104 76 117 97 87 41 50 118 49 61 99 86 126 118 121 57 90 113 64 108 71 41 95 88 111 100 126 91 95 88 114 71 107 130 57 104 84 119 115 55 47 76 113 74 66 106 80 127 99 90 42 51 129 52 63 102 90 131 123 132 61 92 119 66 110 72 42 96 89 114 102 130 94 99 89 115 74 108 132 60 105 87 123 118 59 51 78 114 77 70 107 81 131 102 93 45 53 134 53 66 103 92 135 126 136 63 95 123 70 111 76 45 99 92 116 104 134 97 101 93 119 78 110 137 64 110 91 127 121 61 54 79 117 79 72 111 82 134 104 94 46 57 135 56 68 108 95 139 131 137 64 97 126 74 113 77 49 100 94 119 109 135 98 105 99 123 82 112 140 66 112 95 129 124 64 57 84 118 85 74 115 88 137 106 95 49 61 140 60 69 109 102 144 134 142 68 106 130 76 116 81 51 107 98 120 112 137 104 106 101 124 84 116 142 69 116 99 132 126 67 59 86 121 88 75 117 92 139 109 100 53 64 144 64 72 111 103 148 136 148 70 107 131 80 120 83 52 108 ];\r\nm=reshape(m,[],23);\r\nv=rank_file(m);\r\nvexp=[45 51 53 60 66 70 76 78 89 93 94 99 102 103 105 107 111 114 123 126 130 132 135 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[31 35 11 33 31 40 8 22 42 6 32 18 21 44 32 30 3 28 8 7 40 15 15 18 12 43 38 25 30 38 19 3 9 19 25 35 27 12 5 34 6 10 47 35 43 16 40 36 47 13 23 49 11 38 21 26 49 37 33 5 33 12 11 43 20 19 21 18 46 44 27 34 40 23 6 15 22 32 39 30 17 8 42 8 13 52 40 51 21 45 41 56 15 33 59 12 43 28 31 52 41 38 6 36 15 12 49 23 26 25 24 51 54 36 38 46 28 7 16 30 34 44 37 19 11 48 11 18 54 44 55 24 51 48 60 18 36 63 15 50 32 33 55 46 45 8 38 18 15 51 24 30 26 27 53 57 39 41 50 30 8 19 35 37 47 42 20 12 52 13 19 58 46 57 26 55 50 61 19 38 66 18 52 35 36 59 48 48 9 40 19 16 54 25 32 29 29 56 60 40 43 53 32 10 21 36 39 49 44 24 13 56 15 21 60 50 62 29 58 52 64 24 40 68 21 54 38 39 64 53 49 12 46 20 19 59 31 34 34 32 62 63 43 47 58 35 11 26 39 44 56 45 29 16 59 17 24 67 53 64 31 59 55 67 27 44 70 24 57 40 42 68 56 50 15 49 24 23 63 34 37 36 34 66 65 46 52 61 39 12 29 41 47 59 47 32 18 60 20 25 71 56 69 34 64 58 71 30 49 74 26 61 43 45 71 57 55 18 53 26 25 67 37 40 40 36 68 70 52 55 64 43 15 32 46 50 60 54 34 19 66 21 29 74 59 72 35 65 60 78 32 52 79 28 63 45 48 75 61 58 19 54 30 28 69 40 43 43 39 72 75 53 56 65 45 18 35 48 51 63 56 38 21 69 23 32 77 62 73 39 67 63 79 35 55 82 30 65 48 50 77 63 60 21 57 33 31 72 41 45 46 42 75 76 56 59 68 48 19 36 50 53 64 58 39 22 70 26 36 80 65 75 42 69 65 80 36 58 83 33 68 50 55 80 68 64 24 61 34 32 77 44 46 49 45 79 78 61 62 74 52 22 38 51 60 71 62 40 23 73 29 37 82 68 79 44 76 72 82 39 60 86 36 74 51 56 85 71 69 25 65 37 34 80 46 50 52 47 82 81 63 67 77 53 25 40 53 63 73 66 43 27 78 32 39 87 72 81 46 78 75 85 42 61 88 37 77 54 58 88 74 71 28 67 38 36 83 47 53 54 49 85 84 65 69 80 56 27 44 57 66 76 67 45 30 80 33 40 91 73 83 47 81 78 87 45 62 90 38 80 56 60 89 76 72 30 71 41 38 85 50 55 55 52 87 85 67 72 83 58 30 48 59 69 77 69 49 33 82 34 43 93 80 87 50 83 80 89 48 65 91 41 82 59 63 91 81 73 31 75 44 40 87 55 56 58 53 89 88 68 78 85 60 31 50 62 72 84 72 52 36 85 35 46 95 82 89 53 85 81 95 50 68 98 43 84 61 65 94 84 76 32 77 46 41 88 57 57 61 56 90 92 71 80 86 63 32 52 63 74 85 74 54 38 86 37 48 98 83 90 56 87 84 97 51 71 99 45 85 63 67 96 85 77 35 78 47 44 91 59 60 64 59 92 94 73 81 89 65 33 55 64 76 87 76 58 40 88 39 49 100 85 94 58 89 85 100 52 74 101 48 86 65 70 99 86 83 38 80 50 46 95 60 64 66 61 97 96 77 82 92 69 34 56 68 78 88 80 59 42 92 40 53 101 87 97 59 91 87 103 55 77 105 51 88 69 73 101 89 85 40 81 51 49 97 64 67 69 63 98 99 80 83 94 72 35 57 72 79 90 83 62 43 95 43 54 103 88 98 62 92 89 105 57 79 107 54 90 72 76 103 92 87 43 84 53 51 99 65 68 70 66 102 102 82 85 96 75 38 60 75 81 94 85 63 44 97 46 56 104 89 101 64 96 91 107 60 80 110 56 94 75 79 107 95 89 44 85 55 52 103 67 71 71 68 105 103 85 87 100 78 40 61 77 82 97 88 64 47 99 49 59 108 91 103 67 100 95 108 63 82 113 59 98 77 82 110 98 93 47 88 58 54 105 70 74 74 71 107 104 87 90 101 79 42 66 80 86 99 91 68 49 101 52 60 113 ];\r\nm=reshape(m,[],22);\r\nv=rank_file(m);\r\nvexp=[24 29 32 34 37 42 45 46 50 51 58 61 62 64 65 68 69 73 75 78 80 83 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 3 2 2 3 1 1 5 4 3 3 4 2 2 6 5 4 4 5 3 3 7 6 5 5 6 4 4 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[63 48 125 24 41 119 35 111 61 70 49 24 86 115 102 136 35 60 133 51 131 86 128 51 49 93 118 111 162 41 94 157 86 156 94 139 60 61 119 131 129 191 46 119 176 93 166 105 153 82 86 125 192 189 212 48 156 204 131 189 111 203 102 111 129 209 204 237 63 157 209 133 192 118 224 115 119 131 237 212 244 70 162 224 136 203 139 244 128 125 153 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[46 82 105 125 166 176 191 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 7 6 6 3 8 5 47 9 2 9 46 8 5 1 3 7 2 12 2 15 14 14 11 16 13 48 17 10 17 49 16 13 2 11 15 10 19 3 22 21 21 18 23 20 51 24 11 24 50 23 20 3 18 22 11 25 4 28 27 27 19 29 26 53 30 12 30 52 29 26 4 19 28 12 26 5 33 32 32 20 34 31 55 35 13 35 54 34 31 5 20 33 13 27 6 37 36 36 21 38 32 56 39 14 39 57 38 32 6 21 37 14 28 7 40 37 37 22 41 33 58 42 15 42 59 41 33 7 22 40 15 29 8 41 38 38 23 43 34 61 44 16 44 60 43 34 8 23 41 16 30 9 42 39 39 24 44 35 63 45 17 45 62 44 35 9 24 42 17 52 47 58 57 56 51 61 55 64 62 48 63 64 60 54 46 50 59 49 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[4 12 19 25 26 27 28 29 30 53 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 45 10 81 36 76 2 44 40 117 103 90 2 101 65 65 86 35 87 24 79 24 102 40 98 10 61 52 168 137 120 22 144 84 98 127 43 134 43 96 40 132 54 108 35 74 74 179 161 136 36 147 99 121 137 54 144 61 113 52 169 74 141 44 92 92 188 208 142 40 157 119 144 184 74 186 79 137 73 174 96 159 45 97 113 213 230 168 53 191 151 168 199 88 216 84 168 98 205 99 201 65 144 119 236 236 211 65 222 190 190 206 121 217 98 174 102 208 108 208 76 169 141 267 246 235 81 260 205 201 224 132 229 120 199 127 235 136 224 90 184 142 274 267 259 86 268 206 211 259 137 265 144 216 134 260 147 229 101 186 157 281 294 265 87 272 217 222 268 144 272 168 230 137 267 179 246 117 208 188 302 302 267 103 294 236 236 274 161 281 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[53 73 88 97 137 151 159 168 191 213 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[27 24 23 31 11 19 34 3 21 21 30 3 26 36 7 29 4 9 26 22 12 19 15 6 16 36 31 27 44 15 23 38 4 25 24 40 6 31 39 12 34 10 12 32 27 15 21 17 10 18 40 33 31 48 16 27 44 7 27 28 44 9 35 45 15 38 12 15 35 30 16 25 20 12 22 43 37 32 50 20 29 46 11 29 32 47 12 37 50 16 41 15 16 41 33 20 28 24 15 23 47 40 39 51 23 32 48 15 36 34 50 16 40 54 22 44 18 20 42 36 24 32 28 17 28 49 43 40 53 28 34 54 19 39 37 51 19 42 55 25 46 21 27 45 39 29 34 32 23 32 51 44 43 55 29 39 56 21 40 40 53 21 47 58 27 51 25 28 48 41 32 37 36 24 34 53 45 44 58 32 40 62 22 41 43 55 23 51 64 31 55 27 30 50 44 33 39 39 27 36 60 53 45 64 37 42 66 24 44 47 61 26 53 68 35 56 31 33 56 51 37 43 40 31 40 61 56 50 67 41 46 68 26 48 51 63 29 56 72 38 57 34 35 57 55 41 45 44 32 42 62 60 53 68 43 50 72 27 51 54 66 30 60 74 40 61 37 40 61 59 43 49 45 36 47 72 66 55 79 46 54 75 30 53 56 75 34 61 79 44 63 38 44 68 62 47 51 48 40 50 74 68 58 82 50 55 79 31 55 58 79 36 64 82 45 67 39 48 72 64 50 53 54 44 51 ];\r\nm=reshape(m,[],13);\r\nv=rank_file(m);\r\nvexp=[30 37 40 43 45 50 54 59 60 61 62 66 68 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 1 1 3 3 3 2 2 4 4 4 3 3 5 5 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[2 3 4 ];\r\nassert(isequal(vexp,v))\r\ntoc","published":true,"deleted":false,"likes_count":1,"comments_count":4,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":"2016-04-18T04:38:58.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-04-18T04:31:44.000Z","updated_at":"2016-04-18T04:40:54.000Z","published_at":"2016-04-18T04:36:07.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/4304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rd1A 2016 Rank and File\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 26 large cases with max N=50.\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 is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\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 [M], matrix of size [2*N-1,N] of all rows and columns of H except one\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 [V], the missing vector of H not included in M\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 [M] [V]\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 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \\n[22 222;2 22;2 22][22 222]]]\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:t\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution. \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=\\\"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rank_file solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":42805,"title":"GJam 2016 Rd1A: Rank and File (small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/4304486/dashboard#s=p1 GJam Rd1A 2016 Rank and File\u003e. This is the small case with max N=10\r\n\r\nThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip. \r\n\r\n*Input:* [M], matrix of size [2*N-1,N] of all rows and columns of H except one\r\n\r\n*Output:* [V], the missing vector of H not included in M\r\n\r\n*Examples:* [M] [V] \r\n\r\n  [1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n  [22 222;2 22;2 22][22 222] \r\n \r\nGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\r\n\r\n*Theory:* With max N=10 it is possible to brute force the 50 puzzles. Persistent may be useful with the usage of nchoosek which may be the critical path. \u003chttps://www.go-hero.net/jam/16/solutions/1/2/MATLAB GJam Rank_file solutions\u003e. Writing the general solution for N=50 is better for the contest. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/4304486/dashboard#s=p1\"\u003eGJam Rd1A 2016 Rank and File\u003c/a\u003e. This is the small case with max N=10\u003c/p\u003e\u003cp\u003eThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], matrix of size [2*N-1,N] of all rows and columns of H except one\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the missing vector of H not included in M\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [M] [V]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n[22 222;2 22;2 22][22 222] \r\n\u003c/pre\u003e\u003cp\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e With max N=10 it is possible to brute force the 50 puzzles. Persistent may be useful with the usage of nchoosek which may be the critical path. \u003ca href = \"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\"\u003eGJam Rank_file solutions\u003c/a\u003e. Writing the general solution for N=50 is better for the contest. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.\u003c/p\u003e","function_template":"function v = rank_file(m)\r\n% H a rank/file array that has all columns and rows increasing\r\n% m  matrix [2*N-1,N] of scrambled rows/columns original H [NxN] array\r\n% v  missing vector of H\r\n v=0;\r\nend","test_suite":"%%\r\ntic\r\nm=[1 2 3 2 1 2 3 5 3 2 3 5 6 4 3 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 2 2 222 22 22 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[22 222 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 3 6 9 10 6 3 14 6 7 11 11 7 6 16 9 11 15 19 10 8 22 11 14 19 22 11 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[8 10 15 16 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 23 6 3 1 6 2 5 5 2 22 4 9 2 25 11 8 2 11 7 10 10 7 24 9 13 3 26 15 12 3 15 8 14 14 8 27 13 16 4 29 18 13 4 18 9 17 17 9 28 16 17 5 30 20 14 5 20 10 19 19 10 31 17 18 6 32 21 15 6 21 11 20 20 11 33 18 28 23 34 33 27 22 32 24 31 30 25 34 29 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[3 8 12 13 14 15 26 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 5 3 8 6 9 46 1 2 7 8 2 3 4 1 9 47 6 5 15 13 11 16 14 17 49 2 10 15 16 10 11 12 2 17 48 14 13 22 20 18 23 21 24 50 3 11 22 23 11 18 19 3 24 51 21 20 28 26 19 29 27 30 52 4 12 28 29 12 19 25 4 30 53 27 26 33 31 20 34 32 35 54 5 13 33 34 13 20 26 5 35 55 32 31 37 32 21 38 36 39 57 6 14 37 38 14 21 27 6 39 56 36 32 40 33 22 41 37 42 59 7 15 40 41 15 22 28 7 42 58 37 33 41 34 23 43 38 44 60 8 16 41 43 16 23 29 8 44 61 38 34 42 35 24 44 39 45 62 9 17 42 44 17 24 30 9 45 63 39 35 58 55 50 61 57 62 64 47 48 59 60 49 51 52 46 63 64 56 54 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[4 12 19 25 26 27 28 29 30 53 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 2 22 222 22 222 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 22 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 6 6 4 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[4 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 3 10 9 4 8 9 6 2 6 8 4 13 11 11 4 6 14 11 6 10 13 10 3 7 12 8 15 12 15 6 7 17 12 8 11 15 11 4 9 14 9 16 14 18 8 10 18 14 10 12 17 12 6 11 15 11 17 15 20 9 11 20 16 12 15 19 14 8 14 16 12 19 18 21 11 12 22 19 13 17 20 15 9 15 18 14 21 20 24 13 15 24 20 14 18 21 17 10 17 19 16 24 22 26 14 17 25 21 15 20 23 20 11 18 22 19 26 24 28 ];\r\nm=reshape(m,[],8);\r\nv=rank_file(m);\r\nvexp=[14 17 19 20 22 23 25 28 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 6 4 6 8 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 6 1 1 4 3 2 4 8 2 2 6 5 4 5 9 3 4 8 8 6 6 12 5 6 10 9 8 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 10 12 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 4 10 9 1 8 3 2 2 4 1 6 6 9 3 5 10 7 7 9 5 11 10 2 9 4 3 3 5 2 7 7 10 4 6 11 8 8 10 6 12 11 3 10 5 4 4 6 3 8 8 11 5 7 12 9 9 11 7 13 12 4 11 6 5 5 7 4 9 9 12 6 8 13 10 10 12 8 14 13 5 12 7 6 6 8 5 10 10 13 7 9 14 11 11 13 9 15 14 6 13 8 7 7 9 6 11 11 14 8 10 15 12 12 14 10 16 15 7 14 9 8 8 10 7 12 12 15 9 11 16 13 13 15 11 17 16 8 15 10 9 9 11 8 13 13 16 10 12 17 14 14 16 12 18 17 9 16 11 10 10 12 9 14 14 17 11 13 18 15 15 17 13 19 18 10 17 12 11 11 13 10 15 15 18 12 14 19 16 16 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 9 10 11 12 13 14 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 5 7 2 9 7 8 4 4 4 7 9 4 11 8 9 6 6 5 8 10 5 12 9 11 7 7 7 10 12 7 13 12 14 9 8 8 12 14 9 16 13 16 11 9 ];\r\nm=reshape(m,[],5);\r\nv=rank_file(m);\r\nvexp=[5 7 8 9 11 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 29 22 3 15 36 43 4 2 6 1 8 1 14 30 23 10 16 37 44 11 9 13 8 9 2 21 31 24 17 17 38 45 18 16 20 15 10 3 28 32 25 24 18 39 46 25 23 27 22 11 4 35 33 26 31 19 40 47 32 30 34 29 12 5 42 34 27 38 20 41 48 39 37 41 36 13 6 49 35 28 45 21 42 49 46 44 48 43 14 7 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[5 12 19 26 33 40 47 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 1 1 3 2 2 4 4 2 2 4 3 3 5 5 3 3 5 4 4 6 6 4 4 6 5 5 7 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 6 7 2 1 4 5 3 2 7 3 1 5 7 7 8 3 2 5 6 4 3 8 4 2 6 8 8 9 4 3 6 7 5 4 9 5 3 7 9 9 10 5 4 7 8 6 5 10 6 4 8 10 10 11 6 5 8 9 7 6 11 7 5 9 11 11 12 7 6 9 10 8 7 12 8 6 10 12 12 13 8 7 10 11 9 8 13 9 7 11 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 8 9 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 5 71 8 81 9 1 91 11 7 1 21 41 10 6 51 31 61 4 13 15 72 18 82 19 2 92 12 17 11 22 42 20 16 52 32 62 14 23 25 73 28 83 29 3 93 13 27 21 23 43 30 26 53 33 63 24 33 35 74 38 84 39 4 94 14 37 31 24 44 40 36 54 34 64 34 43 45 75 48 85 49 5 95 15 47 41 25 45 50 46 55 35 65 44 53 55 76 58 86 59 6 96 16 57 51 26 46 60 56 56 36 66 54 63 65 77 68 87 69 7 97 17 67 61 27 47 70 66 57 37 67 64 73 75 78 78 88 79 8 98 18 77 71 28 48 80 76 58 38 68 74 83 85 79 88 89 89 9 99 19 87 81 29 49 90 86 59 39 69 84 93 95 80 98 90 99 10 100 20 97 91 30 50 100 96 60 40 70 94 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[2 12 22 32 42 52 62 72 82 92 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 7 3 8 1 1 2 4 10 5 9 2 2 4 5 12 6 11 3 3 5 9 13 12 13 8 7 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[3 5 6 11 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 2 3 3 1 2 3 4 4 2 3 4 5 5 3 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[2 3 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 7 6 3 1 1 3 10 9 7 6 3 3 6 13 12 9 7 6 6 8 14 14 12 10 7 7 9 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[6 8 9 13 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[13 3 1 1 9 2 4 14 7 5 2 10 6 8 15 11 9 3 11 10 12 16 15 13 4 12 14 16 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 15 14 4 8 13 12 10 2 3 6 4 2 5 10 11 6 9 8 12 19 18 6 10 18 16 14 4 5 7 5 3 7 14 16 9 12 11 13 21 19 9 12 20 18 16 6 7 9 6 4 10 16 17 11 13 12 17 24 21 12 13 22 20 19 8 10 10 7 5 13 18 20 14 14 16 18 25 22 13 14 23 21 20 9 12 11 9 6 14 19 22 15 15 17 22 26 26 16 16 25 25 23 10 14 12 11 8 18 20 23 19 17 20 25 27 29 17 17 26 28 26 11 16 13 12 9 20 22 25 22 18 23 26 28 32 20 19 27 30 27 13 18 16 14 10 22 23 26 23 20 25 27 32 33 21 20 30 32 28 15 19 18 16 12 24 25 28 25 21 26 31 33 36 22 21 32 34 32 16 21 19 18 14 26 26 29 28 22 29 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[16 21 22 26 28 29 31 32 34 36 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 6 3 4 4 3 7 5 5 6 5 8 7 6 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[5 6 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 3 11 7 2 9 9 5 12 3 7 8 6 8 4 4 1 8 5 15 9 5 13 14 9 16 6 12 13 10 11 6 7 2 9 6 17 10 6 15 18 11 18 8 14 16 12 13 8 10 3 11 7 18 12 8 16 19 13 20 9 16 17 15 14 10 11 4 13 9 19 14 9 17 20 14 21 10 18 19 17 16 11 12 5 15 10 21 17 11 19 22 16 22 13 19 20 18 18 12 14 6 16 12 23 18 13 21 24 17 25 15 21 23 19 19 14 16 7 17 13 25 19 15 23 26 19 26 17 23 25 21 20 16 18 8 19 14 26 20 16 24 28 21 28 18 25 26 22 22 18 20 9 ];\r\nm=reshape(m,[],9);\r\nv=rank_file(m);\r\nvexp=[1 3 4 5 7 8 9 11 12 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 11 5 14 1 13 8 2 3 11 1 7 10 8 13 5 6 11 15 7 17 3 17 13 5 5 13 2 8 14 10 15 9 11 12 19 8 19 5 20 15 7 7 14 3 10 17 11 16 11 13 16 21 11 21 7 23 16 8 9 17 5 13 19 14 18 13 15 17 23 13 22 8 25 18 10 11 18 6 15 21 16 19 14 16 19 24 15 25 9 26 19 11 13 21 8 16 23 18 23 16 17 23 25 17 28 11 28 21 13 14 24 10 19 24 21 26 17 18 24 27 19 30 13 29 23 15 15 25 11 21 26 23 27 18 19 26 30 20 32 14 32 25 17 17 28 13 23 28 25 29 21 22 ];\r\nm=reshape(m,[],9);\r\nv=rank_file(m);\r\nvexp=[3 7 8 10 11 12 14 16 19 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[111 125 48 41 86 24 61 24 35 119 70 63 49 131 136 102 60 93 49 86 35 51 133 128 115 51 156 162 111 94 119 61 94 41 86 157 139 118 60 166 191 129 119 125 86 105 46 93 176 153 131 82 189 212 189 156 129 111 111 48 131 204 203 192 102 192 237 204 157 131 119 118 63 133 209 224 209 115 203 244 212 162 153 125 139 70 136 224 244 237 128 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[46 82 105 125 166 176 191 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 6 8 4 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 5 12 8 5 11 8 17 11 9 17 12 20 14 13 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[13 14 20 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 3 1 2 2 2 4 2 3 3 3 5 3 4 4 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 10 13 7 6 12 11 6 12 18 10 10 16 14 10 18 19 12 14 19 18 12 19 22 16 18 22 19 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[3 7 11 13 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[16 18 23 12 1 19 4 13 11 8 11 15 17 10 1 3 19 22 23 26 15 3 26 5 18 12 11 15 19 21 13 4 5 23 23 24 28 17 7 29 9 20 15 13 19 20 22 14 8 11 25 25 29 30 21 10 31 13 23 19 14 20 21 25 19 11 12 28 30 35 35 23 11 36 15 27 20 19 23 26 31 21 12 15 34 33 36 40 26 15 38 19 29 21 20 27 29 32 23 13 18 37 37 38 41 30 16 42 22 33 25 23 31 32 37 25 17 21 39 38 41 44 34 19 46 23 37 28 25 35 36 39 29 18 23 41 42 44 49 35 23 49 26 40 30 28 36 38 41 31 19 26 46 ];\r\nm=reshape(m,[],9);\r\nv=rank_file(m);\r\nvexp=[7 9 13 15 17 20 22 24 29 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 2 8 4 6 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[6 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 22 22 11 20 3 9 8 18 16 10 14 13 13 29 33 17 28 8 15 13 28 23 20 21 24 17 34 34 22 32 9 22 15 31 29 24 27 26 21 39 42 24 35 10 27 20 38 31 29 29 34 23 45 45 26 44 13 29 24 43 39 31 34 39 28 52 53 31 48 18 32 28 48 43 35 38 44 29 56 56 34 53 22 34 33 52 45 39 42 45 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[3 8 11 14 16 20 22 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[65 76 101 87 2 90 117 2 65 35 36 10 44 103 81 45 40 86 22 84 98 144 134 10 120 168 22 98 43 40 24 61 137 102 79 52 127 24 99 108 147 144 35 136 179 36 121 54 54 40 74 161 132 96 74 137 43 119 141 157 186 44 142 188 40 144 74 74 52 92 208 169 113 92 184 61 151 159 191 216 45 168 213 53 168 88 96 73 97 230 174 137 113 199 79 190 201 222 217 65 211 236 65 190 121 99 98 144 236 205 168 119 206 84 205 208 260 229 76 235 267 81 201 132 108 102 169 246 208 174 141 224 98 206 224 268 265 90 259 274 86 211 137 136 127 184 267 235 199 142 259 120 217 229 272 272 101 265 281 87 222 144 147 134 186 294 260 216 157 268 144 236 246 294 281 117 267 302 103 236 161 179 137 208 302 267 230 188 274 168 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[53 73 88 97 137 151 159 168 191 213 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[18 9 15 18 3 13 21 7 6 9 5 11 12 15 10 19 12 18 20 5 15 22 8 7 11 7 14 14 17 12 27 17 21 24 7 22 27 14 8 14 11 19 18 24 17 30 20 23 25 9 24 29 17 12 17 12 21 21 27 20 33 21 25 26 12 27 31 19 14 18 14 22 22 28 21 34 24 29 31 15 29 32 22 18 21 15 25 27 32 23 35 27 32 34 18 31 36 24 20 24 17 26 28 34 25 38 30 34 35 21 32 38 27 22 27 19 31 33 36 29 ];\r\nm=reshape(m,[],8);\r\nv=rank_file(m);\r\nvexp=[3 6 9 10 11 13 15 18 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 4 4 4 5 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[4 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 14 4 13 10 8 5 10 7 14 15 5 14 20 18 11 12 11 15 22 7 18 24 20 12 15 14 18 25 8 24 28 24 14 20 18 22 30 10 28 30 25 15 24 20 ];\r\nm=reshape(m,[],5);\r\nv=rank_file(m);\r\nvexp=[4 7 10 13 14 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 3 10 7 9 14 3 9 7 15 14 11 19 6 14 9 19 17 17 20 7 15 14 24 20 19 24 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[6 9 11 19 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[14 7 33 34 30 19 29 23 15 30 9 3 18 3 16 7 25 25 21 18 9 39 35 37 22 32 24 19 33 11 7 21 7 17 9 27 30 23 23 11 45 43 40 27 36 27 24 38 16 12 25 9 20 15 35 35 32 24 18 48 44 43 28 38 31 27 39 20 16 28 14 24 17 37 36 36 28 19 54 46 50 34 46 34 29 41 25 18 29 15 27 21 38 41 37 31 22 57 50 51 37 50 37 34 45 27 23 34 19 28 24 43 46 41 36 23 60 57 56 46 54 41 41 56 35 25 37 21 36 30 53 49 49 38 27 64 66 58 50 55 43 46 61 36 29 38 25 37 32 55 53 54 43 33 67 71 66 51 61 45 50 66 40 30 41 30 39 37 58 56 56 48 35 73 73 71 57 66 50 54 67 45 33 46 34 44 39 64 57 60 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[12 15 16 23 24 27 32 35 38 43 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 8 12 6 3 3 11 13 7 8 4 14 12 17 8 4 4 14 16 9 10 5 16 15 19 11 6 7 17 18 11 14 9 21 18 22 15 8 8 19 22 14 18 12 22 19 24 16 11 11 22 23 17 21 14 23 22 26 19 13 12 24 26 18 22 17 ];\r\nm=reshape(m,[],6);\r\nv=rank_file(m);\r\nvexp=[4 5 8 10 14 16 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 5 3 1 4 3 6 4 3 5 5 8 6 4 8 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[40 3 25 39 38 3 5 63 16 49 73 52 5 22 72 38 53 80 53 25 52 81 40 72 81 80 39 63 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[16 22 49 73 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 2 2 1 3 4 3 3 2 4 5 4 4 3 5 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[1 2 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 10 2 8 8 1 9 1 6 4 11 2 4 11 13 3 9 10 2 11 2 8 5 13 3 5 14 14 5 12 11 4 13 4 10 6 16 5 6 15 16 8 13 13 6 15 6 12 10 17 8 10 17 18 9 14 14 8 17 8 13 11 19 10 12 18 20 11 17 17 9 18 9 15 13 21 11 14 20 22 13 18 19 10 21 11 16 14 22 13 16 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[6 8 10 12 13 15 17 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 5 9 2 7 13 2 8 6 7 6 4 9 14 8 16 4 10 16 4 14 8 12 10 6 12 16 10 18 5 11 17 6 15 10 13 11 8 13 17 11 19 6 13 19 7 17 11 15 13 10 14 19 13 21 7 15 20 9 19 13 17 14 12 17 20 16 23 8 17 22 11 20 15 19 17 14 19 23 17 24 9 19 24 13 22 18 20 19 16 21 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[4 6 8 10 12 14 16 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 6 11 10 14 16 13 8 12 9 3 3 7 13 16 17 7 6 5 20 12 18 15 25 26 21 18 20 13 6 5 15 23 27 29 11 9 9 22 14 21 20 28 29 24 21 23 17 7 6 16 24 29 32 14 12 11 26 17 26 23 31 37 32 24 29 19 9 7 19 27 34 37 16 15 13 27 20 29 26 33 40 35 26 30 24 10 8 23 29 37 40 21 18 15 31 21 31 27 35 41 36 29 33 26 11 11 26 33 38 43 22 20 18 33 23 33 29 37 44 38 30 34 27 12 13 29 34 40 46 24 23 20 36 24 35 33 40 47 40 35 37 31 13 14 32 38 42 47 28 25 21 40 25 38 37 44 49 42 38 40 34 15 16 35 41 46 48 29 27 23 41 29 43 40 47 52 47 40 46 37 16 17 37 44 49 52 32 29 26 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[15 23 25 35 38 40 41 44 46 48 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[14 11 6 9 7 14 2 13 9 17 12 2 3 19 14 10 13 10 17 5 17 11 19 14 3 7 22 19 11 16 11 18 7 21 13 21 16 6 10 23 21 13 18 16 22 9 22 18 25 21 9 11 28 23 16 21 19 26 12 26 21 28 23 11 14 31 26 18 22 21 29 14 29 22 30 26 13 17 32 28 21 25 22 31 17 30 23 32 28 14 19 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[5 7 10 13 14 17 19 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[15 15 21 3 7 11 25 22 5 18 9 11 3 16 19 29 12 25 18 18 20 26 7 10 12 28 23 10 20 11 15 5 21 22 34 19 28 22 21 24 30 11 11 14 33 28 12 23 14 16 9 26 24 39 22 30 27 23 28 33 15 15 16 34 34 18 25 21 23 11 29 29 40 24 35 30 24 31 34 18 19 22 37 39 20 26 23 25 12 34 33 41 26 43 38 28 37 39 19 20 24 43 45 22 31 24 29 15 41 37 47 33 49 43 29 39 43 21 21 26 45 50 26 34 30 33 16 43 41 49 34 51 47 30 43 47 25 22 27 50 52 28 38 33 34 18 45 43 58 37 55 50 34 44 50 26 23 28 52 55 31 39 35 37 22 47 45 59 39 58 54 35 47 51 29 28 30 55 59 34 43 39 40 25 49 49 63 41 63 58 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[26 31 35 37 39 44 47 54 55 58 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 9 5 2 11 15 6 3 15 1 8 17 3 2 18 11 8 12 7 2 13 8 5 14 17 10 6 16 2 12 19 8 5 20 12 11 15 10 3 18 13 6 20 25 13 11 23 3 15 24 11 8 26 20 18 21 15 5 21 16 8 23 29 16 13 28 6 17 29 13 10 30 25 22 26 19 7 23 17 10 24 30 19 15 30 8 22 32 15 12 31 26 24 28 22 8 26 21 11 27 35 22 18 33 9 24 34 18 13 37 29 26 31 23 11 29 23 12 31 38 25 20 37 11 26 40 20 14 39 31 27 34 24 13 32 26 15 33 39 26 21 38 12 28 42 23 15 42 34 31 37 28 15 35 28 17 38 40 29 23 40 15 30 43 25 16 45 37 33 39 30 18 37 29 20 39 43 30 24 45 17 31 48 26 19 48 40 34 42 32 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[13 15 23 26 28 32 33 37 38 42 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 9 9 5 3 7 13 12 7 5 13 17 17 12 9 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 5 9 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[13 6 8 11 8 4 2 1 10 3 10 5 7 18 7 11 15 11 5 4 2 14 4 12 8 9 21 11 15 19 12 10 5 5 17 8 18 10 13 25 15 19 22 15 12 7 8 20 11 20 11 17 28 20 25 25 17 17 9 10 23 14 27 13 23 30 22 28 28 19 19 11 11 25 15 29 15 25 32 25 30 29 20 21 12 13 27 18 32 18 28 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[1 3 4 6 7 8 10 ];\r\nassert(isequal(vexp,v))\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"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":"2016-04-18T02:50:28.000Z","updated_at":"2016-04-18T04:20:27.000Z","published_at":"2016-04-18T03:42:32.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/4304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rd1A 2016 Rank and File\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the small case with max N=10\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 is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\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 [M], matrix of size [2*N-1,N] of all rows and columns of H except one\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 [V], the missing vector of H not included in M\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 [M] [V]\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 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \\n[22 222;2 22;2 22][22 222]]]\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:t\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e With max N=10 it is possible to brute force the 50 puzzles. Persistent may be useful with the usage of nchoosek which may be the critical path.\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=\\\"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rank_file solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Writing the general solution for N=50 is better for the contest. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.\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\"}]}"},{"id":1934,"title":"GJam 2014 China Rd B: Sudoku Checker","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku\u003e. Large Case.\r\n\r\nThe Goal is determine if the Sudoku square is valid. Each row and column  must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\r\n\r\n\r\n*Input:* [M], NxN matrix (3^2\u003c=N\u003c=6^2)\r\n\r\n*Output:* TF, 1=Valid, 0=Invalid\r\n\r\n*Examples:*\r\n\r\n  TF=1\r\n  5 3 4 6 7 8 9 1 2\r\n  6 7 2 1 9 5 3 4 8\r\n  1 9 8 3 4 2 5 6 7\r\n  8 5 9 7 6 1 4 2 3\r\n  4 2 6 8 5 3 7 9 1\r\n  7 1 3 9 2 4 8 5 6\r\n  9 6 1 5 3 7 2 8 4\r\n  2 8 7 4 1 9 6 3 5\r\n  3 4 5 2 8 6 1 7 9\r\n  \r\n  TF=0\r\n  5 3 4 6 7 8 9 1 2\r\n  6 7 2 1 9 5 3 4 8\r\n  1 9 8 3 4 2 5 6 7\r\n  8 5 9 7 6 1 4 2 3\r\n  4 2 6 8 999 3 7 9 1\r\n  7 1 3 9 2 4 8 5 6\r\n  9 6 1 5 3 7 2 8 4\r\n  2 8 7 4 1 9 6 3 5\r\n  3 4 5 2 8 6 1 7 9\r\n\r\n\r\n*Contest Performance:* Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p0\"\u003eGJam 2014 China Sudoku\u003c/a\u003e. Large Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine if the Sudoku square is valid. Each row and column  must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], NxN matrix (3^2\u0026lt;=N\u0026lt;=6^2)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF, 1=Valid, 0=Invalid\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eTF=1\r\n5 3 4 6 7 8 9 1 2\r\n6 7 2 1 9 5 3 4 8\r\n1 9 8 3 4 2 5 6 7\r\n8 5 9 7 6 1 4 2 3\r\n4 2 6 8 5 3 7 9 1\r\n7 1 3 9 2 4 8 5 6\r\n9 6 1 5 3 7 2 8 4\r\n2 8 7 4 1 9 6 3 5\r\n3 4 5 2 8 6 1 7 9\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eTF=0\r\n5 3 4 6 7 8 9 1 2\r\n6 7 2 1 9 5 3 4 8\r\n1 9 8 3 4 2 5 6 7\r\n8 5 9 7 6 1 4 2 3\r\n4 2 6 8 999 3 7 9 1\r\n7 1 3 9 2 4 8 5 6\r\n9 6 1 5 3 7 2 8 4\r\n2 8 7 4 1 9 6 3 5\r\n3 4 5 2 8 6 1 7 9\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\u003c/p\u003e","function_template":"function TF=Sudoku_CH(m)\r\n TF=0;\r\nend","test_suite":"%%\r\nzm=[13 4 3 6 1 8 7 10 5 12 11 14 9 16 15 2 ;2 5 8 7 6 9 12 11 10 13 16 15 14 1 4 3 ;15 14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 ;16 11 10 9 4 15 14 13 8 3 2 1 12 7 6 5 ;1 8 7 10 5 12 11 14 9 16 15 2 13 4 3 6 ;6 9 12 11 10 13 16 15 14 1 4 3 2 5 8 7 ;3 2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 ;4 15 14 13 8 3 2 1 12 7 6 5 16 11 10 9 ;5 12 11 14 9 16 15 2 13 4 3 6 1 8 7 10 ;10 13 16 15 14 1 4 3 2 5 8 7 6 9 12 11 ;7 6 9 4 11 10 13 8 15 14 1 12 3 2 5 16 ;8 3 2 1 12 7 6 5 16 11 10 9 4 15 14 13 ;9 16 15 2 13 4 3 6 1 8 7 10 5 12 11 14 ;14 1 4 3 2 5 8 7 6 9 12 11 10 13 16 15 ;11 10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 ;12 7 6 5 16 11 10 9 4 15 14 13 8 3 2 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 ;20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 ;27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 ;34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 ;35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 ;12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 ;13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 ;26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 ;33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 ;4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 ;5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 ;18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 ;19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 ;32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 ;3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 28 26 13 24 11 4 33 32 19 30 17 10 ;10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 ;11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 ;24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 ;25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 ;2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 ;9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 ;16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 ;17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 ;30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 ;31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 ;8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 ;15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 ;22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 ;23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 ;36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 ;1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 ;14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 ;21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 ;28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 ;29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 ;6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[5 8 7 10 9 12 11 14 13 16 15 2 1 4 3 6 ;14 13 13 11 2 1 16 15 6 5 4 3 10 9 8 7 ;3 6 1 4 7 10 5 8 11 14 9 12 15 2 13 16 ;16 15 2 9 4 3 6 13 8 7 10 1 12 11 14 5 ;9 12 11 14 13 16 15 2 1 4 3 6 5 8 7 10 ;2 1 16 15 6 5 4 3 10 9 8 7 14 13 12 11 ;7 10 5 8 11 14 9 12 15 2 13 16 3 6 1 4 ;4 3 6 13 8 7 10 1 12 11 14 5 16 15 2 9 ;13 16 15 2 1 4 3 6 5 8 7 10 9 12 11 14 ;6 5 4 3 10 9 8 7 14 13 12 11 2 1 16 15 ;11 14 9 12 15 2 13 16 3 6 1 4 7 10 5 8 ;8 7 10 1 12 11 14 5 16 15 2 9 4 3 6 13 ;1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 2 ;10 9 8 7 14 13 12 11 2 1 16 15 6 5 4 3 ;15 2 13 16 3 6 1 4 7 10 5 8 11 14 9 12 ;12 11 14 5 16 15 2 9 4 3 6 13 8 7 10 1 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[5 12 3 14 9 16 7 2 13 4 11 6 1 8 15 10 ;6 9 4 11 10 13 8 16 14 1 12 3 2 5 16 7 ;7 10 1 16 11 14 5 4 15 2 9 8 3 6 13 12 ;8 15 2 13 12 3 6 1 16 7 10 5 4 11 14 9 ;9 16 7 2 13 4 11 6 1 8 15 10 5 12 3 14 ;10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 11 ;11 14 5 4 15 2 9 8 3 6 13 12 7 10 1 16 ;12 3 6 1 16 7 10 5 4 11 14 9 8 15 2 13 ;13 4 11 6 1 8 15 10 5 12 3 14 9 16 7 2 ;14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 15 ;15 2 9 8 3 6 13 12 7 10 1 16 11 14 5 4 ;16 7 10 5 4 11 14 9 8 15 2 13 12 3 6 1 ;1 8 15 10 5 12 3 14 9 16 7 2 13 4 11 6 ;2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 3 ;3 6 13 12 7 10 1 16 11 14 5 4 15 2 9 8 ;4 11 14 9 8 15 2 13 12 3 6 1 16 7 10 5 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 3 8 4 6 2 7 9 5 ;2 7 6 5 1 9 8 4 3 ;9 5 4 3 8 7 6 2 1 ;4 6 2 7 9 5 1 3 8 ;5 1 9 8 4 3 2 7 6 ;3 8 7 6 2 1 9 5 4 ;7 9 5 1 3 8 4 6 2 ;8 4 3 2 7 6 5 1 9 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 ;14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 ;3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 ;16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 ;23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 ;30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 ;1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 ;20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 ;9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 ;22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 ;29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 ;36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 ;7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 ;26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 29 9 14 25 6 29 34 15 20 31 12 35 4 21 ;15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 ;28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 ;35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 ;6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 ;13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 ;32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 ;21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 ;34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 ;5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 ;12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 ;19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 ;2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 ;27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 ;4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 ;11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 ;18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 ;25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 ;8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 ;33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 ;10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 ;17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 ;24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 12 7 14 5 16 11 2 9 4 15 6 13 8 3 10 ;10 13 16 3 14 2 4 7 2 5 8 11 6 9 12 15 ;15 2 5 8 3 6 9 12 7 10 13 16 11 14 1 4 ;4 11 6 9 8 15 10 13 12 3 14 1 16 7 2 5 ;5 16 11 2 9 4 15 6 13 8 3 10 1 12 7 14 ;14 1 4 7 2 5 8 11 6 9 12 15 10 13 16 3 ;3 6 9 12 7 10 13 16 11 14 1 4 15 2 5 8 ;8 15 10 13 12 3 14 1 16 7 2 5 4 11 6 9 ;9 4 15 6 13 8 3 10 1 12 7 14 5 16 11 2 ;2 5 8 11 6 9 12 15 10 13 16 3 14 1 4 7 ;7 10 13 16 11 14 1 4 15 2 5 8 3 6 9 12 ;12 3 14 1 16 7 2 5 4 11 6 9 8 15 10 13 ;13 8 3 10 1 12 7 14 5 16 11 2 9 4 15 6 ;6 9 12 15 10 13 16 3 14 1 4 7 2 5 8 11 ;11 14 1 4 15 2 5 8 3 6 9 12 7 10 13 16 ;16 7 2 5 4 11 6 9 8 15 10 13 12 3 14 1 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 ;26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 ;27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 ;22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 ;5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 ;24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 ;13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 ;32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 ;33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 ;28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 ;11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 ;30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 ;19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 ;2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 ;3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 ;34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 ;17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 ;36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 ;25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 ;8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 ;9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 ;4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 ;23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 ;6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 ;31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 ;14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 ;15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 ;10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 ;29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 ;12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 ;1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 ;20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 ;21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 ;16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 ;35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 ;18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 8 11 2 5 12 15 6 9 16 3 10 13 4 7 14 ;14 9 12 7 2 13 16 11 6 1 4 15 10 5 8 3 ;3 10 13 4 7 14 1 8 11 2 5 12 15 6 9 16 ;16 15 6 5 4 3 10 9 8 7 14 13 12 11 2 1 ;5 12 15 6 9 16 3 10 13 4 7 14 1 8 11 2 ;2 13 16 11 6 1 4 15 10 5 8 3 14 9 12 7 ;7 14 1 8 11 2 5 12 15 6 9 16 3 10 13 4 ;4 3 10 9 8 7 14 13 12 11 2 1 16 15 6 5 ;9 16 3 10 13 4 7 14 1 8 11 2 5 12 15 6 ;6 1 4 15 10 5 8 3 14 9 12 7 2 13 16 11 ;11 2 5 12 15 6 9 16 3 10 13 4 7 14 1 8 ;8 7 14 13 12 11 2 1 16 15 6 5 4 3 10 9 ;13 4 7 14 1 8 11 2 5 12 15 6 9 16 3 10 ;10 5 8 3 14 9 12 7 2 13 16 11 6 1 4 15 ;15 6 9 16 3 10 13 4 7 14 1 8 11 2 5 12 ;12 11 2 1 16 15 6 5 4 3 10 9 8 7 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 ;20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 ;3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 ;10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 ;11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 ;12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 ;13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 ;26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 ;9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 ;16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 ;17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 ;18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 ;19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 ;32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 ;15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 ;22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 ;23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 ;24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 ;25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 ;2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 ;21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 ;28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 ;29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 ;30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 ;31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 ;8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 ;27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 ;34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 ;35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 ;36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 ;1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 ;14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 ;33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 ;4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 ;5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 ;6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 3 8 1 6 2 4 9 5 ;2 1 6 5 4 9 8 7 3 ;9 5 4 3 8 7 6 2 1 ;1 6 2 4 9 5 7 3 8 ;5 4 9 8 7 3 2 1 6 ;3 8 7 6 2 1 9 5 4 ;4 9 6 7 3 8 1 6 2 ;8 7 3 2 1 6 5 4 9 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 16 3 2 13 4 7 6 1 8 11 10 5 12 15 14 ;6 13 4 15 10 1 8 3 14 5 12 7 2 9 16 11 ;11 14 1 12 15 2 5 16 3 6 9 4 7 10 13 8 ;8 7 10 5 12 11 14 9 16 15 2 13 4 3 6 1 ;13 4 7 6 1 8 11 10 5 12 15 14 9 16 3 2 ;10 1 8 3 14 5 12 7 2 9 16 11 6 13 4 15 ;15 2 5 16 3 6 9 4 7 10 13 8 11 14 1 12 ;12 11 14 9 16 15 2 13 4 3 6 1 8 7 10 5 ;1 8 11 10 5 12 15 14 9 16 3 2 13 4 7 6 ;14 5 12 7 2 9 16 11 6 13 4 15 10 1 8 3 ;3 6 9 4 7 10 13 8 11 14 1 12 15 2 5 16 ;16 15 2 13 4 3 6 1 8 7 10 5 12 11 14 9 ;5 12 15 14 9 16 3 2 13 4 7 6 1 8 11 10 ;2 9 16 11 6 13 4 15 10 1 8 3 14 5 12 7 ;7 10 13 8 11 14 1 12 15 2 5 16 3 6 9 4 ;4 3 6 1 8 7 10 5 12 11 14 9 16 15 2 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 ;22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 ;3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 ;4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 ;15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 ;21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 ;2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 ;8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 ;9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 ;20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 ;1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 ;7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 ;13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 ;14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 ;25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 ;6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 ;12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 ;18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 ;19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 ;5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 ;11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 ;17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 ;23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 ;24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 ;10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 ;17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 ;8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 ;19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 ;5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 ;6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 ;22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 ;13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 ;24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 ;10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 ;11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 ;2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 ;18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 ;4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 ;15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 ;16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 ;7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 ;23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 ;9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 ;20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 ;21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 ;12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 ;3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 ;14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 ;25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 ;20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 ;33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 ;4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 ;35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 ;18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 ;7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 ;26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 ;3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 ;10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 ;5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 ;24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 ;13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 ;32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 ;9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 ;16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 ;11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 ;30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 ;19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 ;2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 ;15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 ;22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 ;17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 ;36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 ;25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 ;8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 ;21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 ;28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 ;23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 ;6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 ;31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 ;14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 ;27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 ;34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 ;29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 ;12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[4 3 8 7 6 2 1 9 5 ;2 1 9 5 4 3 8 7 6 ;6 5 7 9 8 1 3 2 4 ;7 6 2 1 9 5 4 3 8 ;5 4 3 8 7 6 2 1 9 ;9 8 1 3 2 4 6 5 7 ;1 9 5 4 3 8 7 6 2 ;8 7 6 2 1 9 5 4 3 ;3 2 4 6 5 7 9 8 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 9 8 4 3 2 7 6 5 ;2 7 6 5 1 9 8 4 3 ;3 5 4 6 8 7 9 2 1 ;4 3 2 7 6 5 1 9 8 ;5 1 9 8 4 3 2 7 6 ;6 8 7 9 2 1 3 5 4 ;7 6 5 1 9 8 4 3 2 ;8 4 3 2 7 6 5 1 9 ;9 2 1 3 5 4 6 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 ;7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 ;23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 ;9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 ;15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 ;16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 ;12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 ;3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 ;14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 ;20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 ;21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 ;17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 ;8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 ;19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 ;25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 ;1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 ;22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 ;13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 ;24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 ;5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 ;6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 ;2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 ;18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 ;4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 ;10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 ;8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 ;21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 ;10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 ;5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 ;36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 ;7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 ;14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 ;27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 ;16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 ;11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 ;6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 ;13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 ;20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 ;33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 ;22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 ;17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 ;12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 ;19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 ;26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 ;3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 ;28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 ;23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 ;18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 ;25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 ;32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 ;9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 ;34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 ;29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 ;24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 ;31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 ;2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 ;15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 ;4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 ;35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 ;30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 ;2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 ;3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 ;22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 ;5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 ;6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 ;19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 ;8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 ;9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 ;28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 ;11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 ;12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 ;25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 ;14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 ;15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 ;34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 ;17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 ;18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 ;31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 ;20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 ;21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 ;4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 ;23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 ;24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 ;1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 ;26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 ;27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 ;10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 ;29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 ;30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 ;7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 ;32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 ;33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 ;16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 ;35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 ;36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[429 428 430 432 431 433 426 434 427 ;427 426 434 430 429 428 433 432 431 ;431 433 432 434 427 426 428 430 429 ;432 431 433 426 434 427 429 428 430 ;430 429 428 433 432 431 427 426 434 ;434 427 426 428 430 429 431 433 432 ;426 434 427 429 428 430 432 431 433 ;433 432 431 427 426 434 430 429 428 ;428 430 429 431 433 432 434 427 426 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 ;20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 ;15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 ;34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 ;29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 ;6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 ;13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 ;26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 ;21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 ;4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 ;35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 ;12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 ;19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 ;32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 ;27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 ;10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 ;5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 ;18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 ;25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 ;2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 ;33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 ;16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 ;11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 ;24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 ;31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 ;8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 ;3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 23 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 ;22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 ;17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 ;30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 ;1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 ;14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 ;9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 ;28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 ;23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 ;36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 ;22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 ;18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 ;14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 ;25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 ;1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 ;2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 ;23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 ;19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 ;5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 ;6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 ;7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 ;3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 ;24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 ;10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 ;11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 ;12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 ;8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 ;4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 ;15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 ;16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 ;17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 ;13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 ;9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 ;20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 ;14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 ;3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 ;16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 ;29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 ;36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 ;25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 ;20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 ;9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 ;22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 ;35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 ;6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 ;31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 ;26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 ;15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 ;28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 ;5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 ;12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 ;1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 ;32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 ;21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 ;34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 ;11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 ;18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 ;7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 ;2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 ;27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 ;4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 ;17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 ;24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 ;13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 ;8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 ;33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 ;10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 ;23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 ;30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 6 8 1 9 2 4 3 5 ;2 1 3 5 4 6 8 7 9 ;9 5 4 3 8 7 6 2 1 ;1 9 2 4 3 5 7 6 8 ;5 4 6 8 7 9 2 1 3 ;3 8 7 6 2 1 9 5 4 ;4 3 5 7 6 8 1 9 2 ;8 7 9 2 1 3 5 4 6 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 ;8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 ;21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 ;34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 ;23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 ;36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 ;7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 ;14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 ;27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 ;4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 ;29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 ;6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 ;13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 ;20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 ;33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 ;10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 ;35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 ;12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 ;19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 ;26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 ;3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 ;16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 ;5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 ;18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 ;25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 ;32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 ;9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 ;22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 ;11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 ;24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 ;31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 ;2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 ;15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 ;28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 ;17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 ;30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 16 3 10 13 4 7 14 1 8 11 2 5 12 15 6 ;2 13 4 15 6 1 8 3 10 5 12 7 14 9 16 11 ;7 6 1 12 11 10 5 16 15 14 9 4 3 2 13 8 ;8 11 14 5 12 15 2 9 16 3 6 13 4 7 10 1 ;13 4 7 14 1 8 11 2 5 12 15 6 9 16 3 10 ;6 1 8 3 10 5 12 7 14 9 16 11 2 13 4 15 ;11 10 5 16 15 14 9 4 3 2 13 8 7 6 1 12 ;12 15 2 9 16 3 6 13 4 7 10 1 8 11 14 5 ;1 8 11 2 5 12 15 6 9 16 3 10 13 4 7 14 ;10 5 12 7 14 9 16 11 2 13 4 15 6 1 8 3 ;15 14 9 4 3 2 13 8 7 6 1 12 11 10 5 16 ;16 3 6 13 4 7 10 1 8 11 14 5 12 15 2 9 ;5 12 15 6 9 16 3 10 13 4 7 14 1 8 11 2 ;14 9 16 11 2 13 4 15 6 1 8 3 10 5 12 7 ;3 2 13 8 7 6 1 12 11 10 5 16 15 14 9 4 ;4 7 10 1 8 11 14 5 12 15 2 9 16 3 6 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 ;22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 ;3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 ;4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 ;10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 ;6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 ;2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 ;8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 ;9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 ;15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 ;11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 ;7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 ;13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 ;14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 ;20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 ;16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 ;12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 ;18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 ;19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 ;25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 ;21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 ;17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 ;23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 ;24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 ;5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[13 8 15 6 1 12 3 10 5 16 7 14 9 4 11 2 ;14 5 4 3 2 9 8 7 6 13 12 11 10 1 16 15 ;7 2 9 12 11 6 13 16 15 10 1 4 3 14 5 8 ;16 11 10 1 4 15 14 5 8 3 2 9 12 7 6 13 ;1 12 3 10 5 16 7 14 9 4 11 2 13 8 15 6 ;2 9 8 7 6 13 12 11 10 1 16 15 14 5 4 3 ;11 6 13 16 15 10 1 4 3 14 5 8 7 2 9 12 ;4 15 14 5 8 3 2 9 12 7 6 13 16 11 10 1 ;5 16 7 14 9 4 11 2 13 8 15 6 1 12 3 10 ;6 13 12 11 10 1 16 15 14 5 4 3 2 9 8 7 ;15 10 1 4 3 14 5 8 7 2 10 12 11 6 13 16 ;8 3 2 9 12 7 6 13 16 11 10 1 4 15 14 5 ;9 4 11 2 13 8 15 6 1 12 3 10 5 16 7 14 ;10 1 16 15 14 5 4 3 2 9 8 7 6 13 12 11 ;3 14 5 8 7 2 9 12 11 6 13 16 15 10 1 4 ;12 7 6 13 16 11 10 1 4 15 14 5 8 3 2 9 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 ;7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 ;8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 ;19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 ;20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 ;1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 ;12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 ;13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 ;24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 ;25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 ;6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 ;17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 ;18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 ;4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 ;5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 ;11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 ;22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 ;23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 ;9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 ;10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 ;16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 ;2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 ;3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 ;14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 ;15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 8 7 6 13 12 11 10 1 16 15 14 5 4 3 2 ;14 1 4 11 2 5 8 15 6 9 12 3 10 13 16 7 ;3 2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 ;12 15 10 13 16 3 14 1 4 7 2 5 8 11 6 9 ;13 12 11 10 1 16 15 14 5 4 3 2 9 8 7 6 ;2 5 8 15 6 9 12 3 10 13 16 7 14 1 4 11 ;7 6 9 4 11 10 13 8 15 14 1 12 3 2 5 16 ;16 3 14 1 4 7 2 5 8 11 6 9 12 15 10 13 ;1 16 15 14 5 4 3 2 9 8 7 6 13 12 11 10 ;6 9 12 3 10 13 16 7 14 1 4 11 2 5 8 15 ;11 10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 ;4 7 2 5 8 11 6 9 12 15 10 13 16 3 14 1 ;5 4 3 2 9 8 7 6 13 12 11 10 1 16 15 14 ;10 13 16 7 14 1 4 11 2 5 8 15 6 9 12 3 ;15 14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 ;8 11 6 9 12 15 10 13 16 3 14 1 4 7 2 5 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 ;8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 ;9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 ;16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 ;35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 ;36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 ;7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 ;14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 ;15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 ;22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 ;5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 ;6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 ;13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 ;20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 ;21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 ;28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 ;11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 ;12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 ;19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 ;26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 ;27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 ;34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 ;17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 ;18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 ;25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 ;32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 ;33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 ;4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 ;23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 ;24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 ;31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 ;2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 ;3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 ;10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 ;29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 ;30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))","published":true,"deleted":false,"likes_count":4,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":66,"test_suite_updated_at":"2013-10-14T05:18:15.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-14T02:09:35.000Z","updated_at":"2025-12-15T20:06:09.000Z","published_at":"2013-10-14T02:26:56.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/2929486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sudoku\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Large Case.\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 Goal is determine if the Sudoku square is valid. Each row and column must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\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 [M], NxN matrix (3^2\u0026lt;=N\u0026lt;=6^2)\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 TF, 1=Valid, 0=Invalid\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\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[TF=1\\n5 3 4 6 7 8 9 1 2\\n6 7 2 1 9 5 3 4 8\\n1 9 8 3 4 2 5 6 7\\n8 5 9 7 6 1 4 2 3\\n4 2 6 8 5 3 7 9 1\\n7 1 3 9 2 4 8 5 6\\n9 6 1 5 3 7 2 8 4\\n2 8 7 4 1 9 6 3 5\\n3 4 5 2 8 6 1 7 9\\n\\nTF=0\\n5 3 4 6 7 8 9 1 2\\n6 7 2 1 9 5 3 4 8\\n1 9 8 3 4 2 5 6 7\\n8 5 9 7 6 1 4 2 3\\n4 2 6 8 999 3 7 9 1\\n7 1 3 9 2 4 8 5 6\\n9 6 1 5 3 7 2 8 4\\n2 8 7 4 1 9 6 3 5\\n3 4 5 2 8 6 1 7 9]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\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\"}]}"},{"id":42769,"title":"GJam March 2016 IOW: Cody's Jams ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard GJam March 2016 Annual I/O for Women Cody's Jam\u003e. This is a mix of the small and large data sets.\r\n\r\nThe GJam story goes that a store is having a 25% off sale and ordered original and sale price labels. Unfortunately the labels came commingled in increasing numeric value. Find the sale prices.\r\n\r\n*Input:* m , Vector length N\u003c=100 with values \u003c=10^9.\r\n\r\n*Output:* v , Vector containing the Sale price tags\r\n\r\n*Examples:* [m] [v]\r\n\r\n  [15 20 60 75 80 100] creates v=[15 60 75]\r\n  [9 9 12 12 12 15 16 20] creates v=[9 9 12 15]\r\n \r\n\r\n*Google Code Jam 2016 Open Qualifier: April 8, 2016*\r\n\r\nComplete Code Jam Input/Output included in Test Suite.\r\nThe women's competition had 500 entrants. The qualifier winner was USA Stacy992 using Java. The top 60 show strength in USA, Russia, China, and South Korea under \u003chttp://code.google.com/codejam/contest/8274486/scoreboard?c=8274486# Contest Dashboard\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard\"\u003eGJam March 2016 Annual I/O for Women Cody's Jam\u003c/a\u003e. This is a mix of the small and large data sets.\u003c/p\u003e\u003cp\u003eThe GJam story goes that a store is having a 25% off sale and ordered original and sale price labels. Unfortunately the labels came commingled in increasing numeric value. Find the sale prices.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e m , Vector length N\u0026lt;=100 with values \u0026lt;=10^9.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e v , Vector containing the Sale price tags\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [m] [v]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[15 20 60 75 80 100] creates v=[15 60 75]\r\n[9 9 12 12 12 15 16 20] creates v=[9 9 12 15]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/b\u003e\u003c/p\u003e\u003cp\u003eComplete Code Jam Input/Output included in Test Suite.\r\nThe women's competition had 500 entrants. The qualifier winner was USA Stacy992 using Java. The top 60 show strength in USA, Russia, China, and South Korea under \u003ca href = \"http://code.google.com/codejam/contest/8274486/scoreboard?c=8274486#\"\u003eContest Dashboard\u003c/a\u003e.\u003c/p\u003e","function_template":"function v=CodyJams(m)\r\n% m is increasing value vector of length 2L\r\n% v is length L vector of Sale Price Tags\r\n v=[];\r\nend","test_suite":"%%\r\nm=[15 20 60 75 80 100 ];\r\nv=CodyJams(m);\r\nvexp=[15 60 75 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 9 12 12 12 15 16 20 ];\r\nv=CodyJams(m);\r\nvexp=[9 9 12 15 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[480 640 1047 1396 1638 2184 2481 3308 ];\r\nv=CodyJams(m);\r\nvexp=[480 1047 1638 2481 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[495 660 1953 2559 2604 2685 3412 3580 ];\r\nv=CodyJams(m);\r\nvexp=[495 1953 2559 2685 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[384 512 1005 1340 2037 2716 2973 3964 ];\r\nv=CodyJams(m);\r\nvexp=[384 1005 2037 2973 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[270624780 336144033 360833040 448192044 736130808 745857189 981507744 994476252 ];\r\nv=CodyJams(m);\r\nvexp=[270624780 336144033 736130808 745857189 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[147 196 267 330 356 440 810 1080 ];\r\nv=CodyJams(m);\r\nvexp=[147 267 330 810 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[222 296 1533 1767 2044 2356 2541 3388 ];\r\nv=CodyJams(m);\r\nvexp=[222 1533 1767 2541 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[450 600 804 1072 1137 1497 1516 1996 ];\r\nv=CodyJams(m);\r\nvexp=[450 804 1137 1497 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1788 2384 2697 2967 2991 3596 3956 3988 ];\r\nv=CodyJams(m);\r\nvexp=[1788 2697 2967 2991 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4131 5508 7344 7803 8397 8667 9792 10404 11196 11556 13872 14553 14742 14928 15408 17631 18496 19404 19656 19904 20544 20925 21816 23508 23598 23949 25872 26208 27900 29088 31344 31464 31932 34496 34944 37200 38784 41792 41952 42576 49600 51712 55936 56768 7440174 8148762 8601471 8837667 9290376 9664353 9920232 9920232 10865016 10865016 11468628 11468628 11783556 11783556 12387168 12387168 12885804 12885804 13187610 13226976 13226976 13443489 14309541 14486688 14486688 15291504 15291504 15711408 15711408 16516224 16516224 17181072 17181072 17583480 17583480 17635968 17635968 17924652 17924652 19079388 19079388 19315584 19315584 20388672 20388672 20948544 20948544 22021632 22021632 22908096 22908096 23444640 23444640 23514624 23514624 23899536 23899536 25439184 25439184 25754112 25754112 27184896 27184896 27931392 29362176 29362176 30544128 30544128 31259520 31259520 31352832 31352832 31866048 31866048 33918912 33918912 34338816 34338816 36246528 36246528 39149568 39149568 40725504 40725504 41679360 41679360 41803776 41803776 42488064 42488064 45225216 45225216 45785088 45785088 48328704 48328704 52199424 52199424 54300672 54300672 55572480 55572480 55738368 55738368 56650752 56650752 60300288 60300288 61046784 61046784 64438272 64438272 69599232 69599232 72400896 72400896 74096640 74096640 74317824 74317824 75534336 75534336 80400384 80400384 81395712 81395712 85917696 85917696 92798976 92798976 96534528 96534528 98795520 98795520 99090432 100712448 100712448 107200512 107200512 108527616 108527616 114556928 123731968 128712704 131727360 131727360 134283264 134283264 142934016 142934016 144703488 144703488 175636480 179044352 190578688 192937984 ];\r\nv=CodyJams(m);\r\nvexp=[4131 7344 7803 8397 8667 13872 14553 14742 14928 15408 17631 20925 21816 23598 23949 25872 26208 31344 37200 38784 41952 42576 7440174 8148762 8601471 8837667 9290376 9664353 9920232 10865016 11468628 11783556 12387168 12885804 13187610 13226976 13443489 14309541 14486688 15291504 15711408 16516224 17181072 17583480 17635968 17924652 19079388 19315584 20388672 20948544 22021632 22908096 23444640 23514624 23899536 25439184 25754112 27184896 29362176 30544128 31259520 31352832 31866048 33918912 34338816 36246528 39149568 40725504 41679360 41803776 42488064 45225216 45785088 48328704 52199424 54300672 55572480 55738368 56650752 60300288 61046784 64438272 69599232 72400896 74096640 74317824 75534336 80400384 81395712 85917696 92798976 96534528 98795520 100712448 107200512 108527616 131727360 134283264 142934016 144703488 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[47652765 63537020 67915215 69349602 72816921 73024614 82232592 90005040 90280239 90553620 92466136 94414812 97089228 97366152 103779192 109643456 111106431 111164235 120006720 120373652 125886416 135665742 136205178 138372256 138890175 141176913 142430418 148141908 148218980 151625514 165274734 180887656 181606904 185186900 186382386 188235884 189907224 191652879 197100096 200131203 202167352 220366312 228636354 230018664 233064210 248509848 252322995 253203684 255537172 262800128 266522562 266752464 266841604 276629997 284197221 289714236 292147407 298051953 304848472 306691552 310752280 315722328 323249112 326482563 331581687 336430660 337604912 341668035 343831008 350075772 355363416 355669952 368839996 377457843 378929628 380744748 386285648 389529876 394930203 397402604 398376315 398670747 400335744 403277814 417169314 420741072 420963104 429730527 430998816 431599908 435310084 437438880 442108916 446485650 455557380 456522042 456986763 458441344 458579964 462594018 466767696 473333373 473409816 498541914 500694354 502642542 502680435 503277124 507659664 526573604 531168420 531512730 531560996 533780992 537703752 554512398 556085664 556225752 559312521 560988096 572974036 575466544 576554121 582854961 583251840 595314200 603269448 608696056 609315684 609830100 611439952 616792024 622311657 630908808 631111164 631213088 640087608 662978055 664722552 666189831 667592472 668044893 670190056 670240580 670949520 676510731 678398706 680890563 683321925 683396070 686473173 698833314 701501745 704706354 706326441 708683640 712094160 717827469 719130264 721789842 730229028 732531111 739232499 739349864 740488395 741447552 743207979 745750028 747639918 768738828 777139948 804359264 813106800 829748876 841211744 853450144 883970740 888253108 890726524 894599360 902014308 904531608 907854084 911095900 911194760 915297564 931777752 935335660 939608472 941768588 949458880 957103292 958840352 962386456 973638704 976708148 985643332 987317860 990943972 996853224 ];\r\nv=CodyJams(m);\r\nvexp=[47652765 67915215 69349602 72816921 73024614 82232592 90005040 90280239 94414812 103779192 111106431 111164235 135665742 136205178 138890175 141176913 142430418 151625514 165274734 186382386 191652879 197100096 200131203 228636354 230018664 233064210 252322995 253203684 266522562 266752464 276629997 284197221 289714236 292147407 298051953 315722328 323249112 326482563 331581687 341668035 343831008 350075772 377457843 380744748 394930203 398376315 398670747 400335744 403277814 417169314 420741072 429730527 431599908 437438880 446485650 456522042 456986763 458579964 462594018 473333373 473409816 498541914 500694354 502642542 502680435 531512730 554512398 556085664 559312521 576554121 582854961 603269448 609830100 622311657 630908808 640087608 662978055 666189831 668044893 670949520 676510731 678398706 680890563 683321925 683396070 686473173 698833314 701501745 704706354 706326441 712094160 717827469 719130264 721789842 730229028 732531111 739232499 740488395 743207979 747639918 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% function GJam_IOW_2016a\r\n% % \r\n% fn='A-large-practice.in';\r\n% %fn='A-small-practice.in';\r\n% [data] = read_file(fn); % create cell array\r\n% \r\n% fidG = fopen('A-large-output.out', 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has N rows of cases\r\n%  v = Rd1A(data{i});\r\n%  m=data{i};\r\n%  \r\n%  fprintf(fidG,'Case #%i:',i);\r\n%  fprintf(fidG,' %i',v);fprintf(fidG,'\\n');\r\n%  fprintf('Case #%i:',i);\r\n%  fprintf(' %i',v);fprintf('\\n');\r\n%  \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% end\r\n% \r\n% function v=Rd1A(m)\r\n%  L=length(m);\r\n%  v=zeros(1,L/2);\r\n%  for i=1:L/2\r\n%   vptr=find(m\u003e0,1,'first');\r\n%   v(i)=m(vptr);\r\n%   m(find(m==round(m(vptr)*4/3),1,'first'))=0;\r\n%   m(vptr)=0;\r\n%  end\r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  ptr=ptr+1;\r\n%  fgetl(fid); % Data set countIgnore\r\n%  v=str2num(fgetl(fid)); \r\n%  \r\n%  d{ptr}=v;\r\n%  \r\n% end % feof\r\n%  fclose(fid);\r\n% \r\n% end % read_file\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-13T05:45:39.000Z","updated_at":"2016-03-15T16:31:00.000Z","published_at":"2016-03-13T06:32:23.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/8274486/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Women Cody's Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is a mix of the small and large data sets.\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 store is having a 25% off sale and ordered original and sale price labels. Unfortunately the labels came commingled in increasing numeric value. Find the sale prices.\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 m , Vector length N\u0026lt;=100 with values \u0026lt;=10^9.\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 v , Vector containing the Sale price tags\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 [m] [v]\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[[15 20 60 75 80 100] creates v=[15 60 75]\\n[9 9 12 12 12 15 16 20] creates v=[9 9 12 15]]]\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\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\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\u003eComplete Code Jam Input/Output included in Test Suite. The women's competition had 500 entrants. The qualifier winner was USA Stacy992 using Java. The top 60 show strength in USA, Russia, China, and South Korea under\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/8274486/scoreboard?c=8274486#\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eContest Dashboard\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":44077,"title":"GJam 2017 Kickstart: Vote (Large) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p1 GJam 2017 Kickstart Vote\u003e. This is the first 100 large cases with 0\u003c=M\u003cN\u003c=2000.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given N and M votes, where N\u003eM, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\r\n\r\n*Input:* [N,M], the quantity of votes to N and M\r\n\r\n*Output:* [V], the ratio of N always leading sequences to total sequences\r\n\r\n*Examples:* [N,M] [V]; [2,1] [0.33333333]\r\n\r\nFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for 0\u003c=M\u003cN\u003c=2000 as 2000! may be a bit large. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p1\"\u003eGJam 2017 Kickstart Vote\u003c/a\u003e. This is the first 100 large cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=2000.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N,M], the quantity of votes to N and M\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the ratio of N always leading sequences to total sequences\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [N,M] [V]; [2,1] [0.33333333]\u003c/p\u003e\u003cp\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=2000 as 2000! may be a bit large. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=vote(N,M)\r\n% 0\u003c=M\u003cN\u003c=2000 Large\r\n% N\u003eM\u003e=0\r\n% Ratio of voter  [sequences sum(N_1:i)\u003esum(M_1:i) for all i] / (N+M)!\r\n val=0;\r\nend","test_suite":"%%\r\nv=vote(821,455);\r\nassert(abs(v-0.286833856)\u003c1e-8)\r\n%%\r\nv=vote(1548,733);\r\nassert(abs(v-0.357299430)\u003c1e-8)\r\n%%\r\nv=vote(858,291);\r\nassert(abs(v-0.493472585)\u003c1e-8)\r\n%%\r\nv=vote(1595,28);\r\nassert(abs(v-0.965495995)\u003c1e-8)\r\n%%\r\nv=vote(1174,995);\r\nassert(abs(v-0.082526510)\u003c1e-8)\r\n%%\r\nv=vote(1476,454);\r\nassert(abs(v-0.529533679)\u003c1e-8)\r\n%%\r\nv=vote(690,333);\r\nassert(abs(v-0.348973607)\u003c1e-8)\r\n%%\r\nv=vote(1230,896);\r\nassert(abs(v-0.157102540)\u003c1e-8)\r\n%%\r\nv=vote(533,149);\r\nassert(abs(v-0.563049853)\u003c1e-8)\r\n%%\r\nv=vote(1941,1758);\r\nassert(abs(v-0.049472830)\u003c1e-8)\r\n%%\r\nv=vote(1976,339);\r\nassert(abs(v-0.707127430)\u003c1e-8)\r\n%%\r\nv=vote(2000,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(398,93);\r\nassert(abs(v-0.621181263)\u003c1e-8)\r\n%%\r\nv=vote(1659,1028);\r\nassert(abs(v-0.234834388)\u003c1e-8)\r\n%%\r\nv=vote(1894,961);\r\nassert(abs(v-0.326795096)\u003c1e-8)\r\n%%\r\nv=vote(1388,874);\r\nassert(abs(v-0.227232538)\u003c1e-8)\r\n%%\r\nv=vote(1354,1149);\r\nassert(abs(v-0.081901718)\u003c1e-8)\r\n%%\r\nv=vote(1778,1287);\r\nassert(abs(v-0.160195759)\u003c1e-8)\r\n%%\r\nv=vote(886,283);\r\nassert(abs(v-0.515825492)\u003c1e-8)\r\n%%\r\nv=vote(1431,822);\r\nassert(abs(v-0.270306258)\u003c1e-8)\r\n%%\r\nv=vote(679,544);\r\nassert(abs(v-0.110384301)\u003c1e-8)\r\n%%\r\nv=vote(1405,1150);\r\nassert(abs(v-0.099804305)\u003c1e-8)\r\n%%\r\nv=vote(1228,379);\r\nassert(abs(v-0.528313628)\u003c1e-8)\r\n%%\r\nv=vote(1607,1129);\r\nassert(abs(v-0.174707602)\u003c1e-8)\r\n%%\r\nv=vote(1265,457);\r\nassert(abs(v-0.469221835)\u003c1e-8)\r\n%%\r\nv=vote(1885,1572);\r\nassert(abs(v-0.090540931)\u003c1e-8)\r\n%%\r\nv=vote(1451,1348);\r\nassert(abs(v-0.036798857)\u003c1e-8)\r\n%%\r\nv=vote(1712,975);\r\nassert(abs(v-0.274283588)\u003c1e-8)\r\n%%\r\nv=vote(921,494);\r\nassert(abs(v-0.301766784)\u003c1e-8)\r\n%%\r\nv=vote(1966,354);\r\nassert(abs(v-0.694827586)\u003c1e-8)\r\n%%\r\nv=vote(1299,536);\r\nassert(abs(v-0.415803815)\u003c1e-8)\r\n%%\r\nv=vote(1872,874);\r\nassert(abs(v-0.363437728)\u003c1e-8)\r\n%%\r\nv=vote(1831,1125);\r\nassert(abs(v-0.238836265)\u003c1e-8)\r\n%%\r\nv=vote(1101,822);\r\nassert(abs(v-0.145085803)\u003c1e-8)\r\n%%\r\nv=vote(1057,526);\r\nassert(abs(v-0.335439040)\u003c1e-8)\r\n%%\r\nv=vote(1761,639);\r\nassert(abs(v-0.467500000)\u003c1e-8)\r\n%%\r\nv=vote(1111,137);\r\nassert(abs(v-0.780448718)\u003c1e-8)\r\n%%\r\nv=vote(445,425);\r\nassert(abs(v-0.022988506)\u003c1e-8)\r\n%%\r\nv=vote(670,362);\r\nassert(abs(v-0.298449612)\u003c1e-8)\r\n%%\r\nv=vote(1009,737);\r\nassert(abs(v-0.155784651)\u003c1e-8)\r\n%%\r\nv=vote(2000,1);\r\nassert(abs(v-0.999000500)\u003c1e-8)\r\n%%\r\nv=vote(1504,28);\r\nassert(abs(v-0.963446475)\u003c1e-8)\r\n%%\r\nv=vote(1821,560);\r\nassert(abs(v-0.529609408)\u003c1e-8)\r\n%%\r\nv=vote(1521,1373);\r\nassert(abs(v-0.051140290)\u003c1e-8)\r\n%%\r\nv=vote(823,361);\r\nassert(abs(v-0.390202703)\u003c1e-8)\r\n%%\r\nv=vote(836,140);\r\nassert(abs(v-0.713114754)\u003c1e-8)\r\n%%\r\nv=vote(1763,1599);\r\nassert(abs(v-0.048780488)\u003c1e-8)\r\n%%\r\nv=vote(1288,162);\r\nassert(abs(v-0.776551724)\u003c1e-8)\r\n%%\r\nv=vote(417,357);\r\nassert(abs(v-0.077519380)\u003c1e-8)\r\n%%\r\nv=vote(1020,122);\r\nassert(abs(v-0.786339755)\u003c1e-8)\r\n%%\r\nv=vote(1617,1576);\r\nassert(abs(v-0.012840589)\u003c1e-8)\r\n%%\r\nv=vote(1493,780);\r\nassert(abs(v-0.313682358)\u003c1e-8)\r\n%%\r\nv=vote(1868,34);\r\nassert(abs(v-0.964248160)\u003c1e-8)\r\n%%\r\nv=vote(1452,1240);\r\nassert(abs(v-0.078751857)\u003c1e-8)\r\n%%\r\nv=vote(2,1);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(584,242);\r\nassert(abs(v-0.414043584)\u003c1e-8)\r\n%%\r\nv=vote(1610,1196);\r\nassert(abs(v-0.147540984)\u003c1e-8)\r\n%%\r\nv=vote(1423,1296);\r\nassert(abs(v-0.046708349)\u003c1e-8)\r\n%%\r\nv=vote(975,479);\r\nassert(abs(v-0.341127923)\u003c1e-8)\r\n%%\r\nv=vote(1000,80);\r\nassert(abs(v-0.851851852)\u003c1e-8)\r\n%%\r\nv=vote(1227,1035);\r\nassert(abs(v-0.084880637)\u003c1e-8)\r\n%%\r\nv=vote(1812,260);\r\nassert(abs(v-0.749034749)\u003c1e-8)\r\n%%\r\nv=vote(1875,1294);\r\nassert(abs(v-0.183338593)\u003c1e-8)\r\n%%\r\nv=vote(1882,826);\r\nassert(abs(v-0.389955687)\u003c1e-8)\r\n%%\r\nv=vote(1401,1348);\r\nassert(abs(v-0.019279738)\u003c1e-8)\r\n%%\r\nv=vote(1449,494);\r\nassert(abs(v-0.491507977)\u003c1e-8)\r\n%%\r\nv=vote(1807,512);\r\nassert(abs(v-0.558430358)\u003c1e-8)\r\n%%\r\nv=vote(1118,432);\r\nassert(abs(v-0.442580645)\u003c1e-8)\r\n%%\r\nv=vote(1168,184);\r\nassert(abs(v-0.727810651)\u003c1e-8)\r\n%%\r\nv=vote(1421,980);\r\nassert(abs(v-0.183673469)\u003c1e-8)\r\n%%\r\nv=vote(1265,270);\r\nassert(abs(v-0.648208469)\u003c1e-8)\r\n%%\r\nv=vote(1474,1172);\r\nassert(abs(v-0.114134543)\u003c1e-8)\r\n%%\r\nv=vote(606,556);\r\nassert(abs(v-0.043029260)\u003c1e-8)\r\n%%\r\nv=vote(1,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(1543,124);\r\nassert(abs(v-0.851229754)\u003c1e-8)\r\n%%\r\nv=vote(1935,1383);\r\nassert(abs(v-0.166365280)\u003c1e-8)\r\n%%\r\nv=vote(1969,1150);\r\nassert(abs(v-0.262584162)\u003c1e-8)\r\n%%\r\nv=vote(1394,1223);\r\nassert(abs(v-0.065341995)\u003c1e-8)\r\n%%\r\nv=vote(961,203);\r\nassert(abs(v-0.651202749)\u003c1e-8)\r\n%%\r\nv=vote(1453,318);\r\nassert(abs(v-0.640880858)\u003c1e-8)\r\n%%\r\nv=vote(1979,818);\r\nassert(abs(v-0.415087594)\u003c1e-8)\r\n%%\r\nv=vote(333,302);\r\nassert(abs(v-0.048818898)\u003c1e-8)\r\n%%\r\nv=vote(1830,1041);\r\nassert(abs(v-0.274817137)\u003c1e-8)\r\n%%\r\nv=vote(1163,620);\r\nassert(abs(v-0.304542905)\u003c1e-8)\r\n%%\r\nv=vote(1446,514);\r\nassert(abs(v-0.475510204)\u003c1e-8)\r\n%%\r\nv=vote(1229,1116);\r\nassert(abs(v-0.048187633)\u003c1e-8)\r\n%%\r\nv=vote(1590,1215);\r\nassert(abs(v-0.133689840)\u003c1e-8)\r\n%%\r\nv=vote(990,252);\r\nassert(abs(v-0.594202899)\u003c1e-8)\r\n%%\r\nv=vote(948,918);\r\nassert(abs(v-0.016077170)\u003c1e-8)\r\n%%\r\nv=vote(2000,1999);\r\nassert(abs(v-0.000250063)\u003c1e-8)\r\n%%\r\nv=vote(1077,717);\r\nassert(abs(v-0.200668896)\u003c1e-8)\r\n%%\r\nv=vote(1296,801);\r\nassert(abs(v-0.236051502)\u003c1e-8)\r\n%%\r\nv=vote(1807,370);\r\nassert(abs(v-0.660082683)\u003c1e-8)\r\n%%\r\nv=vote(253,218);\r\nassert(abs(v-0.074309979)\u003c1e-8)\r\n%%\r\nv=vote(789,452);\r\nassert(abs(v-0.271555197)\u003c1e-8)\r\n%%\r\nv=vote(1647,203);\r\nassert(abs(v-0.780540541)\u003c1e-8)\r\n%%\r\nv=vote(1807,15);\r\nassert(abs(v-0.983534577)\u003c1e-8)\r\n%%\r\nv=vote(1503,929);\r\nassert(abs(v-0.236019737)\u003c1e-8)\r\n%%\r\nv=vote(1111,266);\r\nassert(abs(v-0.613652869)\u003c1e-8)\r\n%%\r\nv=vote(1534,564);\r\nassert(abs(v-0.462345091)\u003c1e-8)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T22:52:35.000Z","updated_at":"2017-02-25T22:53:48.000Z","published_at":"2017-02-25T22:53:48.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/6304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Vote\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 large cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=2000.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\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 [N,M], the quantity of votes to N and M\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 [V], the ratio of N always leading sequences to total sequences\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 [N,M] [V]; [2,1] [0.33333333]\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\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=2000 as 2000! may be a bit large. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":1903,"title":"GJam 2014 China Rd A: Maze with a Left Hand Rule","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p3 GJam 2014 China Cross the Maze\u003e.\r\n\r\nThe Goal is to minimally traverse a Maze from a Starting Point to Finish Point in less than 10,000 moves where the Bot can only go forward and must maintain its Left Arm in contact with a wall. At the Start Point the Bot can only touch NSEW. After the first move the Bot maintains contact on diagonals. Rotations in a cul-de-sac or turning are not counted as moves.\r\n\r\n\r\n*Input:* [M, Start_Finish] where M is an NxN (0,1=Wall) array and Start_Finish is [Sr,Sc,Fr,Fc]\r\n\r\n*Output:* Path, a string of Movements {N,S,E,W}. If Path is \u003e10,000 moves or No solution return a null string.\r\n\r\n*Examples:*\r\n\r\n  .##.#\r\n  .....\r\n  ...#.\r\n  .###.\r\n  ...#.\r\n  1 1 5 3\r\n\r\nNote: (1,1) is Top Left and start point for this case. \r\n\r\nThe # are replaced by 1s and '.' will be 0s.\r\n\r\nOutput: SEEENSESSSNNNWWSWWSSEE\r\n\r\n*Contest Performance:* Best Delta Time of 17 minutes with only 134 correct solutions in 3 hours.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p3\"\u003eGJam 2014 China Cross the Maze\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Goal is to minimally traverse a Maze from a Starting Point to Finish Point in less than 10,000 moves where the Bot can only go forward and must maintain its Left Arm in contact with a wall. At the Start Point the Bot can only touch NSEW. After the first move the Bot maintains contact on diagonals. Rotations in a cul-de-sac or turning are not counted as moves.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M, Start_Finish] where M is an NxN (0,1=Wall) array and Start_Finish is [Sr,Sc,Fr,Fc]\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Path, a string of Movements {N,S,E,W}. If Path is \u003e10,000 moves or No solution return a null string.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e.##.#\r\n.....\r\n...#.\r\n.###.\r\n...#.\r\n1 1 5 3\r\n\u003c/pre\u003e\u003cp\u003eNote: (1,1) is Top Left and start point for this case.\u003c/p\u003e\u003cp\u003eThe # are replaced by 1s and '.' will be 0s.\u003c/p\u003e\u003cp\u003eOutput: SEEENSESSSNNNWWSWWSSEE\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 17 minutes with only 134 correct solutions in 3 hours.\u003c/p\u003e","function_template":"function Path=Maze_CH(m,sf);\r\n  Path='';;\r\nend","test_suite":"%%\r\ntic\r\nzm=[0 1 ;1 0 ];\r\nzsf=[1 1 2 2 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 1 0 1 ;0 0 0 0 0 ;0 0 0 1 0 ;0 1 1 1 0 ;0 0 0 1 0 ];\r\nzsf=[1 1 5 3 ];\r\nvexp='SEEENSESSSNNNWWSWWSSEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 ;0 1 0 ;0 0 0 ];\r\nzsf=[1 1 3 3 ];\r\nvexp='EESS';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 2 2 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 1 0 1 0 1 ;0 0 0 0 0 0 0 0 ;1 1 1 1 1 1 1 0 ;0 0 0 0 0 0 0 0 ;0 1 0 1 0 1 0 1 ;0 1 1 1 1 1 1 1 ;0 1 0 1 0 1 0 1 ;0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 8 8 ];\r\nvexp='SEENSEENSEENSESSWSNWWSNWWSNWWSSSSEENSEENSEENSE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 1 4 ];\r\nvexp='SSSSSSSSSWWWWWWWWWNNNNNNNNNEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 3 1 ];\r\nvexp='EEEEEEEESESSSSSSSSWWWWWWWWWNNNNNNN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 7 1 ];\r\nvexp='EEEEEEEEESSSSSSSSSWWWWWWWWWNNN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 1 0 0 ;0 0 0 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 1 4 ];\r\nvexp='SSSSSSSSSWWWWWWWWWNNNNNNNNNEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;1 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 1 ;0 0 0 1 0 0 0 0 0 0 ;0 1 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 3 ];\r\nvexp='NNNNNENNWNNEEEEEEEEESSSSSWSSESSWWWWWWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 0 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 1 4 ];\r\nvexp='SSSSSSSSSWWWWWWWWWNNNNNNNNNEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 2 ];\r\nvexp='NNNNNNNNNEEEEEEEEESWSSESSSSSSWWWWWNWWSW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 1 1 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 1 10 ];\r\nvexp='WWWWWWWWWNNNNNNNNNEEWSSEENENEEEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 5 10 ];\r\nvexp='WWWWWWWWWNNNNNNNNNEEEEEEEEESSSS';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 0 0 0 0 0 0 0 ;0 0 0 0 1 0 1 0 0 0 ;0 0 0 0 0 1 0 1 0 1 ;0 0 0 0 1 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 0 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 1 ;0 0 0 1 0 0 0 0 0 0 ;1 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 9 1 ];\r\nvexp='SEENEEEEEEESWSSESSSWSSESWWWWWWWWNW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 1 0 0 0 0 0 1 1 ;0 1 0 0 0 1 0 1 1 0 ;0 0 0 1 0 1 0 1 0 1 ;0 0 1 0 1 0 1 0 0 1 ;0 0 0 1 0 0 0 0 0 1 ;0 1 0 0 1 0 0 1 1 1 ;0 0 0 1 0 1 0 0 0 1 ;0 1 0 0 0 1 0 0 0 0 ;1 0 0 1 0 0 1 0 0 0 ;0 1 0 1 1 0 0 0 0 1 ];\r\nzsf=[10 1 9 6 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 1 0 0 0 0 0 0 ;0 1 0 0 0 0 1 0 0 0 ;1 0 0 1 0 0 1 0 0 0 ;1 0 0 1 1 0 0 0 0 0 ;0 1 1 0 1 0 1 1 1 0 ;1 1 1 0 0 0 0 0 0 0 ;1 0 0 0 1 0 1 0 0 0 ;1 1 1 1 0 1 0 0 1 0 ;1 1 0 1 1 0 1 1 1 1 ;0 1 1 1 1 0 1 1 1 0 ];\r\nzsf=[1 1 10 6 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 0 0 0 0 0 1 1 ;1 0 0 1 1 0 0 1 0 1 ;0 0 0 1 0 0 0 0 1 0 ;0 0 0 0 1 0 0 0 0 1 ;0 0 1 0 0 1 0 0 0 0 ;0 0 1 0 0 0 1 0 0 0 ;0 0 1 1 1 1 1 1 0 0 ;1 0 0 0 1 0 1 1 1 0 ;1 0 0 0 1 1 0 1 1 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 3 6 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 1 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;1 0 0 0 0 0 0 0 0 0 ;1 0 0 1 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 1 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 1 0 0 ];\r\nzsf=[10 1 10 3 ];\r\nvexp='NNNNNSESEENNWNWNNWNESEENEEEEEESSSSSSSSSWNNWWSSWWWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 1 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 1 0 0 0 0 1 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 1 0 0 0 1 ;0 0 0 0 0 0 0 0 1 0 ;0 0 0 0 0 0 0 1 0 1 ;0 0 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 0 ];\r\nzsf=[1 1 5 3 ];\r\nvexp='EESEENSEENEEESWSSEWSWSWSSEENSESSNWWSWWWWWWWNNNNNEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 1 1 ;0 1 0 0 0 0 0 1 0 0 ;0 0 0 1 0 0 1 1 0 0 ;0 0 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 1 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 1 0 0 ;0 0 0 0 1 0 0 0 0 0 ];\r\nzsf=[10 10 8 10 ];\r\nvexp='WWWWNWWSWWWNNNNNNNNNEEEEEEEWSWSWSSEENEENNESSSSWWSSEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;1 0 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 1 1 0 ;0 0 0 0 0 0 1 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 1 0 0 0 0 ;1 0 1 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 10 ];\r\nvexp='ENSEENNWNWWSNNNENENNWWNEEESEENEEEESSSSNWWWSWSSEENESESSS';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 1 0 0 0 0 0 ;1 1 1 0 0 0 1 0 0 0 ;0 0 1 1 1 0 1 0 0 0 ;0 0 0 1 1 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 1 0 ;0 0 0 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 6 10 ];\r\nvexp='WWWWWWNWWSWNNNNNNNESEWSSEENEENNNWWNWWWEEESEENEEEESSSWSSE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 0 ;0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 1 1 0 0 1 ;0 0 0 0 0 0 0 1 0 0 ;1 0 0 0 0 1 0 0 1 0 ;0 0 0 0 0 0 0 0 0 1 ;0 0 0 1 1 0 1 0 0 0 ;0 1 1 1 0 0 0 1 0 0 ;0 0 0 0 1 0 1 0 0 0 ];\r\nzsf=[1 10 6 2 ];\r\nvexp='SSWSSESNWNWNNWWSWSSEESESESESSWWENNWNWWSSEWSNWENNWWWSWWSSEEEWWWNNNEN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 1 0 0 0 ;0 0 0 1 0 1 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 1 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 1 0 ;0 0 0 0 0 0 0 1 1 0 ;1 1 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 2 8 ];\r\nvexp='SSSSSSSSSWWWWWWWNWWSNEENNWWNEENNWWNNNEEEEEWSSEWSSEENENN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[1 0 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 1 0 0 0 ;1 0 0 0 0 0 0 0 1 0 ;0 0 1 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 1 ;1 0 0 0 1 0 0 0 0 0 ;0 0 0 1 0 0 0 0 1 0 ;0 0 1 0 0 1 0 0 0 0 ;0 0 0 0 0 1 0 1 0 0 ;0 0 1 0 0 0 1 0 1 0 ];\r\nzsf=[1 10 1 6 ];\r\nvexp='SSSWSSESSSSNWNWWSNNWWSSSEWWNWWSWNNNENNWNENNWENEEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 0 1 0 1 0 ;0 0 0 0 0 0 0 0 1 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 1 0 0 0 ;1 0 0 1 0 0 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 0 ;0 0 0 0 1 0 0 0 1 0 ];\r\nzsf=[1 1 7 4 ];\r\nvexp='EEEEESSEENNEESSSSSSSSSNNWWSSWWNWWSWWWNNEENNWNWESESE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 0 1 1 1 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 1 0 0 ;0 0 0 1 1 1 0 0 0 0 ;1 1 1 0 0 0 0 0 1 0 ;0 1 0 0 0 1 0 0 0 1 ;0 0 1 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 1 0 0 0 0 ;0 0 0 1 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 5 ];\r\nvexp='NNNNSESEENNWENEEENNWWWNWWSSEWWNNNSEENESEEEENSEENSSSSNWWSSESESSSWWWWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 1 1 0 1 ;0 0 1 0 0 0 0 0 0 0 ;0 1 0 1 0 0 0 0 1 0 ;0 0 0 0 1 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 1 ;0 0 0 0 1 0 0 1 0 0 ;0 0 0 0 1 0 0 1 0 1 ;0 0 0 0 0 1 0 0 1 0 ;0 0 0 0 0 1 1 0 0 0 ;0 0 1 0 0 0 1 0 0 0 ];\r\nzsf=[10 1 9 2 ];\r\nvexp='NNNNNNNNNEEEEESEEENSESSWSSEWSNNWWSSSESEENSSWWNNWNWNNWWSSSESSEWWNWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 0 1 0 0 0 ;1 0 0 0 0 1 1 0 0 1 ;0 0 1 1 0 0 0 0 1 0 ;0 1 0 1 0 0 0 0 1 0 ;1 1 0 0 0 0 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 0 ;1 0 0 0 1 0 0 0 0 1 ;0 0 0 0 0 1 0 1 0 0 ];\r\nzsf=[10 1 8 4 ];\r\nvexp='ENNWNEENNNSEENNNWWWSWSNENNWEESEENEWSSEEENNEEWSWSSSEENNSSSSSWSSEWNWWSNWNWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,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":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-30T03:46:21.000Z","updated_at":"2026-02-10T13:15:01.000Z","published_at":"2013-09-30T04:01:29.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/2924486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Cross the Maze\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Goal is to minimally traverse a Maze from a Starting Point to Finish Point in less than 10,000 moves where the Bot can only go forward and must maintain its Left Arm in contact with a wall. At the Start Point the Bot can only touch NSEW. After the first move the Bot maintains contact on diagonals. Rotations in a cul-de-sac or turning are not counted as moves.\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 [M, Start_Finish] where M is an NxN (0,1=Wall) array and Start_Finish is [Sr,Sc,Fr,Fc]\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 Path, a string of Movements {N,S,E,W}. If Path is \u0026gt;10,000 moves or No solution return a null string.\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\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[.##.#\\n.....\\n...#.\\n.###.\\n...#.\\n1 1 5 3]]\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:t\u003eNote: (1,1) is Top Left and start point for this case.\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 # are replaced by 1s and '.' will be 0s.\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\u003eOutput: SEEENSESSSNNNWWSWWSSEE\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 17 minutes with only 134 correct solutions in 3 hours.\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\"}]}"},{"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\"}]}"},{"id":1901,"title":"GJam 2014 China Rd A: Read Phone Number","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number\u003e. Small Case.\r\n\r\nThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively.\r\n\r\n\r\n*Input:* [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\r\n\r\n*Output:* Text, a string of the reading based upon segments\r\n\r\n*Examples:*\r\n\r\n  [Number,Segments]  [Text]\r\n    ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n    ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n    \r\n\r\n*Contest Performance:* Best Delta Time of 11 minutes with 1885 of 3058 able to process the small data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard\"\u003eGJam 2014 China Read Phone Number\u003c/a\u003e. Small Case.\u003c/p\u003e\u003cp\u003eThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Text, a string of the reading based upon segments\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Number,Segments]  [Text]\r\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 11 minutes with 1885 of 3058 able to process the small data set.\u003c/p\u003e","function_template":"function Text = Phone_CH(str,v) %\r\n Text='';\r\nend\r\n\r\n% One method for inserting strings from a cell array\r\nfunction valuestr=Phone_number(x)\r\n valuecell={'zero' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine'};\r\n valuestr=valuecell{x+1};\r\nend\r\n\r\nfunction qtystr=Phone_qty(x)\r\n qtycell={'' 'double' 'triple' 'quadruple' 'quintuple' 'sextuple' 'septuple' 'octuple' 'nonuple' 'decuple'};\r\n qtystr=qtycell{x};\r\nend","test_suite":"%%\r\ntic\r\nzstr='1';\r\nzv=[1 ];\r\nvexp='one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='22';\r\nzv=[2 ];\r\nvexp='double two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='333';\r\nzv=[3 ];\r\nvexp='triple three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4444';\r\nzv=[4 ];\r\nvexp='quadruple four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='55555';\r\nzv=[5 ];\r\nvexp='quintuple five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='666666';\r\nzv=[6 ];\r\nvexp='sextuple six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7777777';\r\nzv=[7 ];\r\nvexp='septuple seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='88888888';\r\nzv=[8 ];\r\nvexp='octuple eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='999999999';\r\nzv=[9 ];\r\nvexp='nonuple nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0000000000';\r\nzv=[10 ];\r\nvexp='decuple zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111';\r\nzv=[1 1 1 1 1 1 1 1 1 1 ];\r\nvexp='one one one one one one one one one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111';\r\nzv=[1 2 3 4 ];\r\nvexp='one double one triple one quadruple one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6701604014';\r\nzv=[1 4 5 ];\r\nvexp='six seven zero one six zero four zero one four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4096453178';\r\nzv=[8 2 ];\r\nvexp='four zero nine six four five three one seven eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5418148180';\r\nzv=[5 3 2 ];\r\nvexp='five four one eight one four eight one eight zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2319652041';\r\nzv=[8 2 ];\r\nvexp='two three one nine six five two zero four one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9645684646';\r\nzv=[6 2 1 1 ];\r\nvexp='nine six four five six eight four six four six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4508456969';\r\nzv=[5 3 2 ];\r\nvexp='four five zero eight four five six nine six nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1839791609';\r\nzv=[5 1 3 1 ];\r\nvexp='one eight three nine seven nine one six zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9398750802';\r\nzv=[1 1 1 4 2 1 ];\r\nvexp='nine three nine eight seven five zero eight zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5263950835';\r\nzv=[4 5 1 ];\r\nvexp='five two six three nine five zero eight three five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1456187089';\r\nzv=[3 6 1 ];\r\nvexp='one four five six one eight seven zero eight nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='64360690';\r\nzv=[8 ];\r\nvexp='six four three six zero six nine zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7367';\r\nzv=[2 1 1 ];\r\nvexp='seven three six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2441739';\r\nzv=[5 2 ];\r\nvexp='two double four one seven three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7532179';\r\nzv=[1 1 2 2 1 ];\r\nvexp='seven five three two one seven nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0850664';\r\nzv=[3 4 ];\r\nvexp='zero eight five zero double six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='8013334';\r\nzv=[5 2 ];\r\nvexp='eight zero one double three three four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0184088';\r\nzv=[2 1 4 ];\r\nvexp='zero one eight four zero double eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='706181428';\r\nzv=[4 4 1 ];\r\nvexp='seven zero six one eight one four two eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='98530';\r\nzv=[5 ];\r\nvexp='nine eight five three zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='29664';\r\nzv=[5 ];\r\nvexp='two nine double six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='49502';\r\nzv=[2 3 ];\r\nvexp='four nine five zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='15';\r\nzv=[2 ];\r\nvexp='one five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='562640038';\r\nzv=[4 4 1 ];\r\nvexp='five six two six four double zero three eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1148979';\r\nzv=[6 1 ];\r\nvexp='double one four eight nine seven nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='79982';\r\nzv=[3 1 1 ];\r\nvexp='seven double nine eight two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='769';\r\nzv=[3 ];\r\nvexp='seven six nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1742234';\r\nzv=[6 1 ];\r\nvexp='one seven four double two three four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='81818447';\r\nzv=[5 1 1 1 ];\r\nvexp='eight one eight one eight four four seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5';\r\nzv=[1 ];\r\nvexp='five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='86';\r\nzv=[2 ];\r\nvexp='eight six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0573913609';\r\nzv=[6 1 2 1 ];\r\nvexp='zero five seven three nine one three six zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='497772738';\r\nzv=[1 3 2 3 ];\r\nvexp='four nine double seven seven two seven three eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2252931';\r\nzv=[1 5 1 ];\r\nvexp='two two five two nine three one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='19664';\r\nzv=[3 2 ];\r\nvexp='one nine six six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='566175';\r\nzv=[5 1 ];\r\nvexp='five double six one seven five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='92433';\r\nzv=[4 1 ];\r\nvexp='nine two four three three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='912039567';\r\nzv=[1 6 2 ];\r\nvexp='nine one two zero three nine five six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4820841';\r\nzv=[5 1 1 ];\r\nvexp='four eight two zero eight four one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='71';\r\nzv=[1 1 ];\r\nvexp='seven one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4690';\r\nzv=[1 1 2 ];\r\nvexp='four six nine zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='106624';\r\nzv=[4 2 ];\r\nvexp='one zero double six two four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7900005';\r\nzv=[6 1 ];\r\nvexp='seven nine quadruple zero five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='407';\r\nzv=[2 1 ];\r\nvexp='four zero seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7738672895';\r\nzv=[8 1 1 ];\r\nvexp='double seven three eight six seven two eight nine five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='027326244';\r\nzv=[2 2 4 1 ];\r\nvexp='zero two seven three two six two four four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='115855';\r\nzv=[2 1 2 1 ];\r\nvexp='double one five eight five five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6553794';\r\nzv=[5 1 1 ];\r\nvexp='six double five three seven nine four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='426185417';\r\nzv=[8 1 ];\r\nvexp='four two six one eight five four one seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='31';\r\nzv=[1 1 ];\r\nvexp='three one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='68';\r\nzv=[1 1 ];\r\nvexp='six eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='05658716';\r\nzv=[4 4 ];\r\nvexp='zero five six five eight seven one six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='87';\r\nzv=[1 1 ];\r\nvexp='eight seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='99329';\r\nzv=[3 2 ];\r\nvexp='double nine three two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='21';\r\nzv=[1 1 ];\r\nvexp='two one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='82';\r\nzv=[1 1 ];\r\nvexp='eight two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3273256549';\r\nzv=[8 1 1 ];\r\nvexp='three two seven three two five six five four nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4';\r\nzv=[1 ];\r\nvexp='four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0';\r\nzv=[1 ];\r\nvexp='zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='780409';\r\nzv=[4 1 1 ];\r\nvexp='seven eight zero four zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='252966140';\r\nzv=[4 3 2 ];\r\nvexp='two five two nine double six one four zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3416708243';\r\nzv=[10 ];\r\nvexp='three four one six seven zero eight two four three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='715';\r\nzv=[2 1 ];\r\nvexp='seven one five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='714860127';\r\nzv=[7 2 ];\r\nvexp='seven one four eight six zero one two seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='148725';\r\nzv=[4 2 ];\r\nvexp='one four eight seven two five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='130';\r\nzv=[2 1 ];\r\nvexp='one three zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='59696645';\r\nzv=[1 1 1 2 3 ];\r\nvexp='five nine six nine six six four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='221065';\r\nzv=[2 2 2 ];\r\nvexp='double two one zero six five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='57715162';\r\nzv=[2 3 2 1 ];\r\nvexp='five seven seven one five one six two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='110';\r\nzv=[2 1 ];\r\nvexp='double one zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7537367';\r\nzv=[1 4 2 ];\r\nvexp='seven five three seven three six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9526681205';\r\nzv=[6 3 1 ];\r\nvexp='nine five two double six eight one two zero five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0818593729';\r\nzv=[1 3 2 4 ];\r\nvexp='zero eight one eight five nine three seven two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='729800081';\r\nzv=[9 ];\r\nvexp='seven two nine eight triple zero eight one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2124';\r\nzv=[1 1 1 1 ];\r\nvexp='two one two four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7045';\r\nzv=[3 1 ];\r\nvexp='seven zero four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6317406';\r\nzv=[7 ];\r\nvexp='six three one seven four zero six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='922906835';\r\nzv=[8 1 ];\r\nvexp='nine double two nine zero six eight three five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='55';\r\nzv=[2 ];\r\nvexp='double five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='70985826';\r\nzv=[3 2 1 2 ];\r\nvexp='seven zero nine eight five eight two six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1619499314';\r\nzv=[8 1 1 ];\r\nvexp='one six one nine four double nine three one four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='89375';\r\nzv=[1 1 3 ];\r\nvexp='eight nine three seven five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='655162';\r\nzv=[1 5 ];\r\nvexp='six double five one six two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='180902';\r\nzv=[3 3 ];\r\nvexp='one eight zero nine zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='39106';\r\nzv=[5 ];\r\nvexp='three nine one zero six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='82361352';\r\nzv=[6 2 ];\r\nvexp='eight two three six one three five two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='39';\r\nzv=[1 1 ];\r\nvexp='three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='63';\r\nzv=[2 ];\r\nvexp='six three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='16748';\r\nzv=[5 ];\r\nvexp='one six seven four eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":13,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-29T21:29:44.000Z","updated_at":"2013-09-29T21:55:08.000Z","published_at":"2013-09-29T21:45:58.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/2924486/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Read Phone Number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case.\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 Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively.\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 [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\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 Text, a string of the reading based upon segments\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\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[[Number,Segments]  [Text]\\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 11 minutes with 1885 of 3058 able to process the small data set.\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\"}]}"},{"id":2264,"title":"GJam 2011 Africa Qualifier C: House, maximum area rectangle","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/837485/dashboard#s=p2 GJam 2011 Africa: Building a House\u003e.\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003chttp://code.google.com/codejam GJam Registration\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.\r\n\r\nDetermine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks.  Square is a special rectangle.\r\n\r\n*Input:* M, Text Array of GWRST\r\n\r\n*Output:* A, maximum House area that can be placed\r\n\r\n*Example:*\r\n\r\n  GGTGG  A=9\r\n  TGGGG\r\n  GSSGT\r\n  GGGGT\r\n  GWGGG\r\n  RGTRT\r\n  RTGWT\r\n  WTWGR\r\n\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/837485/dashboard#s=p2\"\u003eGJam 2011 Africa: Building a House\u003c/a\u003e.\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003ca href = \"http://code.google.com/codejam\"\u003eGJam Registration\u003c/a\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.\u003c/p\u003e\u003cp\u003eDetermine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks.  Square is a special rectangle.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e M, Text Array of GWRST\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e A, maximum House area that can be placed\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eGGTGG  A=9\r\nTGGGG\r\nGSSGT\r\nGGGGT\r\nGWGGG\r\nRGTRT\r\nRTGWT\r\nWTWGR\r\n\u003c/pre\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://go-hero.net/jam\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/p\u003e","function_template":"function A=House(m)\r\n% GRWST: G1 R0 W0 S1 T0    [0 11 16 12 13] on G subtract\r\n A=0;\r\nend","test_suite":"%%\r\nnc=1;\r\nstr='G';\r\nAexp=1;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=2;\r\nstr='GSSG';\r\nAexp=4;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=2;\r\nstr='GTGG';\r\nAexp=2;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=5;\r\nstr='GGTGGTGGGGGSSGTGGGGGRWTRTRTWWTWTWRR';\r\nAexp=9;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=48;\r\nstr='SSGSGSSGGGWSSSGSGGGGGGSGGSGSSGGSGGGSSSSGSSSSSSGSGSSSSGSGGSGSSSGGGGGGSGSGSGSSSSSSSSGGGGGSGGGSGSSSSGGSGSSGSGSSGSSSGSGGGSGSSSGSSGGGGSGSSSSSSGGGSGGGGGGSGSGSSSSGGGSSSGGGGGSGSSSGSGSSGSGGSSSSSSGGSSGGGSGSGGGGSSGGGGSSSSSSGGSGGSGGSGSGGSSGGGGSRGSGGSGSSSSSGSGGSSSSGSGGSSSSGSSSGSGGSSGGGGSSGSSGSSGGSGGSSGSSGSGSGGSGSGGSGGGGGGGGGSGGSGSSSSSGSSSGGGSSSGSSGSGSSGGSGSSGGSGGSGSSSGSGGGSGSSSSSGGSGGGGGGGSSGGSSSSSGGGGSGSSSGGGSSGSGSGGGGGSSSGGSGGGGSSSGGGGGSGSSSSSGGSGSSSTGGSSSSSSSSSGSGRGGSSSGSGGSSGSSGGGSSGGGGGGSGGGSGGSGGGGSGSSSGSGGSSSGGGSGSGSGGGGSSSGGGSSSGSSSGGGGGGGSGSGSSSSSGSSGGSGGSGSGGSGSSGGGSGSSGSSGSSSSGSGGGGGSGGGSGSGSSSSGGSSGGSSGGSSGGGGSSGGGGGGSSSGSSGSSSGGGGSGGGSSGSSSGSSGGGGSSGSGSSGSSGSGGGSGGSSSGGGGSSGGGGSSGGSSGGSSSSGGSGGSGGSGSGSSGGGSGGSSSSGSSSGGGGGGGGGSSSSSGSGSGSSGGGGGGSSSSGGSGGSGSSSSGGSGSSSSSSSGSGGSSGGSGGSSSGSSSSSSGSGGGSSGGSGSGGGGSSGSSGSSGGSGSGSSGSSGGSSGSSGGGGSSGSSSGGGSSSSGGGGSGGSGGSGGGGGGSGGGSGSGGSGGGSSSSSGSSGGGSGSSSGSSGGSGGSSGGSGGSGGSGGSGGSSSGSGGGGGSSSGGGSSGGSSGSSSSSGSSSSSSSGGSGGGGGGGGGSSGSSGGSSGGGGGGSSSGGGGSGGGSSSSSGGSSGSGSSSGSGSGSGGGGGSSGGGSGSGGSWGGSSSGGSGSGGGGSSSSSGSSSSGSSGGGSGGSGSGGGGGSGGGSGSSSGSGSSGGSSGGSSGSGGGGSSGGGGSGGSSGGSGSSSSGSGGGGGGSGSSSGSSSGSSGSSSSSSSGSGGGGSSGGSGGSGSSGSGSSGSGGGGGSSSSSSGGSGSGGGSSGGSSGSSGGGSGGSGGSGGSGSSGGSGGSGGSGGSGSGGGSSGGSSGGSSGSGGSSGGGSSSGGSSSSGGSSGGSSGSSGGSGGGSGSSGGGGSGSSGSGSSSGGGGSSSSGGGGGSRGGGGSGGSSSSSGGSGGGGGSSSSGGGGGSGSGSSSGGGSSSGSGGSSSGSGSSSGGGSGGGGGSGSSSSSGGSSGSGGSSSSGGGGGSSSSSSSSGGGGSGSGGSSSGGGGSGSSSGSGSSSSGSSGSGGSSSSSGGGSSSGGGGSSSSSSGSSSSGGGSGSGSSSSSSSGGGGGSSGGSSGSSGSSGSGGSSSSSGGGGSGSSSGGSSSGSGGGSGGSSSGSSGSGSSGSSSGGSSSGGGGSGSSSGSSSGSGSSSGGGGSGSGGSSGGSGSSGGSSGGGGGSGGSSGSSSGGGSSSSGGGGSSSSGRGSGSSSSGSSGGGSGSGSGSSSSGSGGSSGGGSSGSGGSGGGGSGGGGGSGGGSGGGSSGSSSSSSGGSSGSGSSSGGGGSGGSSSSGSSSGGGGSGSGSGGGGGSGGGSSGGSSSGSGGGSGSSSSSSSSGRSGSSGSGGGSSSGGSSSGGSGGGSGGGSGSGGSGSGGGGGSSSGGSGGGSGGSSSSSSSGGSSSSGSSSGSGSSSSGGGGSGGSSGGGGGGGGGGSSGSGGSGGSGGSSGSGGGGSSGSGGSGGGGSSSSSSSSSTGSSGSGGGSSGGGSGGGGGGGSSGGSSSSGSSGSSGSSGGSSSGSSSSGSGGGGSGSSGSGSSGGGGGSGGGSGGGGSSGSSGSGGSSSSSSSSSGSGGSGGGGGSSSGGGGSSGSGGGGGSGGGSGGGGGSSSGSSSGSSSSSSGGGSSSGSSGSGGGGSGGGGSGSGGSSSSGSGSGSGSGSSGSSSGSSGSGGGSSSSSSGSSGGGSSSSGGSSGSGSSGSSGGSGGGSGSGGSGGGSSSGGGGGGGSSSGSGGGGSG';\r\nAexp=805;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=4;\r\nstr='GSGGGGGSGGGGSGGSGGSSGGSSSGSGGSGSGGGSSSGSGSGSSSSSSSSSSGSGGSGGSSGGGGGGSSSGSGSGSGSSGSSSGGSSGGGGSGGSSGGGGGGSSGGGSGSSSGGGGSSSGGSSSGSS';\r\nAexp=128;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=46;\r\nstr='GSGSSSSGSSGSSGSSGSSSSSSGGSSSSGGSSSSSSSSSGSSGGGGGSSGSGSGSSGGSGGSGSGGSGSSSGGGGSSSSGGGGSSGSSSSSSSGGSSSGGGGGSSSSSGSGSSGSGGSGGSSGGGSGSSSSGSSGSGSSGSSSSSSSSSGGSGSGSSSGSSSGSGGSSGGGGRGGSGGGGGGGSSGSGGGGGGSSSGSSGSGSGGSSGSSGSGSSSGSGGSSGSGGGSGSSSGSGSSSGSSSSSSSGGSGGGSSSGGGSSGGSGSGSGSGSGGGSGGGSSSSGSGGSGGGGGSSSGGGSSSSSGGSGGSSSSSGGSGSGGSGSSGSGSSSGSSSGGSSGSSGSGSGGSGSSGSSSGGGSSGSGSGSSSGSSGGSSSSSSGGSGSSGGSGGGSGSGGSSSGSSGSGTSGSSSSSGSSGGGSSSGSGSRGGGGGGGGGGGGSGSGGGSGSGGSSGSSGGGSGSSSGGSSGSGSGSSSGSGGRSGGGGSGGGSSGSSGSGGGGGGSSGSSGGGSSGGSGSGGSGGSSGGGGSSSSGGSGSSGGSSSGGSSSSSSGGSSSGGSSSSSGGSSSSGGWGSGGSGGGGGGSSSGGGSGSGGSSSSSGGSGSSSSSGGGGSSGSGGSGGSGGGSGSGSGGSGSGSSSGSSSSGGSGGGGGSGSSSGGGSGSSSSSSSGSGSSSSSGGGGGGGSSGGGGGGSSSGGSSSSSSSSGSSGSSGSSSGGGGGSSSGSSGGGGGSGSSSGSGSSSGSSGSSSSSSGSGSGGGGGGSGSGGGGGGSGGGGSGSGGGGSSGSSGGSGGSSSSSGGGSSSGGGGSSGSGGGGGSGGGGSWGSG';\r\nAexp=315;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=48;\r\nstr='SGGSSSGGGSSGGSGSGSSSGSGGSGSGSSGGSSSGSSGGSGSGSSGSSSSGGSGGSGGSSGGGSSSGSGGGSGGSGGSGSSGGSGSSGSSSWGSGGGGSGSSGGGSGGSSGSGGGSGGSSGGGSSGSGGGGSGSSGGSGGGGSGSGSSSSGGGSGGGGSSGGSSGSSGSGSSSGSSGSSGSSSGGSSGGSSGGGGGSGSSSGSSSSSSGSGSGGSSSGSSGSGGSSSGSSSGGSSGSGSSSSSSSSSGSGGGGGGSGSSGSSSSSSGSGSGGSGGGGSGSGSGGSSWGGSGSGSGGSGGGSSGSGGGSSSGSSGSGSSGSGGSSSRRSGSGGGGSGSSSSGGGSSSGSGSGGSSGGSGSGGGSSSGSGSSGGGGSGSGGSGSSGGSGGGSSGGGSSSSSGGSSGGSSSGGGSGSSGGSSGGSSSSSSWSSGSSGGSSGSGSGGSSSSSGSSGSGSSSGSSGSGSGSSSGSSSGSGSSGSSSGSGGGGGSGGSSSSGSGSGGSSSGGGSGGGSSSSSSGSGSSSGSSGSGSSGSSGSGSSSSSSSGSGSSGGGGSSSGSSSGGSGSGGGGSGSSGGSGGSSGSGSGSSSSGSGSSSSGSGGGSSSSGSGGGGGSGSSGSGSGSSSSSGGGSGSGGSGGGGGSSSSGSGSGSSGGGGGGGSGSSSGGGSSGSSSSSSGGSSSSGGGSSGGGSGSGGGGSGGGGSSSGGGGSGSGGGGSSGSSSSSSGSSGSSSSSGSGSSGGGSSSSSSSGGGSSSSGGSGGSSSSSSGGGGSSSSGGSSSGSGSSGSSGGGGSGSGGSGGSGGSSSSGGSSGSGSSSGGSGSGSSSSGGGGSSSSSGRGGSSSSSSSGGGSSGSGSGSSGSGSSSSGGGGSSSGSSGSGSGGGSGGSGSSGGGGGGGSGGGSGGGGGGSGSSSGSSGSSSSSSGSSGSGGSGGSGSSSGSSSGSSGSGGSSGGGSGGGSSSGSGGSGSGGSGGGSSGSGGSGGGGGGSSGSGSSSSGGGSGSSSSSGGSSSSGGGGGSGGGGSSGGGGGGGGGSSSGGGSGRSSGGGSSGGGGSGGSSGGGSSSGGGGSSGGGGGGGSGGGGSGGTGGGSGGSGGSGSGSSSGGSGGSSGGGSGSGSSGGSGSSGGSSGGSSGGSGGSGGSSSSSGGSGGGGGSGGGSSSSSSGGGGSGSSGGGGSSGSGGGGGGSGGGSSGSGSSSGSSSSGGSGGGGGSGGGGGGGGSSSSSGGSSGGGSGSSGSSGGSSSGSGGGGSGGSSSGGSSSSSSGSGGGSSSGSGSGGGSSGGGSSSSGGSSSGSSGGSSSSGGGSSSSSSGSSSSGSSSGGGGSSGSSGSGSGRGSSSSSSGSSSGSSGGSSSGSSSGGSGGSGSSGSSSSSSGSGSSSGSSGGSGSSSGGGSSGSGSSGSSGSGGSGGSGGSSGGSGGSGSGGGGGSGSSGGSSGSGGGSSSSGGSSSSSGGGGRSSSGGGSSSSGGSSGGSSSSGSSSGSSSSSSGSSSGSSGSSGSSGGSSGSSGSGSSSGSGGSGTGRSGGSSSSSGSSSSGGGGSSGGGSGGGGGSSSGSGGGGGSGSSGSGSSSSSSGGGSSSGGGGGSGGSSGSGGGGSTGGGSGGGSSSSSGGSGGSSSSSGSSSSSSSGGGSGGGGGSSSGSSGGGSSGSGGSSSGSSGSSSSSSGGSGSSSSGGGGGSSSGSSGSSSGGGSSSSGGGGSGSGSSSGGSSSSGSGGGGGGSSGSSGSGGSSGGSGGSGGSGGGGGGGGSSSRSGGGGGSSGSSGGGSSGSGGSGGSGSGSGSGSGSSSSSSSGWSSGSGSSGSSGGSGGGGGGGGSSSSGSGGGGSSGGSSGGGGSSGSSSGSGSGSGGGGSSSSSSGGSGSGSSSSSGGGGGGGGSSGGGSGGSGGGSGGSGGGSGGGGGGSGSSGSSSSGSGGGSGGSGGSGGSSGSGSSGGSGGSSGSGGSSSGGSGGGSSSGGSGGGGGGGGSSGGGGGGSGSGSGGGGGGGGSSGGSGSGSSSGSSSGGGGGSSSSGGGGSGGSGGGSGGSSGGSGGSGSGGSGGGSSGSGSSSSSSGSGGGGGGSSGSGSSSGSGGGGGSGGGSGSGSGSSGSGSGGGSGGSSGSSGSGGGSSGGSSGGSSGSSGGSSGGGSSSSSGSSGSGGGSSSGGGGSSGGSSSGSSSSSS';\r\nAexp=646;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=8;\r\nstr='TGGSWGSRRSGWTGGTTSSGSGGGRGSSSGSSSGGGRSRSSSSGSSSSGGGSSGSGSTSSTSGSSGSGSSTS';\r\nAexp=16;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=41;\r\nstr='SSGSGSGGGGSSGSSSGSGGSGSSSGSGGSGGGGSGGSGSSGGSWGSSSSSGSGSSGGSSGSSSGSSGSGGGSGSSGSGGGSGSGGTGSGSGSGGGSSSGSGSSGSSGSGSSGSGSSSGGGGGSSSSSGGSSSGGSSGSSSSSSGGSSGSGSSSSGGGSSGGSGGGGSSGGSGSSGSGGGGGGGGSWSSRSSSSSGGSGSGGSGSSGSSSGGGSGSGGSSGSWSGGSSGGSSSGGGGGSGGSSSGGSSSGSGGSSGGGSSGSSGSGSSWSSSSSSSGGGGGSGGSGSSSSSSTSGSSSSSSGSGWSSGSSSSSGGGSSGSSSGGGGSSSSGSGSGWSSGSGSSGSSSGGSSSGSGSGGGSGSSGGGSSSGGGSGGSGGGSGGGGGGGSSGGGSGSGGGSSSSSRSSGSGSGGGGSGSSSGSGSSGGGGGSSSGSGSGSSGGGGSSSGSSSS';\r\nAexp=144;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=35;\r\nstr='SSSGGSSSSSSGSSGGGGGGSSGGGGGGGSGGSSGGSGGSGSGGGRSGSSSGSSGSGGTGSGSGGSGSSGSGSGGSGGGGSSSGGGGGGGSGSSGSGGGSGSGGSGSSSGSSSGSSGSSSGGSGSGSSSGGGGGSSSGGGSSSSSSSSGGGSSGGSGSSGGGGGGGGGSGSSSSGGGGGSSGGSGSGSSSGGSSSSSGGGGGSGSRSSGGSGSSGSSSSGSGGGSSGSGSSSSSSSGSGSSSGGG';\r\nAexp=150;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\n% function GJam_Africa_2011C\r\n% %House\r\n% %fn='C-small-practice.in';\r\n% fn='C-large-practice.in';\r\n% [data] = read_file(fn);\r\n% \r\n% %fidG = fopen('C-small-output.out', 'w');\r\n% fidG = fopen('C-large-output.out', 'w');\r\n% tic\r\n% for i=1:size(data,1) % Cell array has N rows of cases\r\n%  A = House(reshape(data{i,2},data{i,1},[])' ) ;% data matrix GWRST \r\n%  toc\r\n% % continue\r\n%    fprintf(fidG,'Case #%i: %i\\n',i,A);\r\n%    fprintf('Case #%i: %i\\n',i,A);\r\n%   \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% fclose(fidC);\r\n% \r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% %Read a numeric of lines to count\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% set=0;\r\n% while ~feof(fid)\r\n%  nrc=str2num(fgetl(fid)); % [nc nr]\r\n%  str='';\r\n%  for i=1:nrc(2)\r\n%   str=[str fgetl(fid)]; % read line of data, convert to vector\r\n%  end\r\n%  set=set+1;\r\n%  d{set,1}=nrc(1); % need to do a transpose after\r\n%  d{set,2}=str;\r\n% end\r\n%  fclose(fid);\r\n% end\r\n% \r\n% function A=House(m)\r\n% % GRWST: G1 R0 W0 S1 T0    [0 11 16 12 13] on G subtract\r\n%  m=m-'G'; % Convert String array to binary\r\n%  m(m==12)=0;\r\n%  m=double(~m);\r\n% \r\n%  [nr,nc]=size(m);\r\n%  A=0;\r\n%  % try all [1:nr,1:nc] overlay convolutions and find max\r\n%  for i=1:nr\r\n%   for j=1:nc\r\n%    if i*j\u003eA % speed enhance, faster than continue continue \r\n%     mc=conv2(m,ones(i,j)); \r\n%     if nnz(mc==i*j) % fastest array compare\r\n%      A=i*j; % Current Max Rectangle\r\n%     end\r\n%    end\r\n%   end % j\r\n%  end % i\r\n%  \r\n% end % House\r\n%\r\n% Data input example\r\n%10\r\n%1 1\r\n%G\r\n%2 2\r\n%GS\r\n%SG\r\n%2 2\r\n%GT\r\n%GG\r\n%8 9\r\n%GGGSGGSG\r\n%RSGGSGGG\r\n%GSSGSGGG\r\n%GGSSSGSS\r\n%SGGGSSRS\r\n%SSWGSSSS\r\n%GGGSSGSG\r\n%SGSSSWGS\r\n%SGSGSSGS\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":20,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-03-31T04:20:54.000Z","updated_at":"2026-01-22T14:29:29.000Z","published_at":"2014-03-31T04:32:30.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/837485/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2011 Africa: Building a House\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Google Code Jam 2014 Kicks Off its Qualifier round April 11.\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\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Registration\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.\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\u003eDetermine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks. Square is a special rectangle.\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 M, Text Array of GWRST\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 A, maximum House area that can be placed\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\u003eExample:\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[GGTGG  A=9\\nTGGGG\\nGSSGT\\nGGGGT\\nGWGGG\\nRGTRT\\nRTGWT\\nWTWGR]]\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:t\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\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\"}]}"},{"id":1944,"title":"GJam 2014 China Rd B: Dragon Maze","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p3 GJam 2014 China Dragon Maze\u003e. Small Case.\r\n\r\nThe Goal is determine the optimal minimum distance path that maximizes score. Multiple minimum distance paths may exist. Output the score for the path that maximizes the cumulative sum of the path. \r\n\r\nThe input is a vector of Entrance/Exit [ENx,ENy,EXx,EXy] and a Matrix of Points. The Matrix and Entrance/Exit are zero based (Top Left is (0,0)).\r\nEntrance and Exit will be valid. A [-1] in the matrix is a Wall that can not be traversed. Movement is limited to NSEW, no diagonals.\r\n\r\n\r\n*Input:* [VEE] [M], VEE is 1x4 [ENx,ENy,EXx,EXy], Matrix (NRxNC \u003c=10).\r\n\r\n*Output:* [P] maximum Points. If Impossible P=-1;\r\n\r\n*Examples:*\r\n\r\n  [VEE] [M]   [P]\r\n  [0 2 3 2][-1 1 1 2;1 1 1 1;2 -1 -1 1;1 1 1 1] [7]\r\n\r\n \r\n*Contest Performance:* Best Delta Time of 17 minutes with 336 of 2010 able to process the small data set.\r\n\r\n\r\n*Strategy:*\r\n\r\n  1) Check Start/Finish path existence while creating path distances from start. (Suggest offset by +1 to match array). \r\n  2) A ring of Zeros around the array may simplify processing.\r\n  3) My preference is to work from Finish to Start while tracking best scores for the Kth distance from the Start. A few tricks here to only check for valid prior values.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p3\"\u003eGJam 2014 China Dragon Maze\u003c/a\u003e. Small Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine the optimal minimum distance path that maximizes score. Multiple minimum distance paths may exist. Output the score for the path that maximizes the cumulative sum of the path.\u003c/p\u003e\u003cp\u003eThe input is a vector of Entrance/Exit [ENx,ENy,EXx,EXy] and a Matrix of Points. The Matrix and Entrance/Exit are zero based (Top Left is (0,0)).\r\nEntrance and Exit will be valid. A [-1] in the matrix is a Wall that can not be traversed. Movement is limited to NSEW, no diagonals.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [VEE] [M], VEE is 1x4 [ENx,ENy,EXx,EXy], Matrix (NRxNC \u0026lt;=10).\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [P] maximum Points. If Impossible P=-1;\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[VEE] [M]   [P]\r\n[0 2 3 2][-1 1 1 2;1 1 1 1;2 -1 -1 1;1 1 1 1] [7]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 17 minutes with 336 of 2010 able to process the small data set.\u003c/p\u003e\u003cp\u003e\u003cb\u003eStrategy:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Check Start/Finish path existence while creating path distances from start. (Suggest offset by +1 to match array). \r\n2) A ring of Zeros around the array may simplify processing.\r\n3) My preference is to work from Finish to Start while tracking best scores for the Kth distance from the Start. A few tricks here to only check for valid prior values.\r\n\u003c/pre\u003e","function_template":"function P=Dragon_CH(ee,m)\r\n  P=0;\r\nend","test_suite":"%%\r\ntic\r\nzee=[0 0 0 1];\r\nzm=[97 68 ];\r\nvexp=165;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[1 0 0 0];\r\nzm=[11 ;92 ];\r\nvexp=103;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 1 1];\r\nzm=[47 -1 ;-1 41 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[9541 9311 1035 9921 9342 2262 8685 7151 184 8189 ;3885 4455 8295 4011 4030 7427 4325 7756 3404 3014 ;4402 9158 999 4298 6612 1696 5965 1822 9039 12 ;6015 8579 9322 7049 4851 5015 5663 9888 8517 5846 ;4428 2402 6653 9074 2764 682 6500 3440 8437 6256 ;6453 9191 1765 7452 3488 8377 5499 9452 6550 4537 ;5815 8916 9467 1489 5965 4317 2855 1627 556 1372 ;3824 1335 125 476 409 9240 1158 6908 2679 5946 ;9515 9131 5136 1280 2934 8623 6008 8432 4427 8909 ;2968 241 7825 8786 8081 3789 9455 936 1767 10 ];\r\nvexp=135772;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[2307 5590 1345 8783 2418 1753 4374 9927 5012 7052 ;5872 879 2534 7360 2158 1820 5982 4517 251 6760 ;3425 9571 3353 1249 8356 1433 1389 7810 2368 9507 ;4172 1026 1449 1868 9808 3866 3620 533 3792 4983 ;7584 6015 5861 6470 3374 4370 8289 5708 8886 4891 ;8819 2311 813 2171 9911 5521 3604 1300 9682 5971 ;806 3853 6997 2254 5720 3156 2471 5691 3689 2614 ;7026 7624 8629 9238 445 8354 3608 5085 413 8845 ;9976 9232 7507 7140 1402 7418 2660 5005 5069 8694 ;976 5874 8898 7972 4480 4618 7479 3302 6660 1167 ];\r\nvexp=113799;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[5916 -1 5143 4544 9275 5587 9249 9234 672 9662 ;-1 6999 8893 5585 490 6646 9354 9502 1651 4422 ;8195 2626 6647 7092 6949 7478 8061 779 780 1073 ;1946 6695 1109 3440 7590 6735 9026 6838 5968 6049 ;2851 398 3047 8095 2334 3537 4741 1687 9390 6391 ;6108 7584 5368 2754 1027 8668 232 9088 9446 1011 ;6512 7743 4057 3972 1182 1646 707 6560 4835 3026 ;2608 4038 3423 2007 2132 5756 1895 6872 7442 1284 ;9614 9901 8867 1333 2655 6245 6352 9238 1684 2150 ;6600 8195 6244 656 2167 3778 8653 2873 337 3487 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[5898 9296 7524 5673 1302 6008 7780 3196 9231 5222 ;4479 5197 5122 9697 6529 4128 5942 9233 3365 7625 ;7734 9964 5820 3977 6971 4338 7754 5623 3562 4442 ;5462 5811 3738 9337 1483 1391 5344 9263 4587 4575 ;836 5417 9771 2309 1466 2651 6437 7407 8235 6153 ;1383 5968 2469 3554 6297 9439 7891 402 1414 7804 ;4844 6875 3615 4933 2563 1449 6323 7907 7063 7261 ;8833 7898 9030 4955 6559 495 3957 9347 7901 2192 ;5499 5635 4511 4319 9189 807 110 3431 7561 -1 ;1235 8756 4749 4849 3688 7311 6297 6362 -1 9712 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 2 0 9];\r\nzm=[-1 3591 -1 9384 6034 8580 2003 -1 8780 1295 ;5605 1377 2240 559 -1 -1 4017 4895 4437 -1 ;-1 -1 -1 9865 -1 1505 2777 -1 436 8170 ;1900 6344 8059 9498 8256 -1 7952 7551 -1 5927 ;-1 -1 7609 -1 1257 1902 -1 8040 4203 -1 ;1361 2292 1143 769 -1 -1 -1 -1 2197 -1 ;3846 -1 2480 -1 -1 -1 -1 -1 -1 -1 ;4444 -1 6690 489 813 8790 -1 -1 -1 -1 ;3729 5436 -1 8544 -1 -1 -1 -1 -1 -1 ;-1 3743 -1 6213 -1 -1 -1 -1 -1 -1 ];\r\nvexp=85015;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 4 3 9];\r\nzm=[256 -1 6593 -1 4076 -1 8308 8531 8388 1339 ;6280 8079 6556 5099 3523 1967 7424 -1 1469 -1 ;-1 9317 -1 6682 -1 2996 -1 3140 3913 -1 ;2927 2797 -1 9032 9111 -1 1637 5917 -1 5971 ;3285 -1 6158 5977 -1 -1 -1 6944 5424 6439 ;2389 7565 -1 5558 5485 588 -1 -1 4093 -1 ;-1 8297 -1 -1 7995 -1 -1 -1 6639 8591 ;-1 -1 -1 -1 -1 2803 5365 7702 9610 -1 ;-1 -1 -1 -1 -1 6383 -1 -1 8763 3884 ;-1 -1 -1 -1 -1 -1 4980 966 7330 -1 ];\r\nvexp=81434;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 7 0 9];\r\nzm=[9117 4644 7637 2065 8336 9446 7761 9053 -1 3232 ;-1 9846 -1 898 -1 1074 -1 1715 4774 5778 ;-1 8864 -1 -1 5687 9951 5462 -1 4536 -1 ;-1 -1 -1 -1 -1 7870 -1 7507 1777 4773 ;-1 -1 89 3307 79 1280 -1 -1 -1 2898 ;-1 -1 -1 -1 4952 -1 2748 572 1991 5243 ;-1 -1 -1 -1 2706 4551 -1 8752 -1 7862 ;-1 -1 -1 5293 6847 -1 -1 4293 -1 308 ;-1 -1 -1 -1 -1 8374 5932 3627 -1 9426 ;-1 -1 -1 -1 -1 -1 -1 983 -1 3561 ];\r\nvexp=24552;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[9 3 9 0];\r\nzm=[-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 3869 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 7888 2830 -1 -1 -1 -1 -1 -1 ;-1 257 4329 -1 2131 -1 -1 -1 -1 -1 ;-1 2582 -1 6446 8398 -1 -1 6063 6484 -1 ;8837 9043 5373 9819 -1 8087 -1 6474 -1 1335 ;866 -1 4087 -1 424 8975 1557 4839 -1 5800 ;868 7116 -1 6357 8115 -1 8722 -1 1184 5178 ;-1 8558 9689 2863 -1 3838 -1 1762 -1 6184 ;9784 3468 -1 6082 8935 7345 1958 7935 9830 2768 ];\r\nvexp=40444;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[1 2 3 4 5 6 7 8 9 10 ;11 12 13 14 15 16 17 18 19 20 ;21 22 23 24 25 26 27 28 29 30 ;31 32 33 34 35 36 37 38 39 40 ;41 42 43 44 45 46 47 48 49 50 ;51 52 53 54 55 56 57 58 59 60 ;61 62 63 64 65 66 67 68 69 70 ;71 72 73 74 75 76 77 78 79 80 ;81 82 83 84 85 86 87 88 89 90 ;91 92 93 94 95 96 97 98 99 100 ];\r\nvexp=1324;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[1 11 21 31 41 51 61 71 81 91 ;2 12 22 32 42 52 62 72 82 92 ;3 13 23 33 43 53 63 73 83 93 ;4 14 24 34 44 54 64 74 84 94 ;5 15 25 35 45 55 65 75 85 95 ;6 16 26 36 46 56 66 76 86 96 ;7 17 27 37 47 57 67 77 87 97 ;8 18 28 38 48 58 68 78 88 98 ;9 19 29 39 49 59 69 79 89 99 ;10 20 30 40 50 60 70 80 90 100 ];\r\nvexp=1324;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 1 4 1];\r\nzm=[-1 -1 1134 9086 5787 -1 -1 9759 -1 ;-1 5195 1440 5405 6267 9573 4021 -1 -1 ;-1 8437 7138 1518 3828 -1 4927 7037 5390 ;4445 9948 -1 -1 8054 5367 -1 -1 6378 ;2675 6263 1410 8224 1185 1056 6214 -1 -1 ;3465 4891 179 -1 8233 3186 3146 4940 -1 ;9212 -1 622 9232 2128 -1 4591 -1 -1 ;853 2385 8569 3381 -1 31 9357 1202 -1 ;9153 437 481 3041 9860 -1 802 -1 5243 ;-1 3979 1226 -1 3966 8037 -1 7564 -1 ];\r\nvexp=11154;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[6 1 5 4];\r\nzm=[8935 7055 9523 5947 9420 1029 1519 9655 7310 -1 ;5347 6550 956 3676 -1 -1 1605 165 9339 924 ;7608 -1 -1 -1 9106 2457 7428 1436 1464 -1 ;-1 8605 753 3273 -1 5557 -1 4895 86 471 ;6830 5364 -1 -1 -1 8767 -1 -1 1753 8126 ;1440 -1 -1 -1 7917 7380 870 -1 -1 8426 ;9518 1719 246 1756 1823 -1 -1 6500 9647 6158 ;-1 3753 9179 3752 -1 -1 3927 -1 28 8762 ;3442 1154 -1 2977 -1 -1 -1 -1 497 -1 ;5046 4922 8565 5170 9416 7140 4702 5262 5264 8821 ];\r\nvexp=13461;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 9 0 7];\r\nzm=[-1 -1 -1 -1 5591 -1 6865 6361 -1 9574 ;5326 2417 -1 -1 6193 9084 1910 5890 9530 4249 ;5130 -1 -1 -1 2376 -1 -1 3886 8309 1892 ;-1 4623 6047 744 2180 817 6660 2425 2867 4950 ;-1 -1 -1 7617 1260 2832 4751 -1 -1 5698 ;-1 2864 4297 8644 3112 1812 2562 5793 4826 1341 ;737 4961 6790 3341 876 9914 9275 -1 9924 756 ;7283 3200 4971 4962 -1 8083 -1 8819 -1 7409 ;7651 5137 -1 1403 6483 -1 6406 7515 -1 -1 ;7345 1246 2469 3331 251 -1 8029 6777 3210 -1 ];\r\nvexp=43605;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 6 9 8];\r\nzm=[4471 2340 6565 -1 -1 3663 -1 -1 4562 8294 ;8432 -1 -1 383 9745 3207 944 340 7820 3426 ;2977 97 5374 1193 4024 2963 2227 2262 6405 2380 ;4866 6164 3694 178 1313 4376 6297 6060 4583 9330 ;9358 7274 6389 6195 2179 -1 3397 7809 557 2087 ;1977 -1 2617 9973 -1 907 -1 5864 -1 -1 ;-1 6127 2119 7554 3268 7556 -1 4465 1297 3716 ;-1 -1 730 1361 5616 -1 -1 7981 7319 3103 ;-1 -1 6599 4345 -1 5421 7790 4406 876 1764 ;7527 -1 -1 8441 7260 9243 9942 -1 8987 -1 ];\r\nvexp=46698;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[3 5 3 4];\r\nzm=[5297 1690 2134 6500 -1 378 99 -1 7714 7786 ;1895 -1 5584 1030 1354 3108 9637 -1 4744 4892 ;-1 7743 6128 3847 -1 9009 -1 -1 9951 -1 ;9108 2993 -1 4347 2520 1147 3077 8541 5470 2062 ;-1 6534 4545 1801 -1 -1 1137 8521 -1 7866 ];\r\nvexp=3667;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[7 6 4 6];\r\nzm=[199 9295 8751 5145 2157 3343 -1 -1 7184 -1 ;3780 3730 6605 -1 8658 -1 3573 -1 -1 -1 ;6749 6135 -1 7631 -1 4179 -1 -1 4080 -1 ;3592 1382 9020 -1 6831 -1 6736 8383 -1 2258 ;1674 -1 4663 -1 6161 2406 268 -1 931 4237 ;100 6649 6439 -1 -1 5266 3204 4114 5940 5908 ;1230 -1 4134 6819 3172 8035 6784 -1 6391 -1 ;9181 -1 -1 7310 -1 1576 1892 5821 4469 2080 ];\r\nvexp=12148;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 3 2 0];\r\nzm=[290 -1 5107 7466 7064 ;6249 -1 3213 6568 -1 ;1037 -1 4971 4915 -1 ;6851 9043 8163 1379 6540 ;2051 8939 1483 -1 4184 ;7062 137 -1 5275 9462 ;-1 -1 4316 3265 2838 ;-1 -1 1471 9758 7724 ;-1 -1 3883 -1 4987 ;6843 7025 6749 7147 1906 ];\r\nvexp=51934;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[7 2 5 2];\r\nzm=[3900 9521 7343 2759 -1 ;5239 -1 1132 4911 3520 ;1517 9058 -1 -1 -1 ;-1 -1 -1 -1 8097 ;-1 7717 4099 5529 7959 ;-1 6950 9579 5029 -1 ;6687 9672 -1 -1 -1 ;1507 5064 2149 1922 7228 ;-1 8639 6134 -1 933 ;-1 511 -1 -1 744 ];\r\nvexp=33414;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 5 6 0];\r\nzm=[6137 3305 6360 4891 6396 4463 8888 7982 ;7881 -1 4743 6730 360 4945 9032 -1 ;7273 3476 8679 -1 3569 2493 -1 7527 ;5487 562 9739 813 6484 6067 -1 9545 ;-1 5162 -1 4989 8112 -1 8032 1019 ;-1 -1 5009 404 1699 1676 5849 8070 ;1003 4164 2297 4730 4313 6194 5684 -1 ];\r\nvexp=24377;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[9 2 6 7];\r\nzm=[8353 7263 7609 -1 2120 5314 -1 9477 1416 3433 ;-1 590 7657 2619 -1 -1 4684 9284 -1 -1 ;3862 -1 2692 4001 1891 -1 7719 6477 -1 5973 ;-1 8015 -1 -1 148 2255 3535 -1 1866 1644 ;1340 1620 3925 5165 -1 3694 4100 1434 3612 -1 ;7843 -1 -1 1391 7637 -1 5855 -1 7250 9629 ;1768 2379 -1 -1 3330 410 -1 9549 -1 -1 ;9493 9719 4813 1231 -1 -1 -1 5478 -1 5106 ;82 8285 251 6695 8652 -1 4552 79 -1 3502 ;3118 7594 8758 -1 -1 -1 8470 4711 -1 2424 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 4 7 0];\r\nzm=[6808 5848 -1 9349 6503 5045 2772 -1 -1 8778 ;9668 4184 2263 -1 1288 1153 2705 7033 2495 -1 ;5880 2410 -1 7454 -1 2978 2427 4378 -1 4913 ;208 2853 -1 4005 3964 -1 9828 -1 4786 7602 ;-1 -1 -1 -1 -1 329 7985 -1 -1 28 ;-1 -1 -1 -1 4433 4085 9221 6038 7258 3834 ;9013 -1 5560 2745 5061 -1 3495 -1 -1 -1 ;2760 6565 7246 6924 -1 2700 -1 -1 4588 -1 ;9953 4344 8740 -1 152 8435 6756 3520 3078 9535 ;9930 9193 2399 246 4552 5468 -1 -1 -1 -1 ];\r\nvexp=35734;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 0 7 0];\r\nzm=[919 3728 6660 -1 5410 4513 8419 6070 482 6421 ;111 -1 4828 8468 -1 3201 -1 4659 -1 4738 ;-1 361 8017 4673 8999 4687 852 -1 7981 -1 ;-1 1520 9557 5945 8837 3767 9832 9775 -1 9935 ;5796 9072 -1 -1 392 341 3808 4109 4905 -1 ;9614 -1 8450 977 247 2107 7400 6786 -1 -1 ;4341 -1 4733 2658 -1 6043 8860 1838 6912 523 ;2432 4045 -1 -1 5361 895 -1 3895 1321 6672 ;2026 5899 1723 1201 1691 9580 1387 -1 -1 1689 ];\r\nvexp=22183;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[1 2 2 1];\r\nzm=[-1 -1 -1 -1 7201 7409 -1 9659 2860 9119 ;-1 9984 7612 9104 607 -1 9877 -1 2932 1986 ;5397 1618 2580 -1 69 2446 -1 -1 1160 7900 ;-1 9269 -1 6227 5896 200 5386 8138 -1 8909 ;7316 1699 -1 3087 -1 -1 -1 4699 -1 3670 ;8428 9133 3314 3461 4829 6483 7198 8227 8516 5217 ;325 54 8642 8561 -1 8582 -1 6678 3552 -1 ;7012 3037 6339 9407 6933 -1 9350 1820 5500 -1 ];\r\nvexp=19214;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[1505 3402 2754 9713 414 2610 2749 8975 8948 1456 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 8381 ;2838 4740 4009 1596 442 4853 3416 6467 6705 1640 ;9059 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;7197 4825 212 7826 2129 6298 2502 1979 9061 4006 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 1733 ;1814 3718 8498 4423 2818 7472 9722 625 2204 8912 ;5365 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;6212 507 5806 7416 274 8624 4120 1914 7683 7669 ;3090 4246 1846 5219 6895 4347 3549 5955 8352 5281 ];\r\nvexp=259550;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 0];\r\nzm=[4120 8421 130 8543 1238 7601 4616 1863 6156 3527 ;3579 8719 386 9384 6135 7011 4359 6606 5276 8393 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 626 ;8366 2638 2471 3584 5884 6817 3484 8190 5168 8765 ;2310 9940 5246 7204 1178 2847 1819 9392 5354 1698 ;2970 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;4073 8435 8705 6559 1797 3063 9516 7073 1456 142 ;1790 445 2612 1725 6329 9429 5208 4518 948 3972 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 6827 ;888 5570 382 8417 4768 2201 7808 121 250 7129 ];\r\nvexp=243332;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[9 0 0 9];\r\nzm=[4193 5036 5833 7103 6832 8895 6619 3904 350 6760 ;2045 7147 9371 3769 3475 8799 8977 4344 9747 9300 ;7523 6986 4869 7904 5402 9636 104 3209 9757 6705 ;337 301 1740 6169 7404 8572 1415 4022 8827 8117 ;7133 872 5263 6503 4640 8737 1654 3616 9432 7752 ;9268 6954 4737 4136 4858 138 3772 1313 9698 3528 ;8018 6386 180 6109 8906 7583 1032 320 7956 9859 ;8436 5088 7082 50 1591 8073 5138 9596 8041 4570 ;7347 7308 1523 2083 1443 6380 8572 1566 4045 4621 ;1445 2062 1006 1625 4522 9911 5559 5554 230 3515 ];\r\nvexp=137679;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[3 7 3 6];\r\nzm=[-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 2896 5067 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ];\r\nvexp=7963;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-19T03:06:44.000Z","updated_at":"2026-02-10T13:28:34.000Z","published_at":"2013-10-19T03:25:25.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/2929486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Dragon Maze\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case.\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 Goal is determine the optimal minimum distance path that maximizes score. Multiple minimum distance paths may exist. Output the score for the path that maximizes the cumulative sum of the path.\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 input is a vector of Entrance/Exit [ENx,ENy,EXx,EXy] and a Matrix of Points. The Matrix and Entrance/Exit are zero based (Top Left is (0,0)). Entrance and Exit will be valid. A [-1] in the matrix is a Wall that can not be traversed. Movement is limited to NSEW, no diagonals.\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 [VEE] [M], VEE is 1x4 [ENx,ENy,EXx,EXy], Matrix (NRxNC \u0026lt;=10).\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 [P] maximum Points. If Impossible P=-1;\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\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[[VEE] [M]   [P]\\n[0 2 3 2][-1 1 1 2;1 1 1 1;2 -1 -1 1;1 1 1 1] [7]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 17 minutes with 336 of 2010 able to process the small data set.\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\u003eStrategy:\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) Check Start/Finish path existence while creating path distances from start. (Suggest offset by +1 to match array). \\n2) A ring of Zeros around the array may simplify processing.\\n3) My preference is to work from Finish to Start while tracking best scores for the Kth distance from the Start. A few tricks here to only check for valid prior values.]]\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\"}]}"},{"id":44082,"title":"Recycled Numbers (CodeJam Qualification Round 2012)","description":"Let's say a pair of distinct positive integers ( _n_ , _m_ ) is recycled if you can obtain _m_ by moving some digits \r\nfrom the back of _n_ to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that _n_ and _m_ must have the same number of digits in order to be a recycled pair. Neither _n_ nor _m_ can have leading zeros.\r\n\r\nGiven integers *A* and *B* with the same number of digits and no leading zeros, how many *distinct* recycled pairs ( _n_ , _m_ ) are there with *A* ≤ _n_ \u003c _m_ ≤ *B* ? \r\n\r\nBe careful, it is more tricky than you might first think...","description_html":"\u003cp\u003eLet's say a pair of distinct positive integers ( \u003ci\u003en\u003c/i\u003e , \u003ci\u003em\u003c/i\u003e ) is recycled if you can obtain \u003ci\u003em\u003c/i\u003e by moving some digits \r\nfrom the back of \u003ci\u003en\u003c/i\u003e to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that \u003ci\u003en\u003c/i\u003e and \u003ci\u003em\u003c/i\u003e must have the same number of digits in order to be a recycled pair. Neither \u003ci\u003en\u003c/i\u003e nor \u003ci\u003em\u003c/i\u003e can have leading zeros.\u003c/p\u003e\u003cp\u003eGiven integers \u003cb\u003eA\u003c/b\u003e and \u003cb\u003eB\u003c/b\u003e with the same number of digits and no leading zeros, how many \u003cb\u003edistinct\u003c/b\u003e recycled pairs ( \u003ci\u003en\u003c/i\u003e , \u003ci\u003em\u003c/i\u003e ) are there with \u003cb\u003eA\u003c/b\u003e ≤ \u003ci\u003en\u003c/i\u003e \u0026lt; \u003ci\u003em\u003c/i\u003e ≤ \u003cb\u003eB\u003c/b\u003e ?\u003c/p\u003e\u003cp\u003eBe careful, it is more tricky than you might first think...\u003c/p\u003e","function_template":"function y = recycled_numbers(a,b)\r\n  y = x;\r\nend","test_suite":"%%\r\na=1;\r\nb=9;\r\ny_correct = 0;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=10;\r\nb=40;\r\ny_correct = 3;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=1111;\r\nb=2222;\r\ny_correct = 287 ; %:)\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=21;\r\nb=31;\r\ny_correct = 0;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=1;\r\nb=9;\r\ny_correct = 0;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=104;\r\nb=989;\r\nassert(isequal(recycled_numbers(a,b),781))\r\n%%\r\na=10;\r\nb=99;\r\ny = 36;\r\nassert(isequal(recycled_numbers(a,b),y))\r\n%%\r\nassert(isequal(recycled_numbers(100,999),801))\r\n%%\r\na=1000;\r\nb=9999;\r\ny_correct = 12060;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\nb=484;\r\na=954;\r\nassert(isequal(recycled_numbers(b,a),203))\r\n%%\r\na=159887;\r\nb=195662;\r\ncorrect = 2058;\r\nassert(isequal(recycled_numbers(a,b),correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":5390,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":23,"test_suite_updated_at":"2017-03-09T12:41:35.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-03-09T11:10:22.000Z","updated_at":"2025-12-05T12:51:14.000Z","published_at":"2017-03-09T11:21:54.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\u003eLet's say a pair of distinct positive integers (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ) is recycled if you can obtain\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e by moving some digits from the back of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e must have the same number of digits in order to be a recycled pair. Neither\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e nor\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e can have leading zeros.\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\u003eGiven integers\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eA\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e with the same number of digits and no leading zeros, how many\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003edistinct\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e recycled pairs (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ) are there with\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eA\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ≤\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u0026lt;\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ≤\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eBe careful, it is more tricky than you might first think...\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\"}]}"},{"id":42290,"title":"GJam 2015 Rd1B: Noisy Neighbors","description":"This Challenge is derived from \u003chttps://code.google.com/codejam/contest/8224486/dashboard#s=p1 GJam 2015 Rd 1B: Noisy Neighbors\u003e. Fastest completion - 8 minutes.\r\n\r\nDetermine minimum number of adjacencies for N placed people in an RxC hotel matrix\r\n\r\nInput: m, an RxC zeros array; N number of rooms to be filled\r\n\r\nOutput: NN, minimum number of common walls\r\n\r\nExamples: Small Case 1\u003c=R*C\u003c=16, 0\u003c=N\u003c=R*C\r\n\r\n  [1 1 1;1 0 1;1 1 1] has minimum 8 common walls vs [1 1 1;1 1 1;1 1 0] has 10 common\r\n  [1;0;0;1] has 0 common walls\r\n  ones(2,3) has 7 common walls\r\n\r\n\r\nTheory: The small case can be solved with brute force using vector set with nchoosek followed by processing of convolutions. The large case has 10000 rooms making brute force hopeless.\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://www.go-hero.net/jam/15 Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"https://code.google.com/codejam/contest/8224486/dashboard#s=p1\"\u003eGJam 2015 Rd 1B: Noisy Neighbors\u003c/a\u003e. Fastest completion - 8 minutes.\u003c/p\u003e\u003cp\u003eDetermine minimum number of adjacencies for N placed people in an RxC hotel matrix\u003c/p\u003e\u003cp\u003eInput: m, an RxC zeros array; N number of rooms to be filled\u003c/p\u003e\u003cp\u003eOutput: NN, minimum number of common walls\u003c/p\u003e\u003cp\u003eExamples: Small Case 1\u0026lt;=R*C\u0026lt;=16, 0\u0026lt;=N\u0026lt;=R*C\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 1 1;1 0 1;1 1 1] has minimum 8 common walls vs [1 1 1;1 1 1;1 1 0] has 10 common\r\n[1;0;0;1] has 0 common walls\r\nones(2,3) has 7 common walls\r\n\u003c/pre\u003e\u003cp\u003eTheory: The small case can be solved with brute force using vector set with nchoosek followed by processing of convolutions. The large case has 10000 rooms making brute force hopeless.\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://www.go-hero.net/jam/15\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\u003c/p\u003e","function_template":"function NN = Noisy_Neighbors(m,N)\r\n% m is an RxC zeros array\r\n% N is number of cells to be occupied\r\n% NN is number of edge adjacencies\r\n% Goal is to minimize NN\r\n\r\n  NN=0;\r\nend","test_suite":"tic\r\n%%\r\nm=zeros(5,2);N=8;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=14;\r\nNNexp=18;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(8,2);N=12;\r\nNNexp=10;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,3);N=6;\r\nNNexp=3;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,6);N=12;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=5;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=11;\r\nNNexp=8;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(7,2);N=13;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=15;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=9;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=12;\r\nNNexp=17;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=13;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,4);N=5;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=5;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=16;\r\nNNexp=15;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,5);N=8;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=10;\r\nNNexp=6;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=9;\r\nNNexp=3;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,2);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=15;\r\nNNexp=20;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,2);N=4;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=11;\r\nNNexp=8;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=9;\r\nNNexp=1;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=16;\r\nNNexp=24;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=9;\r\nNNexp=1;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=15;\r\nNNexp=22;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,5);N=9;\r\nNNexp=10;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=10;\r\nNNexp=6;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=15;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,2);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,2);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,7);N=13;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,3);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(7,2);N=11;\r\nNNexp=10;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,1);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,6);N=9;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=3;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=15;\r\nNNexp=22;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,2);N=6;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,4);N=12;\r\nNNexp=17;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,3);N=6;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,1);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=16;\r\nNNexp=15;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,2);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,3);N=9;\r\nNNexp=12;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(9,1);N=6;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=12;\r\nNNexp=11;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,2);N=3;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(7,2);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,3);N=4;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=9;\r\nNNexp=3;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,4);N=6;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=12;\r\nNNexp=11;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=3;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,13);N=9;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,9);N=6;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(6,2);N=12;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=8;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=5;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=14;\r\nNNexp=18;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=7;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(6,2);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=13;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\ntoc\r\n%%\r\n% function GJam_Rd1B_2015b\r\n%  fn='B-small-practice.in';\r\n%  [data] = read_file(fn); % \r\n%  fidG = fopen('B-small-practice.out', 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has N cols of cases\r\n%  NN = Noisy_Neighbors(data{i});\r\n%  fprintf(fidG,'Case #%i: %i\\n',i,NN);\r\n%  \r\n%  fprintf('Case #%i: %i\\n',i,NN);   \r\n% end\r\n% toc\r\n% fclose(fidG);\r\n% end\r\n% \r\n% function val=Noisy_Neighbors(v)\r\n%  r=v(1);c=v(2);N=v(3);\r\n%  m=zeros(r,c);\r\n%  if N==0\r\n%   val=0;\r\n%   return;\r\n%  end\r\n%  \r\n% ptrset=find(m==0);\r\n% \r\n% val=Inf;\r\n% tlocs=nchoosek(ptrset,N);\r\n% for i=1:size(tlocs,1)\r\n%  m=m*0;\r\n%  tlocv=tlocs(i,:);\r\n%  m(tlocv)=1;\r\n%  vchk=nnz(conv2(m,[1 1])==2)+nnz(conv2(m,[1;1])==2);\r\n%  \r\n%  if vchk\u003cval\r\n%   val=vchk;\r\n%  end\r\n%  if val==0,break;end;\r\n% end\r\n%  \r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  ptr=ptr+1;\r\n%  v=str2num(fgetl(fid)); % r,c,N\r\n%  \r\n%  d{ptr}=v;\r\n%  \r\n% end % feof\r\n%  fclose(fid);\r\n% \r\n% end % read_file\r\n%%\r\ntoc\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":5,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-05-03T17:57:59.000Z","updated_at":"2015-05-03T18:31:40.000Z","published_at":"2015-05-03T18:31:40.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=\\\"https://code.google.com/codejam/contest/8224486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2015 Rd 1B: Noisy Neighbors\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Fastest completion - 8 minutes.\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\u003eDetermine minimum number of adjacencies for N placed people in an RxC hotel matrix\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\u003eInput: m, an RxC zeros array; N number of rooms to be filled\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\u003eOutput: NN, minimum number of common walls\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\u003eExamples: Small Case 1\u0026lt;=R*C\u0026lt;=16, 0\u0026lt;=N\u0026lt;=R*C\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 1 1;1 0 1;1 1 1] has minimum 8 common walls vs [1 1 1;1 1 1;1 1 0] has 10 common\\n[1;0;0;1] has 0 common walls\\nones(2,3) has 7 common walls]]\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:t\u003eTheory: The small case can be solved with brute force using vector set with nchoosek followed by processing of convolutions. The large case has 10000 rooms making brute force hopeless.\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\u003eAdditional GJam solutions can be found at\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://www.go-hero.net/jam/15\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\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\"}]}"},{"id":42291,"title":"GJam 2015 Rd1B: Counter Culture","description":"This Challenge is derived from \u003chttps://code.google.com/codejam/contest/8224486/dashboard#s=p0 GJam 2015 Rd 1B: Counter Culture\u003e. Fastest completion - 5 minutes.\r\n\r\nDetermine minimum sequence length to reach a number. Sequence starts at 1 and the next is either +1 or the number's reverse with trailing zeros removed. (eg 2300 is followed by 2301 or 32)\r\n\r\nInput: N, a value from 1 to 1,000,000\r\n\r\nOutput: L, minimum length of sequence to reach N\r\n\r\nExamples: Small Case 1\u003c=N\u003c=1000000\r\n\r\n  N=5,  L=5  [1 2 3 4 5] L=N is true thru 19\r\n  N=23, L=15 [1:12 21 22 23]\r\n\r\n\r\nTheory: The small case can be solved with brute force or semi-brute force using storage of past calculations. All values are processed at each depth level. Duplicates from [N+1 and flip] are purged. A fast reversal function is essential. Direct summation works well. The large case N limit is 1E14 making even semi-brute force with storage unlikely.\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://www.go-hero.net/jam/15 Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"https://code.google.com/codejam/contest/8224486/dashboard#s=p0\"\u003eGJam 2015 Rd 1B: Counter Culture\u003c/a\u003e. Fastest completion - 5 minutes.\u003c/p\u003e\u003cp\u003eDetermine minimum sequence length to reach a number. Sequence starts at 1 and the next is either +1 or the number's reverse with trailing zeros removed. (eg 2300 is followed by 2301 or 32)\u003c/p\u003e\u003cp\u003eInput: N, a value from 1 to 1,000,000\u003c/p\u003e\u003cp\u003eOutput: L, minimum length of sequence to reach N\u003c/p\u003e\u003cp\u003eExamples: Small Case 1\u0026lt;=N\u0026lt;=1000000\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eN=5,  L=5  [1 2 3 4 5] L=N is true thru 19\r\nN=23, L=15 [1:12 21 22 23]\r\n\u003c/pre\u003e\u003cp\u003eTheory: The small case can be solved with brute force or semi-brute force using storage of past calculations. All values are processed at each depth level. Duplicates from [N+1 and flip] are purged. A fast reversal function is essential. Direct summation works well. The large case N limit is 1E14 making even semi-brute force with storage unlikely.\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://www.go-hero.net/jam/15\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\u003c/p\u003e","function_template":"function L = Counter_Culture(N)\r\n% N is value to be reached \r\n% L is minimum length of sequence to reach N\r\n% N=23  L=15  the sequence [1:12 21 22 23]\r\n% N=19 L=19 [1:19]\r\n  L=1;\r\nend","test_suite":"tic\r\n%%\r\nN=1;\r\nL=Counter_Culture(N);\r\nLexp=1;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=19;\r\nL=Counter_Culture(N);\r\nLexp=19;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=23;\r\nL=Counter_Culture(N);\r\nLexp=15;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1101;\r\nL=Counter_Culture(N);\r\nLexp=150;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=998999;\r\nL=Counter_Culture(N);\r\nLexp=3334;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=990000;\r\nL=Counter_Culture(N);\r\nLexp=3425;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10110;\r\nL=Counter_Culture(N);\r\nLexp=447;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11111;\r\nL=Counter_Culture(N);\r\nLexp=459;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999991;\r\nL=Counter_Culture(N);\r\nLexp=3426;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=512;\r\nL=Counter_Culture(N);\r\nLexp=46;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999899;\r\nL=Counter_Culture(N);\r\nLexp=3334;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1999;\r\nL=Counter_Culture(N);\r\nLexp=328;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11101;\r\nL=Counter_Culture(N);\r\nLexp=449;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=876543;\r\nL=Counter_Culture(N);\r\nLexp=2657;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=4;\r\nL=Counter_Culture(N);\r\nLexp=4;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=102;\r\nL=Counter_Culture(N);\r\nLexp=31;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11000;\r\nL=Counter_Culture(N);\r\nLexp=1337;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1998;\r\nL=Counter_Culture(N);\r\nLexp=327;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=900000;\r\nL=Counter_Culture(N);\r\nLexp=3434;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=131072;\r\nL=Counter_Culture(N);\r\nLexp=1639;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=524288;\r\nL=Counter_Culture(N);\r\nLexp=2149;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=20;\r\nL=Counter_Culture(N);\r\nLexp=20;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=789012;\r\nL=Counter_Culture(N);\r\nLexp=2435;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=200;\r\nL=Counter_Culture(N);\r\nLexp=129;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=109876;\r\nL=Counter_Culture(N);\r\nLexp=3213;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11100;\r\nL=Counter_Culture(N);\r\nLexp=448;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=262144;\r\nL=Counter_Culture(N);\r\nLexp=1842;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11;\r\nL=Counter_Culture(N);\r\nLexp=11;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1001;\r\nL=Counter_Culture(N);\r\nLexp=139;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=987654;\r\nL=Counter_Culture(N);\r\nLexp=2879;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999989;\r\nL=Counter_Culture(N);\r\nLexp=3424;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11011;\r\nL=Counter_Culture(N);\r\nLexp=359;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=4096;\r\nL=Counter_Culture(N);\r\nLexp=238;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=900001;\r\nL=Counter_Culture(N);\r\nLexp=1446;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=201;\r\nL=Counter_Culture(N);\r\nLexp=32;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=99001;\r\nL=Counter_Culture(N);\r\nLexp=437;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999999;\r\nL=Counter_Culture(N);\r\nLexp=3434;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999900;\r\nL=Counter_Culture(N);\r\nLexp=3335;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=901;\r\nL=Counter_Culture(N);\r\nLexp=39;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2201;\r\nL=Counter_Culture(N);\r\nLexp=161;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=90;\r\nL=Counter_Culture(N);\r\nLexp=28;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=101;\r\nL=Counter_Culture(N);\r\nLexp=30;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10111;\r\nL=Counter_Culture(N);\r\nLexp=448;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=31;\r\nL=Counter_Culture(N);\r\nLexp=14;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10;\r\nL=Counter_Culture(N);\r\nLexp=10;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10100;\r\nL=Counter_Culture(N);\r\nLexp=437;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999998;\r\nL=Counter_Culture(N);\r\nLexp=3433;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999000;\r\nL=Counter_Culture(N);\r\nLexp=3335;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=990001;\r\nL=Counter_Culture(N);\r\nLexp=1536;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=30;\r\nL=Counter_Culture(N);\r\nLexp=22;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=900;\r\nL=Counter_Culture(N);\r\nLexp=137;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=101001;\r\nL=Counter_Culture(N);\r\nLexp=1538;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999990;\r\nL=Counter_Culture(N);\r\nLexp=3425;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=989999;\r\nL=Counter_Culture(N);\r\nLexp=3424;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=21;\r\nL=Counter_Culture(N);\r\nLexp=13;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=9999;\r\nL=Counter_Culture(N);\r\nLexp=336;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=100001;\r\nL=Counter_Culture(N);\r\nLexp=1437;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10999;\r\nL=Counter_Culture(N);\r\nLexp=1336;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=100;\r\nL=Counter_Culture(N);\r\nLexp=29;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=91;\r\nL=Counter_Culture(N);\r\nLexp=20;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11010;\r\nL=Counter_Culture(N);\r\nLexp=358;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=29;\r\nL=Counter_Culture(N);\r\nLexp=21;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2001;\r\nL=Counter_Culture(N);\r\nLexp=141;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11110;\r\nL=Counter_Culture(N);\r\nLexp=458;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10001;\r\nL=Counter_Culture(N);\r\nLexp=338;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=9;\r\nL=Counter_Culture(N);\r\nLexp=9;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=101000;\r\nL=Counter_Culture(N);\r\nLexp=2436;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1000;\r\nL=Counter_Culture(N);\r\nLexp=138;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=19;\r\nL=Counter_Culture(N);\r\nLexp=19;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=12000;\r\nL=Counter_Culture(N);\r\nLexp=1348;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999;\r\nL=Counter_Culture(N);\r\nLexp=137;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=22;\r\nL=Counter_Culture(N);\r\nLexp=14;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1111;\r\nL=Counter_Culture(N);\r\nLexp=160;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=12001;\r\nL=Counter_Culture(N);\r\nLexp=359;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=12;\r\nL=Counter_Culture(N);\r\nLexp=12;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=99000;\r\nL=Counter_Culture(N);\r\nLexp=1426;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999001;\r\nL=Counter_Culture(N);\r\nLexp=2436;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=899999;\r\nL=Counter_Culture(N);\r\nLexp=3433;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10010;\r\nL=Counter_Culture(N);\r\nLexp=347;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10000;\r\nL=Counter_Culture(N);\r\nLexp=337;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10101;\r\nL=Counter_Culture(N);\r\nLexp=438;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2000;\r\nL=Counter_Culture(N);\r\nLexp=329;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=111;\r\nL=Counter_Culture(N);\r\nLexp=40;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999901;\r\nL=Counter_Culture(N);\r\nLexp=3336;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2101;\r\nL=Counter_Culture(N);\r\nLexp=151;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10011;\r\nL=Counter_Culture(N);\r\nLexp=348;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2002;\r\nL=Counter_Culture(N);\r\nLexp=142;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=32;\r\nL=Counter_Culture(N);\r\nLexp=15;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=110;\r\nL=Counter_Culture(N);\r\nLexp=39;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2100;\r\nL=Counter_Culture(N);\r\nLexp=240;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11001;\r\nL=Counter_Culture(N);\r\nLexp=349;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=99;\r\nL=Counter_Culture(N);\r\nLexp=28;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1100;\r\nL=Counter_Culture(N);\r\nLexp=238;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1099;\r\nL=Counter_Culture(N);\r\nLexp=237;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1000000;\r\nL=Counter_Culture(N);\r\nLexp=3435;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=100000;\r\nL=Counter_Culture(N);\r\nLexp=1436;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2200;\r\nL=Counter_Culture(N);\r\nLexp=250;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1110;\r\nL=Counter_Culture(N);\r\nLexp=159;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=432109;\r\nL=Counter_Culture(N);\r\nLexp=1779;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=199;\r\nL=Counter_Culture(N);\r\nLexp=128;\r\nassert(isequal(Lexp,L))\r\n%%\r\ntoc\r\n%%\r\n% function GJam_Rd1B_2015a\r\n% % \r\n% fn='A-small-practice.in';\r\n% [data] = read_file(fn); % \r\n% \r\n% fidG = fopen('A-small-practice.out', 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has J cols of cases\r\n%  L = Counter_Culture(data{i});\r\n%  fprintf(fidG,'Case #%i: %i\\n',i,L);\r\n%  fprintf('Case #%i: %i\\n',i,L); \r\n% end\r\n% toc\r\n% fclose(fidG);\r\n% end\r\n% \r\n% function depth=Counter_Culture(v)\r\n% % create all paths\r\n% persistent m mv maxdepth\r\n% if isempty(m)\r\n%     \r\n%  mv=zeros(1000000,1);\r\n%  m{1000000}=[]; % set cell array size to max possible\r\n%  for i=1:9\r\n%   m{i}=i;\r\n%   mv(i)=i; % place best depth into mv for repeated searches\r\n%  end\r\n%  maxdepth=9;\r\n% end\r\n% \r\n% if mv(v) % usage of persistent data\r\n%  depth=mv(v);\r\n%  return;\r\n% end\r\n% \r\n% \r\n% while 1\r\n%  mset=m{maxdepth}; % start with last set calculated\r\n%  maxdepth=maxdepth+1;\r\n%  msetn=mset+1;\r\n%  \r\n%  msetn=msetn(mv(msetn)==0);\r\n%  mv(msetn)=maxdepth;\r\n%  \r\n%  for i=1:length(mset)\r\n%   flipv=calc_flip(mset(i));\r\n%   if mv(flipv)==0 % new value\r\n%    mv(flipv)=maxdepth;\r\n%    msetn=[msetn flipv]; % add to list\r\n%   end\r\n%  end\r\n%  \r\n%  m{maxdepth}=msetn;\r\n%  \r\n%  if any(msetn==v)\r\n%   depth=maxdepth;\r\n%   return\r\n%  end\r\n%     \r\n% end % while\r\n% \r\n% end\r\n% \r\n% function vr=calc_flip(val)\r\n%  vr=0;\r\n%  while val\r\n%   v1=mod(val,10);\r\n%   vr=10*vr+v1;\r\n%   val=(val-v1)/10;\r\n%  end\r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  ptr=ptr+1;\r\n%  v=str2num(fgetl(fid)); \r\n%  d{ptr}=v;\r\n% end % feof\r\n% fclose(fid);\r\n% end % read_file\r\n%%\r\ntoc","published":true,"deleted":false,"likes_count":0,"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":"2015-05-03T21:55:15.000Z","updated_at":"2025-11-20T19:05:41.000Z","published_at":"2015-05-03T22:36:16.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=\\\"https://code.google.com/codejam/contest/8224486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2015 Rd 1B: Counter Culture\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Fastest completion - 5 minutes.\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\u003eDetermine minimum sequence length to reach a number. Sequence starts at 1 and the next is either +1 or the number's reverse with trailing zeros removed. (eg 2300 is followed by 2301 or 32)\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\u003eInput: N, a value from 1 to 1,000,000\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\u003eOutput: L, minimum length of sequence to reach N\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\u003eExamples: Small Case 1\u0026lt;=N\u0026lt;=1000000\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[N=5,  L=5  [1 2 3 4 5] L=N is true thru 19\\nN=23, L=15 [1:12 21 22 23]]]\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:t\u003eTheory: The small case can be solved with brute force or semi-brute force using storage of past calculations. All values are processed at each depth level. Duplicates from [N+1 and flip] are purged. A fast reversal function is essential. Direct summation works well. The large case N limit is 1E14 making even semi-brute force with storage unlikely.\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\u003eAdditional GJam solutions can be found at\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://www.go-hero.net/jam/15\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\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\"}]}"},{"id":1732,"title":"GJam: 2013 Rd1a Bullseye Painting - Large Numbers","description":"\u003chttp://code.google.com/codejam/contests.html Google Code Jam\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\r\n\r\nGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\r\n\r\nThe test cases are a few from the 6000 in the Large number set. In contest mode the player has 8 minutes to submit a response after downloading the data set.\r\n\r\n\u003c\u003chttp://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\u003e\u003e\r\n\r\n*Input:* [r, p]  uint64, 1\u003c=r\u003c=1E18, 1\u003c=P\u003c=2E18. Always enough P for one ring\r\n\r\n\r\n*Output:* Rings\r\n\r\n*Examples:*\r\n\r\n  [1 9] 1; % Normal number examples to understand concept\r\n  [1 10] 2;\r\n  [3 40] 3;\r\n  \r\n  [1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n  [1 2000000000000000000] 999999999\r\n  [760961177192651897 1521922354385303795] 1\r\n\r\n\r\n*Google Code Jam:*\r\n\r\nThe next competition starts in April 2014. See details from above link.\r\n\r\nSolutions to the various past Challenges using Matlab can be found via \u003chttp://www.go-hero.net/jam/13/solutions GJam Solutions\u003e.\r\n\r\nLarge number solutions require more elegant methods to avoid time-outs.\r\n\r\n*Related Challenges:*\r\n\r\n1) \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1731-text-file-read-64-bit-data-set Reading 64 bit input file\u003e\r\n\r\n2) \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1730-gjam-2013-rd1a-bullseye-painting Bullseye Regular Numbers\u003e\r\n\r\n*Usage of regexp is verboten*","description_html":"\u003cp\u003e\u003ca href = \"http://code.google.com/codejam/contests.html\"\u003eGoogle Code Jam\u003c/a\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\u003c/p\u003e\u003cp\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\u003c/p\u003e\u003cp\u003eThe test cases are a few from the 6000 in the Large number set. In contest mode the player has 8 minutes to submit a response after downloading the data set.\u003c/p\u003e\u003cimg src = \"http://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\"\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [r, p]  uint64, 1\u0026lt;=r\u0026lt;=1E18, 1\u0026lt;=P\u0026lt;=2E18. Always enough P for one ring\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Rings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 9] 1; % Normal number examples to understand concept\r\n[1 10] 2;\r\n[3 40] 3;\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003e[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n[1 2000000000000000000] 999999999\r\n[760961177192651897 1521922354385303795] 1\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe next competition starts in April 2014. See details from above link.\u003c/p\u003e\u003cp\u003eSolutions to the various past Challenges using Matlab can be found via \u003ca href = \"http://www.go-hero.net/jam/13/solutions\"\u003eGJam Solutions\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eLarge number solutions require more elegant methods to avoid time-outs.\u003c/p\u003e\u003cp\u003e\u003cb\u003eRelated Challenges:\u003c/b\u003e\u003c/p\u003e\u003cp\u003e1) \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1731-text-file-read-64-bit-data-set\"\u003eReading 64 bit input file\u003c/a\u003e\u003c/p\u003e\u003cp\u003e2) \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1730-gjam-2013-rd1a-bullseye-painting\"\u003eBullseye Regular Numbers\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eUsage of regexp is verboten\u003c/b\u003e\u003c/p\u003e","function_template":"function rings=solve_rings(r,pmax)\r\n rings=0;\r\nend","test_suite":"%%\r\ntic\r\nr=uint64(308436464205151562);\r\npmax=uint64(1850618785230909388);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,3),sprintf('rings=%i, Expected 3',rings))\r\n%%\r\nr=uint64(760961177192651897);\r\npmax=uint64(1521922354385303795);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,1),sprintf('rings=%i, Expected 1',rings))\r\n%%\r\nr=uint64(1);\r\npmax=uint64(2000000000000000000);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,999999999),sprintf('rings=%i, Expected 999999999',rings))\r\n%%\r\nr=uint64(1000);\r\npmax=uint64(2000000000000000000);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,999999500),sprintf('rings=%i, Expected 999999500',rings))\r\n%%\r\nr=uint64(3);\r\npmax=uint64(1243678947483597075);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,788567988),sprintf('rings=%i, Expected 788567988',rings))\r\n%%\r\nr=uint64(432);\r\npmax=uint64(1800692162794074077);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,948865465),sprintf('rings=%i, Expected 948865465',rings))\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-21T05:00:05.000Z","updated_at":"2013-07-21T06:00:55.000Z","published_at":"2013-07-21T06:00:27.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:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contests.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\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\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\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 test cases are a few from the 6000 in the Large number set. In contest mode the player has 8 minutes to submit a response after downloading the data set.\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\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [r, p] uint64, 1\u0026lt;=r\u0026lt;=1E18, 1\u0026lt;=P\u0026lt;=2E18. Always enough P for one ring\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 Rings\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\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 9] 1; % Normal number examples to understand concept\\n[1 10] 2;\\n[3 40] 3;\\n\\n[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\\n[1 2000000000000000000] 999999999\\n[760961177192651897 1521922354385303795] 1]]\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\u003eGoogle Code Jam:\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 next competition starts in April 2014. See details from above link.\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\u003eSolutions to the various past Challenges using Matlab can be found via\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://www.go-hero.net/jam/13/solutions\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eLarge number solutions require more elegant methods to avoid time-outs.\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\u003eRelated Challenges:\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\u003e1)\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://www.mathworks.com/matlabcentral/cody/problems/1731-text-file-read-64-bit-data-set\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eReading 64 bit input file\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003e2)\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://www.mathworks.com/matlabcentral/cody/problems/1730-gjam-2013-rd1a-bullseye-painting\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eBullseye Regular Numbers\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eUsage of regexp is verboten\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\"}]}"},{"id":2324,"title":"GJam 2014 Rd 1c: Train Cars","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/3004486/dashboard#s=p1 GJam 2014 Rd 1c: Reordering Train Cars\u003e.\r\n\r\nDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. \r\n\r\n*Input:* s, string of N space separated string segments of letters [a..z]. 1\u003c=N\u003c=10. Total letters \u003c=100.\r\n\r\n*Output:* val, number of possible sequences\r\n\r\n*Example:*  Small Case\r\n\r\n  ab bbbc cd Val=1 as only abbbbccd can be created\r\n  aa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\r\n  abc bcd    Val=0 as c is internal and thus can not connect to c of abc\r\n\r\n*Theory:* (Spoilers)\r\n\r\nA methodical approach implements the following checks: No internal equals any Start/End. Note aaa has no internal. Verify each string has no non-contiguous letters. Verify no two strings have same start or end except where start==end as in bbbb. Val is N! if there are N cc strings. Each string segment is considered a unique piece when counting. Reduce the strings of type aa until there is only one and increase Val by N!. With remaining strings merge to S strings. Val is then scaled by S!. Key merging issue is that ab ba may look mergeable to aa but in actuality it creates abba - invalid and baab -invalid thus Val=0. Creation of full length string and then a final validity check resolves this issue.\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution. No Valid Matlab solutions were submitted during the contest.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/3004486/dashboard#s=p1\"\u003eGJam 2014 Rd 1c: Reordering Train Cars\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=10. Total letters \u0026lt;=100.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e val, number of possible sequences\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e  Small Case\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eab bbbc cd Val=1 as only abbbbccd can be created\r\naa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\r\nabc bcd    Val=0 as c is internal and thus can not connect to c of abc\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e (Spoilers)\u003c/p\u003e\u003cp\u003eA methodical approach implements the following checks: No internal equals any Start/End. Note aaa has no internal. Verify each string has no non-contiguous letters. Verify no two strings have same start or end except where start==end as in bbbb. Val is N! if there are N cc strings. Each string segment is considered a unique piece when counting. Reduce the strings of type aa until there is only one and increase Val by N!. With remaining strings merge to S strings. Val is then scaled by S!. Key merging issue is that ab ba may look mergeable to aa but in actuality it creates abba - invalid and baab -invalid thus Val=0. Creation of full length string and then a final validity check resolves this issue.\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://go-hero.net/jam\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution. No Valid Matlab solutions were submitted during the contest.\u003c/p\u003e","function_template":"function val=train(s)\r\n% s is a string of strings separated by a space\r\n val=0;\r\n vstr=regexp(s,' ','split');\r\nend","test_suite":"%%\r\ns='iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj qqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnnnnnlllllllllllllllhhhhhhhhhhhhhhhhhh ssssvxxxxbbb uuuuuuuuuuuuuuuuuutttttttttttttttttttttttttffffffffffffffffffffffffffffff uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu gggwwwwwwwrrrrrraaaaoooooooppppppyyyyyyyeeeeeeeccccccccccdddddddmmmmmmmzzzzzzkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=1440;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ffvvuaaaaddbbbkzzz yynnneerrrxxxx iiiiiwqssssyy mmmmmmmmmggggggggg llltttpjjhhoo';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='sssssssssssssssssss wwuuunnnmmgggggpzz kkkhhhdddjjqfxxaaye ttttttt oooooooooooooooooooo';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ssssssssssssssssssss zzkkkkkeuuiii gyyynnffpooxhhhjtt lllllllcccc dddddddwwwwwmmmaaa cccbbbrrrrrrrrrr';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uueeennnbbdjjxx oooooooogg sssssaaaaaww iiiiiiiiiiiii yyssss iiiirrrryyyyy ggghhhfiii kkkqqqqzzzzzzzmmmm pppppppppccccc';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aaaaabbbbcccdddddeeefffffffggggghhiiijjjkkkkklllllmmmmnnnoooopppqqqqrrrsssstttttttuuuuuvvvwwwxyyzzza';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwww sssssssssssssssssssssssssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh llllpppppppppeeeeeeejjjjjjjmmmmoooggkkkkdddddbbbxxxxxfffffffvvvvtttaazzzzzzuuuuuuuuucc wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii wwwwwwwwwwwwwwwwwyyyyyyyyyyyyyyyyyyyyyyyyyyyyyynnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnniiiiiiiiiiiiiii';\r\nVexp=1440;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cd bc ab';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggggggggggggg hhhhwzziiiiyyyyaaaa gggggggggg bbbbbbbbbbbbbb spjttfllllnncqr kkkkkdddddeeeeevvvvv ggggggg mmmmmmmmmmmmm gggggggggggg';\r\nVexp=17280;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='iilhzzattttdddjjkk wwwwwwwww uuuuuuiiiiiiiiii fggbn xxxxxxxxxxmmmmm';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tttvvsqqrrrriicccc aaaaaaaaaaaaaaaaaa ggggggggggxxxxxxxxx hheefyyydd zzzzzzzznnnnllllmmmm wwuuuk jjjjj ddddddppppppppp mmmmmmmooooooooo pppppbbbbbbbjjjjjjjj';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnrrsssplye iggwwwwnnnn';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmmmmmmmmmmmmmmmmddddddddddddddddd mmmmmmmmmmmmmmmmmmmmm ddddddddddddddjjjjjjjjjjjjjjrrrrrrrrrrrrrrrrrrrrrrttttttttttttttttt ttttzzzzzzzzvvvvvvvvhhhhhhhhccccllllllllyyyyyyaaaaeeeeeeeeiiiiiiiiii iiiiiiiiwwwwwwwooooooooppppkkkkk';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttttttttttttttttllllllllllllllllllllllllllllccccccccccccccccccccccccccccooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisssssssssssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb gggggxxxxxxrrrrnnnnnnnnmmmmkkkkuuuuuuuuyyyyyhhheeeezzzzffffffffjjjvvvvv bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqqqqqqqqaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ppppppppppppppppppppppppwwwwwwwwwwwwwwwwwwwwwwwddddddddddddddddddddddd';\r\nVexp=17280;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggpttt iiiiiiiiii iiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiii fffffffffkkkkkkkkkaa vwwnjssbbbhxxxqqr lllllccccmmuuuuu iiiiiiiiiiiiiiii iiiii';\r\nVexp=14400;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kavdczugmoesxvalrdmkcpowwxcnhumcfkzakzbdftweqhxmcfrkziqbyoeziuvitserfjiggoubonggswxlkpkoundgmayxiapv';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='abc';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii mmmmmmmmmmmmmmvvvvvvvvvvvvvvvvrrrrrrrrrrrruuuuuuuuuuuuuuussssssssssssssssssnnnnnnnnn ffffkwweeebbbbccctttppjjjggggggaaaayyddddddxxxxxx hhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiihhhhhhhhhhhhhhh';\r\nVexp=12;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cclevhhpn ywuuccc';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jjjjjjjjjjhhhhhllllllltttttmmmmmmmmmkkkkkkoooyyyyyyyyyyyycccccnnnnzzzzzzssssssbbbbbbbbbbgggggggg uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrrrrrrraaaaaaaaaaaaaaaaaaaaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eeeeeeeeeeeeddddddddddddqqqqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yyxxxmmmmhhhhhuuuujjlllllliiiiiieeeccccggbzzzzaaafff wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvsssssskkkknn rrrrrrrrrrrrrrrrrrrrrqqqqqqqqqqqqqqqqqqqqpppppppppppppppppp ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo tttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt dddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';\r\nVexp=10080;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvjjjjggggggmmmmmlllllppppppppfffffiiiiiiiidddddddeeeezsssssbbbbbbuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xxxvvvvaaaaylsqqkg ddcccpttmm nnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnn jjjjjuuuuhhhhhhhh ziiiddddd';\r\nVexp=48;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='g i uvbm iog k rdi';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccaallttwniiiiiixxhh rrrrfffffbbeeeuuuuuuuggggggyycccc sssssssssssssssvvvvvvvvvvvvvvrrrrrrrrrrrrrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrkkkkknnnnnnllsssssssssssssscccccccppppppddddddddmmmmmmwwwwwwqqqqqqiiitttttttjjjjjjjjjjj uuuuuuuuurrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vzaaappssooookkkkyyyyffbbbwwwiiiiiiiirrrllqqqqeexxddnncg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccccccccccccccccccccccccccccccccccczzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz wwwwwwwwwwffffffffffffffffppppppppppppppppppccccccccccc';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzttttttttttthhhhhhhxxxxxxbbbbbbbwwwwwwwyyypppooooorrrnnnnnnuuuggaammmmmkkkkkccccvvvvvllllllll iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss';\r\nVexp=40320;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeee hhhhhhhh xxxxxxxxxxxxxxxxxxxx iiiaanwwwrrbbbb hhhhhhhuuuuuuuuuuu dddddddtttttttttiiii gggggggggzzzzzzz qqqqccfvvvoyyykjjmm bblllllppppp';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ttttttttttttttttttttttttttttttttttttcccccccccccccccccccccccccccccccccccccccc ttttttttttttttttttttttttttttttttttttttttttttttt ccccccccccccccccccccccccccccccc pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ppppppppppppppppppppp ccccccccccccccccccccccccccccccccccccccccccc pppppppppppppppppppppppppppppppppppppppppppppppppppp pppppppppppppppppppppppppppppppppppppppttttttttttttttttttttttttttttttttttt pppppppppppppppppppppppppppppppppppppp';\r\nVexp=48;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='abc bcd';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeaaaaaaaaaaaadddddddddddddddd zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz wwwwwwvvvvvqqqqqqqqyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyylllllllllllllllluuuuuuuuuuuuuuuuuuuuuuuuuzzzzzzzzzzzzzzzzzzzzzzzzzzzz ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff eeeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrkkkkkkkkkkkkkkkkkkkkkkkk dnnnnnnnnnpppppxxxxxxffffffff';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmmffffffffffffkkkkkkkkkkkkkkkkkkkdddddddddddddd oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooommmmmmmmmmmmmmmmmmmmmmm';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeennnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggggggqqqffffffmmmiiiiiiiuuuuuuueeeeeeyyyyyyddddddddkkkkkkvvvvvvvrrrrppllllllllbbbbbwwwwwwwwjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhzzzzzzzzzzzzzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaaaaaaassssssssssssssssssssssstttttttttttttttttttttttnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbuuuuussfffffvvvkkhhheeeyyyyyjjqqqqqnnn ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd llllllllllllllllllllllllllllllllllllllllwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggmmmmmmmmmmmmiiiiiiiiiaaaaaxxxxxxxxzzzzzzzzzzzooooooooo';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvssssssssssssssssssssswwwwwwwwwwwwwwlllllllll uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu qqq yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyykkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk cccccccccoooooppppppppppppppjjjjjjjjjjjqqqqqq kkehhhhxxxftiiib qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqddddddddddddddddddddddddddddnnnnnnnnnnnnnnnnnnnnnnnnnnnnn uuuuuuuuuuuuuuuuuuuuuuuuuuuuuccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnmmmmmmmmmmmmmmmmmmmmmggggggggggggggggyyyyyyyyyyyyyyyyyyyyyyyyyy';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjggggggggggggggggggggggggggggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa hhhhhhhhhhhhhhh zzzzzzzzzzzzzzzzzzzzvvvvvvvvvvvvvvvvuuuuuuuuuuuuuuuuuuuuuuuupppppppppppppooooooooooooooooooooooo hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnneeeeeeeeeeeeeeeeeeeeeeeeeeeeeee hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwccccffffrrqqqqqqbbttttttdddddddxxxllllllllllyyyyyyyymmmmmmkkkkkksssssss';\r\nVexp=86400;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uuuuuuuyyyyyddddddddqqqqqttttttbbbiiiiiiiaaahhh ooooooooogggggguuuuuuuuuu';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggggoooooeeeyjjqqqqqqq mmmmmttttddddddrrraaaaaaaaallllllllzzzzzzzzzzzznnnnnnnnnnnnnnwwwwwwwggggg';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeaaaaaaaaaawwwwwwwwwwwwzzzzzzzzzzzzzsssssssssssssssqqqqqqqqyyyyyyyyyyyyyyyvvvvvvvvvvvvvvffff dddddddddddddddddddddddddddddddddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjllllllllllllllllllloooooooooooooooooooooooooocccccccccccccccccccrrrrrrrrrrrrrrrrrrrr ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aa aa bc';\r\nVexp=4;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkrrynnn vvvvvvvvvvvvvvvvvvvv jhhppibllllddddaooff nqqqwwwwwsss xmmmmmmmtttucc zzzzzzzzzzzzzzzzzzzz eeeeeeeeeeeee';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='fffffffffffffffffffffffffffffffffffffffffffffffffffffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ccccccccccccccccccccccccccccccc ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyygggggggggggggggggggggggggggggggggggg sssssssshhhhhhhhhhhhhhhhzzzzzzzzzzzzzooo nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnssssssssssssssssssssssssssssssssssssssssssssssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss jjjjjxxxxrrriiitttttttwwwwpppppkddddddddqqqqaaaaallllllvvbbuuuuummmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkk xxxxxxxxxxxxxvvvvvvvvvvvvvveeeeeeeeeeeeeeeeeegggggggggggg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ppppppppwwwwwwwiiiiiiiiiqqqqqsssaaaaaaaaalllllllllttttnnnnnnnddddddddhhhhhhhjjjjjjjrrrrroooooooo kkkkkkkkkkkkkkkkkkkkkkk zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzyyyyy cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk';\r\nVexp=240;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrbbbbbbbbb sslll rrrrsss mmmmmmddddd lllllllooo ooooooommmm';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeee xxmmmmm rrrrrrrrrrrrrr iiiii hhgdddfccbbqqqnniii ppppppppppppppp aayyyy oooooooooooooooooooo wwvsssszzzkkttllljjj uuuuuuuuuuuuuuuu';\r\nVexp=362880;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjj';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xxxxxxxx xxxxxxx iiavvvvppjjnnnzzzr gkkkuuwwsscccmmmmeed hhhqqqqqqqqqoooooo llllllllxxxxxxx bbyyttttttffffff';\r\nVexp=240;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkddddmmccssbb ppppppppppppp rryyyyyyqiiezzuhhx wwwwwwwwww ppppppppp aaaaaaooooooooo jjjjjjjjjjjjjjjjjjj ffffffffffffffffffff ggggggggvvvvvvtttttt lllllllnnnnnnnnnnnnn';\r\nVexp=725760;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aaaaaaaaaaaaaaaaaaavvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvqqqqqqqqqqqqqqqkkkkkkkkkmmmmmmmmmm mmmppppppppppppppxxxxxxxxxxxxxxxxxxxxcccccccccyyyyyyyyyyyyyyeeeeeeeeeeeeehhhhhhhhh';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzccccccccccchhhhhhhhhhffffffffffdddddddddaaaaaaaaavvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrpppppppppppppmmmmmkkkkkkkkkkooooooooonnnnnnnntttttteeeeeellllljjj';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzzzzzzzzz nnnffooqqqsdeeegrrmm hhhhhhhhhcccccccccc wwwwwwwwwwuuuuuuuuuu jlllkkkx cccccaaaaapppijjjjj bbbbhhhhhhhhhhhhhh yyyyyyyvvvvvvvvvvvv';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccc bbbbbbbbbwwwwwwww lllllllllllll peezzzuuiisoodtttfff mmmmmmmmmmmmmmmmm qqqyyyyyyyyyrr';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tqqxvveggggccdda oooott';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqqwwooooommhhhhhhhhlllllllsssssddddnnnniiiiiexxxxxxxxxttttffyyyyyyyybbbbbccggggggkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cccccccccccccccfffffffffffffffffffffggggggggggggmmmmmmmmmmmmmmmmmmoooooooooooqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuubbbbbbbbbbbbbjjjjjjjjjjjjjdddddddddddddddddd qqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkttttttttttttttttttttttttttttttttttttttaaaaaaaaaaaaaaaaaaaaaaaaaa';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccgggggggggggg wwwwww oooooooooo zzzzzzzzzzzzzzz rrttttttfffmm hhhhhhhhhbbbbvvvvvv xxxlnnpssddddijaoo yyyyyyyyyyyyyyyyy';\r\nVexp=5040;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='p';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqgguuuuctmmmmddjor rrrrrrrrrrrrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ab ab';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqfffffffffffffffffffffffffffffffffffffffffff rrrrrrllllllllllyyyyyy oooooooooooovvvvvvvvvvvvvvvvvvviiiiiiiwwwwwwwwwwwwwwcccccccccccccc mmmmmmmmmmmmmmmzzzzzkkkkkknnnnnnnnnbbbbbbbbaaaaaaaaaa aaaaaappppppgggggggghhhhhhhhhhhqqqqqqqqqqqqq ttttttttttttttttttjjjjjjjjjjjjjjjjjjjjuuuuuuuuuuuuuuuuuuuuuussssssssssssssssss fffffffeeeeeexxxxxttt yyyyyyyyyyyyyyyyyyyyyyydddddddddddddddmmmmmmmmmmmmmmmmmmmmmm';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uuuucccccccccccxxxxxxxxxxxxxx nnnnnnnnffffflllllllliiiiiiihhhhhhzzzzzzzzzzzzeeeeeeeeeeqqqqqqq kkkkkkkkkkkkkkkggggggggggggggggggggggaaaaaaaaaaaaaaaaaaaaauuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhkkkkkkkkkkkkkaaaaaaaoooooommeeeeeevvvvvvvvzzzzxxxxxxxxrrrrrrr lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ccccccccyyyyyuuuuuuiiqqqqqqqqqqddddddjjjjjtttttttbbbbbffffssssswwwwwwwwwgggppppppp';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmiiiii cccccccccccccccccccc hhhhhhhhhhhhhhhhh aooryzzkvvvblffff cccccccpppppqqqqq';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cccccccccc ccjjill';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='dddrrnnnnnj pppppvvvvmmmmmmoo ttttttttttttttt jjjjjjjjiiiiiiiii uullwaaaagykxxxxbe iiiiiiiiiiizzzzzzz ffffffffffssssssss';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='abc a a';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqeebbccggy uuuuufff snittojvwwwpx ddddaaaaaaaammmmmmm rrrrrrrrrrrr fffllllllhhzzzddddd';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggooojjjuuuummmmrrrrrttppppwwwwwaaaaaahhhhhhfffffkkkbbbbccccceeeezzzvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=80640;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnsssssssssssssiiiiiiiiiuuuuuuuuuuuuuuuuu lllllllllllllffffffffffvvvvvvvgggggghhhhhhhh bbbbrrrrrqqqqwwwwmmkkkoooooaaayy hhhhhhhhhhhhhxxxxxxxxxxxxxppppppppppppppppppppptttttttttttttttttteeeeeeee';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggtttttttqqqqqqxxxxxxxxkkkkkkkkyyyymmmmmmmmmwwwwwwwoooooooooooooeeeeeee pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ssssssssssssssssssssssssssssssssssssssssssssssssssssssss iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd fffrrraahhhhhlllllccbbbbvvzz jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=362880;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww xxxxxxxxxxxxxxxxxxxxxxxxxxxooooooooooooooooooooooooooooobbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb fffiiaaauuurrrddeevvvhhhhgqqqcccccnnnpyyyyssmmmmtzkkkk jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='a ca a abc';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='llllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbfffffffffffffffffffffffffffffffffffllllllllllllll vvvvvvvvvvvvvvvjjjjjjjjjjjjjjjjjjjjooooooooodddddddddddddwwwwwwwwwwwwwwnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeepppppppppppppppppppp syyyyyyyytthhhccczzzzrrrrrggqqkkkxxuuuummmmmiii ppppppppppppppppppppppppppppppppbbbbbbbbbb';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='oooooooooooooooooooooooooooaaaaaaaaaaaaaaaaaaaaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiii qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eekrrrwsnnnngggddxczffmmhhhpvvvvttjlllbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='vvvvvvvvvvvvvbbbbbbbbbbbbbbbbbbsssssssssssssfffffffffppppppppppppppplllllllllllllllll ttttzzzzzzzzzyyyyyaaaaooooooiiiiiiiiiinnnjjjjjjjjmmmmdddddddgggcccccxxxxxeeeeeeeeeeqqqqqhhhhrrrrrr';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xx fffffrrrrrrrrrrrr xssssttwwwf rrr ffffffffff';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnnnnnnnnnnnnnnnnnnn ttttttttttt fffffffffffffffffff ffffffffffffffffffff lgggccccbyyy yhaqqqmooo pppkkkeeerrrrrr';\r\nVexp=240;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aaabbbbccccdddddeeeeeeeeeffgggghiijjjjkkllllllmmmmnnnnnnnopppqqqqqqqqqrrssssttttuuuuvvwwwxxyyyyyzzzz';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggjjdddiiiixxxyyy pppppppppppppp ooooooooooooo lllllllllllll ebshuuuufffmaaawvvv ttttttttttttttt zzzzzzzzzzzzzzzzzz cccccccccccccccccccc ppppppppppppppppppp qqqqqqqqqqq';\r\nVexp=725760;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt kkiiiillxxxddwwwwmmmfffqqeeuuhhhnnnnsssssbbbbpppjjya';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggggjjjjjjjjjkkkkkktttttttthhhhhyyyyyyyyyyppppppppppaaaafffffffffffffffvvvvvvvrrrrrrrr uuuuuuuuuuuuuqqqqqqqqqbbbbbbbbbbbbdddddddddwwwwwwwwwwwwzzzzzzzxxxxxxxxeeeeeeeeeeeennnnnnnlllllllllll rrrrrrrrrrrrrrrrrrsssssssssssssssmmmmmmmmmmmmmoooooooooooooccccccccccccc';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrzzzzzz wwwwwwwwwwwwwwww uuuuuaaaaaa lllllllllllllllll ggggggggiiiiiiiiii hhhhhhhhhhhhhhhhhhhh qqssjjjmmfttecddd bbbbnnvpyyykkkxxoo';\r\nVexp=40320;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='dddddddddddddddddddddddeeeeeeeeeeeeeeeeeegggggggggjjjjjjjjjjjjjjfffffffffff bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttppppphhaaqqqqqxxxxxiiiiiiuuuuucccccmmmsszzzzznnnnnnn yyyyyyyyyywwwwwwwwwwooooooooooorrrrrrrrrrvvvvvvvvvvvvvvvvvddd kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkklllllllllllllllllllllllllllllllllllllllllllllllllllll';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jw ki ij';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yooccccgdexxmmrz wwwwwaaaiiiiii lllllllllllllllllll bbbbbbbbnnnn llllll ppppppppppppppppppp kkkhhhhhttttttjjj';\r\nVexp=1440;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuujjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj xxxxxxxxxxxttttttttttttttttaaaaaaaaahhhhhhhhhhhhhhhzzzzzzzzzzzzzzuuuu';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrpppppppp oooooooooooooooooooo ggqqwwwssmmjjahuun';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yyyyyyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeeedddddddddddddddddddrrrrrrrrrrrrr pppppppppppppppppppppppppppppppppppppppppppppppppppppp rrrrrrrrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvzzzzzzzzzzzzzzzzssssssssssssppppppppp xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxooooooooooooooooooooooooooooooooooooooooooooo ppppppppppppppppppp pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ppppppppppppppppppppppbbbbbbbbbbbbbbbbbbbbbbiiiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxx';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrcccccccccccccccccccccccc dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb oooooooooooooooooooooooaaaaaaaaaaaaaaaaaa sssgggggggglllllmmmmttttttttttttzzzjjjjjjjpppphhhhhyyyyyiiiiiixxxxxeeekkkkkkkkkfffffffuuuuuuuuwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=5040;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xxxxxmmmmmwwwwwws yyyyyyqqqqqqqq pppppppppppppppppp llllllllllllllllll vvvvvvvvvvvvvvvvv eeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaa ggggggggggggggggggg shhhodrrruuutt';\r\nVexp=40320;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj nnnnnnnnnggggggggmmmmmmmaaaaaattttttttttttwwwwwwwweeeeeeeeuuuuuuuuqqqqqqfffffffooooooo zzzzzzzzddddddddddvvvvvvv pppppppxxxxxxxxxxxxxrrrrrrrrrriiiiiiiiiiiiiikkkkkkk ppppppppppppppppppppppppppppppppppppppppppppp yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbppppppppppppppppppppppppp';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cccccccccccc qqqqqqqqqqqqqqqqq rrrrrr yyyyyyyyyyyyyyyy mmmmmmmmmmmmmmmmmmmm rrrrrrrrrrrrrr tttpajjibbuuuzfooo dddddddddddddd ssssswwhhheeelnnkkk rrrrrrrrrr';\r\nVexp=241920;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uummmmslzaaaddprqqqq kkffff jjjjjjjjjjjjjjjj kkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkk';\r\nVexp=12;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzyyyyyy nnoooooalllkkswwwf fch';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='sssssssssssssssssssssssssssssssssssssssssssssssssssssssaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ttttttttttttttttttss';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='fffffffffffffffffffffffffffffffffffff fffffffoooooosssssssssssdddddddddddddddiiiiiiiiiiiiiiiiiiyyyyyyyyyyyyyyyyyyyyyzzzz zzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';\r\nVexp=4;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\n% Full GJam solution\r\n% function GJam_Rd1c_bv2\r\n% % \r\n% trial = 1;\r\n% if trial == 1\r\n%     fin = 'B-small-practice.in';\r\n%     fout = 'B-small-practice2.out';\r\n% elseif trial == 2\r\n%     fin = 'B-small-attempt0.in';\r\n%     fout = 'B-small-attempt0.out';\r\n% elseif trial == 3\r\n%     fin = 'B-large-attempt0.in';\r\n%     fout = 'B-large-attempt0.out';\r\n% elseif trial == 4\r\n%     fin = 'B-small-practice_tiny.in';\r\n%     fout = 'B-small-practice_tiny1.out';\r\n%  elseif trial == 5\r\n%     fin = 'B-large-practice.in';\r\n%     fout = 'B-large-practice.out';\r\n% end\r\n% \r\n% [data] = read_file(fin); % \r\n% \r\n% fidG = fopen(fout, 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has N cols of cases\r\n% \r\n%  val=train(data{i});\r\n%  %toc\r\n%  fprintf('Case #%i: %i\\n',i,val);\r\n%  fprintf(fidG,'Case #%i: %i\\n',i,val);\r\n%    \r\n%   \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% end\r\n% \r\n% function val=train(s)\r\n%  val=0;\r\n%  \r\n%  vstr=regexp(s,' ','split');\r\n%  \r\n%  N=size(vstr,2);\r\n%  \r\n%  % create vs, ve, vinternal\r\n%  % check if internals\r\n%  vc=zeros(1,255); % common vector for overlaps\r\n%  \r\n%  for i=1:N  % find starts/ends\r\n%   s1=double(vstr{i});\r\n%   vs(i)=s1(1);\r\n%   ve(i)=s1(end);\r\n%   vc(vs(i))=1;\r\n%   vc(ve(i))=1;\r\n%  end\r\n%  \r\n%  for i=1:N\r\n%   v=double(vstr{i});\r\n%  \r\n%   [valid,vint]=check_vint(v);\r\n%   \r\n%   if ~valid,return;end\r\n%   if any(vc(vint)),return;end % internal elsewhere or internal to a start/end\r\n%   vc(vint)=1;\r\n%   \r\n%  end % i\r\n%  \r\n%  m=[vs' ve'];\r\n%  \r\n%  m=sortrows(m,[1 2]); % sort start then ends within start\r\n%  \r\n%  N=size(m,1);\r\n%  % if two pices have same start or end and neither is an aa then Invalid\r\n%  for c=1:2\r\n%   for i=1:N-1\r\n%    if m(i,1)==m(i,2),continue;end\r\n%    schk=m(i,c);\r\n%    for j=i+1:N\r\n%     if m(j,1)==m(j,2),continue;end\r\n%     if schk==m(j,c),return;end\r\n%    end % j\r\n%   end % i\r\n%  end % c\r\n%  \r\n%  % Cases are valid, at least a 1\r\n%  %Q is PI(Ni!) for the i cases of aaa, bbb,...\r\n%  %val=Q*Z! where Z is number of independent groups\r\n%  \r\n%  val=1;\r\n%  \r\n%  Zptr=N;\r\n%  \r\n%  % Aptr  Zptr    remove aa pairs and multiply by perms of aa sets  \r\n%  while Zptr\u003e1\r\n%   Aptr=Zptr;\r\n%   if m(Zptr,1)==m(Zptr,2) % valid aa event\r\n%    qp=1;\r\n%    while m(Aptr-1,1)==m(Aptr-1,2) \u0026\u0026 m(Aptr-1,1)==m(Zptr,1)\r\n%     Aptr=Aptr-1;\r\n%     qp=qp+1;\r\n%     if Aptr==1,break;end % finished off the pairs\r\n%    end\r\n%    val=val*factorial(qp);\r\n%    m(Aptr+1:Zptr,:)=[];\r\n%   end\r\n%   Zptr=Aptr-1;\r\n%  end % Zptr\r\n%  \r\n%  % reduce m of aa if ba or ca\r\n%  N=size(m,1);\r\n%  for i=N:-1:2\r\n%   if m(i,1)==m(i,2)\r\n%    if any(sum(m==m(i,1))\u003e1)\r\n%     m(i,:)=[];\r\n%    end\r\n%   end\r\n%  end\r\n%  \r\n%  N=size(m,1);\r\n%  for i=N:-1:1\r\n%   z{i}=m(i,:);\r\n%  end\r\n%  \r\n%  \r\n%  % Create blocks  ab bc cd  ef fg gh  to abcd efgh  or ad eh  final m rows !\r\n%  mb=m*0;\r\n%  % create strings adn then check if valid, ab ba is a 0 by abba or baab\r\n%  % check_vint\r\n%  while ~isequal(mb,m)\r\n%   mb=m;\r\n%   N=size(m,1);\r\n%   iptr=N;\r\n%   while iptr\u003e1\r\n%    ptr=find(m(1:iptr-1,1)==m(iptr,2),1,'first'); % check end to starts\r\n%    if ~isempty(ptr)\r\n%     m(ptr,1)=m(iptr,1);\r\n%     m(iptr,:)=[];\r\n%     z{ptr}=[z{iptr} z{ptr}]; \r\n%     z(iptr)=[];\r\n%    else % checkstart to ends\r\n%     ptr=find(m(1:iptr-1,2)==m(iptr,1),1,'first'); % check start to ends\r\n%     if ~isempty(ptr) % start to end\r\n%      m(ptr,2)=m(iptr,2);\r\n%      m(iptr,:)=[];\r\n%      z{ptr}=[z{ptr} z{iptr}]; \r\n%      z(iptr)=[];\r\n%     end\r\n%    end\r\n%    iptr=iptr-1;\r\n%   end % while iptr\r\n%   \r\n%  end % mb m\r\n%  \r\n%  \r\n%  for i=1:size(z,2)\r\n%   [valid,vint]=check_vint(z{i});\r\n%   if ~valid\r\n%    val=0;\r\n%    return;\r\n%   end\r\n%  end\r\n%  %m\r\n%  \r\n%  N=size(m,1);\r\n%  \r\n%  val=val*factorial(N);\r\n%  \r\n% end\r\n% \r\n% function [valid,vint]=check_vint(v)\r\n% % create list of internal elements, may be empty set\r\n% % check if v is self consistent\r\n% % abbbc becomes abc;  aabbcc abc\r\n%  valid=0;\r\n%  \r\n%  dv=diff(v);\r\n%  dv(dv==0)=[]; % remove dupes\r\n%  vp=cumsum([v(1) dv]);\r\n%  \r\n%  if length(vp)\u003e2\r\n%   vint=vp(2:end-1);\r\n%  else\r\n%   vint=[];\r\n%  end\r\n%  \r\n%  if length(vp)==length(unique(vp))\r\n%   valid=1;\r\n%  end\r\n%  \r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% % Output d{} string of strings separated by a space\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  fgetl(fid); % skip\r\n%  ptr=ptr+1;\r\n%  d{ptr}=fgetl(fid);\r\n% end % feof\r\n%  fclose(fid);\r\n% \r\n% end % read_file\r\n\r\n","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":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-05-15T14:36:42.000Z","updated_at":"2014-06-11T16:12:51.000Z","published_at":"2014-05-15T15:13:56.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/3004486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Rd 1c: Reordering Train Cars\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous.\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 s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=10. Total letters \u0026lt;=100.\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 val, number of possible sequences\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\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Small Case\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[ab bbbc cd Val=1 as only abbbbccd can be created\\naa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\\nabc bcd    Val=0 as c is internal and thus can not connect to c of abc]]\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (Spoilers)\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\u003eA methodical approach implements the following checks: No internal equals any Start/End. Note aaa has no internal. Verify each string has no non-contiguous letters. Verify no two strings have same start or end except where start==end as in bbbb. Val is N! if there are N cc strings. Each string segment is considered a unique piece when counting. Reduce the strings of type aa until there is only one and increase Val by N!. With remaining strings merge to S strings. Val is then scaled by S!. Key merging issue is that ab ba may look mergeable to aa but in actuality it creates abba - invalid and baab -invalid thus Val=0. Creation of full length string and then a final validity check resolves this issue.\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\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution. No Valid Matlab solutions were submitted during the contest.\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\"}]}"},{"id":2325,"title":"GJam 2014 Rd 1c: Reordering Train Cars (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/3004486/dashboard#s=p1 GJam 2014 Rd 1c: Reordering Train Cars (Large)\u003e.\r\n\r\nDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. The large case could have 26! or more permutations.\r\n\r\n*Input:* s, string of N space separated string segments of letters [a..z]. 1\u003c=N\u003c=100. Total letters \u003c=100.\r\n\r\n*Output:* val, number of possible sequences, modulo 1,000,000,007\r\n\r\n*Example:*  Small Train Case examples \r\n\r\n  ab bbbc cd Val=1 as only abbbbccd can be created\r\n  aa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\r\n  abc bcd  Val=0 as c is internal and thus can not connect to c of abc\r\n\r\n*Theory:* \u003chttp://www.mathworks.com/matlabcentral/cody/problems/2324-gjam-2014-rd-1c-train-cars Train Small Spoilers\u003e\r\n\r\nLarge Case specific info. See \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow Usage of java math\u003e for unlimited precision. Note intValue gives more precision than floatValue. No java factorial exists so a function, non-recursive, is suggested. The small solution can be converted via java BigInteger factorial, mod, multiply, and intValue to solve the large case.\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Small Matlab solution. No Valid Matlab solutions were submitted during the contest.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 408.3px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 204.15px; transform-origin: 407px 204.15px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 94.5333px 7.91667px; transform-origin: 94.5333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is derived from\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://code.google.com/codejam/contest/3004486/dashboard#s=p1\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam 2014 Rd 1c: Reordering Train Cars (Large)\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 373.783px 7.91667px; transform-origin: 373.783px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. The large case could have 26! or more permutations.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 19.4333px 7.91667px; transform-origin: 19.4333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 296.4px 7.91667px; transform-origin: 296.4px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=100. Total letters \u0026lt;=100.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 25.2667px 7.91667px; transform-origin: 25.2667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 183.233px 7.91667px; transform-origin: 183.233px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e val, number of possible sequences, modulo 1,000,000,007\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 31.1167px 7.91667px; transform-origin: 31.1167px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExample:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 87.2667px 7.91667px; transform-origin: 87.2667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e Small Train Case examples\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 61.3px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 30.65px; transform-origin: 404px 30.65px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.833333px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.833333px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.833333px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.833333px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 184.8px 7.91667px; transform-origin: 184.8px 7.91667px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 11.55px 7.91667px; transform-origin: 11.55px 7.91667px; \"\u003eab \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 173.25px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 173.25px 7.91667px; \"\u003ebbbc cd Val=1 as only abbbbccd can be created\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.833333px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.833333px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.833333px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.833333px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 327.25px 7.91667px; transform-origin: 327.25px 7.91667px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 11.55px 7.91667px; transform-origin: 11.55px 7.91667px; \"\u003eaa \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 130.9px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 130.9px 7.91667px; \"\u003eaa bc c Val=4 aa gives 2 positions\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 184.8px 7.91667px; transform-origin: 184.8px 7.91667px; \"\u003e, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.833333px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.833333px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.833333px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.833333px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 261.8px 7.91667px; transform-origin: 261.8px 7.91667px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 15.4px 7.91667px; transform-origin: 15.4px 7.91667px; \"\u003eabc \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 11.55px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 11.55px 7.91667px; \"\u003ebcd\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 7.7px 7.91667px; transform-origin: 7.7px 7.91667px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 227.15px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 227.15px 7.91667px; \"\u003eVal=0 as c is internal and thus can not connect to c of abc\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 25.6667px 7.91667px; transform-origin: 25.6667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eTheory:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://www.mathworks.com/matlabcentral/cody/problems/2324-gjam-2014-rd-1c-train-cars\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eTrain Small Spoilers\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 91.0333px 7.91667px; transform-origin: 91.0333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eLarge Case specific info. See\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eUsage of java math\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 199.05px 7.91667px; transform-origin: 199.05px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e for unlimited precision. Note intValue gives more precision than floatValue. No java factorial exists so a function, non-recursive, is suggested. The small solution can be converted via java BigInteger factorial, mod, multiply, and intValue to solve the large case.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 131.083px 7.91667px; transform-origin: 131.083px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAdditional GJam solutions can be found at\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://go-hero.net/jam\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eExample GJam Matlab solutions\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 139.267px 7.91667px; transform-origin: 139.267px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Small Matlab solution. No Valid Matlab solutions were submitted during the contest.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function val=train(s)\r\n% s is a string of strings separated by a space\r\n val=0;\r\n vstr=regexp(s,' ','split');\r\nend","test_suite":"%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww gggggggggggggg ddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddd dddddddddddddddddddddd dddddd dddddddddddddd dddddddddddddddddddddddddddddddddddddddddddd xxxxxxxttttttttteeeeeeppppppppppppllllllliiiiiiiifffffffffffffffmmmmmmmmmmmjjjjjjjhhhhhhhhhh uuuuuuuuubbbbbbcccccccvvvvvvvvvvkkkkkkqqqqqaaayyyyyyooooooooooonnnnnnnnnnnnrrrrrzz dddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddd ddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';\r\nVexp=728878867;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggi aaaaaaayy iiiaaaaaaa lllllllgggggg iiiiiooooooooo';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ssssssssssssssssssssbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccc jjjjjjjjjjjjjjjjjjddddddddddddggggggggggggggggg qqqqqqqqqqqqffffffffffffffffffuuuuuuuuuuuuuuaaaaaaaaaaaaaaaaaa ccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmjjjjjjjjjjjjjjjjj cccccccccccccccccccccccccccllllllllllllllllllllllllllkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeeeeeeeeecccccccccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiieeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnzzz bbbbbbbbbbbbbbbbrrrrrrrrrrrrrnnnnnnnnnnnn ggggggggggggggggggggggggggggggggggqqqqqqqqqqqqqqqqqqqqqqqqqqq hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh eeeeeeeeeeeeee zzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaappppppppppppppppppppssssssssssssssssssssssss';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkkkkkkkkkkkkkkkk llllaaaaaa gggggggggggghhhhhhhhhhh lllllllllllllllllllllllllllllllllllllll bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb dddddddddddddddddddddddddddddddddddddddddyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy aaaaaaaaa vvvvvvvvvv yyyyyyyyy xxxxxxxx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb gggggggggggggggggggggggggggg ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss iiiiiiiiiiimmmmmmmmmmmmmmmmmmmm vvvvvvvvvvvvvvvvvvvvvvvvv ssssssssssssssssssssssssssuuuuuuuuuuuuuuuuuuuuuuuuuuuuu vvvvvvvvvvvvvv uuuuuuuuuuuuuuuuuuuiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttteeeeeeeeeeeeeeeeeeeeeeeeee oooooooooooooooooooooooooooooooooooooooooooo nnnnnnnjjjjjjjjjjjjjjjddddddddddd oooooooooooooooooooooooooooooooooooooooooogggggggggggggggggggggggggggggggggggggggg nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ooooooooooooooooooooooooooooooooo vvvvvvvvvvvvvvvvvvvvvvvv bwwwwwwwwoooooo sssssssssssssssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ffffffffffffffffffffffffffffffffffffff kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzbbbbbbbbbbbbbbbbbbbbbbbbbbb ooooooooooo kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx pppppppppppppppppppppppppppppppppppppppppppppppppppppppppp kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv qqqqlllll mmmmmmmmmmmtttttttt uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu ccccccccccccccccccckkkkkkk yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaannnnnnnnnnnnnnn ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk hhhhhhhhhhhhhhhhhhhhhhhhhhrrrrrrrrrrrrrrrrrrqqqqqqqqqqqqqqqqqq';\r\nVexp=265420800;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrjjjjjjjjnnnnnnnyyyyyyxxxxxlllltttttttt';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwww yy wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh yyyyyyyyyyyyyyyyyyyyyyyyyyyyyiiiiiiiiiiiiiiiiiiiiiiiiii ggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwww xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvv aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalllllllllllllllllllllllllllllllllllllllllllllllll aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnttttttttttttttttkkkkkkkkkkkkkkkjjjjjjjjjjjjjooooooooooooooooooo bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb wwwwwwwwwwwwwwwwwwwwwwwwwww lllllllllllllllllllllllllllllllgggggggggggggggggggggggggggggg wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww uuuuuuuuuuuuuuuuuuuuuuuuuuuuu wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh yyyyyyyyyyyyyyyyy wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww mmmmmmmmmmmmeeeeeeeeeeeesssssssssdddddddddddzzzzzzzzzzzzzzzzrrrrrrrrrrrrrrrrrffffffqqqqqqqqqqqqqqq bbbbbbbbbbbbbbbbbbbbbbpppppppppppppppppppppppppppppppppyyyyyyyyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyyy';\r\nVexp=161166448;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttt qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq vvvvvvvvvvvvvvvvvvv lllll vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv jjjjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vv tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttt zzzzzrrrraaaaaasssssssseeeeeegggggggiiiooooooooooooobbbbbbbbkkkkkkkkkkyyyyyyyyyyywwwwwwww tttttttttttttttttttttttttttttttttttttttttttttttt vvvvvvvvvvvvvvvmmmmmmmmmmmmmmmmmmmmmmmmmmmmm tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt lllllllllllllllllllllllllllllllllllllllllllllllllllllll nnnnnnnnnnnnnnnnnnnndddddddddddddddddddddddddddxxxxxxxxxxxxxxxx tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttttttttttttttttttttttttttttttttttttttttttt ffffffffffffffffffffffffffffffffffjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhllllllllllllllllllllllllllllllllllllllllll tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt pppppppppppppppppppppppuuuuuuuuuuuuuuuuuuuuuuuuuuucccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmm mmmmfffffffff jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj tttttttttttttttttttt';\r\nVexp=459335393;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ppppppp aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz ttttttttttttttttttttttttttttaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ddddddddddddddddpppppppppppppppp hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh xxxxxxxxxxxxxxxxxxxxxxxxxxxx hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaaavvvvvvvvvvvvvvvv yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyykkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh pppppppppppppppppppppppppppjjjjjjjjjjjjjjjjjjjjjjjjjjjjj hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhh pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnooooooooouuuuuuuuuuurrrrrrrrrrrwwwwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwwwwwwwwwwwwwwwwwwwwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh sssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ttttttttttttttt zzzzzzzzzzzzzzzzzzzzz ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ccccccccccccccccceeeeeeeeeeeeeeeeeeemmmmmmmmmmmmmmmmm ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh fffffffffffqqqqqqqqqqqq yyy vvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaaaa jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj zzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzbbbbbbbbbb dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd hhhhhhhhhhhhhhhhhhhhhhh ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd kkkkkkkkkkkkkkkkkkkkkkkkkkkkkzzzzzzzzzzzzzzzzzzzzzzzzzzzzz vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss hhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ss hhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbsssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh dddddddddddddddddddddddddddddddddddddddd hhhhhhhhhhhhh tttttttttttttttttttttttttttttttttttttttttttttttt bbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhh zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz hhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh';\r\nVexp=893810165;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhsssssssssssssssssssssssssss gggggggggggggggggggggggggggggggggggggg wwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ggggggggggggggggggggggggggggggggggggg qqqqqqqqqqqqqqqqqqwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii lllllllllllllllllllllllll ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllyyyyyyyyyyyyyyyy qqqqqqqqqq wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww pppp bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh mmm sssssssssssssssssssssssssllllllllllllllllllll mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm iiiiiiiiigggggg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii gggggggggqqqqqqqqqqqqqqqqqq qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq fffffffvvvvccccccccccccoooooddddddddd uuuuuuuuuuuuuuuuaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrzzzzzzzzzzzzzzztttttttttttteeeeeeeeeeeeeeeeee ppppppppppppppppppppp hhhhhh ssss ppppppppppppppppppppppppppppppppxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wwwwwwwwwwwwwwwwwmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkpppppppppppppppppppppppppppppppppppppppppppppppppp xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyy xxxxxxxxxxxxxxxxxxxxjjjjjjjjjjjjjjjjjjj lllllllllllllllllllll mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg wwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk';\r\nVexp=588556762;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii oooooooooooooooooooooooooooooooaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu oooooooooooooooooooooooooooooooooooooooooooo llllllllllllllllllllllllllllllllllllll bbbbbbbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc oooooooooooooooooo cccccccccccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllljjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiii oooooooooooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj iiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjwwwwwwwwwwwwwwwwwwwwww ooooooooooooooooooooooooooooooooooooooooooooooo bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbboooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa oooooooooooooooooooooooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ccccccccccccccccccccccccccccccccccccccccc bbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaa uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ooooooooooooooooooooo uuuu cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kkkkkkkkkkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkllllllllllllllllllllllllllllllllllllllllllllll aaaaaaiiiiiiiiiiiiii uuuuuuuuuuuuu kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ccccccccccccccccccccccccccccccccccccccccccccccccckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo iiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb jjjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb jjjjjjjjjjjjjjjjjjjj nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn xxxxxx llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll iiiiiiiiiiiiiiiiiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeeeeeeeeeee wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww llllllllllllllllllllllllllllllllllllllllllllllllllllllll eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa uuuuuuuuuuuuuuuuuuu oooooooooooooooooooooooooooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee oooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ii iiiiiiiiiiiiiiuuuuuuuuuuuuuuuuuu oooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxx lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwww aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa llllllllllllllllllllllll eeeeeeeeeeeeeeeeeee lllllllllllllllllllllllllllllllllllllllllllllllll ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc';\r\nVexp=125298902;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='hhhhhhhhhvvvvv kkhh ppmmmmmmmmm zzxxx sssccccccc fffffffqq yyyyyyyeeeeee xxxxxxxxi eeeeeeeeaaaaaaaa jjjppppppp ddddf cccccrrrrrrrr';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr tttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ppppppppppppppppppppppppppppppppppppppppppppyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnnnnnnnnn qqqqqqqqqqqq llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll yyyyyyyyyyyyyyyyyyyyy ttttttttttttttttttttttttttttttttttttttttttttt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzppppppppppppppppppppppppppppppppppppppppppp ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ffffffffffff iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ddddddddddddddddddddddddssssssssssssssssssssssssssssssss qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu zzzzzzzzzzzzzzzzzzz rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr cccccccccccccccccccccccccccccccccccccccccccc rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr ggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg aaaaaaaaaaaaaaaaaaaaa pppppppppppppppppppppppppppp yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ccccccccccccccccccccccccc cccccccccccc aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa iiiiiiiiiiiiiiiiiiivvvvvvvvvvvvvvvvvvvvdddddddddddddddddd cccccccccccccccccaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwooooooooooooooooooooo yyyyy llllllllllllllbbbbbbbbbbbbbbbbbbbbbuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy fffffffffffffffffffffffffffffffffzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr tttttttttttttttttttttttttttttttttttttttttttffffffffffffffffffffffffffffffffffffffff sssssssssssssssssssssssssss xxxxxxxxxxxxxxxxxxxxxx yyyyyqqqqqqq ffffffffff ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrttttttttttttttttttttttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxx gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ooooooooooooooooooooooooooooooooooooo rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr xxxxxxxxxxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii qqqqqqqqqqqqqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnn jjjjjjj ssssssssssssssssssssssssssssssssssssssssssswwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy jjjjjjjjjjjjjjjjjjjjjjjjjjjjjcccccccccccccccccccccccccccccccccc tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ggggggggggggggggggggggggggllllllllllllllll aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc qqqqqqqqqqqqqqqqqqqqqqqqq rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ssssssss cccccccccccccccccccccccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj tttttttttttttt iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jjjjjjjjjjjjjjjjjjjjjj';\r\nVexp=45590719;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh mmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmm mmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll xxxxxxvvvvvvvvvvvvvoooooojjjjjjjjaaaaaaaffffffffppppppppyyyyyykkkkkkkkkqqqqqqqqqqrrrrrr mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm wwwwwwwnnnneeeeeeesssssuuuuuuuuuudddddddddiiiiiiii mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmm mmmmmmmmmmmmmmm ggggggggggggggggggggggggggggggcccccccccccccccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt';\r\nVexp=757993753;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggg iihhhhhhaaaaaaaaallmmmmmeeedddddbbbbbbppssssssoooovvvvvvffffftttttttttqqqqqkkkkkknnnnn uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu rrrrrrrrrrrrrrrrrrrrrrrrrr gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggg rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwww';\r\nVexp=16857327;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccccccccccccccccccccccccccc zzzzzzzzzzzzzzzzzzzzzzzzzzzzzrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr llllllllllllllllllllllllllllllllllllllllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll tttttttttttaaaaaaaaakkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ccccccccccc uuuuuuuuuujjjjjjjssssssssssssss llll llllllllllllllllllllllllll cccccccccc lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc yyyyyyyyypppppppffffffffffxxxxxxxxxxxxxxiiiiiiiiiiiiiii hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh lllllllllllllllllllllllllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll hhhhhhhhhhhhhhhhhhhhh ccccccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz cccccccccccccccccccccccccccccccccccccccc hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn kkkggggggggeeeeeeeeeeeeeeeeeoooddddddddddwwwwwmmmmmmmmm bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz cccccccccccccccccc llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb';\r\nVexp=539156306;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sssssssssssssbbbbbbbbbbbbbbbb nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn sssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb eeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ssssssssssssssssssssssssssssssssssss nnnnnnnnnnnnn ssssssssssssssssssssssssssssssssssssssssssssss eeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbb sssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn aaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa nnnnnnnnnnnnnnnn sssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sssssssssssssssssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbb nnnnnnnnnnnnneeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ssssssssssssssssssssssssssssssssssss nnnn bbbbbbbbbbbbbbbbbbbnnnnnnnnnnnnnnnnn ssssssssssssssssssssssssssssssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnn ssssssssssssss bbbb ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss sssss sssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn sssssssssssssssssssssssssssssssss nnnnn aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa';\r\nVexp=392523621;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc llllllll llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll wwwwwwwwzzzzzzzzzzzzzeeeeeeeeeeuuuuuuuuvvvvvvvvvvvvvvrrrrrrrrrrtttttttttttttt llllllllllllllllllllllllllllllllllllllllllllllllllllllllll ttttttthhhhhmmmmmmmmmqqqqqqqqqqqqqq ccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccc lllllllllllllllllllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll bbbbbbbppyyyyyyiiisssssssnnnff ccccccccccccc llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllll xxxxxjjjjjjddddaaaaaakkkkkkkkk cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllll lllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccclllllllllllllllllllllllllllllllllllll ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccc lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccc tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccc';\r\nVexp=981953933;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwhhhhhhhhhh zzzzzzzzzzzzzzzzzzzzvvvvvvvvvvvvvvvaaaaaaaaaaaaaaaaaaaaaaiiiiiiiiiiiiiiiiiii kkkkkkkkkkkkkkkkkkkkk uuuuuuuuuuuuu jjjjjjjjjjjjjjjjjjjjjjjjjjjjjbbbbbbbbbbbbbbbb kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuuujjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kkkkkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuu mmmmmmmmmmmmmmmmmmmmmmmpppppppppppppppp kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee jjjjjjjjjjjjjj eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbqqqqqqqqqqqqqqqqqqqq jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq lllllnnnnnnnnnnnnnnnnn nnnnn wwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq wwwwwwwwwwwwwwwwwwww kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk xxxxxxxxxrrrrrrrrrgggggggggggggffffffffftttttttccccccccccccccccoooooooddddyyyyy eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww jjj uu bbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqq qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelllllllllllllllllllllllllllllllllllllllllllll bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww';\r\nVexp=310957976;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aabbbbbcccddeeeeeeeefffgggggghhhhiiiiiiiijjkkkkklllmmmmmmmnnnooooppppppqqrrsssttuuuuuuuvvvvwxxyyyyya';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbb lllllllllllllllllllllllllllllllllllllllllll hhhhhhhhhhhhhhhhhhh kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt aaaa hhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbb llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll nnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu hhhh jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqsssssspppppppppmmmmmmfffffffff vvvvvvvooooooooooowwwwwwwwwwwccccccccrrrrrrrrrrddddddddddddddddddd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttttttttttttttttttttttttttttttttttttttttttttttttt uuuuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnn hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhh uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh llllaa gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnneeeeeeeeettt bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb tttttttttttttttttt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz hhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb uuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbb nnnnnnnnnnnnnnnnnnnnnnnnnnn tttttttttttttttttttttttttttttttttttt uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzlllllllllllllllllllllllllllllllllllllllllll hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh kkkkkkkkkkkkkkkkkkk bbbbbbbbbbbbbbbbbbbbbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh uuuuuuuuuuuuuuu aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggggggggggggggggggggggggggggggggzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb';\r\nVexp=236753019;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq dddddddlllllllllllllll xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ssssssssssssssssssssssssssssssssttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhkkkkkkkkkkkkkkkkkkkkk aaaaaaaaaaaaaaaaaaaaaaaaaaaccccccccccccccccccccc gggggggggggggggggggggggggggggggggggggddddddddddddddddddddddddddddddddddddddd ttttttttttttttttttttttttttttiiiiiiiiiiiiiiiii llllllllllllllllllhhhhhhhhhhhhhhhhhhhhhh rrrrrrrrrrrrrrrrrzzzzzzzzzzzzz kkkkkkkwwwwwwwwwwwwwwwwwwwnnnnnnnnnnnnnyyyyyyyyyyyyy iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ppppppppppppppppppppppppppppppppppppppppppxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qqqqqqqqqqqqqqqqqqqqbbbbbbbbbbbbbbbbbbbbbbssssssssssssssssssssssssssssssssss sssssssssssssss oooo ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp mmmmmmmmmmmm ffffffeegggggggg iiiiiiiiiiiivvvvvvvvvvvvv yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvfffffffffffffffffffffffffffffffffffffffffffffff xxxxxxxxxxxxxxxxxxxxxxxxx oooooorr ffffffffffffffffff pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp xxxxxxxxxx ooooooooooooooooooooooo mmmmmmmmmmmmmmmmmmmmmmoooooooooooooooooooooooooooooo';\r\nVexp=48;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeee dduuknnnbbyyysssssqqmmfrrrrrraaaacczzziiiiigggggxxxllllp eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj vvvvvvvvvvvvvvvvvvvvvvhhhhhhhhhhhhhhhhhhhhhhhttttttttttttttttttttttttttt eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww eeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\r\nVexp=901255609;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccc yyynnttooppphhhiiiwwllllggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv cccccccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss kkkkmmmmmmm uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu fffffffffffff ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sssssssssssssssssssssssssssssssssssssssssssssssssssss kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk sssssssssssss ccccccccccccccccccccccccccccccccccccccccccccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjccccccccccccccccccccccccccccccccccccccccccc xxxxxxxxxxxxxxxddddddddddddddrrrrrrrrrrrrrrrrrrrrrrrqqqqqqqqqeeeeeeeeeeeee kkkkkkkkkkkkkkkkkkkkkkkkkkkkk ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssssssssss mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk zzzzzzzzzzzzzzzzzz kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmzzzzzzzzzzzzzzzzzzzzzzzzzz';\r\nVexp=654434779;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrr rrrrrrrrrrrrrrrrrrrrrrr pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp tttttttttttttttttttttttttttttttt lllllllllllllllllllllllllllllllllllllllllllllllllllllllll ttttttttttttttttttttttttttttttttttttttttttttttttttttt vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv gggggggggggggghhhhhhhhhhhhhhhhhxxxxxxxxxxxxxxxkkkkkkkkkkkkkkkkkccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllllllllllllllll vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttttttttttttttttttttttttttttttttt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr ttttttttttttt qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttttt ttttttttttttttttttttttttttttttttttttttttttttttttttttttt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrr jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ppppppppppppppppppppppppppppp jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww tttttttttttttttttttttttttttttttttttt ooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii rrrrr pppppppppppppp iiiiiiiiiiiiiiiiiiiiiii lllllllllllllll tttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr lllllllllllllllllllllllllllll vvw llllllllllllllllllllllllllllllllllll pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr llllllllllllllllllllllllllllllllllllllllllllllllliiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii dddddddddddddddbbbbbbbbbbbbbbbbeeeeeeeeeeeeeeeeeeeyyyyyyyyyyyysssssssssssssssssssss mmmmmmmmmmmmmmmmmmmmmmmaaaaaaaaaaaaaaaaaaa ppppp vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr jjjjjjjjjjjjjjjjjjjjjjjjjjjj rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt nnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuzzzzzzzzzzzzzzzzzzzzzz gggggggggggg tttttttttttttttttttttttttttttttttttttttttttttt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwpppppp iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww jjjjjjjjjjj wwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccfffffffffffffffff llllllllllllllllllllllllllllllllllllllll tttttttttttttt pppppppppppppppppppppppppppppppppppppppp wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt jjjjjjjjjjjj ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo tttttttttttttttttttttttttttt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzgggggggggggggggggggggggggggggggggggggggg rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ttttttttttttttttttttttttttttttttttttttttttttttt llllllllllllllllllllllllllllllllllllllllllllllllll vvvvvvvvvv';\r\nVexp=977338612;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ccccccccccccccccccccccccccccccccccccccccccccccc ffffffffffffffffffffffffffffffffffffffffffffffffffpppppppppppppppppppppppppppppppppppppppppppppp cccccccccccccccccccccccjjjjjjjjjjj ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ccc pppppppppppppppppppppppppppppppppppsssssssssssssssssssssssssssssssssssssss ppppppppppppppppppppppppppp eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ssssssssssss iiiiiccccccccc jjjjjjffffffffffff ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ppppppppppppppppppppppppppppppppppppppppppppp ssssssssssssssssssssssssssssseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp eeeeeeeeeeeemmmmmmmmm iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii';\r\nVexp=864;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj aaaaa ooooooooooooooooooo mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nnnn sssssssssssssssssssssssssssssssssssssssssssssuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggggggggggggggggggggggggggggggggggggggggggggggggggg aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj aaaaaaaaaaaaa jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee mmmmmmmmmmmmmmmmmmmmmm eeeeeeewwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo aaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnnn lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ppppppppppppppppppppppppppppppppppppppppppppppgggggggggggggggggggggggggggggggggggggggggggggggggggggg ttttttttttttttttttttttttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd fffffffffffffffffffffffffffffffffffffff cceee ooooooooooooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ffffffffffffffffffffffffffffffffffffffffffffttttttttttttttttttttttttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp lllllllllllllllllllllllllllllllllllllllllllll fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ttttttttttttttttttttsssssssssssssssssssssssssssssssssssssssss wwwwwwwwwwwwwwhhhhhhhhhhhhhhhhllllllll aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ggggggggggggggggggggggggggggggggggggggggggggggggg aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ooooooooooooooooooooovvvvvvvvvvvvvvvvvvv aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa iiiiiiiiiiiiiiiiiiiiiiippppppppp cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv yyyyyyyyyyyyyyyyyyyyyyyyffffffffffffffffffffffffffffffffffffffffffffff aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa fffffffff mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ggggggcccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm aaaaaaaaaaaaaaaaaaaaaaaaaaa kkkkkkkkkkkkkkkkkkkkkkkrrrrrrrrrrrrrrrrrrrrrrrrrr uuuuuuuuuuuuuiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy mmmmmmmmmmmmmmm aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iiiiiiiii';\r\nVexp=702191236;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='oooooooooooooooooooooooooooooooooooaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbblllllllllllllllllzzzzzzzzzzzvvvvvvvvvvvvvvvvqqqqqqqqqqqkkkkkkkkkkkkkhhhhhhhhhhhhhhh eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee iiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee fffffffffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuu nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn rrrrrrrrrrrrrtttttttttttttmmmmmmmmmmmmccccccccyyyyyyyywwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii pppppppppppppppsssssssssssssssssssjjjjjjjjjjjjjjjjjddddddddddddddddxxxxxxxxxxxxxxxx nnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\r\nVexp=880614102;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwww rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwgggggg nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggggggggggg nnnnnnnnnnnnnnnnnnnnnnnnnn vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww zzzzzzzzzzzzzzzdddddddddddddddddddddyyyyyyyyyyyyyy jjjttttxxxxhhfffllllllqqqqqiiiiiimmmmmmmmuueeeeccccsssooookkkkppppppaabbbbbb vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnnnnnnnnnnnnnnnn vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww';\r\nVexp=101045724;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\n%s='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeexxxxxxxxxxxxxxxxxxxxxxxx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb yyyyyyyyyyyyyyyykkkkkkkkkk mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww oooo ggggggggggggggggyyyyyyyyyyyyyyy iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb iiiiiiii ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc hhhhhhhhhhhhhhggggggg hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwwaaaaaaa rrrrrrrrrrrrrrrr hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ooojjjjjjj rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ddddddddddddddddddddddddddddddddddddddddd iiiiiiiiiiiiiiiiiiiiiiiiiiiii","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":"2020-10-01T17:08:50.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2014-05-15T21:15:21.000Z","updated_at":"2020-10-01T17:08:50.000Z","published_at":"2014-05-15T21:59:11.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\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/3004486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Rd 1c: Reordering Train Cars (Large)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. The large case could have 26! or more permutations.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=100. Total letters \u0026lt;=100.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 val, number of possible sequences, modulo 1,000,000,007\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Small Train Case examples\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[ab bbbc cd Val=1 as only abbbbccd can be created\\naa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\\nabc bcd  Val=0 as c is internal and thus can not connect to c of abc]]\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTheory:\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://www.mathworks.com/matlabcentral/cody/problems/2324-gjam-2014-rd-1c-train-cars\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eTrain Small Spoilers\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLarge Case specific info. See\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://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eUsage of java math\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e for unlimited precision. Note intValue gives more precision than floatValue. No java factorial exists so a function, non-recursive, is suggested. The small solution can be converted via java BigInteger factorial, mod, multiply, and intValue to solve the large case.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Small Matlab solution. No Valid Matlab solutions were submitted during the contest.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":1876,"title":"GJam: 2013 China Event: Name Sorting","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p2 GJam 2013 China Moist\u003e. The problem is Codified by making the input a cell array of names.\r\n\r\nThe Challenge involves a serial card sorting machine that places card (i+1) in its best position, 1 thru i, if the name on card (i+1) is lexicographically greater than the name on card (i). The machine continues thru the end of the deck. The machine then restarts at card 1 until the order is correct. The output to return is the number of card insertions. The character values follow ascii codes with Space \u003c A:Z \u003c a:z. A shorter name is less than an extended name (Ab\u003cAbe)\r\n\r\n*Input:* names  ( cell array of names )\r\n\r\n*Output:* Insertions  (count of card insertions required)\r\n\r\n*Competition Summary:*  Best Time 6 minutes, 793/1049 correct\r\n\r\n*Example:*\r\n\r\nnames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\r\n\r\nClearly takes 3 card insertions. Start (SRJD)  moves [(RSJD) (JRSD) (DJRS)]","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p2\"\u003eGJam 2013 China Moist\u003c/a\u003e. The problem is Codified by making the input a cell array of names.\u003c/p\u003e\u003cp\u003eThe Challenge involves a serial card sorting machine that places card (i+1) in its best position, 1 thru i, if the name on card (i+1) is lexicographically greater than the name on card (i). The machine continues thru the end of the deck. The machine then restarts at card 1 until the order is correct. The output to return is the number of card insertions. The character values follow ascii codes with Space \u0026lt; A:Z \u0026lt; a:z. A shorter name is less than an extended name (Ab\u0026lt;Abe)\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e names  ( cell array of names )\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Insertions  (count of card insertions required)\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e  Best Time 6 minutes, 793/1049 correct\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003enames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\u003c/p\u003e\u003cp\u003eClearly takes 3 card insertions. Start (SRJD)  moves [(RSJD) (JRSD) (DJRS)]\u003c/p\u003e","function_template":"function cost=sort_cost(names)\r\n% names is a cell array\r\n  cost=0;\r\nend","test_suite":"%%\r\ntic\r\nnames={'Daniil Barantsev' 'Maria Balaba' 'Krisztina Barta' 'Patrice Archetto' 'Petra Arponen' 'Giovanna Almeida Leto' 'Tanith Belbin' 'Melania Albea' 'Lubov Bakirova' 'Mao Asada' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Fedor Andreev' 'Alessia Aureli' };\r\nexp=1;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jeremy Allen' 'Vazgen Azrojan' 'Zabato Bebe' 'An Ni' 'Vladimir Belomoin' 'Julia Beloglazova' 'Irina Babenko' 'Vitali Baranov' 'Vadim Akolzin' 'Mai Asada' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Babkin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mary Grace Baldo' 'Dmitri Antoni' 'Andrew Bassi' 'Tanith Belbin' 'Emilia Ahsan' 'Adrian Alvarado' 'Michael Bahoric' 'Vitali Babkin' 'Charlotte Belair' 'Annie Bellemare' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Baranov' 'William Beier' 'Charlotte Belair' 'Andrei Bekh' 'Letizia Alessandrini' 'Oksana Baiul' 'Felicia Beck' 'Margaret Albia' 'Johanna Allik' 'Christiane Berger' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vadim Akolzin' 'Dmitri Antoni' 'Petra Arponen' 'Felicia Beck' 'Letizia Alessandrini' 'Marina Anissina' 'Alisa Allapach' 'An Yang' 'Tobias Bayer' 'Imola Antal' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Stuart Beckingham' 'Ryan Arnold' 'Vazgen Azrojan' 'Oksana Baiul' 'Laurent Alvarez' 'Vitali Baranov' 'Tayfun Anar' 'Andrei Bekh' 'Evan Bates' 'Ilia Averbukh' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alibel Alegre' 'Alla Beknazarova' 'Andrew Bassi' 'Megan Allely' 'Elladj Balde' 'Tatiana Basova' 'Olga Akimova' 'Marta Andrade' 'Mao Asada' 'Becky Bereswill' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Laurent Alvarez' 'Mary Grace Baldo' 'Julia Abolina' 'Krisztina Barta' 'Marina Aganina' 'Becky Bereswill' 'Olga Akimova' 'Vazgen Azrojan' 'Elena Berezhnaya' 'Yann Abback' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mao Asada' 'Vitali Baranov' 'Rinata Araslanova' 'Margaret Albia' 'Giovanna Almeida Leto' 'Hanna Asadchaya' 'Andrew Bassi' 'Marina Anissina' 'Tayfun Anar' 'Birce Atabey' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\r\nexp=3;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Marina Anissina' 'Valentina Anselmi' 'Spencer Barnes' 'Ivan Bariev' 'Miki Ando' 'Alexandra Baurina' 'Maria Balaba' 'Andrew Bassi' 'Imola Antal' 'Anastasia Belova' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Felicia Beck' 'William Beier' 'John Baldwin' 'Julia Beloglazova' 'Margaret Albia' 'Colette Appel' 'Maria Balaba' 'Olga Akimova' 'Daniil Barantsev' 'Sara Beikircher' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Petra Arponen' 'Christina Beier' 'Alexei Beletski' 'Tayfun Anar' 'Saulius Ambrulevicius' 'Patrice Archetto' 'Rinata Araslanova' 'Sofia Bardakov' 'Alisa Allapach' 'Nadine Ahmed' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'Kevin Alves' 'Adrian Alvarado' 'Florent Amodio' 'Andrei Bekh' 'Alisa Agafonova' 'Gabor Balint' 'Giovanna Almeida Leto' 'Letizia Alessandrini' 'Oksana Baiul' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alisa Agafonova' 'Kevin Alves' 'Laurent Alvarez' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Miki Ando' 'Gloria Agogliati' 'An Yang' 'Felicia Beck' 'Tobias Bayer' 'Vitali Babkin' 'Andrei Bekh' 'Ivan Bariev' 'Melania Albea' 'Florent Amodio' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alla Beknazarova' 'Erica Archambault' 'Fedor Andreev' 'Felicia Beck' 'Irina Babenko' 'Krisztian Andraska' 'Mai Asada' 'Marina Aganina' 'Melania Albea' 'Vadim Akolzin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Michael Bahoric' 'Evan Bates' 'Olga Akimova' 'Emilia Ahsan' 'Vitali Baranov' 'Erica Archambault' 'Charlotte Belair' 'Alexandra Baurina' 'Tayfun Anar' 'Vera Bazarova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Vera Bazarova' 'Spencer Barnes' 'Annie Bellemare' 'Krisztina Barta' 'Olga Akimova' 'Vadim Akolzin' 'Veronika Benesova' 'Adrian Alvarado' 'Alexander Abt' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Gloria Agogliati' 'Elladj Balde' 'Colette Appel' 'An Yang' };\r\nexp=4;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Hanna Asadchaya' 'Ian Beharry' 'Julia Beloglazova' 'Michael Bahoric' 'Shizuka Arakawa' 'Spencer Barnes' 'Vera Bazarova' 'Vladimir Belomoin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Emilia Ahsan' 'Alisa Allapach' 'Felicia Beck' 'Engin Ali Artan' 'Valentina Anselmi' 'Alexander Abt' 'Jill Bakker' 'Jody Annandale' 'Nina Bates' 'Irina Babenko' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Evan Bates' 'Sergei Baranov' 'Rie Arikawa' 'Florent Amodio' 'Nadine Ahmed' 'Alla Beknazarova' 'Sofia Bardakov' 'Alexander Abt' 'Birce Atabey' 'Charlotte Belair' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexander Abt' 'Charlotte Belair' 'Kristen Avis' 'Nadine Ahmed' 'Tanith Belbin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Bogdan Berezenko' 'Veronika Benesova' 'Sarah Abitbol' 'Christiane Berger' 'Tayfun Anar' 'Giovanna Almeida Leto' 'Michael Bahoric' 'John Baldwin' 'Elladj Balde' 'Jill Bakker' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Elvis Stojko' 'Evgeni Plushenko' 'KristiYamaguchi' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztian Andraska' 'Katarina Babalova' 'Annie Bellemare' 'Melania Albea' 'Petra Arponen' 'Irina Babenko' 'Johanna Allik' 'Sara Beikircher' 'Charlotte Belair' 'Miki Ando' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Oksana Baiul' 'MichelleKwan' };\r\nexp=1;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexei Beletski' 'Joelle Bastiaans' 'Alisa Allapach' 'Alisa Agafonova' 'Vladimir Belomoin' 'Letizia Alessandrini' 'Krisztina Barta' 'Becky Bereswill' 'Benjamin Agosto' 'Michael Bahoric' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Margaret Albia' 'Johanna Allik' 'Daniil Barantsev' 'Camilla Andersen' 'Andrei Bekh' 'Alla Beknazarova' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alisa Allapach' 'Andrew Bassi' 'Daniil Barantsev' 'Hanna Asadchaya' 'Imola Antal' 'Jeremy Abbott' 'Jill Bakker' 'Marina Anissina' 'Rinata Araslanova' 'Shizuka Arakawa' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Tayfun Anar' 'Rinata Araslanova' 'Nina Bates' 'Michael Bahoric' 'Julia Abolina' 'Jeremy Abbott' 'Ian Beharry' 'Engin Ali Artan' 'Colette Appel' 'Birce Atabey' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Melania Albea' 'Nadine Ahmed' 'Miki Ando' 'Alexei Beletski' 'Florent Amodio' 'Jake Bennett' 'Camilla Andersen' 'Jeremy Allen' 'Rie Arikawa' 'Kristen Avis' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Laurent Alvarez' 'Katarina Babalova' 'Shizuka Arakawa' 'Elladj Balde' 'Daniil Barantsev' 'Gabor Balint' 'Adrian Alvarado' 'Andrew Bassi' 'Anastasia Belova' 'Krisztina Barta' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexandra Baurina' 'Jake Bennett' 'Marina Aganina' 'Marina Anissina' 'Vadim Akolzin' 'William Beier' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Adrian Alvarado' 'Alisa Agafonova' 'Charlotte Belair' 'Evan Bates' 'Gloria Agogliati' 'Pascale Bergeron' 'Sarah Abitbol' 'Stuart Beckingham' 'Tayfun Anar' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Miguel Ballesteros' 'Julia Beloglazova' 'Eve Bentley' 'Spencer Barnes' 'Jeremy Allen' 'Megan Allely' 'Katarina Babalova' 'Birce Atabey' 'Jeremy Abbott' 'Vladimir Belomoin' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Engin Ali Artan' 'Christiane Berger' 'Petra Arponen' 'Veronika Benesova' 'Vera Bazarova' 'Andrew Bassi' 'Anastasia Belova' 'Kristen Avis' 'Margaret Albia' 'Alexei Beletski' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexandra Baurina' 'Gabor Balint' 'Emili Arm' 'Elena Berezhnaya' 'Tanith Belbin' 'Dmitri Antoni' 'Adrian Alvarado' 'Melania Albea' 'Andrew Bassi' 'Engin Ali Artan' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Gabor Balint' 'Imola Antal' 'Mao Asada' 'Jeremy Allen' 'Hanna Asadchaya' 'Charlotte Belair' 'Evan Bates' 'Alexei Beletski' 'William Beier' 'Michael Bahoric' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Giovanna Almeida Leto' 'Gabor Balint' 'Krisztian Andraska' 'Benjamin Agosto' 'Evan Bates' 'Maria Balaba' 'Marta Andrade' 'Ian Beharry' 'Tatiana Basova' 'Rie Arikawa' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexandra Baurina' 'Imola Antal' 'Evan Bates' 'Felicia Beck' 'Ian Beharry' 'Bogdan Berezenko' 'Becky Bereswill' 'Michael Bahoric' 'Tayfun Anar' 'Stuart Beckingham' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Charlotte Belair' 'An Yang' 'Paolo Bacchini' 'Olga Akimova' 'Vitali Baranov' 'Spencer Barnes' 'Valentina Anselmi' 'Annie Bellemare' 'Mary Grace Baldo' 'Ivan Bariev' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Katarina Babalova' 'Bogdan Berezenko' 'Marta Andrade' 'Vadim Akolzin' 'Spencer Barnes' 'Michael Bahoric' 'Krisztian Andraska' 'Alibel Alegre' 'Emilia Ahsan' 'Beril Bektas' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Birce Atabey' 'Anastasia Belova' 'Tobias Bayer' 'Kristen Avis' 'Rima Beliy' 'Andrew Bassi' 'Letizia Alessandrini' 'Alexei Beletski' 'Julia Abolina' 'Evan Bates' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztian Andraska' 'Sarah Abitbol' 'Kristen Avis' 'Tayfun Anar' 'Vadim Akolzin' 'Letizia Alessandrini' 'Margaret Albia' 'Joelle Bastiaans' 'Pascale Bergeron' 'Elladj Balde' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Hanna Asadchaya' 'Johanna Allik' 'Nadine Ahmed' 'Sarah Abitbol' 'Elladj Balde' 'Jake Bennett' 'Saulius Ambrulevicius' 'Laurent Alvarez' 'Beril Bektas' 'Krisztina Barta' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Spencer Barnes' 'Shizuka Arakawa' 'Sara Beikircher' 'Ryan Arnold' 'Pascale Bergeron' 'Hanna Asadchaya' 'Bogdan Berezenko' 'Annie Bellemare' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Patrice Archetto' 'Vera Bazarova' 'Miki Ando' 'Beril Bektas' 'Rie Arikawa' 'Adrian Alvarado' 'Rima Beliy' 'Fedor Andreev' 'Megan Allely' 'Nina Bates' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexei Beletski' 'Letizia Alessandrini' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Sofia Bardakov' 'Julia Abolina' 'Tayfun Anar' 'Miguel Ballesteros' 'Daniil Barantsev' 'Elladj Balde' 'John Baldwin' 'Alisa Agafonova' 'Benjamin Agosto' 'Vera Bazarova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Paolo Bacchini' 'Patrice Archetto' 'Anastasia Belova' 'Emili Arm' 'Ian Beharry' 'Evan Bates' 'Kevin Alves' 'Gabor Balint' 'Johanna Allik' 'Spencer Barnes' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Sergei Baranov' 'Mai Asada' 'Gabor Balint' 'Vazgen Azrojan' 'Christiane Berger' 'Alisa Allapach' 'Paolo Bacchini' 'An Yang' 'Lubov Bakirova' 'Stuart Beckingham' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Laurent Alvarez' 'Dmitri Antoni' 'Annie Bellemare' 'Veronika Benesova' 'Ivan Bariev' 'Emili Arm' 'An Yang' 'Colette Appel' 'Vitali Baranov' 'Fedor Andreev' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Birce Atabey' 'Camilla Andersen' 'Charlotte Belair' 'Daniil Barantsev' 'Krisztian Andraska' 'Mai Asada' 'Marina Aganina' 'Mary Grace Baldo' 'Shizuka Arakawa' 'Joelle Bastiaans' };\r\nexp=1;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Babkin' 'Colette Appel' 'Saulius Ambrulevicius' 'Fedor Andreev' 'Sofia Bardakov' 'Daniil Barantsev' 'Kevin Alves' 'Birce Atabey' 'Becky Bereswill' 'Letizia Alessandrini' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Ilia Averbukh' 'Jake Bennett' 'Julia Beloglazova' 'Petra Arponen' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Pascale Bergeron' 'Engin Ali Artan' 'Zabato Bebe' 'Shizuka Arakawa' 'Vazgen Azrojan' 'Elena Berezhnaya' 'Alisa Agafonova' 'Alisa Allapach' 'Laurent Alvarez' 'Marta Andrade' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztina Barta' 'Marta Andrade' 'Andrei Bekh' 'Stuart Beckingham' 'Pascale Bergeron' 'Sara Beikircher' 'Ivan Bariev' 'Gabor Balint' 'Dmitri Antoni' 'Mao Asada' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Tanith Belbin' 'Marta Andrade' 'Zabato Bebe' 'Emilia Ahsan' 'Johanna Allik' 'Christina Beier' 'Alexander Abt' 'Shizuka Arakawa' 'Eve Bentley' 'Sara Beikircher' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Julia Abolina' 'Felicia Beck' 'Vadim Akolzin' 'Letizia Alessandrini' 'Gloria Agogliati' 'Olga Akimova' 'Christina Beier' 'Tayfun Anar' 'Adrian Alvarado' 'Elena Berezhnaya' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alessia Aureli' 'Mao Asada' 'Mai Asada' 'Nadine Ahmed' 'Jeremy Abbott' 'Gabor Balint' 'Marina Anissina' 'Birce Atabey' 'Miguel Ballesteros' 'Beril Bektas' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Birce Atabey' 'Emilia Ahsan' 'Felicia Beck' 'Jeremy Allen' 'Oksana Baiul' 'Alisa Agafonova' 'Florent Amodio' 'Joelle Bastiaans' 'Michael Bahoric' 'Saulius Ambrulevicius' };\r\nexp=4;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Benjamin Agosto' 'Vitali Babkin' 'Vitali Baranov' 'Bogdan Berezenko' 'Mai Asada' 'Beril Bektas' 'Hanna Asadchaya' 'Camilla Andersen' 'An Yang' 'Rie Arikawa' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Tobias Bayer' 'Joelle Bastiaans' 'Alibel Alegre' 'Annie Bellemare' 'Alessia Aureli' 'Emili Arm' 'Florent Amodio' 'Julia Beloglazova' 'Birce Atabey' 'Sofia Bardakov' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Giovanna Almeida Leto' 'Alexandra Baurina' 'Marta Andrade' 'Julia Beloglazova' 'Felicia Beck' 'Johanna Allik' 'Rima Beliy' 'Gloria Agogliati' 'Rie Arikawa' 'Eve Bentley' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Katarina Babalova' 'Elena Berezhnaya' };\r\nexp=2;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Adrian Alvarado' 'Rinata Araslanova' 'Vitali Baranov' 'Yann Abback' 'Emili Arm' 'Marina Anissina' 'Engin Ali Artan' 'Jeremy Abbott' 'Alessia Aureli' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'John Baldwin' 'Laurent Alvarez' 'Erica Archambault' 'Emilia Ahsan' 'Johanna Allik' 'Hanna Asadchaya' 'Alexandra Baurina' 'Vitali Babkin' 'Rinata Araslanova' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Fedor Andreev' 'Shizuka Arakawa' 'Oksana Baiul' 'Kevin Alves' 'Jody Annandale' 'Christiane Berger' 'Sofia Bardakov' 'Emilia Ahsan' 'Ryan Arnold' 'Tayfun Anar' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Sergei Baranov' 'Saulius Ambrulevicius' 'Michael Bahoric' 'Evan Bates' 'An Ni' 'Tobias Bayer' 'Christina Beier' 'Maria Balaba' 'Emili Arm' 'Jody Annandale' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexei Beletski' 'Florent Amodio' 'Marina Anissina' 'Margaret Albia' 'Michael Bahoric' 'Miki Ando' 'Gloria Agogliati' 'Evan Bates' 'Becky Bereswill' 'Alexandra Baurina' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'Emilia Ahsan' 'Ian Beharry' 'Paolo Bacchini' 'Maria Balaba' 'Giovanna Almeida Leto' 'An Yang' 'Michael Bahoric' 'Fedor Andreev' 'Alisa Agafonova' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'Vazgen Azrojan' 'Sara Beikircher' 'Eve Bentley' 'Alla Beknazarova' 'Pascale Bergeron' 'Tatiana Basova' 'Elena Berezhnaya' 'Oksana Baiul' 'Zabato Bebe' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alessia Aureli' 'Alexei Beletski' 'Alisa Agafonova' 'Anastasia Belova' 'Colette Appel' 'Kevin Alves' 'Veronika Benesova' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Tayfun Anar' 'Saulius Ambrulevicius' 'Miguel Ballesteros' 'Maria Balaba' 'Mai Asada' 'Lubov Bakirova' 'Edward Alton' 'Birce Atabey' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Miki Ando' 'Benjamin Agosto' 'Jeremy Allen' 'Adrian Alvarado' 'Alisa Allapach' 'Sofia Bardakov' 'Joelle Bastiaans' 'Margaret Albia' 'Erica Archambault' 'Kevin Alves' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Julia Beloglazova' 'Marina Aganina' 'Alisa Agafonova' 'Alexei Beletski' 'Camilla Andersen' 'Giovanna Almeida Leto' 'Colette Appel' 'Nina Bates' 'Tanith Belbin' 'Vitali Baranov' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mao Asada' 'Dmitri Antoni' 'Marina Aganina' 'Annie Bellemare' 'Zabato Bebe' 'Andrew Bassi' 'Valentina Anselmi' 'Michael Bahoric' 'Jake Bennett' 'Mary Grace Baldo' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Shizuka Arakawa' 'Stuart Beckingham' 'Jeremy Abbott' 'Nadine Ahmed' 'Olga Akimova' 'Vadim Akolzin' 'Becky Bereswill' 'Charlotte Belair' 'Gabor Balint' 'Margaret Albia' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Beril Bektas' 'Stuart Beckingham' 'Jill Bakker' 'Daniil Barantsev' 'Sarah Abitbol' 'Benjamin Agosto' 'Andrei Bekh' 'Julia Beloglazova' 'Alibel Alegre' 'Nina Bates' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Charlotte Belair' 'Gloria Agogliati' 'Miguel Ballesteros' 'Hanna Asadchaya' 'Ilia Averbukh' 'Katarina Babalova' 'Tobias Bayer' 'Marta Andrade' 'Petra Arponen' 'Paolo Bacchini' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Evan Bates' 'Imola Antal' 'Eve Bentley' 'Miguel Ballesteros' 'Emili Arm' 'Rie Arikawa' 'Patrice Archetto' 'Julia Abolina' 'Jeremy Allen' 'Edward Alton' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mary Grace Baldo' 'William Beier' 'Mai Asada' 'Vazgen Azrojan' 'Marina Anissina' 'Krisztian Andraska' 'Ivan Bariev' 'Tayfun Anar' 'Spencer Barnes' 'Maria Balaba' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Lubov Bakirova' 'Alexei Beletski' 'Mai Asada' 'William Beier' 'Shizuka Arakawa' 'Alla Beknazarova' 'Alessia Aureli' 'Miguel Ballesteros' 'Rinata Araslanova' 'Alexander Abt' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Baranov' 'Patrice Archetto' 'Charlotte Belair' 'Maria Balaba' 'Marina Anissina' 'Oksana Baiul' 'Alla Beknazarova' 'Shizuka Arakawa' 'Andrei Bekh' 'Zabato Bebe' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztina Barta' 'Yann Abback' 'Johanna Allik' 'Andrew Bassi' 'Irina Babenko' 'Fedor Andreev' 'Emilia Ahsan' 'Mary Grace Baldo' 'Tanith Belbin' 'Spencer Barnes' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Shizuka Arakawa' 'Tanith Belbin' 'Hanna Asadchaya' 'Mai Asada' 'Krisztian Andraska' 'Gabor Balint' 'Sofia Bardakov' 'Gloria Agogliati' 'Valentina Anselmi' 'Alisa Agafonova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Ilia Averbukh' 'Andrei Bekh' 'Imola Antal' 'Mao Asada' 'Colette Appel' 'Emili Arm' 'Irina Babenko' 'Sergei Baranov' 'Elena Berezhnaya' 'Julia Beloglazova' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Ryan Arnold' 'Rie Arikawa' 'Nina Bates' 'Katarina Babalova' 'Jeremy Allen' 'Charlotte Belair' 'Alexei Beletski' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vladimir Belomoin' 'Melania Albea' 'Florent Amodio' 'An Ni' 'John Baldwin' 'Jeremy Abbott' 'Zabato Bebe' 'Olga Akimova' 'Petra Arponen' 'Jake Bennett' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alisa Agafonova' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Elladj Balde' 'Charlotte Belair' 'Bogdan Berezenko' 'Julia Abolina' 'Alexandra Baurina' 'Sergei Baranov' 'Megan Allely' 'Marta Andrade' 'Anastasia Belova' 'Ivan Bariev' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Gloria Agogliati' 'Alessia Aureli' 'Julia Abolina' 'Charlotte Belair' 'Andrew Bassi' 'Gabor Balint' 'Vladimir Belomoin' 'Tanith Belbin' 'Patrice Archetto' 'Shizuka Arakawa' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mary Grace Baldo' 'Florent Amodio' 'Vitali Babkin' 'Engin Ali Artan' 'Olga Akimova' 'Maria Balaba' 'Jeremy Allen' 'Margaret Albia' 'Ivan Bariev' 'Miguel Ballesteros' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Andrew Bassi' 'Tobias Bayer' 'Hanna Asadchaya' 'Krisztian Andraska' 'Vladimir Belomoin' 'Erica Archambault' 'Ilia Averbukh' 'Ivan Bariev' 'Margaret Albia' 'Michael Bahoric' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Hanna Asadchaya' 'Gloria Agogliati' 'Camilla Andersen' 'Veronika Benesova' 'Alisa Allapach' 'Charlotte Belair' 'Emili Arm' 'Jake Bennett' 'An Yang' 'Krisztina Barta' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Patrice Archetto' 'Christina Beier' 'Ivan Bariev' 'Rima Beliy' 'Alisa Allapach' 'Paolo Bacchini' 'William Beier' 'An Ni' 'Spencer Barnes' 'Vera Bazarova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":0,"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-09-16T04:35:47.000Z","updated_at":"2025-11-21T08:36:28.000Z","published_at":"2013-09-16T04:51:41.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/2933486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Moist\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The problem is Codified by making the input a cell array of names.\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 Challenge involves a serial card sorting machine that places card (i+1) in its best position, 1 thru i, if the name on card (i+1) is lexicographically greater than the name on card (i). The machine continues thru the end of the deck. The machine then restarts at card 1 until the order is correct. The output to return is the number of card insertions. The character values follow ascii codes with Space \u0026lt; A:Z \u0026lt; a:z. A shorter name is less than an extended name (Ab\u0026lt;Abe)\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 names ( cell array of names )\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 Insertions (count of card insertions required)\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time 6 minutes, 793/1049 correct\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\u003eExample:\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\u003enames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\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\u003eClearly takes 3 card insertions. Start (SRJD) moves [(RSJD) (JRSD) (DJRS)]\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\"}]}"},{"id":1883,"title":"GJam 2013 China Event: Happy Teams 100 Pairs","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p0 GJam 2013 China Bad Horse\u003e 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.\r\n\r\nThe 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. \r\n\r\n*Input:* conflicted name pairs  (cell array of pairs of names)\r\n\r\n*Output:* TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\r\n\r\n*Competition Summary:* Best Time of 11 minutes, 707 out of 776 correct","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p0\"\u003eGJam 2013 China Bad Horse\u003c/a\u003e 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.\u003c/p\u003e\u003cp\u003eThe 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.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e conflicted name pairs  (cell array of pairs of names)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e Best Time of 11 minutes, 707 out of 776 correct\u003c/p\u003e","function_template":"function TF=Make_Teams(names)\r\n TF=0;\r\nend","test_suite":"%%\r\ntic\r\nnames={{'King_Ghidorah' 'Harley_Quinn'} {'Dr_Horrible' 'Queen_Of_Fables'} {'Rad' 'Lady_Quark'} {'Yellowjacket' 'Dansen_Macabre'} {'Decay' 'Sun_Girl'} {'Typhoid_Mary' 'Animora'} {'Lady_Octopus' 'Lady_Quark'} {'Princess_Python' 'Scandal'} {'Cyborgirl' 'Scandal'} {'Margaret_Love' 'Queen_Of_Fables'} {'Decay' 'Talia_Al_Ghul'} {'Typhoid_Mary' 'Superwoman'} {'Cyborgirl' 'Dr_Evil'} {'Typhoid_Mary' 'Mothergod'} {'Star_Sapphire' 'Coachwhip'} {'Livewire' 'Dr_Evil'} {'King_Ghidorah' 'Sun_Girl'} {'Golddigger' 'Dansen_Macabre'} {'Star_Sapphire' 'Shimmer'} {'Zaladane' 'Mephista'} {'Decay' 'Harley_Quinn'} {'Zaladane' 'Lady_Shiva'} {'Tigress' 'Magenta'} {'The_Crimson_Ghost' 'Shimmer'} {'Typhoid_Mary' 'Mephista'} {'Princess_Python' 'Shimmer'} {'Cyborgirl' 'Abominatrix'} {'Magpie' 'Dansen_Macabre'} {'Magpie' 'Talia_Al_Ghul'} {'Lady_Octopus' 'Talia_Al_Ghul'} {'Livewire' 'Mephista'} {'Madame_Rouge' 'Prank'} {'The_Crimson_Ghost' 'Scandal'} {'Princess_Python' 'Superwoman'} {'Yellowjacket' 'Lazara'} {'Cyborgirl' 'Harley_Quinn'} {'Roulette' 'Sun_Girl'} {'Tigress' 'Prank'} {'Typhoid_Mary' 'Harley_Quinn'} {'The_Crimson_Ghost' 'Dansen_Macabre'} {'Cyborgirl' 'Shimmer'} {'Decay' 'Lagomorph'} {'The_Crimson_Ghost' 'Lady_Quark'} {'Decay' 'Mothergod'} {'Madame_Rouge' 'Talia_Al_Ghul'} {'Cyborgirl' 'Mephista'} {'Typhoid_Mary' 'Scandal'} {'Yellowjacket' 'Prank'} {'Madame_Rouge' 'Lazara'} {'Margaret_Love' 'Dansen_Macabre'} {'Yellowjacket' 'Dr_Evil'} {'Roulette' 'Superwoman'} {'Princess_Python' 'Mothergod'} {'Margaret_Love' 'Mothergod'} {'Golddigger' 'Lazara'} {'Margaret_Love' 'Harley_Quinn'} {'Dr_Horrible' 'Lazara'} {'Osira' 'Queen_Of_Fables'} {'King_Ghidorah' 'Coachwhip'} {'Magpie' 'Dr_Evil'} {'King_Ghidorah' 'Shimmer'} {'Cyborgirl' 'Coachwhip'} {'Lady_Octopus' 'Lagomorph'} {'Princess_Python' 'Dansen_Macabre'} {'The_Crimson_Ghost' 'Lady_Shiva'} {'Star_Sapphire' 'Superwoman'} {'Rad' 'Mothergod'} {'King_Ghidorah' 'Lazara'} {'Dr_Horrible' 'Mothergod'} {'Margaret_Love' 'Prank'} {'Rad' 'Dr_Evil'} {'Typhoid_Mary' 'Coachwhip'} {'King_Ghidorah' 'Talia_Al_Ghul'} {'Lady_Octopus' 'Mephista'} {'King_Ghidorah' 'Magenta'} {'Princess_Python' 'Sun_Girl'} {'Princess_Python' 'Animora'} {'Magpie' 'Superwoman'} {'Livewire' 'Lady_Shiva'} {'Zaladane' 'Sun_Girl'} {'Rad' 'Mephista'} {'Margaret_Love' 'Shimmer'} {'Magpie' 'Mephista'} {'Lady_Octopus' 'Scandal'} {'Osira' 'Sun_Girl'} {'Decay' 'Dansen_Macabre'} {'Typhoid_Mary' 'Abominatrix'} {'Osira' 'Lady_Quark'} {'The_Crimson_Ghost' 'Queen_Of_Fables'} {'Zaladane' 'Scandal'} {'Typhoid_Mary' 'Dr_Evil'} {'Yellowjacket' 'Animora'} {'Decay' 'Queen_Of_Fables'} {'Lady_Octopus' 'Coachwhip'} {'Margaret_Love' 'Superwoman'} {'Princess_Python' 'Lazara'} {'Tigress' 'Lagomorph'} {'Lady_Octopus' 'Superwoman'} {'Decay' 'Lady_Shiva'} {'Golddigger' 'Animora'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Typhoid_Mary' 'Amazing_Grace'} {'New_Wave' 'White_Rabbit'} {'Lazara' 'Shiv'} {'Valentina' 'Zaladane'} {'Gru' 'Magenta'} {'New_Wave' 'Shiv'} {'New_Wave' 'Madame_Masque'} {'Valentina' 'Doctor_Cyber'} {'Silver_Banshee' 'Emerald_Empress'} {'Unicron' 'Madame_Masque'} {'Blue_Snowman' 'Mothergod'} {'Valentina' 'Shiv'} {'Lazara' 'Doctor_Cyber'} {'Plastique' 'Madame_Masque'} {'Talia_Al_Ghul' 'Osira'} {'Lady_Clay' 'Star_Sapphire'} {'Unicron' 'Amazing_Grace'} {'Typhoid_Mary' 'Shiv'} {'Silver_Banshee' 'Tala'} {'Harley_Quinn' 'Asbestos_Lady'} {'Scandal' 'Magenta'} {'Titania' 'Genevieve_Savidge'} {'Typhoid_Mary' 'Animora'} {'Harley_Quinn' 'Animora'} {'Valentina' 'Amazing_Grace'} {'Plastique' 'Livewire'} {'Harley_Quinn' 'Star_Sapphire'} {'Lazara' 'Osira'} {'Decay' 'Mephista'} {'Superwoman' 'Emerald_Empress'} {'Titania' 'Doctor_Cyber'} {'Titania' 'Star_Sapphire'} {'Spider_Girl' 'Star_Sapphire'} {'Titania' 'Magenta'} {'Unicron' 'Osira'} {'Unicron' 'Genevieve_Savidge'} {'Talia_Al_Ghul' 'Hypnota'} {'Decay' 'Asbestos_Lady'} {'Silver_Banshee' 'Asbestos_Lady'} {'Scandal' 'Star_Sapphire'} {'Lashina' 'Livewire'} {'Decay' 'Mothergod'} {'Blue_Snowman' 'Genevieve_Savidge'} {'Spider_Girl' 'Mephista'} {'Blue_Snowman' 'Osira'} {'Decay' 'Madame_Masque'} {'Superwoman' 'Livewire'} {'Titania' 'Livewire'} {'Lady_Quark' 'Shiv'} {'Plastique' 'Doctor_Cyber'} {'Decay' 'Magenta'} {'Lazara' 'Livewire'} {'Lady_Quark' 'Mothergod'} {'Dr_Horrible' 'Emerald_Empress'} {'Scandal' 'Mephista'} {'Lazara' 'Magenta'} {'Gru' 'Poundcakes'} {'Superwoman' 'Animora'} {'Blue_Snowman' 'Shiv'} {'Silver_Banshee' 'Animora'} {'Plastique' 'White_Rabbit'} {'Lazara' 'Mothergod'} {'Scandal' 'Doctor_Cyber'} {'Spider_Girl' 'Emerald_Empress'} {'Typhoid_Mary' 'Mephista'} {'Spider_Girl' 'Livewire'} {'Lashina' 'White_Rabbit'} {'Harley_Quinn' 'Hypnota'} {'Dr_Horrible' 'White_Rabbit'} {'Titania' 'Lady_Octopus'} {'New_Wave' 'Mothergod'} {'Silver_Banshee' 'Hypnota'} {'Harley_Quinn' 'Poundcakes'} {'Decay' 'Hypnota'} {'New_Wave' 'Osira'} {'Valentina' 'Star_Sapphire'} {'Silver_Banshee' 'Mothergod'} {'Lashina' 'Magenta'} {'Blue_Snowman' 'Magenta'} {'Titania' 'Mephista'} {'Silver_Banshee' 'White_Rabbit'} {'Lady_Quark' 'Lady_Octopus'} {'Spider_Girl' 'Tala'} {'Lashina' 'Gru'} {'Lashina' 'Mephista'} {'Lady_Quark' 'White_Rabbit'} {'Typhoid_Mary' 'Doctor_Cyber'} {'Harley_Quinn' 'Doctor_Cyber'} {'Unicron' 'Mothergod'} {'New_Wave' 'Lady_Octopus'} {'Titania' 'Tala'} {'Talia_Al_Ghul' 'Doctor_Cyber'} {'Dr_Horrible' 'Asbestos_Lady'} {'Lashina' 'Genevieve_Savidge'} {'Blue_Snowman' 'Madame_Masque'} {'Superwoman' 'Osira'} {'Lady_Clay' 'Zaladane'} {'Lady_Quark' 'Magenta'} {'Scandal' 'Madame_Masque'} {'Unicron' 'Poundcakes'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'White_Rabbit' 'Animora'} {'Rad' 'Plastique'} {'Devastation' 'Gru'} {'Margaret_Love' 'Zaladane'} {'Yellowjacket' 'Blue_Snowman'} {'Devastation' 'Animora'} {'Lady_Death' 'Syndrome'} {'Snapdragon' 'Titania'} {'Rad' 'Gru'} {'Tigress' 'Black_Mamba'} {'Spider_Girl' 'Zaladane'} {'Snapdragon' 'Plastique'} {'Golddigger' 'Duela_Dent'} {'Spider_Girl' 'Black_Mamba'} {'Lady_Clay' 'Lady_Shiva'} {'Lagomorph' 'Syndrome'} {'Golddigger' 'Poison_Ivy'} {'Lafety_Le_Fei' 'Duela_Dent'} {'Eviless' 'Titania'} {'Jason_Kreis' 'Blue_Snowman'} {'Golddigger' 'Gru'} {'Rad' 'Lady_Shiva'} {'Margaret_Love' 'Poundcakes'} {'Devastation' 'Superwoman'} {'Jason_Kreis' 'Gru'} {'Lady_Clay' 'Ursa'} {'Snapdragon' 'Animora'} {'Sun_Girl' 'Magpie'} {'Mist' 'Zaladane'} {'White_Rabbit' 'Poundcakes'} {'Tigress' 'Lady_Shiva'} {'Livewire' 'Poison_Ivy'} {'Eviless' 'Golden_Glider'} {'Margaret_Love' 'Lady_Quark'} {'Lady_Clay' 'Plastique'} {'Lady_Clay' 'Golden_Glider'} {'Madame_Masque' 'Titania'} {'Lady_Death' 'Golden_Glider'} {'Margaret_Love' 'Black_Mamba'} {'Tigress' 'Superwoman'} {'Lagomorph' 'Magpie'} {'Eviless' 'Dr_Evil'} {'Lady_Clay' 'Duela_Dent'} {'Snapdragon' 'Syndrome'} {'Golddigger' 'Lady_Quark'} {'Devastation' 'Golden_Glider'} {'Rad' 'Syndrome'} {'Snapdragon' 'Dr_Evil'} {'Yellowjacket' 'Animora'} {'Lady_Death' 'Fem_Paragon'} {'Margaret_Love' 'Animora'} {'Lady_Death' 'Dr_Evil'} {'Golddigger' 'Plastique'} {'Lagomorph' 'Gru'} {'Rampage' 'Plastique'} {'Jason_Kreis' 'Fem_Paragon'} {'Margaret_Love' 'Ursa'} {'Spider_Girl' 'Golden_Glider'} {'Rampage' 'Superwoman'} {'Eviless' 'Bombshell'} {'Golddigger' 'Dr_Evil'} {'Livewire' 'Syndrome'} {'Lady_Death' 'Zaladane'} {'Livewire' 'Lady_Quark'} {'Snapdragon' 'Black_Mamba'} {'Rad' 'Blue_Snowman'} {'Mist' 'Superwoman'} {'Yellowjacket' 'Superwoman'} {'Madame_Masque' 'Fem_Paragon'} {'Devastation' 'Syndrome'} {'Lady_Death' 'Ursa'} {'Madame_Masque' 'Gru'} {'Yellowjacket' 'Fem_Paragon'} {'White_Rabbit' 'Zaladane'} {'Spider_Girl' 'Syndrome'} {'Golddigger' 'Zaladane'} {'Livewire' 'Ursa'} {'Sun_Girl' 'Titania'} {'Tigress' 'Lady_Quark'} {'Snapdragon' 'Fem_Paragon'} {'Sun_Girl' 'Lady_Quark'} {'Yellowjacket' 'Ursa'} {'Madame_Masque' 'Plastique'} {'Lafety_Le_Fei' 'Black_Mamba'} {'Eviless' 'Fem_Paragon'} {'Sun_Girl' 'Lady_Shiva'} {'Yellowjacket' 'Magpie'} {'Yellowjacket' 'Gru'} {'White_Rabbit' 'Lady_Shiva'} {'White_Rabbit' 'Magpie'} {'Sun_Girl' 'Gru'} {'Jason_Kreis' 'Magpie'} {'Sun_Girl' 'Plastique'} {'Lagomorph' 'Poison_Ivy'} {'Lagomorph' 'Poundcakes'} {'Golddigger' 'Fem_Paragon'} {'Sun_Girl' 'Poison_Ivy'} {'Madame_Masque' 'Bombshell'} {'Lafety_Le_Fei' 'Magpie'} {'Mist' 'Ursa'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Amazing_Grace' 'Animora'} {'Plastique' 'Lady_Quark'} {'Lagomorph' 'Hypnota'} {'Princess_Python' 'Purgatori'} {'Plastique' 'Animora'} {'Princess_Python' 'Lashina'} {'Typhoid_Mary' 'Dansen_Macabre'} {'Queen_Bee' 'Lashina'} {'Golden_Glider' 'Decay'} {'Bombshell' 'Dansen_Macabre'} {'Bombshell' 'Blue_Snowman'} {'Madame_Rouge' 'Hypnota'} {'Mist' 'Duela_Dent'} {'Typhoid_Mary' 'Lady_Death'} {'Gru' 'The_Crimson_Ghost'} {'Mist' 'The_Lightning'} {'Syndrome' 'Harley_Quinn'} {'Dr_Evil' 'Silk_Fever'} {'Mist' 'Animora'} {'Typhoid_Mary' 'Blue_Snowman'} {'Gru' 'Poundcakes'} {'Deuce' 'Windfall'} {'Princess_Python' 'Windfall'} {'Golden_Glider' 'Lady_Clay'} {'Tigress' 'Duela_Dent'} {'Bombshell' 'Hypnota'} {'Plastique' 'Hypnota'} {'Leather' 'Blue_Snowman'} {'Tigress' 'Windfall'} {'Dr_Horrible' 'Dansen_Macabre'} {'Dr_Evil' 'Shimmer'} {'Deuce' 'Queen_Of_Fables'} {'Leather' 'Lady_Quark'} {'Plastique' 'Blue_Snowman'} {'Plastique' 'Poundcakes'} {'Amazing_Grace' 'Decay'} {'Mothergod' 'Windfall'} {'Lady_Vic' 'Harley_Quinn'} {'Amazing_Grace' 'Queen_Of_Fables'} {'The_Lightning' 'Black_Mamba'} {'Gru' 'Lady_Death'} {'Mist' 'Lady_Death'} {'Leather' 'Queen_Of_Fables'} {'Bombshell' 'Animora'} {'Bombshell' 'Lady_Quark'} {'Plastique' 'Silk_Fever'} {'Deuce' 'Blue_Snowman'} {'Queen_Bee' 'Hypnota'} {'Mothergod' 'Black_Mamba'} {'Gru' 'Silk_Fever'} {'Typhoid_Mary' 'Queen_Of_Fables'} {'Mothergod' 'Queen_Of_Fables'} {'Amazing_Grace' 'Lady_Quark'} {'Leather' 'Lady_Clay'} {'Syndrome' 'Queen_Of_Fables'} {'Syndrome' 'Shimmer'} {'Lagomorph' 'Animora'} {'Mothergod' 'The_Crimson_Ghost'} {'Plastique' 'Black_Mamba'} {'Queen_Bee' 'King_Ghidorah'} {'Typhoid_Mary' 'Silk_Fever'} {'Deuce' 'Animora'} {'Dr_Evil' 'Queen_Of_Fables'} {'Princess_Python' 'Poundcakes'} {'Tigress' 'Decay'} {'Plastique' 'Lady_Death'} {'Queen_Bee' 'Lady_Clay'} {'Typhoid_Mary' 'King_Ghidorah'} {'Dr_Evil' 'Lady_Clay'} {'Gru' 'Lashina'} {'Dr_Horrible' 'Lady_Quark'} {'Madame_Rouge' 'Animora'} {'Golden_Glider' 'Purgatori'} {'Deuce' 'Duela_Dent'} {'Lagomorph' 'Windfall'} {'Deuce' 'Lady_Quark'} {'The_Lightning' 'Poundcakes'} {'Dr_Evil' 'Lady_Quark'} {'Queen_Bee' 'Silk_Fever'} {'Lady_Vic' 'Animora'} {'Dr_Evil' 'Harley_Quinn'} {'Mothergod' 'Decay'} {'Princess_Python' 'Duela_Dent'} {'Lagomorph' 'Harley_Quinn'} {'Golden_Glider' 'Dansen_Macabre'} {'Leather' 'Lady_Death'} {'Syndrome' 'Blue_Snowman'} {'Mist' 'Blue_Snowman'} {'Bombshell' 'Poundcakes'} {'Amazing_Grace' 'Blue_Snowman'} {'Leather' 'Hypnota'} {'Typhoid_Mary' 'Windfall'} {'Mothergod' 'Poundcakes'} {'The_Lightning' 'Purgatori'} {'Madame_Rouge' 'The_Crimson_Ghost'} {'Syndrome' 'King_Ghidorah'} {'Plastique' 'Decay'} {'The_Lightning' 'Hypnota'} {'Amazing_Grace' 'Lady_Clay'} {'Syndrome' 'Dansen_Macabre'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Abominatrix'} {'Mai_Shen' 'Devastation'} {'Abominatrix' 'Mai_Shen'} {'Devastation' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Titania' 'Hypnota'} {'Trinity' 'Poison_Ivy'} {'Dansen_Macabre' 'New_Wave'} {'Emerald_Empress' 'Saturn_Queen'} {'Fem_Paragon' 'Hypnota'} {'White_Rabbit' 'Osira'} {'Duela_Dent' 'Dead_Bowie'} {'Poundcakes' 'Dead_Bowie'} {'Decay' 'New_Wave'} {'Decay' 'Shimmer'} {'Poundcakes' 'Mephista'} {'Zaladane' 'Osira'} {'Ursa' 'Hypnota'} {'Star_Sapphire' 'Lady_Vic'} {'Fem_Paragon' 'Shimmer'} {'Star_Sapphire' 'Golddigger'} {'Queen_Bee' 'Doctor_Cyber'} {'Amazing_Grace' 'Nyssa_Raatko'} {'Trinity' 'Hypnota'} {'Emerald_Empress' 'Nyssa_Raatko'} {'White_Rabbit' 'New_Wave'} {'Lady_Shiva' 'Mephista'} {'Amazing_Grace' 'Dead_Bowie'} {'Emerald_Empress' 'Mephista'} {'Zaladane' 'Devastation'} {'Zaladane' 'Mephista'} {'Lady_Shiva' 'New_Wave'} {'Fem_Paragon' 'Nyssa_Raatko'} {'Zaladane' 'Nyssa_Raatko'} {'Ursa' 'Golddigger'} {'Trinity' 'Purgatori'} {'Ursa' 'Osira'} {'The_Crimson_Ghost' 'Shimmer'} {'Fake_Thomas_Jefferson' 'Ingra'} {'Decay' 'Silver_Banshee'} {'Decay' 'Hypnota'} {'Zaladane' 'Sun_Girl'} {'Ursa' 'Eviless'} {'The_Crimson_Ghost' 'New_Wave'} {'Fake_Thomas_Jefferson' 'New_Wave'} {'Emerald_Empress' 'Amy_Madison'} {'Fake_Thomas_Jefferson' 'Poison_Ivy'} {'Fem_Paragon' 'Ingra'} {'Amazing_Grace' 'Osira'} {'Queen_Bee' 'Lady_Vic'} {'Zaladane' 'Eviless'} {'Decay' 'Doctor_Cyber'} {'The_Crimson_Ghost' 'Ingra'} {'Star_Sapphire' 'Ingra'} {'Ursa' 'Nyssa_Raatko'} {'Animora' 'Plastique'} {'Fem_Paragon' 'Silver_Banshee'} {'Decay' 'Dead_Bowie'} {'Duela_Dent' 'Devastation'} {'Animora' 'Saturn_Queen'} {'The_Crimson_Ghost' 'Devastation'} {'The_Crimson_Ghost' 'Osira'} {'Trinity' 'Sun_Girl'} {'Lady_Shiva' 'Saturn_Queen'} {'Trinity' 'Amy_Madison'} {'Fem_Paragon' 'Eviless'} {'Mai_Shen' 'Plastique'} {'Margaret_Love' 'Amy_Madison'} {'Trinity' 'Nyssa_Raatko'} {'White_Rabbit' 'Hypnota'} {'Animora' 'Silver_Banshee'} {'White_Rabbit' 'Mephista'} {'Animora' 'Eviless'} {'Titania' 'Ingra'} {'Dansen_Macabre' 'Purgatori'} {'Poundcakes' 'Ingra'} {'Titania' 'Golddigger'} {'Star_Sapphire' 'Osira'} {'Dansen_Macabre' 'Dead_Bowie'} {'Queen_Bee' 'Purgatori'} {'Mai_Shen' 'Silver_Banshee'} {'White_Rabbit' 'Saturn_Queen'} {'Poundcakes' 'Doctor_Cyber'} {'Queen_Bee' 'Devastation'} {'Margaret_Love' 'Poison_Ivy'} {'White_Rabbit' 'Amy_Madison'} {'The_Crimson_Ghost' 'Nyssa_Raatko'} {'Trinity' 'Devastation'} {'Titania' 'Eviless'} {'Fake_Thomas_Jefferson' 'Golddigger'} {'White_Rabbit' 'Dead_Bowie'} {'Fake_Thomas_Jefferson' 'Silver_Banshee'} {'Amazing_Grace' 'Doctor_Cyber'} {'The_Crimson_Ghost' 'Sun_Girl'} {'Margaret_Love' 'Golddigger'} {'Lady_Shiva' 'Devastation'} {'Queen_Bee' 'New_Wave'} {'Margaret_Love' 'Osira'} {'Queen_Bee' 'Ingra'} {'Fake_Thomas_Jefferson' 'Eviless'} {'Dansen_Macabre' 'Shimmer'} {'Fem_Paragon' 'Lady_Vic'} {'Poundcakes' 'Purgatori'} {'Titania' 'Poison_Ivy'} {'Star_Sapphire' 'Devastation'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mothergod' 'Hypnota'} {'Lazara' 'Fury_Leika'} {'Queen_Clea' 'Windfall'} {'Silver_Swan' 'Black_Mamba'} {'Devastation' 'Titania'} {'Madame_Masque' 'Rampage'} {'Spider_Girl' 'Titania'} {'Maxima' 'Madame_Rouge'} {'Silver_Banshee' 'Typhoid_Mary'} {'The_Lightning' 'Lafety_Le_Fei'} {'Queen_Clea' 'Silk_Fever'} {'Maxima' 'Lady_Clay'} {'Amy_Madison' 'Black_Mamba'} {'The_Lightning' 'Duela_Dent'} {'Madame_Masque' 'Silk_Fever'} {'Lazara' 'Rampage'} {'Star_Sapphire' 'Rampage'} {'Lazara' 'Amazing_Grace'} {'Madame_Masque' 'Syndrome'} {'Golden_Glider' 'Hypnota'} {'Spider_Girl' 'Windfall'} {'Dr_Evil' 'Typhoid_Mary'} {'Golden_Glider' 'Osira'} {'Fury_Leika' 'Duela_Dent'} {'Golden_Glider' 'Lady_Clay'} {'The_Crimson_Ghost' 'Magenta'} {'Mothergod' 'Amazing_Grace'} {'Lazara' 'Duela_Dent'} {'White_Rabbit' 'Hypnota'} {'Fury_Leika' 'Amazing_Grace'} {'White_Rabbit' 'Duela_Dent'} {'Silver_Banshee' 'Prank'} {'Mothergod' 'Osira'} {'Silver_Banshee' 'Hypnota'} {'Golddigger' 'Silk_Fever'} {'Fury_Leika' 'Madame_Rouge'} {'Amy_Madison' 'Osira'} {'Madame_Masque' 'Professor_Padraic_Ratigan'} {'Madame_Masque' 'Hypnota'} {'The_Crimson_Ghost' 'Amazing_Grace'} {'The_Lightning' 'Madame_Rouge'} {'Maxima' 'Prank'} {'Star_Sapphire' 'Yellowjacket'} {'The_Lightning' 'Mai_Shen'} {'Lagomorph' 'Duela_Dent'} {'White_Rabbit' 'Typhoid_Mary'} {'Golden_Glider' 'Typhoid_Mary'} {'Mothergod' 'Lady_Clay'} {'Eviless' 'Lafety_Le_Fei'} {'Golddigger' 'Typhoid_Mary'} {'Dr_Evil' 'Mai_Shen'} {'Fury_Leika' 'Hypnota'} {'Lagomorph' 'Lady_Clay'} {'White_Rabbit' 'Windfall'} {'Silver_Banshee' 'Lafety_Le_Fei'} {'White_Rabbit' 'Lady_Clay'} {'Silver_Banshee' 'Titania'} {'White_Rabbit' 'Titania'} {'Star_Sapphire' 'Syndrome'} {'Silver_Swan' 'Hypnota'} {'The_Crimson_Ghost' 'Osira'} {'Mothergod' 'Roulette'} {'Devastation' 'Lady_Clay'} {'Amy_Madison' 'Typhoid_Mary'} {'Eviless' 'Roulette'} {'Spider_Girl' 'Rampage'} {'Dr_Evil' 'Syndrome'} {'Maxima' 'Osira'} {'The_Lightning' 'Lady_Clay'} {'Silver_Banshee' 'Black_Mamba'} {'Devastation' 'Mai_Shen'} {'Madame_Masque' 'Madame_Rouge'} {'Amy_Madison' 'Silk_Fever'} {'Lagomorph' 'Yellowjacket'} {'Queen_Clea' 'Professor_Padraic_Ratigan'} {'Mothergod' 'Silk_Fever'} {'Maxima' 'Silk_Fever'} {'Lagomorph' 'Rampage'} {'The_Crimson_Ghost' 'Lady_Clay'} {'Spider_Girl' 'Mai_Shen'} {'Mothergod' 'Madame_Rouge'} {'Mothergod' 'Typhoid_Mary'} {'Fury_Leika' 'Professor_Padraic_Ratigan'} {'Fury_Leika' 'Roulette'} {'Maxima' 'Black_Mamba'} {'Dr_Evil' 'Black_Mamba'} {'Madame_Masque' 'Mai_Shen'} {'White_Rabbit' 'Silk_Fever'} {'Fury_Leika' 'Magenta'} {'The_Lightning' 'Rampage'} {'Lagomorph' 'Silk_Fever'} {'Golden_Glider' 'Windfall'} {'Silver_Banshee' 'Windfall'} {'Silver_Banshee' 'Yellowjacket'} {'Dr_Evil' 'Lafety_Le_Fei'} {'Devastation' 'Typhoid_Mary'} {'Maxima' 'Lafety_Le_Fei'} {'Queen_Clea' 'Yellowjacket'} {'White_Rabbit' 'Rampage'} {'Golden_Glider' 'Yellowjacket'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silk_Fever' 'Mothergod'} {'Decay' 'Shimmer'} {'Golden_Glider' 'Windfall'} {'Silver_Banshee' 'Queen_Of_Fables'} {'Typhoid_Mary' 'Syndrome'} {'Unicron' 'Maxima'} {'Lady_Vic' 'Lady_Octopus'} {'Golden_Glider' 'Zaladane'} {'Typhoid_Mary' 'Harley_Quinn'} {'Silver_Banshee' 'Mothergod'} {'Osira' 'Lotso'} {'Queen_Bee' 'Tala'} {'Spider_Girl' 'Zaladane'} {'Silk_Fever' 'King_Ghidorah'} {'Typhoid_Mary' 'Lotso'} {'Osira' 'Mothergod'} {'Spider_Girl' 'Syndrome'} {'Star_Sapphire' 'Syndrome'} {'Saturn_Queen' 'Sun_Girl'} {'Bombshell' 'Lotso'} {'Lady_Vic' 'Shimmer'} {'Livewire' 'Tala'} {'Bombshell' 'Maxima'} {'Golden_Glider' 'Tala'} {'Silver_Banshee' 'Shiv'} {'Queen_Clea' 'Tala'} {'Spider_Girl' 'Lotso'} {'Bombshell' 'Eviless'} {'Decay' 'Maxima'} {'Golden_Glider' 'Mothergod'} {'Devastation' 'Mai_Shen'} {'Spider_Girl' 'New_Wave'} {'Saturn_Queen' 'Queen_Of_Fables'} {'Osira' 'Harley_Quinn'} {'Osira' 'Maxima'} {'Scandal' 'Maxima'} {'Livewire' 'Eviless'} {'Deuce' 'Zaladane'} {'Deuce' 'Maxima'} {'Queen_Clea' 'Mothergod'} {'Unicron' 'Evinlea'} {'Deuce' 'Tala'} {'Devastation' 'Superwoman'} {'Livewire' 'Shimmer'} {'Scandal' 'King_Ghidorah'} {'Typhoid_Mary' 'King_Ghidorah'} {'Bombshell' 'Evinlea'} {'Star_Sapphire' 'Lady_Octopus'} {'Spider_Girl' 'Evinlea'} {'Coachwhip' 'New_Wave'} {'Star_Sapphire' 'Zaladane'} {'Devastation' 'Shiv'} {'Queen_Bee' 'Lady_Octopus'} {'Decay' 'New_Wave'} {'Scandal' 'Superwoman'} {'Unicron' 'Zaladane'} {'Decay' 'King_Ghidorah'} {'Typhoid_Mary' 'Maxima'} {'Dansen_Macabre' 'Evinlea'} {'Queen_Clea' 'Maxima'} {'Queen_Clea' 'Superwoman'} {'Deuce' 'Queen_Of_Fables'} {'Decay' 'Sun_Girl'} {'Golden_Glider' 'Sun_Girl'} {'Star_Sapphire' 'Eviless'} {'Silk_Fever' 'Lazara'} {'Lady_Vic' 'Sun_Girl'} {'Unicron' 'New_Wave'} {'Saturn_Queen' 'King_Ghidorah'} {'Unicron' 'Lotso'} {'Silver_Banshee' 'King_Ghidorah'} {'Golden_Glider' 'Superwoman'} {'Decay' 'Tala'} {'Devastation' 'Tala'} {'Dansen_Macabre' 'Maxima'} {'Dansen_Macabre' 'Lady_Octopus'} {'Silver_Banshee' 'Mai_Shen'} {'Silver_Banshee' 'Lazara'} {'Spider_Girl' 'Mothergod'} {'Deuce' 'Syndrome'} {'Dansen_Macabre' 'Windfall'} {'Bombshell' 'Lady_Octopus'} {'Silk_Fever' 'Zaladane'} {'Scandal' 'Syndrome'} {'Livewire' 'Windfall'} {'Decay' 'Harley_Quinn'} {'Scandal' 'New_Wave'} {'Osira' 'Eviless'} {'Dansen_Macabre' 'Shimmer'} {'Saturn_Queen' 'Lady_Octopus'} {'Queen_Clea' 'Shiv'} {'Decay' 'Shiv'} {'Scandal' 'Shimmer'} {'Coachwhip' 'Tala'} {'Osira' 'Evinlea'} {'Silk_Fever' 'Evinlea'} {'Coachwhip' 'Queen_Of_Fables'} {'Deuce' 'Evinlea'} {'Bombshell' 'Lazara'} {'Lady_Vic' 'Queen_Of_Fables'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Spider_Girl' 'Blue_Snowman'} {'Blue_Snowman' 'Roulette'} {'Roulette' 'Spider_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'Hypnota'} {'Poundcakes' 'Superwoman'} {'Purgatori' 'Queen_Of_Fables'} {'Plastique' 'Star_Sapphire'} {'Evinlea' 'Snapdragon'} {'Emerald_Empress' 'Abominatrix'} {'New_Wave' 'Amazing_Grace'} {'New_Wave' 'Lady_Death'} {'Talia_Al_Ghul' 'Mephista'} {'Lady_Clay' 'Ursa'} {'Zaladane' 'Silk_Fever'} {'Talia_Al_Ghul' 'Star_Sapphire'} {'Deuce' 'Titania'} {'Bombshell' 'Snapdragon'} {'Bombshell' 'Abominatrix'} {'Evinlea' 'Lagomorph'} {'Typhoid_Mary' 'Nyssa_Raatko'} {'Cyborgirl' 'Nyssa_Raatko'} {'Purgatori' 'Silk_Fever'} {'Dr_Evil' 'Ursa'} {'Dr_Evil' 'Silk_Fever'} {'Lady_Clay' 'Madame_Masque'} {'Harley_Quinn' 'Mephista'} {'Syndrome' 'White_Rabbit'} {'Tigress' 'Madame_Masque'} {'Tigress' 'Queen_Of_Fables'} {'Bombshell' 'Superwoman'} {'Evinlea' 'Abominatrix'} {'Purgatori' 'Snapdragon'} {'Osira' 'Hypnota'} {'Syndrome' 'Mephista'} {'Dr_Evil' 'Lagomorph'} {'Plastique' 'Rampage'} {'New_Wave' 'Madame_Masque'} {'Plastique' 'Abominatrix'} {'Harley_Quinn' 'White_Rabbit'} {'New_Wave' 'Snapdragon'} {'Dr_Evil' 'Mai_Shen'} {'Emerald_Empress' 'Yellowjacket'} {'Lady_Clay' 'Mephista'} {'Purgatori' 'Superwoman'} {'Tigress' 'Titania'} {'Deuce' 'Abominatrix'} {'Cyborgirl' 'Lagomorph'} {'Dead_Bowie' 'Queen_Of_Fables'} {'Purgatori' 'Amazing_Grace'} {'Zaladane' 'Ursa'} {'Lady_Clay' 'Queen_Of_Fables'} {'Zaladane' 'Amazing_Grace'} {'Dead_Bowie' 'Amazing_Grace'} {'Deuce' 'Superwoman'} {'Zaladane' 'Yellowjacket'} {'Harley_Quinn' 'Ursa'} {'Blue_Snowman' 'Yellowjacket'} {'Typhoid_Mary' 'Abominatrix'} {'Evinlea' 'Queen_Of_Fables'} {'Typhoid_Mary' 'Mephista'} {'Evinlea' 'Lady_Death'} {'Talia_Al_Ghul' 'Queen_Of_Fables'} {'Syndrome' 'Lady_Death'} {'Bombshell' 'Silk_Fever'} {'Poundcakes' 'Hypnota'} {'Blue_Snowman' 'Rampage'} {'Evinlea' 'Nyssa_Raatko'} {'Typhoid_Mary' 'Madame_Masque'} {'Typhoid_Mary' 'Lagomorph'} {'Harley_Quinn' 'Nyssa_Raatko'} {'Lady_Clay' 'Evinlea'} {'Harley_Quinn' 'Amazing_Grace'} {'Talia_Al_Ghul' 'Rampage'} {'Osira' 'Abominatrix'} {'Dr_Evil' 'Titania'} {'Cyborgirl' 'Mai_Shen'} {'Syndrome' 'Queen_Of_Fables'} {'Dead_Bowie' 'Nyssa_Raatko'} {'Dead_Bowie' 'Lady_Death'} {'Zaladane' 'Rampage'} {'Poundcakes' 'Lady_Death'} {'Dead_Bowie' 'Star_Sapphire'} {'Evinlea' 'Rampage'} {'Emerald_Empress' 'Silver_Swan'} {'Blue_Snowman' 'Lady_Death'} {'Deuce' 'Yellowjacket'} {'Talia_Al_Ghul' 'Snapdragon'} {'Deuce' 'Rampage'} {'Harley_Quinn' 'Abominatrix'} {'Plastique' 'Mai_Shen'} {'Tigress' 'Silk_Fever'} {'Evinlea' 'Silver_Swan'} {'Plastique' 'Superwoman'} {'Talia_Al_Ghul' 'Silver_Swan'} {'New_Wave' 'Silver_Swan'} {'Dr_Evil' 'Nyssa_Raatko'} {'Poundcakes' 'Mephista'} {'Bombshell' 'Titania'} {'Talia_Al_Ghul' 'Hypnota'} {'Blue_Snowman' 'Ursa'} {'Dr_Evil' 'Queen_Of_Fables'} {'Osira' 'Mephista'} {'Deuce' 'Snapdragon'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Roulette' 'Star_Sapphire'} {'Lady_Clay' 'Lafety_Le_Fei'} {'Evinlea' 'Margaret_Love'} {'Mai_Shen' 'Titania'} {'Spider_Girl' 'Coachwhip'} {'Amy_Madison' 'Snapdragon'} {'Shimmer' 'Emerald_Empress'} {'Blue_Snowman' 'Nyssa_Raatko'} {'Tala' 'Silver_Banshee'} {'Magenta' 'Nyssa_Raatko'} {'Scandal' 'Tigress'} {'Tala' 'Coachwhip'} {'Bombshell' 'Tigress'} {'Maxima' 'Silver_Banshee'} {'Lady_Shiva' 'Dr_Evil'} {'Shimmer' 'Star_Sapphire'} {'Evinlea' 'Trinity'} {'Shimmer' 'Tigress'} {'Mai_Shen' 'Emerald_Empress'} {'Evinlea' 'Cyborgirl'} {'Shimmer' 'Dr_Evil'} {'Roulette' 'Lafety_Le_Fei'} {'Golden_Glider' 'Lafety_Le_Fei'} {'Roulette' 'Animora'} {'Evinlea' 'Sun_Girl'} {'Mai_Shen' 'Star_Sapphire'} {'Lady_Quark' 'Lafety_Le_Fei'} {'Professor_Padraic_Ratigan' 'Silver_Banshee'} {'Lady_Clay' 'Animora'} {'Plastique' 'Margaret_Love'} {'Lady_Clay' 'Coachwhip'} {'Roulette' 'New_Wave'} {'Amy_Madison' 'Trinity'} {'Amy_Madison' 'Emerald_Empress'} {'Plastique' 'Animora'} {'Amy_Madison' 'Lafety_Le_Fei'} {'Doctor_Cyber' 'Snapdragon'} {'Maxima' 'New_Wave'} {'Tala' 'New_Wave'} {'Spider_Girl' 'Trinity'} {'Doctor_Cyber' 'Sun_Girl'} {'Professor_Padraic_Ratigan' 'Star_Sapphire'} {'Lady_Quark' 'Cyborgirl'} {'Spider_Girl' 'Cyborgirl'} {'Roulette' 'Trinity'} {'Blue_Snowman' 'Fem_Paragon'} {'Spider_Girl' 'Fem_Paragon'} {'Amy_Madison' 'Dr_Evil'} {'Lady_Shiva' 'Lafety_Le_Fei'} {'Lady_Clay' 'Lazara'} {'Lady_Quark' 'Nyssa_Raatko'} {'Lady_Quark' 'Tigress'} {'Shimmer' 'Sun_Girl'} {'Blue_Snowman' 'Margaret_Love'} {'Evinlea' 'Coachwhip'} {'Lady_Shiva' 'Fem_Paragon'} {'The_Crimson_Ghost' 'Titania'} {'Amy_Madison' 'New_Wave'} {'Roulette' 'Lazara'} {'The_Crimson_Ghost' 'Trinity'} {'Magenta' 'Snapdragon'} {'Mai_Shen' 'Unicron'} {'Scandal' 'Animora'} {'Lady_Clay' 'Cyborgirl'} {'Lady_Clay' 'Emerald_Empress'} {'Spider_Girl' 'Star_Sapphire'} {'Shimmer' 'Deuce'} {'Spider_Girl' 'Animora'} {'Plastique' 'Tigress'} {'Lady_Quark' 'Fem_Paragon'} {'Magenta' 'Coachwhip'} {'Magenta' 'Unicron'} {'Magenta' 'Cyborgirl'} {'Plastique' 'Coachwhip'} {'Lady_Clay' 'Trinity'} {'The_Crimson_Ghost' 'Dr_Evil'} {'Golden_Glider' 'Tigress'} {'The_Crimson_Ghost' 'Deuce'} {'Amy_Madison' 'Deuce'} {'Amy_Madison' 'Silver_Banshee'} {'Shimmer' 'New_Wave'} {'Scandal' 'Snapdragon'} {'Tala' 'Deuce'} {'Maxima' 'Star_Sapphire'} {'Magenta' 'Sun_Girl'} {'Professor_Padraic_Ratigan' 'Margaret_Love'} {'Bombshell' 'Lafety_Le_Fei'} {'Bombshell' 'Titania'} {'Amy_Madison' 'Animora'} {'Roulette' 'Sun_Girl'} {'Professor_Padraic_Ratigan' 'Deuce'} {'Golden_Glider' 'Lazara'} {'Doctor_Cyber' 'Unicron'} {'Lady_Shiva' 'Nyssa_Raatko'} {'Doctor_Cyber' 'Lazara'} {'Lady_Shiva' 'Trinity'} {'Scandal' 'Margaret_Love'} {'Spider_Girl' 'Tigress'} {'Evinlea' 'Tigress'} {'Maxima' 'Unicron'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Osira' 'Valentina'} {'Magenta' 'Queen_Of_Fables'} {'Devastation' 'Deuce'} {'Silver_Swan' 'Spider_Girl'} {'Saturn_Queen' 'Unicron'} {'Star_Sapphire' 'Sun_Girl'} {'Lady_Octopus' 'Titania'} {'Purgatori' 'Dr_Horrible'} {'Doctor_Cyber' 'White_Rabbit'} {'Mothergod' 'Cyborgirl'} {'King_Ghidorah' 'Abominatrix'} {'Unicron' 'Fury_Leika'} {'Genevieve_Savidge' 'Fake_Thomas_Jefferson'} {'Maxima' 'Hypnota'} {'Southpaw' 'Dr_Evil'} {'Cyborgirl' 'Saturn_Queen'} {'Talia_Al_Ghul' 'Lady_Octopus'} {'Lafety_Le_Fei' 'Lazara'} {'Margaret_Love' 'Emerald_Empress'} {'Typhoid_Mary' 'Osira'} {'Jewelee' 'Amazing_Grace'} {'Jinx' 'Jason_Kreis'} {'Shimmer' 'Talia_Al_Ghul'} {'Snapdragon' 'Devastation'} {'Madame_Rouge' 'Jinx'} {'Dead_Bowie' 'Maxima'} {'Decay' 'Mothergod'} {'Magpie' 'Shimmer'} {'Lady_Quark' 'Superwoman'} {'Shiv' 'Magpie'} {'Syndrome' 'Lady_Clay'} {'Ursa' 'Asbestos_Lady'} {'Silk_Fever' 'Evinlea'} {'Hypnota' 'Genevieve_Savidge'} {'Sun_Girl' 'Plastique'} {'Fury_Leika' 'Silk_Fever'} {'Spider_Girl' 'Mist'} {'Roulette' 'Silver_Swan'} {'Superwoman' 'Queen_Bee'} {'Lotso' 'The_Crimson_Ghost'} {'Eviless' 'Queen_Clea'} {'Titania' 'Rampage'} {'Yellowjacket' 'Lady_Quark'} {'Plastique' 'Poundcakes'} {'Zaladane' 'The_Lightning'} {'Prank' 'Syndrome'} {'Tala' 'Poison_Ivy'} {'Harley_Quinn' 'Lady_Death'} {'Lady_Death' 'Professor_Padraic_Ratigan'} {'Deuce' 'Magenta'} {'White_Rabbit' 'Roulette'} {'Tigress' 'Blue_Snowman'} {'Nyssa_Raatko' 'Zaladane'} {'Asbestos_Lady' 'Rad'} {'Bombshell' 'Tala'} {'Fake_Thomas_Jefferson' 'King_Ghidorah'} {'Dr_Horrible' 'Southpaw'} {'Poison_Ivy' 'Prank'} {'Evinlea' 'Dansen_Macabre'} {'The_Lightning' 'Jewelee'} {'Emerald_Empress' 'Trinity'} {'Mai_Shen' 'Yellowjacket'} {'Lashina' 'Scandal'} {'Lagomorph' 'Silver_Banshee'} {'Madame_Masque' 'Windfall'} {'Livewire' 'Madame_Masque'} {'Abominatrix' 'Snapdragon'} {'Duela_Dent' 'Mai_Shen'} {'Amy_Madison' 'Leather'} {'Silver_Banshee' 'Nyssa_Raatko'} {'Jason_Kreis' 'Bombshell'} {'Queen_Bee' 'Doctor_Cyber'} {'Rad' 'Shiv'} {'Coachwhip' 'Margaret_Love'} {'Golddigger' 'Lafety_Le_Fei'} {'The_Crimson_Ghost' 'Typhoid_Mary'} {'Scandal' 'Harley_Quinn'} {'Queen_Clea' 'Coachwhip'} {'Windfall' 'Fem_Paragon'} {'Trinity' 'Star_Sapphire'} {'Lazara' 'Dead_Bowie'} {'Mist' 'Ingra'} {'Lady_Clay' 'Black_Mamba'} {'Valentina' 'Princess_Python'} {'Poundcakes' 'Lagomorph'} {'Animora' 'Lashina'} {'Princess_Python' 'Madame_Rouge'} {'Gru' 'Livewire'} {'Dr_Evil' 'Duela_Dent'} {'Fem_Paragon' 'Golddigger'} {'Leather' 'Animora'} {'Amazing_Grace' 'Amy_Madison'} {'Queen_Of_Fables' 'Lotso'} {'Ingra' 'Eviless'} {'Rampage' 'Gru'} {'Black_Mamba' 'Tigress'} {'Professor_Padraic_Ratigan' 'Ursa'} {'Dansen_Macabre' 'Purgatori'} {'Blue_Snowman' 'Decay'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Snapdragon' 'Fake_Thomas_Jefferson'} {'Mephista' 'Dr_Horrible'} {'Mephista' 'Queen_Bee'} {'Duela_Dent' 'Fake_Thomas_Jefferson'} {'Blue_Snowman' 'Leather'} {'Poundcakes' 'Ursa'} {'Typhoid_Mary' 'Star_Sapphire'} {'Eviless' 'Ursa'} {'Trinity' 'Mothergod'} {'Blue_Snowman' 'Mai_Shen'} {'Duela_Dent' 'Queen_Bee'} {'Snapdragon' 'The_Lightning'} {'Eviless' 'Mothergod'} {'Gru' 'Bombshell'} {'Blue_Snowman' 'Evinlea'} {'Mephista' 'Jinx'} {'Snapdragon' 'Mai_Shen'} {'Devastation' 'Dr_Horrible'} {'Trinity' 'Ingra'} {'Titania' 'Queen_Bee'} {'Snapdragon' 'Valentina'} {'Eviless' 'Queen_Clea'} {'Gru' 'Professor_Padraic_Ratigan'} {'Blue_Snowman' 'Jinx'} {'Gru' 'Lafety_Le_Fei'} {'Roulette' 'Ursa'} {'Lady_Vic' 'Star_Sapphire'} {'Emerald_Empress' 'Bombshell'} {'Devastation' 'Mai_Shen'} {'Mephista' 'Lafety_Le_Fei'} {'Eviless' 'Fem_Paragon'} {'Blue_Snowman' 'Unicron'} {'Snapdragon' 'Lafety_Le_Fei'} {'Emerald_Empress' 'Mothergod'} {'Typhoid_Mary' 'Valentina'} {'Plastique' 'Jinx'} {'Gru' 'Leather'} {'Dead_Bowie' 'Leather'} {'Lady_Vic' 'The_Lightning'} {'Trinity' 'Margaret_Love'} {'Emerald_Empress' 'Queen_Clea'} {'Typhoid_Mary' 'Lafety_Le_Fei'} {'Devastation' 'Leather'} {'Titania' 'Lafety_Le_Fei'} {'Sun_Girl' 'Bombshell'} {'Dead_Bowie' 'Ursa'} {'Blue_Snowman' 'Queen_Clea'} {'Lady_Vic' 'Ursa'} {'Devastation' 'Professor_Padraic_Ratigan'} {'Gru' 'The_Lightning'} {'Superwoman' 'Mothergod'} {'Poundcakes' 'Ingra'} {'Trinity' 'The_Lightning'} {'Jason_Kreis' 'Fem_Paragon'} {'Lady_Vic' 'Mai_Shen'} {'New_Wave' 'Evinlea'} {'Gru' 'Typhoid_Mary'} {'Gru' 'Valentina'} {'Superwoman' 'Fem_Paragon'} {'Roulette' 'Queen_Bee'} {'Plastique' 'Dr_Horrible'} {'New_Wave' 'Fem_Paragon'} {'Trinity' 'Fem_Paragon'} {'Blue_Snowman' 'The_Lightning'} {'Duela_Dent' 'Unicron'} {'New_Wave' 'Mothergod'} {'Trinity' 'Bombshell'} {'Blue_Snowman' 'Valentina'} {'Gru' 'Ursa'} {'Roulette' 'Mothergod'} {'Gru' 'Mothergod'} {'Sun_Girl' 'Star_Sapphire'} {'Roulette' 'Unicron'} {'Mephista' 'Leather'} {'Devastation' 'Ursa'} {'Devastation' 'Mothergod'} {'Dead_Bowie' 'Margaret_Love'} {'Superwoman' 'Lafety_Le_Fei'} {'Eviless' 'Dr_Horrible'} {'Superwoman' 'Leather'} {'Devastation' 'Ingra'} {'Poundcakes' 'Evinlea'} {'Typhoid_Mary' 'Queen_Clea'} {'Eviless' 'Evinlea'} {'Jason_Kreis' 'Fake_Thomas_Jefferson'} {'Jason_Kreis' 'Professor_Padraic_Ratigan'} {'Superwoman' 'Professor_Padraic_Ratigan'} {'Typhoid_Mary' 'Unicron'} {'New_Wave' 'Leather'} {'Dead_Bowie' 'Jinx'} {'Titania' 'Bombshell'} {'Gru' 'Fake_Thomas_Jefferson'} {'Typhoid_Mary' 'Queen_Bee'} {'Duela_Dent' 'Bombshell'} {'Trinity' 'Jinx'} {'Sun_Girl' 'Jinx'} {'Eviless' 'Fake_Thomas_Jefferson'} {'Titania' 'The_Lightning'} {'Snapdragon' 'Margaret_Love'} {'Plastique' 'Leather'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Abominatrix' 'Osira'} {'Mist' 'Scandal'} {'Queen_Of_Fables' 'Golden_Glider'} {'Roulette' 'Leather'} {'Prank' 'Madame_Rouge'} {'Nyssa_Raatko' 'Mephista'} {'Yellowjacket' 'Lafety_Le_Fei'} {'Princess_Python' 'Typhoid_Mary'} {'Lady_Octopus' 'Queen_Of_Fables'} {'Leather' 'Superwoman'} {'Madame_Rouge' 'Shimmer'} {'Golddigger' 'Asbestos_Lady'} {'Coachwhip' 'Poison_Ivy'} {'Silver_Banshee' 'Jason_Kreis'} {'Tigress' 'Blue_Snowman'} {'Golden_Glider' 'Duela_Dent'} {'Lady_Death' 'Emerald_Empress'} {'Lagomorph' 'Doctor_Cyber'} {'Sun_Girl' 'Purgatori'} {'Animora' 'Silver_Swan'} {'Snapdragon' 'Windfall'} {'Gru' 'Devastation'} {'New_Wave' 'Syndrome'} {'Titania' 'Hypnota'} {'Shiv' 'Gru'} {'Unicron' 'Lady_Shiva'} {'Rad' 'Eviless'} {'Star_Sapphire' 'The_Crimson_Ghost'} {'Syndrome' 'Tala'} {'Ingra' 'Mothergod'} {'Lashina' 'Lady_Vic'} {'Black_Mamba' 'Professor_Padraic_Ratigan'} {'Mephista' 'Dr_Evil'} {'Silver_Swan' 'Evinlea'} {'Doctor_Cyber' 'Queen_Bee'} {'Queen_Bee' 'Nyssa_Raatko'} {'Windfall' 'Shiv'} {'Valentina' 'Lady_Octopus'} {'Livewire' 'The_Lightning'} {'Magenta' 'Silver_Banshee'} {'Lady_Vic' 'Star_Sapphire'} {'Trinity' 'White_Rabbit'} {'Cyborgirl' 'Deuce'} {'Saturn_Queen' 'Dead_Bowie'} {'Magpie' 'Roulette'} {'Osira' 'Valentina'} {'White_Rabbit' 'Harley_Quinn'} {'Hypnota' 'Lady_Death'} {'King_Ghidorah' 'Princess_Python'} {'Queen_Clea' 'Lady_Clay'} {'Shimmer' 'Saturn_Queen'} {'Superwoman' 'Tigress'} {'Evinlea' 'Genevieve_Savidge'} {'Dr_Evil' 'Southpaw'} {'Madame_Masque' 'Lazara'} {'Poison_Ivy' 'Talia_Al_Ghul'} {'Southpaw' 'Abominatrix'} {'Lazara' 'Rad'} {'Lady_Quark' 'Titania'} {'Scandal' 'Spider_Girl'} {'Maxima' 'Animora'} {'Asbestos_Lady' 'Mai_Shen'} {'Purgatori' 'King_Ghidorah'} {'Deuce' 'Coachwhip'} {'Eviless' 'Lashina'} {'Dead_Bowie' 'Amazing_Grace'} {'Harley_Quinn' 'Livewire'} {'Jinx' 'Trinity'} {'Plastique' 'Poundcakes'} {'Amy_Madison' 'Queen_Clea'} {'Blue_Snowman' 'Golddigger'} {'Lotso' 'Lady_Quark'} {'Typhoid_Mary' 'Yellowjacket'} {'Poundcakes' 'Ursa'} {'Silk_Fever' 'Cyborgirl'} {'The_Lightning' 'Ingra'} {'Fem_Paragon' 'Amy_Madison'} {'Mothergod' 'Snapdragon'} {'Dr_Horrible' 'Fury_Leika'} {'Tala' 'Unicron'} {'Talia_Al_Ghul' 'Mist'} {'Spider_Girl' 'Magpie'} {'Jewelee' 'Silk_Fever'} {'Fury_Leika' 'Fem_Paragon'} {'The_Crimson_Ghost' 'Dr_Horrible'} {'Lafety_Le_Fei' 'Maxima'} {'Amazing_Grace' 'Decay'} {'Genevieve_Savidge' 'Plastique'} {'Mai_Shen' 'Lotso'} {'Lady_Clay' 'Magenta'} {'Devastation' 'Madame_Masque'} {'Margaret_Love' 'Black_Mamba'} {'Emerald_Empress' 'New_Wave'} {'Decay' 'Jewelee'} {'Zaladane' 'Margaret_Love'} {'Ursa' 'Jinx'} {'Professor_Padraic_Ratigan' 'Prank'} {'Lady_Shiva' 'Lagomorph'} {'Jason_Kreis' 'Zaladane'} {'Duela_Dent' 'Sun_Girl'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Animora' 'Typhoid_Mary'} {'Mothergod' 'Cyborgirl'} {'Emerald_Empress' 'Coachwhip'} {'Dansen_Macabre' 'King_Ghidorah'} {'Emerald_Empress' 'Lagomorph'} {'Zaladane' 'Professor_Padraic_Ratigan'} {'Lady_Vic' 'Cyborgirl'} {'Saturn_Queen' 'Coachwhip'} {'Silver_Banshee' 'Mai_Shen'} {'The_Lightning' 'Windfall'} {'Talia_Al_Ghul' 'Coachwhip'} {'Lady_Death' 'Yellowjacket'} {'Saturn_Queen' 'Mist'} {'Lady_Vic' 'Sun_Girl'} {'Animora' 'Windfall'} {'Emerald_Empress' 'Princess_Python'} {'Talia_Al_Ghul' 'Evinlea'} {'Purgatori' 'Evinlea'} {'Lady_Vic' 'Mai_Shen'} {'Talia_Al_Ghul' 'Sun_Girl'} {'Saturn_Queen' 'King_Ghidorah'} {'Zaladane' 'Silk_Fever'} {'Purgatori' 'Mai_Shen'} {'Animora' 'Princess_Python'} {'Lady_Vic' 'Silk_Fever'} {'Magenta' 'Sun_Girl'} {'Animora' 'Sun_Girl'} {'Talia_Al_Ghul' 'Valentina'} {'Saturn_Queen' 'Silk_Fever'} {'Mothergod' 'Lady_Shiva'} {'Mothergod' 'Harley_Quinn'} {'Prank' 'Typhoid_Mary'} {'Prank' 'Sun_Girl'} {'Prank' 'Cyborgirl'} {'Prank' 'Lagomorph'} {'Lady_Vic' 'Mist'} {'Shiv' 'Mist'} {'Abominatrix' 'Mai_Shen'} {'Abominatrix' 'Sun_Girl'} {'Silver_Banshee' 'Princess_Python'} {'Purgatori' 'Black_Mamba'} {'Silver_Banshee' 'Windfall'} {'Shiv' 'Osira'} {'Talia_Al_Ghul' 'Mist'} {'Dansen_Macabre' 'Typhoid_Mary'} {'Golddigger' 'Black_Mamba'} {'Shiv' 'Dr_Horrible'} {'Silver_Banshee' 'Osira'} {'Prank' 'Dr_Horrible'} {'The_Lightning' 'Professor_Padraic_Ratigan'} {'Purgatori' 'Typhoid_Mary'} {'Purgatori' 'Mist'} {'Magpie' 'Princess_Python'} {'Magenta' 'Cyborgirl'} {'Silver_Banshee' 'Lady_Shiva'} {'Zaladane' 'Coachwhip'} {'The_Lightning' 'Mist'} {'Magpie' 'Dr_Horrible'} {'Mothergod' 'Lagomorph'} {'Lady_Death' 'Lagomorph'} {'Shiv' 'Silk_Fever'} {'Lady_Octopus' 'Professor_Padraic_Ratigan'} {'Saturn_Queen' 'Sun_Girl'} {'Silver_Banshee' 'Typhoid_Mary'} {'Magpie' 'Harley_Quinn'} {'Emerald_Empress' 'Osira'} {'Saturn_Queen' 'Evinlea'} {'Prank' 'Princess_Python'} {'Lady_Octopus' 'Lady_Shiva'} {'Prank' 'Silk_Fever'} {'Abominatrix' 'Black_Mamba'} {'The_Lightning' 'Valentina'} {'Mothergod' 'Mai_Shen'} {'Lady_Vic' 'Professor_Padraic_Ratigan'} {'Lady_Vic' 'Dr_Horrible'} {'Abominatrix' 'Mist'} {'Magenta' 'Princess_Python'} {'Purgatori' 'Lagomorph'} {'Lady_Death' 'Mai_Shen'} {'Abominatrix' 'Silk_Fever'} {'The_Lightning' 'Black_Mamba'} {'Magenta' 'Yellowjacket'} {'Golddigger' 'Evinlea'} {'Prank' 'Professor_Padraic_Ratigan'} {'Abominatrix' 'Valentina'} {'Magpie' 'Typhoid_Mary'} {'Golddigger' 'King_Ghidorah'} {'Animora' 'Cyborgirl'} {'Magpie' 'Valentina'} {'Talia_Al_Ghul' 'Yellowjacket'} {'Magenta' 'Typhoid_Mary'} {'Lady_Death' 'Black_Mamba'} {'Dansen_Macabre' 'Dr_Horrible'} {'Fake_Thomas_Jefferson' 'Princess_Python'} {'The_Lightning' 'Dr_Horrible'} {'Zaladane' 'Mist'} {'Lady_Death' 'Valentina'} {'Fake_Thomas_Jefferson' 'Lagomorph'} {'Emerald_Empress' 'Cyborgirl'} {'Animora' 'King_Ghidorah'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Banshee' 'Titania'} {'Zaladane' 'Silk_Fever'} {'Magpie' 'Dead_Bowie'} {'Magpie' 'Animora'} {'Saturn_Queen' 'Jinx'} {'Margaret_Love' 'White_Rabbit'} {'Zaladane' 'Lazara'} {'Snapdragon' 'Jewelee'} {'Queen_Bee' 'Silk_Fever'} {'Spider_Girl' 'Silver_Swan'} {'Silver_Banshee' 'Lazara'} {'Decay' 'Silk_Fever'} {'Magpie' 'White_Rabbit'} {'Saturn_Queen' 'Fem_Paragon'} {'Spider_Girl' 'Dr_Evil'} {'Decay' 'Lagomorph'} {'Rampage' 'Titania'} {'Lashina' 'Dead_Bowie'} {'Spider_Girl' 'Queen_Of_Fables'} {'Lady_Death' 'Silk_Fever'} {'Lady_Death' 'Jewelee'} {'Shimmer' 'Fem_Paragon'} {'Lashina' 'Evinlea'} {'Magpie' 'Dr_Horrible'} {'Lady_Death' 'Cyborgirl'} {'Asbestos_Lady' 'Evinlea'} {'Rampage' 'Sun_Girl'} {'Silver_Banshee' 'Jewelee'} {'Bombshell' 'White_Rabbit'} {'Saturn_Queen' 'Dr_Evil'} {'Silver_Banshee' 'Animora'} {'Harley_Quinn' 'Silver_Swan'} {'Lafety_Le_Fei' 'Fem_Paragon'} {'King_Ghidorah' 'Silk_Fever'} {'Lashina' 'Lady_Shiva'} {'Lashina' 'Lagomorph'} {'Zaladane' 'Lady_Shiva'} {'Zaladane' 'Animora'} {'Harley_Quinn' 'Cyborgirl'} {'Devastation' 'Lagomorph'} {'Snapdragon' 'Cyborgirl'} {'Snapdragon' 'Livewire'} {'Hypnota' 'Silk_Fever'} {'Bombshell' 'Silver_Swan'} {'Margaret_Love' 'Jewelee'} {'Hypnota' 'Queen_Of_Fables'} {'Saturn_Queen' 'Lazara'} {'Lafety_Le_Fei' 'Lady_Shiva'} {'Spider_Girl' 'Fem_Paragon'} {'Decay' 'Dead_Bowie'} {'Harley_Quinn' 'Jewelee'} {'Decay' 'Titania'} {'Bombshell' 'Sun_Girl'} {'Hypnota' 'Dr_Horrible'} {'Queen_Bee' 'White_Rabbit'} {'Decay' 'Dr_Horrible'} {'Asbestos_Lady' 'White_Rabbit'} {'Lafety_Le_Fei' 'Titania'} {'Harley_Quinn' 'Queen_Of_Fables'} {'Queen_Bee' 'Dead_Bowie'} {'Devastation' 'White_Rabbit'} {'Bombshell' 'Cyborgirl'} {'Devastation' 'New_Wave'} {'King_Ghidorah' 'Jinx'} {'Margaret_Love' 'Dead_Bowie'} {'Rampage' 'Dead_Bowie'} {'Queen_Bee' 'Titania'} {'Queen_Bee' 'Jewelee'} {'Lady_Death' 'Dr_Evil'} {'Magpie' 'Lazara'} {'Silver_Banshee' 'Livewire'} {'Decay' 'Lazara'} {'Zaladane' 'Dr_Evil'} {'Lashina' 'Titania'} {'Hypnota' 'Jinx'} {'Spider_Girl' 'Dr_Horrible'} {'Shimmer' 'Silver_Swan'} {'Margaret_Love' 'New_Wave'} {'Decay' 'Evinlea'} {'Magpie' 'Cyborgirl'} {'King_Ghidorah' 'Queen_Of_Fables'} {'Rampage' 'Silver_Swan'} {'Bombshell' 'Animora'} {'Harley_Quinn' 'Sun_Girl'} {'Magpie' 'Jewelee'} {'Lafety_Le_Fei' 'Livewire'} {'King_Ghidorah' 'Dr_Evil'} {'Lashina' 'White_Rabbit'} {'Shimmer' 'Queen_Of_Fables'} {'Asbestos_Lady' 'Dr_Horrible'} {'Hypnota' 'Fem_Paragon'} {'Lafety_Le_Fei' 'Dr_Evil'} {'Spider_Girl' 'Livewire'} {'Magpie' 'Lady_Shiva'} {'Devastation' 'Shimmer'} {'Lady_Death' 'Dr_Horrible'} {'King_Ghidorah' 'Silver_Swan'} {'Asbestos_Lady' 'Livewire'} {'Spider_Girl' 'Jewelee'} {'Silver_Banshee' 'Sun_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Madame_Masque' 'Rampage'} {'Abominatrix' 'Superwoman'} {'Silver_Banshee' 'Zaladane'} {'Abominatrix' 'Shimmer'} {'Fem_Paragon' 'Rampage'} {'Valentina' 'Star_Sapphire'} {'Titania' 'Lazara'} {'Dr_Horrible' 'Professor_Padraic_Ratigan'} {'Fem_Paragon' 'Livewire'} {'Golden_Glider' 'Decay'} {'Duela_Dent' 'Superwoman'} {'Valentina' 'Zaladane'} {'Valentina' 'Amazing_Grace'} {'Golddigger' 'Madame_Rouge'} {'Dr_Horrible' 'Star_Sapphire'} {'Bombshell' 'Rad'} {'Queen_Clea' 'Purgatori'} {'Valentina' 'Lady_Vic'} {'Jewelee' 'Madame_Rouge'} {'Harley_Quinn' 'Madame_Rouge'} {'Professor_Padraic_Ratigan' 'Purgatori'} {'Professor_Padraic_Ratigan' 'Saturn_Queen'} {'Golden_Glider' 'Saturn_Queen'} {'Genevieve_Savidge' 'Queen_Bee'} {'Sun_Girl' 'Amazing_Grace'} {'Sun_Girl' 'Dansen_Macabre'} {'Golddigger' 'Amazing_Grace'} {'Queen_Clea' 'Madame_Rouge'} {'Sun_Girl' 'Star_Sapphire'} {'Silver_Banshee' 'Superwoman'} {'The_Lightning' 'Purgatori'} {'Golddigger' 'Lazara'} {'Bombshell' 'Silk_Fever'} {'Queen_Of_Fables' 'Rad'} {'Harley_Quinn' 'Lady_Vic'} {'Bombshell' 'Decay'} {'Golden_Glider' 'Star_Sapphire'} {'Abominatrix' 'Madame_Rouge'} {'Jewelee' 'Maxima'} {'Mist' 'Spider_Girl'} {'The_Lightning' 'Saturn_Queen'} {'Golddigger' 'Maxima'} {'Golddigger' 'Spider_Girl'} {'Mist' 'Lazara'} {'Sun_Girl' 'Shimmer'} {'Fem_Paragon' 'Queen_Bee'} {'Sun_Girl' 'Spider_Girl'} {'Duela_Dent' 'Maxima'} {'Silver_Banshee' 'Livewire'} {'The_Lightning' 'Superwoman'} {'Dr_Horrible' 'Silk_Fever'} {'Sun_Girl' 'Rad'} {'Titania' 'Decay'} {'Abominatrix' 'Saturn_Queen'} {'Titania' 'Lady_Death'} {'The_Lightning' 'Silk_Fever'} {'Jewelee' 'Silk_Fever'} {'Golden_Glider' 'Lazara'} {'Queen_Of_Fables' 'Star_Sapphire'} {'Jewelee' 'Zaladane'} {'Genevieve_Savidge' 'Lazara'} {'Sun_Girl' 'Lady_Death'} {'Genevieve_Savidge' 'Purgatori'} {'Golddigger' 'Zaladane'} {'Madame_Masque' 'Zaladane'} {'Golden_Glider' 'Rampage'} {'Queen_Clea' 'Decay'} {'Golddigger' 'Silk_Fever'} {'Queen_Of_Fables' 'Saturn_Queen'} {'Madame_Masque' 'Dansen_Macabre'} {'Fem_Paragon' 'Shimmer'} {'The_Lightning' 'Queen_Bee'} {'Queen_Clea' 'Silk_Fever'} {'Titania' 'Rad'} {'Professor_Padraic_Ratigan' 'Maxima'} {'Madame_Masque' 'Queen_Bee'} {'Queen_Of_Fables' 'Dansen_Macabre'} {'Golden_Glider' 'Rad'} {'Queen_Of_Fables' 'Lazara'} {'Sun_Girl' 'Silk_Fever'} {'Jewelee' 'Superwoman'} {'Queen_Clea' 'Star_Sapphire'} {'Mist' 'Maxima'} {'Fem_Paragon' 'Purgatori'} {'Titania' 'Maxima'} {'Jewelee' 'Saturn_Queen'} {'Genevieve_Savidge' 'Rad'} {'Jewelee' 'Rampage'} {'Bombshell' 'Lazara'} {'Mist' 'Lady_Death'} {'Harley_Quinn' 'Rampage'} {'Abominatrix' 'Lazara'} {'Genevieve_Savidge' 'Zaladane'} {'Dr_Horrible' 'Amazing_Grace'} {'Titania' 'Shimmer'} {'Professor_Padraic_Ratigan' 'Queen_Bee'} {'Dr_Horrible' 'Zaladane'} {'Sun_Girl' 'Purgatori'} {'Valentina' 'Dansen_Macabre'} {'Silver_Banshee' 'Lady_Vic'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Yellowjacket' 'Margaret_Love'} {'Lady_Vic' 'Evinlea'} {'Princess_Python' 'Amy_Madison'} {'Tigress' 'Evinlea'} {'Mist' 'Evinlea'} {'Roulette' 'Silver_Banshee'} {'Lady_Shiva' 'Cyborgirl'} {'Madame_Rouge' 'Decay'} {'Lady_Vic' 'Cyborgirl'} {'Titania' 'Madame_Masque'} {'Unicron' 'Amy_Madison'} {'Unicron' 'Madame_Masque'} {'Osira' 'Decay'} {'Titania' 'Decay'} {'Osira' 'Margaret_Love'} {'Lady_Shiva' 'Poundcakes'} {'Fake_Thomas_Jefferson' 'Black_Mamba'} {'Mist' 'Genevieve_Savidge'} {'Lady_Shiva' 'Duela_Dent'} {'Mist' 'Maxima'} {'Mai_Shen' 'Amazing_Grace'} {'Mai_Shen' 'Black_Mamba'} {'Yellowjacket' 'Black_Mamba'} {'Princess_Python' 'Silver_Banshee'} {'Queen_Bee' 'Hypnota'} {'Madame_Rouge' 'Duela_Dent'} {'Lady_Vic' 'Hypnota'} {'Queen_Of_Fables' 'Poundcakes'} {'Lady_Death' 'Purgatori'} {'Lady_Death' 'Spider_Girl'} {'Plastique' 'Trinity'} {'Tigress' 'Genevieve_Savidge'} {'Titania' 'Silver_Banshee'} {'Tigress' 'Amazing_Grace'} {'Plastique' 'Duela_Dent'} {'Lady_Shiva' 'Madame_Masque'} {'Yellowjacket' 'Evinlea'} {'Lady_Death' 'Margaret_Love'} {'Titania' 'Amy_Madison'} {'Ursa' 'Poundcakes'} {'Madame_Rouge' 'Maxima'} {'Lady_Death' 'Southpaw'} {'Mothergod' 'Hypnota'} {'Princess_Python' 'Margaret_Love'} {'Mai_Shen' 'Duela_Dent'} {'Ursa' 'Duela_Dent'} {'Mist' 'Black_Mamba'} {'Mist' 'Nyssa_Raatko'} {'Plastique' 'Southpaw'} {'Lady_Vic' 'Nyssa_Raatko'} {'Queen_Bee' 'Jason_Kreis'} {'Plastique' 'Decay'} {'Unicron' 'Margaret_Love'} {'Prank' 'Spider_Girl'} {'Ursa' 'Madame_Masque'} {'Prank' 'Genevieve_Savidge'} {'Plastique' 'Spider_Girl'} {'Fake_Thomas_Jefferson' 'Hypnota'} {'Queen_Bee' 'Evinlea'} {'Ursa' 'Nyssa_Raatko'} {'Queen_Of_Fables' 'Nyssa_Raatko'} {'Tigress' 'Purgatori'} {'Princess_Python' 'Jason_Kreis'} {'Madame_Rouge' 'Purgatori'} {'Queen_Bee' 'Southpaw'} {'Madame_Rouge' 'Amy_Madison'} {'Queen_Of_Fables' 'Margaret_Love'} {'Queen_Bee' 'Duela_Dent'} {'Madame_Rouge' 'Genevieve_Savidge'} {'Unicron' 'Cyborgirl'} {'Ursa' 'Evinlea'} {'Titania' 'Maxima'} {'Mothergod' 'Trinity'} {'Princess_Python' 'Purgatori'} {'Ursa' 'Silver_Banshee'} {'Queen_Of_Fables' 'Amazing_Grace'} {'Fake_Thomas_Jefferson' 'Amy_Madison'} {'Queen_Bee' 'Amazing_Grace'} {'Osira' 'Jason_Kreis'} {'Tigress' 'Duela_Dent'} {'Queen_Of_Fables' 'Black_Mamba'} {'Osira' 'Southpaw'} {'Yellowjacket' 'Plastique'} {'Lady_Death' 'Duela_Dent'} {'Mai_Shen' 'Margaret_Love'} {'Mothergod' 'Genevieve_Savidge'} {'Lady_Shiva' 'Hypnota'} {'Roulette' 'Cyborgirl'} {'Tigress' 'Trinity'} {'Ursa' 'Cyborgirl'} {'Mothergod' 'Poundcakes'} {'Fake_Thomas_Jefferson' 'Amazing_Grace'} {'Madame_Rouge' 'Margaret_Love'} {'Unicron' 'Evinlea'} {'Plastique' 'Amy_Madison'} {'Lady_Death' 'Hypnota'} {'Roulette' 'Black_Mamba'} {'Unicron' 'Amazing_Grace'} {'Lady_Vic' 'Maxima'} {'Prank' 'Madame_Masque'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Magpie' 'White_Rabbit'} {'Jinx' 'Silk_Fever'} {'Golden_Glider' 'Plastique'} {'Queen_Bee' 'Mist'} {'Jinx' 'Valentina'} {'Princess_Python' 'Lady_Quark'} {'Golddigger' 'White_Rabbit'} {'Golddigger' 'Mist'} {'Poison_Ivy' 'Purgatori'} {'The_Crimson_Ghost' 'Osira'} {'Queen_Bee' 'Yellowjacket'} {'Poundcakes' 'Lady_Death'} {'Golden_Glider' 'White_Rabbit'} {'Lady_Shiva' 'Osira'} {'Margaret_Love' 'Lady_Death'} {'Magpie' 'Lazara'} {'Queen_Bee' 'Ursa'} {'Poundcakes' 'Harley_Quinn'} {'Leather' 'Lady_Quark'} {'Rad' 'Scandal'} {'Golddigger' 'Osira'} {'Magpie' 'Mist'} {'Magpie' 'Jinx'} {'Leather' 'Lazara'} {'Snapdragon' 'King_Ghidorah'} {'Maxima' 'King_Ghidorah'} {'Magpie' 'Spider_Girl'} {'Snapdragon' 'Harley_Quinn'} {'Poundcakes' 'Livewire'} {'Snapdragon' 'Gru'} {'Jinx' 'Spider_Girl'} {'Rad' 'Gru'} {'Jinx' 'Mist'} {'The_Crimson_Ghost' 'Valentina'} {'The_Crimson_Ghost' 'Livewire'} {'New_Wave' 'Plastique'} {'Princess_Python' 'Deuce'} {'Snapdragon' 'Spider_Girl'} {'The_Lightning' 'Mist'} {'Ingra' 'Jason_Kreis'} {'Golden_Glider' 'Silk_Fever'} {'New_Wave' 'Mist'} {'Poison_Ivy' 'Silk_Fever'} {'Jewelee' 'White_Rabbit'} {'Golddigger' 'Lady_Death'} {'Margaret_Love' 'Jason_Kreis'} {'Poison_Ivy' 'Mist'} {'Margaret_Love' 'Yellowjacket'} {'Rampage' 'Jason_Kreis'} {'Maxima' 'Spider_Girl'} {'Rampage' 'Scandal'} {'Rampage' 'Lady_Quark'} {'New_Wave' 'White_Rabbit'} {'Lady_Shiva' 'Spider_Girl'} {'Lady_Shiva' 'Purgatori'} {'Poison_Ivy' 'Valentina'} {'Jewelee' 'Lady_Death'} {'Ingra' 'Harley_Quinn'} {'Princess_Python' 'Yellowjacket'} {'Lady_Shiva' 'Deuce'} {'Jewelee' 'Lady_Quark'} {'Rad' 'Lazara'} {'Rad' 'Osira'} {'Maxima' 'Scandal'} {'The_Lightning' 'Yellowjacket'} {'Magpie' 'Jason_Kreis'} {'Queen_Bee' 'Purgatori'} {'Princess_Python' 'Ursa'} {'New_Wave' 'Deuce'} {'Rampage' 'Ursa'} {'The_Crimson_Ghost' 'Lazara'} {'Magpie' 'King_Ghidorah'} {'Maxima' 'Mist'} {'Ingra' 'Purgatori'} {'Ingra' 'Scandal'} {'Golden_Glider' 'Deuce'} {'Poison_Ivy' 'Plastique'} {'Rad' 'Silk_Fever'} {'Jewelee' 'King_Ghidorah'} {'Queen_Bee' 'Scandal'} {'Golddigger' 'Livewire'} {'Maxima' 'Ursa'} {'Leather' 'Mist'} {'The_Lightning' 'Deuce'} {'Golddigger' 'Purgatori'} {'New_Wave' 'Gru'} {'Lady_Shiva' 'Plastique'} {'Leather' 'Spider_Girl'} {'Poison_Ivy' 'King_Ghidorah'} {'Golddigger' 'Yellowjacket'} {'Margaret_Love' 'Spider_Girl'} {'Ingra' 'Lady_Death'} {'Lady_Shiva' 'Silk_Fever'} {'Margaret_Love' 'Mist'} {'Jinx' 'White_Rabbit'} {'Ingra' 'Spider_Girl'} {'Maxima' 'Harley_Quinn'} {'Lady_Shiva' 'Harley_Quinn'} {'Poison_Ivy' 'Spider_Girl'} {'The_Crimson_Ghost' 'King_Ghidorah'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Decay' 'Typhoid_Mary'} {'Saturn_Queen' 'Silver_Banshee'} {'Golden_Glider' 'The_Lightning'} {'Blue_Snowman' 'Margaret_Love'} {'Amazing_Grace' 'Magpie'} {'Spider_Girl' 'Genevieve_Savidge'} {'Princess_Python' 'Bombshell'} {'Roulette' 'Golddigger'} {'Syndrome' 'Silk_Fever'} {'Roulette' 'Margaret_Love'} {'Syndrome' 'Lady_Clay'} {'Prank' 'Jewelee'} {'Plastique' 'Magenta'} {'Trinity' 'Nyssa_Raatko'} {'Golden_Glider' 'Lafety_Le_Fei'} {'Spider_Girl' 'Jewelee'} {'Queen_Clea' 'Magenta'} {'Roulette' 'Typhoid_Mary'} {'Poundcakes' 'Silk_Fever'} {'Prank' 'Typhoid_Mary'} {'Amy_Madison' 'Titania'} {'Poundcakes' 'Magenta'} {'Syndrome' 'Rad'} {'Ursa' 'Genevieve_Savidge'} {'Blue_Snowman' 'Nyssa_Raatko'} {'Trinity' 'Margaret_Love'} {'Madame_Masque' 'Magpie'} {'Amy_Madison' 'Margaret_Love'} {'Amy_Madison' 'Genevieve_Savidge'} {'Saturn_Queen' 'Lafety_Le_Fei'} {'Plastique' 'Jewelee'} {'Blue_Snowman' 'Genevieve_Savidge'} {'Amy_Madison' 'Silver_Banshee'} {'Amazing_Grace' 'Lady_Death'} {'Princess_Python' 'Sun_Girl'} {'Blue_Snowman' 'Jewelee'} {'Blue_Snowman' 'Rad'} {'Queen_Of_Fables' 'Magenta'} {'Amy_Madison' 'Lady_Death'} {'Madame_Masque' 'The_Lightning'} {'Unicron' 'Lady_Clay'} {'Trinity' 'Lafety_Le_Fei'} {'Decay' 'Lady_Death'} {'Princess_Python' 'Nyssa_Raatko'} {'Trinity' 'Leather'} {'Lotso' 'Leather'} {'Amazing_Grace' 'Golddigger'} {'Madame_Masque' 'Leather'} {'Plastique' 'Silk_Fever'} {'Decay' 'Silk_Fever'} {'Lotso' 'Queen_Bee'} {'Amy_Madison' 'Nyssa_Raatko'} {'Prank' 'Magenta'} {'Queen_Clea' 'Magpie'} {'Queen_Of_Fables' 'Lafety_Le_Fei'} {'Trinity' 'Magenta'} {'Unicron' 'Bombshell'} {'Ursa' 'Sun_Girl'} {'Blue_Snowman' 'Typhoid_Mary'} {'Amazing_Grace' 'Lafety_Le_Fei'} {'Madame_Masque' 'Silver_Banshee'} {'Spider_Girl' 'Typhoid_Mary'} {'Ursa' 'Silk_Fever'} {'Poundcakes' 'Jewelee'} {'Queen_Of_Fables' 'Golddigger'} {'Unicron' 'Genevieve_Savidge'} {'Prank' 'Nyssa_Raatko'} {'Amy_Madison' 'The_Lightning'} {'Saturn_Queen' 'Silk_Fever'} {'Amy_Madison' 'Lafety_Le_Fei'} {'Roulette' 'Sun_Girl'} {'Ursa' 'Magpie'} {'Decay' 'Leather'} {'Golden_Glider' 'Lady_Death'} {'Queen_Clea' 'Leather'} {'Trinity' 'Bombshell'} {'Ursa' 'Lady_Clay'} {'Golden_Glider' 'Typhoid_Mary'} {'Trinity' 'Genevieve_Savidge'} {'Roulette' 'Leather'} {'Ursa' 'Rad'} {'Queen_Of_Fables' 'Genevieve_Savidge'} {'Roulette' 'Silver_Banshee'} {'Plastique' 'Margaret_Love'} {'Syndrome' 'Genevieve_Savidge'} {'Syndrome' 'Silver_Banshee'} {'Golden_Glider' 'Silk_Fever'} {'Prank' 'Titania'} {'Golden_Glider' 'Nyssa_Raatko'} {'Amy_Madison' 'Silk_Fever'} {'Trinity' 'Golddigger'} {'Plastique' 'Lady_Clay'} {'Amazing_Grace' 'Queen_Bee'} {'Unicron' 'The_Lightning'} {'Poundcakes' 'Bombshell'} {'Madame_Masque' 'Lafety_Le_Fei'} {'Saturn_Queen' 'Margaret_Love'} {'Princess_Python' 'Queen_Bee'} {'Ursa' 'Jewelee'} {'Queen_Of_Fables' 'Titania'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lady_Quark' 'Madame_Masque'} {'Coachwhip' 'Lady_Quark'} {'Lady_Clay' 'Coachwhip'} {'Madame_Masque' 'Southpaw'} {'Talia_Al_Ghul' 'Lady_Clay'} {'Southpaw' 'Talia_Al_Ghul'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Gru' 'Prank'} {'Lady_Shiva' 'Spider_Girl'} {'Gru' 'Spider_Girl'} {'Lady_Shiva' 'Prank'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Bee' 'Professor_Padraic_Ratigan'} {'Lagomorph' 'Gru'} {'White_Rabbit' 'Zaladane'} {'Lagomorph' 'Madame_Masque'} {'Unicron' 'Lady_Quark'} {'Unicron' 'Zaladane'} {'Saturn_Queen' 'Fake_Thomas_Jefferson'} {'Mephista' 'Professor_Padraic_Ratigan'} {'Silver_Swan' 'Madame_Rouge'} {'Mephista' 'Lafety_Le_Fei'} {'Lashina' 'Hypnota'} {'Saturn_Queen' 'Hypnota'} {'Golden_Glider' 'Fake_Thomas_Jefferson'} {'Madame_Masque' 'Typhoid_Mary'} {'Black_Mamba' 'Plastique'} {'Lagomorph' 'Rampage'} {'Tala' 'Prank'} {'Black_Mamba' 'Animora'} {'Queen_Bee' 'Hypnota'} {'Black_Mamba' 'Rampage'} {'Lady_Vic' 'Hypnota'} {'Mephista' 'Gru'} {'Roulette' 'Superwoman'} {'Unicron' 'Bombshell'} {'Southpaw' 'Madame_Rouge'} {'Queen_Bee' 'Zaladane'} {'Black_Mamba' 'Golddigger'} {'Deuce' 'Bombshell'} {'Southpaw' 'Rampage'} {'Queen_Bee' 'Madame_Rouge'} {'Lady_Vic' 'Lafety_Le_Fei'} {'Lashina' 'Typhoid_Mary'} {'White_Rabbit' 'Dansen_Macabre'} {'Mephista' 'Rampage'} {'Deuce' 'Superwoman'} {'Madame_Masque' 'Queen_Of_Fables'} {'Trinity' 'Fake_Thomas_Jefferson'} {'Roulette' 'Valentina'} {'Silver_Swan' 'Lady_Quark'} {'The_Lightning' 'Bombshell'} {'Lady_Vic' 'Zaladane'} {'The_Lightning' 'Animora'} {'Queen_Bee' 'Fake_Thomas_Jefferson'} {'Silver_Swan' 'Plastique'} {'Lagomorph' 'Professor_Padraic_Ratigan'} {'Tala' 'Animora'} {'Mephista' 'Animora'} {'Madame_Masque' 'Superwoman'} {'Tala' 'Typhoid_Mary'} {'Mephista' 'Valentina'} {'Roulette' 'Zaladane'} {'Southpaw' 'Professor_Padraic_Ratigan'} {'The_Lightning' 'Superwoman'} {'Trinity' 'Plastique'} {'Golden_Glider' 'Madame_Rouge'} {'Titania' 'Rampage'} {'Deuce' 'Professor_Padraic_Ratigan'} {'Deuce' 'Lady_Quark'} {'Madame_Masque' 'Golddigger'} {'Tala' 'Bombshell'} {'Madame_Masque' 'Prank'} {'Deuce' 'Madame_Rouge'} {'Mephista' 'Dansen_Macabre'} {'Lagomorph' 'Mai_Shen'} {'Southpaw' 'Gru'} {'Silver_Swan' 'Typhoid_Mary'} {'Saturn_Queen' 'Superwoman'} {'White_Rabbit' 'Queen_Of_Fables'} {'Golden_Glider' 'Mai_Shen'} {'Golden_Glider' 'Lafety_Le_Fei'} {'The_Lightning' 'Gru'} {'Lady_Vic' 'Golddigger'} {'Madame_Masque' 'Fake_Thomas_Jefferson'} {'King_Ghidorah' 'Prank'} {'Black_Mamba' 'Fake_Thomas_Jefferson'} {'Trinity' 'Lady_Quark'} {'Tala' 'Madame_Rouge'} {'King_Ghidorah' 'Hypnota'} {'Tala' 'Plastique'} {'Golden_Glider' 'Gru'} {'Mephista' 'Golddigger'} {'The_Lightning' 'Fake_Thomas_Jefferson'} {'Roulette' 'Dansen_Macabre'} {'Queen_Bee' 'Animora'} {'Titania' 'Animora'} {'Black_Mamba' 'Gru'} {'Silver_Swan' 'Hypnota'} {'Saturn_Queen' 'Queen_Of_Fables'} {'The_Lightning' 'Prank'} {'Titania' 'Dansen_Macabre'} {'Southpaw' 'Golddigger'} {'The_Lightning' 'Queen_Of_Fables'} {'Trinity' 'Valentina'} {'Trinity' 'Hypnota'} {'Silver_Swan' 'Valentina'} {'Black_Mamba' 'Lafety_Le_Fei'} {'King_Ghidorah' 'Plastique'} {'Queen_Bee' 'Prank'} {'Unicron' 'Superwoman'} {'Deuce' 'Dansen_Macabre'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Windfall'} {'Syndrome' 'Queen_Bee'} {'Dr_Horrible' 'Mai_Shen'} {'Windfall' 'Animora'} {'New_Wave' 'Dr_Horrible'} {'Animora' 'Syndrome'} {'Queen_Bee' 'New_Wave'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Unicron' 'Shiv'} {'Titania' 'Magpie'} {'Queen_Of_Fables' 'Superwoman'} {'Roulette' 'Amazing_Grace'} {'Queen_Of_Fables' 'Princess_Python'} {'Dansen_Macabre' 'Mai_Shen'} {'Madame_Rouge' 'Scandal'} {'Ingra' 'Fury_Leika'} {'Harley_Quinn' 'Emerald_Empress'} {'Fem_Paragon' 'Shiv'} {'Dead_Bowie' 'Star_Sapphire'} {'Gru' 'Abominatrix'} {'Mist' 'Abominatrix'} {'Titania' 'Superwoman'} {'Southpaw' 'Star_Sapphire'} {'Asbestos_Lady' 'Superwoman'} {'Madame_Rouge' 'Star_Sapphire'} {'Margaret_Love' 'Scandal'} {'Dead_Bowie' 'Lady_Death'} {'Ingra' 'Blue_Snowman'} {'Titania' 'Star_Sapphire'} {'Unicron' 'Superwoman'} {'Mothergod' 'Fury_Leika'} {'Asbestos_Lady' 'Scandal'} {'Dansen_Macabre' 'Scandal'} {'Ingra' 'Magpie'} {'Gru' 'Lady_Clay'} {'Harley_Quinn' 'Lady_Death'} {'Southpaw' 'Amazing_Grace'} {'Gru' 'Nyssa_Raatko'} {'Gru' 'Plastique'} {'Unicron' 'Spider_Girl'} {'Madame_Rouge' 'Princess_Python'} {'Jinx' 'Magpie'} {'Mist' 'Plastique'} {'Margaret_Love' 'Dr_Evil'} {'Coachwhip' 'Typhoid_Mary'} {'Ingra' 'Dr_Horrible'} {'Dead_Bowie' 'Mai_Shen'} {'Jinx' 'Lady_Clay'} {'Fem_Paragon' 'Lady_Clay'} {'Unicron' 'Scandal'} {'Mist' 'Fury_Leika'} {'Jinx' 'Amazing_Grace'} {'Madame_Rouge' 'Emerald_Empress'} {'Bombshell' 'Nyssa_Raatko'} {'Mothergod' 'Blue_Snowman'} {'Deuce' 'Typhoid_Mary'} {'Madame_Rouge' 'Superwoman'} {'Mothergod' 'Star_Sapphire'} {'Roulette' 'Shiv'} {'Asbestos_Lady' 'Amazing_Grace'} {'Dead_Bowie' 'Abominatrix'} {'Harley_Quinn' 'Dr_Horrible'} {'Gru' 'Superwoman'} {'Queen_Of_Fables' 'Blue_Snowman'} {'Southpaw' 'Dr_Evil'} {'Fem_Paragon' 'Spider_Girl'} {'Queen_Of_Fables' 'Typhoid_Mary'} {'Bombshell' 'Superwoman'} {'Queen_Of_Fables' 'Amazing_Grace'} {'Coachwhip' 'Spider_Girl'} {'Jinx' 'Nyssa_Raatko'} {'Titania' 'Lady_Clay'} {'Madame_Rouge' 'Fury_Leika'} {'Dansen_Macabre' 'Spider_Girl'} {'Jinx' 'Shiv'} {'Titania' 'Fury_Leika'} {'Fem_Paragon' 'Emerald_Empress'} {'Bombshell' 'Mai_Shen'} {'Harley_Quinn' 'Shiv'} {'Dead_Bowie' 'Lady_Clay'} {'Mothergod' 'Spider_Girl'} {'Southpaw' 'Plastique'} {'Southpaw' 'Magpie'} {'Fem_Paragon' 'Superwoman'} {'Bombshell' 'Amazing_Grace'} {'Ingra' 'Typhoid_Mary'} {'Asbestos_Lady' 'Fury_Leika'} {'Dead_Bowie' 'Blue_Snowman'} {'Southpaw' 'Mai_Shen'} {'Roulette' 'Lady_Clay'} {'Margaret_Love' 'Dr_Horrible'} {'Mist' 'Lady_Death'} {'Deuce' 'Emerald_Empress'} {'Deuce' 'Nyssa_Raatko'} {'Titania' 'Blue_Snowman'} {'Mothergod' 'Amazing_Grace'} {'Roulette' 'Fury_Leika'} {'Madame_Rouge' 'Typhoid_Mary'} {'Mist' 'Superwoman'} {'Dead_Bowie' 'Magpie'} {'Coachwhip' 'Princess_Python'} {'Deuce' 'Lady_Death'} {'Harley_Quinn' 'Mai_Shen'} {'Bombshell' 'Scandal'} {'Madame_Rouge' 'Amazing_Grace'} {'Ingra' 'Nyssa_Raatko'} {'Margaret_Love' 'Abominatrix'} {'Margaret_Love' 'Fury_Leika'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Leather'} {'Syndrome' 'Genevieve_Savidge'} {'Dansen_Macabre' 'Leather'} {'Decay' 'Queen_Bee'} {'Decay' 'Queen_Of_Fables'} {'Lady_Death' 'Queen_Bee'} {'King_Ghidorah' 'Queen_Bee'} {'Professor_Padraic_Ratigan' 'Genevieve_Savidge'} {'Syndrome' 'Harley_Quinn'} {'Syndrome' 'Queen_Of_Fables'} {'Lady_Shiva' 'Golddigger'} {'Syndrome' 'Spider_Girl'} {'Lady_Death' 'Ingra'} {'Poundcakes' 'Queen_Of_Fables'} {'Saturn_Queen' 'Harley_Quinn'} {'Gru' 'Ingra'} {'Professor_Padraic_Ratigan' 'Cyborgirl'} {'Shimmer' 'Osira'} {'Zaladane' 'Talia_Al_Ghul'} {'Lady_Shiva' 'Genevieve_Savidge'} {'Typhoid_Mary' 'Queen_Of_Fables'} {'Syndrome' 'Cyborgirl'} {'Professor_Padraic_Ratigan' 'Osira'} {'Dr_Evil' 'Fem_Paragon'} {'Zaladane' 'Southpaw'} {'Madame_Masque' 'Queen_Bee'} {'Shimmer' 'Deuce'} {'King_Ghidorah' 'Leather'} {'King_Ghidorah' 'Spider_Girl'} {'Gru' 'Golddigger'} {'Duela_Dent' 'Deuce'} {'Madame_Masque' 'Cyborgirl'} {'Scandal' 'Queen_Of_Fables'} {'Dr_Evil' 'Golddigger'} {'Gru' 'Fem_Paragon'} {'Decay' 'Cyborgirl'} {'Windfall' 'Spider_Girl'} {'Scandal' 'Decay'} {'Duela_Dent' 'Ingra'} {'Gru' 'White_Rabbit'} {'Scandal' 'Amazing_Grace'} {'Syndrome' 'Plastique'} {'Mist' 'Queen_Of_Fables'} {'Poundcakes' 'Cyborgirl'} {'Gru' 'Harley_Quinn'} {'Shimmer' 'Southpaw'} {'Duela_Dent' 'Plastique'} {'Poundcakes' 'Deuce'} {'Saturn_Queen' 'Queen_Of_Fables'} {'Mist' 'Maxima'} {'Mist' 'Dead_Bowie'} {'Lady_Death' 'Golddigger'} {'Decay' 'Fem_Paragon'} {'Star_Sapphire' 'Dead_Bowie'} {'Shimmer' 'Cyborgirl'} {'Shimmer' 'Ingra'} {'Lady_Death' 'Emerald_Empress'} {'Saturn_Queen' 'Ingra'} {'Poundcakes' 'Ingra'} {'Saturn_Queen' 'White_Rabbit'} {'Windfall' 'Osira'} {'Dr_Evil' 'White_Rabbit'} {'Madame_Masque' 'Spider_Girl'} {'Mist' 'Leather'} {'Madame_Masque' 'Osira'} {'King_Ghidorah' 'Fem_Paragon'} {'Duela_Dent' 'Golddigger'} {'Typhoid_Mary' 'Emerald_Empress'} {'Decay' 'Maxima'} {'Star_Sapphire' 'White_Rabbit'} {'Lady_Shiva' 'Plastique'} {'Typhoid_Mary' 'Spider_Girl'} {'Scandal' 'Deuce'} {'Dr_Evil' 'Ingra'} {'Dansen_Macabre' 'Ingra'} {'Windfall' 'Dead_Bowie'} {'Windfall' 'Southpaw'} {'Shimmer' 'Emerald_Empress'} {'Saturn_Queen' 'Emerald_Empress'} {'Dansen_Macabre' 'Osira'} {'Scandal' 'Southpaw'} {'Shimmer' 'Maxima'} {'Zaladane' 'Spider_Girl'} {'Gru' 'Talia_Al_Ghul'} {'Scandal' 'Spider_Girl'} {'Poundcakes' 'Fem_Paragon'} {'King_Ghidorah' 'Dead_Bowie'} {'Duela_Dent' 'White_Rabbit'} {'Windfall' 'Amazing_Grace'} {'Scandal' 'Fem_Paragon'} {'Dansen_Macabre' 'Maxima'} {'Star_Sapphire' 'Amazing_Grace'} {'Duela_Dent' 'Emerald_Empress'} {'Syndrome' 'Fem_Paragon'} {'Syndrome' 'Talia_Al_Ghul'} {'Saturn_Queen' 'Dead_Bowie'} {'Gru' 'Queen_Bee'} {'Typhoid_Mary' 'Southpaw'} {'Windfall' 'Talia_Al_Ghul'} {'Mist' 'Talia_Al_Ghul'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mephista' 'Mothergod'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\ntoc","published":true,"deleted":false,"likes_count":1,"comments_count":5,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":"2013-09-19T23:15:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-19T00:46:39.000Z","updated_at":"2013-09-19T23:26:45.000Z","published_at":"2013-09-19T01:43:50.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/2933486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Bad Horse\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e 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.\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 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.\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 conflicted name pairs (cell array of pairs of names)\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 TF (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 11 minutes, 707 out of 776 correct\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\"}]}"},{"id":1881,"title":"GJam 2013 China Event: Happy Teams","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p0 GJam 2013 China Bad Horse\u003e. The problem is codified using a cell array of names.\r\n\r\nThe 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. \r\n\r\n*Input:* conflicted name pairs  (cell array of pairs of names)\r\n\r\n*Output:* TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\r\n\r\n*Competition Summary:* Best Time of 9 minutes, 789 out of 1984 correct\r\n\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p0\"\u003eGJam 2013 China Bad Horse\u003c/a\u003e. The problem is codified using a cell array of names.\u003c/p\u003e\u003cp\u003eThe 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.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e conflicted name pairs  (cell array of pairs of names)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e Best Time of 9 minutes, 789 out of 1984 correct\u003c/p\u003e","function_template":"function TF=Make_Teams(names)\r\n% names is an array of cell arrays   \r\n% N columns of {1x2 cell}\r\n TF=0;\r\nend","test_suite":"%%\r\ntic\r\nnames={{'Dead_Bowie' 'Nyssa_Raatko'} {'Animora' 'Lafety_Le_Fei'} {'Animora' 'Mothergod'} {'Animora' 'Nyssa_Raatko'} {'Dead_Bowie' 'Genevieve_Savidge'} {'Dead_Bowie' 'Lafety_Le_Fei'} {'Animora' 'Genevieve_Savidge'} {'Dead_Bowie' 'Mothergod'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mephista' 'New_Wave'} {'Mephista' 'Ursa'} {'Zaladane' 'Mai_Shen'} {'Mephista' 'Mai_Shen'} {'White_Rabbit' 'Hypnota'} {'White_Rabbit' 'New_Wave'} {'Ursa' 'Scandal'} {'Zaladane' 'New_Wave'} {'Ursa' 'Hypnota'} {'Zaladane' 'Scandal'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Spider_Girl' 'Blue_Snowman'} {'Blue_Snowman' 'Roulette'} {'Roulette' 'Spider_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Magenta' 'Golden_Glider'} {'Tala' 'Mothergod'} {'The_Lightning' 'Shiv'} {'The_Lightning' 'Prank'} {'Magenta' 'Shiv'} {'Tala' 'Prank'} {'Trinity' 'Golden_Glider'} {'Magenta' 'Prank'} {'The_Lightning' 'Mothergod'} {'Trinity' 'Mothergod'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'The_Lightning' 'Star_Sapphire'} {'Unicron' 'Queen_Of_Fables'} {'Unicron' 'Dead_Bowie'} {'Lady_Quark' 'Fury_Leika'} {'Lady_Quark' 'Star_Sapphire'} {'The_Lightning' 'Dead_Bowie'} {'Asbestos_Lady' 'Queen_Of_Fables'} {'Unicron' 'Lady_Quark'} {'Asbestos_Lady' 'Star_Sapphire'} {'The_Lightning' 'Fury_Leika'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Scandal'} {'Lashina' 'King_Ghidorah'} {'Doctor_Cyber' 'Tala'} {'Lashina' 'Evinlea'} {'Dr_Evil' 'Tala'} {'Zaladane' 'King_Ghidorah'} {'Doctor_Cyber' 'Evinlea'} {'Doctor_Cyber' 'King_Ghidorah'} {'Dr_Evil' 'Scandal'} {'Lashina' 'Scandal'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Bombshell' 'Rampage'} {'Deuce' 'Ursa'} {'Bombshell' 'Ursa'} {'Lady_Octopus' 'Rampage'} {'Doctor_Cyber' 'Black_Mamba'} {'Deuce' 'Madame_Rouge'} {'Doctor_Cyber' 'Rampage'} {'Lady_Octopus' 'Madame_Rouge'} {'Doctor_Cyber' 'Madame_Rouge'} {'Lady_Octopus' 'Black_Mamba'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Cyborgirl' 'Fury_Leika'} {'Asbestos_Lady' 'Margaret_Love'} {'Amazing_Grace' 'Fury_Leika'} {'Cyborgirl' 'Hypnota'} {'Duela_Dent' 'Amazing_Grace'} {'Duela_Dent' 'Hypnota'} {'Amazing_Grace' 'Margaret_Love'} {'Duela_Dent' 'Mephista'} {'Duela_Dent' 'Fury_Leika'} {'Asbestos_Lady' 'Mephista'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jason_Kreis' 'Poundcakes'} {'Margaret_Love' 'Star_Sapphire'} {'Snapdragon' 'Ingra'} {'Snapdragon' 'Poundcakes'} {'Snapdragon' 'Star_Sapphire'} {'Dead_Bowie' 'Star_Sapphire'} {'Jason_Kreis' 'Ingra'} {'Dead_Bowie' 'Rampage'} {'Dead_Bowie' 'Poundcakes'} {'Margaret_Love' 'Rampage'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lazara' 'Southpaw'} {'Dansen_Macabre' 'Jewelee'} {'Lazara' 'Amazing_Grace'} {'Osira' 'Amazing_Grace'} {'Osira' 'Coachwhip'} {'Coachwhip' 'Princess_Python'} {'Dansen_Macabre' 'Princess_Python'} {'Coachwhip' 'Southpaw'} {'Osira' 'Princess_Python'} {'Osira' 'Jewelee'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lashina' 'Trinity'} {'Lashina' 'Mephista'} {'Lashina' 'Shiv'} {'Lashina' 'Dr_Evil'} {'Lashina' 'Fem_Paragon'} {'Lashina' 'King_Ghidorah'} {'Lashina' 'The_Lightning'} {'Lashina' 'Syndrome'} {'Lashina' 'Margaret_Love'} {'Lashina' 'Lady_Octopus'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lotso' 'Snapdragon'} {'Animora' 'Silver_Swan'} {'Devastation' 'Animora'} {'Snapdragon' 'Devastation'} {'Silver_Swan' 'Lotso'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Spider_Girl' 'Livewire'} {'Jason_Kreis' 'Trinity'} {'Spider_Girl' 'Syndrome'} {'Jason_Kreis' 'Livewire'} {'Harley_Quinn' 'Livewire'} {'Spider_Girl' 'Coachwhip'} {'Lady_Octopus' 'Coachwhip'} {'Lady_Octopus' 'Syndrome'} {'Harley_Quinn' 'Coachwhip'} {'Spider_Girl' 'Trinity'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Swan' 'Windfall'} {'Silver_Swan' 'Poison_Ivy'} {'Lafety_Le_Fei' 'Poison_Ivy'} {'Lafety_Le_Fei' 'Windfall'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Livewire' 'Titania'} {'Livewire' 'Abominatrix'} {'Shiv' 'Ursa'} {'Shiv' 'Abominatrix'} {'Princess_Python' 'Abominatrix'} {'Silk_Fever' 'Abominatrix'} {'Livewire' 'Ursa'} {'Princess_Python' 'Titania'} {'Princess_Python' 'Poundcakes'} {'Silk_Fever' 'Poundcakes'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Fem_Paragon' 'Amy_Madison'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Dr_Evil'} {'Lady_Vic' 'Amy_Madison'} {'Lady_Octopus' 'Ursa'} {'Lafety_Le_Fei' 'Shiv'} {'Princess_Python' 'Amy_Madison'} {'Princess_Python' 'Shiv'} {'Lafety_Le_Fei' 'Ursa'} {'Lafety_Le_Fei' 'Amy_Madison'} {'Lady_Octopus' 'Dr_Evil'} {'Lady_Vic' 'Dr_Evil'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Of_Fables' 'Magenta'} {'Genevieve_Savidge' 'Magenta'} {'Spider_Girl' 'Black_Mamba'} {'Spider_Girl' 'Lady_Shiva'} {'Jinx' 'Lady_Shiva'} {'Spider_Girl' 'Mist'} {'Genevieve_Savidge' 'Lady_Shiva'} {'Jinx' 'Black_Mamba'} {'Genevieve_Savidge' 'Mist'} {'Queen_Of_Fables' 'Black_Mamba'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Titania' 'Saturn_Queen'} {'Lafety_Le_Fei' 'Saturn_Queen'} {'Lafety_Le_Fei' 'Tigress'} {'Titania' 'Tigress'} {'Golddigger' 'Tigress'} {'Titania' 'Tala'} {'Lafety_Le_Fei' 'Tala'} {'Golddigger' 'Tala'} {'Golddigger' 'Saturn_Queen'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Roulette' 'Livewire'} {'Roulette' 'Mai_Shen'} {'Shiv' 'Bombshell'} {'Ursa' 'Bombshell'} {'Ursa' 'Livewire'} {'Shiv' 'Doctor_Cyber'} {'Roulette' 'Bombshell'} {'Blue_Snowman' 'Mai_Shen'} {'Ursa' 'Doctor_Cyber'} {'Blue_Snowman' 'Livewire'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Duela_Dent'} {'Cyborgirl' 'Lafety_Le_Fei'} {'Cyborgirl' 'Duela_Dent'} {'Black_Mamba' 'Unicron'} {'Lady_Death' 'Duela_Dent'} {'Zaladane' 'Cyborgirl'} {'Cyborgirl' 'Devastation'} {'Lady_Death' 'Lafety_Le_Fei'} {'Black_Mamba' 'Devastation'} {'Zaladane' 'Unicron'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Rad' 'Jason_Kreis'} {'Emerald_Empress' 'Lady_Vic'} {'Rad' 'Magenta'} {'Lagomorph' 'Jason_Kreis'} {'Lagomorph' 'Lady_Vic'} {'Lagomorph' 'Magenta'} {'Lagomorph' 'Lady_Quark'} {'Emerald_Empress' 'Genevieve_Savidge'} {'Lady_Quark' 'Genevieve_Savidge'} {'Lady_Quark' 'Jason_Kreis'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Golden_Glider' 'Lady_Clay'} {'Golden_Glider' 'Titania'} {'Lady_Clay' 'Lashina'} {'Lady_Clay' 'Titania'} {'Black_Mamba' 'Lashina'} {'Lady_Clay' 'Lady_Octopus'} {'Maxima' 'Lady_Octopus'} {'Maxima' 'Titania'} {'Black_Mamba' 'Decay'} {'Golden_Glider' 'Decay'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Fem_Paragon'} {'Abominatrix' 'Fem_Paragon'} {'Lady_Quark' 'Princess_Python'} {'The_Crimson_Ghost' 'Ingra'} {'Abominatrix' 'Jinx'} {'Lady_Quark' 'Rampage'} {'Abominatrix' 'Rampage'} {'Princess_Python' 'Jinx'} {'The_Crimson_Ghost' 'Jinx'} {'Lady_Quark' 'Ingra'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dr_Horrible' 'Ingra'} {'Dr_Horrible' 'Sun_Girl'} {'Prank' 'Duela_Dent'} {'Valentina' 'Duela_Dent'} {'Prank' 'Ingra'} {'Lazara' 'Tigress'} {'Lazara' 'Ingra'} {'Lazara' 'Sun_Girl'} {'Valentina' 'Tigress'} {'Valentina' 'Dr_Horrible'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dansen_Macabre' 'Jewelee'} {'Sun_Girl' 'Jewelee'} {'Lady_Shiva' 'Trinity'} {'Lady_Shiva' 'Ursa'} {'Poison_Ivy' 'Jewelee'} {'Dansen_Macabre' 'Ursa'} {'Poison_Ivy' 'Shimmer'} {'Poison_Ivy' 'Trinity'} {'Sun_Girl' 'Shimmer'} {'Lady_Shiva' 'Jewelee'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Eviless'} {'Superwoman' 'Typhoid_Mary'} {'Zaladane' 'Typhoid_Mary'} {'Zaladane' 'Genevieve_Savidge'} {'Superwoman' 'Eviless'} {'Zaladane' 'Bombshell'} {'Ingra' 'Bombshell'} {'Jinx' 'Genevieve_Savidge'} {'Ingra' 'Genevieve_Savidge'} {'Jinx' 'Eviless'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Decay'} {'Ingra' 'Decay'} {'Mai_Shen' 'Deuce'} {'Ingra' 'Lady_Octopus'} {'Margaret_Love' 'Bombshell'} {'Ingra' 'Deuce'} {'Margaret_Love' 'Decay'} {'Dr_Evil' 'Lady_Octopus'} {'Dr_Evil' 'Bombshell'} {'Margaret_Love' 'Ingra'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'Fake_Thomas_Jefferson'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silk_Fever' 'Snapdragon'} {'Professor_Padraic_Ratigan' 'Maxima'} {'Lady_Shiva' 'Decay'} {'Lady_Shiva' 'Lady_Octopus'} {'Nyssa_Raatko' 'Lady_Octopus'} {'Professor_Padraic_Ratigan' 'Decay'} {'Silk_Fever' 'Maxima'} {'Nyssa_Raatko' 'Decay'} {'Professor_Padraic_Ratigan' 'Lady_Octopus'} {'Lady_Shiva' 'Snapdragon'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Bombshell' 'Trinity'} {'Mothergod' 'Professor_Padraic_Ratigan'} {'Tigress' 'Dr_Horrible'} {'Tigress' 'Princess_Python'} {'Rad' 'Dr_Horrible'} {'Rad' 'Professor_Padraic_Ratigan'} {'Mothergod' 'Trinity'} {'Tigress' 'Trinity'} {'Bombshell' 'Professor_Padraic_Ratigan'} {'Mothergod' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Windfall'} {'Syndrome' 'Queen_Bee'} {'Dr_Horrible' 'Mai_Shen'} {'Windfall' 'Animora'} {'New_Wave' 'Dr_Horrible'} {'Animora' 'Syndrome'} {'Queen_Bee' 'New_Wave'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Evinlea' 'Fake_Thomas_Jefferson'} {'Evinlea' 'Southpaw'} {'Magpie' 'Southpaw'} {'Magpie' 'Jason_Kreis'} {'Mist' 'Southpaw'} {'Tigress' 'Jason_Kreis'} {'Tigress' 'Fake_Thomas_Jefferson'} {'Mist' 'Jason_Kreis'} {'Evinlea' 'Gru'} {'Magpie' 'Gru'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Nyssa_Raatko' 'Shiv'} {'Nyssa_Raatko' 'Queen_Of_Fables'} {'Jewelee' 'The_Lightning'} {'Jinx' 'Shiv'} {'Nyssa_Raatko' 'Rad'} {'Jinx' 'The_Lightning'} {'Nyssa_Raatko' 'The_Lightning'} {'Jewelee' 'Rad'} {'Professor_Padraic_Ratigan' 'Shiv'} {'Professor_Padraic_Ratigan' 'Queen_Of_Fables'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Ingra' 'Sun_Girl'} {'Southpaw' 'Golden_Glider'} {'Superwoman' 'Mothergod'} {'Ingra' 'Tigress'} {'Superwoman' 'Sun_Girl'} {'Southpaw' 'Mothergod'} {'Silk_Fever' 'Tigress'} {'Superwoman' 'Ingra'} {'Ingra' 'Golden_Glider'} {'Silk_Fever' 'Sun_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Tala'} {'Mai_Shen' 'Abominatrix'} {'Mai_Shen' 'Mothergod'} {'Mai_Shen' 'Ursa'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Abominatrix'} {'Mai_Shen' 'Devastation'} {'Abominatrix' 'Mai_Shen'} {'Devastation' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Shiv' 'Titania'} {'Lady_Quark' 'Trinity'} {'Mothergod' 'Hypnota'} {'Shiv' 'Hypnota'} {'Lady_Quark' 'White_Rabbit'} {'Lady_Octopus' 'Trinity'} {'Shiv' 'Lady_Quark'} {'Mothergod' 'Trinity'} {'Mothergod' 'White_Rabbit'} {'Lady_Octopus' 'Titania'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lazara' 'Queen_Of_Fables'} {'Queen_Bee' 'Magpie'} {'Queen_Bee' 'Rad'} {'Lashina' 'Queen_Of_Fables'} {'Lashina' 'Superwoman'} {'Dead_Bowie' 'Queen_Of_Fables'} {'Lashina' 'Magpie'} {'Queen_Bee' 'Queen_Of_Fables'} {'Dead_Bowie' 'Rad'} {'Lazara' 'Superwoman'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'New_Wave' 'Ingra'} {'Syndrome' 'Princess_Python'} {'New_Wave' 'Sun_Girl'} {'Lashina' 'Ingra'} {'Silk_Fever' 'Ingra'} {'New_Wave' 'Princess_Python'} {'Syndrome' 'Shiv'} {'Lashina' 'Shiv'} {'Lashina' 'Sun_Girl'} {'Silk_Fever' 'Sun_Girl'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Hypnota' 'Sun_Girl'} {'Doctor_Cyber' 'Windfall'} {'Dr_Evil' 'Valentina'} {'Hypnota' 'Abominatrix'} {'Doctor_Cyber' 'Sun_Girl'} {'Mist' 'Windfall'} {'Doctor_Cyber' 'Valentina'} {'Mist' 'Abominatrix'} {'Mist' 'Sun_Girl'} {'Dr_Evil' 'Abominatrix'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Leather' 'King_Ghidorah'} {'Jinx' 'Bombshell'} {'Leather' 'Lady_Vic'} {'Leather' 'Osira'} {'Jewelee' 'Bombshell'} {'Leather' 'Bombshell'} {'Amy_Madison' 'King_Ghidorah'} {'Jinx' 'King_Ghidorah'} {'Jewelee' 'Osira'} {'Amy_Madison' 'Lady_Vic'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Madame_Rouge' 'Ingra'} {'Margaret_Love' 'Ingra'} {'Yellowjacket' 'Dansen_Macabre'} {'Margaret_Love' 'The_Crimson_Ghost'} {'Margaret_Love' 'Rad'} {'Madame_Rouge' 'The_Crimson_Ghost'} {'Yellowjacket' 'Rad'} {'Yellowjacket' 'Ingra'} {'New_Wave' 'Dansen_Macabre'} {'New_Wave' 'The_Crimson_Ghost'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Amy_Madison' 'Typhoid_Mary'} {'Typhoid_Mary' 'The_Crimson_Ghost'} {'Amy_Madison' 'Spider_Girl'} {'Queen_Bee' 'Spider_Girl'} {'Queen_Bee' 'Livewire'} {'Nyssa_Raatko' 'The_Crimson_Ghost'} {'Typhoid_Mary' 'Mothergod'} {'Amy_Madison' 'The_Crimson_Ghost'} {'Typhoid_Mary' 'Livewire'} {'Nyssa_Raatko' 'Mothergod'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Margaret_Love' 'Shimmer'} {'Snapdragon' 'Shimmer'} {'Snapdragon' 'Lady_Octopus'} {'Snapdragon' 'Jewelee'} {'Decay' 'Poundcakes'} {'Amy_Madison' 'Poundcakes'} {'Decay' 'Lady_Octopus'} {'Margaret_Love' 'Lady_Octopus'} {'Decay' 'Jewelee'} {'Amy_Madison' 'Jewelee'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Black_Mamba' 'Purgatori'} {'Talia_Al_Ghul' 'Windfall'} {'Lady_Death' 'Madame_Masque'} {'Spider_Girl' 'Madame_Masque'} {'Black_Mamba' 'Saturn_Queen'} {'Black_Mamba' 'Madame_Masque'} {'Spider_Girl' 'Saturn_Queen'} {'Talia_Al_Ghul' 'Purgatori'} {'Lady_Death' 'Windfall'} {'Spider_Girl' 'Purgatori'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Bombshell' 'Queen_Of_Fables'} {'Silk_Fever' 'Lady_Quark'} {'Windfall' 'Star_Sapphire'} {'Windfall' 'Queen_Of_Fables'} {'Silk_Fever' 'Star_Sapphire'} {'Silk_Fever' 'Bombshell'} {'Shiv' 'Dead_Bowie'} {'Shiv' 'Lady_Quark'} {'Windfall' 'Lady_Quark'} {'Bombshell' 'Dead_Bowie'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Swan' 'Gru'} {'Superwoman' 'Lagomorph'} {'Silver_Swan' 'Duela_Dent'} {'Silver_Swan' 'Superwoman'} {'Superwoman' 'Lady_Vic'} {'Saturn_Queen' 'Lady_Vic'} {'Saturn_Queen' 'Duela_Dent'} {'Poundcakes' 'Lagomorph'} {'Silver_Swan' 'Lady_Vic'} {'Poundcakes' 'Gru'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lady_Vic' 'Queen_Bee'} {'Deuce' 'Yellowjacket'} {'Prank' 'Amazing_Grace'} {'Bombshell' 'Yellowjacket'} {'Deuce' 'Amazing_Grace'} {'Lady_Vic' 'Lady_Death'} {'Deuce' 'Prank'} {'Bombshell' 'Amazing_Grace'} {'Prank' 'Queen_Bee'} {'Deuce' 'Lady_Death'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Maxima' 'Sun_Girl'} {'Spider_Girl' 'Genevieve_Savidge'} {'Spider_Girl' 'Madame_Masque'} {'Fem_Paragon' 'Margaret_Love'} {'Maxima' 'Genevieve_Savidge'} {'Maxima' 'Madame_Masque'} {'Spider_Girl' 'Sun_Girl'} {'Devastation' 'Sun_Girl'} {'Devastation' 'Margaret_Love'} {'Fem_Paragon' 'Madame_Masque'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Tala' 'Animora'} {'Tala' 'Scandal'} {'Tala' 'Amazing_Grace'} {'Tala' 'Lafety_Le_Fei'} {'Tala' 'Lady_Quark'} {'Tala' 'Silver_Banshee'} {'Tala' 'Dansen_Macabre'} {'Tala' 'Jason_Kreis'} {'Tala' 'Cyborgirl'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Fem_Paragon' 'Golddigger'} {'Southpaw' 'Deuce'} {'Southpaw' 'Golddigger'} {'Fem_Paragon' 'Sun_Girl'} {'Rad' 'Sun_Girl'} {'Southpaw' 'Sun_Girl'} {'Rad' 'Lady_Clay'} {'Fem_Paragon' 'Bombshell'} {'Deuce' 'Lady_Clay'} {'Deuce' 'Bombshell'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Poison_Ivy' 'Lady_Octopus'} {'Poison_Ivy' 'Lazara'} {'Lazara' 'Lagomorph'} {'Poison_Ivy' 'Tala'} {'Mephista' 'Lagomorph'} {'Mai_Shen' 'Lagomorph'} {'Mephista' 'Tala'} {'Mai_Shen' 'Lady_Octopus'} {'Mephista' 'Lady_Death'} {'Lazara' 'Lady_Death'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Professor_Padraic_Ratigan' 'Superwoman'} {'Professor_Padraic_Ratigan' 'Shiv'} {'Professor_Padraic_Ratigan' 'Amazing_Grace'} {'Amazing_Grace' 'Bombshell'} {'Saturn_Queen' 'Superwoman'} {'Professor_Padraic_Ratigan' 'Bombshell'} {'Tala' 'Shiv'} {'Tala' 'Trinity'} {'Saturn_Queen' 'Bombshell'} {'Amazing_Grace' 'Trinity'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Talia_Al_Ghul'} {'Cyborgirl' 'Snapdragon'} {'Talia_Al_Ghul' 'Cyborgirl'} {'Silver_Banshee' 'Deuce'} {'New_Wave' 'Mist'} {'Osira' 'Lady_Octopus'} {'Lady_Octopus' 'Silver_Banshee'} {'Snapdragon' 'Osira'} {'Mist' 'Zaladane'} {'Deuce' 'New_Wave'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Asbestos_Lady' 'Coachwhip'} {'Asbestos_Lady' 'Jewelee'} {'Asbestos_Lady' 'Shimmer'} {'Lady_Shiva' 'Jewelee'} {'Blue_Snowman' 'Coachwhip'} {'Ingra' 'Coachwhip'} {'Lady_Shiva' 'Ingra'} {'Lady_Shiva' 'Titania'} {'Ingra' 'Shimmer'} {'Blue_Snowman' 'Titania'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Abominatrix' 'Tigress'} {'Queen_Bee' 'Rampage'} {'Unicron' 'Rampage'} {'Lady_Octopus' 'Poundcakes'} {'Unicron' 'Queen_Of_Fables'} {'Abominatrix' 'Queen_Bee'} {'Abominatrix' 'Queen_Of_Fables'} {'Queen_Bee' 'Poundcakes'} {'Lady_Octopus' 'Tigress'} {'Abominatrix' 'Poundcakes'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Scandal' 'Jinx'} {'Scandal' 'Doctor_Cyber'} {'Scandal' 'Roulette'} {'Queen_Bee' 'Jinx'} {'Queen_Bee' 'Roulette'} {'Queen_Bee' 'Yellowjacket'} {'Margaret_Love' 'Yellowjacket'} {'Zaladane' 'Roulette'} {'Margaret_Love' 'Doctor_Cyber'} {'Zaladane' 'Yellowjacket'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lady_Quark' 'Madame_Masque'} {'Coachwhip' 'Lady_Quark'} {'Lady_Clay' 'Coachwhip'} {'Madame_Masque' 'Southpaw'} {'Talia_Al_Ghul' 'Lady_Clay'} {'Southpaw' 'Talia_Al_Ghul'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Evinlea' 'Silver_Banshee'} {'Magenta' 'Amy_Madison'} {'Magenta' 'Fake_Thomas_Jefferson'} {'Deuce' 'Fake_Thomas_Jefferson'} {'Magenta' 'Silver_Banshee'} {'Evinlea' 'Trinity'} {'Cyborgirl' 'Amy_Madison'} {'Cyborgirl' 'Trinity'} {'Evinlea' 'Fake_Thomas_Jefferson'} {'Deuce' 'Silver_Banshee'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jewelee' 'Madame_Rouge'} {'Jewelee' 'Fem_Paragon'} {'Jewelee' 'Professor_Padraic_Ratigan'} {'Jewelee' 'Evinlea'} {'Jewelee' 'Fury_Leika'} {'Jewelee' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Amy_Madison' 'The_Crimson_Ghost'} {'Syndrome' 'Lady_Vic'} {'Syndrome' 'Lady_Quark'} {'Lagomorph' 'Poison_Ivy'} {'Lagomorph' 'Lady_Vic'} {'Shimmer' 'Lady_Quark'} {'Lagomorph' 'The_Crimson_Ghost'} {'Amy_Madison' 'Syndrome'} {'Amy_Madison' 'Poison_Ivy'} {'Shimmer' 'Poison_Ivy'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Swan' 'Purgatori'} {'Nyssa_Raatko' 'Purgatori'} {'Nyssa_Raatko' 'Shimmer'} {'Abominatrix' 'Nyssa_Raatko'} {'Nyssa_Raatko' 'Bombshell'} {'Silver_Swan' 'Bombshell'} {'Abominatrix' 'Duela_Dent'} {'Abominatrix' 'Purgatori'} {'Windfall' 'Duela_Dent'} {'Windfall' 'Shimmer'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Fury_Leika' 'The_Lightning'} {'Amy_Madison' 'The_Lightning'} {'The_Crimson_Ghost' 'Lady_Death'} {'Shimmer' 'Lady_Death'} {'Amy_Madison' 'Queen_Of_Fables'} {'The_Crimson_Ghost' 'Queen_Of_Fables'} {'Fury_Leika' 'Queen_Of_Fables'} {'Amy_Madison' 'Dansen_Macabre'} {'Fury_Leika' 'Dansen_Macabre'} {'Shimmer' 'The_Lightning'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Abominatrix' 'Lady_Shiva'} {'Queen_Clea' 'Fake_Thomas_Jefferson'} {'Abominatrix' 'Hypnota'} {'Jewelee' 'Lady_Shiva'} {'Madame_Masque' 'Lady_Shiva'} {'Jewelee' 'Hypnota'} {'Queen_Clea' 'Hypnota'} {'Madame_Masque' 'Maxima'} {'Jewelee' 'Fake_Thomas_Jefferson'} {'Jewelee' 'Maxima'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Southpaw' 'Silver_Banshee'} {'Animora' 'Professor_Padraic_Ratigan'} {'Dansen_Macabre' 'Jason_Kreis'} {'Valentina' 'Professor_Padraic_Ratigan'} {'Animora' 'Jason_Kreis'} {'Animora' 'Silver_Banshee'} {'Southpaw' 'Professor_Padraic_Ratigan'} {'Dansen_Macabre' 'Titania'} {'Valentina' 'Jason_Kreis'} {'Valentina' 'Titania'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Saturn_Queen' 'Lazara'} {'Decay' 'Magpie'} {'Saturn_Queen' 'Decay'} {'Harley_Quinn' 'Magpie'} {'Bombshell' 'Silver_Banshee'} {'Decay' 'Lazara'} {'Decay' 'Madame_Masque'} {'Saturn_Queen' 'Silver_Banshee'} {'Bombshell' 'Madame_Masque'} {'Harley_Quinn' 'Lazara'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Banshee' 'Osira'} {'Jewelee' 'Dead_Bowie'} {'Scandal' 'Poison_Ivy'} {'Scandal' 'Osira'} {'Shiv' 'Dead_Bowie'} {'Shiv' 'Rad'} {'Silver_Banshee' 'Poison_Ivy'} {'Jewelee' 'Osira'} {'Scandal' 'Shiv'} {'Silver_Banshee' 'Rad'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Scandal' 'Roulette'} {'Poison_Ivy' 'Mephista'} {'Amazing_Grace' 'Spider_Girl'} {'Poison_Ivy' 'Roulette'} {'Scandal' 'Lafety_Le_Fei'} {'Mephista' 'Lafety_Le_Fei'} {'Mephista' 'Spider_Girl'} {'Poison_Ivy' 'Princess_Python'} {'Poison_Ivy' 'Spider_Girl'} {'Amazing_Grace' 'Princess_Python'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dr_Horrible' 'Genevieve_Savidge'} {'Decay' 'Windfall'} {'Dansen_Macabre' 'Princess_Python'} {'Purgatori' 'Windfall'} {'Purgatori' 'Princess_Python'} {'Purgatori' 'Mist'} {'Dr_Horrible' 'Mist'} {'Dansen_Macabre' 'Genevieve_Savidge'} {'Decay' 'Mist'} {'Dr_Horrible' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Typhoid_Mary' 'Margaret_Love'} {'Typhoid_Mary' 'Sun_Girl'} {'Typhoid_Mary' 'Osira'} {'Deuce' 'Fake_Thomas_Jefferson'} {'Fake_Thomas_Jefferson' 'Margaret_Love'} {'Deuce' 'Sun_Girl'} {'Fake_Thomas_Jefferson' 'Tala'} {'Lashina' 'Sun_Girl'} {'Lashina' 'Tala'} {'Deuce' 'Osira'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Golden_Glider' 'Rad'} {'Lashina' 'Mothergod'} {'White_Rabbit' 'Asbestos_Lady'} {'Star_Sapphire' 'White_Rabbit'} {'Lafety_Le_Fei' 'Star_Sapphire'} {'Mothergod' 'Lafety_Le_Fei'} {'Fury_Leika' 'Lashina'} {'Asbestos_Lady' 'Golden_Glider'} {'Rad' 'Fury_Leika'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Coachwhip' 'Abominatrix'} {'Lady_Death' 'Abominatrix'} {'Superwoman' 'Queen_Clea'} {'Coachwhip' 'Queen_Clea'} {'Superwoman' 'Tigress'} {'Coachwhip' 'Silk_Fever'} {'Rad' 'Lady_Death'} {'Rad' 'Tigress'} {'Rad' 'Silk_Fever'} {'Lady_Death' 'Queen_Clea'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Poison_Ivy' 'Leather'} {'Zaladane' 'Star_Sapphire'} {'Ursa' 'Star_Sapphire'} {'Poison_Ivy' 'Ursa'} {'Lady_Death' 'Harley_Quinn'} {'Poison_Ivy' 'Evinlea'} {'Zaladane' 'Evinlea'} {'Ursa' 'Leather'} {'Lady_Death' 'Leather'} {'Poison_Ivy' 'Harley_Quinn'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Margaret_Love' 'Duela_Dent'} {'Margaret_Love' 'Fake_Thomas_Jefferson'} {'Jewelee' 'Jason_Kreis'} {'Lagomorph' 'Jewelee'} {'Lagomorph' 'Fake_Thomas_Jefferson'} {'Lagomorph' 'Duela_Dent'} {'Madame_Masque' 'Jason_Kreis'} {'Jewelee' 'Decay'} {'Margaret_Love' 'Decay'} {'Madame_Masque' 'Fake_Thomas_Jefferson'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jason_Kreis' 'Jewelee'} {'Fury_Leika' 'Queen_Clea'} {'Jason_Kreis' 'Unicron'} {'Fury_Leika' 'Lagomorph'} {'Fury_Leika' 'Jewelee'} {'Abominatrix' 'Lagomorph'} {'Black_Mamba' 'Lagomorph'} {'Black_Mamba' 'Unicron'} {'Abominatrix' 'Queen_Clea'} {'Abominatrix' 'Unicron'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Osira' 'Golden_Glider'} {'Osira' 'Scandal'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Bee' 'Golden_Glider'} {'Sun_Girl' 'Lady_Vic'} {'Queen_Bee' 'Margaret_Love'} {'Sun_Girl' 'Golden_Glider'} {'Queen_Bee' 'Lady_Vic'} {'Sun_Girl' 'Madame_Masque'} {'Sun_Girl' 'Scandal'} {'Queen_Bee' 'Scandal'} {'Sun_Girl' 'Margaret_Love'} {'Queen_Bee' 'Madame_Masque'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lashina' 'Mothergod'} {'Lashina' 'Devastation'} {'Lashina' 'Decay'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Doctor_Cyber' 'Queen_Clea'} {'Ingra' 'Spider_Girl'} {'Ingra' 'Sun_Girl'} {'Doctor_Cyber' 'Spider_Girl'} {'New_Wave' 'Queen_Clea'} {'Dansen_Macabre' 'Tigress'} {'Dansen_Macabre' 'Spider_Girl'} {'New_Wave' 'Spider_Girl'} {'Doctor_Cyber' 'Sun_Girl'} {'New_Wave' 'Tigress'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Coachwhip' 'Southpaw'} {'Coachwhip' 'The_Crimson_Ghost'} {'Abominatrix' 'The_Crimson_Ghost'} {'Tala' 'Hypnota'} {'Madame_Masque' 'The_Crimson_Ghost'} {'Tala' 'New_Wave'} {'Tala' 'The_Crimson_Ghost'} {'Abominatrix' 'Hypnota'} {'Madame_Masque' 'Southpaw'} {'Coachwhip' 'New_Wave'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Black_Mamba' 'Emerald_Empress'} {'Golddigger' 'Prank'} {'Saturn_Queen' 'Prank'} {'Golddigger' 'Nyssa_Raatko'} {'Black_Mamba' 'Hypnota'} {'Saturn_Queen' 'Nyssa_Raatko'} {'Fury_Leika' 'Nyssa_Raatko'} {'Fury_Leika' 'Prank'} {'Fury_Leika' 'Hypnota'} {'Saturn_Queen' 'Emerald_Empress'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'New_Wave'} {'Dead_Bowie' 'Typhoid_Mary'} {'Queen_Clea' 'Typhoid_Mary'} {'Lotso' 'Lagomorph'} {'Lotso' 'Southpaw'} {'Decay' 'New_Wave'} {'Lotso' 'New_Wave'} {'Dead_Bowie' 'Lotso'} {'Queen_Clea' 'Southpaw'} {'Decay' 'Lagomorph'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Eviless' 'Abominatrix'} {'Prank' 'Shimmer'} {'Rampage' 'Syndrome'} {'Queen_Bee' 'Syndrome'} {'Prank' 'Queen_Clea'} {'Prank' 'Syndrome'} {'Queen_Bee' 'Abominatrix'} {'Eviless' 'Shimmer'} {'Rampage' 'Eviless'} {'Rampage' 'Queen_Clea'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Tala' 'Professor_Padraic_Ratigan'} {'Decay' 'Silver_Swan'} {'Queen_Clea' 'Black_Mamba'} {'Poundcakes' 'King_Ghidorah'} {'Poundcakes' 'Silver_Swan'} {'Poundcakes' 'Tala'} {'Queen_Clea' 'Professor_Padraic_Ratigan'} {'Poundcakes' 'Black_Mamba'} {'Decay' 'King_Ghidorah'} {'Tala' 'Silver_Swan'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Tala' 'Bombshell'} {'Tala' 'Mai_Shen'} {'Tala' 'Madame_Rouge'} {'Tala' 'Spider_Girl'} {'Tala' 'Dr_Horrible'} {'Tala' 'Madame_Masque'} {'Tala' 'Lazara'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Livewire' 'Lady_Clay'} {'Livewire' 'Queen_Clea'} {'New_Wave' 'Queen_Clea'} {'New_Wave' 'Lady_Clay'} {'Livewire' 'Rad'} {'New_Wave' 'Rad'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Plastique' 'Cyborgirl'} {'Plastique' 'Tigress'} {'Plastique' 'Superwoman'} {'Plastique' 'Queen_Of_Fables'} {'Plastique' 'Star_Sapphire'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Professor_Padraic_Ratigan' 'Animora'} {'Princess_Python' 'Shiv'} {'Sun_Girl' 'Typhoid_Mary'} {'New_Wave' 'Animora'} {'Professor_Padraic_Ratigan' 'Lady_Clay'} {'New_Wave' 'Lady_Clay'} {'Sun_Girl' 'Shiv'} {'New_Wave' 'Typhoid_Mary'} {'Princess_Python' 'Lady_Clay'} {'Sun_Girl' 'Animora'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Sun_Girl' 'Golddigger'} {'Jewelee' 'Golddigger'} {'Zaladane' 'Deuce'} {'Sun_Girl' 'Deuce'} {'Mai_Shen' 'Golddigger'} {'Jewelee' 'Lazara'} {'Mai_Shen' 'Lazara'} {'Sun_Girl' 'Lazara'} {'Zaladane' 'Lashina'} {'Jewelee' 'Lashina'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jason_Kreis' 'Amazing_Grace'} {'Maxima' 'Ursa'} {'Queen_Bee' 'Gru'} {'Jason_Kreis' 'Gru'} {'Ursa' 'Lady_Death'} {'Maxima' 'Amazing_Grace'} {'Queen_Bee' 'Tala'} {'Ursa' 'Tala'} {'Jason_Kreis' 'Lady_Death'} {'Maxima' 'Gru'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lagomorph' 'Doctor_Cyber'} {'Mothergod' 'Roulette'} {'Doctor_Cyber' 'Dr_Evil'} {'Roulette' 'Lagomorph'} {'Jewelee' 'Magenta'} {'Fury_Leika' 'Mothergod'} {'Dr_Evil' 'Jewelee'} {'Magenta' 'Fury_Leika'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'Fake_Thomas_Jefferson'} {'Fake_Thomas_Jefferson' 'Fury_Leika'} {'Fury_Leika' 'Dead_Bowie'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Scandal' 'Eviless'} {'Queen_Of_Fables' 'Queen_Bee'} {'Queen_Of_Fables' 'Duela_Dent'} {'Scandal' 'Duela_Dent'} {'Emerald_Empress' 'Eviless'} {'Syndrome' 'Yellowjacket'} {'Syndrome' 'Eviless'} {'Scandal' 'Yellowjacket'} {'Emerald_Empress' 'Queen_Bee'} {'Emerald_Empress' 'Scandal'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lazara' 'Blue_Snowman'} {'Lazara' 'Margaret_Love'} {'Lazara' 'Rad'} {'Lazara' 'Syndrome'} {'Lazara' 'Shiv'} {'Lazara' 'Spider_Girl'} {'Lazara' 'Silver_Swan'} {'Lazara' 'Coachwhip'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Valentina' 'Asbestos_Lady'} {'Valentina' 'Doctor_Cyber'} {'Ingra' 'Doctor_Cyber'} {'Scandal' 'Asbestos_Lady'} {'Ingra' 'Professor_Padraic_Ratigan'} {'Valentina' 'Yellowjacket'} {'Lotso' 'Professor_Padraic_Ratigan'} {'Lotso' 'Yellowjacket'} {'Lotso' 'Asbestos_Lady'} {'Scandal' 'Yellowjacket'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Devastation' 'Hypnota'} {'Purgatori' 'Livewire'} {'Evinlea' 'Hypnota'} {'Evinlea' 'Lazara'} {'Devastation' 'Lazara'} {'Nyssa_Raatko' 'Duela_Dent'} {'Evinlea' 'Livewire'} {'Nyssa_Raatko' 'Hypnota'} {'Purgatori' 'Hypnota'} {'Devastation' 'Duela_Dent'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Shimmer' 'Saturn_Queen'} {'Shimmer' 'Lafety_Le_Fei'} {'Golden_Glider' 'Saturn_Queen'} {'Shimmer' 'Cyborgirl'} {'Poison_Ivy' 'Lafety_Le_Fei'} {'Zaladane' 'Cyborgirl'} {'Golden_Glider' 'Cyborgirl'} {'Poison_Ivy' 'Snapdragon'} {'Golden_Glider' 'Snapdragon'} {'Zaladane' 'Saturn_Queen'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Of_Fables' 'Lazara'} {'Saturn_Queen' 'Golden_Glider'} {'Queen_Of_Fables' 'Golden_Glider'} {'Fury_Leika' 'Duela_Dent'} {'Dr_Horrible' 'Golden_Glider'} {'Fury_Leika' 'Ingra'} {'Queen_Of_Fables' 'Duela_Dent'} {'Fury_Leika' 'Dr_Horrible'} {'Saturn_Queen' 'Ingra'} {'Dr_Horrible' 'Lazara'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Hypnota' 'Abominatrix'} {'New_Wave' 'Mothergod'} {'Hypnota' 'Mothergod'} {'Harley_Quinn' 'Tigress'} {'Harley_Quinn' 'Hypnota'} {'Lady_Vic' 'Tigress'} {'New_Wave' 'Trinity'} {'New_Wave' 'Abominatrix'} {'Harley_Quinn' 'Trinity'} {'Lady_Vic' 'Abominatrix'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\ntoc\r\n","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-09-18T04:20:57.000Z","updated_at":"2013-09-18T04:34:45.000Z","published_at":"2013-09-18T04:34:45.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/2933486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Bad Horse\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The problem is codified using a cell array of names.\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 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.\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 conflicted name pairs (cell array of pairs of names)\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 TF (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 9 minutes, 789 out of 1984 correct\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\"}]}"},{"id":1897,"title":"GJam 2014 China Rd A: Rational Number Tree","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p1 GJam 2014 China Rational Number Tree\u003e.\r\n\r\nThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the small Challenge with a Max of 16 Tree levels. The large Challenge is 64 Tree levels.\r\n\r\nConsider an infinite complete binary tree where the root node is 1/1 and the left and right childs of node P/Q are P/(P+Q) and (P+Q)/Q, respectively. \r\n\r\nThe Tree looks like:\r\n\r\n         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\r\n\r\n\r\nThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\r\n\r\n\r\n*Input:* [N] or [P,Q] where N is an integer node or [P,Q] are terms of a Node\r\n\r\n*Output:* [P,Q] or [N]  depends on Input type\r\n\r\n*Examples:*\r\n\r\n  [Input]  [Output]\r\n    [2] [1 2]\r\n    [1 2] [2]\r\n    [5] [3 2]\r\n    [3 2] [5]\r\n\r\n*Contest Performance:* Best Delta Time of 14 minutes with 1193 out of 3058 completing in less than 3 hours.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p1\"\u003eGJam 2014 China Rational Number Tree\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the small Challenge with a Max of 16 Tree levels. The large Challenge is 64 Tree levels.\u003c/p\u003e\u003cp\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right childs of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\u003c/p\u003e\u003cp\u003eThe Tree looks like:\u003c/p\u003e\u003cpre\u003e         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\u003c/pre\u003e\u003cp\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N] or [P,Q] where N is an integer node or [P,Q] are terms of a Node\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [P,Q] or [N]  depends on Input type\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Input]  [Output]\r\n  [2] [1 2]\r\n  [1 2] [2]\r\n  [5] [3 2]\r\n  [3 2] [5]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 14 minutes with 1193 out of 3058 completing in less than 3 hours.\u003c/p\u003e","function_template":"function vout=Tree_CH(v)\r\n vout=v;\r\nend","test_suite":"%%\r\ntic\r\nv=[281 87 ];\r\nvexp=[64903 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[71 384 ];\r\nvexp=[40544 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[280 103 ];\r\nvexp=[14427 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[17357 ];\r\nvexp=[277 162 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[263 381 ];\r\nvexp=[19846 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[785 477 ];\r\nvexp=[56053 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[19311 ];\r\nvexp=[440 93 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[241 171 ];\r\nvexp=[33049 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[225 94 ];\r\nvexp=[14291 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[40040 ];\r\nvexp=[185 664 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[565 431 ];\r\nvexp=[60145 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[399 680 ];\r\nvexp=[64178 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[62292 ];\r\nvexp=[358 937 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[398 1051 ];\r\nvexp=[46356 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[59 45 ];\r\nvexp=[1777 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[47 175 ];\r\nvexp=[3400 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[59987 ];\r\nvexp=[1109 466 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[33547 ];\r\nvexp=[329 129 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[256 45 ];\r\nvexp=[20703 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[43221 ];\r\nvexp=[1090 673 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[80 251 ];\r\nvexp=[41976 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[40366 ];\r\nvexp=[487 621 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[65 48 ];\r\nvexp=[1289 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5644 ];\r\nvexp=[59 145 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[52852 ];\r\nvexp=[307 787 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[61149 ];\r\nvexp=[610 341 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[39087 ];\r\nvexp=[650 141 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[61881 ];\r\nvexp=[520 361 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[488 275 ];\r\nvexp=[21405 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[33893 ];\r\nvexp=[485 306 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26965 ];\r\nvexp=[885 547 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5918 ];\r\nvexp=[99 122 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[63216 ];\r\nvexp=[90 379 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[248 459 ];\r\nvexp=[60546 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26250 ];\r\nvexp=[370 607 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[295 476 ];\r\nvexp=[33386 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[29373 ];\r\nvexp=[450 247 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[183 509 ];\r\nvexp=[64324 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[56818 ];\r\nvexp=[257 433 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[447 730 ];\r\nvexp=[57674 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[241 ];\r\nvexp=[17 13 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[14807 ];\r\nvexp=[313 86 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[251 145 ];\r\nvexp=[8557 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[76 485 ];\r\nvexp=[60096 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[24345 ];\r\nvexp=[278 197 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2581 ];\r\nvexp=[127 79 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[588 247 ];\r\nvexp=[48723 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[190 233 ];\r\nvexp=[9630 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[367 303 ];\r\nvexp=[61729 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[4019 ];\r\nvexp=[97 40 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58547 ];\r\nvexp=[953 394 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[25786 ];\r\nvexp=[367 573 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[52923 ];\r\nvexp=[788 283 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[16812 ];\r\nvexp=[134 319 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[394 323 ];\r\nvexp=[38817 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[34401 ];\r\nvexp=[352 287 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[27426 ];\r\nvexp=[334 597 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[278 41 ];\r\nvexp=[35775 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[59405 ];\r\nvexp=[279 166 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[271 428 ];\r\nvexp=[48986 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[539 327 ];\r\nvexp=[59893 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[461 178 ];\r\nvexp=[17867 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[491 627 ];\r\nvexp=[47278 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[62313 ];\r\nvexp=[712 513 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[10791 ];\r\nvexp=[346 103 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58888 ];\r\nvexp=[109 419 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[431 114 ];\r\nvexp=[20855 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[373 647 ];\r\nvexp=[50962 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[60814 ];\r\nvexp=[455 593 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[109 79 ];\r\nvexp=[1321 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[356 581 ];\r\nvexp=[57162 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[3453 ];\r\nvexp=[98 53 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2024 ];\r\nvexp=[13 46 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[3453 ];\r\nvexp=[98 53 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[3545 ];\r\nvexp=[131 92 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[687 244 ];\r\nvexp=[46715 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26103 ];\r\nvexp=[304 79 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[65174 ];\r\nvexp=[235 326 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[65362 ];\r\nvexp=[155 267 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[701 508 ];\r\nvexp=[48425 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[272 377 ];\r\nvexp=[31638 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[61570 ];\r\nvexp=[143 265 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[156 251 ];\r\nvexp=[32490 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[157 425 ];\r\nvexp=[13924 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[726 203 ];\r\nvexp=[39063 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26 139 ];\r\nvexp=[65376 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58926 ];\r\nvexp=[474 607 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[64849 ];\r\nvexp=[397 311 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[38407 ];\r\nvexp=[363 115 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[33546 ];\r\nvexp=[200 329 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[271 201 ];\r\nvexp=[50185 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[123 137 ];\r\nvexp=[56830 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[41192 ];\r\nvexp=[125 446 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[689 292 ];\r\nvexp=[40211 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[185 51 ];\r\nvexp=[8407 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[9110 ];\r\nvexp=[189 262 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[128 473 ];\r\nvexp=[34248 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[722 267 ];\r\nvexp=[21147 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58918 ];\r\nvexp=[491 699 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[144 37 ];\r\nvexp=[36855 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\ntoc\r\n\r\n","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":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-26T22:38:33.000Z","updated_at":"2013-09-26T23:05:09.000Z","published_at":"2013-09-26T23:05:09.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/2924486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Rational Number Tree\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the small Challenge with a Max of 16 Tree levels. The large Challenge is 64 Tree levels.\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\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right childs of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\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 Tree looks like:\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/1\\n    ______|______\\n    |           |\\n   1/2         2/1\\n ___|___     ___|___\\n |     |     |     |\\n1/3   3/2   2/3   3/1]]\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:t\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\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 [N] or [P,Q] where N is an integer node or [P,Q] are terms of a Node\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 [P,Q] or [N] depends on Input type\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\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[[Input]  [Output]\\n  [2] [1 2]\\n  [1 2] [2]\\n  [5] [3 2]\\n  [3 2] [5]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 14 minutes with 1193 out of 3058 completing in less than 3 hours.\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\"}]}"},{"id":42779,"title":"GJam March 2016 IOW: Polynesiaglot Large","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p2 GJam March 2016 Annual I/O for Polynesiaglot\u003e. This is the Large input set. The max Qraw is 100^500, (V+C)^L.\r\n\r\nThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\r\n\r\n*Input:* [C V L] , C[1,50], V[1,50], 1\u003c=L\u003c=500\r\n\r\n*Output:* [Q] max Qraw is 100^500; Q=mod(Qraw,1E9+7)\r\n\r\n*Examples:* [C V L] [Q]\r\n\r\n  [1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n  [1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Theory:* This is a huge value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1).  There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(L-1)\r\n\r\n  Q3    V          C\r\n  Q2  V   C       V\r\n  Q1 V   V       V\r\n\r\nOne method to succeed in this problem is to use the java capability of Matlab.\r\n\u003chttp://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow Cody Java Challenge\u003e. The primary reference sites are \u003chttp://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html Java Math\u003e, \u003chttp://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html Java BigDecimal\u003e, and \u003chttp://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html Java BigInteger\u003e. The Java solution by the winner Stacy is included at the bottom of the test suite.\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p2\"\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/a\u003e. This is the Large input set. The max Qraw is 100^500, (V+C)^L.\u003c/p\u003e\u003cp\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=500\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Q] max Qraw is 100^500; Q=mod(Qraw,1E9+7)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [C V L] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e This is a huge value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1).  There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(L-1)\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eQ3    V          C\r\nQ2  V   C       V\r\nQ1 V   V       V\r\n\u003c/pre\u003e\u003cp\u003eOne method to succeed in this problem is to use the java capability of Matlab. \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\"\u003eCody Java Challenge\u003c/a\u003e. The primary reference sites are \u003ca href = \"http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html\"\u003eJava Math\u003c/a\u003e, \u003ca href = \"http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html\"\u003eJava BigDecimal\u003c/a\u003e, and \u003ca href = \"http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html\"\u003eJava BigInteger\u003c/a\u003e. The Java solution by the winner Stacy is included at the bottom of the test suite.\u003c/p\u003e","function_template":"function [T]=Polyglot(m)\r\n% T total words of length L using C consonants and V vowels\r\n% \r\n% import java.math.*\r\n% xBI=BigInteger(12)\r\n% zBI=xBI.add(yBI);\r\n% zBI=xBI.multiply(yBI);\r\n% mBI=xBI.mod(BigInteger('1000000007'));\r\n% z=str2num(zBI); % Convert JavaBigInteger to numeric\r\n \r\n\r\n import java.math.*\r\n\r\n C=BigInteger(m(1));  % BigInteger\r\n V=BigInteger(m(2));  % BigInteger\r\n L=m(3); % \r\n\r\n\r\n% Values above 255 get mod applied so use string input to BigInteger \r\n TJ=TJ.mod(BigInteger('1000000007'));\r\n% Convert BigInteger type to a numeric \r\n T=str2num(TJ);\r\n \r\n \r\nend","test_suite":"%%\r\ntic\r\n% T 0.7\r\nm=[1 1 4 ];\r\nv=Polyglot(m);\r\nvexp=[5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.8\r\nm=[1 2 2 ];\r\nv=Polyglot(m);\r\nvexp=[6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[671294715 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[474858966 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 104.4\r\nm=[1 1 500 ];\r\nv=Polyglot(m);\r\nvexp=[523068127 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.3\r\nm=[2 2 1 ];\r\nv=Polyglot(m);\r\nvexp=[2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 41 500 ];\r\nv=Polyglot(m);\r\nvexp=[356064865 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[50 41 1 ];\r\nv=Polyglot(m);\r\nvexp=[41 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[396751820 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[938256882 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[883121986 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[684068183 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.3\r\nm=[4 3 2 ];\r\nv=Polyglot(m);\r\nvexp=[21 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[15068072 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[483582780 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 43 500 ];\r\nv=Polyglot(m);\r\nvexp=[357963597 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[722287557 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 40 497 ];\r\nv=Polyglot(m);\r\nvexp=[142264969 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[300845428 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[626241204 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 50 499 ];\r\nv=Polyglot(m);\r\nvexp=[244005114 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.1\r\nm=[40 4 3 ];\r\nv=Polyglot(m);\r\nvexp=[1344 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[43 42 1 ];\r\nv=Polyglot(m);\r\nvexp=[42 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[518096485 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[223782662 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[678295851 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 2.2\r\nm=[50 3 2 ];\r\nv=Polyglot(m);\r\nvexp=[159 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 2.3\r\nm=[48 4 2 ];\r\nv=Polyglot(m);\r\nvexp=[208 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 41 498 ];\r\nv=Polyglot(m);\r\nvexp=[583339519 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.3\r\nm=[3 43 2 ];\r\nv=Polyglot(m);\r\nvexp=[1978 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[707985113 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 43 500 ];\r\nv=Polyglot(m);\r\nvexp=[254325944 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.0\r\nm=[2 1 1 ];\r\nv=Polyglot(m);\r\nvexp=[1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 5 499 ];\r\nv=Polyglot(m);\r\nvexp=[167403707 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[687213242 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[43 46 1 ];\r\nv=Polyglot(m);\r\nvexp=[46 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 4 498 ];\r\nv=Polyglot(m);\r\nvexp=[127737869 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 47 498 ];\r\nv=Polyglot(m);\r\nvexp=[809685798 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[701760607 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[783408764 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[3 40 499 ];\r\nv=Polyglot(m);\r\nvexp=[158384704 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[198880135 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 44 497 ];\r\nv=Polyglot(m);\r\nvexp=[539871481 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[227201453 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[212311056 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 254.9\r\nm=[2 2 500 ];\r\nv=Polyglot(m);\r\nvexp=[667073398 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[556413734 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 5.3\r\nm=[46 40 3 ];\r\nv=Polyglot(m);\r\nvexp=[211200 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 4 499 ];\r\nv=Polyglot(m);\r\nvexp=[334760532 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 43 500 ];\r\nv=Polyglot(m);\r\nvexp=[328797447 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[225964115 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[690707538 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[195330871 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[5 4 2 ];\r\nv=Polyglot(m);\r\nvexp=[36 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[188049811 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.0\r\nm=[1 1 1 ];\r\nv=Polyglot(m);\r\nvexp=[1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 218.1\r\nm=[1 2 500 ];\r\nv=Polyglot(m);\r\nvexp=[696656237 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[922192442 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[763469125 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[328920270 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 150.3\r\nm=[2 1 500 ];\r\nv=Polyglot(m);\r\nvexp=[260322005 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.4\r\nm=[5 49 2 ];\r\nv=Polyglot(m);\r\nvexp=[2646 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[237431455 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[29203332 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 41 500 ];\r\nv=Polyglot(m);\r\nvexp=[376005947 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[378681068 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[795014271 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[42 44 1 ];\r\nv=Polyglot(m);\r\nvexp=[44 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 41 500 ];\r\nv=Polyglot(m);\r\nvexp=[506257932 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 4 497 ];\r\nv=Polyglot(m);\r\nvexp=[272829097 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[50 50 1 ];\r\nv=Polyglot(m);\r\nvexp=[50 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.7\r\nm=[50 50 2 ];\r\nv=Polyglot(m);\r\nvexp=[5000 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[607981550 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[267081842 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[612852205 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[652373815 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 5 497 ];\r\nv=Polyglot(m);\r\nvexp=[336290141 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[50517743 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[251353420 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[66724508 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[390526622 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[37814577 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[923599754 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[872350727 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[668567771 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 4 498 ];\r\nv=Polyglot(m);\r\nvexp=[111334900 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.6\r\nm=[43 45 2 ];\r\nv=Polyglot(m);\r\nvexp=[3960 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[4 5 2 ];\r\nv=Polyglot(m);\r\nvexp=[45 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[281852157 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[884129281 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[216141546 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[488528258 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.3\r\nm=[5 42 2 ];\r\nv=Polyglot(m);\r\nvexp=[1974 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[45 45 1 ];\r\nv=Polyglot(m);\r\nvexp=[45 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[190132182 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.3\r\nm=[1 2 1 ];\r\nv=Polyglot(m);\r\nvexp=[2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.6\r\nm=[47 42 2 ];\r\nv=Polyglot(m);\r\nvexp=[3738 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[4 45 499 ];\r\nv=Polyglot(m);\r\nvexp=[999945335 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[53296911 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[3178118 ];\r\nassert(isequal(vexp,v))\r\n\r\n\r\n\r\ntoc\r\n\r\n%%\r\n% Stacy992 March 12, 2016\r\n% import java.util.*;\r\n% public class c {\r\n% \tpublic static long[][] memo;\r\n% \tpublic static long mod = 1000000007;\r\n% \tpublic static int c, v, l;\r\n% \tpublic static void main(String[] args){\r\n% \t\tScanner in = new Scanner(System.in);\r\n% \t\tint t = in.nextInt();\r\n% \t\tfor(int z = 1;z\u003c=t;z++){\r\n% \t\t\tc = in.nextInt();\r\n% \t\t\tv = in.nextInt();\r\n% \t\t\tl = in.nextInt();\r\n% \t\t\tmemo = new long[2][l];\r\n% \t\t\tfor(int i = 0;i\u003c2;i++){\r\n% \t\t\t\tArrays.fill(memo[i], -1);\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tSystem.out.println(\"Case #\"+z+\": \"+go(0, 0));\r\n% \t\t}\r\n% \t}\r\n% \tpublic static long go(int flag, int pos){\r\n% \t\tif(pos == l){\r\n% \t\t\tif(flag == 1){\r\n% \t\t\t\treturn 0;\r\n% \t\t\t}\r\n% \t\t\treturn 1;\r\n% \t\t}\r\n% \t\t\r\n% \t\tif(memo[flag][pos] != -1){\r\n% \t\t\treturn memo[flag][pos];\r\n% \t\t}\r\n% \t\t\r\n% \t\tlong ans = 0;\r\n% \t\tans = (ans+(go(0, pos+1)*v))%mod;\r\n% \t\tif(flag != 1){\r\n% \t\t\tans = (ans+(go(1, pos+1)*c))%mod;\r\n% \t\t}\r\n% \t\treturn memo[flag][pos] = ans;\r\n% \t}\r\n% }\r\n\r\n\r\n","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":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-19T20:50:33.000Z","updated_at":"2016-03-19T23:05:52.000Z","published_at":"2016-03-19T23:05:52.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/8274486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Large input set. The max Qraw is 100^500, (V+C)^L.\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 words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\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 [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=500\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 [Q] max Qraw is 100^500; Q=mod(Qraw,1E9+7)\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 [C V L] [Q]\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 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e This is a huge value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(L-1)\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[Q3    V          C\\nQ2  V   C       V\\nQ1 V   V       V]]\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:t\u003eOne method to succeed in this problem is to use the java capability of Matlab.\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://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody Java Challenge\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The primary reference sites are\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://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eJava Math\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e,\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://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eJava BigDecimal\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, and\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://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eJava BigInteger\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Java solution by the winner Stacy is included at the bottom of the test suite.\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\"}]}"},{"id":42782,"title":"GJam March 2016 IOW: Passwords and the Block Set","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p3 GJam March 2016 Annual I/O for Password Security\u003e. This is the small-2 case of up to 50 passwords of length 1 to 26\r\n\r\nThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'. \r\n\r\n*Input:* [PW], string up to 50 space separated passwords of 1 to 26 characters\r\n\r\n*Output:* [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\r\n\r\n*Examples:* [PW] [Pstr]\r\n\r\n  [X] [IMPOSSIBLE] \r\n  [QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]\r\n  ['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ] \r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Theory:* Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p3\"\u003eGJam March 2016 Annual I/O for Password Security\u003c/a\u003e. This is the small-2 case of up to 50 passwords of length 1 to 26\u003c/p\u003e\u003cp\u003eThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [PW], string up to 50 space separated passwords of 1 to 26 characters\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [PW] [Pstr]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[X] [IMPOSSIBLE] \r\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]\r\n['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ] \r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.\u003c/p\u003e","function_template":"function Pstr=Password(c)\r\n% c is a string of space separated passwords\r\n% Suggested sequence\r\n\r\n Pstr='IMPOSSIBLE';\r\n [Impossible]=check_Impossible1(c); % Single character check\r\n if Impossible,return;end\r\n \r\n c=clean(c); % remove passwords with duplicate letters\r\n if isempty(c) % A:Z is okay\r\n  Pstr=char(65:90); %Valid answer A:Z\r\n  return\r\n end\r\n \r\n [Impossible]=check_Impossible(c);\r\n if Impossible\r\n  Pstr='IMPOSSIBLE';\r\n  return;\r\n end\r\n \r\n% Create Valid string\r\n Pstr=make_Pstr(c);\r\nend","test_suite":"%%\r\nglobal zstart;\r\nzstart=now;\r\n%%\r\n%%\r\nm='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nvexp='AIMZGLDTUWKSQBVYXHRCNOEFJP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='X';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QQ';\r\nvexp='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XYZ GCJ OMG LMAO JK';\r\nvexp='AYTKXMBFSCZWRQODUNPJEVLIHG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AB YZ NM';\r\nvexp='AILEPCWDFKTZYJRVMUXGQOSBNH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='C PYTHON GO PERL RUBY JS';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SUBDERMATOGLYPHIC UNCOPYRIGHTABLES';\r\nvexp='AENYGJXRTWOKCZDPLMBISHVFUQ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EY OV OU OF OC OQ OP ED OEI EK OT OH EG ET OR EU ER EM OB OW ON OD EL OX EN EC OG EW OJ OI OM OY EP OS ES EI EV EJ OK EZ EX EQ OL EB EF EO EH EA OA OZ';\r\nvexp='GJUKHQMVZDPTFIXWLSCRYBANOE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CO CH CT LC MC VC CR AC CU CG CJ UC BC IC CM CQ CK CV NC OC TC CZ CL CN FC QC JC CB CW CE CI CX HC WC ZC DC CY CP KC CF GC EC RC YC XC CD PC SC CS CA';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZT XM XD ZE XZ ZI XO ZH ZB XE XY XJ ZQ ZX XI ZY ZW XH XA XK ZS XV ZM ZL ZD ZJ ZA ZF XC XN ZV ZG ZU ZN XP ZK ZC XL XT ZP XU XF XQ XW XG XB XS ZO XR ZR';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MB FR PC TJ BV XF OE LY MF VS AP DR PD HN FI XQ MG EN VC RL KP KR OV XD ME TC KQ QW RA RP HF VH VT XL ZI LZ HG OI YN CT JC RN YZ LA EO QB ZY QI AQ TU';\r\nvexp='AZOYBSTHEDWPMLCGUFNQVKJXIR';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CR CD CJ MC CO CV IC CW TCZ CK BC EC RC CG FC NC HC KC CL OC JC CH CQ AC GC CF ZC CE PC UC CX CB CZ CN LC CP CU WC QC CI YC CT CS DC SC CA XC CY VC CM';\r\nvexp='SLZQOFHUINXWKEYDMJPGVBARTC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YJ OU DJ GJ OM IJ VJ PJ QJ UJ OS OC OQ LJ RJ AJ TJ OR OA OE OX OD FJ NJ OT SJ ZJ OV WJ OJ OG ON OI OY OW BJ KJ EJ CJ HJ OH OL OB OP OF XJ OZ MJ OK';\r\nvexp='JVSYWIBTLUMNDAEHFGZPCRQKXO';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XQ EV IV IS HL GB TZ HR RN HY IG PL OA BK OI YC NC VM NF VB UT IE QR RE TD AZ YT CZ NA KJ AJ DJ MJ LM LK FO JX QL MV ZO TU OL NB AU NV ZJ ZB KC WT JP';\r\nvexp='ADTPRBMOFXHWYGCEQNSZKVLUIJ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IV DLB IU DM DT DH ID IE IT IP DP IK IG IY IX IA IS DX IO IW IR DW IF DB IN DZ IB IH IM DF DA IL IJ DS DJ DK IZ DU IC DN DV DE IQ DQ DC DY DG DO DI DR';\r\nvexp='DLEVWYSCGXFUZOMAQBRNKTHPJI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QZ FP VB AW TL LJ AZ JI ZX SR XF RE QD KG KI MD HY DF HQ DP RA AX DL XR OT MX ZY AG BQ YP KP LS JY IO BF QI EX BZ VG PA TD ZR EC VN VM NJ RW HM EB XU';\r\nvexp='OLNUZCSTHEVRDAJPKMBWGYIQFX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LVPF LVR LVD LZ LF LB LVS LD LO LVK LI LP LVH LVQ LJ LVU LVX LQ LVG LM LVM LVC LG LVA LVN LVO LVW LVE LVZ LVI LK LE LVT LY LS LT LN LC LVB LX LW LH OLVP LA LVF LVJ LR LU LVPS LVY';\r\nvexp='ATYCWPFNQGHKXDBISRMJOZUVEL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AZ GZ OD JZ SD BZ QZ BD FD NZ LZ VD RZ JD HZ TZ XD ID ED AD GD TD KD OZU WD CZ KZ HD YD VZ MZ UD FZ SZ YZ WZ XZ QD MD ZD LD RD PD PZ EZ CD DZ UZ IZ ND';\r\nvexp='DKNVYCBFATUWGMRJILXPEHOZQS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GR AO KF CG ML IY FY EK OJ XW XU ME SP LX PR MD SQ IE KL EQ AK PC SV SK TM NH AS IK OM FQ JD QX WQ CI UH GF XN LP MS LU EG IL GK ZD IQ TR JX OR ND DU';\r\nvexp='DCNYTGXBSLMIHQRJZWFPOAVEUK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IU IY RF XN LC MR OG ZM OH MT NO TA KR VO DH GC LN VF TO PB WV KV XE FE NC UQ SJ NL CI FL KP QY WN LI LY YH YE KE YX PJ YJ OA YO XV XF AL GK NJ DP DW';\r\nvexp='JKQSNRGAEVBFXMUCHOLPZTDIWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LK PO SO LP LQOP LD IO AO LA LF FO LB LZ VO WO GO LM LO LV LT LJ DO MO LG KO JO TO ZO XO YO BO LY LN LU LQOW XLQO LC RO HO NO EO LW LS LI LE LR LH LX CO UO';\r\nvexp='OTWBHRIUMKPGXVFYDQNJSCEAZL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RF RD IF PD SD BD AD EF FD YF MF ZF XF JD ZD CF XD TF QD CD WD LD TD VF BF HF JF ID YD AF OD PF HD NF UF GD OF QF UD DF VD KD LF ED MD SF ND WF KF GF';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EO OV OM OT FON OF OD BO QO SO XO HO ZO LO OG AO KO ON DO VO WO MO CO OQ JO OL OZ OA NO OR OJ OK OY OI OB GO OE OC RO IO UO OW OH OX YO PO OS OP OU TO';\r\nvexp='QSTZKANWYGERCLPDXIUHJMBVFO';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GJ RN LF GK TN WB KO FC HZ JZ ST VF GT BS TP WZ OE XI MK DO MG DW EN IY ZF WD JO YS ZN HG LR KS IQ OZ KT PG XE ID GP GS RJ HJ WP PL PA FO UT NH ZQ LD';\r\nvexp='SVAHTECFDRIKUQJPBZLNMWYOXG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JA JY SH SN SF SB SC SE JH JP SW JS JO SG JQ SD SX SQ JW JL SL SY SP JX JE SR JI JF JV SV JM SJ SO JU JN JT SI SZ JZ SA SK SM SU JD JG ST JR JK JC JB';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HN RN WN QA TB YD LZ GB GC OC BR SV RD VY UI IX RB ON IG WQ ZO RO UF DF PZ LH HD RI MJ AG BZ LM NC KS MZ WU RM IM VT YW WA PI CI DX AV QP AP YU FP XT';\r\nvexp='AJMUPTDSXBHGQZLYREOWVCNKFI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EU RC YT VD XW IJ XN NS QW SH YR KJ DE HD PV CW HG NF RB CI AP QY IY OD EV ZU FV GW CY QF IZ CB XM ML QG QI WG MQ TI MN IG CA HM BW XK FS XF LI NX GZ';\r\nvexp='PXYBGKHREZCVAWJMSFDTQUNLOI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MR MI HQ ZI XP OX MG KL XZ QL MB VN HO YL VI ZX HP AX CD DE WG DV EP JO CL HD KE GM NE UK PF KW ZM RE LG FY DZ OU LH EV FP DQ JL PR CT PK NH UQ HZ QW';\r\nvexp='AKRNIQBUFVYDSMJZPTWXLCOEGH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WA FT EY VK RI MD NS WZ QW PL DO SL LV WM OP HN OH JD KE OV NE TI PM RJ JL KY EA BQ XS AD VB FS XV QF GT HM MY JY FX IA XK RX GS NU KV RW BY CA GM ZO';\r\nvexp='OBXNTURDGPZCWIJHFKSYVQELAM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IP SP BP PL PS OP YP PI NP PU PGM PT PO AP EP TP CP PH RP PY HP PZ PB DP QP KP JP UP VP PR FP PQ PX PM MP PN GP WP PD PV PW XP PJ PC PF PE PA PK LP ZP';\r\nvexp='PGXNTOZKYRHADSBLQEJFWUCVMI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MC WC LC HF AF WF YC QC TC EC SC ZF IF RC ZC AC IC GC EF OF UC KC DC PF RF XF UF FC TF YF PC JF GF BC NF HC JC LF BF VF MF NC OC SF KF QF CF VC DF XC';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PF DF VL HY XK XQ BZ HT WM AQ LB HC LF AL JR ZB XA SQ OA EX OF JX QP MX QI OJ EN JP HS QS TV FV HU JK NJ VW PJ ZT AR YK UT ZE JF BP IM XF ZC LS EC VU';\r\nvexp='FXYZMSBVEPDRIUQHATGCNWOLKJ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LT DL LN LA LP KL OL WL LF QL GL LG TL LR NL RL LQ IL ML PL LJ CL LS LD EL JL LC LH LM YL LW LI VL UL ZL LX FL BL LV HL AL LO LY LU LZ LE LK KSL LB XL';\r\nvexp='AKINEMBQJVPUYCDHRFGZXOTWSL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WI KW PW WX VW WQ WN WE WC HW WG DW WD WM SW WA WO MW WY WU OW WV LW RW BW NW YW WR AW WS UW JW FW WT XW WZ ZW WF QW WK WH GW IW WJ WP WL CW EW WB TW';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BD BT BJ BUI MBUN BUQ BF BN BUS BUP BUA BW BUF BL BK BC BR BUJ FBUN BUY BP BI BH BUE BG BY BUD BO BQ BUW BM BUH YBUN BUZ BUM BUV BX BE BUR BUL BUO BUX BS BUG BUT BZ BA BV BUC BUK';\r\nvexp='ADPQETZGKJCNHOIMRSLYFWXUVB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZT UT HT ZZ BW LT ZW QT HW VW RT SW KT OW KW QW XW DW TW GW MW FT CT EW WT YW PT NW GT IT ST IW UW DT AW BT JW JT RW ET LW OT PW CW NT VT FW MT YT XT';\r\nvexp='WEZLGIVUJCDXBSOPNYQRFMKATH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WG YM WO TJ JO TN UV OD FI RS FO MN MR YS RH ZB LF ZA SE QP OH KR KF RI ZV MF ON BN QH ME MU UE ZT GC VU ZS UP SR FU NX QX NR YL VW QF OE ZD FB GB UA';\r\nvexp='EBXPWUHKNSCLYRDAOVMJZQIGTF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AN ET HT KT DT CT FT ON GT FN JT ZT VT TN JN YN ZN XT DN UT PT YT MT WT GN KN LN XN PN UN EN ST MN RT AT QT LT RN HN QN SN IN NT BT WN IT OT CN BN VN';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NF KU YF SF TU BF PU YU NU OF FU GF MF AU XF OU KF WU LF PF IF XU AF HF CF VU DU HU BU TF ZU WF JF UF RF ZF LU EF VF IU GU JU CU RU QU MU DF QF SU EU';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HO BA ZA SD SF ZW RE VN MO QK FI PD NC UQ PH OP HR LZ HY HZ CG YU AN MC EW QE JO UX RL ZF YK XA AV RH IA NX NG BI SG HS QG BW GJ CY QH NV FR HI PJ SH';\r\nvexp='AMITGVDKRNYFOSPECQZBJULXWH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QL QB QE QG QD QI XG XU XZ XL QF XS QY QH XA QU XT QO XK QC QR QS QT XW XH QN XY XI QM XP XB QK XV QV XF XN XM QW XO XR QX XE XQ XJ XD QJ QA QZ QP XC';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZIWCDOJXEVLBAPMRFHT JVHQGFXCWOKUYENPDRI UIMWSROLGHNAXTJBZYVPKCDQ LOJVG YNCRGWALHVJU IQRWJH TCVIYN MNLZTGHBO VOZFGPSXKTIQNWHBEARL DEW SUIXVZMWQNGFJPEHACRYOBTL DNLHKEVABRY DWPIUEXLVQJBYGM MJCUFONTGQH XW CGVLRZXPNWKQHDBY AEXTQCD DG HWKUGSCVYJMPINXATBLOF TAVJQMXBCUWN RFBGWNSLJCUQVAKEXOIT TNAQDKJEBPCMVSWGOZXYIR RLKFO BTXKLCNOV AO LGOQXCYMP HQIXLAOB KQSP GJBSYULWTARIKFCQO DSKEHGAMWPCVZFLQTYB XU WRJ EJCOQBFPNYXIKGZS IHRTYQCVSWOLEFDK WGDBECOQMZYPU VFRMWYAJQLOX AEFNOJHKGWTXRLZIBSDM GBAI MALFKYCXHZGQVWTOEDBPSIRN POJIHBYL QCAWXZBHRTYMD UEDNYVMHQ VKBTLDH XLZYBCNFORDMASHWGE RLZDOVPUJKWMNEFSCQYIH OLCBKWQGNDZE ZACRGBYMSINWQ ZBTC AXLEBTJSCWGUFHMZQVPDKINOR SPEQFHYXRGLTC';\r\nvexp='WRYCGUVXQISNDPHAJOTMFEZLKB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QM YQ NY HI QC AQ MW LN PK WL XK TW HG DB AR RY DN ZG XO MH QZ GR DA RF KR IF ZL YN HP HL KU PT IC YB OA RJ QI PW ZF RI WS PB NZ HA MA DY WD GO GQ HW';\r\nvexp='NXLDVJKBSITYCGMFOREWPZQUAH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VD UG JW EB UT EX ES BX GK WF VN OG US EP YU AH XJ WL SZ PZ DA IY WV PX IN VO UW RU ED KL XM DM CD LG CS KX IB AQ SH DK BA ME EO CW GC WT XT AU RL EV';\r\nvexp='PLKVYZNJHIMSTCBUAORGQFDWXE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HF XP XN HQ XH HI XS HL HT XZ HX XB HV XV HM XY XR XF HD HG HC HA XG XL XW HZ HR XI XM XE HW HB XU HY HS HU XO HK HJ HO XC XT XQ XK HE XJ HP XD HN XA';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DJT WNR FWG QV TH GY UP WH LP YWP VY QMF QIK VR YS JP MAW BY TCN PZ NFL AG VLO YZV NJ YD UG QEK AQ DB ESY WC GF XY JVR RY ZY IYV DPH QY JSZ XEW SMK FRX GRQ NH WG PZX UZ NCM';\r\nvexp='AKSTVBFGDIWREQXNPCMZUOLJHY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QB AU TR AJ SI BH FU KB VS FK UL QM TM GE WC OD WX RB XC JA DJ PQ FC YV WV QL CM FI CA TE UI CS GX MX WJ JC CE BU UJ OU NE XK CB LE NH QY TF TX XA UF';\r\nvexp='FVAZHLPRYUEXJMBIGQWTKDSONC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UYQWAJ IJEXGT RADYMIBEJFGKN OXNZH BKZ RDOJETUQKWYVHBZX AOGQLNZCEYKMJSFPURDHIT HXPRJDLNEIGVFZWQTASU EN VXKYGTOABRZDFIWLQ PJSGYZFHDILB MYHNVAESQTXUKG YLFVAWIBGREOCXSPTZUNMD UARXV ARLIFUMCXVKNOHBSPDEZTJ FMSOPJ VFXKHOGEPZYUDA DLXKUSQVBGOIZRYTEFNACWMHP QOCEJRWTIAKMFYNGPV DOSXEPFRQJZBLMGV AVF YLRVZUIHCBFKWDJGXNTOMQ RPSDQFNMKXGOYJACELV ALSOH HRTOPQAWDLBEIKFNCUZJM UWXTQCSKBZNOEYFAGLPMD VTS XB SDLUG WPFLYGACUQIXNJBMSDROEHVTZ GDQTFVSUNRPLHAJMEY XCNTI LJAXKWH WFQNXZOMJIK XAJDTRBYMVZENIKOLGCQHFW NHZMXEIVFDCSAQK BFEMAGNULJW WJRZEQHONX KOTWNQMLBHRVFSZAPYD RELGPAOJKBZTQDUSXMVFIC ZWHQKICMYJTRUBOFEGNADLSVPX ONSGXIYMHWLVR RAJ RF CPMABRIHGSLUQNTXEDOZKYWJF MFYRGICKELNSHOPAWZDBTQ OIJFSMAKGNBHRQYPTEWCLX PYRCUNWKZAQ NPMOIZQJLVTUCWRGYKSAH FXDZAMYRN';\r\nvexp='AVREHGQUFPJNLDOKXWZIMSYCTB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CN XG KO WB TX BI LF WF XM OJ CJ JO XP VP AZ LO AL NH XI ZS FJ EQ DY FQ PS BY UJ KR RC CU KU LZ SY PE FD ZD ZA GN DL MI GZ NB AM PW IO RM SI SF VT JZ';\r\nvexp='FUVXSABDCMLKIQOGPJRNWEHYTZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DP VF XI BS VE WA VP WJ UQ GY CR NP MI CP LH WK EZ VR AC PH CS XB JS JN RZ EQ YA JK QE PG JV WZ QZ YH QI ES IY AG JT KY VQ GS KN GT FM KH SU PN PU RX';\r\nvexp='ATRNHSQFKZOWXYMGBIUJDVLCEP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GF PY PC PE OF PT PZ NF PW PK WF PG CF YF PF PA TF PLFO PD PR EF PQ PN VF MF PX QF ZF BF UF KF PS PM PV PLFD PH RF PB PJ JF HF SF DF PO AF IF MPLF PU XF PI';\r\nvexp='FBTOERACUZWYJHVMIDSGKXPLQN';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IU RT XR YA OZ OF UW VN PK WT HR PX LY ZW SZ IK BE XH VW GV NM NY GX KH UZ MS UA CQ CV VS CF IR IN OY NB NZ GR TK RP NO RJ JO CE SY LH TX QB RB VH MY';\r\nvexp='AEBZTMJUFQHPOCXISDKWLNVGYR';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UL UO ANY GA YNE FMH PL ZHO OF KG EPK NFU OE VCS UR AM HBU NMD OUZ DY IL RI SL CPD OY AC YLE DK IR FDC IAT CZ ZPL BV XM VL XF WGU KZI DL SLN XC UGK UJ NA HZL PM TY IKW NU';\r\nvexp='LEWKQMYBNSOXVZCRJIFHPATGDU';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BN BI BGH BGP BF JBGL BH BGS BU BS BGF BQ BE BL BV BO BGZ BP BGQ BGJ BGK BGN BT BGY BGV BGM BX BZ BGO BA BGC BR BD BGA BY BK BGI BC BGR BGLS BGE BJ BW BM BGU BGT BGW BGD BGLA BGX';\r\nvexp='AORQKWXMYGDENHIVTJUZPFCLSB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WL DK KY UK GM DB VC JR PK AJ UZ LW CT QF MH LM HX VP BO HT FO YU TZ KC NG FC PV XR QY UR FS YP ZX AR DV GP ES QB LS KA RB EZ PD UY CH BI EU IX IK SQ';\r\nvexp='ABEFHZPWRVGUJDNLTOCYISMXQK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AX CL CX MX CZ RX CQ OX CE NX LCJX CH QX YCJX CA CB ZX CS LX PX CK CT HX DX CV WX CW CO GX CM CN YX KX CF CJXB CI IX TX FX BX CU UX CP SX CY EX VX CR CD CG';\r\nvexp='XULBSYFQVTZDKARPJHMEGNWIOC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MB UX MF MH UH UB UT UI UQ UEJ MP MG MV UF MD UV UO MJ UR UL MA UP UD MO MY UM UA MX UW MZ US UY MK UJ UK MC MW UN MN MU MT ML MS UC MQ UG ME UZ MI MR';\r\nvexp='UEIPJXKVRBDWYQTAFSOGLCZHNM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KE KS UV KZ EV KI KY BV NV XV MV KF KD KM KT KU RV TV KC ZV KN SV KA KV QV HV KO GV PV KL CV KQ LV KP KX KR FV IV OV JV KJ YV AV DV KH KG KW KB WV';\r\nvexp='VHRAUSYCWGJXIFEPBTDOLQZMNK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GZ UW UR UG UO QZ DZ CZ WZ UI UZ UH EZ VZ JZ UY UP SZ UD UV UF IZ UA UT UC RZ YZ UM UK UL TZ UJ HZ AZ US UB UN UE UQ KZ OZ XZ MZ UX FZ BZ LZ PZ NZ';\r\nvexp='ZXLCVMQIGTSEJRYFAHDWNPBKOU';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UL HA WL PA VA RA WA ZA UA AL QL JA OL KL CL DL JL GA XA EL XL IL VL YL TA BL GL YA IA EA NA HL ML FL TL MA FA ZL CA PL NL BA OA SL SA DA LA QA KA RL';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LR FT IR RT OR XR FR XT DR ER MR NT IT PR MT UTR QR UR VR CT GT WR VT YT BT NR UT SR WT AR ZT BR QT PT HT KR ST DT GR KT JT YR LT CR AT HR ET JR OT ZR';\r\nvexp='TRHIPEYZCFXODASNLJUGKMQWVB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HP JV LC OX XA TG RK GW FP DO EL FQ PD CH EQ GU FM SA YD ZU NJ SM BR YQ KT RZ ZP XU OF MC JA CD UT FC AR ZO RE YI SH NM ZJ OY MB HK QW FN JW HC WS JF';\r\nvexp='BIJMZYPEGDKOSNQUCAHTXWLVRF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VL LK LY XL LA LQ PL LT JL AL LZ BL LU LP RL LG CL GL QL KL LC HL NL LW LO ZL LE WL LR EL YL LX LH LD UL LM DL TL UOL LF IL SL FL LI LB LV LN LS LJ ML';\r\nvexp='AJYHPRCXMQGIEDBZSWNUFKVTOL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GS GC XQ XT GV XZ GX XO XB XF GW GK XV XW GR XI XM GB GO XA GA XP GU GT GF GM GD XS XL XY XN XG GY XH GL GH GE XD XE GZ GJ GQ XC GN XR XU GP XK GI XJ';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HW UH HC HZ WH HA HU HK HE DH AH VH HV TH HM HP HY HG XH HX LH HS HR HD QH GH KH HQ OH SH IH HJ HF FH CH RH JH HL HT HO HI NH EH ZH BH HN HB MH PH YH';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='FG IG HY JG UG TY GY XG VY ZY XY AG PY SG MG KG EG YG QY BY CG ZG RG CY NY FY SY LG LY PG WG BG VG AY NG WY DY TG IY OMY RY OG UY KY EY HG DG JY OY QG';\r\nvexp='GVUHTMYWAFLJENZBDKOSRCIPQX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RVELZJMSYOQUNIXTKDGHFCP XZSDNJIEKTUCMVBWF QFC IPXEBZSMDCHLQWJNUGK NEXKU FVTE QPWSFVRUBEZ XD RIOUBSFK XTUKDHORJGYPCWLNBMIVAE BMFSRUNKHOJI INZMOUAVQJ BFMWUXIQCRZNAEDHY DFHSTZNYVXEJLQRMBA RKN NBHVWTXRCPGUZ ZPCWVLYIMTXJDOFSKARQNEGU FVXZITHRCDPJE BKOEAGNXSUZCJTVQHFWDPM OVDWCNLAF HLYUJDTRF KFJU FDZBONYJCLPEHGWSVKUQMITXR EAJ ZPHIOWKTN EAISBGUDZRQKLHXTCNM RHVKBZPOADNY CIKWHQPTVJNYBOASFDZXGMRL FAXRGVWMNSHEIO JD RBHMS LWGXSDHZJ YZJICSUGDVRKBQA SNYUGPEOIQWZACVD WFXGPABYLUSIKODZTCQVNEHR BGJUQFWIZPHM SPKWETGHXBNUQAZDOVJC LOPDATIGFSNUHJQYWZRBMKXEVC XEJRGIMDHLFUYPCWKNQOBSZVTA VLIFMDAKE DIGR UGYHFRSZD GXBA TAXUGQLKH XUNIOBAYHTSPGEMQVWDRLFJK CYHQPBXVMLAOITFZD WFYKTHPEC WPRSXYGKBTMUZC HFTXMWPGECDZSLNIRYUJKO CKARHVPOZLISWFY';\r\nvexp='AOKPCBIWNMGQLFSHTXEJURZYVD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DO IH WO QH GH EO XH FO VH UO DH LO VO KH LHY CH UH FH JH EH TH PO BH TO YO QO IO HO JO SO XO NO GO AO BO KO WH ZO AH RH CO OH ZH SH PH NH RO MH YH MO';\r\nvexp='OSNGBDXZEKTJWIMYUQFARCPVLH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HV CJ RV VU LO OM ZG JU KL XU IT AN AJ SL DV AT CH PC UT DI EI NJ UO QL NS VI DY VZ PE XL LA YX OQ XF EK FY EF DR EM YD ZW DC TP BW MX YE WT JH WN ZM';\r\nvexp='AILHKUEVNQWMGFRBTOSXYZJCPD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VT VE VO GB VG CB JB VF FB QB HB NB VX VD VC SB DB VW KB VZ VJ VS VQ VU VR VK AB VB PB VP VY VI WB IB VL VN MB VA YB UB XB RB ZB TB OB LB EB VM VH';\r\nvexp='BJAIXSYPMFCHQEWDZKRUNTOLGV';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ED FR WF AO CQ IW BN BS LS HP FJ BV QM HV AV BJ HQ LN HR PE VR RE FC LF XK IQ RI XN ZK CF MP XZ QV OG TS XW FM RZ EY TM YZ BI SU SI QS YD HU CT IK UW';\r\nvexp='RHSCVQPJWLXGENIBMOTUKDZAYF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SD OY ML SU XU YX RU XY PY HX YT WD XZ PN JV UE RO NC VY PZ QP GS JN TM SO TC SY GT NV QC FW SX GB NL ZD TX ND OA QS KA PB UB TW MB KW RV UT OJ ER BJ';\r\nvexp='ULJQNPCEMVFIDZXRWKOTAHBGYS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HY BY PA MY XY PN RY PS EY SY KY PJ PX IY PG PDYX ZY VY PDYG PT PB QY JY UY PL PC PY PV PM PZ PW FY PH PU PO OY PR AY TY WY PE PQ PI PK PF HPDY NY GY LY CY';\r\nvexp='DYOMIJRHUSEFKTLQBWGCVNZXAP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OP ZN IZV RT HSI ZHF YWC YH QY OK YOD IZ FJB FVO XPQ NQ JN ME FA REN GP QW PZH OZP DF DJ GVA YT GI LN PC RYG NJ EPO US YWL LD IQ NEY TCH BRX GB FXR AEF MO DKZ WJ IJX LZX AU';\r\nvexp='ANWMKGQJLPUXSTEBFRCHIOVDZY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BN NS NB MN NV NP AN LN ON ND NA NK GN HN NY NX ZN SN QN NJ NT NM YN WN PN NZ NC NQ EN JN IN UN FN NU NH XN RN KN CN NO NE VN NW NF NR NL NI DN TN NG';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MI MD MC MA BW MO MF MW MZ MK BS BN BE BO MP MR BC BJ BH BG BY BA ABX BF MY MB BT MH MN BR ML BI MU BL BD ME BP MS BM MJ BU MG MX BK MV BZ MT MQ BV BQ';\r\nvexp='BXSUIFKHDTEYAWGOJPLZQNVCRM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RN VQ BT QG CW UX MZ DN UA TX QB DE KC YH NJ ZI TJ TC CO VH DJ GY UE RF CF EU IH QW YL NQ KR HK QZ JM TZ RQ QC YG HC WJ QX MP YJ XQ FK SM PT WZ EY XC';\r\nvexp='CUKSFNYTELADPZVJWBORMHXIGQ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AZ NX TX SN XP HO RF JP EG DB ER UV WN IG DO BT YK EB KB DE VI RW HV TW DI FE WY VD IF UO RY GS NK GI OH WL VL WG AM NH KI EZ WQ CO LV KP QZ FS IL GC';\r\nvexp='HAVSRMOJQPYFGLUWEKZXDCTNBI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OF UV HL JC WK XJ EM TM UF IQ XC MH EC UM PJ HT VC JO LN NW AH PM KN BU ZJ JA RJ BT KM TR CM PW ZL NC QM TV GL AQ UE LG GH RM UR QU GW ZY FP UN QK LF';\r\nvexp='TJHUPIVKENBLDWOYZCFSXQRGAM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WS IL ID WT WD IY IT IN WF IH IQ IS WZ WO WI WM IX IP IC WG WN IE WH WA IJ WL IW ZZ WQ IM WE WX WK Z IR IZ WB WJ WC WY WP WV IU IV WU IG IK WR IO IF';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QL UF UL VL BF YF NL IL ZF HF PF ML AF OF AL WL GF MF NF OL LF BL HL JL SL KL EL KF VF CL TL EF DL WF JF CF TF DF XF QF DGL XL RF RL YL SF IF PL FL ZL';\r\nvexp='FMQPUENTHJYRSGLIZBWDAKCVOX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AR BH LK JL TD XK HK RK KU RW QO BZ CM IA ZR WK WL GP XJ NK TS SU DN NJ YT TJ MU UM HW CX HX EA QL QV IH NG DU IO XV DY VH AZ VB DB IG CN FQ UZ MH SZ';\r\nvexp='SBGOQCLTVPXWJFDMZNIURAEYKH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SKI SQ SP SE SB SU SKR SKG SKZ SKJ MSKP SKM SL SKC SC SKW SO SKA SM SI SKPT SKD SG SKO SKN NSKP SX SKH SW SR ST SD SA SV SJ SKX SH SKL SF SN SKV SZ SKB SKF SKQ SKU SKY SKE SKT SY';\r\nvexp='AZCTJGBEDFRPQILKOHUWXYMVNS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KE KJ WE XS UK OT GF IF VY NI ZV CL HJ AV AM MO ES QM CO ST LU CI AU JX EJ JU CB IP DL QX GL AF AD LG DG QR EQ FZ AW FY HQ AN SX MY QS MC GC LD SM QB';\r\nvexp='QVUJEPMXFODNBRCHTGIYWKSLZA';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EA JE KN MZ TD KV NC ZG YH MO JX JC OM UI BA DH KS FL YX UT FX RF RW TG HF BJ QT ZT EC IZ QV GP CY OT EX QF ML GO LD GQ GL TB SQ WF WO GC GM MK JN NO';\r\nvexp='AZOLCRSHMFPNBUXTEYQIDWJVKG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XE VO CI GS AB CD LN PG FA XD KE TU XU DE AQ UD HL IB EI GY FJ OA YU MJ GT CH WO LI WQ JY UB SJ QJ ZG WI WK AL UV LX WD FQ FE KN CT XC GW RY PY MF IV';\r\nvexp='AZJCPTKSFIUORXMBEVQHYDNWLG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KG FS ZU JX CH PM XL IA JZ AP WD RS SX BT GC EG AW KD EL WE NH VW BJ CO DW LH PO RF AX LN OJ CB BR CX XJ IR ZY EZ RQ BZ YS WX FA KA BL VG WZ FT TN QH';\r\nvexp='ACSYROIFKEMZJULQVNDTBHPXGW';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NMOKZL YQADTPXVMEK AVELGHMKTQRUWIFOSJNZP PNMCQGI TG UCLTEHPSYKXFRQGMWANZBIOV ZEABLRXSGHJK LXQZCJOSD PMYXVARWGUSECBHDQNZKLIFT PEBDUYHJMQI KYIXRZJTA PLOBJXE CTUPZHXI TNLMJYOCEIQGZPDABHKUV NVBGMSKFIWYZAXPRCUET JHAGRN TYCDAQHWPXK ZQXMWKHETG KWYOZMFBHVQNLCUPG FNOQAETIDVPSMLBGZCUYR FDESNRU JSBFYZ VBQSDCPMFOHKZXI DNZLJXPMSGOERVKWHAYICFBQU EAOKPHQVD VBMPYRDIT FAGXUVN TUHROSPGCDJI OHSMTCRUYVPFBAZNQGDIEJ BOFWMSC NOCUGQF XFUKMEOBZSIQNVJYPW XVIFLSAYZRDH WLZIXRAUYKFDNHB VOAJGRYDEMFBZNWISXH JLHTYUBCFZRQA RKBWNMDYJAPGVCHIOUZXTE LWPQUSBTCEIZOAVKMGYRJXFN BDKZ LEDOHPUTJNV ELIYBCSWPRNZGKJ LOSTUBYNQXVZCWRGIEPAFD MNRI UHXLNPWKDZRMBAGTYSFCJQVOI QONLSME YTXEOZURJMIDALKBVN ZKYGRMBSDLIEPFVJQOXHNCU GTRMENSDFIWBCXYAOJHPQZU ZJTXAKPIQNYMLW RWGVQITLFPOMXNCUEHD';\r\nvexp='AOMLBEFYSKCRVUXHGPQWJIDTNZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JTIYSCR KYBNCVHUZOEFQGWXSRMDLT NQJEZFDWRMLAYKBVUSXPCG KLDHNEFMXYBP RMLGEPYFDT GNZXUFYTODHJVQRIMPC JDZGTRHFX ND UHOEKYVZRPSWGLJXNFQ YZRSG HVIWKTXMDFYCOSA ZODHRSGIVYALEMUQ QFLKYNJITBRACDVP FQZTVBMPLIKJXOGUHAYDCWRESN XLHRYIBUMDPCQOFN HMYTNAFKZOJLRGISCPXVEUQDBW KJOQGSIUCDYVRLATEFBWNZPHM ZAMHYSQEWCXRUNPIBDJT ZDKRHU OICRFYXWNHED TGCQYSP IBOLPZYUWJSDHNCVTMFXR WCQFXHSVRDAGEKUPNBJITMYL OLWZQBISETYJPMDNGUKF UGRWSPJADBCFNOXIEYMHTKLQV ZOEWBSRNUIYTJQDP QIBLMEHCAPDO DLCYANVBSFHWGTORK OJIZDVCMNSTPKAXUQBERYLFG DP FTKOYDSENCAQXBVJZUG WSMBGUHPAJVD NOPYILEVJ UYDXZFGJECQSIVPONBMRHLWAK KCZIPRXJQHTBAUOWVFYMLSE KXCGZVUL DXMU BKLSMCJUDQXAWPOIRZFVNTH RMABZCE PXOMV LFSGCXOMTYJEIN BLCSYFAOGDEXIPNJ VMIZKYXWNAFJHEGUPLRDSBC UD LUCGEQMOSDWVBX TZDMRJUNHLGEYIBSC XJQDPYENKRMFHUTBISA XLREUDNFOTMKWSJAPZCHIQBYV XLSKUHPOTDVZWMFANCRIEYQ CHDULZMIVXAJSYFQWGOTR';\r\nvexp='AMKVZSXCTNFLHWQRIJOGPEUBYD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZO SK IC OM CO IK TI BM BO NR VH LF OP YC FM GR HV EY FQ GL MX XP KO DY MS XQ DP DC PR KF OS LU EZ UP ZT VE NA WM XW RW MN IB VY TS LK PQ JN KR XE SM';\r\nvexp='AIUXVNQWBDKETCGYRLJOFZPSHM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PI UZK KF YRA TF KR FPG CKH NML HX LCO RPI YRG BFY RW LK EM UGJ NR DTI JS JMV CKD ZG FO BN LZ PG NZ QZO DRH DLF TE LH JWB USX NLZ FE BMP NY ZF AJ JF CJW QDO VWM IQO XQ EU IKN';\r\nvexp='AXGMSLRUYWDITZKHVBQJPCEONF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NM RC HM RY RW OM RU DM AM RI WM RQ RV RH XM RK RF RZ TM RG PM SM RJ IM RX VM RB RE JM RO KM RM RD RL RT RA RN LM ZM FM YM BM RS UM CM QM GM EM RP';\r\nvexp='MYHXBEFNPWQKZGODCUIAVJLSTR';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BM BZ BR BD LA LQ LS LI BN BW LU LB LZ LK LT LG LP BI BK LW LX BT LV LE LD BCN LH BQ BV LJ BS LO BY BF BH BX BP BA BL LY LN LR BE LM LC BU BJ BO LF BG';\r\nvexp='BCSXFRHZIMVJWYEPODTAQUKGNL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VF QV VS VN OV VZ VY VD VM MV AV NV Z IV KV VR YV JV VX ZV BV VT VC VL RV EV VJ GV CV VI UV WV LV VK TV VQ VB VG XV VW VU VP HV VE PV VO FV VH SV DV';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WD QPT ALC SCJ IT OF GED EU XA MLY ATE OP BK NXJ FS ZCD NOW GY IL QER UAI BJY FPB UOD XDB HYE MI FEK TI GKH UZ KR AN VNB BMH REY RQY PTZ WK MQH SR GOJ ZS UCL HCV UP EAI XWB LW OL';\r\nvexp='BNLJQDYXPUCAOGWTRMHSZKVIFE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AB DR KM VS XD ZS BK FJ GO JI ZK JK AE TB BU GH YD ZL PL DW TI PB YZ RG SF YX AI ER KU QH QF IN WB VB RX WP SC BR DF IV ZX MA IJ ZI SY BV AN QE GW AD';\r\nvexp='DNXVASJQWGPMFLORZEKCHIYTUB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YE SQ XL VY LZ MB ZS OC TP ML CA AS HR HQ NV XH OX DM FJ WO LC VP CK IE HK MC EQ CF NM GD KX BR XJ RD KG ZB CT PL SE AH JV TR FQ ND US OK DN KM TU KT';\r\nvexp='KAZILWYDUTFXMNBQVESOHGPJRC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XD JX MX OX XP GX DX XK XY XB NX XN XT XQ PX XR XV XE XH FX CX XC XI LX XU XO YX XW HX VX XJ XA WX ZX BX QX XF XG XS IX XL UX KX RX AX EX XM XZ SX TX';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OFA OX OFQ OJ OFW OFY OW OG OFB OQ OH OFH OFR SOFV OM OFD OFP OT OI OFI OFS OZ OFL OU OK OL OFE OFJ OFZ ON OFX OFVW OFC OB OR OE HOFV OY OA OFN OFM OV OFG OC OD OP OFK OS OFU OFT';\r\nvexp='AHDSTUJGPMIRFZQKLXNBVYECWO';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GI ZI FK FG WI PI JI FYIR FV VI FJ BI UI SI FW FC KI OI MI FQ FS FYIX EI FZ FU CI FO FA FX HI FE NI FM LI QI AI FN TI FL FR FD FI FB FYIL FT DI FH RI FP XI';\r\nvexp='IDYPQKVGBAUZNWJRSHTEMCLXOF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n\r\n%%\r\nglobal zstart\r\nzdelta=(now-zstart)*24*60*60\r\n\r\n%%\r\n%Stacy992 Solution\r\n% import java.util.*;\r\n% import java.io.*;\r\n% public class d {\r\n% \tpublic static HashMap\u003cString, Integer\u003e memo;\r\n% \tpublic static void main(String[] args){\r\n% \t\tScanner in = new Scanner(System.in);\r\n% \t\tint t = in.nextInt();\r\n% \t\tfor(int z = 1;z\u003c=t;z++){\r\n% \t\t\tint n = in.nextInt();\r\n% \t\t\tString[] words = new String[n];\r\n% \t\t\tboolean flag = false;\r\n% \t\t\tfor(int i = 0;i\u003cn;i++){\r\n% \t\t\t\twords[i] = in.next().toLowerCase();\r\n% \t\t\t\tif(words[i].length() == 1){\r\n% \t\t\t\t\tflag = true;\r\n% \t\t\t\t}\r\n% \t\t\t}\r\n% \t\t\tAhoCorasick.createAhoCorasick(words);\r\n% \t\t\tif(flag){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t\tcontinue;\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tArrayList\u003cInteger\u003e order = new ArrayList\u003cInteger\u003e();\r\n% \t\t\tfor(int i = 0;i\u003c26;i++){\r\n% \t\t\t\torder.add(i);\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tint steps = 10000000;\r\n% \t\t\tboolean found = false;\r\n% \t\t\twhile(steps \u003e= 0){\r\n% \t\t\t\tsteps--;\r\n% \t\t\t\tint state = 0;\r\n% \t\t\t\tboolean good = true;\r\n% \t\t\t\tfor(int i : order){\r\n% \t\t\t\t\tstate = AhoCorasick.transition[i][state];\r\n% \t\t\t\t\tif(AhoCorasick.term[state]){\r\n% \t\t\t\t\t\tgood = false;\r\n% \t\t\t\t\t\tbreak;\r\n% \t\t\t\t\t}\r\n% \t\t\t\t}\r\n% \t\t\t\tif(good){\r\n% \t\t\t\t\tfound = true;\r\n% \t\t\t\t\tbreak;\r\n% \t\t\t\t}\r\n% \t\t\t\t\r\n% \t\t\t\tCollections.shuffle(order);\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tif(!found){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t}\r\n% \t\t\telse{\r\n% \t\t\t\tStringBuilder res = new StringBuilder(\"\");\r\n% \t\t\t\tfor(int i : order){\r\n% \t\t\t\t\tres.append((char)('A'+i));\r\n% \t\t\t\t}\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": \"+res);\r\n% \t\t\t}\r\n% \t\t\t/*memo = new HashMap\u003cString, Integer\u003e();\r\n% \t\t\tif(flag){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t\tcontinue;\r\n% \t\t\t}\r\n% \t\t\tint ans = go(0, 0);\r\n% \t\t\tif(ans == 0){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t}\r\n% \t\t\telse{\r\n% \t\t\t\tint mask = 0;\r\n% \t\t\t\tint state = 0;\r\n% \t\t\t\tStringBuilder res = new StringBuilder(\"\");\r\n% \t\t\t\twhile(mask != (1\u003c\u003c26)-1){\r\n% \t\t\t\t\tint i = memo.get(mask+\" \"+state);\r\n% \t\t\t\t\tres.append((char)('A'+i));\r\n% \t\t\t\t\tmask|=(1\u003c\u003ci);\r\n% \t\t\t\t\tstate = AhoCorasick.transition[i][state];\r\n% \t\t\t\t}\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": \"+res);\r\n% \t\t\t}*/\r\n% \t\t}\r\n% \t}\r\n% \t\r\n% \tpublic static int go(int mask, int state){\r\n% \t\t\r\n% \t\t\r\n% \t\tif(AhoCorasick.term[state]){\r\n% \t\t\treturn 0;\r\n% \t\t}\r\n% \t\tif(mask == (1\u003c\u003c26)-1){\r\n% \t\t\treturn 1;\r\n% \t\t}\r\n% \t\tif(memo.size() \u003e 1000000){\r\n% \t\t\treturn 0;\r\n% \t\t}\r\n% \t\t\r\n% \t\tString key = mask+\" \"+state;\r\n% \t\tif(memo.containsKey(key)){\r\n% \t\t\tif(memo.get(key).intValue() == -1){\r\n% \t\t\t\treturn 0;\r\n% \t\t\t}\r\n% \t\t\treturn 1;\r\n% \t\t}\r\n% \t\tArrayList\u003cInteger\u003e order = new ArrayList\u003cInteger\u003e();\r\n% \t\tfor(int i = 0;i\u003c26;i++){\r\n% \t\t\tif((mask \u0026 (1\u003c\u003ci)) == 0){\r\n% \t\t\t\torder.add(i);\r\n% \t\t\t}\r\n% \t\t}\r\n% \t\t\r\n% \t\tCollections.shuffle(order);\r\n% \t\tint index = -1;\r\n% \t\tint ans = 0;\r\n% \t\tfor(int i : order){\r\n% \t\t\tif((mask \u0026(1\u003c\u003ci)) == 0){\r\n% \t\t\t\tint res = go(mask|(1\u003c\u003ci), AhoCorasick.transition[i][state]);\r\n% \t\t\t\tif(res == 1){\r\n% \t\t\t\t\tans = 1;\r\n% \t\t\t\t\tindex = i;\r\n% \t\t\t\t\tbreak;\r\n% \t\t\t\t}\r\n% \t\t\t}\r\n% \t\t}\r\n% \t\tmemo.put(key, index);\r\n% \t\treturn ans;\r\n% \t}\r\n% \tpublic static class AhoCorasick\r\n% \t{\r\n% \t\tpublic static final int ALPHA = 26;\r\n% \t\t\r\n% \t\tpublic static int nodeCount;\r\n% \t\tpublic static int[][] transition;\r\n% \t\tpublic static boolean[] term;\r\n% \t\t\r\n% \t\tpublic static void createAhoCorasick(String[] strs)\r\n% \t\t{\r\n% \t\t\tint maxNodes = 1;\r\n% \t\t\tfor(String s : strs)\r\n% \t\t\t{\r\n% \t\t\t\tmaxNodes += s.length(); // This could be passed in instead\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tint[][] children = new int[ALPHA][maxNodes];\r\n% \t\t\tboolean[] leaf = new boolean[maxNodes];\r\n% \t\t\tnodeCount = 1;\r\n% \t\t\tfor(String s : strs)\r\n% \t\t\t{\r\n% \t\t\t\tint node = 0;\r\n% \t\t\t\tfor(char ch : s.toCharArray())\r\n% \t\t\t\t{\r\n% \t\t\t\t\tint c = ch - 'a';\r\n% \t\t\t\t\tif(children[c][node] == 0)\r\n% \t\t\t\t\t{\r\n% \t\t\t\t\t\tchildren[c][node] = nodeCount;\r\n% \t\t\t\t\t\tnodeCount++;\r\n% \t\t\t\t\t}\r\n% \t\t\t\t\t\r\n% \t\t\t\t\tnode = children[c][node];\r\n% \t\t\t\t}\r\n% \t\t\t\t\r\n% \t\t\t\tleaf[node] = true;\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\ttransition = new int[ALPHA][nodeCount];\r\n% \t\t\tterm = new boolean[nodeCount];\r\n% \t\t\t\r\n% \t\t\tArrayDeque\u003cInteger\u003e queue = new ArrayDeque\u003cInteger\u003e();\r\n% \t\t\tqueue.add(0);\r\n% \t\t\tqueue.add(0);\r\n% \t\t\t\r\n% \t\t\twhile(queue.size() \u003e 0)\r\n% \t\t\t{\r\n% \t\t\t\tint node = queue.remove();\r\n% \t\t\t\tint suffLink = queue.remove();\r\n% \t\t\t\t\r\n% \t\t\t\tterm[node] = leaf[node] || term[suffLink];\r\n% \t\t\t\t\r\n% \t\t\t\tfor(int ch = 0; ch \u003c ALPHA; ch++)\r\n% \t\t\t\t{\r\n% \t\t\t\t\tif(children[ch][node] != 0)\r\n% \t\t\t\t\t{\r\n% \t\t\t\t\t\ttransition[ch][node] = children[ch][node];\r\n% \t\t\t\t\t\tqueue.add(children[ch][node]);\r\n% \t\t\t\t\t\tqueue.add(node == 0 ? 0 : transition[ch][suffLink]);\r\n% \t\t\t\t\t}\r\n% \t\t\t\t\telse\r\n% \t\t\t\t\t{\r\n% \t\t\t\t\t\ttransition[ch][node] = transition[ch][suffLink];\r\n% \t\t\t\t\t}\r\n% \t\t\t\t}\r\n% \t\t\t}\r\n% \t\t}\r\n% \t}\r\n% }","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":"2016-03-25T23:43:24.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-24T05:30:35.000Z","updated_at":"2026-04-01T12:22:42.000Z","published_at":"2016-03-24T06:05:37.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/8274486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Password Security\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the small-2 case of up to 50 passwords of length 1 to 26\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 random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\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 [PW], string up to 50 space separated passwords of 1 to 26 characters\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 [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\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 [PW] [Pstr]\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[[X] [IMPOSSIBLE] \\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]\\n['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ]]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.\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\"}]}"},{"id":1914,"title":"GJam 2013 Veterans: Ocean View (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View\u003e. This is the Large data set with N\u003c=1000 and Q\u003cN\u003c=1000, with typical 80.\r\n\r\nThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\r\n\r\n*Succinct Challenge statement:* Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\r\n\r\n*Input:* V , Vector length N\u003c=1000 with values 1 thru 1000.\r\n\r\n*Output:* Q , minimum quantity of removed values to produce a valid vector (typical 80)\r\n\r\n*Examples:* [V] [Q]\r\n\r\n  [1 4 3 3] [2]  for [1 4] or [1 3]\r\n  [1 2 3 4 5] [0]\r\n  [4 3 2 1] [3]\r\n\r\n*Commentary:*\r\n\r\n  1) nchoosek(1000,80) is a little big\r\n  2) The Large test suite is N\u003c=1000 with some delete cases \u003e4\r\n  3) A Good Algorithm that solves the Large case is usually best to pursue\r\n  4) GJam Competition allows one Large submission within 10 minutes of download \r\n  5) This was only solved by one entrant.\r\n\r\n\u003chttp://www.mathworks.com/matlabcentral/cody/problems/1913-gjam-2013-veterans-ocean-view-small Small Suite Challenge\u003e\r\n\r\n*Algorithm Spoiler:*\r\nA general method is to start at the end and build all unique length valid vectors. It is only necessary to maintain a Min Value and length for the potential solutions. Once all values are checked find the maximum solution length.  There are three key steps in this method: 1) If vin(j)\u003e Max of all solutions, start a new solution with length 1. 2) Find solutions that are 1 greater than vin(j). Update minimums of these solutions with vin(j) and increase length values.  3) Find solutions where mins\u003evin(j). Augment solution set by a single line of [vin(j),max length found +1]. 4) Find maximum length solution.  This method solved all 100 large cases in \u003c 2 seconds on Cody.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard#s=p2\"\u003eGJam 2013 Veterans Ocean View\u003c/a\u003e. This is the Large data set with N\u0026lt;=1000 and Q\u0026lt;N\u0026lt;=1000, with typical 80.\u003c/p\u003e\u003cp\u003eThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\u003c/p\u003e\u003cp\u003e\u003cb\u003eSuccinct Challenge statement:\u003c/b\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V , Vector length N\u0026lt;=1000 with values 1 thru 1000.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Q , minimum quantity of removed values to produce a valid vector (typical 80)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [V] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 4 3 3] [2]  for [1 4] or [1 3]\r\n[1 2 3 4 5] [0]\r\n[4 3 2 1] [3]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) nchoosek(1000,80) is a little big\r\n2) The Large test suite is N\u0026lt;=1000 with some delete cases \u003e4\r\n3) A Good Algorithm that solves the Large case is usually best to pursue\r\n4) GJam Competition allows one Large submission within 10 minutes of download \r\n5) This was only solved by one entrant.\r\n\u003c/pre\u003e\u003cp\u003e\u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1913-gjam-2013-veterans-ocean-view-small\"\u003eSmall Suite Challenge\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eAlgorithm Spoiler:\u003c/b\u003e\r\nA general method is to start at the end and build all unique length valid vectors. It is only necessary to maintain a Min Value and length for the potential solutions. Once all values are checked find the maximum solution length.  There are three key steps in this method: 1) If vin(j)\u003e Max of all solutions, start a new solution with length 1. 2) Find solutions that are 1 greater than vin(j). Update minimums of these solutions with vin(j) and increase length values.  3) Find solutions where mins\u003evin(j). Augment solution set by a single line of [vin(j),max length found +1]. 4) Find maximum length solution.  This method solved all 100 large cases in \u0026lt; 2 seconds on Cody.\u003c/p\u003e","function_template":"function Q = Monotonic_V(vin)\r\n  Q=0;\r\nend","test_suite":"%%\r\ntic\r\nvin=[636 246 970 933 361 461 584 712 636 765 900 534 318 948 214 664 649 649 218 159 962 712 215 173 238 112 898 670 665 321 652 653 918 621 585 631 433 520 694 68 285 593 954 954 540 167 970 188 167 187 346 480 899 912 652 488 375 550 157 40 222 808 692 492 781 628 122 565 147 167 985 783 759 938 89 651 104 58 838 623 244 536 102 494 799 106 981 526 7 137 917 228 297 608 71 77 587 544 641 85 ];\r\nvexp=[87 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[985 569 223 420 941 721 504 441 137 145 386 238 4 330 967 408 312 508 90 528 598 922 865 273 505 167 830 764 724 854 486 60 422 60 479 715 781 983 507 269 479 892 506 482 573 472 241 884 331 330 412 929 603 628 553 108 795 383 223 870 236 61 929 10 120 759 76 900 93 582 520 571 825 378 405 397 201 645 632 532 327 395 812 929 23 716 36 169 98 259 38 686 671 966 47 790 724 122 42 817 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[135 80 276 388 795 610 328 961 849 699 154 297 970 548 332 87 647 929 231 574 290 843 993 572 407 364 828 688 492 986 8 979 417 636 366 212 597 45 524 445 744 29 93 65 577 424 152 575 705 382 500 994 576 844 566 334 208 745 21 51 731 29 29 499 16 746 710 612 791 585 56 886 614 148 950 542 924 453 116 980 834 615 973 761 810 890 95 17 635 115 68 717 495 448 215 510 194 277 473 336 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[864 390 641 710 429 314 838 487 749 444 866 162 381 48 901 119 756 642 595 851 197 72 856 600 290 187 648 679 619 273 739 834 14 379 895 442 692 733 928 792 528 145 305 908 193 205 378 300 847 973 150 395 396 357 995 685 896 994 716 514 618 454 699 631 832 594 73 875 678 352 666 205 497 970 464 41 526 193 340 724 165 842 471 561 550 465 597 445 810 312 310 427 117 9 57 300 954 481 174 631 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[522 452 169 41 289 988 837 890 666 829 487 3 346 671 544 443 177 411 525 643 380 167 717 566 460 105 253 724 179 487 742 700 290 263 93 578 602 929 467 267 757 306 270 454 976 165 896 153 927 773 147 307 939 864 872 750 320 476 473 498 314 567 550 603 829 994 180 430 922 647 48 30 304 669 483 279 834 730 783 760 854 282 66 144 145 290 893 816 765 366 665 79 932 214 33 112 207 213 541 480 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 20 21 22 23 24 25 26 28 30 31 32 33 34 35 37 38 39 40 41 43 44 45 46 47 48 51 53 54 55 56 57 58 59 60 61 62 63 65 66 67 68 69 71 72 73 74 78 79 80 82 83 84 85 87 88 89 90 93 94 95 96 99 100 101 102 103 104 105 106 107 109 110 111 112 113 114 115 116 117 118 119 120 122 123 124 125 126 127 128 129 134 138 140 141 142 143 144 145 146 147 148 149 150 151 152 155 157 158 160 164 165 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 184 185 186 187 189 190 191 192 193 194 195 196 197 198 199 200 202 203 204 205 206 207 208 209 210 212 213 214 215 216 218 220 221 222 223 224 225 226 227 228 229 230 231 233 234 235 236 237 238 242 243 244 246 247 248 249 250 251 252 254 255 256 258 259 261 262 263 265 266 267 268 269 270 271 272 273 274 275 276 277 279 280 281 282 283 284 286 287 288 289 292 294 295 297 298 299 300 302 303 304 306 307 308 309 310 311 312 313 314 315 316 318 321 324 325 327 328 330 331 334 335 336 337 339 340 342 343 344 345 346 348 349 350 351 352 353 354 355 357 358 359 363 364 365 366 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 388 390 391 393 394 395 397 398 399 401 402 403 404 405 406 407 408 409 410 413 415 416 418 419 420 421 422 423 424 425 427 428 430 431 432 433 435 437 438 440 441 442 443 445 446 447 449 451 452 453 455 457 458 459 460 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 504 505 507 508 509 510 511 512 513 514 515 516 517 518 520 521 524 525 527 528 529 530 531 533 536 537 540 541 542 543 544 545 546 547 549 550 551 552 553 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 577 579 580 581 582 584 585 586 587 588 590 591 592 593 595 597 598 599 600 603 604 605 606 607 610 611 615 616 617 619 620 621 622 623 624 625 626 627 628 630 632 633 634 635 638 641 642 643 644 645 646 648 649 651 653 654 655 656 657 658 659 661 663 664 665 666 667 668 669 670 671 672 673 675 677 678 680 682 683 684 685 686 687 688 689 690 691 692 693 694 696 697 698 700 702 704 705 706 709 710 711 712 713 714 715 717 718 719 720 721 722 723 724 725 726 727 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 748 749 750 751 752 753 754 755 756 757 758 759 761 762 764 766 767 768 769 771 772 773 774 776 777 778 779 780 781 782 783 785 786 788 789 790 791 792 793 794 795 796 797 798 800 801 802 803 804 805 806 807 808 809 810 812 813 815 816 817 818 819 820 821 822 823 824 826 827 829 830 831 832 833 837 838 839 840 841 842 843 844 845 846 847 848 849 851 852 853 854 855 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 877 879 881 882 883 884 887 888 890 891 892 893 894 895 896 898 899 900 901 903 904 905 906 908 909 911 912 913 914 915 916 917 918 919 920 921 922 923 924 927 928 929 930 931 932 933 935 936 937 938 941 942 943 944 945 946 949 950 951 952 953 954 955 956 957 958 960 961 962 963 965 966 967 970 971 972 973 974 975 978 979 980 981 982 983 984 985 986 989 991 992 993 994 995 996 997 998 1000 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[656 151 894 432 577 271 474 259 534 441 734 522 365 493 942 532 175 900 688 139 374 59 422 443 326 64 804 69 733 90 372 740 240 265 172 168 536 997 778 421 437 511 942 801 4 236 685 530 487 372 21 860 430 442 302 107 857 458 175 941 899 899 32 138 163 555 657 50 551 435 471 987 945 764 140 300 351 176 182 837 547 202 48 329 995 350 435 203 159 962 495 57 860 526 546 374 81 202 424 631 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[160 284 529 233 858 58 181 837 14 284 240 425 835 57 402 496 430 135 982 713 622 716 909 963 253 31 790 307 273 291 321 432 574 201 16 431 259 196 620 624 479 211 49 666 268 450 161 49 936 494 762 558 561 22 520 814 404 662 120 676 952 792 459 877 993 474 308 603 670 279 578 500 489 978 517 108 427 30 157 363 523 270 272 84 643 791 249 47 804 720 74 107 863 533 984 207 6 643 809 27 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[717 997 953 616 739 418 429 967 875 551 327 828 991 994 841 796 268 640 537 215 847 996 558 831 282 117 696 696 386 518 188 103 867 140 70 957 557 498 923 783 400 601 962 391 595 803 538 214 794 74 428 640 70 337 823 351 454 518 398 191 388 585 293 254 724 715 562 280 564 484 414 964 436 376 706 30 530 243 595 323 668 375 314 89 711 136 792 516 6 189 707 745 774 351 350 497 65 911 129 629 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[339 92 136 280 51 932 913 389 388 240 645 424 760 147 8 880 39 875 953 822 525 377 243 505 978 181 421 497 443 665 862 133 108 998 412 158 281 677 898 668 916 543 91 675 689 451 906 79 677 210 901 201 587 495 705 564 27 477 60 469 493 274 601 600 623 365 110 903 41 7 922 956 901 364 982 941 166 888 20 842 97 272 43 35 766 99 598 792 576 10 613 420 283 565 20 905 929 129 159 969 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 4 6 7 10 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[902 371 99 852 750 675 90 760 805 58 948 19 245 440 484 372 354 920 794 849 927 838 454 61 432 979 709 266 797 673 155 698 395 253 902 144 927 991 256 731 400 203 101 996 642 936 719 348 856 512 196 134 701 649 194 484 628 255 102 424 927 256 122 673 508 375 169 434 365 424 517 765 978 969 112 971 905 831 318 112 694 514 245 395 162 791 878 789 45 331 565 323 586 38 347 93 412 515 879 776 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[745 222 207 664 944 756 340 17 820 810 426 512 977 342 97 68 374 759 193 308 24 106 963 317 227 746 262 260 405 645 380 149 866 938 164 162 694 504 178 865 313 955 376 641 297 824 60 22 583 252 330 958 358 644 274 936 389 535 195 145 179 575 646 397 512 809 558 557 312 87 422 977 393 149 617 41 973 677 63 907 280 744 864 989 387 489 924 127 23 119 623 554 45 268 302 556 77 859 465 740 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[483 135 335 407 908 857 578 767 378 156 248 269 292 372 111 5 821 150 426 334 446 615 791 5 517 928 677 194 68 908 122 550 42 808 309 302 664 886 420 41 41 668 309 684 39 771 688 212 921 465 545 366 79 687 722 595 614 398 140 33 657 261 583 698 420 891 999 84 128 771 476 520 438 137 203 828 907 242 391 179 706 287 544 784 973 617 730 939 14 869 971 670 481 905 720 900 147 70 335 274 ];\r\nvexp=[80 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[449 699 779 845 562 962 785 857 407 939 248 891 282 197 497 444 329 886 476 573 390 526 492 686 583 679 622 471 498 176 415 946 875 545 143 788 506 927 644 264 218 244 155 851 440 651 646 768 888 121 693 277 998 184 314 580 214 935 50 63 110 816 9 336 712 503 123 217 429 119 481 646 362 987 848 153 989 493 272 876 613 964 504 962 499 817 893 64 751 294 127 860 461 487 196 172 989 670 389 769 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[506 358 525 125 131 493 597 657 174 465 212 984 660 340 197 879 464 893 546 146 446 858 66 893 292 295 771 364 324 233 803 830 591 327 306 73 819 254 81 345 70 644 328 729 984 524 960 447 768 505 944 566 362 10 458 653 304 228 369 628 812 523 809 754 849 466 827 20 719 259 716 789 903 43 869 238 919 828 36 38 685 980 603 46 989 60 51 292 639 771 271 803 293 431 556 141 896 382 512 967 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 201 457 409 579 138 659 919 860 512 119 881 554 984 460 612 370 104 453 607 792 323 877 982 906 932 419 986 615 397 771 618 950 580 378 528 69 37 446 280 900 917 160 806 900 972 417 269 75 222 227 219 896 455 200 801 386 618 138 1000 367 909 970 316 840 699 195 908 87 992 187 987 908 699 792 807 670 560 428 744 133 654 314 29 461 514 829 846 483 967 198 201 227 519 516 418 217 62 325 656 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[536 287 975 835 202 487 189 178 104 222 6 933 565 70 493 646 121 949 836 462 586 175 876 615 42 687 243 401 489 327 78 24 613 404 858 166 890 398 344 345 620 701 629 536 770 121 533 242 421 368 703 7 894 930 973 935 968 215 688 457 893 117 480 857 872 690 23 113 87 718 458 58 770 86 945 891 559 477 132 979 196 186 337 90 467 309 376 434 875 415 890 767 531 722 624 402 763 998 867 849 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[833 191 187 681 160 2 73 38 194 412 113 711 605 583 623 155 399 219 599 208 883 909 986 999 269 395 299 222 875 824 204 59 15 390 91 526 743 163 563 936 927 676 646 531 610 268 37 9 839 636 568 721 896 554 71 516 948 369 89 174 193 292 585 559 33 675 84 775 838 647 62 764 674 708 646 283 327 683 643 517 670 211 237 917 764 660 784 63 28 872 236 572 515 820 130 899 495 214 673 684 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 3 2 1 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[544 765 207 299 570 502 839 142 76 830 438 777 696 718 720 628 215 31 72 544 666 606 940 218 865 169 973 254 550 831 129 446 948 335 744 517 188 582 10 616 764 447 392 459 164 464 438 731 846 509 626 511 114 565 80 331 85 52 584 634 235 64 79 534 750 174 50 937 108 411 552 871 858 296 681 373 759 119 455 956 979 432 466 93 348 898 775 432 301 358 66 887 421 496 420 522 22 821 458 129 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[785 582 933 107 851 569 822 33 992 796 966 99 985 62 5 70 257 409 548 674 546 105 824 71 10 447 326 723 819 799 22 955 380 306 62 582 874 883 966 217 30 931 316 15 993 320 84 601 728 983 626 273 87 801 695 96 247 373 819 65 171 192 372 902 497 433 835 723 667 800 939 697 83 606 63 427 925 498 27 4 480 653 629 919 453 323 366 52 695 536 116 217 727 839 118 576 623 304 650 290 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[379 605 855 323 94 992 160 884 141 954 836 48 258 937 651 919 261 967 418 311 554 590 622 688 538 87 844 682 520 888 740 250 845 594 925 938 586 436 822 78 390 9 477 647 297 128 918 557 94 335 220 1000 276 193 687 165 279 882 846 151 122 585 752 966 531 676 255 468 112 76 545 501 436 21 147 733 500 416 641 594 750 860 945 377 52 983 542 331 865 739 833 986 676 584 303 206 260 557 673 371 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[954 932 241 707 209 356 476 772 941 695 374 528 156 421 13 187 443 842 884 139 129 463 369 117 721 356 808 952 976 529 501 929 812 93 987 20 449 814 143 741 508 516 620 16 936 985 202 730 826 85 868 954 548 589 422 620 296 230 923 271 110 423 551 922 516 889 941 316 703 84 408 210 951 27 577 239 11 778 968 836 215 188 141 114 776 915 85 71 144 8 693 253 782 595 526 649 483 467 964 537 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ];\r\nvexp=[999 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[861 880 573 826 28 522 719 303 975 834 282 160 800 606 921 962 496 15 978 482 481 397 198 328 845 412 189 390 688 662 77 901 541 649 78 920 522 797 222 848 982 855 8 134 461 280 95 956 294 424 437 126 821 986 453 17 397 642 758 437 303 186 689 195 186 766 115 707 914 688 907 248 895 914 381 355 193 827 662 838 250 450 315 422 435 768 438 183 761 547 971 415 732 659 609 269 777 75 328 690 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[212 86 799 237 145 796 871 824 830 514 340 499 724 577 767 487 236 550 901 615 773 136 539 639 308 20 537 802 585 561 837 148 647 987 384 143 782 607 966 612 120 306 462 843 234 229 681 821 130 581 435 255 68 325 893 375 697 782 528 281 342 364 429 340 350 164 483 484 770 448 95 241 753 556 435 338 136 467 158 266 399 945 872 467 269 764 841 965 897 721 598 239 436 378 930 138 541 412 621 663 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[153 433 497 818 590 42 657 625 619 100 678 271 684 627 284 600 980 569 862 178 530 692 225 1 239 891 474 710 719 529 477 872 313 973 689 255 15 697 879 633 148 909 255 831 535 890 430 866 459 644 44 340 335 620 340 925 510 165 986 229 694 462 100 358 434 140 612 800 836 843 784 984 751 391 166 637 280 948 855 90 943 250 429 629 869 768 905 379 285 890 959 330 351 410 687 136 549 299 288 736 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[422 107 359 466 750 64 127 249 677 702 213 920 568 385 70 37 787 149 971 26 915 76 17 851 728 43 738 163 767 379 341 540 838 51 357 939 466 483 188 143 184 752 62 751 137 484 139 275 632 462 300 898 537 316 749 265 359 838 779 477 569 471 368 758 521 724 696 987 558 883 481 741 987 542 843 123 25 334 749 9 147 48 906 683 715 6 299 73 196 78 901 764 900 268 521 421 343 216 759 900 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[830 800 491 470 290 893 711 316 603 32 241 822 608 314 513 533 514 537 19 447 670 582 20 35 543 428 35 411 413 882 8 594 33 498 63 674 743 125 990 697 156 230 870 764 895 735 648 408 271 19 207 292 952 578 326 846 5 712 257 769 945 264 362 329 114 776 3 856 900 344 904 407 925 774 522 819 508 170 579 130 540 785 773 843 714 450 688 70 161 944 838 458 560 551 786 673 678 788 880 929 ];\r\nvexp=[79 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[43 360 9 945 127 32 574 617 273 710 476 930 679 187 746 569 725 493 693 539 527 933 487 508 562 719 739 403 813 707 484 855 67 493 151 545 876 725 162 500 434 989 429 112 176 526 32 252 19 77 790 545 9 629 404 922 699 143 676 864 849 511 70 267 3 221 164 230 297 325 730 730 313 158 194 840 684 577 443 54 653 585 598 13 565 353 934 263 847 609 478 48 120 548 314 474 120 477 704 416 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[290 747 892 267 715 356 238 619 186 555 82 879 420 327 625 582 469 855 722 865 185 638 187 771 675 533 215 86 400 93 214 689 839 457 956 906 812 545 876 349 451 958 580 871 284 204 804 104 410 877 968 947 515 506 69 189 38 283 627 789 728 840 478 918 296 785 823 460 329 699 808 779 656 739 649 291 943 804 394 704 681 713 650 195 218 718 383 607 353 9 396 80 200 225 997 848 9 820 307 337 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[226 923 398 567 407 187 615 980 2 14 380 144 628 177 231 799 501 612 159 124 261 636 742 374 458 143 404 885 207 225 671 784 147 420 703 905 958 669 236 312 682 615 455 309 144 37 460 996 648 618 119 909 605 212 282 414 354 37 651 561 261 321 696 759 93 398 663 50 419 251 361 100 865 167 761 8 203 220 3 851 837 473 111 793 685 392 206 38 781 856 950 393 529 998 152 973 747 166 22 165 ];\r\nvexp=[80 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[456 940 338 538 898 400 964 822 249 990 178 80 994 806 998 799 480 364 850 175 899 317 743 978 156 861 905 778 516 906 419 971 845 108 508 742 859 823 916 107 165 445 187 158 250 184 956 81 899 157 255 150 474 998 127 981 210 383 110 77 288 529 48 484 988 907 578 847 730 845 953 894 289 139 403 890 675 711 970 573 867 577 722 692 926 200 672 135 934 134 563 221 14 610 57 1 517 986 847 598 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[416 735 265 633 901 377 640 456 596 995 306 784 819 768 576 855 159 133 245 939 341 546 332 221 543 835 193 290 1000 566 806 416 300 70 48 201 446 39 656 393 385 313 176 204 80 103 410 590 236 654 881 928 200 564 148 94 398 340 735 749 905 541 164 557 962 563 109 408 954 116 152 338 780 328 893 859 782 303 800 369 956 680 296 507 595 443 953 992 134 687 741 391 227 256 947 189 171 407 948 124 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 33 63 78 82 85 92 101 113 125 138 175 183 196 211 224 250 287 345 368 388 426 447 477 491 504 524 575 579 581 621 694 712 720 737 745 747 784 793 802 813 827 829 853 858 919 924 929 939 960 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[751 767 289 186 348 753 835 126 830 440 200 582 596 824 917 356 380 767 870 274 279 308 426 749 518 607 719 233 246 57 756 348 823 396 885 170 500 719 647 329 158 198 263 753 21 179 461 752 297 682 26 927 989 803 28 858 762 746 442 7 154 197 706 977 593 590 498 92 308 497 773 818 46 35 922 419 565 734 170 861 416 547 140 404 702 167 262 463 264 703 821 417 252 526 745 196 115 595 287 774 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 2 4 3 5 6 8 7 10 9 11 12 14 13 15 16 17 19 18 20 21 22 24 23 25 26 28 27 30 29 31 32 33 34 36 35 37 38 40 39 41 43 42 44 45 46 48 47 50 49 51 52 53 55 54 56 57 58 60 59 61 63 62 64 65 66 68 67 69 71 70 72 73 74 76 75 78 77 79 80 82 81 83 84 85 87 86 88 89 91 90 92 93 94 96 95 98 97 99 100 101 102 104 103 106 105 107 108 110 109 111 112 114 113 115 116 118 117 119 120 121 123 122 124 125 127 126 128 130 129 131 132 134 133 135 136 137 139 138 140 141 142 144 143 145 146 148 147 149 151 150 152 154 153 155 156 157 158 160 159 162 161 163 164 165 166 168 167 169 170 172 171 173 174 176 175 178 177 179 180 181 182 184 183 186 185 187 188 190 189 191 192 194 193 195 196 198 197 199 200 201 203 202 204 206 205 207 208 209 210 212 211 214 213 215 216 217 219 218 220 221 222 224 223 226 225 227 228 229 230 232 231 233 235 234 236 237 239 238 240 242 241 243 244 246 245 247 248 250 249 251 252 254 253 255 256 257 259 258 260 261 263 262 264 265 266 268 267 269 270 272 271 274 273 275 276 278 277 279 280 281 283 282 284 285 287 286 288 290 289 291 292 293 295 294 296 298 297 299 300 301 303 302 304 305 307 306 308 309 310 312 311 313 315 314 316 317 318 320 319 321 322 324 323 326 325 327 328 330 329 331 332 334 333 335 336 337 339 338 340 341 342 344 343 346 345 347 348 349 350 352 351 353 354 356 355 357 359 358 360 362 361 363 364 365 366 368 367 370 369 371 372 373 375 374 376 377 378 380 379 381 383 382 384 386 385 387 388 390 389 391 392 393 395 394 396 397 399 398 400 401 403 402 404 406 405 407 408 409 410 412 411 413 415 414 416 417 418 420 419 421 423 422 424 426 425 427 428 430 429 431 432 433 435 434 436 437 439 438 440 442 441 443 444 445 447 446 448 450 449 451 452 453 455 454 456 457 459 458 460 461 462 464 463 465 467 466 468 469 470 472 471 473 475 474 476 478 477 479 480 481 483 482 484 486 485 487 488 490 489 491 492 493 495 494 496 497 499 498 500 501 502 504 503 505 507 506 508 509 511 510 512 514 513 515 516 517 518 520 519 522 521 523 524 525 527 526 528 530 529 531 532 533 535 534 536 538 537 539 540 542 541 543 544 545 546 548 547 550 549 551 552 553 555 554 556 557 559 558 560 562 561 563 564 565 566 568 567 569 570 572 571 574 573 575 576 578 577 579 580 581 583 582 584 585 586 588 587 589 590 592 591 593 595 594 596 597 599 598 600 601 602 604 603 605 606 608 607 609 611 610 612 614 613 615 616 617 618 620 619 622 621 623 624 626 625 627 628 629 631 630 632 633 634 636 635 638 637 639 640 641 643 642 644 646 645 647 648 650 649 651 652 653 654 656 655 657 659 658 660 662 661 663 664 666 665 667 668 669 671 670 672 673 675 674 676 677 679 678 680 682 681 683 684 685 686 688 687 689 691 690 692 693 694 696 695 697 698 700 699 701 702 704 703 705 707 706 708 709 710 712 711 713 714 716 715 717 718 720 719 722 721 723 724 725 726 728 727 730 729 731 732 734 733 735 736 738 737 739 740 741 742 744 743 746 745 747 748 749 751 750 752 753 755 754 756 758 757 759 760 761 763 762 764 765 766 768 767 769 771 770 772 773 775 774 776 777 778 780 779 782 781 783 784 785 786 788 787 789 790 792 791 793 794 796 795 797 799 798 800 801 802 804 803 805 806 808 807 810 809 811 812 814 813 815 816 817 818 820 819 822 821 823 824 826 825 827 828 829 831 830 832 834 833 835 836 837 838 840 839 841 843 842 844 846 845 847 848 849 850 852 851 853 854 856 855 857 859 858 860 861 862 864 863 865 866 868 867 869 870 872 871 873 875 874 876 878 877 879 880 882 881 883 884 885 886 888 887 889 890 892 891 893 895 894 896 897 898 900 899 902 901 903 904 905 906 908 907 909 910 912 911 914 913 915 916 917 918 920 919 921 923 922 924 925 926 928 927 929 930 932 931 933 935 934 936 938 937 939 940 941 942 944 943 945 946 948 947 949 951 950 952 954 953 955 956 957 958 960 959 962 961 963 964 965 967 966 968 970 969 971 972 974 973 975 976 977 979 978 980 981 982 984 983 986 985 987 988 990 989 991 992 993 995 994 996 997 999 998 1000 ];\r\nvexp=[250 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 19 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 4 3 3 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[815 768 572 413 61 287 382 520 43 814 125 344 903 447 878 702 868 762 461 590 511 448 907 997 74 333 918 953 644 230 54 810 349 625 222 409 264 955 280 306 120 756 1 22 203 878 76 422 991 536 12 853 983 918 850 57 603 767 361 598 348 766 408 696 743 981 104 6 936 383 663 55 138 15 429 692 244 504 114 234 39 477 87 21 394 288 429 996 406 141 594 753 907 1 448 649 333 903 6 268 ];\r\nvexp=[87 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[715 324 259 836 409 555 726 967 384 857 298 931 42 986 20 508 647 748 941 873 162 183 992 45 256 967 798 18 964 664 218 30 987 828 865 748 383 590 66 118 446 715 48 839 701 420 346 347 519 638 571 680 172 562 76 779 528 874 796 843 537 366 872 876 193 88 623 927 677 40 44 474 755 444 312 455 863 9 153 381 999 723 412 522 637 488 301 164 361 96 7 249 461 230 124 6 318 98 932 346 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[522 99 461 301 778 354 511 560 8 662 280 315 694 576 174 288 370 126 632 856 812 724 246 391 979 544 931 501 950 230 624 823 328 437 475 458 142 985 369 149 646 648 463 339 223 988 979 945 113 610 800 277 333 45 19 663 940 949 164 241 178 787 63 857 223 537 666 716 873 34 864 870 682 679 209 256 666 187 200 131 148 351 407 480 395 425 142 686 725 305 926 254 444 340 110 18 876 776 734 100 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[986 869 904 402 636 104 209 757 705 337 301 740 169 404 572 415 22 827 117 133 872 263 503 640 737 654 616 432 752 268 954 737 136 858 138 772 313 698 528 18 386 180 109 906 583 32 320 956 859 436 88 82 50 591 73 138 596 41 570 347 308 523 83 443 380 572 566 45 621 445 62 6 625 522 911 559 554 230 515 764 18 954 197 67 896 269 205 491 661 774 837 968 648 271 763 28 194 328 424 814 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[835 78 7 863 573 841 832 653 720 351 56 298 397 179 562 636 299 542 569 853 327 320 54 147 328 355 444 206 343 100 546 529 529 904 392 102 96 575 106 816 926 514 465 674 692 27 309 990 568 229 195 246 900 248 392 579 954 187 785 648 638 330 177 519 233 920 972 329 494 77 496 771 590 960 796 634 986 105 975 905 685 521 150 585 768 893 515 74 432 299 73 421 980 601 939 565 520 910 245 14 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[626 750 682 840 23 620 651 542 846 79 714 942 624 759 272 636 101 647 505 954 823 212 398 949 431 870 68 568 133 370 720 758 471 753 949 845 725 952 387 570 382 452 864 6 210 135 641 662 133 145 615 307 708 365 255 138 586 675 706 718 396 777 828 866 882 776 710 606 727 448 527 461 900 390 466 461 877 458 123 361 954 89 668 662 805 922 799 390 948 856 108 343 985 287 208 866 62 270 471 141 ];\r\nvexp=[79 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[235 228 987 190 889 791 317 684 110 217 895 566 657 188 402 731 514 485 602 606 767 410 328 583 701 500 772 884 333 161 654 919 740 993 461 629 135 129 312 244 346 206 161 2 394 562 84 259 399 685 865 165 447 544 99 499 395 870 382 79 382 388 997 122 732 457 750 866 938 413 109 283 971 270 636 716 183 72 974 581 108 190 97 554 733 196 405 479 417 786 557 799 525 554 272 256 362 373 121 299 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[993 227 107 247 622 327 484 892 155 519 281 839 498 884 236 838 295 638 482 286 408 752 88 700 535 643 193 782 377 56 748 721 635 206 967 608 533 802 499 39 320 779 229 170 14 464 7 661 454 840 946 213 592 385 265 478 27 457 259 755 864 7 475 498 564 793 105 96 594 955 134 266 86 362 787 99 178 145 759 983 985 56 195 928 440 459 405 819 267 663 573 131 21 400 980 585 544 437 32 138 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[637 668 675 126 34 103 818 277 606 283 510 996 759 948 368 504 587 149 500 992 289 445 744 547 797 543 195 129 445 552 749 81 571 423 207 604 877 376 880 834 10 742 829 120 41 196 975 628 696 474 619 985 270 715 883 66 257 430 547 702 981 647 134 552 69 692 155 945 419 35 130 780 776 958 251 816 505 226 795 201 699 766 537 321 480 419 738 736 848 636 789 829 282 275 732 350 318 886 646 737 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[520 971 78 333 535 918 930 357 193 69 399 244 246 841 552 833 468 478 785 476 173 296 215 260 277 366 692 711 363 448 381 235 418 459 919 304 728 848 660 272 916 410 868 513 602 419 346 70 249 482 545 421 130 111 681 758 828 724 468 190 171 201 776 940 659 694 244 738 893 255 361 161 17 228 673 618 999 18 687 247 852 583 667 981 693 699 738 520 423 557 710 945 757 837 237 767 531 832 856 775 ];\r\nvexp=[78 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[161 949 970 194 627 530 802 645 68 353 775 215 704 181 694 450 957 187 136 33 844 61 286 287 753 747 656 628 874 389 80 35 690 49 228 316 578 381 312 645 734 86 211 437 618 904 886 574 442 21 606 285 434 243 923 186 990 579 165 863 319 244 897 8 644 477 676 221 857 987 217 590 425 427 378 42 682 264 968 124 636 573 760 421 168 683 958 157 613 123 19 283 718 268 643 362 744 670 934 952 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[921 739 879 409 716 747 869 495 776 25 857 651 646 480 86 288 622 686 334 426 757 408 532 619 292 515 826 649 157 986 28 429 724 906 838 440 4 706 934 132 82 142 782 727 973 219 366 594 256 700 19 12 459 903 982 750 769 807 398 278 145 425 706 868 682 543 659 686 600 944 817 33 437 950 759 409 520 477 355 775 176 725 786 634 627 767 735 396 926 132 673 70 909 378 289 590 273 300 275 224 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[211 588 861 514 609 695 144 442 425 927 553 630 208 971 774 704 612 666 871 376 31 535 806 314 101 839 425 659 403 965 139 613 905 999 126 513 694 269 306 470 547 210 99 106 180 872 161 791 890 31 519 272 566 676 586 666 866 10 324 268 327 814 880 583 165 5 95 858 626 752 679 172 961 777 630 141 1 790 283 242 821 801 513 738 829 98 403 694 460 78 962 786 244 841 368 408 198 814 617 175 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[345 356 192 379 626 146 339 157 374 419 580 561 192 746 68 231 668 760 231 149 516 13 702 426 515 688 214 702 980 729 501 324 436 692 55 414 189 745 922 914 515 501 827 58 246 894 288 265 654 519 766 521 883 819 298 397 507 512 98 838 240 951 513 28 642 919 441 183 663 362 448 530 215 274 587 812 168 227 77 173 745 194 693 979 12 991 375 518 854 825 355 93 775 220 472 768 138 912 302 153 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[55 561 739 879 938 143 627 491 788 610 374 114 357 185 42 379 252 430 547 702 40 936 387 710 253 785 499 328 258 892 496 312 453 235 542 742 377 520 232 516 129 605 981 485 141 375 215 745 804 113 446 195 48 184 904 652 968 754 980 225 646 475 888 450 709 429 191 438 300 775 953 428 731 934 265 224 308 831 968 463 944 413 657 343 596 912 995 563 665 326 139 662 152 26 111 213 806 654 650 105 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[115 234 289 9 499 669 715 43 847 376 880 97 177 546 518 963 313 308 145 425 206 468 839 290 126 800 558 254 874 885 296 988 470 584 348 968 605 62 10 451 789 241 547 317 787 417 279 451 76 776 876 281 243 714 570 368 513 480 622 739 364 917 78 186 852 426 153 456 839 163 907 980 403 453 296 189 221 575 992 296 350 867 929 592 580 498 311 445 329 284 183 45 552 260 230 404 37 382 859 876 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[377 312 592 156 382 321 20 986 965 831 995 59 736 919 383 679 650 258 427 674 392 926 663 374 319 161 553 406 353 268 485 729 931 428 237 664 100 256 649 64 439 995 474 526 266 857 204 915 114 631 940 857 908 955 230 578 115 134 335 819 753 172 548 35 951 784 698 403 391 698 818 181 693 292 706 310 500 262 576 613 892 515 821 151 469 402 80 935 888 414 754 992 937 301 27 888 436 724 290 178 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 5 6 1 7 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[702 390 16 146 565 919 452 746 471 596 64 700 367 25 892 634 431 175 691 493 279 938 37 406 397 833 103 910 422 299 743 475 41 759 621 605 677 424 702 499 371 117 550 737 141 442 370 923 968 412 415 246 349 804 3 97 636 105 6 409 755 749 236 795 859 208 751 535 631 804 386 1 921 935 89 413 376 458 336 695 222 102 940 570 905 294 667 540 398 24 301 505 124 536 651 982 743 402 517 373 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[294 606 149 273 390 992 232 883 106 284 406 537 904 323 960 281 898 282 973 120 668 189 94 950 572 109 382 247 197 864 338 490 470 838 762 859 829 345 93 287 629 850 823 884 173 783 165 422 416 489 541 84 677 634 33 600 94 415 847 290 630 184 779 99 373 892 310 201 589 754 487 217 604 662 452 128 444 968 549 859 456 89 294 485 74 327 84 520 93 930 809 722 465 940 173 837 183 482 390 771 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[138 328 820 892 771 483 698 985 844 850 717 842 924 128 363 560 967 15 76 679 111 434 928 923 663 51 280 980 149 564 326 286 891 497 177 13 331 874 349 174 75 65 367 350 544 82 262 863 96 689 541 558 122 468 833 784 519 112 116 19 675 441 304 917 289 832 281 619 57 629 145 483 45 863 184 941 944 445 803 392 133 343 949 254 811 781 390 681 893 505 51 919 297 706 188 585 889 468 555 945 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 17 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[976 853 243 180 658 979 923 226 893 655 966 40 37 892 748 564 93 396 415 245 255 203 54 735 935 446 55 146 523 568 947 850 420 541 29 429 519 304 655 411 310 972 450 347 863 550 262 956 945 676 200 199 231 605 933 165 50 339 662 924 906 608 773 678 500 154 106 18 457 112 428 766 436 230 464 298 779 726 605 723 753 805 273 983 761 557 499 163 895 512 86 153 471 211 830 970 364 287 987 172 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 ];\r\nvexp=[999 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[493 423 719 243 813 237 231 93 184 85 534 478 686 963 106 555 82 362 285 366 251 243 695 953 652 382 440 552 32 79 287 524 502 6 118 314 594 348 758 777 785 292 606 470 254 711 376 335 424 660 53 674 254 747 978 257 480 417 808 511 848 95 34 349 452 503 662 45 851 772 173 987 63 778 808 668 840 184 2 263 195 406 288 449 153 265 705 632 33 513 495 880 959 880 228 410 383 242 454 585 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[297 238 716 689 386 333 730 710 361 144 616 992 887 831 981 625 319 904 103 694 374 725 599 418 345 900 326 421 110 790 160 406 27 876 446 764 560 527 474 272 22 441 263 260 624 243 236 942 499 338 987 872 415 937 290 759 836 967 531 297 756 690 54 134 917 500 897 828 378 722 99 400 163 714 659 786 308 895 79 158 584 418 30 350 354 671 108 542 637 990 838 744 32 892 877 948 743 125 128 120 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[961 238 790 232 341 217 876 109 914 771 275 778 761 924 820 756 37 283 58 200 170 971 229 962 481 406 83 173 107 819 779 419 409 921 651 749 137 878 857 403 648 483 180 760 406 351 515 794 986 924 345 155 246 925 469 726 331 551 251 789 369 29 208 777 301 210 877 438 87 85 840 87 568 371 198 325 73 65 471 58 340 167 565 586 92 33 663 774 583 913 562 303 294 121 432 594 682 660 383 121 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[17 13 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[847 578 871 9 291 882 146 951 776 224 108 711 993 489 61 347 511 520 240 147 510 77 242 541 320 470 840 62 595 967 534 441 545 404 801 187 285 946 137 412 521 597 123 866 85 535 564 596 54 803 94 915 879 336 455 199 157 295 612 751 613 145 543 157 549 343 696 185 640 184 597 513 780 71 730 865 605 293 460 658 95 905 573 973 592 379 523 749 25 135 499 638 631 394 146 179 88 193 716 80 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[595 443 257 384 392 367 144 911 843 498 37 18 223 174 3 201 293 89 596 570 221 620 639 129 350 279 70 622 930 697 197 877 139 453 260 883 820 403 145 14 253 182 384 827 355 386 27 999 827 975 568 47 594 558 527 295 837 948 268 118 644 465 994 783 917 605 665 88 360 809 102 612 342 485 438 49 222 816 47 48 790 615 446 736 172 324 30 360 272 298 478 267 114 471 49 30 428 65 470 787 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[780 954 884 510 239 148 85 898 331 52 360 274 464 368 968 411 279 314 325 296 991 463 957 143 840 420 355 645 73 4 749 852 309 985 713 548 132 798 445 814 849 157 439 665 524 407 427 155 72 752 450 63 566 406 205 758 825 911 402 249 914 503 452 222 487 165 121 970 314 918 784 514 74 222 178 597 980 957 103 404 60 552 466 977 310 22 734 486 932 488 735 197 990 186 770 828 702 243 149 15 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 978 571 427 755 378 94 946 913 447 208 108 853 495 908 5 111 964 988 143 828 482 23 786 362 602 195 96 195 1000 680 559 329 250 985 83 979 430 28 892 877 587 999 729 433 258 85 543 221 424 38 49 258 412 834 971 13 381 66 560 732 745 118 61 994 455 495 972 884 875 215 760 461 565 840 246 822 924 788 43 700 177 91 957 588 276 927 953 8 344 512 740 88 629 152 433 435 646 756 319 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[451 239 992 437 132 835 911 157 520 659 517 666 58 774 700 772 780 999 197 975 428 97 90 327 717 962 99 59 529 857 959 979 447 950 767 579 136 29 87 7 687 603 672 96 376 372 868 507 722 64 833 149 512 922 827 228 883 926 639 412 134 597 742 933 898 861 511 386 889 949 744 928 903 416 23 278 139 242 137 860 305 969 360 817 891 538 396 125 463 34 888 949 982 630 881 880 842 743 617 730 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[54 863 642 961 561 785 120 582 696 547 678 829 552 991 857 12 856 37 210 339 355 407 539 933 277 407 350 845 820 26 500 873 241 493 834 153 629 305 735 325 851 412 505 402 754 713 414 610 749 975 948 456 381 838 740 9 596 442 853 416 467 705 640 59 197 825 212 826 129 298 502 979 61 6 733 814 718 498 423 818 472 722 625 204 912 365 212 507 806 416 274 624 120 914 683 669 90 246 846 219 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[557 254 725 829 188 813 242 916 622 929 610 843 30 902 765 935 195 783 826 945 806 126 449 282 661 99 263 755 852 131 479 761 384 203 589 924 367 182 191 989 110 800 183 140 53 947 74 600 81 899 544 239 377 344 520 37 442 782 792 646 913 622 406 648 825 994 571 191 176 761 531 637 913 714 776 965 12 201 916 93 452 459 331 828 802 850 864 596 983 7 241 895 629 998 543 805 991 465 347 518 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[382 165 739 167 38 451 342 38 166 455 245 754 118 285 706 466 81 767 408 279 675 398 220 142 598 521 210 991 413 174 676 794 690 767 312 79 217 653 116 382 459 360 487 928 997 193 745 429 311 505 59 985 254 279 478 852 799 687 842 563 212 869 708 901 635 19 980 851 24 447 584 834 159 71 762 155 263 858 935 925 362 994 909 616 272 386 819 422 424 660 984 636 880 691 888 515 61 219 717 84 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[91 411 591 488 445 865 258 361 598 428 574 13 326 713 417 379 879 30 193 142 84 13 910 335 890 655 530 356 249 169 130 691 579 72 530 376 288 788 736 886 567 309 250 892 373 666 623 251 47 815 744 131 180 654 817 69 660 347 425 908 867 906 950 797 977 479 524 617 266 260 502 832 920 751 76 293 769 698 895 815 864 639 297 43 644 114 112 303 812 536 562 30 793 511 826 121 341 350 737 607 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[773 485 819 749 358 729 307 911 311 821 26 680 127 222 98 22 843 654 513 503 779 701 823 427 972 585 806 165 264 229 331 36 65 149 136 422 230 443 685 892 615 710 571 741 284 668 763 126 322 627 980 100 327 802 878 650 738 683 167 2 911 497 389 327 645 525 749 226 967 433 117 581 494 687 674 129 707 436 606 380 62 586 831 740 387 709 390 477 743 556 478 6 52 866 332 48 390 80 274 708 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[840 811 793 629 947 995 457 205 236 199 384 941 486 279 76 810 896 157 100 909 377 71 931 209 327 2 461 474 71 795 747 911 957 892 539 903 886 347 108 474 898 491 766 383 769 842 192 16 350 292 925 727 714 207 935 40 560 395 865 630 542 612 892 498 503 783 753 740 481 860 213 378 702 979 112 822 172 304 838 521 947 114 599 12 672 886 403 231 280 268 212 173 879 456 671 733 238 423 824 70 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[666 301 270 824 723 31 330 985 240 264 909 602 257 169 217 880 554 35 653 329 46 988 964 925 30 204 791 91 422 508 526 439 808 795 262 530 177 943 866 417 207 126 370 815 294 586 695 199 972 347 527 369 687 843 645 716 46 436 806 467 295 684 906 102 478 519 983 7 462 200 775 668 677 144 834 970 81 528 168 404 227 46 772 913 888 768 628 933 555 786 752 849 469 657 302 298 527 636 304 988 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[140 221 767 853 559 614 357 547 107 629 774 71 944 277 33 795 93 277 858 843 571 984 702 31 470 249 203 458 919 943 227 410 515 345 263 73 958 619 971 64 599 744 135 895 20 519 689 464 795 546 306 365 882 359 748 351 960 302 161 230 596 739 639 110 83 901 534 392 872 504 456 470 599 942 716 618 460 404 433 606 302 738 971 183 448 70 885 407 371 397 636 318 487 627 427 569 879 960 313 750 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[895 347 549 955 352 281 120 421 130 543 238 601 616 863 156 527 579 719 386 384 135 11 359 606 276 393 626 366 638 471 584 884 817 484 190 168 765 310 940 246 204 178 847 819 392 354 698 970 73 435 705 559 797 63 516 73 456 142 790 445 612 725 329 429 208 518 948 972 827 888 570 382 417 768 201 808 121 250 129 193 36 833 103 832 895 619 904 350 760 45 147 371 769 475 799 977 344 747 300 523 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[212 715 903 316 622 690 654 758 156 811 375 555 755 246 21 376 361 213 692 258 285 289 496 721 666 777 858 559 189 830 573 752 896 827 67 517 516 720 274 672 883 648 578 637 893 950 364 254 514 56 511 799 696 358 871 714 134 80 272 674 909 196 425 804 22 844 320 538 915 946 561 797 593 490 786 838 439 149 443 952 556 305 102 252 662 972 965 147 51 588 173 959 783 949 114 156 792 434 693 707 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 2 3 4 5 7 8 9 10 12 13 14 15 16 17 19 20 21 24 25 26 27 30 31 32 33 34 36 37 38 39 40 41 42 43 44 45 46 47 49 52 53 54 55 58 59 60 61 62 63 64 65 66 67 69 70 72 74 75 76 77 79 80 81 82 83 84 85 87 89 90 93 95 96 97 98 100 101 102 104 105 108 109 110 112 115 117 116 118 119 120 121 122 123 124 125 126 128 132 133 134 135 136 137 139 142 143 145 146 147 148 149 150 151 153 154 155 156 159 157 160 161 162 163 164 165 167 168 170 171 174 177 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 196 197 198 199 201 202 203 204 205 206 207 208 212 213 214 216 217 219 220 221 223 224 225 226 227 228 229 230 231 232 233 234 235 237 238 239 241 242 245 246 248 249 250 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 270 271 272 275 278 279 280 282 283 284 286 287 288 289 291 292 293 295 296 297 299 300 301 302 303 304 305 307 308 310 312 313 314 315 317 319 320 322 323 324 325 327 328 330 329 331 332 333 334 335 336 337 338 339 340 341 342 343 344 346 347 348 349 350 351 352 354 355 357 358 359 360 361 362 363 364 365 367 368 369 370 373 374 375 378 379 383 384 386 387 388 389 390 392 394 396 398 399 400 401 403 404 405 406 407 408 409 410 411 412 413 414 416 420 417 421 422 424 426 427 428 429 430 432 433 434 436 437 438 439 440 442 443 444 445 446 448 449 450 452 454 455 456 457 458 459 460 461 462 463 464 465 466 468 469 471 472 474 475 476 477 478 479 480 481 483 484 485 486 487 489 490 491 492 493 494 496 497 498 499 500 501 502 504 505 506 507 508 509 510 511 514 515 517 518 519 520 521 522 526 527 529 530 531 532 533 534 535 536 537 538 539 540 541 543 545 546 547 548 549 550 552 553 554 555 557 558 559 560 561 565 566 567 568 569 570 571 574 575 576 577 579 580 581 582 583 586 587 588 589 590 591 593 594 595 596 597 599 601 602 603 604 605 606 607 608 609 610 612 614 613 615 616 617 618 619 620 621 623 624 625 626 627 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 647 648 649 651 654 652 655 656 657 659 662 663 664 665 666 667 668 670 671 672 673 674 675 676 677 678 679 680 681 684 685 687 688 689 690 691 693 694 696 697 700 702 703 704 705 706 707 708 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 745 746 748 749 750 751 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 770 771 773 774 775 776 777 778 779 780 781 783 784 785 786 787 788 790 791 792 793 794 796 797 798 799 800 801 802 803 804 805 807 806 809 811 812 813 814 815 816 818 819 820 822 823 824 825 826 827 828 829 830 831 832 833 834 836 839 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 863 864 865 866 867 868 869 870 871 872 873 874 876 877 878 881 882 883 886 888 889 891 892 893 895 896 897 898 899 900 901 903 904 905 906 907 908 909 910 911 912 914 915 916 919 920 921 922 923 924 925 926 927 928 929 930 931 933 934 935 937 938 939 940 943 944 946 947 948 949 950 951 954 955 958 959 960 962 964 963 965 966 967 968 969 970 971 973 974 976 977 978 979 980 981 982 983 985 987 989 990 991 992 993 994 995 996 997 998 999 1000 ];\r\nvexp=[8 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[232 362 351 89 9 383 813 119 501 620 74 832 51 891 276 399 788 50 830 441 407 247 327 179 95 747 700 116 567 509 596 798 870 946 238 230 680 51 348 533 22 421 364 72 312 639 470 451 688 652 891 446 898 570 624 992 316 675 107 882 183 54 680 405 999 269 634 31 671 982 563 692 754 926 764 417 564 585 220 251 236 462 48 486 31 671 477 346 697 936 228 231 989 259 635 340 879 621 370 550 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[743 518 755 828 879 541 927 408 37 37 390 21 445 937 948 884 395 704 54 14 367 979 496 739 378 827 675 921 263 707 410 6 224 164 185 454 56 111 214 93 500 603 465 944 891 765 179 286 468 233 651 186 211 146 925 940 972 951 212 587 657 622 944 232 137 128 686 545 591 899 989 442 853 805 385 744 569 563 381 389 147 31 926 357 528 202 296 851 153 860 437 809 481 732 41 969 860 78 513 802 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[86 217 935 102 796 608 72 794 977 758 392 828 341 411 808 33 109 545 905 883 454 614 180 210 450 416 977 332 247 832 107 332 400 41 786 196 1000 857 341 977 966 733 804 658 495 964 43 603 860 947 838 313 912 17 523 361 432 851 45 678 682 503 361 434 895 498 629 895 706 321 871 672 405 26 329 899 341 723 854 201 669 691 513 580 59 387 293 490 237 689 519 271 191 231 704 85 81 684 979 786 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[473 794 229 24 568 883 911 820 507 554 938 670 729 241 831 64 196 280 334 572 853 361 223 365 866 48 748 528 116 865 442 941 658 670 964 225 904 226 44 410 131 982 79 859 574 261 275 770 540 608 693 392 320 915 109 186 962 208 713 430 72 154 370 82 176 685 306 79 262 702 841 744 35 271 955 960 532 229 729 71 836 421 815 156 688 923 693 1 130 405 430 554 910 151 635 437 187 292 516 448 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[746 542 944 181 269 649 563 798 243 157 472 262 531 138 351 242 625 142 109 630 330 815 726 455 518 75 952 582 985 432 562 82 973 857 263 594 505 825 743 99 981 567 361 512 704 711 105 328 852 213 310 533 380 35 988 897 462 291 830 446 722 392 880 46 248 142 639 105 318 734 203 298 300 915 161 355 625 617 682 828 830 343 713 209 730 52 457 191 342 286 988 415 29 867 460 629 360 451 733 677 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(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":5,"test_suite_updated_at":"2013-10-05T04:03:17.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-05T03:14:32.000Z","updated_at":"2013-10-06T00:40:15.000Z","published_at":"2013-10-05T03:49:00.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=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 Veterans Ocean View\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Large data set with N\u0026lt;=1000 and Q\u0026lt;N\u0026lt;=1000, with typical 80.\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 as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\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\u003eSuccinct Challenge statement:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\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 V , Vector length N\u0026lt;=1000 with values 1 thru 1000.\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 Q , minimum quantity of removed values to produce a valid vector (typical 80)\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 [V] [Q]\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 4 3 3] [2]  for [1 4] or [1 3]\\n[1 2 3 4 5] [0]\\n[4 3 2 1] [3]]]\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) nchoosek(1000,80) is a little big\\n2) The Large test suite is N\u003c=1000 with some delete cases \u003e4\\n3) A Good Algorithm that solves the Large case is usually best to pursue\\n4) GJam Competition allows one Large submission within 10 minutes of download \\n5) This was only solved by one entrant.]]\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:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/1913-gjam-2013-veterans-ocean-view-small\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eSmall Suite Challenge\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eAlgorithm Spoiler:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A general method is to start at the end and build all unique length valid vectors. It is only necessary to maintain a Min Value and length for the potential solutions. Once all values are checked find the maximum solution length. There are three key steps in this method: 1) If vin(j)\u0026gt; Max of all solutions, start a new solution with length 1. 2) Find solutions that are 1 greater than vin(j). Update minimums of these solutions with vin(j) and increase length values. 3) Find solutions where mins\u0026gt;vin(j). Augment solution set by a single line of [vin(j),max length found +1]. 4) Find maximum length solution. This method solved all 100 large cases in \u0026lt; 2 seconds on Cody.\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\"}]}"},{"id":42774,"title":"GJam March 2016 IOW: Clock Dance","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p1 GJam March 2016 Annual I/O for Women Dance Around the Clock\u003e. This is a mix of the small and large data sets.\r\n\r\nThe GJam story goes that D even dancers are arranged clockwise 1:D. Who is adjacent to dancer K after N pair swaps. The odd move swaps positions 1/2,3/4,..D-1/D. The even move swaps positions D/1, 2/3,...D-2/D-1. D=8 [1:8] becomes [2 1 4 3 6 5 8 7] after the first swap. After second swap we see [7 4 1 6 3 8 5 2].  \r\n\r\n\u003c\u003chttp://code.google.com/codejam/contest/images/?image=dance_around_the_clock.png\u0026p=5733344260128768\u0026c=8274486\u003e\u003e\r\n\r\n*Input:* [D K N] , 4\u003c=D\u003c=1E8, 1\u003c=K\u003c=D, 1\u003c=N\u003c=1E8\r\n\r\n*Output:* [KCW KCCW] , KCW is dancer to left of Kth dancer after N moves\r\n\r\n*Examples:* [m] [v]\r\n\r\n  [8 3 1] creates v=[6 4]\r\n  [8 4 2] creates v=[1 7]\r\n  [6 6 1] creates v=[5 3]\r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Contest Theory:* The small case was D\u003c10 and N\u003c10. This could be done brute force in the 5 minutes of entry submission allowed. However, this is clearly a case of modulo math so might as well solve the unbounded case of D/N \u003c1E8. The number being assigned as 1:D leads to confusion as mod maps to 0:D-1. Suggest offset the K dancer number by 1 for processing and then correct for the final answer. Mod is fun as mod(-1,8) yields a useful 7. Quick observation is for offsetted K vector [0:D-1] the Evens move CW and the Odds move CCW. One method used 5 mod calls to solve.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p1\"\u003eGJam March 2016 Annual I/O for Women Dance Around the Clock\u003c/a\u003e. This is a mix of the small and large data sets.\u003c/p\u003e\u003cp\u003eThe GJam story goes that D even dancers are arranged clockwise 1:D. Who is adjacent to dancer K after N pair swaps. The odd move swaps positions 1/2,3/4,..D-1/D. The even move swaps positions D/1, 2/3,...D-2/D-1. D=8 [1:8] becomes [2 1 4 3 6 5 8 7] after the first swap. After second swap we see [7 4 1 6 3 8 5 2].\u003c/p\u003e\u003cimg src = \"http://code.google.com/codejam/contest/images/?image=dance_around_the_clock.png\u0026p=5733344260128768\u0026c=8274486\"\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [D K N] , 4\u0026lt;=D\u0026lt;=1E8, 1\u0026lt;=K\u0026lt;=D, 1\u0026lt;=N\u0026lt;=1E8\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [KCW KCCW] , KCW is dancer to left of Kth dancer after N moves\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [m] [v]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[8 3 1] creates v=[6 4]\r\n[8 4 2] creates v=[1 7]\r\n[6 6 1] creates v=[5 3]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Theory:\u003c/b\u003e The small case was D\u0026lt;10 and N\u0026lt;10. This could be done brute force in the 5 minutes of entry submission allowed. However, this is clearly a case of modulo math so might as well solve the unbounded case of D/N \u0026lt;1E8. The number being assigned as 1:D leads to confusion as mod maps to 0:D-1. Suggest offset the K dancer number by 1 for processing and then correct for the final answer. Mod is fun as mod(-1,8) yields a useful 7. Quick observation is for offsetted K vector [0:D-1] the Evens move CW and the Odds move CCW. One method used 5 mod calls to solve.\u003c/p\u003e","function_template":"function v=ClockDance(m)\r\n% m [D K N] % Num Dancers, K dancernumber, N swaps\r\n% v=[CW_dancenumber CCW_dancenumber]  [pos+1, pos-1]\r\n v=[0 0];\r\n% This is a mod mod mod type contest question\r\n% Note mod(-1,8)=7\r\n% Note changing dancers from 1:D to 0:D-1 helps mod normalcy and brain function\r\n% At the end add 1 back to the v vector\r\n\r\nend","test_suite":"%%\r\nm=[8 3 1 ];\r\nv=ClockDance(m);\r\nvexp=[6 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 4 2 ];\r\nv=ClockDance(m);\r\nvexp=[1 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 8 ];\r\nv=ClockDance(m);\r\nvexp=[2 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[10 9 6 ];\r\nv=ClockDance(m);\r\nvexp=[2 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 9 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 2 10 ];\r\nv=ClockDance(m);\r\nvexp=[7 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 8 7 ];\r\nv=ClockDance(m);\r\nvexp=[3 1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 4 3 ];\r\nv=ClockDance(m);\r\nvexp=[3 1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 6 1 ];\r\nv=ClockDance(m);\r\nvexp=[5 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 4 6 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 5 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 4 1 ];\r\nv=ClockDance(m);\r\nvexp=[3 1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 1 ];\r\nv=ClockDance(m);\r\nvexp=[4 2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 2 2 ];\r\nv=ClockDance(m);\r\nvexp=[5 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 1 10 ];\r\nv=ClockDance(m);\r\nvexp=[4 2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 3 1 ];\r\nv=ClockDance(m);\r\nvexp=[6 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 4 2 ];\r\nv=ClockDance(m);\r\nvexp=[1 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 8 ];\r\nv=ClockDance(m);\r\nvexp=[2 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[72137284 16112525 91351141 ];\r\nv=ClockDance(m);\r\nvexp=[54540240 54540238 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[155546 123001 56937611 ];\r\nv=ClockDance(m);\r\nvexp=[138552 138550 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[78548986 44806245 20024652 ];\r\nv=ClockDance(m);\r\nvexp=[6306564 6306562 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 5 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[61256952 31789482 70629381 ];\r\nv=ClockDance(m);\r\nvexp=[13044625 13044623 ];\r\nassert(isequal(vexp,v))\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-16T04:41:57.000Z","updated_at":"2016-03-16T05:17:21.000Z","published_at":"2016-03-16T05:10:45.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/8274486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Women Dance Around the Clock\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is a mix of the small and large data sets.\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 D even dancers are arranged clockwise 1:D. Who is adjacent to dancer K after N pair swaps. The odd move swaps positions 1/2,3/4,..D-1/D. The even move swaps positions D/1, 2/3,...D-2/D-1. D=8 [1:8] becomes [2 1 4 3 6 5 8 7] after the first swap. After second swap we see [7 4 1 6 3 8 5 2].\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\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [D K N] , 4\u0026lt;=D\u0026lt;=1E8, 1\u0026lt;=K\u0026lt;=D, 1\u0026lt;=N\u0026lt;=1E8\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 [KCW KCCW] , KCW is dancer to left of Kth dancer after N moves\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 [m] [v]\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[[8 3 1] creates v=[6 4]\\n[8 4 2] creates v=[1 7]\\n[6 6 1] creates v=[5 3]]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eContest Theory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The small case was D\u0026lt;10 and N\u0026lt;10. This could be done brute force in the 5 minutes of entry submission allowed. However, this is clearly a case of modulo math so might as well solve the unbounded case of D/N \u0026lt;1E8. The number being assigned as 1:D leads to confusion as mod maps to 0:D-1. Suggest offset the K dancer number by 1 for processing and then correct for the final answer. Mod is fun as mod(-1,8) yields a useful 7. Quick observation is for offsetted K vector [0:D-1] the Evens move CW and the Odds move CCW. One method used 5 mod calls to solve.\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\"}]}"},{"id":2291,"title":"GJam 2014 Qualifier: Deceitful War (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2974486/dashboard#s=p3 GJam 2014 Qualifier Deceitful War\u003e.\r\n\r\nMy condensed summary of the problem statement.\r\n\r\nGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\r\n\r\nUnsurprisingly when A truthfully states masses player B consistently wins.\r\n\r\nPlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\r\n\r\nPart one is determine the best possible score for A when playing deceitfully.\r\n\r\nPart two is determine the best possible score if player A did not look and is honest.\r\n\r\n*Examples:*\r\n\r\n  A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n  \r\n  A 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n  B 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n  Deceitful A Wins 8\r\n  Optimal Honest A Wins 4\r\n\r\n*Input:* A,B vectors of length N (Small has N\u003c=10, Large(future challenge N\u003c=1000)\r\n\r\n*Output:* Deceitful Wins, Optimal Honest Wins\r\n\r\n\r\n\r\n\r\n\r\n*Note:*\r\n\r\nIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003chttp://www.go-hero.net/jam/14/solutions/0/4/MATLAB GJam Deceitful Solutions\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2974486/dashboard#s=p3\"\u003eGJam 2014 Qualifier Deceitful War\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eMy condensed summary of the problem statement.\u003c/p\u003e\u003cp\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\u003c/p\u003e\u003cp\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\u003c/p\u003e\u003cp\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\u003c/p\u003e\u003cp\u003ePart one is determine the best possible score for A when playing deceitfully.\u003c/p\u003e\u003cp\u003ePart two is determine the best possible score if player A did not look and is honest.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eA: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\nDeceitful A Wins 8\r\nOptimal Honest A Wins 4\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Deceitful Wins, Optimal Honest Wins\u003c/p\u003e\u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003ca href = \"http://www.go-hero.net/jam/14/solutions/0/4/MATLAB\"\u003eGJam Deceitful Solutions\u003c/a\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\u003c/p\u003e","function_template":"function W = War(m)\r\n% W=[Deceitful Wins, Optimal Honest Wins]\r\n  W=[0 0];\r\nend","test_suite":"%%\r\nm=[0.270000 0.550000 0.910000 0.330000 0.520000 0.300000 ;0.850000 0.450000 0.060000 0.240000 0.120000 0.880000 ];\r\nWexp=[5 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.164000 0.255000 0.009000 0.445000 0.209000 0.100000 0.391000 0.536000 0.027000 0.118000 ;0.673000 0.782000 0.582000 0.882000 0.591000 0.855000 0.745000 0.955000 0.991000 0.600000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 0.480000 0.760000 0.680000 0.160000 0.640000 0.360000 ;0.200000 0.440000 0.960000 0.280000 0.880000 0.520000 0.120000 ];\r\nWexp=[5 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.170000 0.100000 0.120000 0.200000 0.540000 0.150000 ;0.490000 0.070000 0.240000 0.680000 0.610000 0.340000 ];\r\nWexp=[2 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.780000 0.770000 0.900000 0.810000 0.880000 0.840000 0.600000 0.730000 0.930000 0.990000 ;0.270000 0.150000 0.260000 0.510000 0.570000 0.310000 0.170000 0.140000 0.400000 0.040000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.320000 0.820000 0.350000 0.770000 0.020000 0.550000 0.040000 0.990000 0.610000 0.190000 ;0.730000 0.530000 0.750000 0.800000 0.670000 0.870000 0.330000 0.250000 0.080000 0.680000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.100000 0.380000 0.050000 0.210000 0.130000 0.440000 0.180000 ;0.560000 0.920000 0.540000 0.900000 0.670000 0.790000 0.820000 0.970000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.420000 ;0.080000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.690000 0.310000 0.540000 0.230000 0.710000 0.030000 0.490000 0.600000 0.510000 0.860000 ;0.830000 0.340000 0.370000 0.740000 0.430000 0.200000 0.090000 0.170000 0.910000 0.400000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 0.920000 0.710000 0.130000 0.230000 0.620000 0.140000 0.260000 0.360000 0.310000 ;0.440000 0.010000 0.640000 0.350000 0.820000 0.550000 0.780000 0.790000 0.060000 0.570000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.504000 0.218000 0.479000 0.101000 0.050000 0.445000 0.471000 0.084000 0.034000 0.008000 ;0.992000 0.546000 0.647000 0.849000 0.891000 0.739000 0.765000 0.555000 0.613000 0.748000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.570000 0.470000 0.640000 0.550000 0.060000 0.430000 0.040000 0.280000 0.130000 0.510000 ;0.700000 0.740000 0.770000 0.810000 0.870000 0.790000 0.940000 0.910000 0.850000 0.660000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.020000 0.510000 0.120000 0.220000 0.250000 0.100000 0.490000 0.530000 0.350000 ;0.800000 0.960000 0.760000 0.820000 0.710000 0.570000 0.940000 0.690000 0.900000 0.550000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.030000 0.360000 0.410000 0.330000 0.430000 0.540000 0.300000 0.280000 0.100000 ;0.770000 0.910000 0.700000 0.550000 0.590000 0.780000 0.650000 0.860000 0.750000 0.990000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.920000 0.370000 0.900000 0.200000 0.150000 0.020000 0.530000 0.860000 0.250000 0.190000 ;0.170000 0.980000 0.140000 0.680000 0.830000 0.470000 0.950000 0.340000 0.880000 0.540000 ];\r\nWexp=[7 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.020000 0.490000 0.280000 0.080000 0.830000 0.170000 0.140000 0.850000 ;0.420000 0.650000 0.950000 0.890000 0.030000 0.580000 0.380000 0.060000 0.370000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.670000 0.050000 0.590000 0.330000 0.820000 0.030000 0.740000 0.560000 0.950000 0.620000 ;0.210000 0.380000 0.770000 0.080000 0.260000 0.640000 0.460000 0.790000 0.310000 0.410000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.840000 0.800000 0.420000 0.580000 0.670000 0.070000 0.360000 ;0.690000 0.870000 0.310000 0.600000 0.760000 0.200000 0.380000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.450000 0.380000 0.280000 0.590000 0.620000 0.230000 0.810000 ;0.320000 0.190000 0.680000 0.140000 0.090000 0.940000 0.170000 ];\r\nWexp=[6 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.207000 0.288000 0.180000 0.595000 0.748000 0.459000 0.802000 0.387000 0.027000 0.090000 ;0.450000 0.982000 0.694000 0.613000 0.486000 0.423000 0.685000 0.847000 0.432000 0.604000 ];\r\nWexp=[4 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.750000 0.970000 0.820000 0.840000 0.680000 0.780000 0.730000 0.270000 0.220000 0.150000 ;0.130000 0.920000 0.390000 0.320000 0.230000 0.080000 0.800000 0.330000 0.720000 0.590000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.140000 0.600000 0.950000 0.160000 0.650000 0.580000 0.910000 0.230000 0.020000 ;0.120000 0.510000 0.530000 0.280000 0.350000 0.070000 0.400000 0.930000 0.490000 0.090000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.545000 0.527000 0.500000 0.727000 0.018000 0.400000 0.191000 0.982000 0.409000 0.591000 ;0.945000 0.745000 0.355000 0.673000 0.045000 0.118000 0.682000 0.827000 0.645000 0.482000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.930000 0.980000 0.470000 0.810000 0.830000 0.460000 0.510000 0.540000 ;0.490000 0.640000 0.170000 0.290000 0.140000 0.440000 0.590000 0.760000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.580000 ;0.330000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.640000 0.820000 0.700000 0.480000 0.520000 0.610000 0.060000 0.240000 0.300000 ;0.550000 0.450000 0.090000 0.030000 0.850000 0.670000 0.760000 0.360000 0.790000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 ;0.900000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.100000 0.040000 0.110000 0.650000 0.250000 0.570000 0.480000 0.150000 0.800000 ;0.550000 0.020000 0.920000 0.080000 0.700000 0.360000 0.910000 0.710000 0.820000 0.850000 ];\r\nWexp=[5 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.890000 0.060000 0.090000 0.750000 0.730000 0.810000 0.950000 0.660000 0.390000 ;0.530000 0.970000 0.610000 0.670000 0.690000 0.380000 0.590000 0.300000 0.720000 0.110000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.870000 0.600000 0.860000 0.830000 0.680000 0.810000 0.700000 0.920000 0.760000 ;0.170000 0.510000 0.330000 0.050000 0.240000 0.030000 0.410000 0.480000 0.520000 ];\r\nWexp=[9 9];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.940000 0.720000 0.810000 0.220000 0.280000 0.530000 0.440000 0.160000 0.880000 0.970000 ;0.120000 0.030000 0.470000 0.560000 0.380000 0.340000 0.690000 0.090000 0.250000 0.750000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.410000 0.360000 0.230000 0.140000 0.180000 0.050000 0.500000 0.270000 0.090000 0.450000 ;0.680000 0.950000 0.910000 0.860000 0.730000 0.550000 0.590000 0.820000 0.640000 0.770000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.278000 0.852000 0.370000 0.824000 0.389000 0.704000 0.546000 0.204000 0.296000 0.056000 ;0.833000 0.315000 0.991000 0.028000 0.907000 0.630000 0.361000 0.037000 0.065000 0.954000 ];\r\nWexp=[7 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.713000 0.657000 0.778000 0.435000 0.565000 0.870000 0.963000 0.343000 0.481000 0.593000 ;0.287000 0.333000 0.454000 0.130000 0.370000 0.759000 0.176000 0.611000 0.231000 0.398000 ];\r\nWexp=[10 6];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.590000 0.750000 0.650000 0.900000 0.740000 0.880000 0.850000 ;0.400000 0.070000 0.540000 0.380000 0.570000 0.150000 0.490000 ];\r\nWexp=[7 7];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.110000 0.920000 0.540000 0.840000 0.380000 0.770000 0.900000 0.490000 0.870000 0.750000 ;0.620000 0.480000 0.330000 0.440000 0.890000 0.130000 0.430000 0.080000 0.340000 0.560000 ];\r\nWexp=[10 5];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.480000 0.650000 0.770000 0.690000 0.720000 0.560000 0.660000 0.550000 0.510000 0.730000 ;0.310000 0.440000 0.300000 0.060000 0.200000 0.420000 0.030000 0.070000 0.110000 0.140000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.900000 0.680000 0.600000 0.800000 ;0.350000 0.050000 0.170000 0.880000 ];\r\nWexp=[4 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.730000 0.910000 0.450000 0.640000 0.090000 ;0.550000 0.360000 0.270000 0.820000 0.180000 ];\r\nWexp=[4 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.530000 0.740000 0.410000 0.320000 0.820000 0.970000 0.620000 0.500000 0.710000 0.090000 ;0.180000 0.760000 0.380000 0.150000 0.470000 0.210000 0.560000 0.120000 0.590000 0.440000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.487000 0.092000 0.714000 0.160000 0.504000 0.277000 0.479000 0.605000 0.462000 0.832000 ;0.210000 0.824000 0.118000 0.387000 0.664000 0.874000 0.445000 0.739000 0.546000 0.017000 ];\r\nWexp=[8 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.100000 ;0.400000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.688000 0.872000 0.615000 0.477000 0.734000 0.624000 0.394000 0.532000 0.954000 0.817000 ;0.193000 0.119000 0.349000 0.073000 0.037000 0.009000 0.128000 0.303000 0.046000 0.064000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.910000 0.550000 0.300000 0.570000 0.920000 0.400000 0.450000 0.150000 0.110000 0.190000 ;0.090000 0.790000 0.890000 0.740000 0.850000 0.940000 0.340000 0.380000 0.720000 0.260000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.723000 0.639000 0.824000 0.697000 0.840000 0.882000 0.437000 0.782000 0.588000 0.218000 ;0.345000 0.151000 0.067000 0.849000 0.815000 0.235000 0.521000 0.765000 0.950000 0.681000 ];\r\nWexp=[9 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.150000 0.350000 0.090000 0.110000 0.330000 0.220000 ;0.390000 0.460000 0.850000 0.700000 0.570000 0.610000 0.500000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.850000 0.790000 0.550000 0.380000 0.300000 0.400000 0.770000 0.740000 0.320000 0.570000 ;0.260000 0.210000 0.110000 0.130000 0.020000 0.040000 0.230000 0.190000 0.090000 0.060000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.961000 0.330000 0.010000 0.816000 0.583000 0.913000 0.893000 0.951000 0.126000 0.398000 ;0.767000 0.029000 0.262000 0.641000 0.175000 0.544000 0.359000 0.932000 0.680000 0.476000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 ;0.700000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.240000 0.050000 0.190000 0.110000 0.920000 0.590000 0.730000 0.380000 0.780000 0.950000 ;0.860000 0.700000 0.430000 0.620000 0.220000 0.540000 0.410000 0.890000 0.680000 0.490000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\n% function GJam_Qual_2014d\r\n% % \r\n% %War\r\n% fn='D-small-attempt0.in';\r\n% %fn='D-large.in';\r\n% [data] = read_file(fn); % \r\n% \r\n% fidG = fopen('D-small-output.out', 'w');\r\n% %fidG = fopen('D-large-output001.out', 'w');\r\n% tic\r\n% \r\n% for i=1:size(data,2) % Cell array has N rows of cases\r\n% % m=sort(data{i},2);\r\n%  m=data{i};\r\n%  dw = dWar(m) ;% \r\n%  w = War(m) ;%  \r\n%  \r\n%    fprintf('Case #%i: %i %i\\n',i,dw,w);\r\n%    fprintf(fidG,'Case #%i: %i %i\\n',i,dw,w);\r\n%     \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% \r\n% end\r\n% \r\n% function dw=dWar(m)\r\n% % Post contest\r\n% % Lie to burn opponent best pieces\r\n%  N=sort(m(1,:));\r\n%  K=sort(m(2,:));\r\n%  \r\n%  dw=0;\r\n%  for i=1:length(N)\r\n%   if N(i)\u003eK(1) % Lie to above to beat lowest\r\n%    dw=dw+1;\r\n%    K=K(2:end);\r\n%   else % Lie to just below best\r\n%    K=K(1:end-1);\r\n%   end\r\n%  end\r\n%  \r\n% end\r\n% \r\n% function w=War(m)\r\n% % Optimal truthful strategy\r\n% % Best lucky sequence\r\n%  w=0;\r\n% \r\n%  Nm=sort(m(1,:));\r\n%  Km=sort(m(2,:));\r\n%  \r\n%  Nmz=[Nm' ones(size(Nm,2),1)];\r\n%  Kmz=[Km' zeros(size(Km,2),1)];\r\n%  z=[Nmz;Kmz]; \r\n%  z=sortrows(z,-1);\r\n%  \r\n%  while ~isempty(z)\r\n%   ptr1=find(z(:,2)==1,1,'last');\r\n%   ptr0=find(z(1:ptr1,2)==0,1,'last');\r\n%   if isempty(ptr0)\r\n%    % score\r\n%    w=w+1;\r\n%    z(ptr1,:)=[];\r\n%    ptr0=find(z(:,2)==0,1,'last');\r\n%    z(ptr0,:)=[];  \r\n%   else\r\n%    z(ptr1,:)=[];\r\n%    z(ptr0,:)=[];  \r\n%   end\r\n%  end \r\n%  % Create worst Ken/B Scenario\r\n%  \r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% % Read whole array then parse\r\n% % dlmread valid for numeric arrays\r\n%  m=dlmread(fn);\r\n%  m(1,:)=[];\r\n%  for i=1:size(m,1)/3\r\n%   d{i}=m(3*i-1:3*i,1:m(3*i-2,1));\r\n%  end\r\n%  \r\n% end % read_file\r\n% Data Set file\r\n%4\r\n%1\r\n%0.5\r\n%0.6\r\n%2\r\n%0.7 0.2\r\n%0.8 0.3\r\n%3\r\n%0.5 0.1 0.9\r\n%0.6 0.4 0.3\r\n%9\r\n%0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n%0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-19T14:08:56.000Z","updated_at":"2014-04-19T15:00:47.000Z","published_at":"2014-04-19T15:00:47.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/2974486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Qualifier Deceitful War\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eMy condensed summary of the problem statement.\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\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\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\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\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\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\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\u003ePart one is determine the best possible score for A when playing deceitfully.\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\u003ePart two is determine the best possible score if player A did not look and is honest.\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\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[A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\\n\\nA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\\nDeceitful A Wins 8\\nOptimal Honest A Wins 4]]\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\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 Deceitful Wins, Optimal Honest Wins\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\u003eNote:\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\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error.\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://www.go-hero.net/jam/14/solutions/0/4/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Deceitful Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\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\"}]}"},{"id":1900,"title":"GJam 2014 China Rd A: Rational Number Tree (Large Values)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p1 GJam 2014 China Rational Number Tree\u003e.\r\n\r\nThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the Large Challenge with a Max of 64 Tree levels. Processing of uint64 size data requires extra care.\r\n\r\nConsider an infinite complete binary tree where the root node is 1/1 and the left and right children of node P/Q are P/(P+Q) and (P+Q)/Q, respectively. \r\n\r\nThe Tree looks like:\r\n\r\n         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\r\n\r\n\r\nThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\r\n\r\n\r\n*Input:* [N] or [P,Q] where N is a uint64 integer node or [P,Q] (double) are terms of a Node\r\n\r\n*Output:* [P,Q](double) or [N](uint64) depends on Input type\r\n\r\n*Examples:*\r\n\r\n  [Input]  [Output]\r\n    [2] [1 2]\r\n    [1 2] [2]\r\n    [5] [3 2]\r\n    [3 2] [5]\r\n\r\n*Contest Performance:* Best Delta Time of 14 minutes with only 368 able to process the large data set in less than 3 hours.\r\n\r\n*Notes:*\r\n\r\n1) Matlab has issues with uint64 for dec2bin and matrix multiplies.\r\n\r\n2) Example of uint64 read is provided in test suite comments\r\n\r\n3) Bitshift and bitget work on uint64","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p1\"\u003eGJam 2014 China Rational Number Tree\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the Large Challenge with a Max of 64 Tree levels. Processing of uint64 size data requires extra care.\u003c/p\u003e\u003cp\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right children of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\u003c/p\u003e\u003cp\u003eThe Tree looks like:\u003c/p\u003e\u003cpre\u003e         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\u003c/pre\u003e\u003cp\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N] or [P,Q] where N is a uint64 integer node or [P,Q] (double) are terms of a Node\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [P,Q](double) or [N](uint64) depends on Input type\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Input]  [Output]\r\n  [2] [1 2]\r\n  [1 2] [2]\r\n  [5] [3 2]\r\n  [3 2] [5]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 14 minutes with only 368 able to process the large data set in less than 3 hours.\u003c/p\u003e\u003cp\u003e\u003cb\u003eNotes:\u003c/b\u003e\u003c/p\u003e\u003cp\u003e1) Matlab has issues with uint64 for dec2bin and matrix multiplies.\u003c/p\u003e\u003cp\u003e2) Example of uint64 read is provided in test suite comments\u003c/p\u003e\u003cp\u003e3) Bitshift and bitget work on uint64\u003c/p\u003e","function_template":"function vout=Tree_CH(v);\r\n  vout=0;\r\nend","test_suite":"%%\r\ntic\r\nv=[          2081355757           4898583766 ];\r\nvexp=[uint64(11412103587704585708) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        385960903003         298051413714 ];\r\nvexp=[uint64(13079621846505187505) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(15477096172227810860) ];\r\nvexp=[        188445238409         450375998772 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6473043965665514375) ];\r\nvexp=[        109230282567          33788952110 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(11270280438309969755) ];\r\nvexp=[         23328302733           8557676614 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6893018069           8719066441 ];\r\nvexp=[uint64( 1875942192845872366) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6566840053865194126) ];\r\nvexp=[         65441249939          85425641391 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         21562167101          16520535073 ];\r\nvexp=[uint64(  956959952027690353) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          1684200303           7336396097 ];\r\nvexp=[uint64(  871479491406563248) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2524835851416755114) ];\r\nvexp=[         28589000023          46221104912 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        154908421282         199691474905 ];\r\nvexp=[uint64( 7885684695614904270) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 8176570117722182781) ];\r\nvexp=[         40721598494          22123450931 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9379940828518631730) ];\r\nvexp=[         37341631466          63773070917 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        232141051889         328442531011 ];\r\nvexp=[uint64( 9972945692012784742) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9539984397959825908) ];\r\nvexp=[         70384313011         178968141063 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        421484284721         599703187188 ];\r\nvexp=[uint64(17162693345262485798) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        127506314007          35528864794 ];\r\nvexp=[uint64( 4167185002280551319) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         11313093168          21049073135 ];\r\nvexp=[uint64(16014443480831614722) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 7450646608300783266) ];\r\nvexp=[         83429116694         148768825269 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(13305041571212833467) ];\r\nvexp=[         77301627056          27774083789 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(13635447149676152154) ];\r\nvexp=[         90797761304         143479563807 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(11002893257806672560) ];\r\nvexp=[         44637053272         195624712811 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(11051724027090761936) ];\r\nvexp=[         41361095819         189799709732 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16687200783289968235) ];\r\nvexp=[        552258283575         209936061221 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         54164851566         156315474505 ];\r\nvexp=[uint64(13714337615447966724) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 7329431770178715643) ];\r\nvexp=[         13299036287           4535592331 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16479631524350748877) ];\r\nvexp=[        165234451641          96812407705 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6965988866158891263) ];\r\nvexp=[         21216614218           2585039947 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2910455928437551420) ];\r\nvexp=[          6642417815          14808129701 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         13173276049          27570716815 ];\r\nvexp=[uint64( 4977980945016614908) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16721022657493559975) ];\r\nvexp=[         65473107451          19359384006 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         16946040975          10725070912 ];\r\nvexp=[uint64( 6003309882203701925) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2198342485367409266) ];\r\nvexp=[         23006488657          39032588924 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        120013217139          50302005308 ];\r\nvexp=[uint64(14344732783514005715) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         57191814347          77886936688 ];\r\nvexp=[uint64( 8056110860202858614) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  971778736353519486) ];\r\nvexp=[         17760921544          20384041659 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        129560016431         165770554719 ];\r\nvexp=[uint64(15111464173338859822) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(17855284157674478998) ];\r\nvexp=[        215281025997         298483051015 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          8822618162           5678585885 ];\r\nvexp=[uint64( 4934822377188433797) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  632138406214928188) ];\r\nvexp=[          1835073727           4084131059 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(17330627945660580534) ];\r\nvexp=[         41195382388          56325602793 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6130953526          13549540271 ];\r\nvexp=[uint64( 1896894898836571068) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         25774822611          36694510870 ];\r\nvexp=[uint64(15996304402734859814) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9847540446768144862) ];\r\nvexp=[         31041969169          37560295989 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16612432143632526945) ];\r\nvexp=[         74531365158          60753898717 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(18413647273680019461) ];\r\nvexp=[         10651217970           6995653927 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         62279662838          47373225825 ];\r\nvexp=[uint64( 9640047776936252913) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16583979163800903818) ];\r\nvexp=[        114249431453         187605944484 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          9050571726           1557293089 ];\r\nvexp=[uint64( 9060257062169994207) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(12613321696385576431) ];\r\nvexp=[        125835757545          26079146381 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         35625689704          19896848117 ];\r\nvexp=[uint64( 4411487194398480861) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3484689439967270015) ];\r\nvexp=[         38461243033           5285269728 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         16085645428          43823408873 ];\r\nvexp=[uint64(  894482490922679460) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(12060487473657709988) ];\r\nvexp=[        250877787515         682594856898 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        143931327293          76531069545 ];\r\nvexp=[uint64(12786697318005254653) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(14215963369683634045) ];\r\nvexp=[        100316121935          54160354223 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6557653153          12053301655 ];\r\nvexp=[uint64(  343376420813762434) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         47494216762         112901758075 ];\r\nvexp=[uint64( 3772080181899583404) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6766488059228584288) ];\r\nvexp=[          8189923863          44106320581 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         41526542352          17027036567 ];\r\nvexp=[uint64(17583140790467836275) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          7196361275           6496875429 ];\r\nvexp=[uint64( 6443574928762444801) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(17365843048376429107) ];\r\nvexp=[         18457341831           7658711707 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         78140576077          33767545674 ];\r\nvexp=[uint64( 6098897546038113251) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6734445697          12144787423 ];\r\nvexp=[uint64( 4770215408132554690) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        426726665699         126968827572 ];\r\nvexp=[uint64(12995540462042527271) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 5523416580603863552) ];\r\nvexp=[          4255700693          41585972826 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3928457774057619184) ];\r\nvexp=[          3877602413          16306596859 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        136097916108          28801327007 ];\r\nvexp=[uint64( 5984770176263773551) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16263054952801281548) ];\r\nvexp=[         14189368539          34874268638 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        662028875555         839442017139 ];\r\nvexp=[uint64(11859750004469197678) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         61393402621         332298132605 ];\r\nvexp=[uint64( 7879625004656522848) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          1998630709           8715852076 ];\r\nvexp=[uint64(  429234479783941040) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         46021740257          21715449429 ];\r\nvexp=[uint64(14347105153381215235) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  498971859648614985) ];\r\nvexp=[         30472124134          22307121041 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6396162213707057064) ];\r\nvexp=[         26683188512          96283024611 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         46925294325          33937979441 ];\r\nvexp=[uint64( 1189627028589296041) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         76315837293          99424320902 ];\r\nvexp=[uint64(11656949174638158734) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         81880058662          38464981613 ];\r\nvexp=[uint64( 7071867154613101059) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(10763027175299443277) ];\r\nvexp=[        330973468653         194345162402 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         79087591419          23535674032 ];\r\nvexp=[uint64(15017024826981320231) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        241564818347         155909390759 ];\r\nvexp=[uint64(15575297637481852549) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         45079186819         295776092742 ];\r\nvexp=[uint64(16532545499676710720) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         22268771423          34477255167 ];\r\nvexp=[uint64(11007510539515659130) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 5666822869473456046) ];\r\nvexp=[         28640204779          36488487629 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(14041232599151835393) ];\r\nvexp=[         28442192536          25169506635 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9611808239041397120) ];\r\nvexp=[          1055826287           7876555270 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        358405360794         498368744795 ];\r\nvexp=[uint64( 4955841772239017238) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3979638765694296062) ];\r\nvexp=[          6903410593           7465748396 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        151761015812         211325030677 ];\r\nvexp=[uint64( 7987025462351843862) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        325266071703          87446899892 ];\r\nvexp=[uint64(16944641327505127607) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3273057505586617135) ];\r\nvexp=[        124425395619          27124979723 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        142722642746          60293518411 ];\r\nvexp=[uint64(10857549622062058131) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        379488415355         462240655923 ];\r\nvexp=[uint64(16693497308621268574) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 5336487237226370963) ];\r\nvexp=[         76728175571          32349586492 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        366909173981         111494050923 ];\r\nvexp=[uint64(11044880014193584327) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2767480983943234275) ];\r\nvexp=[        155407720950          67429662431 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          4375152441          11923449250 ];\r\nvexp=[uint64(14458798758395123876) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        107946470399          33010545783 ];\r\nvexp=[uint64(13708745226178508359) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  546205200272961984) ];\r\nvexp=[          1773793574          11180737745 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6791165959744564855) ];\r\nvexp=[        125726750555          33307435529 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\ntoc\r\n%%\r\n% Read of GJam 64 bit data\r\n% function z = read_input64(fn)\r\n%  fid=fopen(fn);\r\n%  u=textscan(fid,'%u64');\r\n%  fclose(fid);\r\n%  vptr=2; % skip Test case count \r\n%  dptr=1;\r\n%  while vptr\u003csize(u{1},1)\r\n%   if u{1}(vptr)==1 % single N\r\n%    z{dptr}=u{1}(vptr+1);\r\n%    vptr=vptr+2;\r\n%   else % Pair for p/q\r\n%    z{dptr}=[u{1}(vptr+1) u{1}(vptr+2)];\r\n%    vptr=vptr+3;\r\n%   end\r\n%   dptr=dptr+1;\r\n%  end\r\n% end\r\n%Typical GJam 64 bit data\r\n% 100\r\n% 2 2081355757 4898583766\r\n% 2 385960903003 298051413714\r\n% 1 15477096172227810860\r\n% 1 6473043965665514375\r\n% 1 11270280438309969755\r\n% 2 6893018069 8719066441\r\n% 1 6566840053865194126\r\n% 2 21562167101 16520535073\r\n% 2 1684200303 7336396097\r\n% 1 2524835851416755114\r\n% 2 154908421282 199691474905\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-29T03:53:20.000Z","updated_at":"2013-09-29T21:22:24.000Z","published_at":"2013-09-29T04:19:40.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/2924486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Rational Number Tree\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the Large Challenge with a Max of 64 Tree levels. Processing of uint64 size data requires extra care.\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\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right children of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\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 Tree looks like:\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/1\\n    ______|______\\n    |           |\\n   1/2         2/1\\n ___|___     ___|___\\n |     |     |     |\\n1/3   3/2   2/3   3/1]]\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:t\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\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 [N] or [P,Q] where N is a uint64 integer node or [P,Q] (double) are terms of a Node\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 [P,Q](double) or [N](uint64) depends on Input type\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\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[[Input]  [Output]\\n  [2] [1 2]\\n  [1 2] [2]\\n  [5] [3 2]\\n  [3 2] [5]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 14 minutes with only 368 able to process the large data set in less than 3 hours.\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\u003eNotes:\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\u003e1) Matlab has issues with uint64 for dec2bin and matrix multiplies.\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\u003e2) Example of uint64 read is provided in test suite comments\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\u003e3) Bitshift and bitget work on uint64\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\"}]}"},{"id":1942,"title":"GJam 2014 China Rd B: Party","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p1 GJam 2014 China Party\u003e. Small Case.\r\n\r\nThe Goal is determine the optimal Party House. Given a set of people to attend a party, select the home from this set that minimizes the total travel of people. People travel only NSEW, no diagonals, to reach the host's home. If multiple homes have equal distance then select the home with minimum X. If there are more than one with Min distance and equal Min X then choose the house with Min Y.\r\n\r\nThe input is an array that defines rectangles of partiers. One line of the array is [xmin,ymin,xmax,ymax]. Blocks do not overlap.\r\n\r\n\r\n*Input:* [M], Bx4 matrix (B\u003c=100). Total B area of \u003c=1000\r\n\r\n*Output:* [x,y,d] where [x,y] is Party House and d is everyone's total distance\r\n\r\n*Examples:*\r\n\r\n  M   [x y d]\r\n  [0 0 2 2] [1 1 12]\r\n  [-1 2 -1 2;0 0 0 0;1 3 1 3] [-1 2 6]\r\n\r\n \r\n*Contest Performance:* Best Delta Time of 16 minutes with 496 of 2010 able to process the small data set. The large data set was only achieved by 47 in the 3 hrs of contest duration.\r\n\r\n\r\n*Commentary:*\r\n\r\n  1) The small can be solved by brute force since fewer than 1000 points require evaluation.\r\n  2) The large case, which is giving me fits, has up to 1,000,000 points to evaluate.\r\n  3) Graphing the small case with surf gives some unexpected asymmetric results relative to the simple centroid.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p1\"\u003eGJam 2014 China Party\u003c/a\u003e. Small Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine the optimal Party House. Given a set of people to attend a party, select the home from this set that minimizes the total travel of people. People travel only NSEW, no diagonals, to reach the host's home. If multiple homes have equal distance then select the home with minimum X. If there are more than one with Min distance and equal Min X then choose the house with Min Y.\u003c/p\u003e\u003cp\u003eThe input is an array that defines rectangles of partiers. One line of the array is [xmin,ymin,xmax,ymax]. Blocks do not overlap.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], Bx4 matrix (B\u0026lt;=100). Total B area of \u0026lt;=1000\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [x,y,d] where [x,y] is Party House and d is everyone's total distance\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eM   [x y d]\r\n[0 0 2 2] [1 1 12]\r\n[-1 2 -1 2;0 0 0 0;1 3 1 3] [-1 2 6]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 16 minutes with 496 of 2010 able to process the small data set. The large data set was only achieved by 47 in the 3 hrs of contest duration.\u003c/p\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) The small can be solved by brute force since fewer than 1000 points require evaluation.\r\n2) The large case, which is giving me fits, has up to 1,000,000 points to evaluate.\r\n3) Graphing the small case with surf gives some unexpected asymmetric results relative to the simple centroid.\r\n\u003c/pre\u003e","function_template":"function [x,y,d]=Party_CH(p)\r\n x=0;\r\n y=0;\r\n d=0;\r\nend","test_suite":"%%\r\ntic\r\nzm=[0 0 30 30 ];\r\nvexp=[15 15 14880];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[0 0 29 29 ];\r\nvexp=[14 14 13500];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[0 1 0 100 ;0 -100 0 -1 ;-100 0 -1 0 ;1 0 100 0 ];\r\nvexp=[-1 0 20400];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[616 34 616 34 ;78 -828 78 -828 ;-762 -671 -762 -671 ;-199 -960 -199 -960 ;427 -575 427 -575 ;448 798 448 798 ;-819 -939 -819 -939 ;852 -564 852 -564 ;-145 281 -145 281 ;694 828 694 828 ;-278 963 -278 963 ;47 813 47 813 ;-393 24 -393 24 ;198 -257 198 -257 ;-393 -177 -393 -177 ;596 237 596 237 ;-678 760 -678 760 ;-180 92 -180 92 ;-590 995 -590 995 ;27 -946 27 -946 ;459 799 459 799 ;-491 -739 -491 -739 ;-691 -922 -691 -922 ;-38 185 -38 185 ;495 -471 495 -471 ;-850 532 -850 532 ;-360 798 -360 798 ;589 -104 589 -104 ;-492 -364 -492 -364 ;-797 415 -797 415 ;105 319 105 319 ;-879 -347 -879 -347 ;-795 172 -795 172 ;529 831 529 831 ;357 -199 357 -199 ;621 959 621 959 ;-475 125 -475 125 ;769 884 769 884 ;172 -706 172 -706 ;618 222 618 222 ;989 734 989 734 ;-273 478 -273 478 ;-548 930 -548 930 ;-634 889 -634 889 ;599 879 599 879 ;836 834 836 834 ;463 901 463 901 ;972 -903 972 -903 ;-319 495 -319 495 ;-727 -368 -727 -368 ;-685 -487 -685 -487 ;834 902 834 902 ;-114 -961 -114 -961 ;-984 193 -984 193 ;-388 867 -388 867 ;712 232 712 232 ;-750 19 -750 19 ;855 -455 855 -455 ;857 996 857 996 ;493 -722 493 -722 ;-582 426 -582 426 ;-824 848 -824 848 ;479 -993 479 -993 ;-976 -820 -976 -820 ;208 443 208 443 ;919 745 919 745 ;-460 -548 -460 -548 ;375 556 375 556 ;-572 980 -572 980 ;345 -411 345 -411 ;-275 613 -275 613 ;718 -895 718 -895 ;-838 -892 -838 -892 ;-241 836 -241 836 ;336 -878 336 -878 ;891 -355 891 -355 ;-986 989 -986 989 ;629 856 629 856 ;-779 787 -779 787 ;970 711 970 711 ;-578 -163 -578 -163 ;779 735 779 735 ;572 -203 572 -203 ;237 192 237 192 ;-427 -213 -427 -213 ;-338 9 -338 9 ;-905 45 -905 45 ;64 -35 64 -35 ;476 -560 476 -560 ;-370 24 -370 24 ;-836 487 -836 487 ;53 50 53 50 ;540 -897 540 -897 ;-179 -8 -179 -8 ;-979 227 -979 227 ;528 257 528 257 ;-876 615 -876 615 ;-342 -895 -342 -895 ;802 -744 802 -744 ;-458 -395 -458 -395 ];\r\nvexp=[-38 185 110298];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[241 -635 241 -635 ;75 -432 75 -432 ;-522 -517 -522 -517 ;-589 -931 -589 -931 ;-903 447 -903 447 ;-555 757 -555 757 ;-584 19 -584 19 ;420 -458 420 -458 ;-127 517 -127 517 ;-417 158 -417 158 ;542 703 542 703 ;865 -531 865 -531 ;-592 -191 -591 -190 ;570 467 570 467 ;-326 -668 -325 -668 ;197 516 197 516 ;238 -442 239 -441 ;-339 -71 -338 -70 ;255 -450 256 -450 ;408 -232 409 -231 ;302 -765 303 -764 ;-575 687 -575 688 ;-352 -651 -351 -650 ;-483 -96 -483 -95 ;285 170 286 170 ;-349 -660 -348 -659 ;518 -419 518 -418 ;555 -506 556 -506 ;900 97 901 98 ;-969 -258 -969 -257 ;-514 -199 -513 -198 ;-422 -197 -422 -197 ;-852 -115 -852 -114 ;166 -651 166 -650 ;628 -930 629 -930 ;-53 853 -52 853 ;484 503 484 504 ;-912 -976 -911 -975 ;-386 -562 -386 -561 ;521 946 521 947 ;717 -799 718 -797 ;-463 -348 -461 -348 ;-14 167 -13 169 ;-346 -677 -344 -675 ;-675 176 -673 179 ;894 807 896 811 ];\r\nvexp=[-338 -71 136630];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[468 377 468 377 ;839 -105 839 -105 ;-871 487 -871 487 ;-307 651 -307 651 ;135 -929 135 -929 ;-411 -829 -411 -829 ;745 -64 745 -64 ;336 784 336 784 ;-875 -84 -875 -84 ;-723 -736 -723 -736 ;701 -818 701 -818 ;-239 210 -239 210 ;-15 614 -15 614 ;362 225 362 225 ;894 443 894 443 ;-352 -303 -352 -303 ;-287 254 -287 255 ;-739 -960 -739 -960 ;110 28 110 28 ;540 434 541 435 ;-103 -962 -102 -962 ;913 -274 913 -273 ;835 -730 836 -730 ;544 866 545 867 ;-97 -358 -96 -358 ;-490 -319 -490 -319 ;-122 700 -122 702 ;37 902 39 902 ;103 266 104 266 ;-581 -714 -579 -710 ];\r\nvexp=[-97 -358 62565];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[28 122 30 124 ;-85 -609 -83 -607 ;763 19 764 20 ;612 -204 613 -203 ;-521 792 -520 794 ;-782 193 -781 195 ;-662 149 -661 151 ;-561 -568 -559 -567 ;-190 -897 -189 -896 ;-725 -317 -723 -315 ;704 -957 706 -956 ;-329 -967 -328 -966 ;-564 -639 -563 -637 ;-603 -86 -601 -84 ;-165 548 -164 550 ;-197 -150 -195 -148 ;-379 -581 -377 -579 ;401 -684 403 -683 ;546 -194 548 -192 ;267 573 268 574 ;-634 288 -632 290 ;593 857 595 858 ;78 -240 80 -238 ;800 981 801 982 ;473 472 474 473 ;-894 469 -893 471 ;582 347 583 349 ;516 189 518 190 ;333 -865 335 -864 ;-192 507 -191 508 ;-310 534 -309 536 ;-783 -487 -781 -486 ;-915 -696 -914 -695 ;-57 872 -56 874 ;717 -423 718 -422 ;509 -810 510 -809 ;-186 -335 -184 -333 ;-403 629 -401 631 ;-598 104 -596 106 ;-149 -210 -147 -208 ;920 911 922 913 ;819 -934 821 -932 ;518 -328 520 -326 ;-630 429 -628 431 ;348 -766 350 -764 ;242 -300 244 -298 ;387 -191 389 -189 ;-19 -871 -17 -869 ;383 723 385 725 ;-742 -327 -740 -325 ;-181 -43 -179 -41 ;799 -46 801 -44 ;729 -373 731 -371 ;-863 -16 -861 -14 ;998 -444 1000 -442 ;242 962 244 964 ;-249 -412 -247 -410 ;116 -14 118 -12 ;871 -455 873 -453 ;669 492 671 494 ;877 -447 879 -445 ;990 -938 992 -936 ;43 522 45 524 ;-70 45 -68 47 ;808 8 810 10 ;-879 -310 -877 -308 ;979 79 981 81 ;-695 202 -693 204 ;-650 469 -648 471 ;690 -624 692 -622 ;-169 -43 -167 -41 ;-81 723 -78 726 ;-789 968 -787 970 ;-913 698 -912 701 ;-597 -970 -595 -968 ;693 -79 694 -77 ;41 847 43 849 ;39 -728 41 -725 ;422 470 425 473 ;-518 -883 -517 -880 ;-858 784 -855 786 ;-246 311 -245 312 ;194 -715 197 -712 ;-370 -868 -369 -865 ;377 174 380 176 ;-697 223 -694 225 ;-489 -957 -486 -955 ;-585 -164 -583 -162 ;-283 -880 -281 -878 ;-141 -729 -140 -728 ;835 447 838 450 ;-424 -612 -423 -610 ;-280 376 -276 377 ;-351 -393 -350 -392 ;-793 -436 -788 -434 ;-548 -180 -547 -175 ;826 775 831 778 ;-664 -604 -658 -602 ;987 -65 988 -57 ;-540 -796 -533 -795 ];\r\nvexp=[-167 -43 874364];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[-291 955 -289 956 ;276 -710 278 -708 ;-724 283 -722 285 ;-850 588 -848 589 ;625 -511 627 -509 ;-530 -994 -529 -993 ;-312 -655 -311 -654 ;86 -269 87 -267 ;565 -521 566 -520 ;438 320 440 321 ;-330 985 -328 986 ;-408 -942 -407 -940 ;755 792 756 794 ;847 -794 848 -793 ;436 -1 438 0 ;206 -637 208 -635 ;516 544 518 546 ;77 -200 78 -199 ;-618 276 -616 277 ;380 868 382 870 ;-664 284 -663 286 ;-526 929 -524 931 ;743 -555 745 -553 ;331 145 333 146 ;98 124 99 126 ;220 -661 222 -660 ;-92 498 -90 500 ;646 -552 647 -550 ;-531 -850 -529 -849 ;573 -80 574 -79 ;-317 299 -315 300 ;-963 713 -962 714 ;411 818 412 819 ;-99 -503 -97 -501 ;279 599 280 601 ;793 -237 794 -235 ;-41 -876 -39 -875 ;-550 -478 -549 -477 ;-107 820 -105 822 ;657 886 659 888 ;-460 684 -458 686 ;-80 455 -78 457 ;-779 -528 -777 -526 ;-829 719 -827 721 ;-760 -716 -758 -714 ;39 342 41 344 ;254 447 256 449 ;-272 -705 -270 -703 ;-900 507 -898 509 ;498 327 500 329 ;-669 168 -667 170 ;519 -367 521 -365 ;-674 323 -672 325 ;-724 519 -722 521 ;52 -596 54 -594 ;897 -724 899 -722 ;6 -387 8 -385 ;62 808 64 810 ;-84 -749 -82 -747 ;-475 -379 -473 -377 ;-467 -819 -465 -817 ;-130 232 -128 234 ;218 862 220 864 ;-206 339 -204 341 ;821 658 823 660 ;261 61 263 63 ;-704 869 -702 871 ;788 -490 790 -488 ;482 67 484 69 ;-328 -781 -326 -779 ;150 -117 152 -115 ;946 -90 948 -88 ;-68 477 -65 479 ;-704 915 -701 918 ;979 -761 980 -759 ;328 705 331 708 ;969 951 971 953 ;-638 991 -637 993 ;-621 120 -619 121 ;-546 651 -545 654 ;217 550 218 551 ;-743 196 -740 199 ;-591 847 -588 849 ;-48 -769 -46 -766 ;678 424 680 425 ;-250 268 -248 270 ;964 -389 966 -386 ;193 -818 195 -815 ;-803 107 -801 109 ;16 -725 19 -722 ;-721 -274 -720 -273 ;14 666 17 668 ;-822 933 -820 936 ;-895 -416 -894 -412 ;821 -329 824 -326 ;382 68 387 68 ;590 282 595 284 ;97 -310 103 -307 ;147 933 150 933 ;-772 -42 -765 -33 ];\r\nvexp=[-128 232 914624];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[-987 -105 -985 -103 ;-22 -655 -20 -653 ;-622 412 -621 414 ;-526 641 -524 642 ;-694 573 -692 575 ;268 -697 269 -695 ;366 544 368 545 ;648 218 649 220 ;314 443 316 445 ;-589 354 -588 355 ;60 544 62 546 ;21 -444 23 -442 ;175 -224 176 -223 ;-915 -696 -914 -695 ;-417 766 -415 767 ;-874 -599 -873 -598 ;606 921 607 922 ;-672 562 -671 564 ;-17 39 -16 40 ;-708 632 -707 633 ;823 -170 825 -168 ;996 -372 997 -371 ;961 -169 962 -167 ;572 577 573 579 ;53 345 55 347 ;569 453 570 454 ;716 753 718 754 ;-803 -873 -802 -872 ;-110 940 -108 942 ;-943 841 -941 842 ;186 997 187 999 ;-107 388 -105 390 ;193 -54 195 -52 ;-231 -916 -230 -914 ;-962 749 -960 750 ;794 -458 796 -457 ;259 -909 261 -908 ;-719 65 -718 67 ;242 -481 244 -479 ;-528 -223 -526 -221 ;283 955 285 957 ;-888 946 -886 948 ;847 -707 849 -705 ;757 -814 759 -812 ;-940 -941 -938 -939 ;2 -176 4 -174 ;665 -708 667 -706 ;656 170 658 172 ;494 949 496 951 ;994 802 996 804 ;-65 785 -63 787 ;147 684 149 686 ;-488 807 -486 809 ;-875 462 -873 464 ;-152 253 -150 255 ;114 247 116 249 ;760 -206 762 -204 ;-204 569 -202 571 ;89 -752 91 -750 ;-464 -975 -462 -973 ;-783 -545 -781 -543 ;75 -251 77 -249 ;471 -462 473 -460 ;-126 -169 -124 -167 ;-311 615 -309 617 ;-398 -727 -396 -725 ;834 -915 836 -913 ;-87 -21 -85 -19 ;-301 918 -299 920 ;-740 -366 -738 -364 ;24 47 26 49 ;-929 -761 -927 -759 ;-863 -36 -861 -33 ;541 604 543 606 ;-279 -423 -276 -422 ;-620 -116 -619 -114 ;-145 571 -143 573 ;-638 133 -636 136 ;-885 546 -882 549 ;-625 -11 -622 -8 ;-610 -369 -609 -367 ;80 -655 83 -652 ;-398 -183 -395 -182 ;-71 -953 -69 -951 ;-767 939 -766 942 ;-763 -362 -760 -360 ;46 -897 47 -895 ;23 -437 25 -436 ;550 -440 553 -439 ;-660 178 -658 182 ;851 -919 853 -917 ;124 437 125 438 ;-414 -524 -411 -520 ;881 797 884 799 ;-73 -303 -68 -301 ;-373 -585 -369 -584 ;-239 963 -237 968 ;453 965 456 968 ;-742 875 -738 877 ;-894 -954 -884 -944 ];\r\nvexp=[-126 -168 1055075];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[-648 -872 -646 -871 ;739 270 741 272 ;-847 -333 -845 -331 ;-510 -174 -508 -173 ;182 -353 183 -352 ;-573 277 -571 278 ;297 245 299 247 ;-223 818 -221 819 ;886 57 887 58 ;888 -773 889 -772 ;-593 513 -591 514 ;-587 -107 -585 -106 ;-564 40 -563 41 ;234 -624 236 -622 ;-82 902 -81 903 ;222 851 223 852 ;-726 476 -724 478 ;-392 -160 -390 -158 ;-153 -484 -152 -483 ;-522 -962 -520 -960 ;66 -926 68 -925 ;-535 28 -534 29 ;-603 -292 -602 -291 ;-981 -471 -980 -469 ;-367 865 -365 867 ;-445 -75 -443 -73 ;300 -40 301 -38 ;-329 -287 -328 -286 ;554 935 556 936 ;593 -932 594 -930 ;206 873 208 875 ;335 574 336 575 ;296 154 298 155 ;323 -423 325 -422 ;-144 472 -143 474 ;-284 211 -282 213 ;-289 -996 -287 -994 ;167 574 168 575 ;65 803 67 805 ;264 173 266 175 ;-820 -637 -818 -635 ;-897 813 -895 815 ;60 -524 62 -522 ;652 850 654 852 ;-837 57 -835 59 ;31 -96 33 -94 ;-607 540 -605 542 ;-240 794 -238 796 ;386 453 388 455 ;-421 -468 -419 -466 ;-838 -196 -836 -194 ;248 -366 250 -364 ;7 -933 9 -931 ;578 742 580 744 ;-634 -828 -632 -826 ;678 16 680 18 ;706 -163 708 -161 ;228 771 230 773 ;-440 -564 -438 -562 ;228 -606 230 -604 ;-361 652 -359 654 ;-608 -741 -606 -739 ;-926 42 -924 44 ;984 147 986 149 ;-132 -334 -130 -332 ;492 870 494 872 ;-470 523 -468 525 ;440 983 442 985 ;-68 -14 -66 -12 ;652 970 654 972 ;-591 -410 -589 -408 ;-252 -573 -250 -571 ;-639 -424 -637 -421 ;-306 -234 -303 -231 ;-720 81 -718 83 ;-645 845 -642 846 ;-938 507 -936 508 ;646 122 648 125 ;-76 864 -73 867 ;777 -142 778 -141 ;267 -756 269 -755 ;-151 -11 -150 -10 ;-568 -929 -567 -926 ;753 -830 756 -828 ;-205 -663 -202 -661 ;329 368 330 369 ;-402 -682 -399 -679 ;-649 463 -647 465 ;995 538 999 539 ;107 817 111 818 ;-546 -441 -544 -437 ;-856 920 -854 921 ;-587 -483 -584 -479 ;717 -641 719 -639 ;-892 -134 -890 -132 ;-300 -887 -296 -883 ;605 -228 607 -224 ;-93 -994 -90 -994 ;-421 -56 -414 -50 ;76 -592 80 -583 ];\r\nvexp=[-303 -231 855861];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-18T01:44:26.000Z","updated_at":"2013-10-18T02:33:24.000Z","published_at":"2013-10-18T02:33:24.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/2929486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Party\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case.\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 Goal is determine the optimal Party House. Given a set of people to attend a party, select the home from this set that minimizes the total travel of people. People travel only NSEW, no diagonals, to reach the host's home. If multiple homes have equal distance then select the home with minimum X. If there are more than one with Min distance and equal Min X then choose the house with Min 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:t\u003eThe input is an array that defines rectangles of partiers. One line of the array is [xmin,ymin,xmax,ymax]. Blocks do not overlap.\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 [M], Bx4 matrix (B\u0026lt;=100). Total B area of \u0026lt;=1000\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 [x,y,d] where [x,y] is Party House and d is everyone's total distance\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\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[M   [x y d]\\n[0 0 2 2] [1 1 12]\\n[-1 2 -1 2;0 0 0 0;1 3 1 3] [-1 2 6]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 16 minutes with 496 of 2010 able to process the small data set. The large data set was only achieved by 47 in the 3 hrs of contest duration.\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) The small can be solved by brute force since fewer than 1000 points require evaluation.\\n2) The large case, which is giving me fits, has up to 1,000,000 points to evaluate.\\n3) Graphing the small case with surf gives some unexpected asymmetric results relative to the simple centroid.]]\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":1875,"title":"GJam: 2013 China Event: Cannon Angle","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p1 GJam 2013 China Captain Hammer\u003e. The problem is modified to fit within Cody dimensions.\r\n\r\nThe Challenge is to return the lower angle of a cannon given a target distance and an initial cannonball velocity. Gravity is a constant at 9.8m/sec^2, A valid solution is assured. (Error tolerance 2e-6).\r\n\r\n*Input:* [v d]  Velocity and Distance in meters.\r\n\r\n*Output:* theta  in units of degrees with an accuracy of 2e-6\r\n\r\n\r\n*Competition Summary:*  Best Time of 8 minutes,  755/1070 completed\r\n\r\nThe winner completed all three GJam China Challenges in 26 minutes with second at 43 minutes.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p1\"\u003eGJam 2013 China Captain Hammer\u003c/a\u003e. The problem is modified to fit within Cody dimensions.\u003c/p\u003e\u003cp\u003eThe Challenge is to return the lower angle of a cannon given a target distance and an initial cannonball velocity. Gravity is a constant at 9.8m/sec^2, A valid solution is assured. (Error tolerance 2e-6).\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [v d]  Velocity and Distance in meters.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e theta  in units of degrees with an accuracy of 2e-6\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e  Best Time of 8 minutes,  755/1070 completed\u003c/p\u003e\u003cp\u003eThe winner completed all three GJam China Challenges in 26 minutes with second at 43 minutes.\u003c/p\u003e","function_template":"function theta=Cannon(v,d)\r\n  theta=0;\r\nend","test_suite":"%%\r\ntic\r\nvd=[249 6326 ];\r\nexp=44.5948575;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[77 41 ];\r\nexp=1.9429163;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[28 11 ];\r\nexp=3.9516039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 21 ];\r\nexp=0.5347917;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 51 ];\r\nexp=0.6626633;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3210 ];\r\nexp=10.2293872;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[219 61 ];\r\nexp=0.3570850;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[240 41 ];\r\nexp=0.1998405;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[179 3269 ];\r\nexp=44.5041154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3480 ];\r\nexp=11.1338133;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[102 81 ];\r\nexp=2.1878908;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[121 51 ];\r\nexp=0.9781434;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[138 31 ];\r\nexp=0.4570257;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 4500 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 3761 ];\r\nexp=44.4745779;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[37 41 ];\r\nexp=8.5337735;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[32 41 ];\r\nexp=11.5514232;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[199 81 ];\r\nexp=0.5742839;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3360 ];\r\nexp=10.7304643;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[233 71 ];\r\nexp=0.3671784;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[266 81 ];\r\nexp=0.3214027;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[27 21 ];\r\nexp=8.1988972;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[279 21 ];\r\nexp=0.0757408;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5230 ];\r\nexp=17.3572961;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[279 51 ];\r\nexp=0.1839431;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[218 21 ];\r\nexp=0.1240585;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7690 ];\r\nexp=28.4309587;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[89 31 ];\r\nexp=1.0990234;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[141 2028 ];\r\nexp=44.2618026;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[178 81 ];\r\nexp=0.7178094;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 71 ];\r\nexp=1.1443126;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 690 ];\r\nexp=2.1544417;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6970 ];\r\nexp=24.6861041;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[41 1 ];\r\nexp=0.1670142;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[123 21 ];\r\nexp=0.3897097;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[48 61 ];\r\nexp=7.5190650;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[77 81 ];\r\nexp=3.8470546;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 71 ];\r\nexp=0.8628902;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[267 11 ];\r\nexp=0.0433201;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[164 21 ];\r\nexp=0.2192071;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4310 ];\r\nexp=13.9947943;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[256 71 ];\r\nexp=0.3041622;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 41 ];\r\nexp=0.3122545;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7110 ];\r\nexp=25.3662790;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[98 31 ];\r\nexp=0.9063600;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[286 21 ];\r\nexp=0.0720786;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[44 91 ];\r\nexp=13.7142226;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8360 ];\r\nexp=32.7741901;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5060 ];\r\nexp=16.7170592;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[194 81 ];\r\nexp=0.6042720;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[96 61 ];\r\nexp=1.8595639;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[190 1 ];\r\nexp=0.0077770;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[237 51 ];\r\nexp=0.2549165;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[52 31 ];\r\nexp=3.2254600;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 71 ];\r\nexp=0.3189378;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[29 61 ];\r\nexp=22.6508544;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4030 ];\r\nexp=13.0143792;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[39 31 ];\r\nexp=5.7607904;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[62 61 ];\r\nexp=4.4733355;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 61 ];\r\nexp=0.2829993;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[86 51 ];\r\nexp=1.9374169;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[252 91 ];\r\nexp=0.4023216;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[275 11 ];\r\nexp=0.0408363;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 81 ];\r\nexp=9.6529702;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[127 11 ];\r\nexp=0.1914728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[223 61 ];\r\nexp=0.3443890;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[160 21 ];\r\nexp=0.2303047;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[196 31 ];\r\nexp=0.2265546;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[55 91 ];\r\nexp=8.5730698;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[110 1234 ];\r\nexp=44.0395169;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[274 61 ];\r\nexp=0.2281140;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6800 ];\r\nexp=23.8846446;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3310 ];\r\nexp=10.5630642;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[44 31 ];\r\nexp=4.5141266;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[295 1 ];\r\nexp=0.0032261;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[64 11 ];\r\nexp=0.7540525;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[240 21 ];\r\nexp=0.1023567;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[91 21 ];\r\nexp=0.7120327;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1870 ];\r\nexp=5.8744286;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1730 ];\r\nexp=5.4290641;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 51 ];\r\nexp=0.2134486;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[51 91 ];\r\nexp=10.0258563;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4200 ];\r\nexp=13.6075829;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[262 81 ];\r\nexp=0.3312919;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[74 81 ];\r\nexp=4.1674764;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[88 81 ];\r\nexp=2.9417237;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 91 ];\r\nexp=0.3929103;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[72 41 ];\r\nexp=2.2226617;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7900 ];\r\nexp=29.6707716;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1620 ];\r\nexp=5.0800699;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[253 71 ];\r\nexp=0.3114186;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[265 91 ];\r\nexp=0.3638145;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[248 1 ];\r\nexp=0.0045647;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6090 ];\r\nexp=20.7696393;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[158 71 ];\r\nexp=0.7985813;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2170 ];\r\nexp=6.8338053;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1500 ];\r\nexp=4.7002140;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[163 31 ];\r\nexp=0.3275780;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[139 31 ];\r\nexp=0.4504729;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[271 21 ];\r\nexp=0.0802786;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 41 ];\r\nexp=0.9016072;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[156 81 ];\r\nexp=0.9346125;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[100 61 ];\r\nexp=1.7135925;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[85 91 ];\r\nexp=3.5451226;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 61 ];\r\nexp=9.4316060;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 61 ];\r\nexp=5.3012744;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[136 61 ];\r\nexp=0.9260755;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5200 ];\r\nexp=17.2436039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[159 71 ];\r\nexp=0.7885653;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[86 61 ];\r\nexp=2.3180653;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8140 ];\r\nexp=31.2094004;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5190 ];\r\nexp=17.2057754;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 6845 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6570 ];\r\nexp=22.8379951;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[285 71 ];\r\nexp=0.2454102;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6460 ];\r\nexp=22.3511092;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[75 573 ];\r\nexp=43.3260450;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[46 41 ];\r\nexp=5.4730826;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[52 21 ];\r\nexp=2.1824862;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5950 ];\r\nexp=20.1913108;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[68 91 ];\r\nexp=5.5599659;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[64 21 ];\r\nexp=1.4399949;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[36 11 ];\r\nexp=2.3856596;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 21 ];\r\nexp=0.3283507;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[9 1 ];\r\nexp=3.4745532;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[143 31 ];\r\nexp=0.4256222;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[116 91 ];\r\nexp=1.9000393;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[23 41 ];\r\nexp=24.7121091;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8390 ];\r\nexp=33.0022766;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 51 ];\r\nexp=0.3579647;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[66 91 ];\r\nexp=5.9068209;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[203 21 ];\r\nexp=0.1430697;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 230 ];\r\nexp=0.7175455;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7250 ];\r\nexp=26.0668121;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[81 71 ];\r\nexp=3.0438586;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 91 ];\r\nexp=0.7547006;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[273 41 ];\r\nexp=0.1544470;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[224 91 ];\r\nexp=0.5091983;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[25 1 ];\r\nexp=0.4492173;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[243 51 ];\r\nexp=0.2424831;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4920 ];\r\nexp=16.1968290;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 840 ];\r\nexp=2.6239945;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2740 ];\r\nexp=8.6794304;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 91 ];\r\nexp=10.9018740;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[244 81 ];\r\nexp=0.3819768;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[197 31 ];\r\nexp=0.2242603;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[186 31 ];\r\nexp=0.2515707;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[278 71 ];\r\nexp=0.2579249;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[258 1 ];\r\nexp=0.0042177;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2990 ];\r\nexp=9.5002916;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[10 1 ];\r\nexp=2.8120066;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7390 ];\r\nexp=26.7901102;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 430 ];\r\nexp=1.3418485;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[46 215 ];\r\nexp=42.3568299;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6250 ];\r\nexp=21.4435357;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[109 1 ];\r\nexp=0.0236301;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 31 ];\r\nexp=0.3767088;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 41 ];\r\nexp=0.1368700;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[277 21 ];\r\nexp=0.0768385;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[136 81 ];\r\nexp=1.2298703;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 910 ];\r\nexp=2.8433535;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[224 21 ];\r\nexp=0.1175014;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2440 ];\r\nexp=7.7039453;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 71 ];\r\nexp=1.4081796;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[20 31 ];\r\nexp=24.7100694;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5120 ];\r\nexp=16.9419243;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1940 ];\r\nexp=6.0976449;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 1445 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 6635 ];\r\nexp=44.7753101;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 280 ];\r\nexp=0.8735777;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[219 41 ];\r\nexp=0.2400045;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[262 61 ];\r\nexp=0.2494890;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 970 ];\r\nexp=3.0315083;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7720 ];\r\nexp=28.6029416;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[189 31 ];\r\nexp=0.2436475;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[110 51 ];\r\nexp=1.1836603;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 61 ];\r\nexp=0.1928498;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[231 5445 ];\r\nexp=44.9999996;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[69 81 ];\r\nexp=4.7988649;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[107 11 ];\r\nexp=0.2697430;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[114 21 ];\r\nexp=0.4536767;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[47 225 ];\r\nexp=43.2757298;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[17 1 ];\r\nexp=0.9716372;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[130 81 ];\r\nexp=1.3460985;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4630 ];\r\nexp=15.1376561;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[121 91 ];\r\nexp=1.7460565;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[82 41 ];\r\nexp=1.7129065;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[199 31 ];\r\nexp=0.2197751;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[93 71 ];\r\nexp=2.3071761;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5540 ];\r\nexp=18.5513095;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[126 41 ];\r\nexp=0.7251166;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4260 ];\r\nexp=13.8184496;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 440 ];\r\nexp=1.3730779;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3130 ];\r\nexp=9.9634881;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 61 ];\r\nexp=0.8146500;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1170 ];\r\nexp=3.6596870;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 4081 ];\r\nexp=44.4955953;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[271 41 ];\r\nexp=0.1567351;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1490 ];\r\nexp=4.6685979;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[291 21 ];\r\nexp=0.0696230;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[139 51 ];\r\nexp=0.7411528;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[53 51 ];\r\nexp=5.1245500;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[42 71 ];\r\nexp=11.6156650;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[243 91 ];\r\nexp=0.4326773;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4430 ];\r\nexp=14.4204070;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 11 ];\r\nexp=0.0700282;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[112 61 ];\r\nexp=1.3657683;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[219 31 ];\r\nexp=0.1814659;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4910 ];\r\nexp=16.1599009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[44 11 ];\r\nexp=1.5959920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 11 ];\r\nexp=0.0837741;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[276 71 ];\r\nexp=0.2616766;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[75 91 ];\r\nexp=4.5611459;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 21 ];\r\nexp=0.2139567;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[195 41 ];\r\nexp=0.3027202;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[116 81 ];\r\nexp=1.6909858;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[282 8114 ];\r\nexp=44.6253583;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[37 11 ];\r\nexp=2.2581760;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1910 ];\r\nexp=6.0019356;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[182 1 ];\r\nexp=0.0084757;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[176 21 ];\r\nexp=0.1903338;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 1 ];\r\nexp=0.0194965;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1320 ];\r\nexp=4.1319681;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 9061 ];\r\nexp=44.6614758;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7700 ];\r\nexp=28.4881098;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[79 636 ];\r\nexp=43.5312934;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5280 ];\r\nexp=17.5474818;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[227 31 ];\r\nexp=0.1689006;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[275 41 ];\r\nexp=0.1522086;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[171 1 ];\r\nexp=0.0096012;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[229 91 ];\r\nexp=0.4872031;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 1 ];\r\nexp=0.0070187;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 41 ];\r\nexp=0.5327126;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[169 31 ];\r\nexp=0.3047300;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[133 41 ];\r\nexp=0.6507837;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1150 ];\r\nexp=3.5967945;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 1 ];\r\nexp=0.0129922;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[144 51 ];\r\nexp=0.6905672;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[30 51 ];\r\nexp=16.8668385;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[217 4805 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 1 ];\r\nexp=0.0163597;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[58 41 ];\r\nexp=3.4299252;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[116 61 ];\r\nexp=1.2731382;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 1 ];\r\nexp=0.1518392;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[167 21 ];\r\nexp=0.2114020;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[295 31 ];\r\nexp=0.1000086;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[217 51 ];\r\nexp=0.3040728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7220 ];\r\nexp=25.9148699;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[25 51 ];\r\nexp=26.5497777;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3620 ];\r\nexp=11.6073520;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[67 31 ];\r\nexp=1.9402732;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 31 ];\r\nexp=0.0967027;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8610 ];\r\nexp=34.8206771;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[81 91 ];\r\nexp=3.9060385;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 31 ];\r\nexp=2.6826598;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 180 ];\r\nexp=0.5615346;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[73 81 ];\r\nexp=4.2832883;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[201 21 ];\r\nexp=0.1459311;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[68 11 ];\r\nexp=0.6679330;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[159 51 ];\r\nexp=0.5663996;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[204 1 ];\r\nexp=0.0067462;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[189 81 ];\r\nexp=0.6366722;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 590 ];\r\nexp=1.8417362;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[149 61 ];\r\nexp=0.7714868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8980 ];\r\nexp=38.9553303;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[216 11 ];\r\nexp=0.0661918;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 91 ];\r\nexp=1.8053178;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[125 81 ];\r\nexp=1.4560313;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6750 ];\r\nexp=23.6536081;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 790 ];\r\nexp=2.4674046;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4520 ];\r\nexp=14.7419107;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6830 ];\r\nexp=24.0242561;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[94 51 ];\r\nexp=1.6213062;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[75 21 ];\r\nexp=1.0483648;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5630 ];\r\nexp=18.9049816;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[86 71 ];\r\nexp=2.6991243;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 31 ];\r\nexp=4.7284323;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[193 31 ];\r\nexp=0.2336526;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 31 ];\r\nexp=0.1297425;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[287 21 ];\r\nexp=0.0715772;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6870 ];\r\nexp=24.2115915;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 41 ];\r\nexp=3.5519442;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[239 11 ];\r\nexp=0.0540650;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 71 ];\r\nexp=0.5407548;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8470 ];\r\nexp=33.6315148;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[77 61 ];\r\nexp=2.8933815;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 1125 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 9183 ];\r\nexp=44.6530547;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7170 ];\r\nexp=25.6638839;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5560 ];\r\nexp=18.6296154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 980 ];\r\nexp=3.0628800;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 91 ];\r\nexp=1.2154985;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5820 ];\r\nexp=19.6630507;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[32 61 ];\r\nexp=17.8587444;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5270 ];\r\nexp=17.5093740;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[237 31 ];\r\nexp=0.1549479;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[168 1 ];\r\nexp=0.0099472;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[41 71 ];\r\nexp=12.2256701;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[207 11 ];\r\nexp=0.0720728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 61 ];\r\nexp=0.2740155;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 51 ];\r\nexp=0.1590921;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[161 51 ];\r\nexp=0.5524132;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[265 1 ];\r\nexp=0.0039979;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 21 ];\r\nexp=0.0974246;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[195 61 ];\r\nexp=0.4503988;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[160 2612 ];\r\nexp=44.6077195;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6150 ];\r\nexp=21.0206716;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[83 21 ];\r\nexp=0.8559461;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[160 61 ];\r\nexp=0.6690338;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[156 61 ];\r\nexp=0.7037899;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[162 1 ];\r\nexp=0.0106977;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 61 ];\r\nexp=0.6215362;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[107 51 ];\r\nexp=1.2510059;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[215 41 ];\r\nexp=0.2490182;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[212 91 ];\r\nexp=0.5684822;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[84 61 ];\r\nexp=2.4300259;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6630 ];\r\nexp=23.1071658;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[119 61 ];\r\nexp=1.2097168;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[7 1 ];\r\nexp=5.7684795;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6730 ];\r\nexp=23.5617578;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2860 ];\r\nexp=9.0724806;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[274 21 ];\r\nexp=0.0785303;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1510 ];\r\nexp=4.7318359;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[42 21 ];\r\nexp=3.3498826;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5220 ];\r\nexp=17.3193640;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8670 ];\r\nexp=35.3730578;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[18 31 ];\r\nexp=34.8306447;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8540 ];\r\nexp=34.2104815;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[256 21 ];\r\nexp=0.0899619;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[91 71 ];\r\nexp=2.4099422;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[247 51 ];\r\nexp=0.2346928;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[56 21 ];\r\nexp=1.8813698;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[135 91 ];\r\nexp=1.4023810;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3930 ];\r\nexp=12.6682378;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[97 41 ];\r\nexp=1.2237457;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 8000 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 41 ];\r\nexp=0.1468211;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 21 ];\r\nexp=0.2728412;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[23 11 ];\r\nexp=5.8790664;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[139 1 ];\r\nexp=0.0145308;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[78 620 ];\r\nexp=43.5307164;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 41 ];\r\nexp=0.1841728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[69 41 ];\r\nexp=2.4205902;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2730 ];\r\nexp=8.6467533;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[141 91 ];\r\nexp=1.2854868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3800 ];\r\nexp=12.2211854;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 11 ];\r\nexp=0.0367211;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[276 21 ];\r\nexp=0.0773963;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 11 ];\r\nexp=0.2801172;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[238 81 ];\r\nexp=0.4014801;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[200 91 ];\r\nexp=0.6387576;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[293 41 ];\r\nexp=0.1340815;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[299 9122 ];\r\nexp=44.6851269;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[21 1 ];\r\nexp=0.6366722;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[36 91 ];\r\nexp=21.7406299;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[270 7438 ];\r\nexp=44.5863296;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5870 ];\r\nexp=19.8652679;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[125 21 ];\r\nexp=0.3773380;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 81 ];\r\nexp=1.3055882;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4510 ];\r\nexp=14.7060881;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[111 91 ];\r\nexp=2.0753631;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[176 11 ];\r\nexp=0.0996981;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[76 81 ];\r\nexp=3.9496009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[183 51 ];\r\nexp=0.4275657;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[144 41 ];\r\nexp=0.5551429;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[111 11 ];\r\nexp=0.2506519;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[232 21 ];\r\nexp=0.1095376;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[153 2388 ];\r\nexp=44.3197033;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[264 41 ];\r\nexp=0.1651571;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[203 1 ];\r\nexp=0.0068128;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[206 1 ];\r\nexp=0.0066158;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[190 41 ];\r\nexp=0.3188632;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[67 51 ];\r\nexp=3.1962494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[59 21 ];\r\nexp=1.6946784;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8380 ];\r\nexp=32.9257979;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[108 51 ];\r\nexp=1.2279321;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[267 7274 ];\r\nexp=44.7042055;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 21 ];\r\nexp=0.0663905;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 9070 ];\r\nexp=40.4879078;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[247 31 ];\r\nexp=0.1426554;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1580 ];\r\nexp=4.9533543;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 310 ];\r\nexp=0.9672092;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 91 ];\r\nexp=0.4221877;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[110 81 ];\r\nexp=1.8807470;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[189 1 ];\r\nexp=0.0078595;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[299 91 ];\r\nexp=0.2857755;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4820 ];\r\nexp=15.8288860;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 41 ];\r\nexp=0.3399986;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[173 81 ];\r\nexp=0.7599105;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[201 61 ];\r\nexp=0.4239087;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1820 ];\r\nexp=5.7152103;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[130 41 ];\r\nexp=0.6811720;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[65 71 ];\r\nexp=4.7395084;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[192 91 ];\r\nexp=0.6931066;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[136 1887 ];\r\nexp=44.4506934;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[171 51 ];\r\nexp=0.4896861;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[236 91 ];\r\nexp=0.4587274;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[173 31 ];\r\nexp=0.2908008;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[35 41 ];\r\nexp=9.5737143;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 9020 ];\r\nexp=39.5832887;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[296 91 ];\r\nexp=0.2915978;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[33 41 ];\r\nexp=10.8258185;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4110 ];\r\nexp=13.2927675;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[277 1 ];\r\nexp=0.0036590;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[254 31 ];\r\nexp=0.1349008;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[82 81 ];\r\nexp=3.3899244;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[54 21 ];\r\nexp=2.0235395;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[54 91 ];\r\nexp=8.9040499;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[85 71 ];\r\nexp=2.7632032;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[14 1 ];\r\nexp=1.4329920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[170 81 ];\r\nexp=0.7869742;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[42 51 ];\r\nexp=8.2296248;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[35 125 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3390 ];\r\nexp=10.8310888;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[122 81 ];\r\nexp=1.5285870;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[74 31 ];\r\nexp=1.5901570;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8170 ];\r\nexp=31.4129069;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1660 ];\r\nexp=5.2068859;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 41 ];\r\nexp=0.6411051;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 3454 ];\r\nexp=44.4258154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[143 81 ];\r\nexp=1.1123483;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[67 91 ];\r\nexp=5.7294046;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[208 41 ];\r\nexp=0.2660616;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[169 81 ];\r\nexp=0.7963175;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[213 11 ];\r\nexp=0.0680695;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 61 ];\r\nexp=0.7413270;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 21 ];\r\nexp=0.0878899;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[174 71 ];\r\nexp=0.6584409;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[242 41 ];\r\nexp=0.1965510;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[265 31 ];\r\nexp=0.1239339;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6930 ];\r\nexp=24.4952155;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[177 1 ];\r\nexp=0.0089613;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8630 ];\r\nexp=35.0015489;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[281 8057 ];\r\nexp=44.7766386;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4450 ];\r\nexp=14.4916789;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[257 51 ];\r\nexp=0.2167838;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7210 ];\r\nexp=25.8644501;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8110 ];\r\nexp=31.0086245;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 31 ];\r\nexp=0.6044357;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4010 ];\r\nexp=12.9449893;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[85 737 ];\r\nexp=44.2615751;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[287 1 ];\r\nexp=0.0034084;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6900 ];\r\nexp=24.3530039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[107 81 ];\r\nexp=1.9878552;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[73 91 ];\r\nexp=4.8168446;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5830 ];\r\nexp=19.7034001;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[125 51 ];\r\nexp=0.9165221;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[174 31 ];\r\nexp=0.2874678;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[258 91 ];\r\nexp=0.3838254;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[88 51 ];\r\nexp=1.8502291;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 890 ];\r\nexp=2.7806630;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 71 ];\r\nexp=1.1618593;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5890 ];\r\nexp=19.9464871;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[275 81 ];\r\nexp=0.3007089;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[201 31 ];\r\nexp=0.2154232;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[103 61 ];\r\nexp=1.6151178;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[169 11 ];\r\nexp=0.1081282;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[234 81 ];\r\nexp=0.4153242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[127 41 ];\r\nexp=0.7137400;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[45 61 ];\r\nexp=8.5850615;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[268 71 ];\r\nexp=0.2775328;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 81 ];\r\nexp=1.5800158;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2520 ];\r\nexp=7.9631306;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[39 91 ];\r\nexp=17.9483177;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 31 ];\r\nexp=0.6816548;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 91 ];\r\nexp=1.1060655;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1260 ];\r\nexp=3.9429273;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6980 ];\r\nexp=24.7340581;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[212 61 ];\r\nexp=0.3810567;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[8 1 ];\r\nexp=4.4040343;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[153 61 ];\r\nexp=0.7316660;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[55 1 ];\r\nexp=0.0928099;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3080 ];\r\nexp=9.7977560;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[108 81 ];\r\nexp=1.9511562;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[81 41 ];\r\nexp=1.7555143;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[242 71 ];\r\nexp=0.3403741;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[46 81 ];\r\nexp=11.0165379;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[221 1 ];\r\nexp=0.0057482;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[249 71 ];\r\nexp=0.3215048;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7440 ];\r\nexp=27.0544802;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[45 21 ];\r\nexp=2.9165098;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[289 21 ];\r\nexp=0.0705899;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7520 ];\r\nexp=27.4846425;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[235 1 ];\r\nexp=0.0050837;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[299 1234 ];\r\nexp=3.8870928;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 1 ];\r\nexp=0.0044920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[176 51 ];\r\nexp=0.4622558;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8510 ];\r\nexp=33.9588221;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[151 31 ];\r\nexp=0.3817151;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[61 1 ];\r\nexp=0.0754501;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 31 ];\r\nexp=0.4995219;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[238 21 ];\r\nexp=0.1040843;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[238 91 ];\r\nexp=0.4510494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[101 31 ];\r\nexp=0.8533003;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[252 1 ];\r\nexp=0.0044210;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[101 41 ];\r\nexp=1.1286835;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[152 51 ];\r\nexp=0.6197772;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8830 ];\r\nexp=37.0236469;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[240 31 ];\r\nexp=0.1510984;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 51 ];\r\nexp=0.7975086;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1020 ];\r\nexp=3.1884039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[257 91 ];\r\nexp=0.3868183;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[128 11 ];\r\nexp=0.1884927;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6160 ];\r\nexp=21.0627029;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[213 31 ];\r\nexp=0.1918335;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 51 ];\r\nexp=0.2201977;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[126 11 ];\r\nexp=0.1945242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 51 ];\r\nexp=0.1826315;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[150 41 ];\r\nexp=0.5116148;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7480 ];\r\nexp=27.2684278;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4140 ];\r\nexp=13.3975114;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[133 51 ];\r\nexp=0.8095495;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[168 41 ];\r\nexp=0.4078483;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[281 71 ];\r\nexp=0.2524469;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[147 2205 ];\r\nexp=45.0000000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 1 ];\r\nexp=0.0219868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[242 61 ];\r\nexp=0.2924323;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[56 91 ];\r\nexp=8.2607465;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[260 21 ];\r\nexp=0.0872152;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[22 31 ];\r\nexp=19.4398009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[165 71 ];\r\nexp=0.7322451;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2190 ];\r\nexp=6.8980297;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7570 ];\r\nexp=27.7582308;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[141 41 ];\r\nexp=0.5790205;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4840 ];\r\nexp=15.9022391;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[142 11 ];\r\nexp=0.1531570;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7750 ];\r\nexp=28.7765421;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[232 81 ];\r\nexp=0.4225163;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[53 21 ];\r\nexp=2.1007558;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[123 81 ];\r\nexp=1.5038100;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 51 ];\r\nexp=0.3246830;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[273 1 ];\r\nexp=0.0037670;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[50 81 ];\r\nexp=9.2565056;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[298 1 ];\r\nexp=0.0031614;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 11 ];\r\nexp=0.1120718;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6260 ];\r\nexp=21.4861399;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[253 81 ];\r\nexp=0.3552825;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[144 91 ];\r\nexp=1.2324494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[288 8463 ];\r\nexp=44.6385985;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[268 7328 ];\r\nexp=44.5316039;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[297 61 ];\r\nexp=0.1941507;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[62 41 ];\r\nexp=2.9999445;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[223 5074 ];\r\nexp=44.6458418;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[248 91 ];\r\nexp=0.4154052;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[106 61 ];\r\nexp=1.5249020;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[211 41 ];\r\nexp=0.2585494;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[120 21 ];\r\nexp=0.4094400;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[210 1 ];\r\nexp=0.0063662;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4660 ];\r\nexp=15.2461386;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[172 71 ];\r\nexp=0.6738453;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[214 91 ];\r\nexp=0.5579047;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 11 ];\r\nexp=0.1799582;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[50 255 ];\r\nexp=44.1896883;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[227 51 ];\r\nexp=0.2778715;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4330 ];\r\nexp=14.0654935;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[115 1 ];\r\nexp=0.0212287;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[80 91 ];\r\nexp=4.0049368;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[228 21 ];\r\nexp=0.1134147;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[104 11 ];\r\nexp=0.2855301;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[260 61 ];\r\nexp=0.2533422;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 1 ];\r\nexp=0.0033383;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[105 81 ];\r\nexp=2.0644344;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 71 ];\r\nexp=6.1830728;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[43 188 ];\r\nexp=42.5787456;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[214 71 ];\r\nexp=0.4352775;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[284 11 ];\r\nexp=0.0382891;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[267 41 ];\r\nexp=0.1614665;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[270 31 ];\r\nexp=0.1193862;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[131 51 ];\r\nexp=0.8344642;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[70 71 ];\r\nexp=4.0817971;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[21 41 ];\r\nexp=32.8296766;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[282 91 ];\r\nexp=0.3212706;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[24 11 ];\r\nexp=5.3933350;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[226 21 ];\r\nexp=0.1154310;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[227 11 ];\r\nexp=0.0599322;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4800 ];\r\nexp=15.7556484;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[134 81 ];\r\nexp=1.2668806;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[256 61 ];\r\nexp=0.2613212;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8860 ];\r\nexp=37.3715407;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[230 81 ];\r\nexp=0.4298969;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[182 91 ];\r\nexp=0.7713825;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[142 2057 ];\r\nexp=44.3369812;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[32 71 ];\r\nexp=21.4019868;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[142 61 ];\r\nexp=0.8494455;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3170 ];\r\nexp=10.0963242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[191 61 ];\r\nexp=0.4694629;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[190 71 ];\r\nexp=0.5522004;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[205 71 ];\r\nexp=0.4743394;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[248 71 ];\r\nexp=0.3241029;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[166 31 ];\r\nexp=0.3158443;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 51 ];\r\nexp=0.6810732;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6050 ];\r\nexp=20.6033628;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[254 71 ];\r\nexp=0.3089712;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[185 71 ];\r\nexp=0.5824565;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3380 ];\r\nexp=10.7975318;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[296 71 ];\r\nexp=0.2275088;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[38 81 ];\r\nexp=16.6740056;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[24 1 ];\r\nexp=0.4874355;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[280 31 ];\r\nexp=0.1110109;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8690 ];\r\nexp=35.5640799;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 4160 ];\r\nexp=13.4674481;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[252 61 ];\r\nexp=0.2696832;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[98 71 ];\r\nexp=2.0773304;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[209 81 ];\r\nexp=0.5206370;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2710 ];\r\nexp=8.5814338;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[57 21 ];\r\nexp=1.8158465;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[102 51 ];\r\nexp=1.3767520;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 1770 ];\r\nexp=5.5561708;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8160 ];\r\nexp=31.3447605;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[74 71 ];\r\nexp=3.6499694;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[51 41 ];\r\nexp=4.4432920;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[297 91 ];\r\nexp=0.2896374;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[48 71 ];\r\nexp=8.7887794;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[140 41 ];\r\nexp=0.5873229;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[284 61 ];\r\nexp=0.2123322;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[229 41 ];\r\nexp=0.2195007;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[294 81 ];\r\nexp=0.2630966;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[138 71 ];\r\nexp=1.0469250;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[84 11 ];\r\nexp=0.4376931;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[220 11 ];\r\nexp=0.0638067;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 650 ];\r\nexp=2.0293307;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[261 31 ];\r\nexp=0.1277617;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[259 11 ];\r\nexp=0.0460375;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[150 21 ];\r\nexp=0.2620364;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3580 ];\r\nexp=11.4717190;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[295 71 ];\r\nexp=0.2290539;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8330 ];\r\nexp=32.5500293;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[127 21 ];\r\nexp=0.3655463;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[196 91 ];\r\nexp=0.6651000;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7230 ];\r\nexp=25.9654030;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[55 51 ];\r\nexp=4.7550987;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[118 61 ];\r\nexp=1.2303199;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[172 61 ];\r\nexp=0.5789235;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3990 ];\r\nexp=12.8756810;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 41 ];\r\nexp=4.8168001;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8400 ];\r\nexp=33.0792168;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[272 51 ];\r\nexp=0.1935327;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 51 ];\r\nexp=0.2366048;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[209 71 ];\r\nexp=0.4563550;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[113 51 ];\r\nexp=1.1216128;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[58 11 ];\r\nexp=0.9181841;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[90 21 ];\r\nexp=0.7279469;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5580 ];\r\nexp=18.7080845;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[26 1 ];\r\nexp=0.4153242;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6020 ];\r\nexp=20.4792082;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[153 71 ];\r\nexp=0.8516442;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[231 71 ];\r\nexp=0.3735643;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[296 41 ];\r\nexp=0.1313774;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[218 51 ];\r\nexp=0.3012894;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[156 71 ];\r\nexp=0.8191945;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[244 91 ];\r\nexp=0.4291377;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[97 61 ];\r\nexp=1.8213680;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[33 21 ];\r\nexp=5.4466530;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[48 21 ];\r\nexp=2.5623281;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5180 ];\r\nexp=17.1679811;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3630 ];\r\nexp=11.6413032;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[164 81 ];\r\nexp=0.8456275;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[180 3306 ];\r\nexp=44.7534375;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[49 61 ];\r\nexp=7.2085690;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[89 21 ];\r\nexp=0.7444009;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 2110 ];\r\nexp=6.6413404;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[199 4040 ];\r\nexp=44.3892211;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[297 31 ];\r\nexp=0.0986662;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5920 ];\r\nexp=20.0686784;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7180 ];\r\nexp=25.7138602;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5210 ];\r\nexp=17.2814667;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[212 11 ];\r\nexp=0.0687132;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[246 1 ];\r\nexp=0.0046393;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[250 11 ];\r\nexp=0.0494119;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[47 1 ];\r\nexp=0.1270938;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[112 41 ];\r\nexp=0.9177847;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5110 ];\r\nexp=16.9043649;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6410 ];\r\nexp=22.1324926;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7030 ];\r\nexp=24.9752527;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 7970 ];\r\nexp=30.1045540;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[255 1 ];\r\nexp=0.0043176;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[222 5028 ];\r\nexp=44.4345459;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[247 61 ];\r\nexp=0.2807124;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[40 163 ];\r\nexp=43.3665978;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[88 21 ];\r\nexp=0.7614192;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[91 51 ];\r\nexp=1.7300957;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[145 21 ];\r\nexp=0.2804200;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[170 61 ];\r\nexp=0.5926273;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[95 11 ];\r\nexp=0.3421957;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[137 1 ];\r\nexp=0.0149581;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[220 51 ];\r\nexp=0.2958362;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[132 51 ];\r\nexp=0.8218652;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 6850 ];\r\nexp=24.1177523;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[271 61 ];\r\nexp=0.2331926;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[184 31 ];\r\nexp=0.2570695;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 3250 ];\r\nexp=10.3626812;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[11 1 ];\r\nexp=2.3227865;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[148 81 ];\r\nexp=1.0384257;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 5400 ];\r\nexp=18.0076051;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[287 31 ];\r\nexp=0.1056617;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[183 11 ];\r\nexp=0.0922168;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[278 81 ];\r\nexp=0.2942536;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[291 1 ];\r\nexp=0.0033154;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[64 71 ];\r\nexp=4.8902189;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[290 61 ];\r\nexp=0.2036368;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[124 51 ];\r\nexp=0.9313695;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[230 21 ];\r\nexp=0.1114509;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[109 51 ];\r\nexp=1.2054913;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[84 91 ];\r\nexp=3.6304847;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[289 81 ];\r\nexp=0.2722793;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[138 1 ];\r\nexp=0.0147421;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[130 91 ];\r\nexp=1.5124296;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[182 21 ];\r\nexp=0.1779910;\r\ntheta=Cannon(vd(1),vd(2));\r\nassert(abs(theta-exp)\u003c2e-6)\r\n%%\r\nvd=[300 8780 ];\r\nexp=36.4745305","published":true,"deleted":false,"likes_count":7,"comments_count":4,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":59,"test_suite_updated_at":"2014-02-10T18:16:06.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-15T23:22:36.000Z","updated_at":"2026-04-04T03:45:55.000Z","published_at":"2013-09-15T23:34:41.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/2933486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Captain Hammer\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The problem is modified to fit within Cody dimensions.\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 Challenge is to return the lower angle of a cannon given a target distance and an initial cannonball velocity. Gravity is a constant at 9.8m/sec^2, A valid solution is assured. (Error tolerance 2e-6).\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 [v d] Velocity and Distance in meters.\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 theta in units of degrees with an accuracy of 2e-6\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 8 minutes, 755/1070 completed\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 winner completed all three GJam China Challenges in 26 minutes with second at 43 minutes.\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\"}]}"},{"id":44075,"title":"GJam 2017 Kickstart: Parentheses (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p2 GJam 2017 Kickstart Parentheses\u003e. This is the first 100 large cases with  1\u003c=L+R\u003c=10^5.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\r\n\r\n*Input:* [L,R], the quantity of parentheses types\r\n\r\n*Output:* [V], the maximum number of parentheses pairings\r\n\r\n*Examples:* [L,R] [V]; [3,2] [3]\r\n\r\nFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for L+R=10^5. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p2\"\u003eGJam 2017 Kickstart Parentheses\u003c/a\u003e. This is the first 100 large cases with  1\u0026lt;=L+R\u0026lt;=10^5.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [L,R], the quantity of parentheses types\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the maximum number of parentheses pairings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [L,R] [V]; [3,2] [3]\u003c/p\u003e\u003cp\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=10^5. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=parenc(L,R)\r\n% L number of Left parentheses, R number of Right parentheses \r\n% Determine maxinum number of parenthese pairings\r\n% http://code.google.com/codejam/contest/6304486/dashboard#s=p2\r\n\r\nval=0;\r\n \r\nend","test_suite":"%%\r\nv=parenc(36499,40104);\r\nassert(~isempty(v))\r\nassert(v==666106750)\r\n%%\r\nv=parenc(75814,21934);\r\nassert(~isempty(v))\r\nassert(v==240561145)\r\n%%\r\nv=parenc(88684,2943);\r\nassert(~isempty(v))\r\nassert(v==4332096)\r\n%%\r\nv=parenc(63688,19182);\r\nassert(~isempty(v))\r\nassert(v==183984153)\r\n%%\r\nv=parenc(71034,19757);\r\nassert(~isempty(v))\r\nassert(v==195179403)\r\n%%\r\nv=parenc(95210,572);\r\nassert(~isempty(v))\r\nassert(v==163878)\r\n%%\r\nv=parenc(50000,50000);\r\nassert(~isempty(v))\r\nassert(v==1250025000)\r\n%%\r\nv=parenc(37583,54023);\r\nassert(~isempty(v))\r\nassert(v==706259736)\r\n%%\r\nv=parenc(13403,50583);\r\nassert(~isempty(v))\r\nassert(v==89826906)\r\n%%\r\nv=parenc(74324,16176);\r\nassert(~isempty(v))\r\nassert(v==130839576)\r\n%%\r\nv=parenc(95662,20);\r\nassert(~isempty(v))\r\nassert(v==210)\r\n%%\r\nv=parenc(84426,8859);\r\nassert(~isempty(v))\r\nassert(v==39245370)\r\n%%\r\nv=parenc(1764,75732);\r\nassert(~isempty(v))\r\nassert(v==1556730)\r\n%%\r\nv=parenc(75135,17355);\r\nassert(~isempty(v))\r\nassert(v==150606690)\r\n%%\r\nv=parenc(16014,48995);\r\nassert(~isempty(v))\r\nassert(v==128232105)\r\n%%\r\nv=parenc(100000,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(90812,5679);\r\nassert(~isempty(v))\r\nassert(v==16128360)\r\n%%\r\nv=parenc(55860,34690);\r\nassert(~isempty(v))\r\nassert(v==601715395)\r\n%%\r\nv=parenc(82678,16936);\r\nassert(~isempty(v))\r\nassert(v==143422516)\r\n%%\r\nv=parenc(50696,22228);\r\nassert(~isempty(v))\r\nassert(v==247053106)\r\n%%\r\nv=parenc(60183,19425);\r\nassert(~isempty(v))\r\nassert(v==188675025)\r\n%%\r\nv=parenc(88288,3180);\r\nassert(~isempty(v))\r\nassert(v==5057790)\r\n%%\r\nv=parenc(18628,32214);\r\nassert(~isempty(v))\r\nassert(v==173510506)\r\n%%\r\nv=parenc(99681,195);\r\nassert(~isempty(v))\r\nassert(v==19110)\r\n%%\r\nv=parenc(7,13);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(62367,35577);\r\nassert(~isempty(v))\r\nassert(v==632879253)\r\n%%\r\nv=parenc(54171,29950);\r\nassert(~isempty(v))\r\nassert(v==448516225)\r\n%%\r\nv=parenc(22417,8626);\r\nassert(~isempty(v))\r\nassert(v==37208251)\r\n%%\r\nv=parenc(37824,9490);\r\nassert(~isempty(v))\r\nassert(v==45034795)\r\n%%\r\nv=parenc(95981,624);\r\nassert(~isempty(v))\r\nassert(v==195000)\r\n%%\r\nv=parenc(57025,7699);\r\nassert(~isempty(v))\r\nassert(v==29641150)\r\n%%\r\nv=parenc(1,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(16007,35971);\r\nassert(~isempty(v))\r\nassert(v==128120028)\r\n%%\r\nv=parenc(2306,52078);\r\nassert(~isempty(v))\r\nassert(v==2659971)\r\n%%\r\nv=parenc(70555,4927);\r\nassert(~isempty(v))\r\nassert(v==12140128)\r\n%%\r\nv=parenc(19454,63092);\r\nassert(~isempty(v))\r\nassert(v==189238785)\r\n%%\r\nv=parenc(73352,18081);\r\nassert(~isempty(v))\r\nassert(v==163470321)\r\n%%\r\nv=parenc(71344,18591);\r\nassert(~isempty(v))\r\nassert(v==172821936)\r\n%%\r\nv=parenc(76452,13351);\r\nassert(~isempty(v))\r\nassert(v==89131276)\r\n%%\r\nv=parenc(88885,3106);\r\nassert(~isempty(v))\r\nassert(v==4825171)\r\n%%\r\nv=parenc(53619,9977);\r\nassert(~isempty(v))\r\nassert(v==49775253)\r\n%%\r\nv=parenc(39466,15681);\r\nassert(~isempty(v))\r\nassert(v==122954721)\r\n%%\r\nv=parenc(33791,51813);\r\nassert(~isempty(v))\r\nassert(v==570932736)\r\n%%\r\nv=parenc(40408,42624);\r\nassert(~isempty(v))\r\nassert(v==816423436)\r\n%%\r\nv=parenc(998,12);\r\nassert(~isempty(v))\r\nassert(v==78)\r\n%%\r\nv=parenc(58818,23613);\r\nassert(~isempty(v))\r\nassert(v==278798691)\r\n%%\r\nv=parenc(82533,6389);\r\nassert(~isempty(v))\r\nassert(v==20412855)\r\n%%\r\nv=parenc(73823,18704);\r\nassert(~isempty(v))\r\nassert(v==174929160)\r\n%%\r\nv=parenc(24046,69819);\r\nassert(~isempty(v))\r\nassert(v==289117081)\r\n%%\r\nv=parenc(83603,2337);\r\nassert(~isempty(v))\r\nassert(v==2731953)\r\n%%\r\nv=parenc(95719,1658);\r\nassert(~isempty(v))\r\nassert(v==1375311)\r\n%%\r\nv=parenc(9,11);\r\nassert(~isempty(v))\r\nassert(v==45)\r\n%%\r\nv=parenc(29910,7601);\r\nassert(~isempty(v))\r\nassert(v==28891401)\r\n%%\r\nv=parenc(59540,36291);\r\nassert(~isempty(v))\r\nassert(v==658536486)\r\n%%\r\nv=parenc(45871,53970);\r\nassert(~isempty(v))\r\nassert(v==1052097256)\r\n%%\r\nv=parenc(92763,325);\r\nassert(~isempty(v))\r\nassert(v==52975)\r\n%%\r\nv=parenc(9038,44798);\r\nassert(~isempty(v))\r\nassert(v==40847241)\r\n%%\r\nv=parenc(1,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(86549,6287);\r\nassert(~isempty(v))\r\nassert(v==19766328)\r\n%%\r\nv=parenc(14401,46864);\r\nassert(~isempty(v))\r\nassert(v==103701601)\r\n%%\r\nv=parenc(93424,6259);\r\nassert(~isempty(v))\r\nassert(v==19590670)\r\n%%\r\nv=parenc(52933,31692);\r\nassert(~isempty(v))\r\nassert(v==502207278)\r\n%%\r\nv=parenc(91388,2050);\r\nassert(~isempty(v))\r\nassert(v==2102275)\r\n%%\r\nv=parenc(83487,14454);\r\nassert(~isempty(v))\r\nassert(v==104466285)\r\n%%\r\nv=parenc(26996,20778);\r\nassert(~isempty(v))\r\nassert(v==215873031)\r\n%%\r\nv=parenc(88436,1856);\r\nassert(~isempty(v))\r\nassert(v==1723296)\r\n%%\r\nv=parenc(52967,22634);\r\nassert(~isempty(v))\r\nassert(v==256160295)\r\n%%\r\nv=parenc(24373,71635);\r\nassert(~isempty(v))\r\nassert(v==297033751)\r\n%%\r\nv=parenc(25964,41310);\r\nassert(~isempty(v))\r\nassert(v==337077630)\r\n%%\r\nv=parenc(89807,7750);\r\nassert(~isempty(v))\r\nassert(v==30035125)\r\n%%\r\nv=parenc(84029,12987);\r\nassert(~isempty(v))\r\nassert(v==84337578)\r\n%%\r\nv=parenc(23884,41559);\r\nassert(~isempty(v))\r\nassert(v==285234670)\r\n%%\r\nv=parenc(96652,1790);\r\nassert(~isempty(v))\r\nassert(v==1602945)\r\n%%\r\nv=parenc(72470,2981);\r\nassert(~isempty(v))\r\nassert(v==4444671)\r\n%%\r\nv=parenc(51157,44196);\r\nassert(~isempty(v))\r\nassert(v==976665306)\r\n%%\r\nv=parenc(5964,125);\r\nassert(~isempty(v))\r\nassert(v==7875)\r\n%%\r\nv=parenc(5011,79606);\r\nassert(~isempty(v))\r\nassert(v==12557566)\r\n%%\r\nv=parenc(54850,32315);\r\nassert(~isempty(v))\r\nassert(v==522145770)\r\n%%\r\nv=parenc(94427,666);\r\nassert(~isempty(v))\r\nassert(v==222111)\r\n%%\r\nv=parenc(61766,28774);\r\nassert(~isempty(v))\r\nassert(v==413985925)\r\n%%\r\nv=parenc(90805,8083);\r\nassert(~isempty(v))\r\nassert(v==32671486)\r\n%%\r\nv=parenc(50250,34260);\r\nassert(~isempty(v))\r\nassert(v==586890930)\r\n%%\r\nv=parenc(59514,16501);\r\nassert(~isempty(v))\r\nassert(v==136149751)\r\n%%\r\nv=parenc(21448,21340);\r\nassert(~isempty(v))\r\nassert(v==227708470)\r\n%%\r\nv=parenc(48294,20183);\r\nassert(~isempty(v))\r\nassert(v==203686836)\r\n%%\r\nv=parenc(0,100000);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(0,1);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(9321,9795);\r\nassert(~isempty(v))\r\nassert(v==43445181)\r\n%%\r\nv=parenc(33373,207);\r\nassert(~isempty(v))\r\nassert(v==21528)\r\n%%\r\nv=parenc(78080,18989);\r\nassert(~isempty(v))\r\nassert(v==180300555)\r\n%%\r\nv=parenc(89341,7009);\r\nassert(~isempty(v))\r\nassert(v==24566545)\r\n%%\r\nv=parenc(0,2);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(2,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(90124,7716);\r\nassert(~isempty(v))\r\nassert(v==29772186)\r\n%%\r\nv=parenc(36611,12311);\r\nassert(~isempty(v))\r\nassert(v==75786516)\r\n%%\r\nv=parenc(45498,3564);\r\nassert(~isempty(v))\r\nassert(v==6352830)\r\n%%\r\nv=parenc(28355,23958);\r\nassert(~isempty(v))\r\nassert(v==287004861)\r\n%%\r\nv=parenc(58516,24422);\r\nassert(~isempty(v))\r\nassert(v==298229253)\r\n%%\r\nv=parenc(42157,56858);\r\nassert(~isempty(v))\r\nassert(v==888627403)\r\n%%\r\nv=parenc(32854,55517);\r\nassert(~isempty(v))\r\nassert(v==539709085)\r\n\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T22:17:05.000Z","updated_at":"2026-03-24T12:06:44.000Z","published_at":"2017-02-25T22:18:40.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/6304486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Parentheses\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 large cases with 1\u0026lt;=L+R\u0026lt;=10^5.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given L left and R right parentheses determine the maximum number of parentheses pairings.\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 [L,R], the quantity of parentheses types\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 [V], the maximum number of parentheses pairings\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 [L,R] [V]; [3,2] [3]\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\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=10^5. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":44078,"title":"GJam 2017 Kickstart: Leader (Small) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p0 GJam 2017 Kickstart Leader\u003e. This is the first 61 small cases with no spaces in names.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\r\n\r\n*Input:* [names], a cell array of names using only A thru Z; max 100 names\r\n\r\n*Output:* [Leader], a string of the name of the leader\r\n\r\n*Examples:* [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']\r\n\r\nFor the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.\r\n\r\n*Theory:* Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p0\"\u003eGJam 2017 Kickstart Leader\u003c/a\u003e. This is the first 61 small cases with no spaces in names.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [names], a cell array of names using only A thru Z; max 100 names\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Leader], a string of the name of the leader\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']\u003c/p\u003e\u003cp\u003eFor the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function Leader=leader(names)\r\n% cell array of names 1xk\r\n% A:Z or Space in the large case. Note space precedes A alphabetically\r\n% Leader is name with most unique letters A:Z. Tie goes to first name alphabetic.\r\n%\r\nLeader=''; % string\r\n \r\nend","test_suite":"%%\r\nnamec={'ITWUORWMTIHLHXND','YWJRRIJNZBSVKLGZSTOS','ELAUQVVEKJMTWANC','EYHASDSIJOFKAJMOBES','FWWT','NCXHB','HL','RLFYACE','AGEOICCFQQQ','OA','HIIE','TCKTEPLEVQKUQEOWV','A','OARWWOWVOTHDV','PRZOIMYUVVENMEFTGND','TRTDGSTGO','XCNBHNURLC','QUDOEEPPPTOEK','CYCS','HLZHZXMWF','VTILQQXFLTHGW','JCLINHPIAFNTTJ','XXFYEVKXHHEODKH','MSMRUKZJGLXXAMZ','TCUPQXPTAECNWPX','YWPPGXGWQS','CMWGICOTZKVNXFJGPB','MJ','PEGZVIQZWWY','RAM','CDZ','BYHBVFDD','HJBUJRQ','BCYSCGACSNDEK','FAX','V','GDHUQRC','AEFTELYHXD','ZAJLLAHJTD','JTZINGJ','MUPIXBGXISKYTLFWEF','XI','DTFDCLELPYSXSTDTNPCL','QPR','IRTDYHWLDN','VGQCLWS','VZTYIFJRPKFENZU','S','CVWAFVIHLTVFFZYZAJ','HTJ','CFPPXYRGRJDAJD','YKZUWMAFLLOO','LUEP','DCIGCJBFQZ','FPITIZAL','GRNHJMHMHHLBRMHQAPDS','K','STNVAPRYZHYMGXPHKOT','V','AMZSA','HGQANFRDWECVUOO','QTDJYMJGHTXFBKHGNDPM','WJHN','QCANDRZEPCYONLCVIR','MEAR','MMUPHNMPQGELDXNQUNN','RZGVCAHMKZ','J','CYQAQULTG','SKRIQOSQJTFQXHLFR','DVTSYAQKECAW','IJQQSONVKAKKE','BPTSIFKWCZCFLOYZCHI','KJDUFENMXBMW','AGBYXTTYADT','SZUYKXYN','KDJNEQOUJDJVBYJSOG','SYKSOIBCKFDXBLH','NLBEBYUKFEDB','VIHKWHLQSIMLJXLBWY','XSPZPLYSMMQEU','OEPRNDZGFSRJBWLY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CMWGICOTZKVNXFJGPB'))\r\n%%\r\nnamec={'ZHWIEVQY','J','TLCILYLZBIY','FQDRXDBMLD','V','VDZCFZFVWOHRYEZ','EXIVJDONPLRYBSSMDNJY','BJUKZQGUNODOS','ZOWWHCMZ','PBPBN','CZTMQECVKFPDPOJRBKE','RFWTTBVG','LSU','NMRDJISMPYOPPBQRQF','AQOX','MFKXSJGWTB','TG','GMTVFGICOFOVL','NYFPRPZPHOQBDPDLFYQ','ZKJAIXOTXFMOGH','ONHHQFYAJR','YMDESSRM','ODUJTUPZ','OLRMFRNEWMI','PNJ','XSABDDN','EYGMT','SBNXXZNHZPDDSHDLC','YYLCARXECOAJRNIPAPK','SNKLYGHSEAJNXOPHDIIU','JGQHZFGVSQTWMF','M','QMZABHEHZNGWTXWO','A','IWSNMWEPVCQUVVSID','WWKOAMZASDPIVGSS','BMAWDVMNVPIOH','KDWDNRSMZHX','GHTSILNVPNATHRSKMKN','TXAGASW','YAEDJNTGS','ZHDYQVEVYJRN','JUZEFWDFTZJAS','VR','QZMQUWZZQFHLDLR','HOCXYNXM','HVLPIHZTLMPRWBME','W','ZU','KRQDDXKQEZYMWLXE','IYDXZ','GAAXUDATDVMNJAXVOGK','PEQIWYUYTNHQIH','UKRYPQDPBQXKLIG','IOSBQBICCHW','PQYBUJCGAXVCEVJYBS','YELCNJFSD','MENCFWQISHJFIGR','AOAYMFZBD','ERJBNWAHTOXCXHWF','RP','VUHINKNRTWKYGKXYJPTC','SQNYR','VDC','PJNLTP','LQSBGPKVEOUKI','ZWDTTSUCQ','NX','ZLBFCC','RFYNJWTWYWTMZI','FUZNVJGKXEYN','MS','EHO','GKJXLCUBUZPV','NRFCAVUNMCBEHIL','JAHZDCPWLMN','RWXOYX','GRIOHZEUXHMNSQSP','KASXYCVDKMRKLMH','JU','NTHZYRMMYIW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SNKLYGHSEAJNXOPHDIIU'))%%\r\nnamec={'ITWUORWMTIHLHXND','YWJRRIJNZBSVKLGZSTOS','ELAUQVVEKJMTWANC','EYHASDSIJOFKAJMOBES','FWWT','NCXHB','HL','RLFYACE','AGEOICCFQQQ','OA','HIIE','TCKTEPLEVQKUQEOWV','A','OARWWOWVOTHDV','PRZOIMYUVVENMEFTGND','TRTDGSTGO','XCNBHNURLC','QUDOEEPPPTOEK','CYCS','HLZHZXMWF','VTILQQXFLTHGW','JCLINHPIAFNTTJ','XXFYEVKXHHEODKH','MSMRUKZJGLXXAMZ','TCUPQXPTAECNWPX','YWPPGXGWQS','CMWGICOTZKVNXFJGPB','MJ','PEGZVIQZWWY','RAM','CDZ','BYHBVFDD','HJBUJRQ','BCYSCGACSNDEK','FAX','V','GDHUQRC','AEFTELYHXD','ZAJLLAHJTD','JTZINGJ','MUPIXBGXISKYTLFWEF','XI','DTFDCLELPYSXSTDTNPCL','QPR','IRTDYHWLDN','VGQCLWS','VZTYIFJRPKFENZU','S','CVWAFVIHLTVFFZYZAJ','HTJ','CFPPXYRGRJDAJD','YKZUWMAFLLOO','LUEP','DCIGCJBFQZ','FPITIZAL','GRNHJMHMHHLBRMHQAPDS','K','STNVAPRYZHYMGXPHKOT','V','AMZSA','HGQANFRDWECVUOO','QTDJYMJGHTXFBKHGNDPM','WJHN','QCANDRZEPCYONLCVIR','MEAR','MMUPHNMPQGELDXNQUNN','RZGVCAHMKZ','J','CYQAQULTG','SKRIQOSQJTFQXHLFR','DVTSYAQKECAW','IJQQSONVKAKKE','BPTSIFKWCZCFLOYZCHI','KJDUFENMXBMW','AGBYXTTYADT','SZUYKXYN','KDJNEQOUJDJVBYJSOG','SYKSOIBCKFDXBLH','NLBEBYUKFEDB','VIHKWHLQSIMLJXLBWY','XSPZPLYSMMQEU','OEPRNDZGFSRJBWLY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CMWGICOTZKVNXFJGPB'))\r\n%%\r\nnamec={'ZHWIEVQY','J','TLCILYLZBIY','FQDRXDBMLD','V','VDZCFZFVWOHRYEZ','EXIVJDONPLRYBSSMDNJY','BJUKZQGUNODOS','ZOWWHCMZ','PBPBN','CZTMQECVKFPDPOJRBKE','RFWTTBVG','LSU','NMRDJISMPYOPPBQRQF','AQOX','MFKXSJGWTB','TG','GMTVFGICOFOVL','NYFPRPZPHOQBDPDLFYQ','ZKJAIXOTXFMOGH','ONHHQFYAJR','YMDESSRM','ODUJTUPZ','OLRMFRNEWMI','PNJ','XSABDDN','EYGMT','SBNXXZNHZPDDSHDLC','YYLCARXECOAJRNIPAPK','SNKLYGHSEAJNXOPHDIIU','JGQHZFGVSQTWMF','M','QMZABHEHZNGWTXWO','A','IWSNMWEPVCQUVVSID','WWKOAMZASDPIVGSS','BMAWDVMNVPIOH','KDWDNRSMZHX','GHTSILNVPNATHRSKMKN','TXAGASW','YAEDJNTGS','ZHDYQVEVYJRN','JUZEFWDFTZJAS','VR','QZMQUWZZQFHLDLR','HOCXYNXM','HVLPIHZTLMPRWBME','W','ZU','KRQDDXKQEZYMWLXE','IYDXZ','GAAXUDATDVMNJAXVOGK','PEQIWYUYTNHQIH','UKRYPQDPBQXKLIG','IOSBQBICCHW','PQYBUJCGAXVCEVJYBS','YELCNJFSD','MENCFWQISHJFIGR','AOAYMFZBD','ERJBNWAHTOXCXHWF','RP','VUHINKNRTWKYGKXYJPTC','SQNYR','VDC','PJNLTP','LQSBGPKVEOUKI','ZWDTTSUCQ','NX','ZLBFCC','RFYNJWTWYWTMZI','FUZNVJGKXEYN','MS','EHO','GKJXLCUBUZPV','NRFCAVUNMCBEHIL','JAHZDCPWLMN','RWXOYX','GRIOHZEUXHMNSQSP','KASXYCVDKMRKLMH','JU','NTHZYRMMYIW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SNKLYGHSEAJNXOPHDIIU'))\r\n%%\r\nnamec={'LKVZZUM','IGFIF','LDWQNWLKKUZRSLNQPZUD','REYHMPLN','RCYUXMNRNM','KIXERSLPASSPBSZ','MOIJUM','CKLGNTVKPJUQVHFKOJYC','CLWO','F','HQBUXWNYFCKBHP','SZOUKQXZW','VTSUFMCZRBVWZXSX','LVSGFAJNPEAZQLQNXSJ','FKD','SHXDHEYZDVZMEKQXDL','OTXAYLGZXQYQUCUOTPHC','NSMRSGMRYNJNHRDBIJNP','UNCSUEFJWEOCCEAUVD','CLSFESORDOQ','VZCJFLXKE','BXRX','ULAQVGZMZDUQAKDZ','F','PQIRUOKFBEANPWHR','DNTYVUERHOWWWAX','NHMSAQTFXLWC','QGGAKSERLLBZMYS','XANXQC','CGRYIBLGJGITDGJXVQL','JMWZUQP','WCJ','DMXNGYCBWWBVWP','DXJHPUCLEYGNRJZJDIPC','LQHEATYFA','UOOAKBGYKHLTCMV','ECXDXYK','TPPFDLEZVFBHIBL','DXQZVMTOQSKGVGVEQH','MVGNOGJEKYUQCQWKONSU','YDXTWABNGHMVNNR','IHMQBV','EKORVOGNTFM','MTQZZAECALPQE','IIAXZLJMLPSWOXIFODF','FVMFSCOCO','KXF','APFP','CEUKJEFHPCE','HKQJYNMPT','ZEBJEIG','BAHVCJRQCCMX','WJKIOOPDLL','EMENSPOLPNYONCJPOC','LSLPVWSVSAZBKCHVR','FDTSF','ZUWDLZVKNYR','IFSFFUQJYEMFOSZBAJ','LFSNKMBHVGRSEWI','WGLBXIFWXQQPZ','AAC','NDKE','WFMWRVTOHZEVSUHQMWIM','LRTOVVMFQONLNCZ','DIUDEPSGTFKHY','PMOQT','BWONTNIT','LXXSEW','JCPZSFLQB','WJLMGE','URPRN','MJ','NJRHYNZWYDXJZDMBI','OZDCEA','ZMOGQE','VVPPYAQMZULHLP','NUC','H','FEFYDOVFMLNLLHM','KNPEI','YPYVMVIPFDDDOQCRHN','TUMWDLK','PSCZOXGBOLWRGXWLWETD','CZTFF','NPPDNACLYJX','SVMMODP','EBPEYFJCQFBIHNCILTP','ZSQXRMZYDOAICOQHPYHU','HKIEWXFRENDNUIHZVJ','UQIJF','XV','DRMGAISIOH','CCRXDBOU','DTAUYOKXRFPGD','FJFZDAMDODXIGERXXIC','NRPLMN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CKLGNTVKPJUQVHFKOJYC'))\r\n%%\r\nnamec={'RZBUJBVYEBGFA','UQQZUUEPNZQGWI','MEVRXOPONULOFXCNJC','OX','AI','KQDWMQ','GB','UGUXMZRPA','JLPXQPEYBGKUPNOVO','DUNZANKBCLMRE','ZUTGVIJRXWBG','YBLGDIAFTFWXGJFSIDJ','MKPDQB','EXZ','XSPHULXTUUH','YI','SDRNMNHGLLAGWPCAQCN','ZCJHBAXB','VTWJZEWCDZ','DCSV','K','CXTRGSSG','TZDBKEGTJODEI','OA','ZZ','SGGYYQWGS','UGRZHKKCKLRCM','CWU','GAHGFI','EHNRYUPAJHEJQALIXXN','VNUUMZUMVTLGQF','JOJ','DTVZWKINQSLWYC','HNIELOMQRNWSRSFOJP','WBN','AZZQ','WPCBLNHQVQ','FFPEGUSPFC','QZVDUHWFOYF','MODJT','YPTOMLGWCBEB','JPBDAHELDOWYAHOH','LTYAWWOYYKRJUY','LD','ATWGLRGLX','GYAQPCCBMTKYON','EJGXJQH','ZNCSTJONBCWQEYJIOUDU','BQHJZZ','RMKTA','UO','WISAENKNTWQJJJR','QDEOAVK','B','DP','QPIVRVKJLTARRYU','AUEWOQXHLNOH','AQURWTVDAV','RI','VKUZECHUBKDQSYIEGR','GQXG','QPIZPWFRE','LLVFWQVKKVGQ','BOHSFPVLG','QDGNJQKOA','KHSIXTK','X','HOMSMBH','JASGHSCEVJPZEBRWIPHP','MZF','EEX','LDWAANCPMTO','DFOSFACRRWBZSZRGP','UPKDRRIGWMB','TLYLODNZAI','RRMHCO','RQXDXZBHA','TNN','RCEUCCHTGPV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VKUZECHUBKDQSYIEGR'))\r\n%%\r\nnamec={'RIVNPYCJWCV','OGILAGJP','SEMHSESRIMDCHE','JRYPYYQBGCQDMUVYTK','PUOCTXXCFLSVMSNN','HMTLDFW','MHRCIQBMPZJSNWPR','B','WBRPSYSLQUTYTMIOMAAD','X','SHHZDMOTCYXKOEF','JDWI','GVGN','SF','FMZXHACXMMHQJCZFYEA','RVWR','UOHRSYKYJPSYXBFCBUAN','EGGFS','MFB','IXJEMEXV','VOSNTCBQAHVSMQ','ZYCS','GWLD','TQHICAYCAHNMD','ZUPTJKZXKY','NALYIAYH','YUVBDDYUR','JSUEAMBVXC','BCGACYPVUKQJF','SOAEDJRTMC','GIM','DDKQJMZKRYYQUUNXJPLS','WAGEH','ACDMUQHJX','UJUCPFLWIWA','ZNCENEADIUCYTDU','CVQ','OIUWAJ','PELUGQEKQHSBEJ','ZVWEBCDPDPZYWKUEB','MUIKNTXIKIGJWJYZR','UDIX','EQUINTBTACTNCVV','A','QRQCTCOFGAGFH','GVPKX','XXZYHYCQCQOWTXHCU','ZYXQBZB','TRZFYLHLGE','MYLXVXPROOQACCREXGNK','HW','K','O','YJDRWVCHIYNO','OGFIXBXOECV','MYIPYKDMC','LKAZRCB','HBQIYHWJGQVAQK','KAOEMQAEDRGCOSWN','PEVMKNMBNQHJOLZPPU','WQGFHUTZXNKXXSO','DATMPBAWIUI','HFMNTXAIINT','EYSGATS','ELMSTZUCYKGVW','AWELUDPHWE','WXXT','BYZGU','QTKIDJAZOLQJ','XCWQPWF','SHZMZNSIYTFWGJMIR','CQTBY','PAXDKIQ','QKPFHU','FRVKRIYOLC','EVLSGGJROSCDEESC','BNBKELFFEIHEZU','GTVPGG','ABAF','CAMHBXEMVJ','RJIQNECRLR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MYLXVXPROOQACCREXGNK'))\r\n%%\r\nnamec={'IPRJSIWLAUJOORGCCTGB','QNJUCJUG','UESLBPMHAOXY','MAEFTMSUCVADS','HSBZYCEBXHQUMMQEBUX','WG','NBCL','JAVVHRIWN','BZUAGAL','KJPLV','BWLWTYKMYR','ZFREZGVRDXAJAOUBBP','ZGTFGRNBOC','SRHLEKFXDGXR','QHTBROH','OFMXKGHMRZKZWWFTQ','ZBRNSZCLM','LSWQXPSVOWACZJSCLPU','I','WTAWIPAXWSOHLOJG','GHUAFRDMHYCPJ','QLXLWQWPDMQBOOI','OFFSREM','LN','IENTDWRP','PWJTIKZWKWGHQQC','N','YNAAY','RVOXH','DGFWIGPZN','TZVZQIAQZHERN','QLAFRTPG','DVMQPCEHDPZXONAS','NIJY','G','ZKEMNSRWZTYIVJ','JYMWYWPARPXPKVDUSH','YSPFGKNLLGXNWHUOI','VXPCGSWYZS','UAZEC','YNMOLESKERXT','ZMKMIUTTHPVIJ','MQAJNGBCLVWFRKSWS','TIAPONYPCBCIPGISAL','ORYFPRXZXX','IE','PGXIAXPUVYIVFSO','WTOJEJA','YVGYRWBQ','JQARHV','PFIZDXYZEIJJ','GDKETMNEOWBKEGPEYSSG','ZDOBW','GMFZQLV','DSBYFWGKQRP','OKSLQUECSIFYKZ','HSQWESAVJDLINXQZ','KNKSNMHISGTREFBAPYOY','MYNDRKEZMOJY','JMTUWXZPYKJA','WMYRZZ','ZWMBGVZUX','J','ODBT','BTAXXZCTOGCYZQ','XUNNFNWSRLTPMJPFD','IOJUDXHUVDFLQ','IWCTLMAAK','EUPCXRCH','BTWYMHV','LHTILDBDOIAEPCTDES','FNVZZIEBPBVH','VKWF','XFIHRDLRIANSU','OVQEBIKFAZLU','KIWIAQJ','VTMFDZELACMCC','HYYKOUVOLFEUUVTLKXQ','TMRTGV','APFAJVKQDXWHQKHUMX','RMDXJSWKZ','CLMNGGNYCOCEWWQPNETQ','EZC','HZKEARCWVRFYVIIEVEP','LZVOTGOJKGSEDCYZTL','SLTOZPVYLCTY','NWCT','EZDI','FYQZYTGEWRTRCKMFFXAL','MNZFJM','JDGETBAYXINCKQOHVAL','FYRAVEWGICVW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JDGETBAYXINCKQOHVAL'))\r\n%%\r\nnamec={'TWFDIRYHKZDLJ','OAUTRCAUOBITSYPN','PAKWLFO','FVJFD','WGVEMOMLKYA','KIEXGQAEEOBF','BUVHDRLRWWUQODSWHPIE','QERU','I','IHTJCQAMKELW','ZZAKYHSVEZIQG','GQSPFNXGZMIVXWZKR','ULZACQ','UYMSDLYLWJQYOOGOF','GABXROMOVULLPPKPNLYI','OWQPFTJUXRDJXCMISMK','XSOPYVSLTHSQSTHQMQ','ERNGWNQQPX','DQ','QH','TT','FSTEFBNQWEO','MKVWBRBPDAQOTROR','DNCLYLKRHCAQNCDG','GZNENCWTPH','SKDFRFDQGLVAPB','DSLVXBRXPNEWVRKBM','SKLIWJAGBCTJXMKM','ZF','TJVTOGYRCCF','BEZOA','TCZKOHTZZQOFXG','CCXERZETXKLHNYCKJJWE','VVLGRRILCFDLZPGO','RVRAPLCQUYVRHMVZ','IESUGXPJKNYQTMZCVRK','UOGRYOVPBJPGE','MOQS','YHEUKZHUTTI','MCRDTEB','COOEAYZCBH','SOQAE','WMIYA','TLBNUDLE','H','EDWEVYPFKPBDXJDJBA','EXEYTHVVOSRRCQOXKUNG','CBH','ER','IJTMAL','VZJERSOJECHSEIIMFF','FGUJCUULE','INLHAWVTXSOBGKJYSO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IESUGXPJKNYQTMZCVRK'))\r\n%%\r\nnamec={'IOEAKZJPRPKTJNOZB','ZDUMHXJNYNAWNLJWS','JDIVFVATR','VAUXI','JQKKVNTFBRHSBJ','YVYMIK','AIQXIMDFGMSSRTYHP','JRKZIHIGDJOMCPY','LOCSUGBZ','JDHKURUFELAHR','CCVOEQYXGOVAJNB','UDY','AOENHSMZWG','MUZRGTCEZXFGJTAKAKHP','HUJASMIYVGGXLBQ','PIEEOUGV','WQEHQWVXPM','VCOGCNVNRS','YIHHJVFZFE','DZLSACBUF','HNKGSYTVZ','ESWFBPOSHGVJJPZWZ','CWJVGEJBTXXZZM','WVZMWOABZPQ','RITAGYKDRKQ','XTMKTHWMNONMJVT','ABFYDJLYOLM','WCLCVKQZYA','BWTMWKMXPS','CNGQQSPIMSKEVSHSA','TWQXHFWEELMHYTPCBK','LMI','ABKAV','HONTGWQREXDXIFX','HF','TNLMBV','WMLVS','RHWJXBG','EJBWKITPT','PAIVD','ZGNNXXNHYJAFA','HOSHEELTT','XLVQ','GJJOP','USGTDZT','VQYRFAKIVB','RAOWZ','KQLWBYJUXWMQZNBVRZIZ','WJSJAURLTKMFLYEWL','KCS','EJPJLYFZZXZGOGRQL','FNXUQATQXZFOFQ','CDDVYFLVH','LNSED','CZPKXAGODGOFBRXWH','VLDRWIFTLYNJYVCWLQRJ','OKCADKJXABSLKP','N','FMLVZNNHVWIOHTROTIHR','ZSLGUEEIBRZO','YF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KQLWBYJUXWMQZNBVRZIZ'))\r\n%%\r\nnamec={'ZHRKFFVTV','AANVPJKOEXCCV','ISEFLF','QKPAVCV','UFTMUOFYH','UEJBWOMUWVAHVOPFZFKH','XFYUAXTSOIPXJNTWEMVR','TCXGANJ','LZJDTUVDUSRFRBJVXTRE','DKNY','SKTAVBVQWUNKGSTH','LAJUEWXHWXN','UPVUPDPHPMMZK','PR','SKWIGGYNEQJL','ZYIQJEBIT','VPPWWZ','KFKDDE','ANHJYSMUAGUDLLZLGA','LTPOPUXPZXQLTF','PJLIPCUTNJAJ','BZBVKHGWXNR','VFMMGXMNRCYBLQCXO','KPYV','WFQPYLFRDLQLSV','OXH','S','NBNGVZVPT','GJZRZGI','KPWEPURIZPHQDUBXJ','VQJRZEPDCL','ANCGGFSXOOBVWLQT','PLYUYVFUPJPI','JUPDBAJHBWTHJ','PMIBCCWWAIIXIGFPJGQL','RDHEIA','UIVWDFNZFW','NHRTMDVL','YQNTKFTZUMJXSPKPVGHK','K','VVRA','HNRSPOPCTTDMSXPRMGXT','EVYRMDRCK','LUIZ','P','JXOLDLBOXK','O','UHVCWYW','TEABOYYTSAVDXB','ITZKZSMJMCXBDYHW','QIQGRVCUTCJ','TBRYLVVFHOAXWXE','BEGAPORIDU','JLVDPGMDTE','FTJIU','GUVILARGMIYRLPYR','OUJTQOHF','PSUVIJ','QVFZT','OLBISRQC','R','QXVWIGCUUKYSMO','JUM','AJ','RR','JEJAKMJTOINCNFIHG','SMTFIGBRC','ND','CVLGLCGSIQSJHIOP','IYRTAIWPRFYIIWO','VNFVKW','LSRGYZADGAM','IB','NRIVKGDDT','ZQQJZODVGHTLKH','SMVTDXZXVWYDBLY','TDNZHBGP'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'XFYUAXTSOIPXJNTWEMVR'))\r\n%%\r\nnamec={'VAJSYAGAOJIWVEJDZGMI','YONPJGZITZJHLBGMHP','QHEYGNWOSH','ZZXOUYOYUGZFHD','CBADRA','JOJOEOQIM','YIOWQROUDIU','RUHZKCBBKCFNUAVEWW','FEJJEIWMHLIE','GDTHNVFMFKQTBAAHJQXA','PEXFTBA','ZNE','C','EYQFRQENRMGKNOWBT','MUZR','VRUHHYX','VCCI','IOVUGNVRQMWICRZUAEKL','WSRGZ','OBCFVASFRJJ','DSWYSE','IBCTTSZG','BHWWJCGFD','IWZY','WMWWGTDRUXNAM','VEWRGUWKYXYTR','DIWZAGDPFXAZHBHTWDD','CYYESJUIZFB','GVT','QRDYACFPBRAZ','FNQK','VHJENXP','WXYVKOVH','TIILZLAYPTYK','ZGJSV','KHCYMARUVUVCQCCQTJH','ADVG','JUVMQXUCCTBXKE','EGRPHHXLHS','NBDZPHWXFHNDKIO','XQYV','DFKNQRCCXZFSCFDZKC','GE','UIYHHSUFVKKCYSTUENRP','WSLZUMBZNNZHMYRCJ','BLLWRXTADEQRWUME','NVIIH','DZ','YBSHAVJPKJSOSIKZC','QCEZCG','TCOPDCOZYFB','FLWPINXSISEQMADOGXD','ISDCYUSAQTI','AWVJF','TFZPWH','ZWOTRPT','KVWXCOJVW','OHHPEO','KJMCI','TWEIKLTAWLWPFHQVYCU'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IOVUGNVRQMWICRZUAEKL'))\r\n%%\r\nnamec={'QYNQXKWTBWLQAV','QFZBOBFFKUV','SATCT','B','OEU','EDYMJLOSFVXKB','XPTUMA','YXQHUTMRWVXCFN','C','NMUKSZQAARPYKBOJO','VXSUODWMJEOFRT','TQFODG','MVAOPPXKPOYLKZP','AYOSNWPTZNEHFENU','HLAOZUDPGO','BVNYHTE','LLBZFACMMNT','FDCGRYMFSZKECAOD','PCGVWGPEKPRE','T','IQU','PHAJAXB','JZSWKRHOTFWHB','SXLJKBGJNSDVE','ZFOGYXBE','XDZZWSGBUATBEK','IB','FTUTZJGKFHOWSYRC','QZZQZ','RQHRGEQXGWDDVSC','SWAPIZKYUQDUCY','LAQKSCDQQHUHROUPZMPK','KUHXDFAYDTCFHE','YUIGRMJCHOJRLETBLSPH','UPZVBPVFI','GC','MDBPULJTNVIBPVKWICXY','WVQETK','CONDVZ','YFNHSVAQOSVWUG','VOZLYCFAH','VDCQAHPSI','WOJGQPZHGJCJZODPR','RZGYDQOLMCZMBQILF','MQHZBD','QNZIDLDMZOYTJNBDVLK','SWRFWEZZO','O','BRMETQKUMPVZ','BOHQXMICZPIJINBAMM','XZHKWHW','PIWTIMWDW','CSPMUYEFTM','WKQVYHCSKLCGA','FSSQOLQOPVTPSWX','QAILVSVYMY','ZMRDNBAVH','EDLNTXXI','L','FPT','NGEWBBCXSCAWFZTIWELG','AP','SUIWNKPKEIV','AFEUBXU','SEQZZIPOXRYFSI','PNYPEBPJFKU','ZJORBRZJBKSRPGZEC','VRFWCOLARBSMCCETVOOY','BBWSSU','JHDXBKEBTBOFKCQKKGD','VBRDW','CZMEFIYGRXBIZYQAOEB','RYWVQCXMOTJXRE','ASTBGVNOWKSD','FZ','OESEXTKXKGXRRZXAAHW','GCNJIDSJZWV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MDBPULJTNVIBPVKWICXY'))\r\n%%\r\nnamec={'OLBECAKH','WALVIPXKS','UKRKEEKP','ITYJJEIAJLK','LXFEYKGNJRXIAATYUH','S','CFFQVCOZTQBCNKTKIKJ','ADMOLGEQMVHGYZGS','LUIKBIIL','KICCEOKINPQZQXRCT','UIFD','HRHXRIRTEO','POJWXUJTLIXYJUTSP','EOVOWA','HVEVAOIPQHTQWN','ECFXJL','XYEIYBVBPVVKFSESTXO','RTRAHTQLTLKQEB','LPGZRDYFIMXHMOKTGV','RLJUFNHRFMHJGEJKF','NYKPGIMSJNI','SVMDJTMHYV','OLITWNGCMC','QUTJMRHYNI','RIVJRF','SREBXWFBLVVBM','NVYWUKFVPXYQG','NDUGBMD','PQQ','VMWOYCLPJ','OAUXTTK','JJXNESUVLYMXI','KCAZLCEJZ','GD','IEN','PEALDLHFHHSYLOPPVIFU','RIPLRWHJKUXK','VGQUYLBAHIQVQNDUBBIE','WMYSOG','YQZWY','QJJRZKAN','BGGBCNY','HMVFIHNDWALIMJQVJ','JRHXWKGQQFDHQCVQFV','JBWXLCQ','U','UNAMPIJF','MEVHUELFG','UYBBK','VRDQ','BBEKHE','DDOKPNHLFXBERY','HTPDIXJZYTYUMXSA','YFEUGAHWQDYQXZOJHAA','PA','QYKNVGZTGY','EU','MQN','QVX','NQTHFIMP','PVXZFAVR','EHXNBUURJQ','KMFZUNNDNRVEOMM','ZFUOZTXEIKSFIUKGPG','UTOPZCQLLXQFELQHY','ZWAPCWIRETB','ODSGLVJMCQT','FGYCQONLQDRLNXXDU','VWRMDYLJAA','TITDVATQS','WDQLGGUTUCYX','ZQLXPDNEEDARDL','NESRUPLFJKZEEUU','FLLYHOYZJFVXKJCWART','ONNXRSFCTNNH','YPWYQVYD','KAK','PUDMLOAVFUZEOY','INPQ','BMGWA','FULRYCCYXAANRTEL','EZZVVDUQZ','J','QVF','PIKBTC','UZCHTCMK','PA'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LPGZRDYFIMXHMOKTGV'))\r\n%%\r\nnamec={'THWUPQDIQCGC','PHRROUTOWKFBLHCMTBJ','FFZWHOUBDJUHXCQER','PRVUGWJP','OUTCTVJWJQPL','GTK','SQ','AWEJFQMXOBZ','XEGDMNGQUBRRLDH','ZMNYRGDGAXOOV','CEQTQEHJ','ZVYCZLGIFQAE','GKKYTXEWUU','GYKQHFBAYMYJOQ','ZWBFOM','Z','JRQMYCXC','UBCUROTDPZ','V','EWSSKGQGPDWU','QFVZZOTIXD','LORCVQQCFS','VZXYJFGKNGEDGZYJBDD','ZMHTRZAUMQ','SWS','M','SQ','YFZTAVZ','MME','BNGNTDVLNOVD','OWELIJBQLIPJELRCBWN','OYJUHFIWEZFFXZJSK','OJAYEYQRUWEWEL','EZQAUNFB','PPRFEXORKNUZKYRPGL','WMFKLS','O','ZKUCHI','UCQGSZNQCZBQO','JFATSOYNQHPY','UGLWWJLKXTMKMUJC','KECCXUIK','YRDKCXRFIBOLLAXBE','KLMCF','SOGOJXJLRDWLAWDUO','VKDYIGLD','HNLFTM','YPCWFOTTS','DHBFCRNIPQDMPRYUGGSF','Z','PYEOXJXSQQXSZSLPWPBJ','VHICFAEPWBHQQNZWUFRL','UTQGM','HZQHVIRP','TOFXMCSPXOSRHZCTECPV','EMRVAZWTJNRCSTUOGUPP','OLLEHNLX','DCVDNPHCJPVWKMZFJQ','F','YIOJIRL','NBMIBAJINBAXVMKLMFVJ','HKQSHURUVVKX','ABQYBBPFEEQQC','ZPNIPVYDTQO','BICYYSSEXWA','ICYZSXXBBAOVZ','C','QMYH','TDAQVASCMQM','BOCUUTAX','QSD','AOABNRE','ZY','LFETHZKRZKOU','LUNDNYWWQTRCUALDFACW','UJTAEMHDBKITB','MUGDTHGOEGJB','FUWZQEVXPZIEWJQVODQZ','WKG','TCWKECYVIGXY','IHFEUPHBA','VBNJXRDJACJXCXVWBU','RUUSZNXDIZ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EMRVAZWTJNRCSTUOGUPP'))\r\n%%\r\nnamec={'XHS','WZCIBW','PREIVONCYXIZGZP','AEGSLV','FHXOGTXEVVVRJTXV','RXHOMEOTXATLTXBL','XCBYOQUKHHHYAO','PLVIEU','EBQQAAPVBJFJVQRPD','SGRTRBFWDE','TFFLUTMWYONKXMRDIHB','GMFCNLRIPZMXBDMOZ','UAJNMJH','QAXPMUJXEBOYNHIT','ZZW','AXIUPAFWNZXBTMFUW','DKEWEJSZGPSVNSDU','IEBZCGKAS','OGBYKPBYQWXHNGZINIX','VBCXBNNH','OBVVWQLIWS','NOSXD','TZFNK','YGHAAWVVINCIFVOGXWKT','RQHIFXGMQGDIUY','DSIIBXODN','NDBKMRKUOZSLZALHQTC','CGNEDRZIMLQFNUI','JMEJXLRN','VDHTQHPFCZACHS','YPSOTBGBFHYIYN','YVCNHWIYH','AXZSIOHJVA','URPHIVPD','MCR','YRKRGC','X','KHUMUNTDAKIR','DBXJJYUNAWQPFPSI','BTABQCBZ','FRTKUUIUCWNQAOFCDZID','QTMRQOBSKNXPLGYLICC','TWHNUSZIF','GLKROXO','JZFZXDRQOQFHXSTLGI','MYNSZTOAOEPJXDG','JW','IHZKXRT','NXCTMPGBVHRNQLIWMS','LNYXV','EUR','OOIVOTFMWSMZEAGKLD','JTJW','NELD','RLHASFWXKXYXFFAUUVTN','QQAFDL','VBBORVQPHPJWN','TNTQDKJHORHLNLXJC','KIEYZTBC','X','TMVAVQ','L','KZFJGS','V','PAXEXKPY','SURWLRNTQPLUBJ','VXXWUUCFP','ZZMJBVPVDBHCNTZORR','POFFYC','BVCIXQXGTZNNA','JGXSGKZNRZSOTM','MCREZTN','ZYGBHQELCNWP','RZOACKCLGHR','KFQGQGCDFCZMZMA','KAEMYPLQOU','ZLCXJAJPDSAXFES'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'NDBKMRKUOZSLZALHQTC'))\r\n%%\r\nnamec={'QFUAHWIOOKR','ESSXWCVAAXUNPKZBP','XOHBWMTZWPVDBTZK','ZZIAKKZER','TCJNAIFFANO','IHFDHP','ZXVEQXNTNPI','XNQCBWRJOYWNPJGGYOA','DNXYBBWQG','YIDQFQKDCYQ','DOPKJAKR','PCLIEY','GTL','HFJ','I','SZCDBDD','MUKH','SDUFF','QQUNPTRTNRGEMJHMBUZ','TTW','JTF','KLVWALNQRKUIBBKFH','VQRKGXQII','SAGHQQFQ','HRZXSDNB','AMJPRLRVVPUW','NUEHDIBHCGJNNXODCSYT','PFWMVZJRQR','YG','SNO','OTPEWBHKRLCXZOVQB','JJJZPVFVFWF','HZVUBNI','HCANPJ','HFPROKYIHYAFKAX','SFWXOTAIUNXT','JCGZXAZALLS','ZDAPDIF','XQWPRQOFP','BATBRJYMEPH','HWLQMBPJR','ZFXBKAVDWCFKDVIPZP','DXHHBTCMUMMHRITW','MYUWULXGAMCXUB','RUTVCBDKKBKVCODTE','JPLGOLTIB','NKVYBPZFRTWD','DIKMPNLVRWVGP','TZFGVBXIVVKCN','ZQVV','LYUIEEXPSCVGXPAXGNOQ','TVDFNASELMQBMUFRF','TSAE','WTBZJNOXQMGJACUF','ORJDPAIHTADOOOIMKJR','CAFVCRS','BW','MSNRIFUX','XYG','DXNEAWGNPEFEI','CVCCTO','BKKRJFUYCMQVACQBUH','OUKRJQKTHTEKOGWNAJL','EH','CBVJJGAMPB','D','JCX','GDNERYKFLCEMFDGHBLIA','ME','OCVXQRKNLMDIPG','DKXJ','YIMDAGHEBVBDEQLWQZBU','RJOLHANYAZTAXYJ','UOGBZSXATOR','RPWKKLKMITC','ZEMNOKORQCIGT','EZSILXKGHAV','EKYJYDR','LYHVGIR','GIRVT','UTNQHEBGN','XCIRJWQPWZWDJMCHBA','NMAATFTNDCKEKOGY','VRR','HMPLHONBSDYSPYYA','CETSSXCAJBG','AACEYNLPMBJXZSX','GDETCLD','KRVKTREYTUWLQKCQGFNY','PWSNIKIOODMZCEHSS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GDNERYKFLCEMFDGHBLIA'))\r\n%%\r\nnamec={'AYGOJBGQSGJ','UXAWUQATLCHDBW','EMWESHWSFIE','LYDDIYTAFWCMZFZAJRI','PHAZNAPRSSDWVEICENY','LDXHZCQWCQKQQXJXCL','LYJTSODMNVPIGOZA','JDJI','QGFJ','Y','FHJQVEURGXMVQ','BTPBCD','AATAYYOWE','BRUVNITJXCXJHYUWZ','RFGRZELSDAEKRSP','RKBKMBECPVJDPUOOYZ','F','C','RESFUFHIJMVF','GPJXBWH','QCJNXDPKIZHUXDTBXF','DLNOP','G','TPRCBFEBBLVYG','RWIWDZLDWSE','CXBTNANPRQUAGKX','LHRGDVJRJT','DOHFZ','JQ','GHRGNOJ','ZMGESBZULEBZAPYLPYUF','Q','JZKXJTOBMBUOS','ZPDMPTGMAOMTA','X','Q','ZRXJG','VHRBOCEJ','DNPJ','TE','W','SSBFLCL','X','TVMWRYCCTPK','TSPJCVTUO','YQUOBBOVIMFZHRPAPD','BG','USIHMQUJNXQEBBT','BJFQJME','HHBFBWYBVGJLZSYKEUE','OXMPYRXDVDEFETK','OWRADONHAWNMQWFLOC','FLBZA','PDTOJDXJHOALT','XUIDOPAMCTYOWN','BIOCHVREN','QSONQOLLM','ZOHOAV','NMVVYUJDR','XDLH','TWXVFGJLNPLOQJFVM','YNSCRRKGN','EYLZ','YLCVZSWWKT','WKAVXKP','ZJDAIPTKSFN','AB','XDBZLVICXHWTIRJIRQGT','MCBDWUSNJNQWWNQPM','USFGSEZEQ','ZJPRVZNFVSL','FSQFHXFDPDVLLLG','SPDFIBSWLSQRO','ZHVWZ','XQCTIIQEEPEFDQYPZLMJ','HITWONOWQ','LQDK','HGR','DMA','PKTIITITLQGSC','WTMYNMBXQEFQIYHGNHGY','RHNONCQOYTSLBLERI','ZQ','TYZZBXTJ','RRQXASJHEPCG','EBNTNHG','IALSDUFLNWX','OADQT','ORS','LBYYIXQJPSSYVBNN','KKAKFIWWJIUUJOGKH'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LYJTSODMNVPIGOZA'))\r\n%%\r\nnamec={'JKO','OWGREQBHQQUMLNVUWQBK','UHVVBFHIGRXWTTAMJJKO','WJX','SFIBGZXGZUEM','BYSUOAWXKPCQSX','UPNYKWBRQSFGCGUZITC','ITVPOFOUKJAPQX','WVTUMGBJBBUWFZDZBX','CQZCXRSQ','KQWLOVEPOFFEDVG','PVNRITWZIAWKAA','DOQA','ACAPGNWKVMOVE','CWEFWFTQN','QVPNNRXCGHGMLKWAT','YNPWDBTIJYNG','YEFAQDSSZ','AQHQWOIRP','ZQRZLGACEUJSTROOGCJQ','SPL','TGBWXKJQJMW','NKBYESOH','YXYE','NXVGP','QRCYSWHKJUUNGEM','KMIECA','HXCGAIWRKJDQ','EVEMIQWSU','ORY','YHBAHCORMXPHBPM','GIE','ESSZLCMQD','PFNO','UBLFILHYXVAXRBVPTQSN','PYVGVUUQOCWW','VIMJNOMMZVWIMAHG','FURZKEJESYJB','FDM','BIFNVLU','T','AVCYWH','QQF','QK','GPRHV','GTOKJEMWEFGVN','GAXJID','CJHJ','APLORUKKCDHKL','XZPWEXZW','UOXFBFQXHS','GSJHWIYHAXSRPHIGG','G','OLF','TU','ARRKPSRLTB','KKFFBDJHHGSSG','VHNQKMLOR','YWXRSYYRAFNYDWRQA','CKVOWSUJGGXVY','PSUI','MUXJMK','EYTHUKVEVDFTJLDC','OOKYLAR','FTJNSQZVECEXE','EHSXVDTVNNYOWLL','UQJLAUKPOTTJQSJKWUX','JMSIXWHFIQEUIRAEY','XFIBXKZUXSLUIXNFWN','MNMERG','DLTERHWWCZDW','YVSISIWYDEHPARNM','QXI','CHFB','HSYWFLNPTX','LRHZFESLQYKVCHX','GD','JDQKKNOAMBFLFPXVMMI','DKV','DWVXMWJWT','FZM','TRYYOIHQVSNKVLCFRR','SK','APE','JNYDIADPTGRHTVWV','OINTXWT','MYSVMYHMUWAB','JJKWZUSBVXKR','V','C','XHCKOGAB','H','WGY','TEKKJMHVZR','DHBCBLI','DHFFTEMLQVWUYYSZGZ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'UBLFILHYXVAXRBVPTQSN'))\r\n%%\r\nnamec={'EYDUEHDLGIIFHA','XNIGHCY','AMLXIFMEBCIBX','EWMEKRLKZPZDXTT','LXYJTDUC','THUQYBENQVIBDTONJ','FMRIRMQQLHTW','PFQHNKKDYQI','PGCEPKNOHRAPVWKNOZT','CYDECVFCTMAVIP','WWBBORAFBCTQAJW','EWGJT','UCXMKAYWHQM','U','RB','BSBUKVUXOYEPWHVYGA','TKCUMOZNCSDEJ','ZAXTHJPOBNNWAU','EJYVWLFJQTUZPNV','YJJMKOZYGHJ','QZKISVFTHJTW','VSAWHHKYNRZYEUEIJJ','RVGZSNCHLCAKBCEPTBP','TUH','KQ','BPCICNHHES','DZSKRLZJHLRUOZBPCPEB','MIJWJNMJWGSEXRN','UWMSGMUCTRDYV','ZNUWDSZQQCZF','HEHFIHHCVNQDZJW','TMIUAPEQXYP','BMVTYNISYOOZEHLEFBEJ','NYYVNSDKJPA','EKRYBQPXC','T','RUBGXOTDRVMCSEBWP','NBLAQIPECGQ','XQFOAQRKIVM','FKDPYSY','TJBVPJOBINRFKVGU','YRPAKHWHIMHJNURPEKXR','GTMLLKGRSFCFXCJAMO','VZBWFUMLUCYB','ZNOLDI','LRTPCKGBHQCGJWADSCP','AV','ZNNKBC','DEXCWEMD','VRY','HMTWGLNLGMYTPZOCU','SJMKNBWQZGUODYZRAGA','EEQLXAGGKYPX','YLHLRDB','GSXSZPWALUIX','IVLSPD','RT','YBBYZ','MOKXBR','XBNCBE','ULCPP','FNGBCWSTFY','ZIFTHCMMEO','KNLFCQFIOKHQAECVCT','A','BNLUIXLNQP'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SJMKNBWQZGUODYZRAGA'))\r\n%%\r\nnamec={'WGYEJYVVSPVTUTIJXS','UUQ','KK','HNV','OHN','ZDMRXCBS','O','FSNHUPLNIDWJEGHBT','YWSMRUPRO','AWQQD','VDJJS','CZFZ','FMVEADNMWAGZWDAYJN','SXXGRYDF','JR','NRSVCSNIFGIPS','MZH','MPIAV','KKWMUFUZLLCGGBDVYUI','DPYHLZRVREWMVPRUEP','MVSTIJD','GUNJ','WBYOQS','DGYHNMEZDOXPPVQ','OICYPYRJIOSCWAAJONB','CRYRIKGQGKOQXYDDNG','FEKWGTZXNEXPKNCJMEX','YIPMUZAZYTV','VGLXLQFYASS','WO','NICUG','PGBZKWJQSUB','W','PC','RIM','CYPJBH','CZEY','MNYOFOFCHJJKISS','OUVW','LZYPTUYWEB','FCHD','RQBHPP','DHPYWWOMMA','IWYBPWUKTNQGVKGZC','ZJTJBZNGZJGJDIR','QSCZQP','WFOTIGIH','WUI','V','LZGMRVPLQXFQCTBCR','EBIEDK','QJNVGBMNMUGBZOZO','DAUURYORURRXCZC','IIJMVNCTOTEJZIASL','FRZFGSBMPC','QODAJXGTQYG','TQNGZJ','BT','ZCSOEDSMDDL','LFL','MAZAUJGQKR','VUPIXAEKXJ','MJAIVAZWMIAUGMCJ','ZKENPXEYPEIPAAUSSRGK','HYTQUHOWEU','TQYFVCMNCCBWNKVXBJ','UEL','XXFQJTP','GBDICDZMQGZB','EYTIFRXVXXHYMOPKQDLM','JHNXZIYYESOF','BHQVGLMSGUWGCDDSQ','NQMIMXORB','QIYGZSPCJADZVGUK','IXWNX','HOPAJ','FGZPNTQNLLACJNMPVHVE','SPGKGPJDNTHBSJCNS','REHDRD','RLTRDVVQRCE','GAIKLPUP','KWSK','ATJQVAJ','EX','Y','KEZQ','AGWPYYDZNCNO','FOSYLAMECGMZYDGWJUE','CEEMW','SCEORKXPICZT','BLPVKTFEKYIPWIJRG','BFWDAMZCHOIARQ','TFSX','EXPZQXEDAJYRYDESCLY','NHCKRRKWLZJ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EYTIFRXVXXHYMOPKQDLM'))\r\n%%\r\nnamec={'HXYQWEZERXBQFZECZB','S','DMMXSNMRHULVYIJW','HJNZMIEXBLDYQJGFI','MHSOVFVBKINKFJHUIAC','QXUPYMVPVJTU','DMZQFZKHWTHMTHGWYAM','YBVQQERRHBVCJHSROXNU','VZIQAYEL','NTYENEAFAUEL','KXRKXJFBRXXDUGUZRH','B','WDNCGMMYKFMU','N','WAKHZBTPTSPMKZMMXR','STVWJMFSDWTXXAI','TXYKWFIVOYBDQ','EUUW','RMTJBMY','UM','PXUMUR','LBPMXANROSK','TPWMFVZDGKXSAKBEDI','BGVOPFMPPJEWBIOZBNF','XGYKCKUZQDJYAGG','OPLGJT','PHMNOKB','MADXMUBPA','HBWMJZ','KHHZOQKAMALE','JQQIPY','RILSWUD','HRSXFVPEZIIV','ALYJ','KZSTZVVFTYLP','JTN','NOXKHEQILSJGJI','GTOCIJMFH','KW','YHOOKWWSVDGW','HB','NM','QMYRYVR','BJRRIXF','DGO','JU','DYLBWTNIIQBRFK','QKXGRHJSUENSBAVCW','HBCH','KDXTAHUESOKNL'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'QKXGRHJSUENSBAVCW'))\r\n%%\r\nnamec={'ALLW','LNSMSPJJY','RILSPNVFLULVXZVEFFBT','NHPU','QOAEOLWVQ','EVWYDNSUOKB','LUFQUUUGNU','TYYDKHYTYYEJU','TNAAFIIRG','PLLSBFEHB','BMUG','SMKYMCUJKUSR','DVNVSKRLVTQKKOMBDQM','UOJVZJEJECBKYTUDHXYJ','YBATREIH','RICJDCNUOZQV','CKJWAKLJGTIRPRAXOCQY','ANHKL','MOHIUTJIJHPAZAUBY','TDMYDRBFRZBYOFIOHHH','QYRXFHJXVYTSPNO','FOFMTDRGYDP','AOKHLHXAZJAPVVUKZRGH','BQEZMUFMZWEGVTHIA','TWZQYUDBUBCGUK','ZXGMHKSARUPAEEWMIMP','CJMWHCDRTS','BZLQQIOQELAEXI','BSCKWYRQE','PTUDPBTD','M','NQSFMDOU','YWGQJ','YTVGJLJQEUUFSC','XSOXR','NWHP','OBZWDZENZD','FAPOACK','QJEOQ','URAQBEARRMWWJP','RSRXVXJAQJWG','XOULTQLED','VMMMVDXB','OQGOOWPVENYYQCGHHK','SOIXGLQIAPHGVVO','E','DCESGRNXJ','MRKV','JVQUZIMJUQTXSXV','JQFCGOGSYYUPVVRHTEHB','JYVURETJOGIDUG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JQFCGOGSYYUPVVRHTEHB'))\r\n%%\r\nnamec={'GHEOXPV','ZHI','MNFY','YEWVTZJ','SQRXALITJVBJBKOGCNK','UW','VCGKSYD','LACBYWDZYRXUUMDSWEA','BVQBEXXMHPKBQPT','JHAT','ZD','A','XNEWHBIDQ','LBXERLUZYVJ','RIIJASYOPIVQQYYZ','YEZGD','XGT','DLM','LWXZHBIP','ZJBWEPIBCOE','MNXWRV','VHNV','NODYUAZMCNFYMBO','YGEPCRFJXSDDSSSPXP','GEOZMOVT','HNMWNBRLIXS','ADZSBCUVQ','FNHGFLKKEVWNP','BQMSNJCTSYQSHYQVT','CPPHYPDVXPBTLJBCV','HVXIWHTUBFRQ','LPGUVAJMLLFNC','CBARIUY','KZYTDHXK','JRVJSZM','ARXITRIJEIUCPWNSVGSG','F','JPGNHGAAGM','PVNPNDFHSULUZUGVMM','TKLQI','XWMBFIGMYRIVHITGKASG','UDWHDNWRSXWA','OVCEEBENVWLXWAADU','ZTUBMITFAPTYKXUO','QTQIBJAXBZFSNZJO','RZEJKYUBSAZIHUZZTEBN','T','UCWBQVB','WSFVAWJRFDUTNCH','WKOVPHAEUKB','KXNI','MIHKTNESPUOCU','RTEQLAVBCBQHBLTU','SAABESRXBX','VUFKQNNRDEKTEUAPKL','DDVGOWCFTHGEUPQ','TFGPZG','RXUQOEXSOXYE','BCSOJJAGDOXJHVT','GBMVF','QUF','QTZKJTICPIKNX','UHB','NYUEWII','NCQYPHQBOPBZUYHCXAK','YADQSMQRSMMIITHHFA','MBRCRQELQGKCH','LZZO','IRIG','EEHQAF','JNPMVWWYVIPYWUYTHCIG','MKIBIHSMPAZPTUNQDVTT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SQRXALITJVBJBKOGCNK'))\r\n%%\r\nnamec={'Z','DHOWAIFQBVLAERDIZZR','OI','IDHDDVZ','NZLLBCKEYOOPJ','MSSIHR','KYLNPGPUXHBEAEGEU','SKUS','IRNRYAZYHCBFJ','QX','QTCNBH','MN','O','MXZEKVRXPZNGLGBRZDSC','WKOVYXZ','SATCUZMGUZ','YXF','KXRRN','JP','ABVRKBJADWVVELBWGL','VWJ','FSTDKVQBRXVVOMZ','PQEFIDQCYHQDDO','WJBFZVEMWRDU','HGEGY','ASTQOOAHJVE','MDBQSSTJKBDJHYNFS','FHNNVOCUPXZMFNIX','RDZVE','PRNRM','WDQYYBSTFHJ','V','HFVDSTNTWSHBARXDRUB','FCFSUBZSWUSKY','VIEJQCXLMFIBGLG','IQVJMBBYMEQ','RYCQYUO','CTGERJCSRTBXYTRXBO','BY','OPZEAXLZVA','JRACFXQDLK','NBKBZMHLHD','ACOVTFVJGABIZO','I','NRBGNNN','VQTNLZW','SX','LZIAMEGC','WXJCY','HIUXVECXYWESAHFA'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MXZEKVRXPZNGLGBRZDSC'))\r\n%%\r\nnamec={'FZPHLCQSJ','ZJGB','OZEAVWJBIXGMNDIBHB','YUJKVLJUMREHVEUF','NNTS','PSXIZYTGWVQGCO','ANSZYBJHVURYFFRO','DKMKYZSAGDLS','AOMQHNPDDOJIXPBTR','LBJEQAY','LLTRPZUNPX','WYQPBSS','RWRSINKDCVGOJNLDY','CZNT','ODPRRYOFDTHNEA','BMRAURNBMA','XH','CBEPGYFUSLX','PM','YR','GPERILIKMEJBM','ZLNQVLPDTYDXFKJDN','YNJI','VQRYWDQZKL','VF','OCWRLSNYXBKGAAPB','R','XBMBOMSJFMLTWHEIASTG','LFJUCYAAEJOODRDCKDSZ','QRSWJSLZUFZLWUGEXA','ZZOGMDFVXUAORK','NWWAELWYHUVGGNWBAG','MKELXTBXDL','UYREQN','BAPNNWTONMMAWRLPG','ACQZOC','LSSLSEZBGTCTHPYI','LLHJQHDYZK','AVHKKSOFWDMEFBLMZ','EBLAJKZEFFASIKNPVQZN','SI','OLZVNQRDOJACJIBTGVO','ITHHHPSNOVIFEON','PXAQYXXXGNJP','QOCCYQQIQOEOSH','ZBSLZMI','LBRRLYMAGVZ','AZB','HEJPW','IKPDOXNSRWFUQJJ','PBEIXBHIDAPZEXMSMF','AOQ','DGGUVQVWPWVFXYFILK','IOUMLOEBBWHUI','TY','LJYGUSMUVOOWE','LJECMWKCAX','YFZZYUCGAGWUL','KIKTMLRIOVBYXXJ','SODFBPHH','NEVZIFFIIRMTVDROTK','KRFFXGUW','TKLPKQVSQABGWJ','PFTZPYAAAMWGCMQF','NLGALHGVHELLRSYMVYF','ILUVTZL','IONIZNOQ','OMQMXZWWTFGFCCN','WECRHJZVOEIKYY','GCWVGIS','NUGZXHADWNACB','KPBHZOOZ','SIPZLPMAXMVSEJ','GCGDMVXNVL','GXPHICLKI','ZUD','JOQEWVRQIYFDJN','KHV','GZMTURTBSJKWBBBJCG','HCPMZ','ZJXEEMZVCGPUP','EJSGSH','ZVHTHMPYYKDPILIZDDB','XJUSPSGWSXG','MFUPWZBS','EUHW','JPWGKNPJGDCE','HJ','ATZ','IU','KZTYEQ','YTQJOFASTIUQHT','PNACCYGUDBOWSQM','VEVJECRAOQIWY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'OLZVNQRDOJACJIBTGVO'))\r\n%%\r\nnamec={'YRMJICHXATZTRMJGAR','FKNDFFDBNZQRYNYGNX','WULIPQKVMQPRZUELHBF','XTWNMDKPSAH','HJXYQCTHAGWPICMC','OJKOGHWDOMMHX','NLEFJBMBM','NGPUQZOCKRIXVA','WSJGNDAGQHUO','YEQVSTBTYKTQW','FBJOFTUVSTLYXX','JJGUKEKOVNYKFBSZOGR','AQH','MQTLVPBSVWYUIELEZRN','LDLZDHCVLLKWKBH','MVZGDZCOAXTDBH','YE','TZSAKCU','F','XWA','RDCJXSS','ARRVMVB','IXKZJUAMN','EBBDOOYDWQMBHYO','ROFCLQUT','EDFUXWFQIVCUOBH','QMTPEIDOHXNEMUEBTMB','GNRIMIMRKWSRQK','CQUOEKTFWBZILEI','MHPZY','PIFDZOFL','NCWRELO','FMNFQSF','WER','UEYBYPDGXQAQETKXQXVJ','SLBWUKN','FMRYZSGCXQEQCGQPB','TNCVXGBSPXGNTDHET','MNJ','VAESXUHIBU','VUZRSYLATSEAW','NYGYKHJW','IAHCUOPIMEYPNZANS','SMPHROHJ','QKTHERTDFBV','ZEZZJNFRM','PAMPJCXL','AQBFZZQMNXIWH','MQJKYJWJLQYWIQIC','FADYJXGWRGGQDLCN','OZNVSOSQFYOTAG','UATQ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MQTLVPBSVWYUIELEZRN'))\r\n%%\r\nnamec={'OKYXOCHXC','WUCHNGRDZRBUAMKYBYR','KODKGIVSKXHNQQQEZKYZ','TXMPLWRRRTQXT','EVSLHETL','QWQHMKVVAD','YWNUODRFVUEZKI','BGCXWXN','DRBMONETDKXMHO','MCFUKSNOCEHQAK','JDBVKORRWAFZR','WDURIEMNLUFO','ORKOM','UKKPDHTHPCKU','WRTRXH','UEXFBNJNDTPKJT','SHDBQGVDATZNJGXMII','NSYSMFHI','GYETTAU','RZKRYICQAGF','WPPEMWES','UPJCPCZRM','LNGCVBZTYRJOB','SLNJWLEONBSDEX','HOHIMCTUIE','WOUFXRTVDKUUXBNYIBIB','VHGULPEBLOVIYKJN','YOSOQLWSHMJOK','SRS','PUJVLJT','TUKDPQAZARHPGMIUWR','CVAYCJFVZCYKSZGLEFBL','XPMQDN','EGVIOVX','CKWNOBHAIYYDCTQ','Q','HAK','GCVVXCLI','QJHHZXKTMU','AT','KJ','CM','XBRMN','EPSLCDVWQJMHJBLHELT','MKCZAUASYPSCSKK','WRUPHXMGDK','JWTLRTXKR','OFWYPCFLZOKSSIQN','YXLFUYUAQSGOXABAGAD','HN','RVB','OYN','MDGCWCOIHSAIS','BNAIMRK','SMIEZURUTTIDN','YVWMOWXUXGMXZ','LFSVJTJNIUYRYIBSV','WFIP','XOARJRU','LPQHDSU','IP','Y','WEGHMPEAJSWSTJIR','LYPLZBJI','UPNZWVOSSHKRSURGTVAC','WZSUALERZ','BVHUJHTUQHKNVRGRLE','GZ','CHMOLJUBXNCCOFBQBHHK','RVJSAWDMHDAEXR','RGLCMFSFMQ','NXTOXERFCYJYOFRBPA','MXJJROKRCQTCERFUSEP','AGLCGLYEAG','DCOLWJH','OT','CEOWMU','JWQEMMZFSDA','JLFSLCJRADNG','CTQCBVGZSWAZAMEJP','HJQQJT','QHCQRRRYOF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SHDBQGVDATZNJGXMII'))\r\n%%\r\nnamec={'NGLZHUMADA','AZILUVGRZ','WMNBT','GYSTYVINKIECZMNQZL','ECXQTL','VWRTULBMJDO','H','FLVVGYTKS','AFBDFORWDIZYJ','LRMVQUDKDTFILNE','KT','COTJDBNMWYLUVWJMUJXS','TTYII','XHYSDPTIT','HOPTKJHZNOIIXJI','YIVJUYGFB','XOUJPTEEDKMLZN','DMZTUQVCPMOJTRCSXWTI','PMHQKVAJRMFYNTV','PFCFOEPHTFHXUT','QFKAFLRJIHO','XFUACXQTNPISWBADXJ','Z','HSHHZZVOKF','UIGBVNKBFDYA','DBOMNWNRYE','EXVHV','IUED','XBCRBVM','QPDIGQRWMLFCTFE','CZEIKFKXJPNZ','QZHYNGQRELFP','JQKUTHSVFJPGYYZGLYA','PDZYOAJ','CZZIOGDFEKVCR','HDWYLVTGHZR','AMEMKIIBFM','HGBW','MFEKMJAJEFBQPRPA','UDRBQ','KBHPSSTTPQCXULJN','JVSOGFJRRCWGQEROTD','NSYBMKZ','JNETACZUZJDNGJDKPQ','DHQACXDZOVTMQKRCBFEH','EGPZFGLFAZNKQCPYMOLL','EJNWQYTPCSKHROERKWFF','QNHBHM','LPQPYVADQTSKURQE','PBMC','BSZNGEOPOSEZOYTXDX','AZAFTKXUUSEIRZNXKBH','FYTLSIEVYCMQ','FVQPOZYGMTLFWMENJC','I','QWTSFHBPIDNGIM','TPL','DYXTKYWIDOEINGXLMVLQ','BBPMULS','SUMCQUFARFFPZDVSH','BKMRLOZQEGPPYZF','TOYOGVMV','PFEOBGZNXGKOYQVBL','KFMVTGN','TV','YXRYSBJQUUBGWJBTG','LURDAGYJXMY','GMZ','IVGOGHE','NOUDGHGPVT','XSLETYJZUXBSWG','SBKSW','Q','WHSPWGNDCB','KKJDSBRQFKHIYHY','XDHH','MLEFRXPCDXV','YJWCGHSFBLYPEXR','EVNOGUL','YAAUJWLIRJHFPIJEYQI','DQOQXTBBFXFKYUWYXB','AJFEZVMFYULDLJS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DHQACXDZOVTMQKRCBFEH'))\r\n%%\r\nnamec={'NYKFHEYGIWDRNR','ZMFELMGVPAXXYYSGE','KUXLNNNRBRNGFVTO','FCVXASKDIEOVW','KGAXP','DOGJMZWJGXMA','WZAZZEBRSFTYMKUHQT','UOIAUGP','WOVRO','NKKWPLXNP','ZXDOBY','CQLIBFYTM','ZUIFAWEQDTVLGQ','JBTZVVL','WFAVVTDYPPZMQ','QYNPYDXMFQBAIXEKHB','WWXIIDLQVUK','RRUNL','SRKKOARPCHQWIPX','TJYBMUSCXCSL','GWLQLGOZFAKFI','JTEDUQQAIKYCYF','GNKJBIXFQHLY','UFG','ZPXZXELZZJMAMKNO','PWFEUVLBHFNMLUHOYLKF','LFLNKCRS','VIYBFOJL','QLDDNBCSAFPLSRHUFS','SSKNUIMRPXH','KJAMTWR','DFGDRLVJKEVSJKFQD','XWWZXONGQBCN','FXKSWCTC','DMHNSYQLJAFYKEJNA','SA','LKSEEDCLKPVYYYUDSXJ','EKFXCNEEBAJAV','ZCGKPDJBNWBPRDJ','NOP','LLUMUMZQHXKEGNTTPN','YQNQVBQNJRWLMIK','XM','TLKAAIHFMCNSSPMY','RWKZI','B','KPVIQOIPLNRZBNI','ICTRPGEPIYQMF','USOYXNGXPHNHPKE','TTWXBSMFPSZZYXM','HKPWROFP','UOY','ANFXBYIFVPXRDJK','JREXET','LDSZECJLWCBHSQWTCAV','FZZBGXNBEA','I','WKPMIMHQEEGGEYTGAHB','NQGHUHVZMXRT','FRMNOJLMFCLUJENO','UVDTQOXJBMHHBQ','OA','S','IPYE','IR','WMULVFEAIHFJ','JPQZZDGRBAVNBAG','ETZQWSOAZMBLVQ','M'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'WZAZZEBRSFTYMKUHQT'))\r\n%%\r\nnamec={'YGOPOXMMGZYEXIZJ','GRXPDHIVZADUYKEB','UWUCUPS','IIZZSDCF','JIZJWUBZDTFTLZOCK','LKLGJWEBFOCEW','WMLRLPFZJHU','AIARXBYZVMVVYMZEXKJ','TQAJAEARSFT','HJUGNDUAHPEX','NDGVDH','EOSWLGTWR','SABZSXYDR','C','YQDEEKWVNUKURM','LFEYIYLUYQMDLILT','CYEFWERUNWHYV','VHNP','ED','MQAYYWFF','AKWOG','EOLJT','MWSITBYMRKEOQ','FIUCWARXBBC','MYDEFDYGXICH','MMYYGQVGFICUAXCRS','WWPULNFLHM','LQNFPWNT','CKVWCGQT','HDBOPMTUYYNHLTNSLC','WVZCNJFLSQRMCE','SUKMDRPWWDZY','SIOUVYRY','EXVQO','FSHXIR','EVSTROF','YNUOG','VKUGYGUJLBIBRDF','QYZDIAJCOAIKYXJOZ','UQNFNOOIUUYOP','O','IWVIYUDSV','RIAEQMJQ','JGXPONWN','GHWIKCVUUULEQFFVOUTE','USATQADSTPSBWMSR','OBBZWUMHMXPJ','PDS','WDEXWSO','ICOLI'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GRXPDHIVZADUYKEB'))\r\n%%\r\nnamec={'VYH','QFSOIGSE','OCPFJTROG','ZBHEWWQ','LZJWJJFYDSDITO','ZUNUNN','KFNYNQ','IRKSHPFDSXGSNUOID','VQCISVNNHLNRJPNTXVQS','KRPEPCPGLKOJEOFPUOQF','UKOBUYSK','RG','MVPPBWGDTLRQSAFFUD','AJSMEGOQUGUEWGDWZO','MDBEAYZQREADG','LSXWSUMQXEMAQZAUZUH','GQQ','HJNBCZYQGGWZEV','MQPZDGCPEKYRDB','UZT','LZMCS','TODEMUWPSQBWS','WFULOCXD','VVJZKPOEKSOTOGVUSYK','EFXKO','NY','LIBOUCDINCXTPFKPXG','MDEXVSEEMXINRWKQNHIA','XFJDVCKCOFH','ZEBAJNOX','NJUVIN','O','TRCVTEZLWB','VZEFSLLUXYUOBS','PUEFRCWUOTX','KOQGLFROZL','PZIQXSABZKTASZMLZOR','VIANZLODOLNYKG','FDYXFKCIQBHRJAWLAC','LHO','QLRGGCEDMLKOHD','YMOJB','HBLMFTLT','TAL','NVXSLF','E','CVIARHWTKWIEEB','VVNPJYU','MY','GHEOHZYPRPHZLPP','HGATPAG','WKNRVYBTRFHCYGFVTU','W','IHSGEKQRADAZGOFR','LGZZZHRWJJQ','CMKVAOWRDNXRJWKDRU','OMNXOBJD','NDFF','TTMOCY','SUZVPFSGODKTYU','PLXUISCWQ','LKRABEVIJJOP','REBLYVBBCQWDEYW','KGAVXAOVWWOQLUTFLVF','VIEHXWRO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FDYXFKCIQBHRJAWLAC'))\r\n%%\r\nnamec={'Z','YTZFCBEEJ','IWSMGCQOIKDVQXNLY','WTZWBQUY','AGSCPCCZWIN','WRBBVZFW','XPVFODFMOAICPGQXLYPZ','AICVNQCH','AGYSIIQVXOIX','QTXIZADDYKEQAZWQW','YKDDXSJXFQMWFA','WWUZJWWZ','RSBJNRUQMNWGWPL','CERSTMDEXSWDT','IGNY','TUDREACBEH','IGNSZYVWJBGMUUTFG','QSDDOZQFEDR','NEMNYZLYHAFWPPZKM','H','LLX','GZDDNQCID','CKFXPTAAOCWSDAAL','PBDWR','PTSTYMVFHKF','QVFCNZYBKZCWUYLBMWSY','BVNEMMZRUJHPZAR','M','PYTRC','ZRIZFNHXBRFK','MFYROLOESPHWMZJ','FSCXZYPWBEXZEK','HQ','VDMU','QPFUMPKPAICYPZUQ','FEZPFZYWHCTMEQYRXCXJ','VVNZAEBZVJFPYK','NPPJWNGYSTPRYMNZQGM','TWLFT','YVDHKL','RMVASPSAWYEDTUBYUQR','ELLALVLJ','XWBELWJUECJFSSEFXXJ','XMRVSMGLIFWEYQQ','KZSOGYLDSFM','UYYRI','VGPLZBXDJGOYMKA','WDRTIXJYRSYVJAAMRFNV','TFKNJUFIEBRXBDD','MNUXMYPQODVYJVPW','M','QNKC','FCSKO','ZILNXGNWQONPEUO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IWSMGCQOIKDVQXNLY'))\r\n%%\r\nnamec={'ADAM','BOB','JOHNSON'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JOHNSON'))\r\n%%\r\nnamec={'NQKNNWHFEOHSLKTNVFLR','BTFNVWMDRERYJVAIT','MAZTVIYYSUSJJXCASTEF','FGOIZR','SIVFDJRBFAVOPY','EFKBLIU','WEKVXIWONZQBQJGIAN','QTTWWVZALMOCIY','VRANXGABHQKFQ','KKTA','LOMGOQKUSK','KCXCH','IAKHQMFDP','FHIVJHZJRFMBHGQJ','ZKNJ','BGR','WWGKGNTFKG','DTVKZAMA','OOOXPAPQOWFJVSVV','DLXWYZJYHKLNQRHODVLF','EKV','VENEYJPJXBEDEFRVRQ','MHSXMA','PNGSMCENJF','KBBFGPHXYTBMENMQU','OSGSUKBHICIJAOQVF','OAQPENVJ','DFWDYEFZMD','MFNTJSQYK','BHIOQK','ECIFYYJTWVQNKY','KKFMTFFPKX','KNIPHCQTRIFWKQVHST','QSJNXGCJRZSTISIVNTAN','OPNAH','K','COLCJEA','VLIFMKSEYFSJSSIJELR','OTCPPCEGFMF','RTQWFVCHJVHKMMNVODQF','LJZQNXVWMBDPBLRANAH','ELHSEBJHCEYPTH','CIZWPEZSRZRCAJSJRNVS','YX','JEOJPVAWRZCENTGFKI','TGCZ','UINFPXKVYAUVEIQEVJDU','LBJNSEBDTDRN','PZRGVSPLWGUZZKG','UWILYJONFBSJJNS','GAHHQY','P','EGMSUUWGDVI','QQWXQVOPLAJLHKHOO','KFRXTPQO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JEOJPVAWRZCENTGFKI'))\r\n%%\r\nnamec={'CSKVFETS','LBYGZSQJRQQOK','YBCUNSJGVADXYVV','JKJTLPGXMJCW','X','VCDMDU','K','NMVCXLJVSDZX','HZPEQR','VUHKKTVMLEYYRFAXYRM','CEQTVGTAVR','DRWHHUGAFBRS','U','TKZKQXBGEGZITHG','VNSDLKJETHKDUUNVSMCF','N','TLPDQGGPYEBGTST','JDWFNEASRN','GZWBLS','BRPFMTELBWXKBSDBLQE','PLQDVQIYOOGSJCCHU','ZNY','RKUFRMQEHIMDQGKWM','CODFQCBSEVEVBQTNP','VBALOIRRWMWBOPAL','ECPPHOWLMLMEHPSI','WOL','VSHCNE','MWXUHAOHJZMFZQZW','JZZT','YWTTXUENEJZSJFNC','CSJ','XTPKGEQWSFVDDEBFS','GGHTAVOKBAEMPGKMWCWT','OKTJOM','TAKRHJVJCW','OMYDES','QECXLKFMXRZCZQDIFAB','WFFRKQFSUHOFLYKPPADQ','UDVEVWPNUNWWKTYY','SQZZIULDKGC','AMFFCSTYRREGHWHISPZF','QJTPNND','ZJYOVPXRNAPGAPQHKWXX','PIKMVOCQPSFMYSTS','DKMBCTJKAXZSQADZ','IIRKRCWGPLSD','VFVOICPKCJFNZGIMJQN','AMRWSCZGTYRZCTLMOMK','IMJOZCRJLJ','FSCXCZVNTKGIJGGNPUAE','RFTYBQEEBEXDVGQ','YNWGOMUNYUJJ','OFLBGTFCUBR','OQBRKADPXKFRIGJX','UQBJNPNOVVIJCB','TIUWNLTXURCFUXVVYE','QLXWZOWE','OFDGSZLOELBHINWFIOY','JYOBUWPSULYAGFVNCZGB','UPZRXVXKUXTHHM','VUPDBBZR','BMLYPBJKKYXDE','PNZKJSS','LLIKKRPDSGLRV','CYTINFVIZYRFMW','XWSJZIF','OQJXHCYWHT','HOERTQJBB','TCDLCIAQ','JCYEUKSQ','HRVAECIN','CGGVABCCCYKTMFWYQKLZ','EAWICWNB','LILXC','ZTYG','DXTJHSRLSJMUCZNSHM','SNCWCSUJQYAJFJMPQPY','SPKWORDMAFYXRZBLZLQ','IVXXA','E','TOHASOQMXLNEHQNDRTCZ','MOJDSIWHOVHCNJICCOBW','FJAYM','FQBOLLPTRSYWPDVPQV','ROWOXWA','JGGCMRON','XNVP','QGNPCCLYR','JJYKPWNKRPWOIFQFPC','AVNYDDWINQ','UJYKLNEYCNUUOSMGXGBX','XXH','ECAFLCIYVDSP','QWUWVHGAFZCZRHHBBOY','KCAYQOUNTDD','B'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FSCXCZVNTKGIJGGNPUAE'))\r\n%%\r\nnamec={'FKIPG','FIEOUUQP','RN','MPPBIJRAXYE','CCVHLSNXIWIJBNV','JGGHIQWFKSAGPY','GBDYGYDJYFL','JVZ','IJPSUPQF','QDCUUIQONKOEZZTVFKJW','SHAOOFPBJ','VVKFJMPMZOBITLREWDUK','ERFTHS','IXBM','QOZQ','MMJCPWBZ','FRCCUBIFBBGANTRKZMSF','AGTHUZR','ADYQXRZUSSKYQEBOJKGP','FGLAPUWMPQ','ADPUNERYENYAPAJZQQD','TEI','MQ','CQASGO','YAEUN','UUUVHSHXVAMRANGMLOH','YOJIIJMUXCCFWX','KAYW','LW','RIULPYD','FKLNNZG','AHYVKGPCF','NDDRBZWLGMQUH','SIGRH','JRHFEJCYHGH','BYDIOZMXPMD','FNT','OYVDVAHHZOJBMPBTCO','JDFII','TFCRVXUEPKLPFYYCKEE','GWRLWRLWBFQLKBV','ISJDFYTZXKBQ','MIGDMEKZMV','GETOPJ','T','LIGBBAJUMKQWQM','MRQ','XMHTRRIMUQ','JTSBV','JNXOHBPGQXZQCFYHZ','DOL','D','KFN','GSCUSNZPYPLCRIQDUL','CMNQWSWBRCD','MYVIWUXI','LPEXAU','KOJPAX','OZNRUXDHQPPVLISOA','LCOURGNNV','A','JOMVNGMJRCRFIRNTLTJZ','EQPXQG','IMGVZ','YBDZQIEZNXHCDKCGZR','CLOOK','CYSAXVRBVVEHZCPR','SXH','ABJOITMK','GKVTTWKLLGSEUONCYBV','DWFLLRVVQL','HWNWYQDAXIHJCB','DPHFBLOOYAZKARPWDBR','TKVK','LBYSXXYMJXFZGK','JL','FAATKTSONFCGUOLIPFF','ACKDN','OD','HENGYHM','MHFCTBIBCQHUUCWXHD','LUHHZDFLCSLORQIGSRH','Z','TPNTVCTYOSXBOUNQ','Y','RKBYUKXCFVWMRL'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VVKFJMPMZOBITLREWDUK'))\r\n%%\r\nnamec={'PNJLGCFVJGHGWO','UYIONSVIG','CL','HUESTKNQX','SALYWREELNSZBP','BNJDZJKHOUSQDFKXCKJ','TNBIT','EMFHXOJXUALHZI','YBTCFQQZ','EDFYSBGQGC','PZZPG','DPLIWQLTYGDXJAR','XQFVWHRH','EPBSQBHQPXERQ','MKL','TAFGSLFLICJXG','YNZCPIXB','ZE','PFXEDL','IJIEPJV','NOHRGSWBSDZATZXPEYE','UTORC','XVIWAUSOTTYXILP','KLMSHODTREWLEGMEAKQM','BMHRB','UGFMAYIKPGKKGOODGQ','SMNATWYMABFAXVAZHBGB','EPS','VFTCJCYYSSYPRORKID','JHBQIAXTCCVXHHVFR','ZZLQENONICOQDBEEBTX','NPNHOUUUIIZPTLUY','ZDJLXCPTDEMUJTEQ','YHQYYTNGWZAJMZH','WY','LTJPKLFOBARRYL','RVQKALVBY','DKTOPDDQ','AZMQGL','QCPSYFPYQDHGYXAEMG','HJ','YBOHRMKQUE','IQOHTONIIIEC','PJQZRCC','OEFIFNNE','JDHEBJKIKGGAZFFA','NHM','VSXQHZLFCPMWWZUYVPIB','HAOSNCEVJDGBSFNOVSLP','GFHEAVXFPT','YSWXTKZRYXQHLTPNQV','NNRKFIZKXOKYVDNYXID','XTQABKRPUW','IYZILFCRELKHZAZBLKR','LLKSWMIAD','KAZJAGOZGIZR','FHTUHMLKNV','ITAHVAFRTDBP','VCNJOSINAUVMBXZ','DETK','LHFAKGPZHUIIETIK','XBAQSPFVUY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'NOHRGSWBSDZATZXPEYE'))\r\n%%\r\nnamec={'SPTOMHCELYFKFSX','WINRFF','LTHAOJDIFHHEFCBPZD','RAAHGELRLLOI','PDRMKYDG','FHHWZSPSTXKR','NEBYKBDR','MVHGZ','UWNHIZZFDFQPDP','HQOKRJTOV','VS','J','TKYOPUXP','BEZJKFTUZDLGQBML','OSGYFMB','CYK','UDHMGNBAIMJ','RVCXB','RGNKBHEDHQG','XKCEUASFAMWNHPOH','NMEGU','JTIHPXRJWVM','UXTUFDZMKBMOYAM','WNAUDPIMVLMFXFQ','CTAH','CT','INJVBQXR','JRBIIEMGJW','MMEL','ANGNWTDYQTJDISMB','UXDLVHXRSS','SXOXQDTCTILOJWCL','AEIKGXTQEF','LUNOBPJCKTVNWANST','KEIVXZZUVXBDI','OEGDI','TVLQBVZMSWAJFPC','NKTGDWFEQZON','FBMAYLMQUSBW','PZIEBETGIRXZ','NKTPM','ILYTPLBDMPGTKPYMTNK','WZWGAYZC','EKLVVCOWGCFMGYRQNJM','IMWZBYZFG','RZMXJTPHRTXVJNZHSJD','EQWFKORZPK','LIMZG','OGJNP','I','ONHKJCTRSHXHQJOWX','MEUJMQQLV','BYXNMK','TAQPQRJKTWKZML','V','DMMDGTLE','REA','VRXWMNMOJQZJX','EHKSVVRZFEVGEXV','NZCZJDDED','IH','IJTEWCNJHJ','N','UPMHRIMYEQQRRZVLAE','F','FEKEQRQXHBJBSV','FJAA','NSURBUOO','SQVEDH','WGUCHJUXRAPJHGWRBKIP','DDCQXSU','AOJTYNTKWS','OGEPINA','IZTZQJ','AKSGBUDUO','KQBCPHX','UPWLLPTVEQNGETYOTB','VRCMMJATCBSL','VX','KGDSLBPWAJHLCIZUCH','DNG','AXBVUCA'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EKLVVCOWGCFMGYRQNJM'))\r\n%%\r\nnamec={'IGOYRFKIVTERT','DKOHDARM','TMIKMYTDSFH','CSGTIZWEFDBR','KADAEBAPFYIYGO','IQMGMBMQLTWUWC','RYRKYYPTUYFTI','QCZFOSRARULJLZEXMCW','IEJYJY','RKCMPQAZRSHUTKQPUGNV','NZEHCBZTDXKOXFXD','NPPALM','KZAOBCZ','GZR','BOZQSAAZPVZD','UNUUTLWODUMUIDS','JFSTFKOMXCBS','JXWNPDGVSZT','UMAWLBCOZUPOAIYXEQH','LFDKXVWELNQDK','PDCDJTPREPZ','IVGPDJUMGUE','XJK','LKEPMYBODR','MPPPZGHZSDMEHBQJBV','RPCVEXLWWPHHBYXWSUW','TPJEKMWTTYCYJG','BVPBOKODUYWCQPWBQ','FSZH','NCJWIZ','VCQGMOUIGWWHVPXE','L','JKHOMQMDNEFAK','GWKDCDMJQYN','FSMYMUWYPU','AOOYMCYLVNYWK','KKDOPSAWIV','NLXFXCY','VKFODHFF','AYXHMQMHKU','DKNUGCMEJL','QQFRLYDQQEJDVTKCMQ','YMJZP','DCFLDAWFITJERJEMQFI','SJDKAPWAEREJZ','UFAKJ','UFCVECPWEE','OHVLIZVXZ','R','ATUFSOTWJEP','JZCKJKHATGYHWY','ONJUBQJQZF','IGSE','NPUPRTJQHYKIQ','JORJFKJLQLVZELEXNUA','WTHARCXT','YADUX','BUTHBXDQXRIEAPC','AWW','QOGEM','C','J','LCFAVHFYMSYMK','GTWZZSHIQ','KDVUBLNOSKNP','ETPUXRV','MQYBPYJJEMRSFBTJD','RWVHLWYCNXGWJDJ','HGNQQSPJARNYEHCETYU','ANTOWTNRUWQSDF','SOPFTC','QJEMUUDZMIPB','CKIQNAB','K','ITAJGBFKW','NRIWYPM','ZUPWJOCSZKQDAIEKKIYW','GUZV','QQHBBQVPSCKKFVT','TVMTHCDKAJWSW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'UMAWLBCOZUPOAIYXEQH'))\r\n%%\r\nnamec={'FSZESYIDKESTRMQPSS','JLKMFOSQF','XSBMEJHOGEXIMA','AJTVMJGOW','MTFXUJVQEEIN','MNXEOMSSEOUKURY','AN','XZHMRQQGU','TRZKZBO','UKKU','THKLUBIIJRQZXENQYAST','CYVFVXRWFYDQ','NPWCNJ','EFAUAA','T','YOPBR','GLPWSLDTFMV','QPIICXOJWDKJPI','AXBDUFDCCHPRQL','GALFAFUOOERRGD','TZKUVBRQZMXKBNCINF','FKZTRF','NQLYCRQKEOWFDUC','AUJTLFQFT','QFCLOKNSBJCHVN','QDHZHFPSDCPWXVE','BSVCTXXGBXCAKU','JEMNZFC','CFJMEBL','UJSNCVNELBNFCUDODMGO','ISU','LXB','DUODTCGVHKSW','OUDTEGTWSBEMYPG','MBXGAOODYIZKO','JSNQPEIY','ZVBBZGZTMZZPMXXXA','YS','HEAVRWFKQWQLLRNANXGJ','RQMGGNETWSYCRTUKLCJ','BOEVUNAHWEGJKRBUEJVH','DRPGWQSPAWHMGTDZSNF','KBCTWJT','SRZRKLFZD','YPZXPODCDBANCDYREO','XXWCZZHNHNWXJHMXDO','EOCJPOLM','EXWVAFTSMY','F','KRTFX','BADJAHPDL','IVVLKBFMBOQVTBVUB','UDQTK','AJ','IIYAWVDYOIGM','V','XCWGXPBFKJQ','VQACRASJWBMQ','UPUWKP','YWPCPMMYDHH','BYUDKVPTHETUYFQQ','CSGAVUENWJMXMDIXCFTV','NNPEXJBWJOTEXLNMAG','EGJDMVLZGDQKZDSJY','WCBZDSVJTFBCCME','IJRJMXXJSVKNQUESSPXG','TFFVIKZJZAFBJUZKAI','FYDB','NRFTYRXHZZZQF','IYRKEAOAFTXMG','RSEEFDWXAULIPUKLUHR','EHDE','CIULRIHVFZVPD','KJANVABEAIWYIMFNE','SCIPMSAZVJ','EXSTWLXTF','YC','HGRIZZXHXEAKZBVYQT','BQRYGORWQPVWGIBBQ','LUXVPYULSREP','KDYSKHKQIDJEU','P','DGSUSJBJKIBQE','TUSPGYQCORQ','PEF','FYHFFNWCMPBCGIAA','CGOLOTDDPAAMZIJV','XNDRRSLMYLMQGHWM','HLKGGKGKFOUSMFXPWLZ','PMPN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'THKLUBIIJRQZXENQYAST'))\r\n%%\r\nnamec={'ROVISHNKWIRVFYOZTG','PICZ','GF','XEGMHFSRFTX','SOFGDDVBTDOWBLEQQBWU','IROHUFREDPGGBRXUFZO','SZSFPXMWFRJCMZ','TX','VVW','TTVZCJYTTNPQAUI','AMJBBCWQJOUUD','PMCQ','PCJOYAWISWUQOW','GANMU','HXKE','MUMUOVEJVABVLQEACK','IWL','EOTQBINUTEP','ZHARSQNTKXDIBTVWZK','MDMDQZOGNYGGDRW','GDJJDCPXUKZYOJHXX','OOTB','ZEAJ','EOHIRXCJZUZCSX','RJBPDMQQHNII','GNCGVLZ','OEBDO','HYXEZJHRQGAQOPT','VK','IQIMSELNLZUFL','AMYCA','DSDXJQZMYMUWZJFGLIM','UYTW','LLQA','BJPVBBE','X','BUIANDSLTA','CLHKD','MNMBOCAGRVKUIKSV','CYCDDL','VUWTHN','GQJGTCSWRM','MKGKFJNUFMEZPYKE','SFO','SQFKFPXM','ZSATEUQQQDNCTPLDCJ','VSSBPZQOLHNLSR','EKBES','ZDVCMEXAO','PKDEYGDASVRMRFOQG','EGGEJWXNOWJY','BWTNFXXDJ','CO','IKRABUNQM','ANSJAKLQZJURSVU','VJCIJ','UOKNFBZIR','EYNHPDXHCUIUQ','UVLCBHWEYNM','ZI','TVZWTEEJVGJ','CLNXKFUODS','VZCJQAZHFVIUAJ','IWSKUIYLLMOCA','FBRSOXGLRGIT','IDSSXEFAQLC','FJWSCYRVD','BJUJXUIJQMO','URLWCIH','BOTVBWWLYUO','FALLJCUWNWWUFWWLKDJY','IQLCJIQINJLZSFQ','OMUTEEBHCBD','JWOM','WB','EXRCBRWAYEMNJQGIH','JLESZSASLVTJ','PYARZJJRDOA','PIHXQIYTME','XYSFFAUVWAICBZHRG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EXRCBRWAYEMNJQGIH'))\r\n%%\r\nnamec={'MCQZORMCFCE','YZJFNXKRLAFWI','VSTPICWP','JNOAAMOXWBMYCECBRUVY','KNRBWAKNG','NSRCKZGETDUM','DHBGDGXIMOAP','GSDRFXLH','SMVCUZNPCPVGNHVLDVB','OHLLSTWXVLZ','HBTJICHVJFVAJX','YTPXEQP','BGGKNUVOUXWLZ','QQLFZFNLQJ','DRYTBDIDQYXKJPVEAMHF','MSLVRMAMA','CTSFTN','JHTIO','N','CZJ','ZOKFTLCDWW','BDPHMOGBPUEOP','DAAYT','YNJJJXDDTKBZJDKV','AGIWRLWRFLHCFMDGWKZQ','RQMTUDTXTSKW','UTNTWKBZRXOTK','KACSGHKKTGDIQ','XKZMXOQONBCENEPW','VWXLZ','LMYEOLJISFETJKDXX','TIGVVDPY','DCTCRBDRT','VPWEIZBCRBXXPHABRZVT','YGITXGMUIPGVJYOZ','CVZPJREYDD','WSVNZZKPDXKUY','TNZKBKT','HFNKHUKPPMXKEQMYCIN','KXUEBIDGNNFLD','NTCSEM','MZI','ZWXYR','YNHDQNIVKTQFZHNBL','NGFCTZNO','TJJSERXMIDYRALO','YQLNVRSTLA','NWZZXFFTW','CXYSKZQQPC','YHIFKIFJWUFJFCOZQN','JAHLRDNWXD','WLGCULEEXJFDTYTZNZM','MKW','PHASPWVV','LZVHSAMJZCDOTIFOUI','WWRHSRHCJ','T','PKU','CYBEHBJ','OJBG','LGXXAXYVFHHQC','OVKHZJIFXOOQ','ICMYMHPROGQD','SQKSFCVMJHDRFWL','GNGKTXFEDNYNCW','WM','NYOMUCJMNDBTWDOO','KRKFXMTEBJJZYNPSX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DRYTBDIDQYXKJPVEAMHF'))\r\n%%\r\nnamec={'ISLN','SRIFXUBZGWBYHFRIN','SYXUWQKTDINJFGVZRXXB','RBWEBFPTVICNRWPSY','BZZQXYJJZ','UJXWGBDBFCKUSJIMBQ','P','ZLKBGXVPJF','KJLDG','OYXOAMBPYMLZSIZ','OJAPNDNTRCNCLQSIQQU','XGABKPCNQ','FXEJGXSIGVRRRQZHSOSG','WJRRQDKM','JFORL','QUZFUBIF','PMJOXFRZFP','WSHBJEABJCR','NYJWX','LMQIDEZJCJYVIZ','FNAGWWJCWSF','ESQHTLNK','QLHHUYZVXWNYQC','HQAIOUAANFMUEYGZLGJE','O','GQIYYQZWMZTPTPIZNMPR','WFJUOFKEIPECBUTXCPE','WPGWKTYKZ','WJBCAF','HKMIWCBZJPX','NQXCMLXHNSCFU','HUBJTDVZPMQZUK','DWGIDVHQ','CVVUDUWPNLDJ','HFRJNS','NOUNAVHOFEEAREPCRF','VOYSBMTGXMQZACFFKP','MSPJXWH','XZAONDLMLDLAJIULG','RKQYTBQSAPERICXHP','STAIWDI','EUECSNMEHYYM','BIPJKIIRSGTWWRTCLYK','WBMKUAQS','FODMQMBPJZSDFPZXQ','NMJQDJCV','IXBOFYVOTJSZQFSZNB','BFWRJXMWXUMMKF','QKHIZJFNKCVPZJ','TCEIQUJWEOJPVR','KHX','JRRNY','GFWAJXINHAEPHLYFI','ECN','YAYKWPLOZE','QJWQ','XGWAEAFIYCOOSGAVDX','GHBCWJDPDDTJDLKEH','B','ETUFC','UJNTCP','MTI','WTX','XDRCRRDXOPFTRNBUVE','DPV','OWWX','KEUTWY','GJKRXKXLAGPZJAQ','WWIEKSIAAWYUDAN','PZCVKWDFCU','QSITT','DNQJZPBJRIT','IN','FBEZPMPJQPQK','FMXEFYVNUCESKJ','HKQZUKWTFBPCT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'SYXUWQKTDINJFGVZRXXB'))\r\n%%\r\nnamec={'NENLZQOIKIIPVDBO','PHKZPOEAQQVMCC','LAZADBYKWMHVGXONHKOQ','DHAGCRYRMYIHZCSSW','RFT','ZGFFOYIVQGPIXJZD','VPBUHKZSXFRVCWSALF','NOGAMCBPYQJGPTBDHQAY','C','VJISIBO','XSTTTENFNLMZEHCV','TNCCXGDLGAEVZJOJKO','QJLAQFNQYSWVDUYGT','CCDDRAC','PVFDWQDAOR','IFWSNMCUEXVHCVCWP','BGFUOILE','AE','UZXQKGPNRFSYCT','AQPUWXLETYHUWB','R','SODDLNI','HCLXDIXUXEQMMMKEFMON','E','EHARHWQJ','JMWJ','MCYUHPCTZ','YAFHAJEINPSAYVBOLTSN','JMDBQCRQHQIIUF','RSXKKTEBZ','UNUDWD','CUGSU','UFB','OMWLOYAKZR','PBILPD','DVYRGUFRZBLSMREFAW','HPPSBS','CGUXLV','UKXUEKZBAZPICBXN','MUUOD','MVRDGH','RIHZLY','LLLTGMNTRBTXODFHM','OGWBDX','HEIKNBVL','X','DNGCIMBHQIVHO','FPJUEQZFEKLNIE','EJESIZY','IXONWWTAG','DRHJZDPMLTWMTR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LAZADBYKWMHVGXONHKOQ'))\r\n%%\r\nnamec={'E','VADUTZCEK','QTZWFSQEKKR','XDOCFRCBNYJGO','REPMDAJN','NXLXZEJXUPKOICUECCR','GYXBQDOZIH','XYKUEZCLGJTIPUJUE','NCIMJMDCGFOCBRN','SYJBZKPWLP','JRGWHPECSCACFBLKW','FVIIIJXBEG','GPGOVYRBSREXKPECPBXP','XPAQOYMMXS','VIMFYVGNIKKSCMZZKZU','ZCLDPFN','SOJXIXANXKMEUOQP','GSO','RQMXX','ULBWFKPFPIHMEVNG','BZHPJQYFJUQWCROVENVD','BGRHEIFQJWCGU','GZVY','UN','QSGTN','NTLUQJUPOYAXT','MRVDDPPJBTMCVZO','PAD','PKCIZTXHHGCCVJLNCXC','ZYKJRBWPRCMLKBG','YFABOIFTKVQ','PREOSVDIIEGAUDNC','CUIEKVZHJMLPXH','MCNHTUTPTCJEMYHIEV','GBRQTQPYFSHCR','WGDEJNAARRAZNRFKC','SNWEHTW','VBDGH','CILYJLBQZWZWTFYZXAJ','DGLEBJEDMLNBJORMTRJF','ZFNOFDSLHWMQSDU','OKGQTNDILIVR','ZEABTHADVMUKH','DWM','IXWDXEDURNPMRPFGMCFM','TQRVXL','HXZHJKDCGGPXTAH','DFLFLPCWXUNIBQRQPS','SUCZRGT','NSLXWGZOHTAJSQSE','GXMZQNFFLYIWPX','WKMVSBVLPHXNABSRX','PVJVSYOQQYAMVN','YNICVYRXMFCF','RSZJFNPOV','MVWFQMKQOAI','RXFOZDMNVBXO','LGKPTZDYLQWXFUVTIYY','HPOW','XPDXQDBESSMPBDJ','VWFGGTDMSQQDZOWITP','RPSXMTNZDK','CMHIKDEYXMNEDE','SLBEPVRCQZSO','AVSXNZSGBKDVGQCRJGY','XJU','IHJTZ','EIQOOIHRLXTBDHTVWQAE','T','NJWFFXVUQCSCN','MKQZCCRGYGLW','QXSVLNTKEIVMAS','LEDNUMX','XIWJBKXWND'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BZHPJQYFJUQWCROVENVD'))\r\n%%\r\nnamec={'MBU','PKVORAQRK','QPVRFOM','OHYGVGHL','PVVAVSXP','AGRSDGYGGJMFDSKSA','ZOQOUPCGXVGAQDHKYFID','OHDJIDKZRJDYWKDREZKN','RXWWCSBIZ','LV','GIQPLKWTRIQMSKFWZ','YNMCAFJMYSJABNUBGGNY','QVULCO','HJIZGEKUOAVOAWTNU','LEORUFHX','N','HOJYNFXRNYIT','BIPGVNRZHYZAQJX','PCJIWQNIYYCRYKXP','LCMJ','ZBPYALSCCRKQZPYUBSH','BLNEFR','HQUIXQZPUFROPT','KQAAXRXWTXK','ASFBD','SS','XGRI','JTOZLLOL','BOXPIZAINJQKTONDB','MDCUGIEJFGLVNL','NTWKVIV','P','UFXXBOBSJQH','HU','PBH','OITZFICBDOZEQGJZR','QPJBLCBJRJVEOVG','UIH','ZMZLKGNXZVAEPLGQ','XZTB','GANVRWYT','XZQRMIRQXVXJ','IWBQZBMJUZSNTIQNZ','WIC','YR','JSK','O','IEQTA','PTPEXJWZBAU','RHRG','OGG','WWM','YTRBYGYZVLTVBOABBTV','GYAIWV','IKJCDOX','DHIRHBKS','COUAAKAIGPVOXYKZUNU','FQFXUVC','VMFAKUVYGHFXKN','IDQGXYDWNEESGJJKP','UX','ZWMSMWYW','PMJBXUXTAVJCGLWZVSDB','RZ','K','HASIYHX','ANOVP','CSIGKZDMSMKOGJ','QRJXLP'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'PMJBXUXTAVJCGLWZVSDB'))\r\n%%\r\nnamec={'NFPFLMH','GAFVH','SHEZMDSY','JIJZGWWNDRDMYDR','QQMX','WMMQGRHFEFUTRAPFDTGO','PSDARUKGIRQPPUVFRC','KJTFKQDDFGECQ','EPXNZ','UKVDPBFLOT','EVMBIHENGAPWRMCZY','HYLDZIDPOHTFLM','TJSZJJSIIMZZPCVC','ZTOUSR','XXRCJEDFNWFOEAJMZWO','RDGNFRAQLVJ','ALLFOJKOQZHRH','KVYTQ','LWOGBFHZGSDZIF','OOKNBR','LAYXJREXHYHOFNVDYU','TUDFRHK','QSOJMHSDLKEQ','SHSMUQ','CMTKCFROCQCXUF','KH','XOZDSHULKCAJXTLSY','FIDNCZSFGGBVMTZAHLGB','IQATEQVBYYPS','CRBI','BPLUC','RJOPKRXSFXES','VECJRE','KENJGUMXPFCVFRGYLRXE','GQNDQHKZFWACPPHKH','H','BFIKUAPSNFBICRIEF','FPMMPOLVTYOYZQ','RXEFHBHDQPNZKGONNL','HCYWTBJMGLFTXNWRR','YRMWICLIANCOCDQPA','UTHNCEFVWHBJQ','BRBKTINOYU','QIGQJAMGVZRZWSYIZ','HTQTVZ','DCVL','T','WUXLTOMJAU','ZSGGRZRNIM','AXTNTJGS','RHLXTUPCTDU','JIFFRKNRFWOZEEORFV','DKOFVRRATZFQMHLYFZJ','XFL','FQCZHFFOCS','LTMQKYUNSRBTJQ','FDFAUNSAGUDRZCEPE','KAOLUPTGFQE','VUXIXPPGT','XNIRSGTMABTHD','DDTXHXCXAJTDOCCOMM','BXZ','YPN','KLFWT','MOWEPNYTTSN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DKOFVRRATZFQMHLYFZJ'))\r\n%%\r\nnamec={'DGQCQLGJ','IBNJOGJBGPPIJBQLK','GJXJFBIQKZILAJSF','AESPLZNFPV','YGNAI','IHYDPEYHDWSZSHL','MXGAONGONU','UGSZ','OZJGN','YMIQAY','SAQDN','JEYJCFHUTVPVU','GDWDYNKXS','DLAHOBKTAAJVHWDSCAG','EWBYPMZZXPRXASZTS','UBYMVWWU','SMHTGO','TJ','EZXTZDO','VBORBLBYKPOSDTZOR','ZKXZFIOALVYWJCMDNXSU','NBSPRJIEHJSUJP','QQOVT','BJQOKGDVSATEWK','RSMDGSYIUJIMGDK','ZVXTVM','HI','ZNEXBMBUCDHEKAAFRVCK','PXRPCEUHWKPJNKHDREBT','BQOWMIYWPSJXMNNLD','BONKTPSWDOYWKRJQCV','SFCOZDUJOXPDSTGL','UOA','PRAELEJ','YMXZTQXEITWI','ASSGLRORNYRWAIEVZXA','UAAMSIDSAVCP','WZZIPNBPDBMRF','IRJIWIZHIQ','GLNTZIG','YTBPNYRLDZUEZMX','HBDQ','CTENOFTKBHWQCPBDVBEQ','DJTTAVIFEPKQZBR','PZXNIGQLJKYZTF','JFJCZY','LMFUHVPAEIDUU','VW','RKGORHTQ','OMZPHYGOPN','LSPOAHWLQBVPPIW','RBKGXMLIRLGCSVRMC','NXLYDZLCQIMTNPT','DXHLFTUSVQXHWXBJEUGG','GSOLEEMHTARPUU','EVTNRJMPPPNZAZOTROD','ZYHWOMFE','WFNGMJBXWAKJOIEDZC','GGR','Y','HPAUOFVMOZGQEMHWLRPF','DHBEORFBKKFGZYYX','NBSLOZZRYECVU','VCFACXJEHVXXPHHI','KWMFJCEUWBLFDQGCKD','DGNNMDVNODLPYNL','NSCIEILOIGJDGJHB','GH','BSWXELUJ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ZKXZFIOALVYWJCMDNXSU'))\r\n%%\r\nnamec={'FPMUJIS','HTMLYGHYLNM','AGBTPKMRJ','SSWGUVSDZMBCNLL','DRPGG','XTEZNPFNRTBMOONIMM','QXTCFLIXRRIWDEA','MSMOASUGYSLK','BAFDNNUXVTHRPG','QSCURWGROJRCTOAWTN','MQTOBZ','JOVI','DSBQKFOTVDJIWXQDHRB','FONRHGIY','FMQTCJXWSUXCFJGFT','GQCMFHVN','VWDAHFTQELVINRY','ZSXBRGGBQPAI','FACVSATHNHXZY','KRUJPOGMAOEIGC','HUAUVGUDNZCUBXOVCFA','FOAGVCEUXQFKWZN','MPZDESSR','JPMFMGKKIPA','EIOA','UGOBBKLLTBVNSJ','QTEZESAEJHECT','AQHX','JEVMRDXJI','HTDQHKHXDXWDC','DXMHCHAFKHGZFF','IVCICJXFDPXGJQB','VBBSD','RCCEAHTANIBXXG','JQSIKFVLC','MUPIJKDJRO','I','KJFEHXFBPLU','OOBTEQZHVFQ','HZRKWOHLRJQMJXQQFP','MGBUE','HNTGZWFGJOYRTDPIOYRW','CDBPFXKKTQ','DODMJB','RUUDHNCJJKFHSIJ','FMKIQBPKVVULLXSYS','PWZUVYKBYT','AXAAJXQTHQW','BCFTWBGTJNUVHBLRDANP','M','CXYFOTWLRLUGQC','QIPNMPJJGOQQJKUDHL','SEMFHZMYJKPSRWDIBBOJ','LSTYNTFXHB','FJWJDMSNAUZNKWOK','IYFJHGCQLT','WYAMQDEOIWZBUB','JTTGQNLSOKVGVT','KOJY','BLXNETEFIXMKZ','NZGEYKPUIHNBKPPST'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BCFTWBGTJNUVHBLRDANP'))\r\n%%\r\nnamec={'OGLCMJBGUVZRYIQ','IAMGPYOLQRXBPWETMFUS','LFEFOVWUSDWNRZHN','JUFJK','VUCXCORYGMQJV','WMJZYKBSPZ','JQIPDYEJGULDLWRQS','NIPIYZGNRUVPHQH','C','MB','PHNNR','REMZRZEHIU','PGRAJVBZXFCGPVZCRWGQ','XDOXLEWSCUCVLRKXKPIA','DZRBFRJLKM','YXJGVDCGEPIUDRMMUJ','XPFKQQMUX','NYETXVLWZ','AHVRMDILF','EUNGVKSGIYWEMDUDOMV','MXAKTAWYASGFR','SOYII','VLOQS','UBGGXIZP','TPLZMVARFYPOY','FQN','NOUT','FHUMXNJNEJW','ZIPLCMQSSK','BQMCBF','NXLGMDKNTAFLJ','ITAQMINQG','SDAXMOC','RMANBAJMHICQTYYCC','SAXDYOXOPFOVHATLAT','IICKXBVXZTSLZRJX','PBHAWOQKGFHGG','IICOLCA','LJWNYXM','HBHVKJU','QNWWNNTS','VSXYT','FALWHF','UP','CWRGCUHRZFMK','FFMM','REIBDNXXQUDRSFF','N','KIMMFRQROZNWQ','MJZHXG','LSEDGGWOS','LUUMQ','FTXJ','SK','ORFNYJYWPQVKQDBL','YIYJJPAZOPEUZGA','HFZSILOBJRFZVEFXGQIV','U','PD','QLCOG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IAMGPYOLQRXBPWETMFUS'))\r\n%%\r\nnamec={'DAB','EIXCAFT','TOCEGNSLVURCYGXYH','VHWLWNNWLSLJ','SLDYYVHDOBBJHQZGKQ','CTPCUS','XTLDBORFZZICB','KY','HAOTVBCDRVP','W','SK','GAPVLDXBFIUTFBKEDMUE','KSGVU','TJOTZA','MXSRCIGHK','DFNCZJJHSKYHUAPUSFCM','UOYNI','LC','ULQKSEVEMLFASZTPX','RGMWDMYOOMFPGZLBITDK','WDGKCC','GRLSDSDHX','AXAWWINMLYJE','HGACOLRR','FMVUD','NWEEXSBYIFSJ','PJ','HDFGOWPULKAPXWLHAYBQ','GELTA','RORCEHVHKVWDFE','FJGMDMQVDSBISR','FTNKXXUSVYDSMMY','ICBWKYWUKPZVFAY','PJYAKSXMEJUCEL','VKMJ','M','TGF','WBIYWSRXTQZXUVLL','VPMMEJQOZLS','FLKPDEIUTD','BONRSRVZURJJF','UXAKLFHECVSZ','XMPLMGIW','SJIMJEJMH','ROXFKZUMYOZCRNGPVX','RCSAEOBQWZGVBJIUUGFH','OUPWMFPVX','B','GQQOIG','OTCXWPJVMJ','VGTDMRFGKUESEULXWMHD','QOTNGYBIUKFTVR','JPEGLYJIAPXNFJ','ZOVITVARNFD','UHU','BVTJ','TR','YWNOR','CIWVZWRFWI','EP','TIPARSTWGTMGQ','HFBNIKWGVTVPIVXJ','LUSQXXOCI','HMAMMWEENPRV','IOZJZHGVSOHLBLM','KYBWVGCSLSFCEGQVHEU','ZITYLR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'RCSAEOBQWZGVBJIUUGFH'))\r\n%%\r\nnamec={'TTXYV','FH','ZTCNWGXIBALWVRJEBQ','OKSHHRPY','JHVFGPYOQQEISOFLSZZG','PRWOSAGQGVKMT','DYYOWEDKYQCWBLOIA','OIMSYDORNPBGUQL','YFMRJZBDJJQ','TCYTFJIVMUYIFDDREWE','SGOEEGPEAXBGFIEA','BUAXXDKUSG','GMCKRI','FEQUFEDFWDOQXOJIJ','RQ','AKFR','OZFSDRQHFTEOSGYPEUX','GFQCOQIJNTMAFM','QQZWXV','IMJECDKAAPIYAQ','BWOV','STGTPACIOIFRLPJDWSOE','QE','WREKGB','NUOFONFNKHRRRUCFSQJ','YF','QXWSXRE','BBTGHKTJRGEVBHDL','ICBWV','HATF','VQUSOZSKOJEN','HQDPQFJASYSNELVKQRIX','WAHHOCW','XWK','VUXSCTJM','SDMLYIZOIXNHHVHPFJC','ZGBHPGEBZIFLQASQPBX','JOICR','VQLTK','IHXBYBGJQ','GRCVQSIN','CWNP','YEYXZ','UYQXYILKM','TXTCVYYBKMG','GZQQXYHISQAVSEV','KRMJLFIKDEIDQOTKWT','ALMSQZFFO','JYWX','YDZZLBSWPMPLQEMWYJGR','WGKOCBFSNEOO','AOSH','EDOIZI','YSVQYXXXZQLBEYDBMJX','ANXECVMPP','YJRZWZPPEYQIDB','WBBQUKT','WDZUFNAYE','FJSV','VWOOQHWNCYQYVTLDYQ','QOHSNMTXHGKNMU','CSSWB','ZFCMITSSCASZRYHAG','MDTXBI','QJLOWPODZEVYVEQKVKRN','ERLYKNCWD','CKDKQGMVLT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HQDPQFJASYSNELVKQRIX'))\r\n%%\r\nnamec={'PGOBRMNZXGEFGZTNN','SWP','HDHNVNTTTJXCERAAFGBR','OBW','QVFMSDDRXWIEDRGNH','OMEFFWRLXJRCWOOMD','HMZUDITBNSTBEYSLKLMT','ETIH','PTYHBXCBFZPXYEQUVPIY','MHGZDKPEJGTUAWPU','MPIG','F','WBUQNTXAPDHLN','AZFTRNBLZRLBTQ','LEPERCJ','RKFUJQZPJ','UUAZVLVIPOXA','IFHCPTRDBTTL','CYKCTCGKKNZ','G','BRZTFXAWYLHNWHIABC','AFMRFLHODYSQOMNRMDQU','SKRDD','UAD','KYRFULXATNJNWVIJDM','GDGJGHXJDG','PRZPQUIVNVAO','EDAHBBOWBNPCCLF','FMWRIKZAPI','V','EYRERTKJUXZWZTED','XZUCEWUHUXWO','CA','DMVJTHFWA','K','XGFNCELUZMBAB','AENTWO','TXKDLZBIADFDPAAXAUT','MSSZHKJQJUBAW','EREJWJNHJNZGROCRQ','TRJVHKVWGRBZ','LRX','YZVUFAEVGFYQJPP','HSIJNWMBQG','LIBDAVVDMYUDOXTNLO','URGYFJWFKRGHITC','CQWWGPZMSXSMFHADB','MPCOYINCUHUOZHGRFF','BJU','ZVRQOFIEAJRYYPNTO','HT','BMROUHB','DSXYRCVVLIHK','OPGUN','FGOXUAVIZBTZH','U','BBAEQHLWAG','GVQD','DIXX','KBHAWAYNXABNCKTIGR','WMENHMGBKR','JJIKDNDXFDZSWDF','STYWCCEBZGK','QT','PYVAYZSIOR','DWCVLFFVKGQQQ','CIUFCLFC','XUGSDVUQYJWVWCIKGF','FZBIHCWWCVVUQEDD','EZLTJFIDEEI','IVK','LYUYPCLLFGBKBFHMGE','OALIWBIFUTWBFE','NHYESO','XNBSFGRFRR','SSYIHIBENSRMRMQFWXZP','OQBUFRJ','DRWM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KYRFULXATNJNWVIJDM'))\r\n%%\r\nnamec={'SKHQPUKYYWHWEZCMJIH','ZJKCBUJTATQISUF','EML','QUUAUOHQJAHWBWMOBJO','VTYXGJVJTD','TUSLTKNHZZNSHSQBGJ','MKRBXOLNKUYWIFLLKSBQ','UXERKIPJZQYCTHM','XE','V','NBRLSYAMVBVQRYWLGW','HPTJGSOAFZPOPPTG','CCYHALBWOOWKIX','DKUSRZDIA','KYBCZ','LYBKX','UYVSJMVTYBVRLV','ATIZAYSLSLXEYM','ZCWTXOHTXEQECA','DTJULIOOLISFMBEZSSKC','ARWIOYIXTTZBXVJHM','HKTAOTRC','ZGRGUEHGXSBZLOTLBSLI','RTFLSDAGXHPWTDFRWVK','K','LBOG','BR','NGMNMUUKJLFOUCLEINSM','LKX','CDGQIEQBG','GMKAKVFL','PXJLLT','BNMUVYMZDNXATKMAYJLV','WUIDC','PWQFFOWR','ZA','RLOUPPO','SSPTB','ODCL','QQVEIAFZWVMEYLFIGXQ','QRXXUSBEQRSUZKRMDBY','TKTQTRZUZMFSZXHUXNAG','K','MNYMPJPDXXISND','KO','EVOYOQUTGBCWOAJVD','PIDBDEMRWIA','YHZKOGZHISHPSIGVA','KAZDDVPNOXFM','MITKWAPLDKRXVSAQCIIX','UDJWLVKJ','YMKUDMYGPQSBSS','SMUJ','HDUCMDBH','SKQREOFLWQNLEV','SAPJIHMUJQQCPPFZNNW','KEMJPXGBRHJSHQXTRJFL','VIMJWRXDTPQWJCGLR','CQGLORUCKTVNILVYBF','VTYJGNIWFMPCZLXV','GPRJKLPCLZVULUZX','XIKTOZCVCVHLAJW','GQCARMRCQKBLPMWA','ZVBQUFITYGGNAAVKUAMG','BIN','MGRLXAFBVKJMZSIKZI','VBKDJUBHNWAS','NUZZTUGJVQVKYM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CQGLORUCKTVNILVYBF'))\r\n%%\r\nnamec={'KRMMAQO','ZYQ','Y','JVBKJWEEIV','WPA','ZFGRNMWIHAABJ','OADLKMZGAV','NZVZWQW','DFCROJROCQJTMXHEPCP','UKWDMXAPLOQ','VLRMNKYEZXAKNDJDVAS','ZANHQCQOPBOBHQZLLKLO','OXNKHNJUBURGYP','ZVCANF','XJ','IXLVZSEP','FGICSRYYLBLOHXOUS','IFNXIETSAEZCZWME','GQJJHYQAISZYIXYEE','AARZ','JHVSGPGNYHWWCSSN','PJ','MJENAEESKEIZCVTJF','AIOCDJJMFNVBMSO','OLXYHBLJXXLTLDJZ','EEHQKUDZ','KAXVPRUJVY','KOZVNWI','MYEOHESCNYHLJQBSAM','DAQKJKIOCCJGJDLK','H','DRZACTYP','PQBXFPZHGFPA','OTQFQTOFPO','FZXMQIRBZZXYBBQKHOVY','IFFUCESAOGVY','RLMEMFHF','VRNEJHIFTMDKGD','JCFEDDHIIZ','RIXQXPNUFZQHXTCKVI','MDJLLSJCNTOVIWG','FUXFUQ','JLATDEWMQZAZTOQIU','IMGYRDGKASTQAETTHYDM','UMJSFJIFSUL','AGCCG','VW','VACYFIZMP','BVGBQOHMGNOILADIV','IY','CVRUJAFF','LQWTWBEIHHFHCN','Y','OD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'RIXQXPNUFZQHXTCKVI'))\r\n%%\r\nnamec={'BNQDWNHIZMZIYPJDXE','ZOUOKBHYDE','DZDXCESGTXGU','CNPVALPBNO','J','KHAFDXAHDGWVEECG','RSJBZKGBLGKIQKIONXO','M','LEWPVZQLG','MBFTDI','FIDPIR','BXKUGBCNI','EEIPKZTDXIXZE','VTK','KECUYATRYYZQRFBMQFF','ZMXDTZEVLPUWCOQWGT','DNOUKLHFKLFZPQNLHEJS','LOFTEQNLJQS','TATOHFSMCTXOSEP','ZMLLDLCIOLZDZO','HUYESE','MPCDGQSVDWDOSGQUTNPH','COKSSOTC','VUYTMLCGIH','RDQGJCNGTIHAVTA','LM','ALUDNJ','NQFALWUQETMQ','LQDFSQIB','BMFR','WWDXEZOQLKFQZMV','KJIKCYLOAXOQB','CTHLWRQAOLUS','MNBHMFGMUMCGLFP','IYZWIMPQRLSBWTJRM','RKYPSYJFIJEULGHORP','JGPRZUE','HNBCVUSAZC','IWYOIEQQXRWI','JDFZFLCIJYSRFKEMJ','QRJ','USNVNLTIIWAQFJKB','VLEBPQDTDUSERAWWOZ','ERZEDX','FQEJEZ','YUFEZXEJHKHDFH','XDZIAXZFTOGJL','CFGIJBXFCAQCDV','C','PXQUQLZRXQYDWYEPR','KJKMFXELPRBAE','ST'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VLEBPQDTDUSERAWWOZ'))\r\n%%\r\nnamec={'WVNPIGSHWNWEYZXVGD','UMGSKUBDCBPB','UMNZDCMZFVJDMV','W','U','KOOAIPPBAGWE','SIFAGBRDPHSJ','IVWKHKFOSGHQ','LTJLYBSSSVDPUWDVZDNR','KQYI','EOAUFDJGPDHZNI','DAUZBZFOGVAOOEUGQ','KZYRVCMEUUNPLNNYJOT','UZNBE','OCCMVSMMDJ','YWJFF','GLM','GC','AGDOIINNERJIZCS','YTVWSC','AHPAFSGFKOKXDPKE','RRIDQBXZCWCYUX','WFHCU','F','UOQWACOSPL','JDRWAT','OSVWNDCLALXOKVENJ','UUKW','SHUY','JHWDU','DXTKXVJOOQVEGBWVG','DFPIHXSJRV','XRUYYIIKNQXBA','IAKFHSMWGEKHVYK','R','DMNLUXLZCE','CKYUCCAHYLGCVIPISM','VZTC','V','JPBGCNJEGIUFTRDNIEJ','INTAI','YVPIHIHBV','FTYRQFMSQJGCRUVJA','TVDUULV','FSOVW','ZEGWUPW','LOEBGW','TZDKAXPMSKNGSM','AKPXNTPEQX','UPMFMQWSJPKAHNPUEXB','JAKUMRCRKNVXLFMOBC','IPWVL','KEUGMAZSUM','ASBULEZPSS','ZTDRKHGMDKJADZVRAAJ','XVQGIFQDY','MTS','WGLYHONYFBQCVYRLKQT','CPXOTZIU','OBENPRAUK','RFNAWDB','X','DACJTOFEPEFTJUJCBSLG','MFHHGIWHDWCMMQ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KZYRVCMEUUNPLNNYJOT'))\r\n%%\r\nnamec={'EPLXOSPBMNFLSVDG','DTILFFBMPHCWF','LUK','NOBSCFX','EPDPPGUNHYLPCFULNBX','UGVQYO','LZKFJXFD','MYLRRLUCBSYOESDSV','VSZ','TKPWUXBUS','C','DUG','YQNEOEZGP','ZVJZLKE','WO','YOZHALURQOQMUB','HXROEIQAIOX','DMI','LIBXFTJTFNCXJSRSYNL','STUDO','PWNS','HLVJXEDNUFBHXM','HBSREYCMRIAKP','ADRBV','BDKDKZXILBIUFDXJ','XCOIGOLXHGMAC','DMKYS','BTB','QGSIUWSKDFJB','CDYFIEAOOZHMEDKWDCE','XOPEJV','KBHOZF','ALGLCCLGGGIUKCQ','WNABLFRW','BOHFVKPNFNU','ZWIDLE','QMXHBR','AKAPNCG','PLZFRUTRXBV','JRGWCGXXX','XDCPLHRRUCVPAAGLRVEA','OJQGLWVHXMD','OQOXGIGW','GMPTQHVAQAU','MQWFZORJAXYHCBV','HLG','WXWOXBOONMBUHHHI','BDGZTDIKBTZHENSJDO','QHUXOUYONUI','KSKPVDEQKJMXTN','ENFDUSQOYV','OVSQKUAAGDBKVX','RMUYDACJYXNBOXJR','GNE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MQWFZORJAXYHCBV'))\r\n%%\r\nnamec={'MNXBEGBOOMKSS','AAZTPDMQEO','TUHWOCETRPPADJKVLKNG','JEHFKQYAQRG','N','TLCFCBFDHORCMRBV','ASYIFQQOXKIANN','GKABRTPVTGOKT','VFXWJ','HJGWWTQVVQW','FAETTKDWWSNDBLELSCC','AQMLDDCLSCJSHBXXLEV','FCLINFL','GP','WTUEHONR','DYPQIAUVGQJEPH','NRATMPUOKXBRU','MHJSZZUW','FSKSG','A','PPYEIGVJYDSMHVS','RIFD','WPHURHYCPKGNTNUW','LCRCTZIPWHHERMNTTYSC','XURWMZEPVSJJSYXP','BLUSPZELJQCTEQ','WLAJ','SKUEFNQJICEI','QRFYMQU','JFCHFLSXNANRFGEEHMG','MFTWKGYFBSEG','WVMOEVUWTQ','UDADALRK','NOHSWOJPOYLQRFFKBF','BRWEECKSUSNYIUVO','PLXCUMWAXCKL','HAARTVR','VRQNBTF','WRR','NJO','QJKWILPW','PJYHTCUMVKREZVJKW','JVKLYYTJHTHXUX','JZMWROBNJKB','ECCGFSWZPYCXRQRJSMV','D','HYAKZTGTNEZBU','MOGYEXDWFRYPBOOCYJN','USEPLXLFEHD','LBYKMNZCO','Q','EZNQBXXMQ','XO','WRXOQWATENOHYXVL','KT','DMRM','LUDNFTONTDKYJROC','RNXTYWHQYTWPO','MGRSTVXBIHLLGQFRLZB','L','EWULHSYNE','QMTQMIXGOUXRQYT','XMF','LPVQNZCCNSHCFTCY','IAZXRLSGWCWHX','PFSBLIFZTIU','QMSCWVUOWMCWJC','LRFRUSZNRDZLMIOWVM','KZCEBBILHZAFHSCYNG','YKTQYLUYWTRZPLPWZCOX','DTMTYSITUU','OXJOKUBFMYNLQLEZGP','ZKRZVHHK','BGBK','MBVJDMWHZDY','TXSVLOEKVOYO','ZZCSPJRDEVLMN','PVDJCJFNXTHXQCRQUC','VYDDKBOOKJLEWEPN','IRPTLCKJYXZSZLB','LSFPOTLVCP','BO','JZTLFYQRTPVRYOWBULN','FCEKHALVASPR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'TUHWOCETRPPADJKVLKNG'))\r\n%%\r\nnamec={'FLUEJJOMBLRDXEKQCCRU','LIYYDJ','OGTSXHBKSCDOEMQGVDC','SGWHEQZX','WUBXLLDNHSJT','PKDSEKIWIAMFRNY','GIW','XELJSPLL','BPHRHTSHY','DUXFYRXHOZRILQBS','WJHWDWVGEGLBABTS','SYLQBFT','HDFKJSBPPTQAUKGPEKE','LBJVIZZFNWB','BLQJPEPKXZIIWS','MWN','NEAINWUGPYOQM','G','HQCZZDRFPV','VNDZGDRZRBIXIYIZGA','PHKKYNLYUDODIR','GUICHJCXRXEYPCWAMJTZ','NHPLQGCWTKQ','TSDGDBDXDSXHMYJRBZH','LNGZYQMNWQSFVWI','RQPLKZDUFIXLOKF','WKUHTIYVUYNPHZ','UFZUFBPGKWRTUL','CAB','IJ','ZZQQALONCTOJUOOJE','DPDASWBKPMHTUBAEVK','SAKYBOLEFTAHWCZMU','UTTKNLHEVDO','NIWTMTZBTXIL','FJK','BAGMDT','KYPNASBVHNKYGJG','XEHDPYEHBRKUD','GSDRVABVNDP','ZZRKWNVKGW','RFWHDCDCMQCNHHQPSLCG','MU','STTUZEBEBPERPXEPBVW','YYRZHPQOBS','OOUYNTPVFUGGDZO','PMMAVJTPULZORKLP','GNJETMYHJ','MQNQRERGPCTSUZGAWRH','GG','PCSTZVH','H','GZPOECJ','IBWSJPQHVC','JNGEERMGZUNUFJJTJAUX','VIEVIXMGL','KURQLWQTHSKSKBUOU','NDXNTI','WBPHX','QEME','XXRQF','ARCFUSSRHARNWQKXXJ','ZMKVSZGFLLFEHJTRU','ZMHIEPKIU','GHRIVF','DHBID','HFKRRAMHMDWXWWFUMGZD','XGYYOU','OZSBMKFLSRGCCRHR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GUICHJCXRXEYPCWAMJTZ'))\r\n%%\r\nnamec={'KMQK','NOAQIPAOFRHAMMR','YVCDENPUPB','VYENYLJYROVQEIPEM','NCGEJIBYURR','ALNNGYOAM','N','YNSSDMYHIDH','TUTLKDZIBAC','OWITMHACTQCUTJW','VLUOBXBJNDB','RPARMIEFDQVGDGDB','KPRDR','JMUYVFQAY','BE','JBNMLITMCTMZAEKU','X','YMUZDIVKR','XWNEAZIYQGLHH','TUWLIMXZHB','SKALCOICJQTZGZZYQ','KAFVJJOERHNSNIMTI','UZIXNKITGATLNNUYAH','UYGP','XPIGOTGDHMDQJQ','DVCKEHHQCF','JUGYEISLDRPGBI','AHR','ZUBVTBHVUWTS','SPQMHDL','FTGF','PTFFMZFEIERBXJDMSBA','I','DOJOUGCRHDAUBUB','N','HPTUDMUZNYZMJCGGL','BLCVBZECFRLMCACF','WSBMPQ','VOWCMYG','HHBLB','MKXFNVK','F','VKFSSVBDFEPCVJWKKBX','Z','FIAZFRPZE','VFROTTGAJ','X','ZNPZNKADTQ','J','UAL','RRXOTDRSERENERUXX','S','IBN','VFBROKKMYVA','JTXXXCTWZMOGQWHWMFQM','SQBKRULGFVWXHHTL','ZTOCLWJYANBT','DVIPYGNXJIVQ','CTGTIU','UJFVZGZRVISC','MRONZFKHKJSVJIW','RMZGHFTHXSJJATX','OERO','PDRQDKX','TFMRFR','MKZOUDFBJEGXMWBHCR','MC'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MKZOUDFBJEGXMWBHCR'))","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":19,"test_suite_updated_at":"2017-02-26T21:57:50.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-26T21:47:39.000Z","updated_at":"2026-01-30T12:45:57.000Z","published_at":"2017-02-26T21:53:21.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/6304486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Leader\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 61 small cases with no spaces in names.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is to determine the rightful leader. The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\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 [names], a cell array of names using only A thru Z; max 100 names\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 [Leader], a string of the name of the leader\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 [names] [Leader]; {'ADAM' 'BOB' JOHNSON'} ['JOHNSON']\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\u003eFor the example the first two have three and two unique letters while JOHNSON has five unique letters 'JOHNS'.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force processing appears to be the way. Methodical processing and function usage can minimize code size.\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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":1916,"title":"GJam 2013 Veterans: Hedge","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard Hedgemony\u003e. This is the Large data set with N\u003c=1000.\r\n\r\nThe GJam story goes that the Baron trims the bushes(1:N) starting with bush 2 thru the next to last bush(N-1).  A bush is trimmed to the average of the adjacent bushes. If the bush is less than the adjacent average the bush is left alone.  Report the final Height of the next to last bush following its trimming. \r\n\r\n\r\n*Input:* hin , Vector length N\u003c=1000 with values between 1 and 1000.\r\n\r\n*Output:* hout , Final Trimmed Height of the next to last bush (accuracy \u003c2e-4)\r\n\r\n*Examples:* [hin] [hout]\r\n\r\n  [1 2 3 6 7] [5.000000]\r\n  [5 8 9 9 9] [8.500000]\r\n  [1 2 2 2 2 2] [1.937500]\r\n\r\n*Commentary:*\r\n\r\n  1) Best Time: 7 minutes\r\n  2) Solved by 27 of 32\r\n\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard\"\u003eHedgemony\u003c/a\u003e. This is the Large data set with N\u0026lt;=1000.\u003c/p\u003e\u003cp\u003eThe GJam story goes that the Baron trims the bushes(1:N) starting with bush 2 thru the next to last bush(N-1).  A bush is trimmed to the average of the adjacent bushes. If the bush is less than the adjacent average the bush is left alone.  Report the final Height of the next to last bush following its trimming.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e hin , Vector length N\u0026lt;=1000 with values between 1 and 1000.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e hout , Final Trimmed Height of the next to last bush (accuracy \u0026lt;2e-4)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [hin] [hout]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 2 3 6 7] [5.000000]\r\n[5 8 9 9 9] [8.500000]\r\n[1 2 2 2 2 2] [1.937500]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Best Time: 7 minutes\r\n2) Solved by 27 of 32\r\n\u003c/pre\u003e","function_template":"function h=Hedge_V(hin)\r\n h=0;\r\nend\r\n","test_suite":"%%\r\ntic\r\nhin=[766 537 321 480 419 738 736 848 636 789 829 282 275 732 350 318 886 646 737 272 775 516 399 84 767 567 589 992 361 141 42 126 677 714 605 447 452 693 295 87 833 475 369 107 206 70 425 443 68 513 715 842 380 465 926 498 31 866 489 744 6 883 869 34 948 826 480 399 870 126 838 702 600 558 161 157 627 585 600 694 449 666 888 828 130 165 326 513 382 166 256 387 400 124 772 348 301 251 98 170 ];\r\nhexp=98.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[296 334 370 405 439 472 504 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 ];\r\nhexp=984.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[89 668 662 805 922 799 390 948 856 108 343 985 287 208 866 62 270 471 141 717 997 953 616 739 418 429 967 875 551 327 828 991 994 841 796 268 640 537 215 847 996 558 831 282 117 696 696 386 518 188 103 867 140 70 957 557 498 923 783 400 601 962 391 595 803 538 214 794 74 428 640 70 337 823 351 454 518 398 191 388 585 293 254 724 715 562 280 564 484 414 964 436 376 706 30 530 243 595 323 668 ];\r\nhexp=323.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[343 713 209 730 52 457 191 342 286 988 415 29 867 460 629 360 451 733 677 536 287 975 835 202 487 189 178 104 222 6 933 565 70 493 646 121 949 836 462 586 175 876 615 42 687 243 401 489 327 78 24 613 404 858 166 890 398 344 345 620 701 629 536 770 121 533 242 421 368 703 7 894 930 973 935 968 215 688 457 893 117 480 857 872 690 23 113 87 718 458 58 770 86 945 891 559 477 132 979 196 ];\r\nhexp=164.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[752 415 809 465 166 690 876 258 217 362 49 765 508 532 889 262 222 933 39 741 125 452 683 129 382 827 793 159 242 199 396 993 965 557 457 482 598 685 91 166 46 139 930 905 22 818 166 243 102 557 335 578 8 17 706 389 195 499 547 437 49 295 429 365 203 886 846 800 570 288 965 967 427 246 872 448 415 37 43 517 593 377 94 952 746 800 693 940 650 239 376 698 885 157 414 439 394 259 590 315 ];\r\nhexp=287.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[56 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ];\r\nhexp=90.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[1 2 3 4 7 ];\r\nhexp=4.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[621 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 ];\r\nhexp=879.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[114 599 12 672 886 403 231 280 268 212 173 879 456 671 733 238 423 824 70 634 389 448 687 367 911 508 890 214 697 762 512 810 361 523 481 246 278 63 877 545 275 50 775 82 72 859 319 846 682 740 831 70 539 517 788 450 24 29 663 721 791 527 882 151 401 363 748 678 777 624 222 403 25 348 484 448 206 154 293 888 894 123 309 432 639 449 881 15 477 896 87 619 774 968 121 526 682 868 204 459 ];\r\nhexp=204.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[18 27 36 45 54 63 72 81 90 99 108 117 126 135 144 153 162 171 180 189 198 207 216 225 234 243 252 261 270 279 288 297 306 315 324 333 342 351 360 369 378 387 396 405 414 423 432 441 450 459 468 477 486 495 504 513 522 531 540 549 558 567 576 585 594 603 612 621 630 639 648 657 666 675 684 693 702 711 720 729 738 747 756 765 774 783 792 801 810 819 ];\r\nhexp=810.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[823 304 810 336 956 450 271 376 574 27 300 513 154 825 384 662 69 765 915 473 794 229 24 568 883 911 820 507 554 938 670 729 241 831 64 196 280 334 572 853 361 223 365 866 48 748 528 116 865 442 941 658 670 964 225 904 226 44 410 131 982 79 859 574 261 275 770 540 608 693 392 320 915 109 186 962 208 713 430 72 154 370 82 176 685 306 79 262 702 841 744 35 271 955 960 532 229 729 71 836 ];\r\nhexp=71.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[213 995 315 894 909 497 72 335 149 956 89 10 82 156 180 840 748 514 526 117 115 973 746 339 261 758 62 591 981 526 74 193 872 388 438 781 885 862 467 385 817 555 747 250 62 278 89 810 791 614 278 905 938 23 595 198 132 8 141 112 533 214 656 405 954 446 537 190 307 3 574 123 557 672 724 618 949 812 779 739 777 408 995 66 430 589 264 561 949 404 24 481 969 32 885 274 829 773 463 135 ];\r\nhexp=314.125000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[73 946 695 109 440 590 735 26 838 968 49 851 398 47 95 334 537 741 687 390 391 108 584 368 754 27 668 232 88 446 11 512 743 57 972 182 646 707 560 835 26 608 38 423 7 132 756 895 872 442 284 614 901 867 333 655 245 352 238 684 150 600 195 244 656 167 778 653 873 337 487 898 296 524 673 302 8 780 196 231 222 479 197 122 697 529 128 942 233 365 625 734 964 820 977 971 338 754 623 562 ];\r\nhexp=521.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[753 846 188 652 335 841 336 171 360 918 547 868 478 629 319 749 181 906 990 776 163 10 176 620 990 707 967 494 861 499 418 966 696 957 617 382 798 304 904 509 221 450 728 50 78 47 799 610 952 140 385 467 501 913 86 491 619 404 336 831 254 753 148 301 62 764 682 859 68 585 719 640 386 446 42 815 492 192 425 796 331 161 614 183 73 699 673 691 454 360 874 708 465 21 8 526 137 42 384 556 ];\r\nhexp=299.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[872 131 311 224 991 903 306 952 664 730 757 229 152 570 929 908 524 546 799 742 206 282 637 964 585 581 250 867 291 42 647 515 172 957 738 515 859 395 466 874 476 222 102 627 791 31 535 667 928 333 408 133 966 44 96 551 976 345 417 619 738 63 485 910 371 574 424 230 968 889 103 443 463 557 70 605 587 956 271 866 640 30 998 606 426 445 156 753 790 924 371 879 339 855 788 709 780 563 290 747 ];\r\nhexp=290.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[175 24 584 259 980 687 164 433 990 754 407 551 483 167 505 829 781 779 92 463 740 717 80 428 286 149 930 302 553 241 114 80 616 697 338 596 735 501 380 725 607 787 275 89 953 131 269 85 262 360 899 1 77 330 428 362 478 709 15 31 302 128 462 917 176 799 864 911 651 244 635 257 30 261 345 334 743 965 771 4 325 669 356 401 999 135 114 476 196 129 858 497 608 319 765 784 469 629 46 120 ];\r\nhexp=46.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[805 273 983 761 557 499 163 895 512 86 153 471 211 830 970 364 287 987 172 751 767 289 186 348 753 835 126 830 440 200 582 596 824 917 356 380 767 870 274 279 308 426 749 518 607 719 233 246 57 756 348 823 396 885 170 500 719 647 329 158 198 263 753 21 179 461 752 297 682 26 927 989 803 28 858 762 746 442 7 154 197 706 977 593 590 498 92 308 497 773 818 46 35 922 419 565 734 170 861 416 ];\r\nhexp=293.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[599 667 619 323 861 571 994 33 188 819 130 813 783 966 171 562 744 726 352 808 3 568 962 807 454 696 846 473 878 234 700 828 253 671 502 113 593 847 497 780 18 978 944 152 295 466 713 390 191 65 197 545 984 158 352 790 854 549 262 83 134 313 262 386 983 764 850 576 962 699 707 979 28 3 130 323 468 195 712 659 611 261 203 594 418 906 383 623 454 996 705 588 309 319 325 291 82 175 218 395 ];\r\nhexp=218.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[147 43 560 990 988 677 348 370 557 84 176 195 164 740 583 844 760 737 407 168 753 609 171 123 132 251 711 910 111 642 155 609 37 66 598 376 742 297 745 651 380 920 845 896 11 779 91 770 867 497 937 971 458 460 94 589 710 156 499 172 797 653 780 833 718 729 208 812 25 952 462 756 223 658 651 233 788 93 354 6 590 643 976 399 454 69 987 163 224 485 334 373 489 465 205 559 193 765 722 569 ];\r\nhexp=513.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[978 102 195 364 899 588 178 743 779 602 538 109 763 151 292 187 201 316 230 654 676 103 713 140 475 721 665 611 762 400 166 739 853 713 102 751 300 632 493 79 585 382 539 699 884 182 886 436 850 115 442 525 217 154 16 43 874 32 654 987 783 171 78 635 235 531 737 887 162 582 317 747 315 207 445 199 389 330 986 238 444 427 114 12 581 129 55 806 512 60 145 294 582 222 280 169 752 16 407 266 ];\r\nhexp=141.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[7 7 8 10 13 17 22 28 35 43 52 62 73 85 98 112 127 143 160 178 197 217 238 260 283 307 332 358 385 413 ];\r\nhexp=385.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[738 971 183 448 70 885 407 371 397 636 318 487 627 427 569 879 960 313 750 815 768 572 413 61 287 382 520 43 814 125 344 903 447 878 702 868 762 461 590 511 448 907 997 74 333 918 953 644 230 54 810 349 625 222 409 264 955 280 306 120 756 1 22 203 878 76 422 991 536 12 853 983 918 850 57 603 767 361 598 348 766 408 696 743 981 104 6 936 383 663 55 138 15 429 692 244 504 114 234 39 ];\r\nhexp=76.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[949 418 285 925 330 782 174 240 219 993 381 33 468 987 500 404 530 442 78 267 962 838 245 813 143 604 15 846 997 914 367 945 332 4 869 661 785 395 252 355 387 632 739 206 618 239 962 499 32 39 765 345 228 10 158 371 965 172 216 961 85 935 905 768 938 126 428 74 520 31 428 258 662 167 816 632 757 777 130 140 167 247 484 394 256 641 116 220 812 332 532 249 618 788 16 555 913 796 628 784 ];\r\nhexp=628.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[761 55 67 660 932 860 312 853 64 448 912 166 21 43 742 359 371 780 697 578 808 681 716 982 322 724 74 32 379 536 339 491 590 406 502 521 265 814 373 680 261 285 845 281 679 587 992 401 366 40 330 525 720 46 858 41 769 283 424 499 818 763 989 407 168 491 280 784 656 4 463 916 640 660 548 319 598 539 71 315 578 401 191 297 446 401 689 566 683 113 65 501 875 405 907 394 247 538 529 902 ];\r\nhexp=529.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[34 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 ];\r\nhexp=137.996826;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[1 2 2 2 2 2 ];\r\nhexp=1.937500;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[53 620 927 157 752 915 161 819 988 233 579 783 691 30 575 597 350 744 845 242 87 868 271 729 743 745 144 75 853 148 862 906 767 140 414 518 55 574 688 394 807 267 176 849 648 102 445 349 197 641 942 283 508 212 364 603 308 507 29 512 654 243 417 421 382 182 290 788 756 978 181 914 596 356 762 595 809 558 943 6 550 884 640 410 447 3 12 754 861 392 265 515 634 34 287 16 567 928 803 322 ];\r\nhexp=479.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[125 335 606 923 25 58 911 104 813 458 985 932 324 642 768 104 856 242 345 984 168 373 327 851 465 195 993 526 416 805 750 541 491 707 463 515 117 725 619 929 535 955 212 210 948 980 313 803 573 9 139 740 382 465 943 198 11 935 75 427 91 176 319 581 883 133 448 351 858 418 279 744 372 842 953 672 173 265 474 745 626 964 485 7 428 779 204 439 713 278 217 803 453 535 735 687 667 182 37 876 ];\r\nhexp=37.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[844 777 213 220 125 697 668 330 202 960 569 95 83 230 879 73 678 111 87 506 358 525 125 131 493 597 657 174 465 212 984 660 340 197 879 464 893 546 146 446 858 66 893 292 295 771 364 324 233 803 830 591 327 306 73 819 254 81 345 70 644 328 729 984 524 960 447 768 505 944 566 362 10 458 653 304 228 369 628 812 523 809 754 849 466 827 20 719 259 716 789 903 43 869 238 919 828 36 38 685 ];\r\nhexp=38.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[186 337 90 467 309 376 434 875 415 890 767 531 722 624 402 763 998 867 849 715 324 259 836 409 555 726 967 384 857 298 931 42 986 20 508 647 748 941 873 162 183 992 45 256 967 798 18 964 664 218 30 987 828 865 748 383 590 66 118 446 715 48 839 701 420 346 347 519 638 571 680 172 562 76 779 528 874 796 843 537 366 872 876 193 88 623 927 677 40 44 474 755 444 312 455 863 9 153 381 999 ];\r\nhexp=381.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[477 87 21 394 288 429 996 406 141 594 753 907 1 448 649 333 903 6 268 637 668 675 126 34 103 818 277 606 283 510 996 759 948 368 504 587 149 500 992 289 445 744 547 797 543 195 129 445 552 749 81 571 423 207 604 877 376 880 834 10 742 829 120 41 196 975 628 696 474 619 985 270 715 883 66 257 430 547 702 981 647 134 552 69 692 155 945 419 35 130 780 776 958 251 816 505 226 795 201 699 ];\r\nhexp=201.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[826 407 394 840 925 209 823 33 337 952 172 855 550 8 600 805 648 716 376 812 47 259 60 664 47 427 570 311 222 549 447 400 307 840 239 232 400 61 616 88 364 140 942 914 147 541 70 146 256 446 309 654 56 368 317 102 147 238 765 720 786 211 119 93 402 357 676 153 769 291 240 485 782 181 398 928 73 467 426 329 264 734 334 320 454 3 773 600 240 537 319 26 99 790 470 500 498 145 4 267 ];\r\nhexp=4.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 449 ];\r\nhexp=449.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[89 294 485 74 327 84 520 93 930 809 722 465 940 173 837 183 482 390 771 235 228 987 190 889 791 317 684 110 217 895 566 657 188 402 731 514 485 602 606 767 410 328 583 701 500 772 884 333 161 654 919 740 993 461 629 135 129 312 244 346 206 161 2 394 562 84 259 399 685 865 165 447 544 99 499 395 870 382 79 382 388 997 122 732 457 750 866 938 413 109 283 971 270 636 716 183 72 974 581 108 ];\r\nhexp=217.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[77 98 98 98 98 98 98 98 98 98 98 ];\r\nhexp=97.958984;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[352 744 346 117 530 347 100 769 855 38 203 142 758 38 66 587 519 111 639 319 941 571 8 532 733 247 351 444 80 214 776 432 309 473 548 190 819 999 958 673 389 160 166 146 550 584 733 68 694 723 386 987 646 745 870 378 343 573 822 423 786 949 206 446 421 105 635 591 104 593 615 492 104 133 637 653 716 721 721 761 796 458 99 441 555 321 170 249 893 343 671 678 291 876 123 63 981 109 653 436 ];\r\nhexp=272.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[980 603 46 989 60 51 292 639 771 271 803 293 431 556 141 896 382 512 967 993 227 107 247 622 327 484 892 155 519 281 839 498 884 236 838 295 638 482 286 408 752 88 700 535 643 193 782 377 56 748 721 635 206 967 608 533 802 499 39 320 779 229 170 14 464 7 661 454 840 946 213 592 385 265 478 27 457 259 755 864 7 475 498 564 793 105 96 594 955 134 266 86 362 787 99 178 145 759 983 985 ];\r\nhexp=774.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[503 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 ];\r\nhexp=933.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[639 297 43 644 114 112 303 812 536 562 30 793 511 826 121 341 350 737 607 961 238 790 232 341 217 876 109 914 771 275 778 761 924 820 756 37 283 58 200 170 971 229 962 481 406 83 173 107 819 779 419 409 921 651 749 137 878 857 403 648 483 180 760 406 351 515 794 986 924 345 155 246 925 469 726 331 551 251 789 369 29 208 777 301 210 877 438 87 85 840 87 568 371 198 325 73 65 471 58 340 ];\r\nhexp=58.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[674 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 847 829 ];\r\nhexp=846.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[547 140 404 702 167 262 463 264 703 821 417 252 526 745 196 115 595 287 774 91 411 591 488 445 865 258 361 598 428 574 13 326 713 417 379 879 30 193 142 84 13 910 335 890 655 530 356 249 169 130 691 579 72 530 376 288 788 736 886 567 309 250 892 373 666 623 251 47 815 744 131 180 654 817 69 660 347 425 908 867 906 950 797 977 479 524 617 266 260 502 832 920 751 76 293 769 698 895 815 864 ];\r\nhexp=809.562500;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[680 621 166 694 202 867 507 772 747 333 602 547 825 129 377 315 246 763 612 783 183 775 431 691 591 404 507 878 113 587 884 792 207 401 837 409 619 343 180 365 28 782 263 204 262 991 518 507 754 481 642 288 255 424 978 197 827 836 74 291 423 309 435 981 709 271 389 679 966 921 43 993 54 658 196 315 648 65 174 753 545 167 41 151 590 370 699 768 206 124 58 980 433 492 960 493 115 701 524 80 ];\r\nhexp=199.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[964 504 962 499 817 893 64 751 294 127 860 461 487 196 172 989 670 389 769 140 221 767 853 559 614 357 547 107 629 774 71 944 277 33 795 93 277 858 843 571 984 702 31 470 249 203 458 919 943 227 410 515 345 263 73 958 619 971 64 599 744 135 895 20 519 689 464 795 546 306 365 882 359 748 351 960 302 161 230 596 739 639 110 83 901 534 392 872 504 456 470 599 942 716 618 460 404 433 606 302 ];\r\nhexp=367.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[653 629 919 453 323 366 52 695 536 116 217 727 839 118 576 623 304 650 290 456 940 338 538 898 400 964 822 249 990 178 80 994 806 998 799 480 364 850 175 899 317 743 978 156 861 905 778 516 906 419 971 845 108 508 742 859 823 916 107 165 445 187 158 250 184 956 81 899 157 255 150 474 998 127 981 210 383 110 77 288 529 48 484 988 907 578 847 730 845 953 894 289 139 403 890 675 711 970 573 867 ];\r\nhexp=573.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[542 343 817 181 2 717 851 599 255 922 265 833 322 456 481 119 856 170 36 538 634 100 38 860 857 297 253 103 834 133 5 375 475 173 556 477 889 406 427 496 679 692 680 352 499 160 470 354 681 506 243 314 957 281 173 813 929 777 268 762 909 624 489 384 148 44 212 389 801 638 884 480 681 563 183 179 74 653 532 755 510 775 68 818 407 241 983 335 369 602 448 278 225 936 13 372 331 224 112 484 ];\r\nhexp=112.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[700 796 621 453 757 624 511 627 473 878 492 222 436 207 958 857 592 529 436 87 883 927 455 471 821 924 259 754 703 344 400 754 491 21 206 599 996 69 226 469 946 717 42 382 275 999 590 218 880 377 656 114 303 111 937 475 386 195 228 440 890 979 193 733 351 399 331 699 467 556 519 764 624 560 497 250 911 86 468 142 814 475 255 116 937 191 590 322 738 169 761 627 500 954 359 202 704 42 900 522 ];\r\nhexp=282.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[785 773 843 714 450 688 70 161 944 838 458 560 551 786 673 678 788 880 929 483 135 335 407 908 857 578 767 378 156 248 269 292 372 111 5 821 150 426 334 446 615 791 5 517 928 677 194 68 908 122 550 42 808 309 302 664 886 420 41 41 668 309 684 39 771 688 212 921 465 545 366 79 687 722 595 614 398 140 33 657 261 583 698 420 891 999 84 128 771 476 520 438 137 203 828 907 242 391 179 706 ];\r\nhexp=179.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[442 462 811 738 337 483 391 344 263 587 575 836 417 771 309 466 651 437 407 235 153 383 968 469 554 297 439 891 402 414 804 844 875 615 933 563 449 323 907 63 261 833 898 30 955 559 495 957 347 901 192 499 635 511 319 189 807 110 431 561 523 235 756 749 849 688 311 297 362 569 712 975 753 609 4 59 519 498 16 865 750 559 716 384 421 34 572 580 495 3 140 17 237 895 117 437 934 780 85 295 ];\r\nhexp=85.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[300 957 991 928 515 271 288 77 529 376 640 372 800 648 520 231 667 764 64 111 271 648 246 135 274 546 654 464 977 652 304 628 609 647 555 475 269 843 552 797 570 543 168 369 190 39 951 209 802 366 319 424 365 564 558 638 461 563 454 437 215 757 64 175 755 970 1 23 812 904 171 381 799 690 101 988 728 403 196 882 120 866 305 485 429 215 122 241 777 575 677 343 684 92 869 790 62 870 813 873 ];\r\nhexp=655.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[717 12 670 985 590 200 954 732 205 219 93 986 326 541 228 107 261 95 285 655 462 684 339 134 429 448 122 424 810 712 408 526 75 429 510 664 628 816 747 833 386 839 170 711 731 750 817 991 844 453 646 657 136 336 142 917 783 264 692 592 975 99 118 401 528 979 416 155 146 162 339 531 1000 861 593 83 610 761 73 805 214 70 462 701 757 603 617 540 218 309 483 544 407 952 944 286 283 711 441 428 ];\r\nhexp=395.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[775 389 609 683 60 332 653 361 495 783 99 271 191 446 336 972 386 951 885 334 706 260 815 27 291 51 300 119 824 763 605 950 151 213 985 562 544 637 922 38 771 373 660 961 818 348 933 203 650 817 889 356 76 703 382 719 105 33 189 928 147 794 230 297 6 214 211 902 202 132 291 972 856 303 933 25 650 217 580 299 385 468 6 460 522 739 530 626 772 71 906 270 864 135 919 221 700 129 474 253 ];\r\nhexp=191.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[953 115 502 480 98 330 781 222 833 663 162 633 91 86 112 337 594 600 596 548 571 334 128 131 165 76 403 523 471 967 807 424 82 308 255 531 637 388 752 469 50 913 453 140 351 917 829 944 516 424 843 439 110 971 569 626 398 323 500 221 642 306 996 723 613 250 253 602 637 356 422 687 268 227 178 618 143 6 913 10 782 108 448 891 430 369 516 179 43 367 399 684 673 394 758 637 996 362 590 632 ];\r\nhexp=497.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[7 8 7 9 9 ];\r\nhexp=8.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[564 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 ];\r\nhexp=908.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[507 172 26 449 868 808 866 620 533 792 983 584 15 861 470 374 370 289 708 886 891 819 311 813 171 911 521 604 300 682 971 806 853 997 254 720 156 471 691 689 614 26 624 629 238 445 354 608 85 413 845 976 232 507 140 402 418 660 5 69 694 976 874 898 972 480 618 479 302 660 167 916 37 143 544 275 587 249 234 672 662 78 999 893 585 490 646 354 502 651 422 195 626 647 92 949 478 61 779 780 ];\r\nhexp=420.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[589 550 266 629 51 743 468 234 813 337 733 325 365 902 42 882 463 694 280 215 182 928 357 527 772 765 775 953 311 745 607 251 646 872 879 49 967 347 634 779 683 367 104 399 620 497 632 82 190 263 649 723 542 357 602 313 474 376 266 136 472 872 386 469 96 616 517 414 962 151 192 996 517 647 746 136 144 378 570 685 640 570 760 534 926 361 846 751 736 111 886 559 335 623 27 782 239 896 195 552 ];\r\nhexp=195.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[194 693 979 12 991 375 518 854 825 355 93 775 220 472 768 138 912 302 153 626 750 682 840 23 620 651 542 846 79 714 942 624 759 272 636 101 647 505 954 823 212 398 949 431 870 68 568 133 370 720 758 471 753 949 845 725 952 387 570 382 452 864 6 210 135 641 662 133 145 615 307 708 365 255 138 586 675 706 718 396 777 828 866 882 776 710 606 727 448 527 461 900 390 466 461 877 458 123 361 954 ];\r\nhexp=361.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[744 864 989 387 489 924 127 23 119 623 554 45 268 302 556 77 859 465 740 297 238 716 689 386 333 730 710 361 144 616 992 887 831 981 625 319 904 103 694 374 725 599 418 345 900 326 421 110 790 160 406 27 876 446 764 560 527 474 272 22 441 263 260 624 243 236 942 499 338 987 872 415 937 290 759 836 967 531 297 756 690 54 134 917 500 897 828 378 722 99 400 163 714 659 786 308 895 79 158 584 ];\r\nhexp=158.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[905 984 587 852 691 348 446 500 257 740 857 807 975 496 216 421 499 579 526 359 322 143 225 308 176 863 323 742 791 477 416 47 812 2 251 855 702 48 706 958 788 562 116 762 57 683 535 907 613 60 618 287 202 842 594 729 705 916 823 847 744 238 893 908 591 143 762 292 191 467 602 330 28 69 91 436 104 977 343 716 37 960 2 238 153 595 319 209 862 141 55 958 378 300 865 320 442 978 612 984 ];\r\nhexp=612.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[317 556 286 294 527 303 996 355 931 835 560 798 184 88 302 843 401 736 980 845 42 116 363 823 229 13 90 785 964 635 98 633 191 383 926 69 37 922 423 319 108 983 116 291 422 769 485 823 504 464 19 898 932 382 720 160 746 161 296 709 795 745 341 337 479 267 405 867 540 180 185 647 162 301 289 935 421 125 757 925 588 776 174 871 157 245 382 254 405 678 962 199 422 655 888 901 273 644 119 164 ];\r\nhexp=119.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[872 680 376 253 292 73 586 386 37 356 742 361 377 97 113 375 584 579 202 131 59 412 627 18 730 391 801 551 371 846 670 242 877 397 846 520 469 432 906 858 139 999 570 515 95 683 241 30 613 443 160 23 854 138 40 935 881 193 485 251 38 506 493 267 903 690 786 723 121 43 580 612 41 150 478 488 184 719 517 148 513 29 170 366 518 561 652 398 753 489 649 791 994 493 409 248 182 194 971 303 ];\r\nhexp=248.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[941 503 851 883 141 176 209 828 359 769 616 66 629 324 53 146 997 350 959 906 740 73 671 272 736 44 357 518 350 620 96 290 122 946 525 263 121 733 442 831 502 57 249 130 380 653 275 728 2 586 985 93 658 8 365 393 51 73 263 400 692 358 42 166 656 566 780 128 298 221 959 151 277 559 280 9 211 907 88 564 492 425 656 149 432 20 893 482 92 155 233 136 865 274 301 520 191 80 647 841 ];\r\nhexp=460.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[377 935 872 328 492 32 485 119 968 436 164 768 453 51 595 934 567 272 446 948 438 53 686 189 529 457 536 829 60 634 351 788 568 574 115 412 605 951 882 924 738 45 43 542 448 637 476 14 261 273 314 698 678 999 886 206 456 774 386 867 407 736 654 326 309 768 737 265 71 618 540 160 15 582 702 462 219 529 827 479 801 140 528 830 491 765 35 946 538 421 164 296 156 817 622 465 936 710 81 6 ];\r\nhexp=81.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[287 544 784 973 617 730 939 14 869 971 670 481 905 720 900 147 70 335 274 840 811 793 629 947 995 457 205 236 199 384 941 486 279 76 810 896 157 100 909 377 71 931 209 327 2 461 474 71 795 747 911 957 892 539 903 886 347 108 474 898 491 766 383 769 842 192 16 350 292 925 727 714 207 935 40 560 395 865 630 542 612 892 498 503 783 753 740 481 860 213 378 702 979 112 822 172 304 838 521 947 ];\r\nhexp=521.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[444 565 313 823 633 756 258 736 732 952 804 120 911 157 358 416 104 28 624 317 168 31 274 897 330 490 216 123 467 827 459 262 743 771 436 376 878 694 463 962 997 618 81 908 775 790 323 878 817 298 546 984 328 820 880 9 661 448 132 480 626 590 741 369 712 529 96 590 574 558 903 570 176 983 477 302 773 151 531 589 801 76 925 480 247 156 489 908 603 620 739 581 561 831 949 272 359 44 213 932 ];\r\nhexp=213.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[51 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 ];\r\nhexp=99.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[328 834 946 94 643 121 288 291 244 792 962 420 200 322 600 338 25 5 23 234 995 908 950 163 639 768 623 582 556 243 608 236 428 553 329 422 25 616 713 620 759 26 391 958 699 990 647 723 347 670 308 693 577 257 856 568 376 830 149 932 424 109 519 851 13 847 272 390 462 336 9 572 714 400 529 412 741 528 487 439 197 794 484 125 403 339 692 778 520 193 61 943 653 579 793 665 425 64 406 238 ];\r\nhexp=151.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[5 8 9 9 9 ];\r\nhexp=8.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[746 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 847 829 810 790 769 ];\r\nhexp=789.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[68 183 324 291 192 327 875 979 419 229 984 360 223 311 758 676 380 97 190 955 933 875 327 774 339 532 332 531 648 53 99 715 587 774 5 778 452 232 108 223 812 443 934 34 753 692 709 132 140 898 439 72 124 765 845 462 648 528 344 295 932 442 10 518 567 366 647 371 597 106 593 760 548 526 793 301 569 853 784 60 102 574 132 225 339 328 686 986 856 29 633 787 822 642 657 741 359 655 111 308 ];\r\nhexp=111.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[804 393 542 618 301 963 222 887 918 845 752 557 874 101 514 651 545 21 404 686 945 126 565 635 333 704 343 112 267 633 859 422 377 752 39 677 714 260 915 983 456 18 891 682 470 757 332 14 777 735 700 721 213 616 707 545 319 50 656 937 34 866 358 762 617 396 790 682 8 56 16 463 425 259 144 894 15 828 259 791 914 310 864 126 925 570 670 596 971 326 532 356 543 242 117 160 637 258 193 996 ];\r\nhexp=193.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[612 765 224 468 419 508 492 68 76 71 718 460 890 76 272 411 814 801 37 937 871 942 207 86 428 125 307 127 253 132 379 216 248 954 683 666 462 527 733 537 949 803 349 839 878 620 249 43 420 285 980 643 578 538 728 5 14 386 131 266 518 861 833 765 815 516 783 628 394 867 516 342 669 864 180 898 483 429 941 255 65 272 897 643 809 976 647 822 362 130 439 231 990 271 347 156 138 129 135 531 ];\r\nhexp=135.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[1 2 3 6 7 ];\r\nhexp=5.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[12 15 579 322 49 851 15 663 888 517 846 428 402 653 74 764 682 500 440 437 256 453 191 765 452 488 377 499 452 550 537 815 916 467 489 965 317 855 627 556 372 824 335 125 476 409 240 158 908 679 946 515 131 136 280 934 623 8 432 427 909 968 241 825 786 81 789 455 936 767 10 307 590 345 783 418 753 374 927 12 52 872 879 534 360 158 820 982 517 251 760 425 571 353 249 356 433 389 810 368 ];\r\nhexp=378.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[398 738 548 266 737 645 401 232 374 322 916 366 243 675 899 521 387 744 271 122 207 509 32 893 131 411 674 369 306 220 921 703 309 820 968 45 464 720 276 838 394 544 203 636 218 101 156 957 196 779 78 402 287 462 294 769 872 319 138 529 890 58 231 199 229 550 243 44 269 871 881 14 414 435 650 983 887 157 939 83 287 369 836 925 830 130 694 53 800 831 581 690 240 811 888 468 712 482 863 332 ];\r\nhexp=407.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[546 906 281 324 151 504 124 566 541 166 434 485 894 527 437 639 678 129 931 327 719 658 376 956 814 789 394 207 399 984 521 945 889 154 620 392 657 743 309 549 260 742 34 154 268 822 144 298 950 426 624 20 84 352 327 249 140 721 808 539 56 680 835 296 833 806 687 842 901 995 390 160 88 775 665 356 596 161 5 897 586 628 269 21 331 595 622 471 315 429 361 722 108 547 18 293 352 56 486 252 ];\r\nhexp=154.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[7 7 7 ];\r\nhexp=7.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[674 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 895 880 864 847 829 ];\r\nhexp=846.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[56 195 928 440 459 405 819 267 663 573 131 21 400 980 585 544 437 32 138 743 518 755 828 879 541 927 408 37 37 390 21 445 937 948 884 395 704 54 14 367 979 496 739 378 827 675 921 263 707 410 6 224 164 185 454 56 111 214 93 500 603 465 944 891 765 179 286 468 233 651 186 211 146 925 940 972 951 212 587 657 622 944 232 137 128 686 545 591 899 989 442 853 805 385 744 569 563 381 389 147 ];\r\nhexp=264.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[723 412 522 637 488 301 164 361 96 7 249 461 230 124 6 318 98 932 346 138 328 820 892 771 483 698 985 844 850 717 842 924 128 363 560 967 15 76 679 111 434 928 923 663 51 280 980 149 564 326 286 891 497 177 13 331 874 349 174 75 65 367 350 544 82 262 863 96 689 541 558 122 468 833 784 519 112 116 19 675 441 304 917 289 832 281 619 57 629 145 483 45 863 184 941 944 445 803 392 133 ];\r\nhexp=275.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[577 722 692 926 200 672 135 934 134 563 221 14 610 57 1 517 986 847 598 830 800 491 470 290 893 711 316 603 32 241 822 608 314 513 533 514 537 19 447 670 582 20 35 543 428 35 411 413 882 8 594 33 498 63 674 743 125 990 697 156 230 870 764 895 735 648 408 271 19 207 292 952 578 326 846 5 712 257 769 945 264 362 329 114 776 3 856 900 344 904 407 925 774 522 819 508 170 579 130 540 ];\r\nhexp=130.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[421 815 156 688 923 693 1 130 405 430 554 910 151 635 437 187 292 516 448 345 356 192 379 626 146 339 157 374 419 580 561 192 746 68 231 668 760 231 149 516 13 702 426 515 688 214 702 980 729 501 324 436 692 55 414 189 745 922 914 515 501 827 58 246 894 288 265 654 519 766 521 883 819 298 397 507 512 98 838 240 951 513 28 642 919 441 183 663 362 448 530 215 274 587 812 168 227 77 173 745 ];\r\nhexp=173.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[403 227 764 490 2 428 197 949 940 201 846 526 181 114 898 511 60 519 333 375 947 45 448 407 591 817 51 295 873 888 898 627 114 13 116 115 793 313 64 732 865 261 609 45 726 507 908 785 377 240 511 324 637 959 82 579 127 484 873 999 371 123 977 484 135 93 951 279 757 366 11 621 626 971 18 703 477 277 487 854 868 350 529 504 660 962 83 786 445 307 137 167 429 113 650 916 205 952 194 313 ];\r\nhexp=194.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[167 565 586 92 33 663 774 583 913 562 303 294 121 432 594 682 660 383 121 745 222 207 664 944 756 340 17 820 810 426 512 977 342 97 68 374 759 193 308 24 106 963 317 227 746 262 260 405 645 380 149 866 938 164 162 694 504 178 865 313 955 376 641 297 824 60 22 583 252 330 958 358 644 274 936 389 535 195 145 179 575 646 397 512 809 558 557 312 87 422 977 393 149 617 41 973 677 63 907 280 ];\r\nhexp=171.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[190 97 554 733 196 405 479 417 786 557 799 525 554 272 256 362 373 121 299 785 582 933 107 851 569 822 33 992 796 966 99 985 62 5 70 257 409 548 674 546 105 824 71 10 447 326 723 819 799 22 955 380 306 62 582 874 883 966 217 30 931 316 15 993 320 84 601 728 983 626 273 87 801 695 96 247 373 819 65 171 192 372 902 497 433 835 723 667 800 939 697 83 606 63 427 925 498 27 4 480 ];\r\nhexp=4.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 419 ];\r\nhexp=419.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[343 949 254 811 781 390 681 893 505 51 919 297 706 188 585 889 468 555 945 449 699 779 845 562 962 785 857 407 939 248 891 282 197 497 444 329 886 476 573 390 526 492 686 583 679 622 471 498 176 415 946 875 545 143 788 506 927 644 264 218 244 155 851 440 651 646 768 888 121 693 277 998 184 314 580 214 935 50 63 110 816 9 336 712 503 123 217 429 119 481 646 362 987 848 153 989 493 272 876 613 ];\r\nhexp=442.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[96 139 180 220 259 297 334 370 405 439 472 504 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 ];\r\nhexp=999.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[996 3 873 16 866 52 914 701 832 206 307 897 477 555 539 637 530 185 810 243 314 248 473 656 870 172 163 360 300 298 242 647 300 114 663 517 518 576 217 701 781 875 597 609 429 487 245 311 672 54 553 337 653 378 344 874 549 507 585 200 804 827 847 455 292 509 971 161 436 540 862 568 414 810 176 195 297 772 505 320 177 409 8 181 786 704 54 686 210 991 886 365 817 732 819 460 592 789 621 27 ];\r\nhexp=316.750000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[787 243 751 569 775 500 848 848 318 273 528 934 359 861 253 812 863 377 763 103 266 433 480 364 222 949 216 720 445 219 338 583 462 440 151 236 939 351 435 608 975 962 541 333 823 145 496 685 522 610 787 787 395 618 502 616 566 717 687 362 288 376 945 749 815 95 336 105 797 771 65 772 732 605 104 554 102 952 591 975 561 729 761 955 347 262 923 912 331 961 274 618 337 570 718 503 16 405 960 813 ];\r\nhexp=609.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[43 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 ];\r\nhexp=54.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[375 314 89 711 136 792 516 6 189 707 745 774 351 350 497 65 911 129 629 746 542 944 181 269 649 563 798 243 157 472 262 531 138 351 242 625 142 109 630 330 815 726 455 518 75 952 582 985 432 562 82 973 857 263 594 505 825 743 99 981 567 361 512 704 711 105 328 852 213 310 533 380 35 988 897 462 291 830 446 722 392 880 46 248 142 639 105 318 734 203 298 300 915 161 355 625 617 682 828 830 ];\r\nhexp=756.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[621 566 424 26 223 971 692 223 387 865 975 931 383 15 433 324 737 131 91 294 606 149 273 390 992 232 883 106 284 406 537 904 323 960 281 898 282 973 120 668 189 94 950 572 109 382 247 197 864 338 490 470 838 762 859 829 345 93 287 629 850 823 884 173 783 165 422 416 489 541 84 677 634 33 600 94 415 847 290 630 184 779 99 373 892 310 201 589 754 487 217 604 662 452 128 444 968 549 859 456 ];\r\nhexp=502.500000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[219 259 297 334 370 405 439 472 504 535 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 ];\r\nhexp=993.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[31 926 357 528 202 296 851 153 860 437 809 481 732 41 969 860 78 513 802 976 853 243 180 658 979 923 226 893 655 966 40 37 892 748 564 93 396 415 245 255 203 54 735 935 446 55 146 523 568 947 850 420 541 29 429 519 304 655 411 310 972 450 347 863 550 262 956 945 676 200 199 231 605 933 165 50 339 662 924 906 608 773 678 500 154 106 18 457 112 428 766 436 230 464 298 779 726 605 723 753 ];\r\nhexp=679.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[597 723 364 264 281 160 462 21 490 447 258 285 226 723 649 806 203 55 963 714 466 107 7 47 680 286 567 432 654 973 49 602 47 412 865 328 571 678 700 412 477 958 49 702 32 697 859 235 103 821 300 568 280 659 966 959 944 885 742 949 857 142 551 256 905 767 935 476 445 634 239 273 943 287 326 975 335 184 209 789 356 860 356 987 518 674 946 814 558 39 762 766 181 664 21 85 431 955 912 227 ];\r\nhexp=449.250000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[225 925 374 252 927 855 926 746 49 638 404 659 898 607 605 667 512 339 290 318 335 346 905 995 664 581 285 97 107 855 492 331 131 217 935 57 71 860 802 472 849 558 482 98 164 86 117 27 425 406 344 759 751 600 753 415 181 389 511 639 595 354 970 725 570 256 133 641 467 287 464 316 844 945 765 359 31 881 385 455 286 81 565 389 680 669 803 212 409 665 851 4 19 172 728 588 779 861 580 245 ];\r\nhexp=447.562500;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 ];\r\nhexp=909.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[534 565 594 622 649 675 700 724 747 769 790 810 829 847 864 880 895 909 922 934 945 955 964 972 979 985 990 994 997 999 1000 1000 999 997 994 990 985 979 972 964 955 945 934 922 909 ];\r\nhexp=921.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n%%\r\nhin=[313 209 811 89 467 954 982 833 133 241 623 47 550 838 172 827 408 842 422 730 519 953 86 61 194 554 572 183 812 765 530 476 325 340 565 143 646 898 975 778 490 949 824 40 787 996 866 546 189 639 627 59 591 712 119 137 618 691 671 781 807 200 608 131 540 524 273 185 422 599 314 911 547 138 302 685 485 519 582 25 157 209 83 100 272 553 236 889 243 258 21 49 457 629 531 996 152 155 532 925 ];\r\nhexp=532.000000;\r\nhout=Hedge_V(hin);\r\nassert(abs(hout-hexp)\u003c2e-4)\r\n\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":28,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-06T03:35:15.000Z","updated_at":"2026-01-04T05:37:36.000Z","published_at":"2013-10-06T03:39:55.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\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHedgemony\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Large data set with N\u0026lt;=1000.\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 the Baron trims the bushes(1:N) starting with bush 2 thru the next to last bush(N-1). A bush is trimmed to the average of the adjacent bushes. If the bush is less than the adjacent average the bush is left alone. Report the final Height of the next to last bush following its trimming.\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 hin , Vector length N\u0026lt;=1000 with values between 1 and 1000.\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 hout , Final Trimmed Height of the next to last bush (accuracy \u0026lt;2e-4)\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 [hin] [hout]\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 2 3 6 7] [5.000000]\\n[5 8 9 9 9] [8.500000]\\n[1 2 2 2 2 2] [1.937500]]]\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) Best Time: 7 minutes\\n2) Solved by 27 of 32]]\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\"}]}"},{"id":44074,"title":"GJam 2017 Kickstart: Parentheses (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p2 GJam 2017 Kickstart Parentheses\u003e. This is the first 100 small cases with max L+R\u003c=20.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\r\n\r\n*Input:* [L,R], the quantity of parentheses types\r\n\r\n*Output:* [V], the maximum number of parentheses pairings\r\n\r\n*Examples:* [L,R] [V]; [3,2] [3]\r\n\r\nFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for L+R=20. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p2\"\u003eGJam 2017 Kickstart Parentheses\u003c/a\u003e. This is the first 100 small cases with max L+R\u0026lt;=20.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given L left and R right parentheses determine the maximum number of parentheses pairings.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [L,R], the quantity of parentheses types\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the maximum number of parentheses pairings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [L,R] [V]; [3,2] [3]\u003c/p\u003e\u003cp\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=20. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=parenc(L,R)\r\n% L number of Left parentheses, R number of Right parentheses \r\n% Determine maxinum number of parenthese pairings\r\n% http://code.google.com/codejam/contest/6304486/dashboard#s=p2\r\n\r\nval=0;\r\n \r\nend","test_suite":"%%\r\nv=parenc(19,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(14,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(4,15);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(8,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(14,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(10,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(10,10);\r\nassert(~isempty(v))\r\nassert(v==55)\r\n%%\r\nv=parenc(3,7);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(3,13);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(4,12);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(2,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(6,11);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(4,12);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(15,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(14,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(20,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(12,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(0,10);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(16,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(3,12);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(8,12);\r\nassert(~isempty(v))\r\nassert(v==36)\r\n%%\r\nv=parenc(8,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(1,8);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(7,13);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(7,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(11,8);\r\nassert(~isempty(v))\r\nassert(v==36)\r\n%%\r\nv=parenc(17,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(4,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(1,6);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(5,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(1,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(7,13);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(6,12);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(15,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(14,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(12,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(4,15);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(12,7);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(5,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(19,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(6,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(11,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(8,12);\r\nassert(~isempty(v))\r\nassert(v==36)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(18,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(13,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(3,6);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(6,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(3,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(19,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(9,11);\r\nassert(~isempty(v))\r\nassert(v==45)\r\n%%\r\nv=parenc(10,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(0,11);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(11,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(3,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(1,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(9,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(1,19);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(4,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(13,7);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(8,6);\r\nassert(~isempty(v))\r\nassert(v==21)\r\n%%\r\nv=parenc(7,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(16,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(16,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(7,8);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(13,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(4,14);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(7,8);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(9,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(4,7);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(12,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(10,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(17,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(4,13);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(11,1);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(10,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(7,7);\r\nassert(~isempty(v))\r\nassert(v==28)\r\n%%\r\nv=parenc(6,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(5,13);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(10,10);\r\nassert(~isempty(v))\r\nassert(v==55)\r\n%%\r\nv=parenc(14,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(8,4);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(14,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n%%\r\nv=parenc(0,20);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(0,1);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(1,10);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(13,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(0,9);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(1,17);\r\nassert(~isempty(v))\r\nassert(v==1)\r\n%%\r\nv=parenc(0,2);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(2,0);\r\nassert(~isempty(v))\r\nassert(v==0)\r\n%%\r\nv=parenc(4,12);\r\nassert(~isempty(v))\r\nassert(v==10)\r\n%%\r\nv=parenc(11,9);\r\nassert(~isempty(v))\r\nassert(v==45)\r\n%%\r\nv=parenc(18,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(15,3);\r\nassert(~isempty(v))\r\nassert(v==6)\r\n%%\r\nv=parenc(16,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(17,2);\r\nassert(~isempty(v))\r\nassert(v==3)\r\n%%\r\nv=parenc(14,5);\r\nassert(~isempty(v))\r\nassert(v==15)\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":4,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T21:52:46.000Z","updated_at":"2026-01-02T17:52:37.000Z","published_at":"2017-02-25T22:07: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/6304486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Parentheses\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 small cases with max L+R\u0026lt;=20.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given L left and R right parentheses determine the maximum number of parentheses pairings.\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 [L,R], the quantity of parentheses types\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 [V], the maximum number of parentheses pairings\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 [L,R] [V]; [3,2] [3]\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\u003eFor the case ()()(, for example, the three balanced groups are () from indexes 1 to 2, () from indexes 3 to 4, and ()() from indexes 1 to 4.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for L+R=20. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":1894,"title":"GJam 2014 China Rd A: Library Sorting (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting\u003e.  Subset of cases.\r\n\r\nThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations. \r\n\r\n*Input:* V   a vector\r\n\r\n*Output:* Vout  a sorted vector Odds Increasing/Evens Increasing\r\n\r\n*Example:*\r\n\r\nV= [-5 -12 87 2 88 20 11]\r\n\r\nVout=[-5 88 11 20 2 -12 87]\r\n\r\n\r\n*Contest Performance:*  Best Time to Complete: \u003c 10 minutes","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p2\"\u003eGJam 2014 China Sorting\u003c/a\u003e.  Subset of cases.\u003c/p\u003e\u003cp\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V   a vector\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Vout  a sorted vector Odds Increasing/Evens Increasing\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eV= [-5 -12 87 2 88 20 11]\u003c/p\u003e\u003cp\u003eVout=[-5 88 11 20 2 -12 87]\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e  Best Time to Complete: \u0026lt; 10 minutes\u003c/p\u003e","function_template":"function vout=Sort_CH(v)\r\n vout=v;\r\nend","test_suite":"%%\r\ntic\r\nv=[1 ];\r\nvexp=[1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2 1 ];\r\nvexp=[2 1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 ];\r\nvexp=[1 2 3 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 4 5 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5 2 3 4 1 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[994 994 -981 -975 -971 980 -971 976 -969 -969 968 968 958 -963 -957 948 -955 932 926 -935 924 -931 -923 -917 922 -917 -909 -899 916 914 -899 -877 -871 -871 -867 -847 912 -829 912 -825 -819 -817 910 -811 -805 -803 -801 904 -791 -783 -745 -731 902 -725 -725 -715 900 896 -707 896 -705 -705 -693 -691 882 -687 -685 -683 -671 -663 882 -663 880 880 -651 -651 -637 876 -637 -623 -613 -605 -601 -577 -577 862 -571 -565 856 848 -559 -559 -555 -553 844 -551 840 828 -547 -539 -527 812 -525 806 802 -505 -503 -497 -497 -495 798 -493 -491 -483 -481 798 770 770 -481 770 762 758 -477 -469 -463 -457 756 -455 -451 -441 -439 -431 -429 752 -427 -413 -409 742 -403 726 -391 722 -389 -385 718 -379 -365 -363 -359 712 702 -355 -351 682 -347 682 674 672 -343 672 -325 664 -319 -319 -315 -309 -297 -287 -285 -279 662 658 -277 658 656 650 -275 644 -259 -259 -259 630 -255 -251 -245 -231 -231 -225 -221 -219 -215 628 616 -213 612 -209 -209 598 -207 -203 -193 594 -191 -165 594 574 -163 -137 -129 -129 -119 -119 -119 -113 -111 572 564 560 -101 -99 -93 -91 546 -91 546 -91 542 -67 534 -63 528 -57 -55 -55 -49 -39 -37 522 -35 -31 520 -29 -25 -21 -17 -15 -11 -11 514 510 500 -9 494 -5 15 17 490 23 490 484 33 476 33 47 464 49 59 63 77 462 462 77 460 458 77 77 81 444 444 95 442 97 99 105 105 107 111 113 117 434 424 420 119 133 416 408 394 380 376 135 143 143 376 374 147 368 175 342 338 338 336 185 187 195 195 336 197 197 334 201 326 203 316 312 312 308 308 300 211 286 219 219 237 239 247 249 251 253 259 265 273 284 277 262 258 283 285 287 289 297 248 242 303 305 319 327 335 351 357 385 385 238 232 220 397 399 401 210 403 407 210 210 409 204 411 200 415 425 425 200 429 198 429 198 196 192 190 186 433 435 441 451 463 473 473 182 483 182 495 176 170 154 507 507 150 148 509 529 533 148 130 128 124 112 539 96 551 555 70 561 70 565 577 581 581 585 599 70 609 58 56 611 44 613 44 621 625 625 36 627 28 26 2 627 637 647 651 0 685 689 689 689 0 693 693 693 0 -10 -14 -40 -42 -44 697 -56 705 707 715 -56 -64 715 719 -66 -66 721 729 729 731 741 741 763 763 -74 767 775 811 815 819 827 833 -78 845 845 -80 -82 847 847 847 851 867 -84 869 869 869 871 -86 873 -98 -98 -104 875 875 879 887 911 935 -118 935 -120 949 951 965 973 975 979 -128 -132 -138 -140 -150 -154 -154 -164 -172 -174 -188 -196 -198 -200 -204 -208 -214 -216 -224 -228 -238 -242 -242 -250 -260 -260 -280 -286 -294 -296 -298 -302 -304 -308 -324 -330 -336 -336 -340 -342 -342 -344 -352 -352 -360 -360 -364 -364 -366 -368 -370 -378 -384 -384 -384 -392 -392 -396 -402 -402 -406 -410 -410 -416 -420 -420 -420 -432 -436 -440 -442 -458 -462 -470 -478 -482 -494 -500 -502 -504 -514 -520 -524 -530 -532 -534 -546 -548 -550 -550 -552 -558 -560 -566 -572 -572 -594 -598 -600 -602 -616 -626 -632 -638 -640 -650 -652 -664 -666 -676 -676 -684 -694 -700 -704 -710 -714 -720 -728 -728 -732 -738 -750 -758 -758 -776 -778 -782 -792 -794 -798 -798 -808 -810 -812 -814 -814 -818 -826 -836 -846 -856 -858 -858 -858 -860 -866 -866 -886 -892 -896 -900 -902 -906 -910 -910 -910 -924 -926 -926 -934 -938 -940 -942 -944 -946 -952 -952 -966 -966 -968 -968 -976 ];\r\nvexp=[994 994 -981 -975 -971 980 -971 976 -969 -969 968 968 958 -963 -957 948 -955 932 926 -935 924 -931 -923 -917 922 -917 -909 -899 916 914 -899 -877 -871 -871 -867 -847 912 -829 912 -825 -819 -817 910 -811 -805 -803 -801 904 -791 -783 -745 -731 902 -725 -725 -715 900 896 -707 896 -705 -705 -693 -691 882 -687 -685 -683 -671 -663 882 -663 880 880 -651 -651 -637 876 -637 -623 -613 -605 -601 -577 -577 862 -571 -565 856 848 -559 -559 -555 -553 844 -551 840 828 -547 -539 -527 812 -525 806 802 -505 -503 -497 -497 -495 798 -493 -491 -483 -481 798 770 770 -481 770 762 758 -477 -469 -463 -457 756 -455 -451 -441 -439 -431 -429 752 -427 -413 -409 742 -403 726 -391 722 -389 -385 718 -379 -365 -363 -359 712 702 -355 -351 682 -347 682 674 672 -343 672 -325 664 -319 -319 -315 -309 -297 -287 -285 -279 662 658 -277 658 656 650 -275 644 -259 -259 -259 630 -255 -251 -245 -231 -231 -225 -221 -219 -215 628 616 -213 612 -209 -209 598 -207 -203 -193 594 -191 -165 594 574 -163 -137 -129 -129 -119 -119 -119 -113 -111 572 564 560 -101 -99 -93 -91 546 -91 546 -91 542 -67 534 -63 528 -57 -55 -55 -49 -39 -37 522 -35 -31 520 -29 -25 -21 -17 -15 -11 -11 514 510 500 -9 494 -5 15 17 490 23 490 484 33 476 33 47 464 49 59 63 77 462 462 77 460 458 77 77 81 444 444 95 442 97 99 105 105 107 111 113 117 434 424 420 119 133 416 408 394 380 376 135 143 143 376 374 147 368 175 342 338 338 336 185 187 195 195 336 197 197 334 201 326 203 316 312 312 308 308 300 211 286 219 219 237 239 247 249 251 253 259 265 273 284 277 262 258 283 285 287 289 297 248 242 303 305 319 327 335 351 357 385 385 238 232 220 397 399 401 210 403 407 210 210 409 204 411 200 415 425 425 200 429 198 429 198 196 192 190 186 433 435 441 451 463 473 473 182 483 182 495 176 170 154 507 507 150 148 509 529 533 148 130 128 124 112 539 96 551 555 70 561 70 565 577 581 581 585 599 70 609 58 56 611 44 613 44 621 625 625 36 627 28 26 2 627 637 647 651 0 685 689 689 689 0 693 693 693 0 -10 -14 -40 -42 -44 697 -56 705 707 715 -56 -64 715 719 -66 -66 721 729 729 731 741 741 763 763 -74 767 775 811 815 819 827 833 -78 845 845 -80 -82 847 847 847 851 867 -84 869 869 869 871 -86 873 -98 -98 -104 875 875 879 887 911 935 -118 935 -120 949 951 965 973 975 979 -128 -132 -138 -140 -150 -154 -154 -164 -172 -174 -188 -196 -198 -200 -204 -208 -214 -216 -224 -228 -238 -242 -242 -250 -260 -260 -280 -286 -294 -296 -298 -302 -304 -308 -324 -330 -336 -336 -340 -342 -342 -344 -352 -352 -360 -360 -364 -364 -366 -368 -370 -378 -384 -384 -384 -392 -392 -396 -402 -402 -406 -410 -410 -416 -420 -420 -420 -432 -436 -440 -442 -458 -462 -470 -478 -482 -494 -500 -502 -504 -514 -520 -524 -530 -532 -534 -546 -548 -550 -550 -552 -558 -560 -566 -572 -572 -594 -598 -600 -602 -616 -626 -632 -638 -640 -650 -652 -664 -666 -676 -676 -684 -694 -700 -704 -710 -714 -720 -728 -728 -732 -738 -750 -758 -758 -776 -778 -782 -792 -794 -798 -798 -808 -810 -812 -814 -814 -818 -826 -836 -846 -856 -858 -858 -858 -860 -866 -866 -886 -892 -896 -900 -902 -906 -910 -910 -910 -924 -926 -926 -934 -938 -940 -942 -944 -946 -952 -952 -966 -966 -968 -968 -976 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-979 990 -975 -973 -971 -955 990 -953 -943 -937 -925 -921 986 -917 -913 -911 -909 984 -905 -903 -901 -897 -897 -889 -877 -875 980 968 -875 -871 -861 966 -861 -859 -855 948 942 -823 -821 -811 -805 -805 -797 -795 -793 -793 -793 938 -791 936 -781 -779 936 924 -775 -775 -767 924 920 -757 -755 914 -755 -751 -751 -749 906 -749 906 -745 -745 902 -741 902 -737 898 -735 -729 -727 894 882 868 -723 -709 862 858 858 -705 842 842 838 -693 -681 -679 838 -665 -651 -641 -629 -627 836 -627 828 -623 -623 824 -617 -585 -575 -571 -563 816 -561 -561 -559 -559 -549 808 -539 -539 -535 796 -533 -533 -527 792 -525 788 -525 -521 -517 788 -517 -511 -511 -493 756 -491 756 752 -485 -477 736 -465 -455 -453 716 -451 -441 -429 714 712 712 -427 -407 710 -399 -393 -393 -391 -385 -381 710 -379 702 700 698 -371 -371 -371 -359 -349 684 -341 672 -339 -337 -331 -319 652 636 -315 636 -315 -303 630 630 630 -301 -301 -297 -297 630 -297 -295 -291 -287 -281 624 -267 -267 624 -255 624 -247 616 -247 608 -245 -243 -241 -237 -237 -233 -231 -225 -221 -205 -201 604 -193 602 -185 602 600 -175 -167 -167 598 594 594 -163 -143 -143 588 584 -139 582 578 -133 -121 -117 -103 -95 -91 -89 -65 -65 -55 574 -49 572 -45 572 -39 572 -39 -35 -35 570 -31 -23 -19 560 -7 560 548 7 542 7 9 532 11 11 31 33 37 532 55 532 522 71 77 520 506 504 500 85 91 91 496 494 91 490 93 93 95 448 105 448 440 107 109 111 117 436 125 416 125 404 129 133 384 137 139 141 143 378 378 143 374 364 362 360 147 147 151 352 157 352 338 159 169 181 336 187 203 332 205 330 207 207 219 223 326 318 229 308 231 231 298 294 239 292 239 243 253 292 257 259 261 273 286 284 275 281 287 295 295 297 297 299 307 307 311 313 313 282 278 276 272 264 327 250 329 333 248 343 246 343 242 349 351 353 357 359 363 377 379 381 385 242 385 385 240 389 226 226 401 226 403 405 417 419 226 429 429 429 431 222 461 463 216 477 481 483 483 214 495 204 198 188 497 507 507 184 184 517 519 531 182 533 182 535 539 539 545 567 573 587 180 589 595 174 154 595 595 144 597 144 609 623 144 631 637 637 657 142 659 132 663 130 665 665 669 679 689 126 693 124 693 106 697 701 100 707 100 709 715 715 98 721 723 733 88 737 72 66 52 52 50 40 737 749 749 34 755 759 767 34 769 32 771 26 26 26 773 26 779 14 783 8 0 787 791 0 791 793 0 793 0 815 817 819 819 -10 819 819 819 821 821 823 827 -14 827 831 845 -38 859 861 -42 865 873 877 881 891 893 909 -44 -50 911 913 915 921 923 935 945 945 951 -50 -52 -54 953 -64 -66 -68 -80 959 961 -82 -84 -92 967 975 -98 -98 -106 -110 -110 -112 -122 -126 -140 -140 -144 -148 -154 -154 -154 -154 -162 -162 -168 -172 -182 -182 -204 -204 -208 -220 -220 -228 -232 -240 -248 -252 -254 -256 -256 -264 -266 -276 -280 -286 -286 -286 -294 -294 -294 -296 -300 -300 -300 -306 -310 -312 -314 -314 -320 -346 -346 -362 -362 -366 -368 -368 -370 -378 -380 -380 -384 -392 -392 -410 -410 -412 -424 -430 -430 -434 -434 -434 -436 -436 -438 -438 -442 -444 -444 -448 -462 -468 -480 -488 -494 -506 -512 -512 -518 -530 -530 -536 -536 -536 -546 -546 -548 -550 -554 -556 -560 -560 -578 -580 -590 -590 -596 -596 -598 -598 -610 -612 -616 -616 -618 -626 -630 -634 -636 -638 -640 -642 -644 -644 -644 -648 -652 -654 -664 -674 -674 -686 -698 -700 -702 -708 -714 -714 -716 -718 -722 -726 -728 -728 -740 -742 -744 -750 -752 -756 -762 -766 -766 -768 -770 -770 -770 -778 -778 -780 -782 -786 -786 -792 -792 -798 -806 -810 -812 -820 -828 -844 -858 -858 -858 -860 -872 -874 -880 -882 -882 -888 -888 -890 -896 -902 -910 -912 -924 -924 -936 -938 -956 -956 -968 -980 -980 -980 -982 -988 -990 -994 -996 -998 ];\r\nvexp=[-979 990 -975 -973 -971 -955 990 -953 -943 -937 -925 -921 986 -917 -913 -911 -909 984 -905 -903 -901 -897 -897 -889 -877 -875 980 968 -875 -871 -861 966 -861 -859 -855 948 942 -823 -821 -811 -805 -805 -797 -795 -793 -793 -793 938 -791 936 -781 -779 936 924 -775 -775 -767 924 920 -757 -755 914 -755 -751 -751 -749 906 -749 906 -745 -745 902 -741 902 -737 898 -735 -729 -727 894 882 868 -723 -709 862 858 858 -705 842 842 838 -693 -681 -679 838 -665 -651 -641 -629 -627 836 -627 828 -623 -623 824 -617 -585 -575 -571 -563 816 -561 -561 -559 -559 -549 808 -539 -539 -535 796 -533 -533 -527 792 -525 788 -525 -521 -517 788 -517 -511 -511 -493 756 -491 756 752 -485 -477 736 -465 -455 -453 716 -451 -441 -429 714 712 712 -427 -407 710 -399 -393 -393 -391 -385 -381 710 -379 702 700 698 -371 -371 -371 -359 -349 684 -341 672 -339 -337 -331 -319 652 636 -315 636 -315 -303 630 630 630 -301 -301 -297 -297 630 -297 -295 -291 -287 -281 624 -267 -267 624 -255 624 -247 616 -247 608 -245 -243 -241 -237 -237 -233 -231 -225 -221 -205 -201 604 -193 602 -185 602 600 -175 -167 -167 598 594 594 -163 -143 -143 588 584 -139 582 578 -133 -121 -117 -103 -95 -91 -89 -65 -65 -55 574 -49 572 -45 572 -39 572 -39 -35 -35 570 -31 -23 -19 560 -7 560 548 7 542 7 9 532 11 11 31 33 37 532 55 532 522 71 77 520 506 504 500 85 91 91 496 494 91 490 93 93 95 448 105 448 440 107 109 111 117 436 125 416 125 404 129 133 384 137 139 141 143 378 378 143 374 364 362 360 147 147 151 352 157 352 338 159 169 181 336 187 203 332 205 330 207 207 219 223 326 318 229 308 231 231 298 294 239 292 239 243 253 292 257 259 261 273 286 284 275 281 287 295 295 297 297 299 307 307 311 313 313 282 278 276 272 264 327 250 329 333 248 343 246 343 242 349 351 353 357 359 363 377 379 381 385 242 385 385 240 389 226 226 401 226 403 405 417 419 226 429 429 429 431 222 461 463 216 477 481 483 483 214 495 204 198 188 497 507 507 184 184 517 519 531 182 533 182 535 539 539 545 567 573 587 180 589 595 174 154 595 595 144 597 144 609 623 144 631 637 637 657 142 659 132 663 130 665 665 669 679 689 126 693 124 693 106 697 701 100 707 100 709 715 715 98 721 723 733 88 737 72 66 52 52 50 40 737 749 749 34 755 759 767 34 769 32 771 26 26 26 773 26 779 14 783 8 0 787 791 0 791 793 0 793 0 815 817 819 819 -10 819 819 819 821 821 823 827 -14 827 831 845 -38 859 861 -42 865 873 877 881 891 893 909 -44 -50 911 913 915 921 923 935 945 945 951 -50 -52 -54 953 -64 -66 -68 -80 959 961 -82 -84 -92 967 975 -98 -98 -106 -110 -110 -112 -122 -126 -140 -140 -144 -148 -154 -154 -154 -154 -162 -162 -168 -172 -182 -182 -204 -204 -208 -220 -220 -228 -232 -240 -248 -252 -254 -256 -256 -264 -266 -276 -280 -286 -286 -286 -294 -294 -294 -296 -300 -300 -300 -306 -310 -312 -314 -314 -320 -346 -346 -362 -362 -366 -368 -368 -370 -378 -380 -380 -384 -392 -392 -410 -410 -412 -424 -430 -430 -434 -434 -434 -436 -436 -438 -438 -442 -444 -444 -448 -462 -468 -480 -488 -494 -506 -512 -512 -518 -530 -530 -536 -536 -536 -546 -546 -548 -550 -554 -556 -560 -560 -578 -580 -590 -590 -596 -596 -598 -598 -610 -612 -616 -616 -618 -626 -630 -634 -636 -638 -640 -642 -644 -644 -644 -648 -652 -654 -664 -674 -674 -686 -698 -700 -702 -708 -714 -714 -716 -718 -722 -726 -728 -728 -740 -742 -744 -750 -752 -756 -762 -766 -766 -768 -770 -770 -770 -778 -778 -780 -782 -786 -786 -792 -792 -798 -806 -810 -812 -820 -828 -844 -858 -858 -858 -860 -872 -874 -880 -882 -882 -888 -888 -890 -896 -902 -910 -912 -924 -924 -936 -938 -956 -956 -968 -980 -980 -980 -982 -988 -990 -994 -996 -998 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-999 968 -991 -983 -977 -975 -973 952 -945 -935 -931 -919 -915 -905 -903 -885 -861 -847 940 -847 -841 938 -825 -821 -811 -809 936 924 902 -791 -779 -771 -767 884 884 880 -757 -735 -735 -717 -717 -715 -715 878 876 -699 -689 -665 -655 -655 -651 -581 -577 -567 -559 -555 -549 -547 -539 858 840 -515 -513 -507 -505 832 804 -477 -473 -467 -457 -443 802 -441 796 -407 -403 -389 792 -385 780 774 -383 -377 -325 -303 770 770 754 -281 742 -257 724 -251 -249 -237 -233 -227 -217 -211 -203 -195 712 704 -179 -177 -147 -119 -99 -77 -57 -49 700 682 670 -49 -39 -35 646 -31 640 -27 624 -5 15 23 31 620 33 588 580 35 53 578 65 560 65 67 71 75 77 79 546 522 506 91 95 103 504 109 117 119 121 478 125 143 145 155 462 163 165 167 175 458 456 454 452 181 189 195 215 229 231 231 257 448 257 448 265 273 432 283 420 325 341 408 343 365 365 397 399 399 411 415 423 423 429 386 435 382 380 437 443 364 364 455 467 364 354 479 330 495 505 505 306 537 539 278 561 563 567 567 573 595 619 258 623 625 647 665 693 699 713 719 721 258 733 737 749 757 819 252 839 238 853 855 224 863 867 871 182 883 893 897 182 182 903 176 150 903 913 136 919 931 933 128 965 967 118 975 993 108 102 98 88 60 42 30 18 14 12 -2 -10 -22 -22 -44 -48 -52 -52 -60 -70 -82 -88 -88 -110 -112 -116 -124 -130 -130 -132 -156 -174 -184 -204 -206 -210 -232 -234 -242 -252 -254 -264 -316 -330 -332 -338 -342 -348 -352 -354 -360 -364 -370 -372 -376 -380 -408 -428 -452 -462 -462 -462 -482 -486 -496 -506 -510 -516 -524 -526 -528 -532 -542 -572 -592 -604 -606 -624 -636 -642 -662 -670 -686 -686 -706 -728 -728 -736 -776 -788 -792 -792 -798 -804 -840 -902 -904 -910 -918 -952 -962 -962 -968 -978 -990 -994 -998 ];\r\nvexp=[-999 968 -991 -983 -977 -975 -973 952 -945 -935 -931 -919 -915 -905 -903 -885 -861 -847 940 -847 -841 938 -825 -821 -811 -809 936 924 902 -791 -779 -771 -767 884 884 880 -757 -735 -735 -717 -717 -715 -715 878 876 -699 -689 -665 -655 -655 -651 -581 -577 -567 -559 -555 -549 -547 -539 858 840 -515 -513 -507 -505 832 804 -477 -473 -467 -457 -443 802 -441 796 -407 -403 -389 792 -385 780 774 -383 -377 -325 -303 770 770 754 -281 742 -257 724 -251 -249 -237 -233 -227 -217 -211 -203 -195 712 704 -179 -177 -147 -119 -99 -77 -57 -49 700 682 670 -49 -39 -35 646 -31 640 -27 624 -5 15 23 31 620 33 588 580 35 53 578 65 560 65 67 71 75 77 79 546 522 506 91 95 103 504 109 117 119 121 478 125 143 145 155 462 163 165 167 175 458 456 454 452 181 189 195 215 229 231 231 257 448 257 448 265 273 432 283 420 325 341 408 343 365 365 397 399 399 411 415 423 423 429 386 435 382 380 437 443 364 364 455 467 364 354 479 330 495 505 505 306 537 539 278 561 563 567 567 573 595 619 258 623 625 647 665 693 699 713 719 721 258 733 737 749 757 819 252 839 238 853 855 224 863 867 871 182 883 893 897 182 182 903 176 150 903 913 136 919 931 933 128 965 967 118 975 993 108 102 98 88 60 42 30 18 14 12 -2 -10 -22 -22 -44 -48 -52 -52 -60 -70 -82 -88 -88 -110 -112 -116 -124 -130 -130 -132 -156 -174 -184 -204 -206 -210 -232 -234 -242 -252 -254 -264 -316 -330 -332 -338 -342 -348 -352 -354 -360 -364 -370 -372 -376 -380 -408 -428 -452 -462 -462 -462 -482 -486 -496 -506 -510 -516 -524 -526 -528 -532 -542 -572 -592 -604 -606 -624 -636 -642 -662 -670 -686 -686 -706 -728 -728 -736 -776 -788 -792 -792 -798 -804 -840 -902 -904 -910 -918 -952 -962 -962 -968 -978 -990 -994 -998 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[984 -997 -985 980 -983 978 -971 968 966 958 -969 952 -969 950 -963 944 -957 -955 936 -949 936 -949 -941 926 -935 -931 -917 -913 -913 -907 -903 -891 -861 924 922 918 916 912 902 894 -849 -847 -845 884 -837 878 878 -833 -827 876 862 836 834 832 822 822 -817 -809 -805 -803 -797 -791 804 786 784 -785 -773 778 -773 -763 -749 -749 -745 776 -741 -737 770 -737 -737 -735 -735 -731 -725 770 -723 -707 768 768 -707 762 760 -693 -683 -669 -667 750 746 740 -661 -649 -639 -637 -635 -609 730 728 -603 -595 728 -593 -589 -589 -585 -581 -581 728 -577 -567 -561 -547 724 -541 -539 -539 -539 -527 -525 -523 716 -517 -517 -515 714 702 702 676 -513 -487 -475 -471 672 -469 660 -467 652 -467 -467 634 632 -461 -457 -455 624 -455 -453 -451 624 618 -441 618 614 604 -439 -427 -413 -413 -409 -399 600 -399 594 -397 -387 594 -383 586 582 -377 580 580 -365 -359 -343 -337 578 -329 -327 -325 -323 -323 -315 -313 -301 -293 576 -275 576 572 572 572 -275 572 564 -273 -269 -259 560 -249 -249 560 -233 -233 552 -231 550 -219 -215 -215 -203 -197 -191 -189 -171 -169 -169 -163 -161 -159 -157 546 -155 -153 546 -151 -147 540 -147 -143 -143 -133 -131 -109 -109 -105 518 -105 -99 -99 -99 -99 -75 508 -73 -67 -63 -59 -55 508 -51 -39 -35 -35 506 504 -33 500 -21 -7 496 -7 3 7 11 11 486 482 11 13 15 27 33 35 35 37 37 41 53 55 65 65 77 97 101 113 117 121 476 125 129 472 133 135 468 143 143 151 462 151 151 167 462 462 167 167 167 169 462 189 189 191 193 460 193 195 207 215 217 221 225 225 231 239 460 239 249 448 446 253 265 265 273 283 442 297 299 301 440 307 311 436 436 434 319 325 331 428 418 331 416 333 339 339 349 416 349 359 359 363 363 363 377 385 395 399 399 403 407 417 408 423 431 435 402 400 445 451 453 396 465 467 386 374 364 477 481 364 497 507 507 511 360 511 511 523 531 551 569 577 344 583 587 340 589 330 318 316 595 312 609 310 310 609 609 611 611 611 615 619 621 623 631 637 308 284 284 278 272 272 262 254 641 651 667 252 252 244 669 671 683 242 685 242 234 234 689 234 693 228 693 701 713 224 220 214 713 715 721 725 212 733 735 735 735 210 206 206 737 741 741 198 196 745 753 763 767 196 771 196 188 186 184 182 771 182 783 789 803 811 817 817 823 835 837 839 182 839 841 847 849 853 182 853 861 182 180 865 869 873 875 879 180 176 881 881 891 897 176 174 172 172 897 897 911 921 923 160 156 923 152 144 144 931 943 138 134 122 118 114 112 949 112 949 112 949 953 959 959 959 961 961 104 971 92 90 88 975 979 991 993 80 78 72 72 70 70 66 58 46 40 36 28 28 14 10 2 0 0 0 0 0 -2 -10 -22 -28 -32 -40 -40 -44 -54 -54 -66 -76 -78 -82 -84 -94 -110 -126 -134 -140 -146 -148 -154 -154 -162 -166 -168 -174 -182 -182 -184 -196 -196 -202 -202 -204 -206 -206 -208 -216 -220 -220 -232 -234 -242 -244 -254 -270 -286 -286 -288 -292 -294 -300 -306 -314 -322 -328 -336 -336 -340 -352 -360 -366 -368 -368 -374 -378 -392 -396 -396 -396 -396 -404 -404 -408 -416 -420 -422 -422 -424 -424 -426 -426 -432 -434 -436 -440 -440 -442 -444 -448 -448 -450 -460 -462 -464 -472 -474 -476 -480 -494 -494 -504 -506 -514 -516 -520 -520 -542 -542 -562 -564 -564 -572 -572 -572 -574 -584 -590 -590 -594 -600 -608 -616 -616 -616 -618 -622 -624 -626 -628 -654 -656 -664 -664 -676 -680 -682 -686 -700 -700 -702 -704 -704 -712 -722 -728 -728 -728 -730 -742 -742 -758 -768 -770 -778 -780 -780 -780 -782 -782 -784 -784 -786 -790 -792 -792 -812 -816 -818 -822 -834 -856 -858 -858 -866 -870 -870 -876 -880 -884 -886 -894 -902 -916 -916 -918 -918 -924 -924 -926 -926 -928 -936 -940 -948 -952 -952 -956 -962 -966 -966 -968 -976 -988 -988 -990 -992 -998 ];\r\nvexp=[984 -997 -985 980 -983 978 -971 968 966 958 -969 952 -969 950 -963 944 -957 -955 936 -949 936 -949 -941 926 -935 -931 -917 -913 -913 -907 -903 -891 -861 924 922 918 916 912 902 894 -849 -847 -845 884 -837 878 878 -833 -827 876 862 836 834 832 822 822 -817 -809 -805 -803 -797 -791 804 786 784 -785 -773 778 -773 -763 -749 -749 -745 776 -741 -737 770 -737 -737 -735 -735 -731 -725 770 -723 -707 768 768 -707 762 760 -693 -683 -669 -667 750 746 740 -661 -649 -639 -637 -635 -609 730 728 -603 -595 728 -593 -589 -589 -585 -581 -581 728 -577 -567 -561 -547 724 -541 -539 -539 -539 -527 -525 -523 716 -517 -517 -515 714 702 702 676 -513 -487 -475 -471 672 -469 660 -467 652 -467 -467 634 632 -461 -457 -455 624 -455 -453 -451 624 618 -441 618 614 604 -439 -427 -413 -413 -409 -399 600 -399 594 -397 -387 594 -383 586 582 -377 580 580 -365 -359 -343 -337 578 -329 -327 -325 -323 -323 -315 -313 -301 -293 576 -275 576 572 572 572 -275 572 564 -273 -269 -259 560 -249 -249 560 -233 -233 552 -231 550 -219 -215 -215 -203 -197 -191 -189 -171 -169 -169 -163 -161 -159 -157 546 -155 -153 546 -151 -147 540 -147 -143 -143 -133 -131 -109 -109 -105 518 -105 -99 -99 -99 -99 -75 508 -73 -67 -63 -59 -55 508 -51 -39 -35 -35 506 504 -33 500 -21 -7 496 -7 3 7 11 11 486 482 11 13 15 27 33 35 35 37 37 41 53 55 65 65 77 97 101 113 117 121 476 125 129 472 133 135 468 143 143 151 462 151 151 167 462 462 167 167 167 169 462 189 189 191 193 460 193 195 207 215 217 221 225 225 231 239 460 239 249 448 446 253 265 265 273 283 442 297 299 301 440 307 311 436 436 434 319 325 331 428 418 331 416 333 339 339 349 416 349 359 359 363 363 363 377 385 395 399 399 403 407 417 408 423 431 435 402 400 445 451 453 396 465 467 386 374 364 477 481 364 497 507 507 511 360 511 511 523 531 551 569 577 344 583 587 340 589 330 318 316 595 312 609 310 310 609 609 611 611 611 615 619 621 623 631 637 308 284 284 278 272 272 262 254 641 651 667 252 252 244 669 671 683 242 685 242 234 234 689 234 693 228 693 701 713 224 220 214 713 715 721 725 212 733 735 735 735 210 206 206 737 741 741 198 196 745 753 763 767 196 771 196 188 186 184 182 771 182 783 789 803 811 817 817 823 835 837 839 182 839 841 847 849 853 182 853 861 182 180 865 869 873 875 879 180 176 881 881 891 897 176 174 172 172 897 897 911 921 923 160 156 923 152 144 144 931 943 138 134 122 118 114 112 949 112 949 112 949 953 959 959 959 961 961 104 971 92 90 88 975 979 991 993 80 78 72 72 70 70 66 58 46 40 36 28 28 14 10 2 0 0 0 0 0 -2 -10 -22 -28 -32 -40 -40 -44 -54 -54 -66 -76 -78 -82 -84 -94 -110 -126 -134 -140 -146 -148 -154 -154 -162 -166 -168 -174 -182 -182 -184 -196 -196 -202 -202 -204 -206 -206 -208 -216 -220 -220 -232 -234 -242 -244 -254 -270 -286 -286 -288 -292 -294 -300 -306 -314 -322 -328 -336 -336 -340 -352 -360 -366 -368 -368 -374 -378 -392 -396 -396 -396 -396 -404 -404 -408 -416 -420 -422 -422 -424 -424 -426 -426 -432 -434 -436 -440 -440 -442 -444 -448 -448 -450 -460 -462 -464 -472 -474 -476 -480 -494 -494 -504 -506 -514 -516 -520 -520 -542 -542 -562 -564 -564 -572 -572 -572 -574 -584 -590 -590 -594 -600 -608 -616 -616 -616 -618 -622 -624 -626 -628 -654 -656 -664 -664 -676 -680 -682 -686 -700 -700 -702 -704 -704 -712 -722 -728 -728 -728 -730 -742 -742 -758 -768 -770 -778 -780 -780 -780 -782 -782 -784 -784 -786 -790 -792 -792 -812 -816 -818 -822 -834 -856 -858 -858 -866 -870 -870 -876 -880 -884 -886 -894 -902 -916 -916 -918 -918 -924 -924 -926 -926 -928 -936 -940 -948 -952 -952 -956 -962 -966 -966 -968 -976 -988 -988 -990 -992 -998 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-891 962 792 -851 784 730 -789 -781 662 662 -765 -737 -713 644 -567 -525 -465 534 -451 526 454 -427 -399 -173 -15 454 -1 77 378 175 202 185 170 275 313 367 82 407 459 473 507 621 691 707 731 805 825 935 981 52 48 46 -10 -66 -162 -168 -192 -196 -218 -232 -262 -280 -288 -332 -358 -402 -438 -448 -490 -502 -516 -572 -590 -598 -832 -834 ];\r\nvexp=[-891 962 792 -851 784 730 -789 -781 662 662 -765 -737 -713 644 -567 -525 -465 534 -451 526 454 -427 -399 -173 -15 454 -1 77 378 175 202 185 170 275 313 367 82 407 459 473 507 621 691 707 731 805 825 935 981 52 48 46 -10 -66 -162 -168 -192 -196 -218 -232 -262 -280 -288 -332 -358 -402 -438 -448 -490 -502 -516 -572 -590 -598 -832 -834 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[990 988 -999 -995 -993 -993 -991 976 970 958 -989 -973 946 -965 -963 -957 -957 -941 938 -939 -937 -937 -913 -907 -901 938 938 924 -901 -893 924 -891 -889 918 -869 912 910 -869 -869 -845 -827 -811 -793 -741 906 868 -715 -715 844 836 -711 -709 812 -693 -693 -687 -665 808 786 774 -665 -663 -663 -615 -603 -593 -589 770 762 -587 756 -585 -581 -565 -565 -561 -555 -555 -553 -541 706 704 -539 -505 694 -503 -493 -455 -451 672 -427 -399 670 -385 658 -373 -359 656 -339 -335 654 -333 -327 636 -325 -313 -297 -297 -273 616 -263 -253 614 -251 604 590 -219 -209 550 -207 -203 -187 -185 -181 -177 -167 -159 546 -157 -145 -137 544 -135 -105 -77 -71 -67 -65 -41 540 -39 532 528 -37 526 -33 -31 -23 -21 -13 524 11 15 19 520 506 27 37 41 43 494 77 488 89 101 105 127 486 129 131 472 468 458 133 133 139 450 139 171 171 428 175 428 189 203 219 410 237 251 396 255 265 271 273 273 273 293 392 297 376 299 301 315 315 351 373 374 377 377 379 385 387 389 397 407 374 368 409 411 425 433 439 449 451 481 507 535 342 537 553 338 338 575 322 312 577 577 581 583 585 308 306 603 292 264 619 248 242 228 224 623 637 645 220 661 663 208 671 681 204 186 693 693 701 719 721 178 170 737 749 154 763 154 767 154 769 789 154 144 142 130 793 793 795 803 803 805 815 817 819 821 120 823 120 825 86 86 78 74 72 825 62 839 841 861 861 861 873 875 56 875 42 897 935 935 949 12 949 955 955 8 975 979 0 0 0 0 0 -52 -56 -60 -70 -70 -72 -94 -96 -98 -110 -110 -114 -116 -126 -126 -136 -158 -160 -176 -178 -182 -188 -196 -200 -206 -208 -208 -222 -224 -228 -276 -278 -296 -302 -316 -318 -324 -334 -346 -350 -350 -358 -364 -368 -370 -378 -378 -378 -386 -404 -416 -416 -418 -420 -432 -448 -462 -480 -482 -490 -502 -514 -516 -520 -546 -546 -546 -550 -564 -570 -570 -572 -574 -580 -600 -602 -624 -626 -626 -634 -650 -658 -658 -662 -686 -712 -716 -720 -726 -730 -732 -756 -756 -770 -780 -790 -798 -802 -824 -836 -882 -894 -906 -914 -914 -932 -950 -952 -966 -968 -978 -978 -990 -990 ];\r\nvexp=[990 988 -999 -995 -993 -993 -991 976 970 958 -989 -973 946 -965 -963 -957 -957 -941 938 -939 -937 -937 -913 -907 -901 938 938 924 -901 -893 924 -891 -889 918 -869 912 910 -869 -869 -845 -827 -811 -793 -741 906 868 -715 -715 844 836 -711 -709 812 -693 -693 -687 -665 808 786 774 -665 -663 -663 -615 -603 -593 -589 770 762 -587 756 -585 -581 -565 -565 -561 -555 -555 -553 -541 706 704 -539 -505 694 -503 -493 -455 -451 672 -427 -399 670 -385 658 -373 -359 656 -339 -335 654 -333 -327 636 -325 -313 -297 -297 -273 616 -263 -253 614 -251 604 590 -219 -209 550 -207 -203 -187 -185 -181 -177 -167 -159 546 -157 -145 -137 544 -135 -105 -77 -71 -67 -65 -41 540 -39 532 528 -37 526 -33 -31 -23 -21 -13 524 11 15 19 520 506 27 37 41 43 494 77 488 89 101 105 127 486 129 131 472 468 458 133 133 139 450 139 171 171 428 175 428 189 203 219 410 237 251 396 255 265 271 273 273 273 293 392 297 376 299 301 315 315 351 373 374 377 377 379 385 387 389 397 407 374 368 409 411 425 433 439 449 451 481 507 535 342 537 553 338 338 575 322 312 577 577 581 583 585 308 306 603 292 264 619 248 242 228 224 623 637 645 220 661 663 208 671 681 204 186 693 693 701 719 721 178 170 737 749 154 763 154 767 154 769 789 154 144 142 130 793 793 795 803 803 805 815 817 819 821 120 823 120 825 86 86 78 74 72 825 62 839 841 861 861 861 873 875 56 875 42 897 935 935 949 12 949 955 955 8 975 979 0 0 0 0 0 -52 -56 -60 -70 -70 -72 -94 -96 -98 -110 -110 -114 -116 -126 -126 -136 -158 -160 -176 -178 -182 -188 -196 -200 -206 -208 -208 -222 -224 -228 -276 -278 -296 -302 -316 -318 -324 -334 -346 -350 -350 -358 -364 -368 -370 -378 -378 -378 -386 -404 -416 -416 -418 -420 -432 -448 -462 -480 -482 -490 -502 -514 -516 -520 -546 -546 -546 -550 -564 -570 -570 -572 -574 -580 -600 -602 -624 -626 -626 -634 -650 -658 -658 -662 -686 -712 -716 -720 -726 -730 -732 -756 -756 -770 -780 -790 -798 -802 -824 -836 -882 -894 -906 -914 -914 -932 -950 -952 -966 -968 -978 -978 -990 -990 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-997 -995 994 -981 -977 -975 -971 988 -969 -931 -929 986 968 -903 -903 956 -897 -895 -887 -883 948 -879 -871 -871 -865 -863 946 -863 -861 -861 944 -853 934 924 -853 914 914 -847 -845 910 -829 898 -819 890 -807 -807 888 880 -803 -797 880 874 868 -793 860 842 -791 -783 840 -771 838 -767 -765 832 826 -763 826 -759 814 -759 -753 -733 812 -733 -729 -727 -727 -723 804 -715 802 -715 -707 798 -693 -671 -669 -669 -665 792 -663 -663 -663 -663 790 -653 -643 -635 -615 778 774 770 752 -611 -587 -579 746 -569 -569 -561 740 -555 -555 -553 -539 740 -537 -523 728 -517 -513 -509 -505 -497 -497 -493 -483 728 -479 -479 -475 -475 -467 722 722 -439 -431 -429 -425 706 -413 -407 704 702 690 678 676 -407 674 -393 -385 -385 672 670 -385 664 -383 -377 -371 -367 -355 -353 -353 -351 -347 658 -345 656 -327 652 -325 -323 650 616 -319 -315 616 604 602 602 -315 596 594 -313 572 572 566 -311 562 -295 -287 -285 -285 -275 -273 -273 -271 -261 -259 -259 -253 -249 550 -239 542 538 530 -233 -231 -231 -231 526 -217 520 -203 518 -189 518 -187 -183 516 -177 510 508 506 -173 -171 -145 506 504 504 -143 -143 494 492 482 -133 -129 478 474 -129 -125 -113 -111 -99 -93 -91 -81 472 -81 -77 -75 -63 -53 -45 -39 468 462 -39 -39 -13 7 9 13 21 23 35 43 452 43 450 49 49 51 55 67 71 448 73 77 77 81 91 446 93 97 101 105 115 119 121 125 428 151 422 151 171 173 181 187 420 189 195 410 400 392 197 207 211 211 392 221 221 376 376 223 225 364 229 231 231 342 235 241 340 241 336 332 245 326 247 253 322 253 312 255 308 261 269 306 279 291 286 309 286 315 323 266 258 323 329 341 343 256 347 357 379 381 385 397 401 403 403 407 421 427 244 427 429 242 429 433 433 238 433 437 441 234 220 208 443 208 196 451 455 459 467 469 186 182 178 469 475 483 483 505 511 513 539 539 557 559 561 565 168 168 567 166 156 575 156 585 593 154 150 593 148 144 136 130 595 597 597 609 613 617 120 633 637 639 647 661 671 118 114 112 679 110 679 679 110 681 683 687 106 98 98 693 693 695 98 76 699 72 699 713 715 721 64 727 62 731 733 62 56 735 739 741 745 52 749 749 52 28 22 20 759 14 759 763 8 763 765 767 8 6 4 0 0 0 0 0 0 767 767 785 791 801 -2 803 805 -8 -22 819 -24 825 833 -40 839 845 -44 847 847 847 -60 847 865 -64 865 871 909 -84 913 913 915 -84 919 -108 923 -110 929 933 933 -112 939 -114 949 963 965 -142 967 969 973 -144 -150 -156 981 983 987 989 993 995 995 -156 -164 -170 -174 -182 -188 -188 -208 -220 -240 -244 -252 -254 -262 -264 -268 -274 -280 -284 -286 -294 -318 -322 -330 -336 -338 -348 -350 -350 -356 -358 -370 -374 -384 -422 -422 -428 -432 -434 -434 -436 -436 -438 -440 -440 -458 -476 -476 -478 -482 -494 -494 -504 -504 -504 -506 -508 -512 -524 -526 -526 -528 -530 -532 -536 -538 -562 -564 -566 -570 -574 -580 -582 -592 -596 -596 -612 -614 -614 -616 -616 -618 -620 -620 -630 -632 -636 -642 -646 -648 -652 -656 -658 -658 -660 -664 -672 -672 -672 -690 -694 -714 -716 -730 -742 -748 -750 -768 -770 -770 -774 -778 -790 -794 -798 -806 -808 -812 -814 -822 -826 -830 -850 -858 -858 -878 -888 -892 -896 -900 -906 -910 -910 -910 -912 -922 -922 -926 -928 -950 -952 -976 -986 -986 ];\r\nvexp=[-997 -995 994 -981 -977 -975 -971 988 -969 -931 -929 986 968 -903 -903 956 -897 -895 -887 -883 948 -879 -871 -871 -865 -863 946 -863 -861 -861 944 -853 934 924 -853 914 914 -847 -845 910 -829 898 -819 890 -807 -807 888 880 -803 -797 880 874 868 -793 860 842 -791 -783 840 -771 838 -767 -765 832 826 -763 826 -759 814 -759 -753 -733 812 -733 -729 -727 -727 -723 804 -715 802 -715 -707 798 -693 -671 -669 -669 -665 792 -663 -663 -663 -663 790 -653 -643 -635 -615 778 774 770 752 -611 -587 -579 746 -569 -569 -561 740 -555 -555 -553 -539 740 -537 -523 728 -517 -513 -509 -505 -497 -497 -493 -483 728 -479 -479 -475 -475 -467 722 722 -439 -431 -429 -425 706 -413 -407 704 702 690 678 676 -407 674 -393 -385 -385 672 670 -385 664 -383 -377 -371 -367 -355 -353 -353 -351 -347 658 -345 656 -327 652 -325 -323 650 616 -319 -315 616 604 602 602 -315 596 594 -313 572 572 566 -311 562 -295 -287 -285 -285 -275 -273 -273 -271 -261 -259 -259 -253 -249 550 -239 542 538 530 -233 -231 -231 -231 526 -217 520 -203 518 -189 518 -187 -183 516 -177 510 508 506 -173 -171 -145 506 504 504 -143 -143 494 492 482 -133 -129 478 474 -129 -125 -113 -111 -99 -93 -91 -81 472 -81 -77 -75 -63 -53 -45 -39 468 462 -39 -39 -13 7 9 13 21 23 35 43 452 43 450 49 49 51 55 67 71 448 73 77 77 81 91 446 93 97 101 105 115 119 121 125 428 151 422 151 171 173 181 187 420 189 195 410 400 392 197 207 211 211 392 221 221 376 376 223 225 364 229 231 231 342 235 241 340 241 336 332 245 326 247 253 322 253 312 255 308 261 269 306 279 291 286 309 286 315 323 266 258 323 329 341 343 256 347 357 379 381 385 397 401 403 403 407 421 427 244 427 429 242 429 433 433 238 433 437 441 234 220 208 443 208 196 451 455 459 467 469 186 182 178 469 475 483 483 505 511 513 539 539 557 559 561 565 168 168 567 166 156 575 156 585 593 154 150 593 148 144 136 130 595 597 597 609 613 617 120 633 637 639 647 661 671 118 114 112 679 110 679 679 110 681 683 687 106 98 98 693 693 695 98 76 699 72 699 713 715 721 64 727 62 731 733 62 56 735 739 741 745 52 749 749 52 28 22 20 759 14 759 763 8 763 765 767 8 6 4 0 0 0 0 0 0 767 767 785 791 801 -2 803 805 -8 -22 819 -24 825 833 -40 839 845 -44 847 847 847 -60 847 865 -64 865 871 909 -84 913 913 915 -84 919 -108 923 -110 929 933 933 -112 939 -114 949 963 965 -142 967 969 973 -144 -150 -156 981 983 987 989 993 995 995 -156 -164 -170 -174 -182 -188 -188 -208 -220 -240 -244 -252 -254 -262 -264 -268 -274 -280 -284 -286 -294 -318 -322 -330 -336 -338 -348 -350 -350 -356 -358 -370 -374 -384 -422 -422 -428 -432 -434 -434 -436 -436 -438 -440 -440 -458 -476 -476 -478 -482 -494 -494 -504 -504 -504 -506 -508 -512 -524 -526 -526 -528 -530 -532 -536 -538 -562 -564 -566 -570 -574 -580 -582 -592 -596 -596 -612 -614 -614 -616 -616 -618 -620 -620 -630 -632 -636 -642 -646 -648 -652 -656 -658 -658 -660 -664 -672 -672 -672 -690 -694 -714 -716 -730 -742 -748 -750 -768 -770 -770 -774 -778 -790 -794 -798 -806 -808 -812 -814 -822 -826 -830 -850 -858 -858 -878 -888 -892 -896 -900 -906 -910 -910 -910 -912 -922 -922 -926 -928 -950 -952 -976 -986 -986 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-999 -993 -987 -983 -979 998 -975 -975 -973 994 -953 -951 -949 -947 -943 -935 -925 -923 -919 994 -919 -909 -901 986 970 970 966 -897 962 -897 952 -891 950 -885 938 -885 -877 924 916 -869 916 916 906 906 -855 -847 902 -845 -825 -819 898 -819 -815 -813 -813 -805 -803 -799 -797 892 -793 888 -791 -781 884 -779 878 -777 876 -773 -763 -763 872 870 -759 -757 870 862 -753 -749 -747 858 -745 854 -741 -737 -737 -735 -731 -727 -727 -721 -715 854 -715 -713 836 -711 -709 -709 -699 832 824 -693 -689 -689 822 818 816 -689 -689 -687 -683 -679 -677 812 -671 -671 802 -667 798 798 796 786 -667 -643 784 -637 -637 784 -637 -637 782 774 -635 -627 -615 -611 -609 -595 770 -595 766 -585 760 758 754 -573 -559 -559 -547 -531 744 -517 -517 -515 -511 744 -505 738 -495 -493 738 -455 -455 -439 738 -439 -435 734 -431 734 -429 -423 728 728 728 -411 -407 728 -403 -403 728 -401 706 -401 704 -395 -389 700 -385 700 -375 694 -375 -373 -369 692 -359 -351 -351 -341 -337 -335 -329 -327 -309 -301 -297 -297 -295 -289 686 -285 676 -281 -275 -273 674 670 668 -253 658 -253 -247 656 -241 -237 650 -235 -235 648 -227 644 644 -223 -221 -211 -209 638 626 -195 -189 -175 -169 624 624 622 -163 616 -155 -155 616 602 -143 -143 -137 -115 -99 -99 -95 -91 -89 594 -85 -75 -73 -63 -55 592 -49 592 572 -39 -37 572 570 -33 -23 568 -21 -3 564 -1 564 -1 562 560 558 -1 546 13 13 542 19 27 31 49 532 69 77 83 528 85 91 91 97 101 105 498 119 125 127 498 129 131 137 139 143 145 149 151 165 494 165 169 175 195 201 490 203 209 486 484 211 211 480 217 221 225 476 231 239 239 239 472 464 239 245 253 464 259 462 259 462 273 462 273 279 287 287 291 291 307 311 462 313 317 319 321 325 331 341 343 351 359 365 369 373 375 462 377 448 385 385 448 389 440 391 438 407 411 413 429 435 432 441 441 445 447 432 428 451 451 457 418 459 467 471 416 414 475 386 483 485 495 495 497 499 507 517 382 380 521 525 368 360 356 525 527 336 318 531 531 312 308 292 286 539 268 266 539 559 567 571 264 262 260 571 577 581 585 593 595 252 595 605 609 611 611 611 252 613 248 621 244 242 238 621 623 623 623 234 627 234 627 627 234 639 234 643 645 647 649 649 651 651 226 653 675 679 224 685 689 220 689 689 697 214 705 705 206 707 709 711 715 725 200 735 735 198 737 741 196 196 749 753 196 753 759 194 771 777 777 787 789 178 799 803 811 813 176 174 815 815 158 154 819 827 827 833 841 845 847 847 154 851 851 859 154 861 861 863 867 154 875 154 885 887 891 154 895 154 895 907 909 913 915 154 917 148 921 923 136 931 130 937 130 118 949 957 957 961 112 963 110 110 971 979 102 979 98 98 92 88 985 987 84 84 76 66 56 46 42 42 42 40 28 24 14 0 0 0 0 -2 -6 -26 -26 -26 -34 -34 -42 -42 -42 -44 -52 -58 -92 -94 -98 -100 -108 -110 -120 -126 -126 -134 -142 -144 -146 -150 -154 -154 -154 -154 -156 -156 -158 -174 -176 -182 -196 -228 -252 -252 -260 -264 -266 -266 -278 -278 -282 -286 -290 -296 -304 -310 -312 -316 -320 -326 -330 -334 -340 -342 -346 -348 -352 -362 -364 -374 -378 -382 -386 -388 -390 -392 -396 -404 -406 -406 -412 -414 -418 -426 -428 -432 -438 -442 -450 -462 -464 -468 -468 -472 -476 -486 -490 -492 -518 -520 -526 -526 -532 -532 -534 -546 -546 -546 -546 -548 -550 -560 -566 -572 -578 -580 -596 -596 -598 -614 -616 -620 -622 -640 -660 -664 -670 -672 -676 -686 -696 -698 -698 -702 -708 -726 -728 -728 -742 -750 -752 -754 -754 -764 -770 -770 -780 -784 -788 -792 -794 -806 -806 -818 -820 -822 -822 -824 -830 -852 -862 -864 -868 -868 -868 -872 -878 -896 -902 -906 -910 -910 -914 -922 -924 -924 -924 -924 -926 -936 -936 -938 -940 -956 -958 -962 -968 -988 -994 -994 -994 -994 -1000 ];\r\nvexp=[-999 -993 -987 -983 -979 998 -975 -975 -973 994 -953 -951 -949 -947 -943 -935 -925 -923 -919 994 -919 -909 -901 986 970 970 966 -897 962 -897 952 -891 950 -885 938 -885 -877 924 916 -869 916 916 906 906 -855 -847 902 -845 -825 -819 898 -819 -815 -813 -813 -805 -803 -799 -797 892 -793 888 -791 -781 884 -779 878 -777 876 -773 -763 -763 872 870 -759 -757 870 862 -753 -749 -747 858 -745 854 -741 -737 -737 -735 -731 -727 -727 -721 -715 854 -715 -713 836 -711 -709 -709 -699 832 824 -693 -689 -689 822 818 816 -689 -689 -687 -683 -679 -677 812 -671 -671 802 -667 798 798 796 786 -667 -643 784 -637 -637 784 -637 -637 782 774 -635 -627 -615 -611 -609 -595 770 -595 766 -585 760 758 754 -573 -559 -559 -547 -531 744 -517 -517 -515 -511 744 -505 738 -495 -493 738 -455 -455 -439 738 -439 -435 734 -431 734 -429 -423 728 728 728 -411 -407 728 -403 -403 728 -401 706 -401 704 -395 -389 700 -385 700 -375 694 -375 -373 -369 692 -359 -351 -351 -341 -337 -335 -329 -327 -309 -301 -297 -297 -295 -289 686 -285 676 -281 -275 -273 674 670 668 -253 658 -253 -247 656 -241 -237 650 -235 -235 648 -227 644 644 -223 -221 -211 -209 638 626 -195 -189 -175 -169 624 624 622 -163 616 -155 -155 616 602 -143 -143 -137 -115 -99 -99 -95 -91 -89 594 -85 -75 -73 -63 -55 592 -49 592 572 -39 -37 572 570 -33 -23 568 -21 -3 564 -1 564 -1 562 560 558 -1 546 13 13 542 19 27 31 49 532 69 77 83 528 85 91 91 97 101 105 498 119 125 127 498 129 131 137 139 143 145 149 151 165 494 165 169 175 195 201 490 203 209 486 484 211 211 480 217 221 225 476 231 239 239 239 472 464 239 245 253 464 259 462 259 462 273 462 273 279 287 287 291 291 307 311 462 313 317 319 321 325 331 341 343 351 359 365 369 373 375 462 377 448 385 385 448 389 440 391 438 407 411 413 429 435 432 441 441 445 447 432 428 451 451 457 418 459 467 471 416 414 475 386 483 485 495 495 497 499 507 517 382 380 521 525 368 360 356 525 527 336 318 531 531 312 308 292 286 539 268 266 539 559 567 571 264 262 260 571 577 581 585 593 595 252 595 605 609 611 611 611 252 613 248 621 244 242 238 621 623 623 623 234 627 234 627 627 234 639 234 643 645 647 649 649 651 651 226 653 675 679 224 685 689 220 689 689 697 214 705 705 206 707 709 711 715 725 200 735 735 198 737 741 196 196 749 753 196 753 759 194 771 777 777 787 789 178 799 803 811 813 176 174 815 815 158 154 819 827 827 833 841 845 847 847 154 851 851 859 154 861 861 863 867 154 875 154 885 887 891 154 895 154 895 907 909 913 915 154 917 148 921 923 136 931 130 937 130 118 949 957 957 961 112 963 110 110 971 979 102 979 98 98 92 88 985 987 84 84 76 66 56 46 42 42 42 40 28 24 14 0 0 0 0 -2 -6 -26 -26 -26 -34 -34 -42 -42 -42 -44 -52 -58 -92 -94 -98 -100 -108 -110 -120 -126 -126 -134 -142 -144 -146 -150 -154 -154 -154 -154 -156 -156 -158 -174 -176 -182 -196 -228 -252 -252 -260 -264 -266 -266 -278 -278 -282 -286 -290 -296 -304 -310 -312 -316 -320 -326 -330 -334 -340 -342 -346 -348 -352 -362 -364 -374 -378 -382 -386 -388 -390 -392 -396 -404 -406 -406 -412 -414 -418 -426 -428 -432 -438 -442 -450 -462 -464 -468 -468 -472 -476 -486 -490 -492 -518 -520 -526 -526 -532 -532 -534 -546 -546 -546 -546 -548 -550 -560 -566 -572 -578 -580 -596 -596 -598 -614 -616 -620 -622 -640 -660 -664 -670 -672 -676 -686 -696 -698 -698 -702 -708 -726 -728 -728 -742 -750 -752 -754 -754 -764 -770 -770 -780 -784 -788 -792 -794 -806 -806 -818 -820 -822 -822 -824 -830 -852 -862 -864 -868 -868 -868 -872 -878 -896 -902 -906 -910 -910 -914 -922 -924 -924 -924 -924 -926 -936 -936 -938 -940 -956 -958 -962 -968 -988 -994 -994 -994 -994 -1000 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[994 -969 988 986 -957 -931 966 -889 -889 -883 -881 -877 -877 960 -873 914 -861 912 -847 -845 -841 -835 900 -805 -803 -793 -793 886 864 -785 -765 -765 -737 -713 -713 -701 -661 -655 -621 840 -619 -615 -599 832 -595 -567 -553 828 -541 -497 -467 -455 -429 -419 -415 -387 794 -377 792 -375 -371 -365 -337 -333 -331 -321 -285 780 -285 762 -271 -263 758 -259 -257 732 728 -249 -235 -231 -231 -189 726 -189 -181 -175 698 -153 -149 696 684 -127 672 -119 -115 652 -115 -113 644 -93 -91 608 -91 602 -77 -49 -45 594 -35 -5 562 -3 11 540 538 518 506 41 43 506 57 111 121 474 123 161 177 191 203 207 217 217 247 259 269 273 468 464 442 297 303 319 321 333 343 349 420 418 353 410 397 406 427 384 427 429 384 455 455 467 378 370 493 505 364 525 364 533 348 336 539 541 583 589 611 330 316 619 627 647 651 681 717 719 308 725 739 757 767 282 777 274 779 797 847 264 262 252 853 873 242 933 947 969 971 979 232 208 182 999 999 174 170 138 132 126 110 108 98 98 70 44 44 22 4 0 0 0 -2 -22 -58 -66 -74 -94 -116 -148 -158 -182 -210 -214 -222 -226 -238 -248 -252 -256 -286 -310 -320 -336 -342 -370 -388 -402 -402 -416 -440 -440 -458 -460 -460 -490 -504 -514 -528 -560 -572 -588 -596 -600 -616 -638 -642 -654 -660 -676 -684 -702 -706 -708 -720 -726 -742 -746 -766 -786 -812 -832 -840 -846 -864 -910 -912 -916 -948 -966 -982 -986 -992 ];\r\nvexp=[994 -969 988 986 -957 -931 966 -889 -889 -883 -881 -877 -877 960 -873 914 -861 912 -847 -845 -841 -835 900 -805 -803 -793 -793 886 864 -785 -765 -765 -737 -713 -713 -701 -661 -655 -621 840 -619 -615 -599 832 -595 -567 -553 828 -541 -497 -467 -455 -429 -419 -415 -387 794 -377 792 -375 -371 -365 -337 -333 -331 -321 -285 780 -285 762 -271 -263 758 -259 -257 732 728 -249 -235 -231 -231 -189 726 -189 -181 -175 698 -153 -149 696 684 -127 672 -119 -115 652 -115 -113 644 -93 -91 608 -91 602 -77 -49 -45 594 -35 -5 562 -3 11 540 538 518 506 41 43 506 57 111 121 474 123 161 177 191 203 207 217 217 247 259 269 273 468 464 442 297 303 319 321 333 343 349 420 418 353 410 397 406 427 384 427 429 384 455 455 467 378 370 493 505 364 525 364 533 348 336 539 541 583 589 611 330 316 619 627 647 651 681 717 719 308 725 739 757 767 282 777 274 779 797 847 264 262 252 853 873 242 933 947 969 971 979 232 208 182 999 999 174 170 138 132 126 110 108 98 98 70 44 44 22 4 0 0 0 -2 -22 -58 -66 -74 -94 -116 -148 -158 -182 -210 -214 -222 -226 -238 -248 -252 -256 -286 -310 -320 -336 -342 -370 -388 -402 -402 -416 -440 -440 -458 -460 -460 -490 -504 -514 -528 -560 -572 -588 -596 -600 -616 -638 -642 -654 -660 -676 -684 -702 -706 -708 -720 -726 -742 -746 -766 -786 -812 -832 -840 -846 -864 -910 -912 -916 -948 -966 -982 -986 -992 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-991 -989 998 -987 -983 -973 996 982 980 -971 978 -965 -959 974 -957 -951 -947 966 -941 966 966 962 -931 -931 -909 -903 -895 -893 -889 -885 -883 944 -883 936 -869 912 -845 896 894 -845 -837 -833 -829 886 882 -817 880 -803 872 -791 -791 -777 -769 -765 -759 -753 870 -743 -729 864 -717 864 854 -711 -707 850 -695 -689 -683 840 826 -665 -661 -659 812 798 -659 766 -657 760 -653 -637 756 -631 -627 -621 -611 748 -609 -605 -605 -601 -597 -589 -573 -567 -541 -539 -539 740 730 -539 -535 -507 -483 728 -475 -469 714 -455 -453 710 704 -451 -447 -433 -433 -431 -421 -417 -417 686 -405 682 -403 680 -399 678 -391 672 -387 670 668 -385 660 -381 -381 636 -377 -367 -363 -353 -331 626 618 -325 -303 616 -299 -297 -291 584 -281 -277 578 578 572 570 -245 -243 -239 -231 -223 -221 -209 570 -205 -201 -185 -183 -175 -165 -163 -159 -157 568 -147 564 -139 562 -125 548 -117 544 542 -103 -101 528 -95 524 -95 -79 -71 -71 -61 -49 520 -41 -37 520 518 -33 -27 502 -25 490 -21 482 474 -17 474 -17 -9 -7 -7 7 13 15 446 17 23 446 31 35 440 35 39 45 49 49 426 59 418 406 67 91 404 93 103 388 105 107 113 388 117 119 121 123 131 141 143 143 161 173 173 179 378 195 358 197 203 231 257 356 263 271 273 275 277 287 297 338 301 303 338 305 323 325 336 330 369 381 399 322 308 407 308 413 308 296 419 419 296 425 439 292 445 280 451 451 260 451 453 246 469 469 469 483 246 495 242 501 242 511 517 232 212 529 539 206 180 178 539 178 549 549 553 559 561 561 565 567 573 585 585 595 607 623 633 641 657 683 689 719 727 733 735 741 759 168 779 783 166 164 791 807 817 819 823 861 865 869 869 162 903 907 138 907 913 913 917 923 132 132 941 130 953 957 126 122 965 971 981 985 993 995 104 98 98 94 88 88 86 80 78 76 68 66 66 60 58 52 36 36 22 16 0 0 0 -14 -20 -22 -26 -28 -52 -54 -56 -58 -70 -70 -72 -76 -118 -126 -126 -140 -140 -142 -154 -154 -168 -172 -174 -182 -188 -196 -196 -206 -208 -220 -220 -222 -226 -236 -262 -286 -300 -308 -308 -322 -322 -336 -342 -346 -366 -396 -396 -404 -444 -446 -450 -462 -462 -466 -468 -468 -486 -486 -490 -498 -498 -506 -520 -532 -546 -548 -588 -594 -594 -596 -596 -604 -608 -612 -616 -616 -616 -622 -622 -626 -626 -656 -656 -656 -664 -672 -680 -682 -682 -714 -718 -744 -750 -750 -756 -770 -788 -800 -806 -814 -816 -850 -858 -858 -864 -868 -868 -870 -882 -884 -910 -924 -928 -932 -942 -946 -950 -952 -980 -986 -988 ];\r\nvexp=[-991 -989 998 -987 -983 -973 996 982 980 -971 978 -965 -959 974 -957 -951 -947 966 -941 966 966 962 -931 -931 -909 -903 -895 -893 -889 -885 -883 944 -883 936 -869 912 -845 896 894 -845 -837 -833 -829 886 882 -817 880 -803 872 -791 -791 -777 -769 -765 -759 -753 870 -743 -729 864 -717 864 854 -711 -707 850 -695 -689 -683 840 826 -665 -661 -659 812 798 -659 766 -657 760 -653 -637 756 -631 -627 -621 -611 748 -609 -605 -605 -601 -597 -589 -573 -567 -541 -539 -539 740 730 -539 -535 -507 -483 728 -475 -469 714 -455 -453 710 704 -451 -447 -433 -433 -431 -421 -417 -417 686 -405 682 -403 680 -399 678 -391 672 -387 670 668 -385 660 -381 -381 636 -377 -367 -363 -353 -331 626 618 -325 -303 616 -299 -297 -291 584 -281 -277 578 578 572 570 -245 -243 -239 -231 -223 -221 -209 570 -205 -201 -185 -183 -175 -165 -163 -159 -157 568 -147 564 -139 562 -125 548 -117 544 542 -103 -101 528 -95 524 -95 -79 -71 -71 -61 -49 520 -41 -37 520 518 -33 -27 502 -25 490 -21 482 474 -17 474 -17 -9 -7 -7 7 13 15 446 17 23 446 31 35 440 35 39 45 49 49 426 59 418 406 67 91 404 93 103 388 105 107 113 388 117 119 121 123 131 141 143 143 161 173 173 179 378 195 358 197 203 231 257 356 263 271 273 275 277 287 297 338 301 303 338 305 323 325 336 330 369 381 399 322 308 407 308 413 308 296 419 419 296 425 439 292 445 280 451 451 260 451 453 246 469 469 469 483 246 495 242 501 242 511 517 232 212 529 539 206 180 178 539 178 549 549 553 559 561 561 565 567 573 585 585 595 607 623 633 641 657 683 689 719 727 733 735 741 759 168 779 783 166 164 791 807 817 819 823 861 865 869 869 162 903 907 138 907 913 913 917 923 132 132 941 130 953 957 126 122 965 971 981 985 993 995 104 98 98 94 88 88 86 80 78 76 68 66 66 60 58 52 36 36 22 16 0 0 0 -14 -20 -22 -26 -28 -52 -54 -56 -58 -70 -70 -72 -76 -118 -126 -126 -140 -140 -142 -154 -154 -168 -172 -174 -182 -188 -196 -196 -206 -208 -220 -220 -222 -226 -236 -262 -286 -300 -308 -308 -322 -322 -336 -342 -346 -366 -396 -396 -404 -444 -446 -450 -462 -462 -466 -468 -468 -486 -486 -490 -498 -498 -506 -520 -532 -546 -548 -588 -594 -594 -596 -596 -604 -608 -612 -616 -616 -616 -622 -622 -626 -626 -656 -656 -656 -664 -672 -680 -682 -682 -714 -718 -744 -750 -750 -756 -770 -788 -800 -806 -814 -816 -850 -858 -858 -864 -868 -868 -870 -882 -884 -910 -924 -928 -932 -942 -946 -950 -952 -980 -986 -988 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-295 -303 -181 -373 3 955 107 217 -418 89 37 186 29 -19 -459 -780 -990 -971 673 821 820 403 317 -844 104 187 403 910 897 -684 -440 259 555 -773 -28 -509 559 507 546 -394 602 889 -602 -945 717 -503 -931 56 5 -913 965 927 980 926 -255 960 -385 539 546 -187 -504 -138 -673 443 955 913 335 -902 -814 -182 564 -335 676 813 394 945 -234 -181 -445 11 -463 693 -346 -778 -383 -724 747 227 -554 897 -495 -139 623 98 -217 -845 153 461 298 -689 487 -466 698 -159 -569 439 786 80 -751 -366 259 528 955 704 -313 71 468 -9 -341 277 315 966 999 -138 -449 -869 636 951 -266 -417 -127 -429 385 -406 -395 -75 -802 -929 -377 -290 882 -554 -529 233 -979 830 330 -737 845 309 670 -415 341 339 479 -550 -139 -47 -357 627 351 320 39 -291 182 -956 882 455 -308 781 -151 -349 33 -506 149 -325 315 -895 273 943 143 -357 -968 -923 163 526 446 -505 -497 59 -580 -89 -161 -39 777 671 832 -939 -185 263 -473 -321 514 -351 -276 294 231 699 -429 899 29 -678 -402 -958 -88 938 -80 285 -553 203 925 -790 471 -684 271 420 -559 -15 -582 -81 22 600 -903 455 -285 914 -382 -692 319 -986 363 -23 795 253 -257 -467 211 -908 -559 845 -478 687 -515 387 134 931 203 -7 303 572 737 669 945 -547 379 911 -117 882 704 454 -269 -488 756 -567 -125 -59 715 265 147 429 243 574 -197 -523 -462 -987 937 -305 347 394 462 373 517 -673 640 532 -720 32 185 -821 -749 -727 106 308 -572 721 -34 -803 -613 537 836 -489 -658 168 331 -368 871 -602 399 992 729 -325 -173 -765 -793 -901 -728 -109 -705 -40 -825 972 -46 884 76 471 -814 -753 -169 837 -499 381 178 -363 509 -847 -855 359 65 149 -481 -468 89 417 814 -358 -357 5 91 -924 -738 765 -15 -881 -634 -303 -769 -105 225 -245 -109 -437 -165 625 704 964 539 659 -357 -373 889 173 825 -963 -627 -529 -700 537 851 6 273 -637 -840 -576 -343 -992 9 145 551 -447 870 286 88 -850 440 661 -729 -279 556 588 870 -110 -723 429 -759 -616 361 815 60 861 -522 -29 455 -91 -917 -781 -469 -89 406 -231 -569 289 -84 -847 -199 912 64 748 389 781 -224 -525 -504 287 -605 559 722 -775 -879 991 689 721 -504 -362 988 99 949 202 -931 -920 -284 -213 616 581 847 495 363 -418 608 49 -832 157 763 -203 -581 -689 -632 -231 -91 376 -309 -352 672 253 -301 418 885 85 321 812 501 -79 366 -249 -175 65 737 -849 -453 871 -468 868 919 952 425 351 -935 -301 -595 372 -155 -21 913 50 597 548 825 299 465 -501 249 -583 734 -983 -224 19 -218 476 -364 392 211 580 717 557 942 255 972 -88 -420 -763 -438 -721 351 -289 661 -741 904 -949 -954 -103 858 155 -251 -245 429 -149 -752 657 -781 -583 -224 -202 -771 525 442 978 -13 681 430 198 -623 937 -897 -910 -155 708 -383 -800 169 981 -910 7 -896 -544 633 -812 533 462 482 22 -231 251 415 -450 631 -631 234 -23 622 19 -175 -160 -638 868 -112 119 -203 671 520 490 273 -857 -842 -499 721 -77 273 993 181 910 -922 -421 -728 -627 -451 -279 -739 607 -839 -444 -910 56 -740 -715 923 -344 -825 -91 -690 728 -429 -104 393 -270 -788 -585 -507 -44 -663 905 -589 801 -681 473 430 -247 -957 468 676 -726 99 543 -179 314 96 283 -285 -871 15 759 545 510 437 123 -689 171 -335 -580 -403 -154 741 782 -416 857 -307 346 325 -109 -929 -325 -618 -243 -377 -231 370 -197 -598 -668 735 553 -506 -616 -90 119 -235 -853 -248 -313 65 136 -305 -476 -350 459 888 347 651 -737 -775 211 567 809 -411 -634 -178 92 -702 741 449 -703 -608 -438 -199 180 -978 -957 -308 -883 -993 -357 -845 -429 938 -367 679 912 755 233 -589 983 -537 523 975 -775 -754 -855 -676 295 651 -327 624 -514 -572 -906 150 504 24 946 552 834 -256 252 374 882 368 -920 -828 -696 -274 -294 898 -664 616 932 966 -728 86 912 -640 -636 -428 -364 470 -922 570 326 -206 -514 188 96 -412 -472 702 -156 -682 188 -462 560 -350 426 -2 -818 774 0 436 280 712 302 -26 -352 224 -290 -24 -630 -746 -418 692 -294 252 238 178 214 -858 -196 -672 846 968 0 972 312 700 -804 -858 -284 -690 216 -660 -210 504 -280 -822 -138 276 -438 -104 442 240 352 -252 460 -246 -180 66 -574 60 -922 760 -934 -86 -922 -82 -82 374 -84 158 242 216 530 -628 -386 -876 974 630 -528 -682 402 -242 752 -74 -704 98 462 344 252 800 920 -70 -994 -628 -220 852 -768 -282 -890 634 14 -266 848 428 580 -288 308 650 -518 -700 434 -872 -146 -950 500 -132 -254 -810 316 -376 580 630 -300 -688 242 46 -224 38 -716 12 84 642 -766 -992 -730 -568 1000 542 422 190 -744 796 -594 442 -938 616 -512 724 -72 -522 536 224 -804 252 32 704 -892 -728 806 -28 112 592 346 -256 210 -610 -374 872 918 102 -616 668 84 -546 -836 584 456 -810 -380 -910 420 -540 14 -628 -286 -40 -504 -224 686 890 -902 -294 -448 -672 198 ];\r\nvexp=[-993 -987 -983 -979 -971 -963 -957 -957 1000 -949 -945 992 -939 -935 -931 988 980 -931 -929 -929 978 -923 -917 974 972 -913 -903 972 -901 972 968 -897 -895 -883 966 -881 -879 -871 966 964 960 -869 952 -857 -855 -855 -853 946 -849 -847 -847 -845 942 938 -845 938 -839 -825 932 -825 926 920 -821 -803 -793 -781 -781 918 914 912 912 -775 912 -775 910 -775 910 -773 -771 -769 -765 -763 904 898 -759 890 -753 -751 888 -749 -741 -739 -737 884 -737 -729 -727 -723 882 -721 -715 882 882 -705 -703 -689 882 872 -689 870 -689 870 -681 868 -673 -673 868 -663 -637 -631 -627 858 -627 852 -623 -613 848 -605 846 -595 -589 -589 -585 836 -583 -583 834 -581 -569 832 830 820 -569 -567 -559 814 812 -559 -553 -547 806 -537 -529 -529 -525 800 -523 -515 -509 -507 -505 796 -503 -501 786 782 774 -499 760 -499 -497 -495 -489 756 -481 -473 -469 -467 -463 -459 -453 -451 752 -449 -447 748 734 -445 -437 -429 728 -429 -429 -429 -421 -417 724 -415 -411 -403 -395 -385 722 -383 712 708 -383 -377 -377 -373 -373 704 704 704 704 702 700 -367 -363 -357 -357 698 -357 692 -357 686 -357 -351 676 -349 676 672 -343 -341 -335 670 668 650 -335 642 -327 -325 -325 -325 -321 -313 -313 640 -309 -307 636 -305 -305 -303 634 -303 -301 -301 -295 630 -291 -289 -285 -285 -279 -279 -269 630 624 622 -257 616 616 -255 -251 -249 -247 -245 -245 -243 -235 616 -231 -231 608 -231 -231 -217 -213 602 600 -203 -203 -199 592 588 584 580 -199 -197 -197 -187 580 580 574 -185 572 -181 -181 -179 570 -175 564 560 -175 556 -173 552 -169 548 -165 -161 -159 -155 -155 -151 546 -149 -139 546 -139 542 536 532 530 -127 528 -125 -117 -109 -109 -109 526 -105 -103 -91 -91 -91 -89 -89 -81 520 -79 -77 514 510 -75 -59 -47 504 504 -39 -29 -23 500 -23 -21 -19 -15 -15 -13 -9 -7 3 490 482 5 5 7 9 11 15 19 19 29 29 476 33 37 470 39 49 468 468 59 462 65 65 65 71 462 462 460 456 454 85 89 89 446 442 442 442 91 99 99 440 107 119 436 119 434 123 143 145 147 149 149 153 430 155 157 163 430 169 171 428 426 422 173 181 420 185 420 187 203 203 418 211 211 211 217 225 406 402 394 227 231 394 233 392 376 233 374 243 249 251 253 374 372 253 370 255 259 259 263 265 368 271 273 366 273 352 346 273 273 346 277 283 285 344 287 289 330 295 299 303 309 315 315 317 326 320 319 316 321 325 331 335 339 314 341 347 347 312 351 308 351 351 359 361 363 363 308 373 302 379 298 294 286 280 381 276 385 387 252 389 252 252 252 393 242 399 403 403 415 417 242 425 240 429 238 429 429 437 439 443 234 449 455 455 224 224 455 459 216 216 461 465 214 210 471 471 473 202 479 198 487 198 495 501 190 507 188 188 509 186 517 182 180 178 523 525 533 178 537 537 168 539 158 539 543 150 136 134 112 545 551 553 106 104 555 557 102 559 559 567 581 597 607 98 98 623 96 625 627 631 633 651 651 96 92 88 86 657 659 84 661 661 84 80 669 76 671 66 64 671 673 60 679 681 687 689 693 699 60 715 717 56 56 50 717 721 721 46 38 721 729 735 737 737 741 32 741 747 755 759 763 32 765 24 777 22 22 781 781 14 795 801 809 813 14 815 821 825 12 825 6 0 837 845 0 -2 -24 845 847 851 -26 857 861 -28 871 -28 -34 871 -40 885 889 889 897 897 899 905 911 -40 -44 -46 -70 913 913 919 -72 -74 923 -80 -82 925 -82 927 931 937 937 943 -84 945 945 -84 949 951 955 955 955 965 975 981 -86 983 -88 991 993 999 -88 -90 -104 -104 -110 -112 -132 -138 -138 -138 -146 -154 -156 -160 -178 -180 -182 -196 -202 -206 -210 -218 -220 -224 -224 -224 -224 -224 -234 -242 -246 -248 -252 -254 -256 -256 -266 -266 -270 -274 -276 -280 -282 -284 -284 -286 -288 -290 -290 -294 -294 -294 -300 -308 -308 -344 -346 -350 -350 -352 -352 -358 -362 -364 -364 -366 -368 -374 -376 -380 -382 -386 -394 -402 -406 -412 -416 -418 -418 -418 -420 -428 -438 -438 -438 -440 -444 -448 -450 -462 -462 -466 -468 -468 -472 -476 -478 -488 -504 -504 -504 -504 -506 -506 -512 -514 -514 -518 -522 -522 -528 -540 -544 -546 -550 -554 -554 -568 -572 -572 -574 -576 -580 -580 -582 -594 -598 -602 -602 -608 -610 -616 -616 -616 -618 -628 -628 -628 -630 -632 -634 -634 -636 -638 -640 -658 -660 -664 -668 -672 -672 -676 -678 -682 -682 -684 -684 -688 -690 -690 -692 -696 -700 -700 -702 -704 -716 -720 -724 -726 -728 -728 -728 -728 -730 -738 -740 -744 -746 -752 -754 -766 -768 -778 -780 -788 -790 -800 -802 -804 -804 -810 -810 -812 -814 -814 -818 -822 -828 -832 -836 -840 -842 -844 -850 -858 -858 -872 -876 -890 -892 -896 -902 -902 -906 -908 -910 -910 -910 -910 -920 -920 -922 -922 -922 -922 -924 -934 -938 -950 -954 -956 -958 -968 -978 -986 -990 -992 -992 -994 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))","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":20,"test_suite_updated_at":"2013-09-26T04:17:32.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-26T04:12:00.000Z","updated_at":"2026-01-22T14:04:54.000Z","published_at":"2013-09-26T04:14:37.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/2924486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sorting\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Subset of cases.\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\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\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 V a vector\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 Vout a sorted vector Odds Increasing/Evens Increasing\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\u003eExample:\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\u003eV= [-5 -12 87 2 88 20 11]\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\u003eVout=[-5 88 11 20 2 -12 87]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time to Complete: \u0026lt; 10 minutes\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\"}]}"},{"id":42780,"title":"GJam March 2016 IOW: Password Single","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p3 GJam March 2016 Annual I/O for Password Security\u003e. This is the small-1 case of only a single password\r\n\r\nThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'. \r\n\r\n*Input:* [PW], string of 1 to 26 characters\r\n\r\n*Output:* [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\r\n\r\n*Examples:* [PW] [Pstr]\r\n\r\n  [X] [IMPOSSIBLE] \r\n  [QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ] \r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Theory:* Single password case is a three liner.\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p3\"\u003eGJam March 2016 Annual I/O for Password Security\u003c/a\u003e. This is the small-1 case of only a single password\u003c/p\u003e\u003cp\u003eThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [PW], string of 1 to 26 characters\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [PW] [Pstr]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[X] [IMPOSSIBLE] \r\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ] \r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Single password case is a three liner.\u003c/p\u003e","function_template":"function Pstr=Password(c)\r\n% c is a string [A:Z]\r\n% create Pstr that contains [A:Z] such that no c exists in Pstr\r\n% if not possible return Pstr='IMPOSSIBLE'\r\n Pstr='IMPOSSIBLE';\r\n\r\nend","test_suite":"%%\r\ntic\r\nm='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nvexp='ZYXWVUTSRQPONMLKJIHGFEDCBA';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='X';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QQ';\r\nvexp='QABCDEFGHIJKLMNOPRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VLCIFDXB';\r\nvexp='BXDFICLVAEGHJKMNOPQRSTUWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='Z';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IKFBJUXSECAHNYLRVWDQPTZOMG';\r\nvexp='GMOZTPQDWVRLYNHACESXUJBFKI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XQOHEJIUZVFRSMLGYNWDBATP';\r\nvexp='PTABDWNYGLMSRFVZUIJEHOQXCK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JO';\r\nvexp='OJABCDEFGHIKLMNPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UJ';\r\nvexp='JUABCDEFGHIKLMNOPQRSTVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JQ';\r\nvexp='QJABCDEFGHIKLMNOPRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PJ';\r\nvexp='JPABCDEFGHIKLMNOQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JK';\r\nvexp='KJABCDEFGHILMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AJILRWDVYFQNUPOSKXGTCME';\r\nvexp='EMCTGXKSOPUNQFYVDWRLIJABHZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JV';\r\nvexp='VJABCDEFGHIKLMNOPQRSTUWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UOFVH';\r\nvexp='HVFOUABCDEGIJKLMNPQRSTWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZBITRKUX';\r\nvexp='XUKRTIBZACDEFGHJLMNOPQSVWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RXHYDMIVCWTQN';\r\nvexp='NQTWCVIMDYHXRABEFGJKLOPSUZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VONM';\r\nvexp='MNOVABCDEFGHIJKLPQRSTUWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LPNXTMRA';\r\nvexp='ARMTXNPLBCDEFGHIJKOQSUVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PKBAYN';\r\nvexp='NYABKPCDEFGHIJLMOQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JBHWXAPIKGZLYDSVNEQRFCU';\r\nvexp='UCFRQENVSDYLZGKIPAXWHBJMOT';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JD';\r\nvexp='DJABCEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JL';\r\nvexp='LJABCDEFGHIKMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CENHVFYD';\r\nvexp='DYFVHNECABGIJKLMOPQRSTUWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CIJTQSGVWKEXLO';\r\nvexp='OLXEKWVGSQTJICABDFHMNPRUYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AJ';\r\nvexp='JABCDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RJ';\r\nvexp='JRABCDEFGHIKLMNOPQSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QJ';\r\nvexp='JQABCDEFGHIKLMNOPRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LJ';\r\nvexp='JLABCDEFGHIKMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RUTGILBYCWO';\r\nvexp='OWCYBLIGTURADEFHJKMNPQSVXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WJ';\r\nvexp='JWABCDEFGHIKLMNOPQRSTUVXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JI';\r\nvexp='IJABCDEFGHKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RPFLXJAUNZDYBCQHKOGEW';\r\nvexp='WEGOKHQCBYDZNUAJXLFPRIMSTV';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JC';\r\nvexp='CJABDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZZ';\r\nvexp='ZABCDEFGHIJKLMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NJ';\r\nvexp='JNABCDEFGHIKLMOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JN';\r\nvexp='NJABCDEFGHIKLMOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OJ';\r\nvexp='JOABCDEFGHIKLMNPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YJ';\r\nvexp='JYABCDEFGHIKLMNOPQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ASQHIYWOVDK';\r\nvexp='KDVOWYIHQSABCEFGJLMNPRTUXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JR';\r\nvexp='RJABCDEFGHIKLMNOPQSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IAQPHFOVLZRXK';\r\nvexp='KXRZLVOFHPQAIBCDEGJMNSTUWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='TJ';\r\nvexp='JTABCDEFGHIKLMNOPQRSUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JB';\r\nvexp='BJACDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SKTMEYDBNQFGH';\r\nvexp='HGFQNBDYEMTKSACIJLOPRUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HJ';\r\nvexp='JHABCDEFGIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LCIUBXSAMQJYNDRKTHPWEOV';\r\nvexp='VOEWPHTKRDNYJQMASXBUICLFGZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LEBIYF';\r\nvexp='FYIBELACDGHJKMNOPQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QDUFXPLKWJYOV';\r\nvexp='VOYJWKLPXFUDQABCEGHIMNRSTZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZJ';\r\nvexp='JZABCDEFGHIKLMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VNTIKRQLEUJZDSAYFHMG';\r\nvexp='GMHFYASDZJUELQRKITNVBCOPWX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JU';\r\nvexp='UJABCDEFGHIKLMNOPQRSTVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CJ';\r\nvexp='JCABDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VJ';\r\nvexp='JVABCDEFGHIKLMNOPQRSTUWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GJ';\r\nvexp='JGABCDEFHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MJ';\r\nvexp='JMABCDEFGHIKLNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JM';\r\nvexp='MJABCDEFGHIKLNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JWPOBESYCLURKTMXGAQFHZ';\r\nvexp='ZHFQAGXMTKRULCYSEBOPWJDINV';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YXWVPTANLC';\r\nvexp='CLNATPVWXYBDEFGHIJKMOQRSUZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DHTGFSRVMWKNXOBUPCLAIQYEJZ';\r\nvexp='ZJEYQIALCPUBOXNKWMVRSFGTHD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BHZLJATP';\r\nvexp='PTAJLZHBCDEFGIKMNOQRSUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XJ';\r\nvexp='JXABCDEFGHIKLMNOPQRSTUVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AA';\r\nvexp='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='FKMWBLNRQUDHOGZVCIAE';\r\nvexp='EAICVZGOHDUQRNLBWMKFJPSTXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NQCHZXIUTVLKD';\r\nvexp='DKLVTUIXZHCQNABEFGJMOPRSWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JP';\r\nvexp='PJABCDEFGHIKLMNOQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OYSLPBQVHDZE';\r\nvexp='EZDHVQBPLSYOACFGIJKMNRTUWX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JT';\r\nvexp='TJABCDEFGHIKLMNOPQRSUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JA';\r\nvexp='AJBCDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SJ';\r\nvexp='JSABCDEFGHIKLMNOPQRTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='FJ';\r\nvexp='JFABCDEGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ITQXRCOULKH';\r\nvexp='HKLUOCRXQTIABDEFGJMNPSVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EJ';\r\nvexp='JEABCDFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DJ';\r\nvexp='JDABCEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VDSHZWRBAYUJEMFIONXPTKL';\r\nvexp='LKTPXNOIFMEJUYABRWZHSDVCGQ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PWGUA';\r\nvexp='AUGWPBCDEFHIJKLMNOQRSTVXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IMPOSSIBLE';\r\nvexp='ELBISOPMACDFGHJKNQRTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XBYKNRGLJVFEPTUO';\r\nvexp='OUTPEFVJLGRNKYBXACDHIMQSWZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JH';\r\nvexp='HJABCDEFGIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KTMDLQ';\r\nvexp='QLDMTKABCEFGHIJNOPRSUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LUNSVKPGFJOXEAQMBDZ';\r\nvexp='ZDBMQAEXOJFGPKVSNULCHIRTWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IJ';\r\nvexp='JIABCDEFGHKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VOKCMQBHWUNZGJ';\r\nvexp='JGZNUWHBQMCKOVADEFILPRSTXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JY';\r\nvexp='YJABCDEFGHIKLMNOPQRSTUVWXZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='A';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JW';\r\nvexp='WJABCDEFGHIKLMNOPQRSTUVXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JX';\r\nvexp='XJABCDEFGHIKLMNOPQRSTUVWYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JF';\r\nvexp='FJABCDEGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SLMAWBIKZCXOHQFGPYUDNJV';\r\nvexp='VJNDUYPGFQHOXCZKIBWAMLSERT';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XDLNMWTESQIFYRHCPOA';\r\nvexp='AOPCHRYFIQSETWMNLDXBGJKUVZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KJ';\r\nvexp='JKABCDEFGHILMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MHZAXUFKDVQORNWYTCGEISBJ';\r\nvexp='JBSIEGCTYWNROQVDKFUXAZHMLP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DCAZKJ';\r\nvexp='JKZACDBEFGHILMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BJ';\r\nvexp='JBACDEFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JZ';\r\nvexp='ZJABCDEFGHIKLMNOPQRSTUVWXY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JG';\r\nvexp='GJABCDEFHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SAMWRULICJGBEFYKVQTONPDZXH';\r\nvexp='HXZDPNOTQVKYFEBGJCILURWMAS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JS';\r\nvexp='SJABCDEFGHIKLMNOPQRTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JE';\r\nvexp='EJABCDFGHIKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YXUMAFB';\r\nvexp='BFAMUXYCDEGHIJKLNOPQRSTVWZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\nif ~isempty(strfind(v,m)),valid=0;end;\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n\r\n\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":16,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-20T00:37:14.000Z","updated_at":"2025-12-07T18:55:37.000Z","published_at":"2016-03-20T00:52:13.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/8274486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Password Security\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the small-1 case of only a single password\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 random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\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 [PW], string of 1 to 26 characters\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 [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\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 [PW] [Pstr]\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[[X] [IMPOSSIBLE] \\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Single password case is a three liner.\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\"}]}"},{"id":1913,"title":"GJam 2013 Veterans: Ocean View (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View\u003e. This is the Small data set witn N\u003c=50 and Q\u003c=4, guaranteed.\r\n\r\nThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\r\n\r\n*Succinct Challenge statement:* Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\r\n\r\n*Input:* V , Vector length N\u003c=50 with values 1 thru 1000.\r\n\r\n*Output:* Q , minimum quantity of removed values to produce a valid vector [0:4]\r\n\r\n*Examples:* [V] [Q]\r\n\r\n  [1 4 3 3] [2]  for [1 4] or [1 3]\r\n  [1 2 3 4 5] [0]\r\n  [4 3 2 1] [3]\r\n\r\n*Commentary:*\r\n\r\n  1) The GJam Small test suite is not robust\r\n  2) nchoosek(50,4) is too slow for Cody and the 100 cases\r\n  3) The Large test suite is N\u003c=1000 with some delete cases \u003e4\r\n  4) A Good Algorithm that solves the Large case is usually best to pursue\r\n  5) GJam Competition allows one Large submission within 10 minutes of download \r\n  6) \u003cLarge Suite Challenge\u003e","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard#s=p2\"\u003eGJam 2013 Veterans Ocean View\u003c/a\u003e. This is the Small data set witn N\u0026lt;=50 and Q\u0026lt;=4, guaranteed.\u003c/p\u003e\u003cp\u003eThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\u003c/p\u003e\u003cp\u003e\u003cb\u003eSuccinct Challenge statement:\u003c/b\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V , Vector length N\u0026lt;=50 with values 1 thru 1000.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Q , minimum quantity of removed values to produce a valid vector [0:4]\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [V] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 4 3 3] [2]  for [1 4] or [1 3]\r\n[1 2 3 4 5] [0]\r\n[4 3 2 1] [3]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) The GJam Small test suite is not robust\r\n2) nchoosek(50,4) is too slow for Cody and the 100 cases\r\n3) The Large test suite is N\u0026lt;=1000 with some delete cases \u003e4\r\n4) A Good Algorithm that solves the Large case is usually best to pursue\r\n5) GJam Competition allows one Large submission within 10 minutes of download \r\n6) \u0026lt;Large Suite Challenge\u003e\r\n\u003c/pre\u003e","function_template":"function Q = Monotonic_V(vin)\r\n  Q=0;\r\nend","test_suite":"%%\r\ntic\r\nvin=[4 33 36 47 63 79 146 159 176 191 178 215 226 228 261 262 291 295 322 368 456 461 465 473 479 500 512 527 570 572 613 639 641 654 667 684 699 701 746 751 763 767 786 819 872 925 932 959 965 972 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 33 63 78 82 85 92 101 113 125 138 175 183 196 211 224 250 287 345 368 388 426 447 477 491 504 524 575 579 581 621 694 712 720 737 745 747 784 793 802 813 827 829 853 858 919 924 929 939 960 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 19 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 35 63 72 76 122 103 171 185 221 238 294 318 325 341 355 350 359 365 407 409 438 467 514 548 592 585 599 606 636 646 652 697 708 737 770 773 798 819 832 835 849 881 879 893 904 907 932 967 983 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 72 94 114 136 147 177 185 199 216 214 230 243 252 264 417 285 426 428 445 450 463 465 467 482 485 495 531 537 547 575 558 598 654 677 678 692 685 785 853 891 894 897 905 906 910 918 933 963 979 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[21 18 33 53 158 179 200 225 230 259 261 262 280 319 338 368 369 376 423 449 481 505 517 531 545 588 598 614 607 615 647 655 657 684 702 706 734 756 768 791 806 792 834 889 895 896 957 960 971 995 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[52 53 66 83 119 129 132 145 202 237 274 281 284 296 298 326 442 386 451 456 475 476 486 493 499 520 523 525 589 605 612 626 630 638 694 718 740 763 791 798 800 801 811 839 868 874 895 891 971 984 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 9 21 43 89 106 117 141 150 211 158 220 233 282 296 311 324 353 372 376 407 452 414 455 482 494 503 522 527 531 545 548 552 563 568 586 593 629 673 691 682 703 724 738 787 822 861 882 907 937 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 51 80 105 109 114 129 154 175 167 188 198 227 266 270 437 345 446 459 469 470 478 479 520 582 587 591 611 618 619 658 677 670 683 686 689 710 758 728 815 821 852 870 912 937 946 960 969 985 998 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 34 65 81 83 91 105 114 125 127 132 162 154 176 198 201 222 269 272 296 297 321 345 355 377 402 403 407 444 454 450 493 517 533 546 589 592 593 639 698 700 729 764 798 785 850 909 917 950 988 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[30 94 106 118 125 136 151 161 162 176 233 240 272 290 320 337 347 352 370 433 412 499 504 510 513 572 593 621 629 640 646 710 712 721 735 741 750 786 804 812 814 817 822 844 893 932 944 945 954 972 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 5 6 1 7 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[25 37 40 56 62 81 86 136 95 140 225 228 274 236 297 332 417 516 545 549 573 582 583 595 600 601 603 624 673 699 714 716 719 720 746 737 762 790 802 814 821 835 852 868 860 871 899 910 923 984 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 1000 1000 1000 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 15 42 44 68 69 108 109 126 120 145 148 154 176 199 221 245 266 271 299 325 309 326 411 514 518 552 568 589 607 663 692 723 711 746 754 771 776 780 818 840 843 858 868 878 882 883 904 906 975 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[17 13 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 21 82 107 99 135 136 144 174 183 211 222 259 283 304 333 348 353 366 399 412 491 512 507 526 557 590 593 613 619 634 663 683 689 710 714 719 720 738 754 807 832 885 880 932 934 941 984 990 996 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[5 37 46 52 54 79 125 140 192 294 318 323 333 343 346 354 360 361 372 403 414 435 445 454 471 480 482 503 514 527 583 624 645 632 726 746 760 764 771 791 801 803 812 819 846 885 893 956 976 1000 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 12 36 45 50 101 113 119 131 168 237 250 254 261 281 324 343 401 421 437 442 499 500 501 512 522 523 529 532 545 561 585 586 590 623 679 695 782 798 823 830 843 852 878 891 902 923 922 972 981 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 23 111 61 127 138 144 147 174 194 261 262 279 272 288 318 350 356 396 425 439 441 454 466 473 487 482 590 615 617 632 637 662 688 699 704 734 780 800 803 814 808 828 843 868 922 943 985 987 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[49 73 118 140 194 202 218 249 261 342 272 347 355 403 438 462 466 469 473 488 499 511 514 515 525 532 538 545 588 665 610 707 714 719 716 723 739 751 763 789 809 868 874 899 916 937 939 947 979 994 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 14 67 76 98 107 125 150 151 194 244 248 251 270 289 271 309 354 434 453 468 454 484 487 507 523 526 569 578 601 624 684 690 696 725 752 765 800 813 815 826 906 888 948 963 970 984 993 996 1000 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[15 57 92 105 110 172 125 182 202 213 233 263 282 291 289 293 353 404 421 440 447 469 491 495 504 498 505 543 549 579 597 633 655 671 693 748 768 801 798 811 838 858 859 865 883 889 901 945 959 964 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[30 61 112 126 137 147 154 158 224 266 282 294 303 307 328 320 377 379 391 411 430 423 446 453 461 463 468 493 517 531 536 546 588 613 667 643 683 684 712 722 784 821 848 889 900 919 921 928 931 1000 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[34 18 92 103 108 110 143 200 248 283 284 297 326 365 369 400 439 470 489 498 526 593 596 605 631 684 720 687 754 770 781 793 803 826 811 855 863 886 888 901 916 928 943 954 968 972 982 983 984 987 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 24 74 48 137 172 199 209 224 227 234 293 297 305 324 336 338 377 418 395 432 437 446 474 505 510 529 536 541 568 613 641 645 695 677 735 792 797 805 830 853 869 882 883 888 925 910 970 982 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[25 39 54 55 57 101 117 124 142 143 185 161 196 210 214 237 243 267 282 288 304 394 435 427 458 491 509 519 550 557 582 607 608 634 652 640 681 705 695 753 785 840 871 889 903 912 918 921 966 987 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[30 75 123 160 156 176 202 215 254 264 310 318 354 368 390 435 453 457 474 476 479 510 529 532 603 623 635 637 644 671 686 706 723 725 726 730 732 767 806 807 829 852 869 902 897 912 927 957 994 996 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[40 44 45 46 121 89 141 155 167 179 207 226 263 265 327 337 338 364 373 453 456 478 512 537 543 561 568 577 637 604 641 648 672 687 697 709 701 737 789 808 813 819 820 828 835 911 921 938 947 964 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[40 42 43 60 63 70 78 124 103 131 133 149 161 164 170 227 232 260 266 275 316 323 368 335 372 377 413 418 420 441 553 463 574 576 643 656 665 678 733 741 743 815 762 883 908 928 930 968 974 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[16 78 79 134 151 219 224 240 251 280 295 388 406 483 489 505 507 534 538 539 549 554 555 564 573 583 609 660 672 681 687 711 732 738 745 746 783 792 812 834 837 841 887 866 908 957 961 978 987 994 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[18 20 33 34 35 54 94 123 140 162 169 220 205 250 258 278 299 320 349 362 397 434 492 449 499 504 508 515 531 552 606 647 652 678 695 703 714 735 763 785 836 799 854 858 863 864 929 933 960 984 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 17 37 50 66 96 99 155 107 184 218 257 260 279 285 327 332 337 354 369 398 430 423 437 574 631 656 660 668 676 680 700 709 750 747 761 789 774 813 857 860 886 898 904 949 952 964 976 984 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 78 23 90 101 106 132 141 146 191 206 222 244 270 304 325 332 379 383 392 401 412 417 436 454 465 487 551 499 553 557 562 570 581 613 650 682 691 732 781 782 789 814 816 844 890 965 971 986 998 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[20 65 69 128 131 157 173 175 211 194 216 229 266 278 286 292 320 335 377 358 423 424 463 472 529 531 545 553 557 576 589 585 601 613 657 672 699 711 725 786 789 810 897 923 936 960 996 969 997 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 54 61 67 119 131 153 167 178 199 197 246 256 273 329 321 348 350 353 392 394 402 413 486 511 530 515 539 569 582 586 594 686 763 819 821 829 840 832 848 858 864 870 904 933 944 947 952 967 998 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 40 106 68 118 132 148 162 180 182 200 207 246 283 287 288 320 295 321 325 338 343 349 362 364 371 378 418 503 535 554 562 568 571 577 587 682 699 760 709 769 844 920 938 941 948 960 973 977 983 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 38 43 45 67 75 150 154 173 178 184 189 254 227 278 282 289 315 297 365 373 396 403 505 509 513 521 555 580 583 600 614 643 649 667 678 695 722 732 761 801 824 805 841 879 894 915 926 930 975 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[56 65 94 119 149 165 157 166 198 220 297 302 305 316 321 327 351 347 359 368 380 386 387 403 431 447 448 449 463 528 533 556 562 590 634 610 640 658 693 750 786 759 792 800 825 842 864 889 911 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[5 11 40 95 110 134 138 160 187 208 228 210 240 278 352 354 381 390 414 503 440 507 513 526 528 534 540 543 570 604 609 613 625 632 647 653 658 661 668 708 718 780 846 855 862 860 891 910 936 949 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[6 57 71 73 100 112 134 165 173 189 190 194 197 227 239 229 246 252 278 288 316 319 371 393 450 462 521 585 567 620 625 636 654 689 675 694 701 716 720 741 743 746 820 868 873 879 935 938 979 989 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[5 50 77 74 113 128 129 169 173 179 201 210 228 236 242 251 255 262 279 283 301 369 373 387 380 412 417 441 444 459 476 492 493 532 541 574 644 646 665 720 728 773 802 810 821 853 849 860 912 964 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[10 21 84 97 107 109 123 120 128 137 143 161 254 266 278 301 307 315 361 389 395 408 492 517 549 584 551 597 602 603 618 648 653 657 658 682 723 753 790 799 820 824 831 844 855 866 858 894 916 918 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 4 3 3 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[22 43 49 54 80 84 104 107 149 171 180 197 210 226 312 340 347 356 363 387 407 420 439 463 478 465 485 499 568 590 598 627 646 654 656 675 693 707 760 761 776 798 840 853 856 909 929 947 951 984 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[49 60 70 76 80 96 144 161 203 269 274 296 343 346 400 359 401 428 430 451 454 455 477 480 500 506 522 591 573 598 653 655 657 733 748 736 763 771 784 813 835 855 869 894 920 932 948 956 981 986 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 4 6 7 10 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[26 37 95 122 117 149 183 194 195 239 245 253 272 285 287 330 300 335 349 371 380 390 401 421 489 426 519 521 538 598 626 640 645 665 685 698 704 712 723 791 822 834 859 860 920 900 960 977 986 997 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[70 76 80 97 102 105 113 157 141 161 163 217 251 295 310 320 323 350 355 357 390 391 397 422 428 460 486 472 487 536 570 579 631 665 666 676 681 683 690 693 705 726 813 819 821 850 874 916 935 999 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[51 58 63 80 90 120 157 164 172 190 208 259 278 336 324 348 368 374 379 383 426 436 446 506 536 553 569 589 591 596 637 607 645 708 716 725 735 741 745 764 773 831 884 853 902 905 956 978 982 997 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[33 40 65 72 122 84 130 137 156 227 255 314 333 335 343 345 350 372 373 374 387 417 404 422 433 469 470 495 499 532 571 580 603 630 622 653 660 681 698 752 801 808 816 836 859 889 909 931 961 962 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 42 34 53 59 87 98 141 143 158 188 221 317 319 324 351 346 359 374 390 393 407 430 458 485 488 502 514 559 567 595 598 596 610 629 631 647 719 699 759 769 782 803 805 907 928 934 943 983 987 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[59 61 82 96 100 160 176 194 242 223 259 266 275 282 318 328 357 349 367 370 376 409 416 442 447 475 489 504 507 553 598 603 637 616 684 710 722 712 756 776 783 784 806 814 833 847 879 922 973 992 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 87 98 120 173 139 184 187 214 222 276 310 333 348 356 364 376 382 401 461 422 475 501 509 524 575 579 588 594 596 622 624 652 683 699 751 737 781 827 831 844 863 868 875 892 909 910 975 977 980 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[119 152 207 221 215 245 250 257 269 327 336 345 370 371 382 404 408 440 443 448 458 492 498 509 609 580 614 620 623 653 692 709 713 723 743 760 770 812 784 814 830 862 875 877 916 926 932 947 963 984 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[6 25 46 48 85 102 114 126 179 223 233 238 243 294 276 330 338 386 349 387 418 423 434 463 470 474 487 523 546 559 591 634 667 671 681 696 739 752 772 791 808 830 840 873 862 882 959 965 978 995 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 35 39 58 88 73 89 108 143 186 196 243 253 270 297 271 349 358 368 369 402 420 453 459 464 489 499 568 607 646 653 705 710 712 717 716 721 780 743 793 826 849 916 918 947 950 958 959 961 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 57 88 92 162 186 187 268 297 307 310 342 332 368 391 402 408 422 435 487 447 522 530 535 546 558 571 574 594 628 631 648 651 660 664 675 693 707 715 738 718 762 794 851 853 854 870 902 935 980 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[16 36 61 88 110 205 120 230 243 264 265 270 297 313 316 317 342 346 391 368 401 411 441 472 574 584 587 591 605 645 618 670 675 693 695 736 741 796 804 801 811 824 829 884 915 929 934 984 989 990 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[27 41 59 70 96 145 149 175 274 264 278 297 298 358 361 392 403 413 432 444 480 498 520 542 544 622 626 631 636 641 692 704 715 736 740 805 818 823 828 856 865 875 890 891 913 931 941 966 977 991 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[39 44 48 56 62 94 105 109 195 210 199 211 223 272 311 317 419 435 446 448 467 472 492 483 536 540 609 610 646 638 710 719 740 781 795 798 814 835 858 861 869 876 903 913 936 931 948 965 968 999 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[17 19 42 49 88 94 130 149 215 250 251 288 297 326 334 335 344 372 377 411 406 425 429 436 440 478 488 496 550 554 560 578 585 594 603 607 608 610 631 796 813 820 850 901 937 979 955 989 990 997 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 5 7 21 26 52 128 154 168 192 195 209 225 282 227 284 352 355 363 395 406 432 443 478 501 513 553 577 625 624 658 672 696 699 733 739 750 760 768 817 822 861 869 870 883 913 978 931 993 994 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 18 20 78 110 111 114 117 123 126 138 180 198 214 235 250 286 316 335 409 422 475 476 525 527 593 615 634 657 672 664 682 711 727 729 740 761 781 790 820 837 840 842 853 868 896 971 981 986 995 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 17 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[8 4 42 77 104 141 158 169 192 217 234 244 340 356 343 367 374 393 427 430 433 468 475 477 481 483 507 526 549 557 609 616 611 644 645 678 695 704 758 745 772 794 803 806 825 836 841 858 885 943 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[15 49 77 101 107 140 129 151 156 158 185 219 224 235 236 243 264 271 302 304 329 335 346 435 436 453 472 479 480 496 563 568 571 591 633 673 651 712 718 741 765 775 782 815 859 893 912 918 935 988 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[26 69 77 115 121 141 151 217 243 244 275 293 301 309 313 341 345 366 365 372 391 398 510 516 518 520 542 522 553 572 652 657 660 661 674 705 717 723 789 799 810 849 856 859 876 900 906 942 996 1000 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[7 26 40 48 55 100 118 139 205 246 235 248 269 292 297 356 361 372 393 403 417 435 491 533 544 555 569 572 582 599 597 636 676 692 730 702 758 767 802 807 808 850 884 889 903 911 912 946 968 975 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 48 100 115 131 180 204 205 214 218 247 284 316 289 335 362 382 391 399 403 410 468 469 546 479 550 559 571 592 603 647 654 735 746 751 768 796 795 808 853 859 881 882 905 936 938 941 949 968 981 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[23 57 72 82 90 121 131 165 149 228 243 252 274 285 289 290 306 349 366 385 399 394 405 464 473 530 562 568 604 665 684 693 741 759 797 800 804 805 860 861 866 881 872 885 891 904 905 972 985 995 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[84 29 96 105 134 147 175 179 224 238 255 263 281 290 295 331 332 357 366 406 422 427 442 474 495 509 510 578 606 613 635 665 676 695 714 719 722 726 732 816 819 820 886 915 957 972 975 984 985 991 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 61 76 82 106 122 128 142 136 164 182 183 251 263 332 325 334 385 400 402 410 446 490 504 508 556 571 609 623 629 638 644 660 709 694 714 726 776 793 794 834 842 847 857 899 901 944 919 990 997 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 28 34 47 37 66 116 143 171 213 235 247 309 320 351 330 370 386 397 415 416 474 484 495 512 513 522 572 594 642 681 643 689 707 732 756 760 773 777 799 795 800 830 840 853 866 867 899 951 975 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 12 16 63 79 82 104 121 109 123 141 152 164 208 243 277 327 358 363 382 410 451 483 502 516 524 590 630 633 657 687 658 696 703 706 739 745 761 774 769 780 841 872 880 883 926 929 954 956 986 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 10 17 73 102 122 188 246 252 299 318 325 336 338 343 363 388 401 402 410 419 425 433 435 463 524 535 567 590 637 671 677 698 716 752 753 773 779 797 874 893 896 895 918 921 923 928 940 957 969 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[41 53 50 80 104 122 127 131 148 171 198 235 254 258 299 300 312 334 355 390 404 442 424 445 469 509 545 544 598 639 647 651 653 692 702 747 800 810 822 826 865 868 871 921 938 942 949 948 960 965 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[51 60 84 94 114 121 125 128 138 134 178 192 195 252 277 328 342 333 418 419 462 482 512 550 578 582 584 607 611 612 614 636 680 659 714 733 735 736 743 783 791 792 798 824 864 879 866 910 951 961 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[29 55 33 60 118 148 253 278 287 289 308 337 339 350 359 385 392 398 417 420 462 511 555 568 587 596 602 643 655 670 692 700 696 734 766 770 793 817 818 855 859 874 884 897 911 915 920 923 938 999 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[9 22 26 48 38 98 110 132 135 156 160 163 180 220 262 266 283 292 316 311 335 363 411 412 424 436 484 502 540 541 571 545 572 585 610 633 656 679 743 764 754 812 814 870 880 902 949 964 985 997 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 3 2 1 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[10 23 27 39 56 73 125 164 171 184 195 209 213 232 244 260 264 447 459 465 478 486 519 520 543 554 556 570 579 586 595 596 621 637 644 673 657 677 678 680 688 704 754 763 880 891 910 912 942 984 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[18 16 37 54 59 75 91 101 142 154 194 199 205 234 259 268 317 284 342 351 363 378 417 418 425 491 505 536 563 608 617 624 649 688 709 716 727 821 824 829 850 832 893 903 950 955 957 964 979 988 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[12 61 20 64 70 81 150 158 170 175 201 282 304 307 338 391 366 397 407 428 432 473 492 501 508 533 563 557 579 589 603 631 636 645 648 656 714 685 718 740 742 814 824 842 863 871 927 941 965 986 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[6 14 24 31 39 48 52 60 82 125 164 141 195 213 234 239 255 287 318 334 357 387 369 410 417 421 431 444 446 510 514 547 680 653 684 709 720 765 791 802 823 840 858 871 891 892 950 927 983 1000 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[12 15 37 48 71 74 101 95 104 148 153 162 208 215 269 227 320 356 359 372 406 455 463 477 486 498 559 596 645 651 664 693 665 751 756 779 785 827 804 844 852 874 887 904 905 936 961 982 983 991 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 65 68 71 124 173 181 190 195 204 221 220 304 339 321 352 362 363 368 369 403 415 490 514 520 536 548 550 586 589 592 623 655 638 700 744 755 762 779 789 842 850 865 881 916 924 956 938 987 998 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[48 52 94 107 134 113 186 202 231 233 253 257 274 296 324 332 338 351 356 357 358 393 489 482 519 527 534 537 560 568 604 612 611 617 705 707 730 755 782 812 784 828 867 916 937 948 966 967 971 988 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[55 15 107 117 155 157 198 236 240 245 285 288 302 364 376 380 402 416 421 434 478 488 501 504 567 568 629 644 646 673 657 686 690 740 744 755 769 770 783 792 818 860 855 865 904 905 917 935 971 984 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[80 30 92 103 143 182 200 202 217 222 229 245 273 278 283 303 360 445 446 466 486 489 505 516 547 576 614 630 624 643 671 695 697 709 715 730 739 743 746 768 786 810 872 888 949 938 951 952 959 982 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[41 61 83 126 142 188 214 218 242 249 269 265 315 334 362 369 371 438 454 459 484 464 485 497 501 522 548 568 586 605 614 686 654 701 706 726 732 736 742 765 792 810 823 842 832 846 853 877 891 980 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[20 22 27 74 91 77 144 147 154 269 287 327 328 348 349 386 432 433 438 470 491 550 556 586 588 592 610 640 686 716 722 733 734 736 740 758 779 796 804 805 836 857 901 912 938 940 942 981 990 989 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 13 52 28 149 156 187 223 262 268 269 292 309 332 347 379 373 462 484 501 505 506 524 527 539 544 627 656 660 666 669 677 704 679 712 752 780 783 863 877 882 891 904 937 910 970 979 988 993 994 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[16 46 60 67 71 77 81 102 123 140 143 145 178 249 271 260 336 366 409 470 471 489 497 529 536 596 597 610 664 662 673 677 694 698 718 742 755 759 783 807 850 844 879 880 903 913 915 922 945 959 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[988 988 988 988 988 ];\r\nvexp=[4 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[7 13 14 122 128 154 170 184 193 191 224 241 260 296 299 305 311 316 375 381 424 425 429 437 476 477 488 503 546 532 564 585 665 669 677 689 823 838 831 857 859 877 883 897 918 927 935 948 973 987 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(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":18,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-05T02:13:07.000Z","updated_at":"2026-03-11T10:04:13.000Z","published_at":"2013-10-05T03:12:16.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=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 Veterans Ocean View\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Small data set witn N\u0026lt;=50 and Q\u0026lt;=4, guaranteed.\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 as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\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\u003eSuccinct Challenge statement:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\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 V , Vector length N\u0026lt;=50 with values 1 thru 1000.\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 Q , minimum quantity of removed values to produce a valid vector [0:4]\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 [V] [Q]\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 4 3 3] [2]  for [1 4] or [1 3]\\n[1 2 3 4 5] [0]\\n[4 3 2 1] [3]]]\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) The GJam Small test suite is not robust\\n2) nchoosek(50,4) is too slow for Cody and the 100 cases\\n3) The Large test suite is N\u003c=1000 with some delete cases \u003e4\\n4) A Good Algorithm that solves the Large case is usually best to pursue\\n5) GJam Competition allows one Large submission within 10 minutes of download \\n6) \u003cLarge Suite Challenge\u003e]]\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\"}]}"},{"id":2186,"title":"GJam 2012 Qualifier: Tongues","description":"This Challenge is a Warm-Up for \u003chttp://code.google.com/codejam/schedule.html Google Code Jam 2014\u003e Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.\r\n\r\nThis Challenge is \u003chttp://code.google.com/codejam/contest/1460488/dashboard Tongues from 2012 Qualifier\u003e, an alphabet substitution. The \"Googlerese\" needs to be translated back to normal. Normal to G samples are  'a' -\u003e 'y', 'o' -\u003e 'e', and 'z' -\u003e 'q'. This means that \"a zoo\" will become \"y qee\" in G. \r\n\r\nAdditional samples of G to Normal to determine translation are:\r\n\r\n  ejp mysljylc kd kxveddknmc re jsicpdrysi\r\n  rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd\r\n  de kr kd eoya kw aej tysr re ujdr lkgc jv\r\n  to:\r\n  our language is impossible to understand\r\n  there are twenty six factorial possibilities\r\n  so it is okay if you want to just give up\r\n\r\n*Input:* str  of G\r\n\r\n*Output:* str of translated letters\r\n\r\n*Google Code Jam Notes:*\r\nThe contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.\r\n\r\n\r\n\r\n\r\n  ","description_html":"\u003cp\u003eThis Challenge is a Warm-Up for \u003ca href = \"http://code.google.com/codejam/schedule.html\"\u003eGoogle Code Jam 2014\u003c/a\u003e Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.\u003c/p\u003e\u003cp\u003eThis Challenge is \u003ca href = \"http://code.google.com/codejam/contest/1460488/dashboard\"\u003eTongues from 2012 Qualifier\u003c/a\u003e, an alphabet substitution. The \"Googlerese\" needs to be translated back to normal. Normal to G samples are  'a' -\u0026gt; 'y', 'o' -\u0026gt; 'e', and 'z' -\u0026gt; 'q'. This means that \"a zoo\" will become \"y qee\" in G.\u003c/p\u003e\u003cp\u003eAdditional samples of G to Normal to determine translation are:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eejp mysljylc kd kxveddknmc re jsicpdrysi\r\nrbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd\r\nde kr kd eoya kw aej tysr re ujdr lkgc jv\r\nto:\r\nour language is impossible to understand\r\nthere are twenty six factorial possibilities\r\nso it is okay if you want to just give up\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e str  of G\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e str of translated letters\u003c/p\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam Notes:\u003c/b\u003e\r\nThe contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.\u003c/p\u003e","function_template":"function str = Tongues(sin)\r\n  str=sin;\r\nend","test_suite":"%%\r\nsin='ejp mysljylc kd kxveddknmc re jsicpdrysi';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'our language is impossible to understand'))\r\n%%\r\nsin='rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'there are twenty six factorial possibilities'))\r\n%%\r\nsin='de kr kd eoya kw aej tysr re ujdr lkgc jv';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'so it is okay if you want to just give up'))\r\n%%\r\nsin='hello i am the google code jam test data';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'xoggk d yl wxo vkkvgo ekso uyl wonw sywy'))\r\n%%\r\nsin='how are you';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'xkf yto akj'))\r\n%%\r\nsin='aynny iynny aynny iynny aynny iynny aynny iynny aynny iynny aynny iynny aynny iynny aynny ieeeeeeeee';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'yabba dabba yabba dabba yabba dabba yabba dabba yabba dabba yabba dabba yabba dabba yabba dooooooooo'))\r\n%%\r\nsin='y n f i c w l b k u o m x s e v z p d r j g a t h a q set k oset xa ynfd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'a b c d e f g h i j k l m n o p q r s t u v y w x y z now i know my abcs'))\r\n%%\r\nsin='schr rkxc tesr aej dksl tkrb xc';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'next time wont you sing with me'))\r\n%%\r\nsin='wep rbedc tbe dvcyo ks y resljc ie ser dvcyo re erbcp vcevmc';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'for those who speak in a tongue do not speak to other people'))\r\n%%\r\nsin='seneia jsicpdrysid rbcx dksfc rbca ypc dvcyoksl xadrcpkcd ks rbc dvkpkr';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'nobody understands them since they are speaking mysteries in the spirit'))\r\n%%\r\nsin='rbkd kd de chfkrksl k bygc re le rbc nyrbpeex';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'this is so exciting i have to go the bathroom'))\r\n%%\r\nsin='kr tyd rbc ncdr ew rkxcd kr tyd rbc nmjpdr ew rkxcd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'it was the best of times it was the blurst of times'))\r\n%%\r\nsin='mcr mkvd ie tbyr bysid ie';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'let lips do what hands do'))\r\n%%\r\nsin='rbkd bcpc kd ljsveticp yfrkgyrci rtcsra dcgcs fymkncp wjmm yjre se okfonyfo sykmrbpetksl xyabcx';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'this here is gunpowder activated twenty seven caliber full auto no kickback nailthrowing mayhem'))\r\n%%\r\nsin='k bygc ncdrci wpjkr dvkoc ysi xees set k dbymm ncdr aej rbc lja';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'i have bested fruit spike and moon now i shall best you the guy'))\r\n%%\r\nsin='eb byk kx ks jp fexvjrcp cyrksl aejp fbccqnjplcpd ysi leelmcpcdksl aejp rchrq';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'oh hai im in ur computer eating your cheezburgers and googleresing your textz'))\r\n%%\r\nsin='ys cac wep ys cac ysi y vklces wep y vklces';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'an eye for an eye and a pigeon for a pigeon'))\r\n%%\r\nsin='ymm aejp nydc ypc ncmesl re cppep rbc dveesa nypi';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'all your base are belong to error the spoony bard'))\r\n%%\r\nsin='aej vkddci eww rbc fbkfocs myia';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'you pissed off the chicken lady'))\r\n%%\r\nsin='set kd rbc djxxcp ew ejp myfo ew ikdfesrcsr';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'now is the summer of our lack of discontent'))\r\n%%\r\nsin='na rbc vpkfoksl ew xa rbjxnd dexcrbksl tkfoci rbkd tya fexcd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'by the pricking of my thumbs something wicked this way comes'))\r\n%%\r\nsin='ks y tepmi ew ikpctemgcd ysi mkesd dexcrkxcd rbc pypcdr fpcyrjpc kd y wpkcsi';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'in a world of direwolves and lions sometimes the rarest creature is a friend'))\r\n%%\r\nsin='lpccrksld fbccdc vevdkfmc rbc sjxncp aej bygc ikymci kd fjppcsrma ejr ew vepofbevd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'greetings cheese popsicle the number you have dialed is currently out of porkchops'))\r\n%%\r\nsin='tba ie vpelpyxxcpd ymtyad xkh jv bymmetccs ysi fbpkdrxyd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'why do programmers always mix up halloween and christmas'))\r\n%%\r\nsin='kx fexxysicp dbcvypi ysi rbkd kd xa wygepkrc vpenmcx es rbc leelmc feic uyx';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'im commander shepard and this is my favorite problem on the google code jam'))\r\n%%\r\nsin='w ew rte czjymd w ew esc czjymd esc';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'f of two equals f of one equals one'))\r\n%%\r\nsin='wep k ncrtccs rbpcc ysi s w ew k czjymd w ew k xksjd esc vmjd w ew k xksjd rte';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'for i between three and n f of i equals f of i minus one plus f of i minus two'))\r\n%%\r\nsin='bet ypc aej bemiksl jv ncfyjdc kx y veryre';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'how are you holding up because im a potato'))\r\n%%\r\nsin='ip qykjd ip qykjd ip qykjd ip qykjd eeeeeeeeeeeeb ip qykjd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'dr zaius dr zaius dr zaius dr zaius ooooooooooooh dr zaius'))\r\n%%\r\nsin='tbeeeeeeeeeeeeeeeeeeeyyyyyyyyy k oset f vmjd vmjd';\r\nstr=Tongues(sin);\r\nassert(strcmp(str,'whoooooooooooooooooooaaaaaaaaa i know c plus plus'))\r\n","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":19,"test_suite_updated_at":"2014-02-16T18:14:55.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-02-16T18:04:01.000Z","updated_at":"2026-01-28T10:40:23.000Z","published_at":"2014-02-16T18:11:52.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 a Warm-Up for\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/schedule.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2014\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.\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\u003eThis Challenge is\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/1460488/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eTongues from 2012 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, an alphabet substitution. The \\\"Googlerese\\\" needs to be translated back to normal. Normal to G samples are 'a' -\u0026gt; 'y', 'o' -\u0026gt; 'e', and 'z' -\u0026gt; 'q'. This means that \\\"a zoo\\\" will become \\\"y qee\\\" in G.\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\u003eAdditional samples of G to Normal to determine translation are:\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[ejp mysljylc kd kxveddknmc re jsicpdrysi\\nrbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd\\nde kr kd eoya kw aej tysr re ujdr lkgc jv\\nto:\\nour language is impossible to understand\\nthere are twenty six factorial possibilities\\nso it is okay if you want to just give up]]\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e str of G\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 str of translated letters\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\u003eGoogle Code Jam Notes:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.\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\"}]}"},{"id":1902,"title":"GJam 2014 China Rd A: Read Phone Number (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number\u003e. Large Case.\r\n\r\nThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively. The \u003e 10 repeats occurs in the Large Data set.\r\n\r\n\r\n*Input:* [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\r\n\r\n*Output:* Text, a string of the reading based upon segments\r\n\r\n*Examples:*\r\n\r\n  [Number,Segments]  [Text]\r\n    ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n    ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n    \r\n\r\n*Contest Performance:* Best Time of 12 minutes with 1094 of 3058 able to process the Large data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard\"\u003eGJam 2014 China Read Phone Number\u003c/a\u003e. Large Case.\u003c/p\u003e\u003cp\u003eThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively. The \u003e 10 repeats occurs in the Large Data set.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Text, a string of the reading based upon segments\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Number,Segments]  [Text]\r\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Time of 12 minutes with 1094 of 3058 able to process the Large data set.\u003c/p\u003e","function_template":"function Text = Phone_CH(str,v) %\r\n Text='';\r\nend\r\n\r\n% One method for inserting strings from a cell array\r\nfunction valuestr=Phone_number(x)\r\n valuecell={'zero' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine'};\r\n valuestr=valuecell{x+1};\r\nend\r\n\r\nfunction qtystr=Phone_qty(x)\r\n qtycell={'' 'double' 'triple' 'quadruple' 'quintuple' 'sextuple' 'septuple' 'octuple' 'nonuple' 'decuple'};\r\n qtystr=qtycell{x};\r\nend","test_suite":"%%\r\ntic\r\nzstr='0000000000';\r\nzv=[10 ];\r\nvexp='decuple zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';\r\nzv=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ];\r\nvexp='one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';\r\nzv=[1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ];\r\nvexp='one double one triple one quadruple one quintuple one sextuple one septuple one octuple one nonuple one decuple one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6701604014038409645317871541814818042765712319652041768196456846465134589785405932716870450845696942';\r\nzv=[18 53 27 2 ];\r\nvexp='six seven zero one six zero four zero one four zero three eight four zero nine six four five three one seven eight seven one five four one eight one four eight one eight zero four two seven six five seven one two three one nine six five two zero four one seven six eight one nine six four five six eight four six four six five one three four five eight nine seven eight five four zero five nine three two seven one six eight seven zero four five zero eight four five six nine six nine four two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7948353719781965623468317824953101456187089254894578076436069073736717501261569457261541306241739435';\r\nzv=[67 24 2 7 ];\r\nvexp='seven nine four eight three five three seven one nine seven eight one nine six five six two three four six eight three one seven eight two four nine five three one zero one four five six one eight seven zero eight nine two five four eight nine four five seven eight zero seven six four three six zero six nine zero seven three seven three six seven one seven five zero one two six one five six nine four five seven two six one five four one three zero six two four one seven three nine four three five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4278368013428262027948460184086902458706181428387549853031942964639495026306271567618562640383239305';\r\nzv=[99 1 ];\r\nvexp='four two seven eight three six eight zero one three four two eight two six two zero two seven nine four eight four six zero one eight four zero eight six nine zero two four five eight seven zero six one eight one four two eight three eight seven five four nine eight five three zero three one nine four two nine six four six three nine four nine five zero two six three zero six two seven one five six seven six one eight five six two six four zero three eight three two three nine three zero five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9464820841980697178401716583034690432403485084358767843859195212565106243810816790591659815789420929';\r\nzv=[23 54 6 3 12 2 ];\r\nvexp='nine four six four eight two zero eight four one nine eight zero six nine seven one seven eight four zero one seven one six five eight three zero three four six nine zero four three two four zero three four eight five zero eight four three five eight seven six seven eight four three eight five nine one nine five two one two five six five one zero six two four three eight one zero eight one six seven nine zero five nine one six five nine eight one five seven eight nine four two zero nine two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1239417614204605186382638961928216123515856310156537949350505058426185417564013152480630168120385902';\r\nzv=[9 20 68 3 ];\r\nvexp='one two three nine four one seven six one four two zero four six zero five one eight six three eight two six three eight nine six one nine two eight two one six one two three five one five eight five six three one zero one five six five three seven nine four nine three five zero five zero five zero five eight four two six one eight five four one seven five six four zero one three one five two four eight zero six three zero one six eight one two zero three eight five nine zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5705658716138187897089238034926826854932909071213569698472175680807126039351827987289593273256549721';\r\nzv=[23 49 6 21 1 ];\r\nvexp='five seven zero five six five eight seven one six one three eight one eight seven eight nine seven zero eight nine two three eight zero three four nine two six eight two six eight five four nine three two nine zero nine zero seven one two one three five six nine six nine eight four seven two one seven five six eight zero eight zero seven one two six zero three nine three five one eight two seven nine eight seven two eight nine five nine three two seven three two five six five four nine seven two one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5496587298081832124197901212051639570370452063174067189290683532890857290152921651676725291709858268';\r\nzv=[84 12 1 1 2 ];\r\nvexp='five four nine six five eight seven two nine eight zero eight one eight three two one two four one nine seven nine zero one two one two zero five one six three nine five seven zero three seven zero four five two zero six three one seven four zero six seven one eight nine two nine zero six eight three five three two eight nine zero eight five seven two nine zero one five two nine two one six five one six seven six seven two five two nine one seven zero nine eight five eight two six eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6046727253505468724903978269465059754529308478929632170216741630304035454232162816186394257019613649';\r\nzv=[21 13 16 7 19 17 7 ];\r\nvexp='six zero four six seven two seven two five three five zero five four six eight seven two four nine zero three nine seven eight two six nine four six five zero five nine seven five four five two nine three zero eight four seven eight nine two nine six three two one seven zero two one six seven four one six three zero three zero four zero three five four five four two three two one six two eight one six one eight six three nine four two five seven zero one nine six one three six four nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9709324183067148146829125827086805141425714050976780595295963087561738097976891946025083503270131874';\r\nzv=[19 40 15 25 1 ];\r\nvexp='nine seven zero nine three two four one eight three zero six seven one four eight one four six eight two nine one two five eight two seven zero eight six eight zero five one four one four two five seven one four zero five zero nine seven six seven eight zero five nine five two nine five nine six three zero eight seven five six one seven three eight zero nine seven nine seven six eight nine one nine four six zero two five zero eight three five zero three two seven zero one three one eight seven four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5935294040195821091284183159414635231362074061646489573631084519431981565623091096745285242356956132';\r\nzv=[49 2 47 2 ];\r\nvexp='five nine three five two nine four zero four zero one nine five eight two one zero nine one two eight four one eight three one five nine four one four six three five two three one three six two zero seven four zero six one six four six four eight nine five seven three six three one zero eight four five one nine four three one nine eight one five six five six two three zero nine one zero nine six seven four five two eight five two four two three five six nine five six one three two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='68420979858341861054645438226544';\r\nzv=[9 14 9 ];\r\nvexp='six eight four two zero nine seven nine eight five eight three four one eight six one zero five four six four five four three eight double two six five double four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='95673537815030404160202058788558325698592015367995915420';\r\nzv=[3 12 11 12 7 10 1 ];\r\nvexp='nine five six seven three five three seven eight one five zero three zero four zero four one six zero two zero two zero five eight seven double eight double five eight three two five six nine eight five nine two zero one five three six seven double nine five nine one five four two zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2917155597708068980673145819211425430909609607407685919790633007543533613';\r\nzv=[8 4 12 5 15 4 8 12 5 ];\r\nvexp='two nine one seven one triple five nine double seven zero eight zero six eight nine eight zero six seven three one four five eight one nine two double one four two five four three zero nine zero nine six zero nine six zero seven four zero seven six eight five nine one nine seven nine zero six double three double zero seven five four three five double three six one three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7898081583437702364634490213008907725195448';\r\nzv=[10 12 6 12 2 1 ];\r\nvexp='seven eight nine eight zero eight one five eight three four three double seven zero two three six four six three four four nine zero two one three double zero eight nine zero double seven two five one nine five double four eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='437260442554900624648844197922288914270446';\r\nzv=[11 6 9 6 3 1 3 2 1 ];\r\nvexp='four three seven two six zero double four two double five four nine double zero six two four six four double eight double four one nine seven nine triple two eight eight nine one four two seven zero double four six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2789225013517271635527397201226697731452904643719381232152395186872927418002375223547884014744';\r\nzv=[5 9 7 2 15 1 6 4 8 9 9 3 7 5 4 ];\r\nvexp='two seven eight nine two two five zero one three five one seven two seven one six three double five two seven three nine seven two zero one double two double six nine double seven three one four five two nine zero four six four three seven one nine three eight one two three two one five two three nine five one eight six eight seven two nine two seven four one eight double zero two three seven five double two three five four seven double eight four zero one four seven double four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='745443046641006460911871735664538092408084394952066353448004450489821840381778094629976796';\r\nzv=[9 1 15 14 15 8 14 7 3 2 1 1 ];\r\nvexp='seven four five double four three zero four six six four one double zero six four six zero nine double one eight seven one seven three five double six four five three eight zero nine two four zero eight zero eight four three nine four nine five two zero double six three five three double four eight double zero double four five zero four eight nine eight two one eight four zero three eight one seven seven eight zero nine four six two double nine seven six seven nine six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9389581629278714115270272359258386234328448241872301648883';\r\nzv=[15 3 1 13 6 5 7 5 3 ];\r\nvexp='nine three eight nine five eight one six two nine two seven eight seven one four double one five two seven zero two seven two three five nine two five eight three eight six two three four three two eight double four eight two four one eight seven two three zero one six four eight double eight three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='638110728463471172123321819781344177341197656065297520823913148755582611608';\r\nzv=[10 6 8 1 15 12 5 7 2 3 4 1 1 ];\r\nvexp='six three eight double one zero seven two eight four six three four seven double one seven two one two double three two one eight one nine seven eight one three double four one double seven three four double one nine seven six five six zero six five two nine seven five two zero eight two three nine one three one four eight seven double five five eight two six double one six zero eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1133185809510432';\r\nzv=[15 1 ];\r\nvexp='double one double three one eight five eight zero nine five one zero four three two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='238728670935325997878047006508522404463678112601608414215085957397966';\r\nzv=[13 8 4 13 10 15 6 ];\r\nvexp='two three eight seven two eight six seven zero nine three five three two five double nine seven eight seven eight zero four seven zero zero six five zero eight five double two four zero double four six three six seven eight double one two six zero one six zero eight four one four two one five zero eight five nine five seven three nine seven nine double six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='85658191899305236022867183837318073902283214947760248177452103132443861485891';\r\nzv=[1 10 15 8 4 6 7 15 8 1 1 1 ];\r\nvexp='eight five six five eight one nine one eight double nine three zero five two three six zero double two eight six seven one eight three eight three seven three one eight zero seven three nine zero two two eight three two one four nine four double seven six zero two four eight one double seven four five two one zero three one three two four four three eight six one four eight five eight nine one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='21770416464691789037472471701235435696232613781886745983083308143822448829';\r\nzv=[2 8 11 10 8 14 6 11 1 1 1 1 ];\r\nvexp='two one double seven zero four one six four six four six nine one seven eight nine zero three seven four seven two four seven one seven zero one two three five four three five six nine six two three two six one three seven eight one double eight six seven four five nine eight three zero eight three three zero eight one four three eight double two double four eight eight two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='983249024136170290772296855218428763965301110152249';\r\nzv=[2 15 14 15 4 1 ];\r\nvexp='nine eight three two four nine zero two four one three six one seven zero two nine zero double seven double two nine six eight double five two one eight four two eight seven six three nine six five three zero triple one zero one five double two four nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3480983214378717507995103066016574662185732516268288798294927774350570';\r\nzv=[13 10 15 11 3 3 14 1 ];\r\nvexp='three four eight zero nine eight three two one four three seven eight seven one seven five zero seven double nine five one zero three zero double six zero one six five seven four double six two one eight five seven three two five one six two six eight two double eight seven nine eight two nine four nine two triple seven four three five zero five seven zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='839728044162856119809065784052255130156664';\r\nzv=[9 7 10 15 1 ];\r\nvexp='eight three nine seven two eight zero double four one six two eight five six one one nine eight zero nine zero six five seven eight four zero five double two double five one three zero one five triple six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1299716932675600468864013262733864936641800591739546149687053359054618';\r\nzv=[5 7 14 1 12 3 14 6 4 2 1 1 ];\r\nvexp='one two double nine seven one six nine three two six seven five six double zero four six double eight six four zero one three two six two seven double three eight six four nine three double six four one eight zero zero five nine one seven three nine five four six one four nine six eight seven zero five double three five nine zero five four six one eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7896269726657598138802619158139810768633428179202282443571484595761847181128041281628185246';\r\nzv=[2 7 8 5 6 6 11 9 5 10 12 3 7 ];\r\nvexp='seven eight nine six two six nine seven two double six five seven five nine eight one three double eight zero two six one nine one five eight one three nine eight one zero seven six eight six double three four two eight one seven nine two zero double two eight two double four three five seven one four eight four five nine five seven six one eight four seven one eight double one two eight zero four one two eight one six two eight one eight five two four six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='477658486684842559974665174626263159299857463838945503033';\r\nzv=[11 11 6 14 10 2 3 ];\r\nvexp='four double seven six five eight four eight double six eight four eight four two double five double nine seven four six six five one seven four six two six two six three one five nine two double nine eight five seven four six three eight three eight nine four double five zero three zero double three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='06875538368304839162889133713';\r\nzv=[3 10 1 14 1 ];\r\nvexp='zero six eight seven double five three eight three six eight three zero four eight three nine one six two double eight nine one double three seven one three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='45256104997445504657800410480176721551263917689055037098246476060427763254223140';\r\nzv=[14 10 11 2 3 5 12 15 1 4 2 1 ];\r\nvexp='four five two five six one zero four double nine seven double four five five zero four six five seven eight double zero four one zero four eight zero one seven six seven two one double five one two six three nine one seven six eight nine zero double five zero three seven zero nine eight two four six four seven six zero six zero four two double seven six three two five four double two three one four zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6500507266637983912546668295413265536254049737120594152282943472025861287250184';\r\nzv=[3 9 4 9 13 7 7 15 10 1 1 ];\r\nvexp='six five zero zero five zero seven two triple six three seven nine eight three nine one two five four triple six eight two nine five four one three two six double five three six two five four zero four nine seven three seven one two zero five nine four one five double two eight two nine four three four seven two zero two five eight six one two eight seven two five zero one eight four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='90536923431844238372096379800359312024577754107934353901';\r\nzv=[9 14 14 11 5 3 ];\r\nvexp='nine zero five three six nine two three four three one eight double four two three eight three seven two zero nine six three seven nine eight double zero three five nine three one two zero two four five triple seven five four one zero seven nine three four three five three nine zero one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='194851729139154581103404918805045722094939046615745185586389015707908521547319803514384134067';\r\nzv=[6 4 13 10 9 14 6 11 3 9 2 2 3 1 ];\r\nvexp='one nine four eight five one seven two nine one three nine one five four five eight double one zero three four zero four nine one double eight zero five zero four five seven double two zero nine four nine three nine zero four double six one five seven four five one eight double five eight six three eight nine zero one five seven zero seven nine zero eight five two one five four seven three one nine eight zero three five one four three eight four one three four zero six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7180221794361';\r\nzv=[3 7 3 ];\r\nvexp='seven one eight zero double two one seven nine four three six one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='328104734424917711259192901583138150643217809';\r\nzv=[3 8 8 15 5 5 1 ];\r\nvexp='three two eight one zero four seven three double four two four nine one double seven double one two five nine one nine two nine zero one five eight three one three eight one five zero six four three two one seven eight zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4012446744';\r\nzv=[8 1 1 ];\r\nvexp='four zero one two double four six seven four four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='75159567609950672038714189757246751900662587864067030579646570165557726996672';\r\nzv=[13 15 11 7 1 15 8 3 4 ];\r\nvexp='seven five one five nine five six seven six zero double nine five zero six seven two zero three eight seven one four one eight nine seven five seven two four six seven five one nine double zero six six two five eight seven eight six four zero six seven zero three zero five seven nine six four six five seven zero one six triple five double seven two six double nine double six seven two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3799620377074233419333355599242743805155864309640885130882726110701418994547411411126234428060';\r\nzv=[7 9 1 15 13 7 8 15 8 2 6 3 ];\r\nvexp='three seven double nine six two zero three double seven zero seven four two double three four one nine quadruple three triple five double nine two four two seven four three eight zero five one double five eight six four three zero nine six four zero double eight five one three zero double eight two seven two six double one zero seven zero one four one eight double nine four five four seven four double one four triple one two six two three double four two eight zero six zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4044617922891601574869890265644168731524925085154541620867323759734908590210726392474762696192267779';\r\nzv=[11 10 11 14 12 2 4 1 11 7 10 2 1 4 ];\r\nvexp='four zero double four six one seven nine double two eight nine one six zero one five seven four eight six nine eight nine zero two six five six double four one six eight seven three one five two four nine two five zero eight five one five four five four one six two zero eight six seven three two three seven five nine seven three four nine zero eight five nine zero two one zero seven two six three nine two four seven four seven six two six nine six one nine double two six triple seven nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='496013127684385845636701597670212145677337967472957547809568709115873526515';\r\nzv=[3 3 8 7 2 10 9 4 15 9 5 ];\r\nvexp='four nine six zero one three one two seven six eight four three eight five eight four five six three six seven zero one five nine seven six seven zero two one two one four five six double seven double three seven nine six seven four seven two nine five seven five four seven eight zero nine five six eight seven zero nine double one five eight seven three five two six five one five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='820821167030568093577157791027439613729645803722099835506620383';\r\nzv=[10 5 12 5 9 7 12 1 1 1 ];\r\nvexp='eight two zero eight two double one six seven zero three zero five six eight zero nine three five double seven one five double seven nine one zero two seven four three nine six one three seven two nine six four five eight zero three seven double two zero double nine eight three double five zero double six two zero three eight three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='408657487448884114668701663855295152810754544275633734090577026733934929585122688051672821523';\r\nzv=[9 12 14 7 13 4 11 14 5 1 1 2 ];\r\nvexp='four zero eight six five seven four eight seven double four triple eight four double one four double six eight seven zero one double six three eight double five two nine five one five two eight one zero seven five four five double four two seven five six double three seven three four zero nine zero five seven seven zero two six seven double three nine three four nine two nine five eight five one double two six double eight zero five one six seven two eight two one five two three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='83666830362426720310982782694422780383449883455418709';\r\nzv=[12 1 5 6 9 9 3 2 5 1 ];\r\nvexp='eight three triple six eight three zero three six two four two six seven two zero three one zero nine eight two seven eight two six nine double four double two seven eight zero three eight three double four nine eight eight three four double five four one eight seven zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='70';\r\nzv=[2 ];\r\nvexp='seven zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='65766688929471206192343267171090766327239398418349595012751051227962607';\r\nzv=[3 11 13 6 13 11 9 5 ];\r\nvexp='six five seven triple six double eight nine two nine four seven one two zero six one nine two three four three two six seven one seven one zero nine zero seven double six three two seven two three nine three nine eight four one eight three four nine five nine five zero one two seven five one zero five one double two seven nine six two six zero seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='48133338660378550326078225767453276529';\r\nzv=[11 14 13 ];\r\nvexp='four eight one quadruple three eight double six zero three seven eight double five zero three two six zero seven eight double two five seven six seven four five three two seven six five two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='36891843662484180026365939189054753849425696106318144849957054540856';\r\nzv=[1 5 14 8 6 13 11 4 2 3 1 ];\r\nvexp='three six eight nine one eight four three double six two four eight four one eight double zero two six three six five nine three nine one eight nine zero five four seven five three eight four nine four two five six nine six one zero six three one eight one double four eight four double nine five seven zero five four five four zero eight five six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='34612462486594272419457058352837598957197066493857794521556931700796417114875';\r\nzv=[4 3 13 11 10 4 7 7 6 8 4 ];\r\nvexp='three four six one two four six two four eight six five nine four two seven two four one nine four five seven zero five eight three five two eight three seven five nine eight nine five seven one nine seven zero double six four nine three eight five double seven nine four five two one double five six nine three one seven double zero seven nine six four one seven double one four eight seven five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='589307734140137421765302377855535665358764079941118868097';\r\nzv=[5 11 10 15 1 13 1 1 ];\r\nvexp='five eight nine three zero double seven three four one four zero one three seven four two one seven six five three zero two three seven seven eight triple five three five double six five three five eight seven six four zero seven double nine four triple one double eight six eight zero nine seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3672631606882947123107630174376653028408088502237547432460099875379219240390535201264402423';\r\nzv=[12 1 6 4 1 9 13 15 7 12 6 2 3 ];\r\nvexp='three six seven two six three one six zero six double eight two nine four seven one two three one zero seven six three zero one seven four three seven double six five three zero two eight four zero eight zero double eight five zero two two three seven five four seven four three two four six double zero double nine eight seven five three seven nine two one nine two four zero three nine zero five three five two zero one two six double four zero two four two three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='071297839181663799718842689232241580363293469938821908366311';\r\nzv=[8 9 3 4 4 1 4 9 15 2 1 ];\r\nvexp='zero seven one two nine seven eight three nine one eight one double six three seven nine nine seven one double eight four two six eight nine two three double two four one five eight zero three six three two nine three four six double nine three double eight two one nine zero eight three double six three one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='76980639645671034156972091320389208';\r\nzv=[5 9 7 9 2 2 1 ];\r\nvexp='seven six nine eight zero six three nine six four five six seven one zero three four one five six nine seven two zero nine one three two zero three eight nine two zero eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5521307963254865684315120841260812155841496873543096528814951132569054';\r\nzv=[13 5 14 11 13 8 1 3 2 ];\r\nvexp='double five two one three zero seven nine six three two five four eight six five six eight four three one five one two zero eight four one two six zero eight one two one double five eight four one four nine six eight seven three five four three zero nine six five two double eight one four nine five double one three two five six nine zero five four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9288';\r\nzv=[2 1 1 ];\r\nvexp='nine two eight eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0477182564467935086';\r\nzv=[15 3 1 ];\r\nvexp='zero four double seven one eight two five six double four six seven nine three five zero eight six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1433203960656799099205210173223686919427402173272324965993447708611755416843183525933643187989942239';\r\nzv=[8 10 1 14 8 13 15 6 1 13 8 3 ];\r\nvexp='one four double three two zero three nine six zero six five six seven double nine zero nine nine two zero five two one zero one seven three double two three six eight six nine one nine four two seven four zero two one seven three two seven two three two four nine six five double nine three double four double seven zero eight six double one seven five five four one six eight four three one eight three five two five nine double three six four three one eight seven nine eight double nine four two two three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='82446767675781104095354046763771917813590078380710445861437926027908370597627610';\r\nzv=[9 1 2 4 4 3 2 15 14 9 4 6 1 5 1 ];\r\nvexp='eight two double four six seven six seven six seven five seven eight double one zero four zero nine five three five four zero four six seven six three double seven one nine one seven eight one three five nine double zero seven eight three eight zero seven one zero double four five eight six one four three seven nine two six zero two seven nine zero eight three seven zero five nine seven six two seven six one zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='305859569860086103046061825673705281159146364994491117222909271811137063811520971285027239387660793';\r\nzv=[12 2 7 15 6 3 1 6 3 8 7 10 5 10 4 ];\r\nvexp='three zero five eight five nine five six nine eight six zero zero eight six one zero three zero four six zero six one eight two five six seven three seven zero five two eight one one five nine one four six three six four nine nine double four nine double one one seven two double two nine zero nine two seven one eight triple one three seven zero six three eight double one five two zero nine seven one two eight five zero two seven two three nine three eight seven double six zero seven nine three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5190986793820061002';\r\nzv=[8 7 4 ];\r\nvexp='five one nine zero nine eight six seven nine three eight two double zero six one double zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='732818804656837051738362946791984298270657440266341399683255575214033229065283049378339674351';\r\nzv=[10 3 8 14 3 4 13 7 3 4 14 9 1 ];\r\nvexp='seven three two eight one double eight zero four six five six eight three seven zero five one seven three eight three six two nine four six seven nine one nine eight four two nine eight two seven zero six five seven double four zero two double six three four one three double nine six eight three two triple five seven five two one four zero double three double two nine zero six five two eight three zero four nine three seven eight double three nine six seven four three five one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='22878757492589018002205051162666163148087357471571794221657045672188988933603952144766843';\r\nzv=[7 10 8 14 13 5 11 4 15 1 1 ];\r\nvexp='double two eight seven eight seven five seven four nine two five eight nine zero one eight double zero double two zero five zero five double one six two triple six one six three one four eight zero eight seven three five seven four seven one five seven one seven nine four double two one six five seven zero four five six seven two one double eight nine double eight nine double three six zero three nine five two one double four seven double six eight four three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='68748245479848622009943617274780676690467343336858764026953343';\r\nzv=[1 11 14 3 10 13 5 1 1 2 1 ];\r\nvexp='six eight seven four eight two four five four seven nine eight four eight six double two double zero double nine four three six one seven two seven four seven eight zero six seven double six nine zero four six seven three four triple three six eight five eight seven six four zero two six nine five three three four three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='812443820860567150296801089721522978252459617325444234454527699088834091962915459804249813572793576';\r\nzv=[2 8 1 1 15 4 8 14 1 10 8 8 15 1 2 1 ];\r\nvexp='eight one two double four three eight two zero eight six zero five six seven one five zero two nine six eight zero one zero eight nine seven two one five double two nine seven eight two five two four five nine six one seven three two five triple four two three four four five four five two seven six double nine zero triple eight three four zero nine one nine six two nine one five four five nine eight zero four two four nine eight one three five seven two seven nine three five seven six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='00993661068572459991536596938758768256572549986877220';\r\nzv=[9 11 7 7 12 7 ];\r\nvexp='double zero double nine three double six one zero six eight five seven two four five triple nine one five three six five nine six nine three eight seven five eight seven six eight two five six five seven two five four double nine eight six eight double seven double two zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='27715163656297176275418439056931612320615454463000744707732526889213294949588908195775568';\r\nzv=[15 2 13 1 3 6 2 15 4 1 10 9 7 1 ];\r\nvexp='two double seven one five one six three six five six two nine seven one seven six two seven five four one eight four three nine zero five six nine three one six one two three two zero six one five four five double four six three triple zero seven double four seven zero double seven three two five two six double eight nine two one three two nine four nine four nine five double eight nine zero eight one nine five double seven double five six eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='66836591190528744386233121519205009660791065830470';\r\nzv=[9 10 6 12 13 ];\r\nvexp='double six eight three six five nine double one nine zero five two eight seven double four three eight six two double three one two one five one nine two zero five double zero nine double six zero seven nine one zero six five eight three zero four seven zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9908105226888800867627299504353445485000888760967649670742';\r\nzv=[5 6 8 5 2 10 6 7 3 3 3 ];\r\nvexp='double nine zero eight one zero five double two six eight triple eight double zero eight six seven six two seven two nine nine five zero four three five three double four five four eight five triple zero double eight eight seven six zero nine six seven six four nine six seven zero seven four two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='23013192041633596995161673827352665194498573133742450639121977';\r\nzv=[14 9 11 9 10 5 4 ];\r\nvexp='two three zero one three one nine two zero four one six double three five nine six double nine five one six one six seven three eight two seven three five two double six five one nine double four nine eight five seven three one double three seven four two four five zero six three nine one two one nine double seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='561876161628602626933868362823471568496758529903516004832334874950999565539';\r\nzv=[2 14 12 12 1 3 10 14 1 5 1 ];\r\nvexp='five six one eight seven six one six one six two eight six zero two six two six nine double three eight six eight three six two eight two three four seven one five six eight four nine six seven five eight five two double nine zero three five one six double zero four eight three two double three four eight seven four nine five zero double nine nine five six double five three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0659336967718923857487379930716973116724796708015053702806099696109';\r\nzv=[15 10 2 5 12 9 11 2 1 ];\r\nvexp='zero six five nine double three six nine six double seven one eight nine two three eight five seven four eight seven three seven nine nine three zero seven one six nine seven three double one six seven two four seven nine six seven zero eight zero one five zero five three seven zero two eight zero six zero double nine six nine six one zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2544353234854864102426825493629094429744221828448703587259611510954048582897631523802527480763958';\r\nzv=[9 9 5 9 1 11 2 9 5 4 1 10 12 10 ];\r\nvexp='two five double four three five three two three four eight five four eight six four one zero two four two six eight two five four nine three six two nine zero nine double four two nine seven double four double two one eight two eight double four eight seven zero three five eight seven two five nine six one one five one zero nine five four zero four eight five eight two eight nine seven six three one five two three eight zero two five two seven four eight zero seven six three nine five eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='743482174037207702159915214008';\r\nzv=[2 10 10 7 1 ];\r\nvexp='seven four three four eight two one seven four zero three seven two zero double seven zero two one five double nine one five two one four double zero eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='971685936861297496680545';\r\nzv=[2 1 3 3 8 3 2 2 ];\r\nvexp='nine seven one six eight five nine three six eight six one two nine seven four nine double six eight zero five four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='06384119765848786807703567200612243886752458257039700258908161';\r\nzv=[10 1 12 5 9 7 1 8 5 2 2 ];\r\nvexp='zero six three eight four double one nine seven six five eight four eight seven eight six eight zero double seven zero three five six seven two zero zero six one double two four three double eight six seven five two four five eight two five seven zero three nine seven double zero two five eight nine zero eight one six one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='661888688696858666215517613281167258136127005883725278169489607542378190912692984613629598';\r\nzv=[12 6 4 10 8 13 9 12 8 2 2 3 1 ];\r\nvexp='double six one triple eight six double eight six nine six eight five eight triple six two one double five one seven six one three two eight double one six seven two five eight one three six one two seven double zero five double eight three seven two five two seven eight one six nine four eight nine six zero seven five four two three seven eight one nine zero nine one two six nine two nine eight four six one three six two nine five nine eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='11869488318253809620396499';\r\nzv=[8 8 4 4 2 ];\r\nvexp='double one eight six nine four double eight three one eight two five three eight zero nine six two zero three nine six four double nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3247242326877973396352267916489703639981791';\r\nzv=[10 6 9 1 14 3 ];\r\nvexp='three two four seven two four two three two six eight double seven nine seven three three nine six three five double two six seven nine one six four eight nine seven zero three six three double nine eight one seven nine one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='8446827840499583394994945831973919523300569749298887484989096588752282260';\r\nzv=[13 4 10 14 13 11 8 ];\r\nvexp='eight double four six eight two seven eight four zero four double nine five eight double three nine four double nine four nine four five eight three one nine seven three nine one nine five two double three double zero five six nine seven four nine two nine triple eight seven four eight four nine eight nine zero nine six five double eight seven five double two eight double two six zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='411450';\r\nzv=[3 2 1 ];\r\nvexp='four double one four five zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4392336769670743812140126277793124578244122498979213427064735267724740372712';\r\nzv=[11 12 7 15 6 5 10 5 4 1 ];\r\nvexp='four three nine two double three six seven six nine six seven zero seven four three eight one two one four zero one two six two triple seven nine three one two four five seven eight two double four one double two four nine eight nine seven nine two one three four two seven zero six four seven three five two six double seven two four seven four zero three seven two seven one two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='787130205914703441344904';\r\nzv=[5 6 7 4 1 1 ];\r\nvexp='seven eight seven one three zero two zero five nine one four seven zero three double four one three double four nine zero four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='12774525496510270478837791597218598140900';\r\nzv=[3 3 14 8 5 1 6 1 ];\r\nvexp='one two seven seven four five two five four nine six five one zero two seven zero four seven eight eight three double seven nine one five nine seven two one eight five nine eight one four zero nine zero zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='8337240067278766126028792694666601545641';\r\nzv=[1 3 2 9 7 3 12 3 ];\r\nvexp='eight double three seven two four double zero six seven two seven eight seven six six one two six zero two eight seven nine two six nine four quadruple six zero one five four five six four one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='07284423399956161619055960652374322967216';\r\nzv=[3 1 12 6 10 8 1 ];\r\nvexp='zero seven two eight double four two double three triple nine five six one six one six one nine zero five five nine six zero six five two three seven four three double two nine six seven two one six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='014588023080298629688';\r\nzv=[1 11 4 4 1 ];\r\nvexp='zero one four five double eight zero two three zero eight zero two nine eight six two nine six eight eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='391932612615185460799778659969591684168549057796895984';\r\nzv=[13 7 2 2 7 3 14 2 3 1 ];\r\nvexp='three nine one nine three two six one two six one five one eight five four six zero seven nine nine seven seven eight six five double nine six nine five nine one six eight four one six eight five four nine zero five double seven nine six eight nine five nine eight four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='85267068576145';\r\nzv=[9 3 1 1 ];\r\nvexp='eight five two six seven zero six eight five seven six one four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-29T21:50:16.000Z","updated_at":"2013-09-29T21:58:27.000Z","published_at":"2013-09-29T21:58:27.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/2924486/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Read Phone Number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Large Case.\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 Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively. The \u0026gt; 10 repeats occurs in the Large Data set.\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 [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\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 Text, a string of the reading based upon segments\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\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[[Number,Segments]  [Text]\\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 12 minutes with 1094 of 3058 able to process the Large data set.\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\"}]}"},{"id":42778,"title":"GJam March 2016 IOW: Polynesiaglot Medium","description":"This Challenge is derived from GJam March 2016 Annual I/O for Polynesiaglot. This is a subset of small set 2. The max Qraw is 2^50 (\u003c1.1259e15) for C[1,50], V[1,50], L[1,15].\r\nThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\r\nInput: [C V L] , C[1,50], V[1,50], 1\u003c=L\u003c=15\r\nOutput: [Q] max Qraw is 2^50 (\u003c1.1259e15); Q=mod(Qraw,1E9+7)\r\nExamples: [C V L] [Q]\r\n[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\nGoogle Code Jam 2016 Open Qualifier: April 8, 2016\r\nTheory: This is a large value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(-1)\r\nQ3    V          C\r\nQ2  V   C       V\r\nQ1 V   V       V\r\n\r\nThis medium challenge has eps(Qraw) \u003c0.25 so normal matlab doubles work. For the unbounded case a solution method is to convert this Challenge algorithm to Matlab BigInteger java calls. Solution sizes are on the order of (C+V)^L with the large case being C=50,V=50,L=500.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 522.625px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407.5px 261.312px; transform-origin: 407.5px 261.312px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 21px; text-align: left; transform-origin: 384.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is derived from\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. This is a subset of small set 2. The max Qraw is 2^50 (\u0026lt;1.1259e15) for C[1,50], V[1,50], L[1,15].\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 21px; text-align: left; transform-origin: 384.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=15\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e [Q] max Qraw is 2^50 (\u0026lt;1.1259e15); Q=mod(Qraw,1E9+7)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExamples:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e [C V L] [Q]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 40.875px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404.5px 20.4375px; transform-origin: 404.5px 20.4375px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eare {bbaa, aaab} \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eare {ab,eb,bb}\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384.5px 10.5px; text-align: left; transform-origin: 384.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"font-weight: 700; \"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384.5px 42px; text-align: left; transform-origin: 384.5px 42px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eTheory:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e This is a large value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(-1)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 81.75px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404.5px 40.875px; transform-origin: 404.5px 40.875px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eQ3    \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e          \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eC\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eQ2  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e   \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eC\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e       \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eQ1 \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e   \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e       \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); \"\u003eV\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4375px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.666667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.666667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.666667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.666667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404.5px 10.2188px; text-wrap: nowrap; transform-origin: 404.5px 10.2188px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384.5px 31.5px; text-align: left; transform-origin: 384.5px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThis medium challenge has eps(Qraw) \u0026lt;0.25 so normal matlab doubles work. For the unbounded case a solution method is to convert this Challenge algorithm to Matlab BigInteger java calls. Solution sizes are on the order of (C+V)^L with the large case being C=50,V=50,L=500.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function Q=Polyglot(m)\r\n% Q total words of length L using C consonants and V vowels\r\n% Q is modulo 1E9+7\r\n C=m(1); V=m(2);L=m(3); %\r\n Q=0;\r\n\r\nend","test_suite":"%%\r\ntic\r\nm=[2 8 15 ];\r\nv=Polyglot(m);\r\nvexp=[6938704 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 7 15 ];\r\nv=Polyglot(m);\r\nvexp=[853390015];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 2 ];\r\nv=Polyglot(m);\r\nvexp=[8];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 3 ];\r\nv=Polyglot(m);\r\nvexp=[24];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 15];\r\nv=Polyglot(m);\r\nvexp=[32342016 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 2];\r\nv=Polyglot(m);\r\nvexp=[12];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 3];\r\nv=Polyglot(m);\r\nvexp=[40];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 4];\r\nv=Polyglot(m);\r\nvexp=[176];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[44 2 15];\r\nv=Polyglot(m);\r\nvexp=[916593151];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 3 15];\r\nv=Polyglot(m);\r\nvexp=[397629405];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 3 15];\r\nv=Polyglot(m);\r\nvexp=[105078522];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 4 15];\r\nv=Polyglot(m);\r\nvexp=[133836675];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 8 15];\r\nv=Polyglot(m);\r\nvexp=[6938704];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 8 14];\r\nv=Polyglot(m);\r\nvexp=[624439943];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[50 50 2];\r\nv=Polyglot(m);\r\nvexp=[5000];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[50 50 3];\r\nv=Polyglot(m);\r\nvexp=[375000];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[50 50 7];\r\nv=Polyglot(m);\r\nvexp=[249885158];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[10 20 10];\r\nv=Polyglot(m);\r\nvexp=[998720967];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 10 13];\r\nv=Polyglot(m);\r\nvexp=[746816099];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 13 ];\r\nv=Polyglot(m);\r\nvexp=[377 ];\r\nassert(isequal(vexp,v))\r\n\r\n\r\ntoc\r\n","published":true,"deleted":false,"likes_count":10,"comments_count":2,"created_by":3097,"edited_by":7,"edited_at":"2023-07-14T16:27:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":12,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-19T18:33:48.000Z","updated_at":"2025-05-06T02:18:33.000Z","published_at":"2016-03-19T20:24:10.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is a subset of small set 2. The max Qraw is 2^50 (\u0026lt;1.1259e15) for C[1,50], V[1,50], L[1,15].\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=15\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 [Q] max Qraw is 2^50 (\u0026lt;1.1259e15); Q=mod(Qraw,1E9+7)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 [C V L] [Q]\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 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}]]\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e This is a large value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(-1)\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[Q3    V          C\\nQ2  V   C       V\\nQ1 V   V       V\\n]]\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis medium challenge has eps(Qraw) \u0026lt;0.25 so normal matlab doubles work. For the unbounded case a solution method is to convert this Challenge algorithm to Matlab BigInteger java calls. Solution sizes are on the order of (C+V)^L with the large case being C=50,V=50,L=500.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":1893,"title":"GJam 2014 China Rd A: Library Sorting (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting\u003e. \r\n\r\nThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations. \r\n\r\n*Input:* V   a vector\r\n\r\n*Output:* Vout  a sorted vector Odds Increasing/Evens Increasing\r\n\r\n*Example:*\r\n\r\nV= [-5 -12 87 2 88 20 11]\r\n\r\nVout=[-5 88 11 20 2 -12 87]\r\n\r\n\r\n*Contest Performance:*  Best Time to Complete: \u003c 10 minutes\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p2\"\u003eGJam 2014 China Sorting\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V   a vector\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Vout  a sorted vector Odds Increasing/Evens Increasing\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eV= [-5 -12 87 2 88 20 11]\u003c/p\u003e\u003cp\u003eVout=[-5 88 11 20 2 -12 87]\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e  Best Time to Complete: \u0026lt; 10 minutes\u003c/p\u003e","function_template":"function vout=Sort_CH(v)\r\n vout=v;\r\nend","test_suite":"%%\r\ntic\r\nv=[1 ];\r\nvexp=[1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2 1 ];\r\nvexp=[2 1 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 ];\r\nvexp=[1 2 3 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[1 2 3 4 5 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5 2 3 4 1 ];\r\nvexp=[1 4 3 2 5 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 -87 -85 -83 -71 -71 98 96 -67 -63 -59 -53 -47 -41 96 -41 82 -37 -29 82 -25 -25 80 -21 -13 -11 5 76 72 72 66 66 66 9 60 15 31 35 56 52 52 46 42 39 45 42 40 36 45 30 24 18 51 18 12 53 0 63 -6 65 -10 -12 67 69 79 85 85 -14 89 -16 -22 89 -24 91 -24 -26 -30 -38 -38 -38 -42 -44 -58 -58 -60 -62 -66 -68 -70 -70 -82 -82 -86 -86 -86 -94 -100 ];\r\nvexp=[-87 -87 -85 -83 -71 -71 98 96 -67 -63 -59 -53 -47 -41 96 -41 82 -37 -29 82 -25 -25 80 -21 -13 -11 5 76 72 72 66 66 66 9 60 15 31 35 56 52 52 46 42 39 45 42 40 36 45 30 24 18 51 18 12 53 0 63 -6 65 -10 -12 67 69 79 85 85 -14 89 -16 -22 89 -24 91 -24 -26 -30 -38 -38 -38 -42 -44 -58 -58 -60 -62 -66 -68 -70 -70 -82 -82 -86 -86 -86 -94 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-95 98 -81 -55 90 -29 -19 35 37 75 79 85 93 97 56 54 14 14 0 -14 -22 -34 -38 -46 -62 -90 -98 ];\r\nvexp=[-95 98 -81 -55 90 -29 -19 35 37 75 79 85 93 97 56 54 14 14 0 -14 -22 -34 -38 -46 -62 -90 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-89 -75 -73 -65 86 86 68 66 -41 -37 -25 56 5 21 25 52 36 26 14 27 29 35 45 6 51 63 87 93 -22 95 -26 -48 -54 -70 95 -86 -92 -96 ];\r\nvexp=[-89 -75 -73 -65 86 86 68 66 -41 -37 -25 56 5 21 25 52 36 26 14 27 29 35 45 6 51 63 87 93 -22 95 -26 -48 -54 -70 95 -86 -92 -96 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[76 -7 ];\r\nvexp=[76 -7 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-93 96 -91 86 -87 -87 -67 -53 68 30 -33 0 -33 -13 1 0 3 -10 3 -10 -16 19 23 45 51 -18 53 -30 -36 -72 79 -82 -96 83 91 ];\r\nvexp=[-93 96 -91 86 -87 -87 -67 -53 68 30 -33 0 -33 -13 1 0 3 -10 3 -10 -16 19 23 45 51 -18 53 -30 -36 -72 79 -82 -96 83 91 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 100 96 -81 86 -79 -79 -77 -73 -69 -69 -65 82 -59 -59 70 70 -57 -49 -47 70 -43 -41 54 -35 -31 -31 -29 -25 -17 -13 -5 50 -5 -3 7 21 25 46 27 27 44 31 33 35 37 44 49 42 38 49 51 34 69 34 75 83 20 85 87 91 91 14 12 10 6 0 0 0 -8 -8 -20 -24 -26 -34 -36 -40 -52 -56 -60 -66 -68 -68 -72 -72 -80 -84 -84 -90 -90 ];\r\nvexp=[-87 100 96 -81 86 -79 -79 -77 -73 -69 -69 -65 82 -59 -59 70 70 -57 -49 -47 70 -43 -41 54 -35 -31 -31 -29 -25 -17 -13 -5 50 -5 -3 7 21 25 46 27 27 44 31 33 35 37 44 49 42 38 49 51 34 69 34 75 83 20 85 87 91 91 14 12 10 6 0 0 0 -8 -8 -20 -24 -26 -34 -36 -40 -52 -56 -60 -66 -68 -68 -72 -72 -80 -84 -84 -90 -90 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 100 -81 -75 96 86 -71 -71 86 -33 -27 -25 82 -21 76 -11 68 5 7 9 13 68 15 25 41 41 51 61 56 61 56 67 54 67 48 83 89 91 99 34 30 28 16 16 10 10 4 0 0 0 0 -24 -26 -26 -34 -48 -50 -62 -66 -92 -100 ];\r\nvexp=[-87 100 -81 -75 96 86 -71 -71 86 -33 -27 -25 82 -21 76 -11 68 5 7 9 13 68 15 25 41 41 51 61 56 61 56 67 54 67 48 83 89 91 99 34 30 28 16 16 10 10 4 0 0 0 0 -24 -26 -26 -34 -48 -50 -62 -66 -92 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-93 -89 -87 88 -85 -75 -65 -63 -61 -59 -49 84 -39 -37 80 80 -37 -25 -11 -7 78 -5 78 72 3 5 9 58 11 50 46 23 29 29 31 35 44 37 49 67 71 44 40 30 71 30 28 24 75 75 79 83 18 97 99 6 6 2 0 -4 -8 -10 -16 -18 -30 -32 -34 -36 -38 -46 -46 -48 -48 -52 -54 -56 -66 -68 -88 -90 -100 -100 -100 ];\r\nvexp=[-93 -89 -87 88 -85 -75 -65 -63 -61 -59 -49 84 -39 -37 80 80 -37 -25 -11 -7 78 -5 78 72 3 5 9 58 11 50 46 23 29 29 31 35 44 37 49 67 71 44 40 30 71 30 28 24 75 75 79 83 18 97 99 6 6 2 0 -4 -8 -10 -16 -18 -30 -32 -34 -36 -38 -46 -46 -48 -48 -52 -54 -56 -66 -68 -88 -90 -100 -100 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[90 -89 90 74 -87 62 -83 -79 58 -77 -75 -75 -63 52 52 -59 46 42 -49 -39 -31 36 12 -25 6 -13 -11 5 9 17 23 29 39 -2 -8 -10 47 63 -28 -54 -70 -74 -78 63 65 83 -82 -84 91 97 97 ];\r\nvexp=[90 -89 90 74 -87 62 -83 -79 58 -77 -75 -75 -63 52 52 -59 46 42 -49 -39 -31 36 12 -25 6 -13 -11 5 9 17 23 29 39 -2 -8 -10 47 63 -28 -54 -70 -74 -78 63 65 83 -82 -84 91 97 97 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-97 88 -93 74 70 46 38 36 -91 -85 -83 -77 -67 -63 -55 34 -45 32 -37 16 0 0 -23 -21 -2 -4 5 13 27 -10 -32 -38 -38 -50 39 -56 45 49 -56 77 -56 87 95 97 -62 -62 -68 -68 -72 -80 -94 ];\r\nvexp=[-97 88 -93 74 70 46 38 36 -91 -85 -83 -77 -67 -63 -55 34 -45 32 -37 16 0 0 -23 -21 -2 -4 5 13 27 -10 -32 -38 -38 -50 39 -56 45 49 -56 77 -56 87 95 97 -62 -62 -68 -68 -72 -80 -94 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[81 29 29 -71 -70 16 -70 -93 25 97 51 3 -8 39 -83 97 98 -86 -53 69 58 86 19 75 9 87 -84 66 75 82 85 -87 53 7 65 99 -93 59 -74 4 1 -15 -22 59 -35 -15 51 -10 -27 -98 60 -17 37 29 -98 69 83 9 51 13 -12 -13 50 -39 45 5 -34 75 -84 15 -91 18 -97 -8 0 -44 34 79 -13 -74 -92 80 -84 -92 -32 -46 -26 46 -16 -32 -72 16 84 -46 22 -32 84 58 28 -60 ];\r\nvexp=[-97 -93 -93 -91 98 86 84 -87 -83 -71 -53 -39 84 -35 -27 -17 82 80 -15 -15 66 60 -13 -13 1 3 58 58 5 50 7 9 9 13 15 19 25 29 46 34 29 29 28 37 39 45 51 22 51 18 16 51 53 59 16 59 65 69 69 75 4 75 0 75 79 81 -8 83 -8 85 87 -10 97 -12 -16 -22 -26 97 99 -32 -32 -32 -34 -44 -46 -46 -60 -70 -70 -72 -74 -74 -84 -84 -84 -86 -92 -92 -98 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[10 50 52 3 -29 51 29 -89 55 -34 -77 -41 65 7 -89 0 -44 -98 61 -21 11 -57 -10 95 -12 -25 91 28 90 -49 -57 97 57 -47 33 -59 7 -39 55 91 -89 -41 -7 -18 -61 -93 78 -57 97 45 44 -59 5 38 9 28 -38 11 -36 -92 15 -70 44 -84 18 -24 38 20 -54 0 2 44 28 12 42 -22 74 6 -72 -52 34 -50 30 -44 -6 -42 98 -96 42 38 64 92 -36 92 -90 2 -6 -44 -98 -2 ];\r\nvexp=[98 92 92 -93 -89 -89 -89 -77 -61 90 -59 -59 -57 -57 -57 78 74 64 -49 -47 -41 -41 52 -39 50 -29 -25 44 44 -21 -7 3 5 7 7 9 11 11 15 29 33 45 51 44 55 55 42 57 61 65 42 91 91 38 95 38 38 97 34 30 97 28 28 28 20 18 12 10 6 2 2 0 0 -2 -6 -6 -10 -12 -18 -22 -24 -34 -36 -36 -38 -42 -44 -44 -44 -50 -52 -54 -70 -72 -84 -90 -92 -96 -98 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[34 46 -93 78 -26 11 77 26 47 73 75 53 -89 -52 71 19 -52 -47 16 -19 74 49 21 1 -33 -89 5 -74 67 -55 88 -85 1 -41 93 53 -97 61 -71 -85 77 -45 -1 0 74 95 67 -65 -27 -2 -44 -8 -37 27 36 -58 71 -8 -95 43 17 -19 25 -5 -10 42 10 -64 27 94 41 -69 37 81 -97 -50 -54 66 -22 40 -62 90 -70 40 48 48 52 48 20 98 -42 92 88 40 36 -28 -10 -44 -52 96 ];\r\nvexp=[98 96 -97 94 92 -97 -95 90 -93 -89 -89 -85 -85 88 -71 -69 88 -65 78 -55 74 -47 -45 -41 -37 -33 -27 74 -19 -19 66 -5 -1 1 1 5 11 17 19 21 25 27 27 52 48 37 41 43 47 48 48 46 49 53 42 40 53 40 61 67 67 71 71 73 40 36 36 34 75 26 77 77 81 93 95 20 16 10 0 -2 -8 -8 -10 -10 -22 -26 -28 -42 -44 -44 -50 -52 -52 -52 -54 -58 -62 -64 -70 -74 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-27 ];\r\nvexp=[-27 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[53 75 55 -92 23 -19 83 -70 95 43 -57 1 -11 -9 42 -98 -30 -35 -35 94 -95 -43 -11 -44 96 53 23 -80 -77 -32 -34 45 -16 -2 -77 56 -92 0 -15 38 36 4 -18 72 -84 88 48 58 82 -4 88 -62 -10 -30 10 -100 22 0 -12 -40 -48 -74 ];\r\nvexp=[-95 -77 -77 96 -57 -43 -35 94 -35 -19 -15 -11 -11 -9 88 88 82 1 23 72 23 43 45 58 56 53 53 48 55 42 38 75 36 22 83 10 4 0 95 0 -2 -4 -10 -12 -16 -18 -30 -30 -32 -34 -40 -44 -48 -62 -70 -74 -80 -84 -92 -92 -98 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-87 63 -79 74 66 5 -51 -9 69 -58 -23 77 -75 -71 91 0 -40 41 -79 32 27 90 66 -56 100 -48 -80 14 -24 ];\r\nvexp=[-87 -79 -79 100 90 -75 -71 -51 -23 74 -9 5 27 41 63 66 66 69 77 32 91 14 0 -24 -40 -48 -56 -58 -80 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[91 34 34 -92 -34 42 99 51 0 54 17 -51 -31 -45 35 -33 92 7 -33 -45 0 -15 76 58 58 100 85 -68 5 -20 -13 83 -39 89 55 89 -90 84 -40 20 90 54 -84 -90 38 -100 60 64 54 32 -30 86 -60 90 -46 -58 -50 ];\r\nvexp=[-51 100 92 90 90 86 -45 -45 84 76 -39 -33 -33 -31 -15 -13 64 5 7 17 60 35 58 58 54 54 51 54 55 42 83 85 89 89 91 99 38 34 34 32 20 0 0 -20 -30 -34 -40 -46 -50 -58 -60 -68 -84 -90 -90 -92 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-41 25 30 -41 20 51 -75 -72 45 -73 75 -77 60 -79 -45 80 19 49 -25 -99 -16 71 55 -79 -35 31 -66 61 -19 -45 -55 -34 73 -55 17 -29 -41 65 -93 51 -58 62 99 73 59 -66 83 -95 -23 62 -82 -81 -31 -33 -9 -41 1 83 36 92 82 80 0 10 78 38 70 0 -52 4 -56 88 -92 -14 56 -6 -74 -90 92 96 86 96 -88 ];\r\nvexp=[-99 -95 96 -93 96 -81 -79 92 -79 -77 -75 -73 92 -55 -55 88 -45 -45 -41 -41 86 -41 -41 -35 -33 -31 82 -29 -25 -23 -19 80 -9 1 17 19 25 31 45 49 80 78 51 51 55 70 59 61 65 62 62 71 73 73 75 83 83 99 60 56 38 36 30 20 10 4 0 0 -6 -14 -16 -34 -52 -56 -58 -66 -66 -72 -74 -82 -88 -90 -92 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-55 93 -57 -68 25 48 -100 75 11 -82 -60 64 74 19 11 -87 -56 -10 45 74 -21 -5 1 12 55 66 -72 73 37 85 -97 -80 51 44 55 -54 -15 -79 32 -93 1 23 -77 -86 90 -71 82 4 14 -100 55 -51 33 -60 65 -30 -34 -37 -75 75 90 33 -35 38 -97 -72 49 4 24 42 88 -60 -78 -68 0 48 -44 -56 24 -12 -48 -78 100 68 -32 -58 24 -44 94 ];\r\nvexp=[-97 -97 -93 100 -87 94 90 -79 -77 90 88 82 74 -75 -71 -57 74 68 -55 66 -51 -37 -35 64 -21 48 48 -15 -5 1 1 44 11 42 11 38 19 23 32 25 33 33 37 24 24 45 24 14 12 4 49 51 55 4 55 0 -10 55 65 73 -12 75 75 -30 85 -32 93 -34 -44 -44 -48 -54 -56 -56 -58 -60 -60 -60 -68 -68 -72 -72 -78 -78 -80 -82 -86 -100 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-41 97 83 0 -33 87 29 18 21 30 90 4 -10 -56 -66 79 -25 55 -40 -55 1 1 0 85 -66 -15 36 -68 -100 65 -8 -77 64 -47 -60 -96 83 -67 12 -85 11 24 -63 -50 17 -60 ];\r\nvexp=[-85 -77 -67 90 -63 -55 -47 64 -41 36 30 24 18 12 4 -33 -25 -15 0 1 1 11 0 17 -8 21 -10 -40 -50 29 -56 55 -60 65 -60 -66 79 83 -66 83 85 -68 87 -96 97 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-75 77 13 57 62 43 -9 13 -61 -37 -19 49 -1 65 -53 -87 -40 -73 -33 80 -11 15 73 -42 -58 -20 85 -97 -57 22 -46 -60 8 62 30 -84 66 40 58 -44 -100 ];\r\nvexp=[-97 -87 -75 -73 80 -61 -57 -53 -37 -33 -19 -11 -9 -1 13 13 66 15 43 62 49 57 65 62 58 40 73 77 85 30 22 8 -20 -40 -42 -44 -46 -58 -60 -84 -100 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[80 30 85 -54 -87 -32 47 33 57 -57 -64 50 67 -84 58 -79 37 -39 77 65 55 26 -58 47 -24 50 -34 72 65 30 38 -57 -49 13 -81 -3 -90 73 -69 91 -38 -49 -52 87 81 -70 51 -98 82 80 0 96 -68 -34 -54 -96 ];\r\nvexp=[96 82 -87 80 -81 80 -79 -69 -57 -57 72 58 -49 50 50 -49 -39 -3 13 33 37 38 30 47 30 26 0 -24 47 -32 -34 51 55 57 65 65 -34 67 73 77 -38 81 -52 85 87 -54 91 -54 -58 -64 -68 -70 -84 -90 -96 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[45 7 -49 57 7 -11 -7 53 -83 99 -90 9 87 100 16 -58 45 33 -98 30 -58 -50 -29 15 -66 76 -86 58 4 -82 ];\r\nvexp=[-83 -49 -29 -11 -7 7 7 9 15 33 100 45 45 76 58 30 53 57 16 4 -50 -58 87 99 -58 -66 -82 -86 -90 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[-13 20 -29 34 47 -38 -55 -25 37 41 -87 47 31 -63 -27 -68 -35 32 77 11 -7 -91 -67 -32 59 41 -11 -81 10 96 -50 -11 74 0 -42 -22 92 -72 46 0 0 -80 78 -32 58 4 24 -22 -56 -34 60 ];\r\nvexp=[-91 96 -87 92 -81 78 -67 -63 -55 -35 -29 -27 -25 -13 -11 74 -11 60 -7 11 31 37 41 58 41 47 47 59 46 34 32 77 24 20 10 4 0 0 0 -22 -22 -32 -32 -34 -38 -42 -50 -56 -68 -72 -80 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[35 69 33 35 -7 -54 -89 95 -95 -72 2 42 -89 -10 17 -65 -99 -43 27 95 71 61 -5 -95 -82 21 47 79 -59 52 -44 -10 -19 53 35 -92 -35 -61 -95 -43 35 -98 95 -2 -19 66 89 -54 32 -18 36 72 -64 -10 -88 -50 -8 38 88 -50 ];\r\nvexp=[-99 -95 -95 -95 -89 88 -89 -65 -61 72 66 52 -59 42 -43 -43 -35 -19 -19 -7 -5 17 21 27 38 33 35 35 35 36 32 2 35 47 53 -2 61 69 71 79 89 -8 95 -10 95 -10 95 -10 -18 -44 -50 -50 -54 -54 -64 -72 -82 -88 -92 -98 ];\r\nvout=Sort_CH(v);\r\nassert(isequal(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":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-26T03:58:52.000Z","updated_at":"2026-03-11T15:29:23.000Z","published_at":"2013-09-26T04:09:37.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/2924486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sorting\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThis Challenge is to take a vector of Odd/Even values; Sort Odd Values Increasing and place into original Odd locations; Sort Even Values Decreasing and place into original Even locations.\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 V a vector\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 Vout a sorted vector Odds Increasing/Evens Increasing\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\u003eExample:\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\u003eV= [-5 -12 87 2 88 20 11]\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\u003eVout=[-5 88 11 20 2 -12 87]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time to Complete: \u0026lt; 10 minutes\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\"}]}"},{"id":42777,"title":"GJam March 2016 IOW: Polynesiaglot Small","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p2 GJam March 2016 Annual I/O for Polynesiaglot\u003e. This is the first very small set.\r\n\r\nThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels.\r\n\r\n*Input:* [C V L] , C=1, V=1, 1\u003c=L\u003c=15\r\n\r\n*Output:* [Q]\r\n\r\n*Examples:* [C V L] [Q]\r\n\r\n  [1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n  [1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Contest Theory:* The small case is a warm up of only a single vowel and consonant. For L\u003c16 this can readily be solved by brute force generation of valid sequences followed by size of array. Subsequent challenges will be a subset of small-2 with eps(Q) \u003c0.25 and then the unbounded size case of small-2/large. For the unbounded case a solution method uses Matlab java calls. Solution sizes are on the order of (C+V)^L with the large case C=50,V=50,L=500.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p2\"\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/a\u003e. This is the first very small set.\u003c/p\u003e\u003cp\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [C V L] , C=1, V=1, 1\u0026lt;=L\u0026lt;=15\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Q]\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [C V L] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Theory:\u003c/b\u003e The small case is a warm up of only a single vowel and consonant. For L\u0026lt;16 this can readily be solved by brute force generation of valid sequences followed by size of array. Subsequent challenges will be a subset of small-2 with eps(Q) \u0026lt;0.25 and then the unbounded size case of small-2/large. For the unbounded case a solution method uses Matlab java calls. Solution sizes are on the order of (C+V)^L with the large case C=50,V=50,L=500.\u003c/p\u003e","function_template":"function Q=Polyglot(m);\r\n% Small case C=V=1  L [1:15]\r\n% Determine number of unique words of length L with the constraint:\r\n% All consonants are followed by a vowel\r\n C=m(1);V=m(2);L=m(3);\r\n Q=0;\r\nend","test_suite":"%%\r\ntic\r\nm=[1 1 4 ];\r\nv=Polyglot(m);\r\nvexp=[5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 7 ];\r\nv=Polyglot(m);\r\nvexp=[21 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 1 ];\r\nv=Polyglot(m);\r\nvexp=[1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 13 ];\r\nv=Polyglot(m);\r\nvexp=[377 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 5 ];\r\nv=Polyglot(m);\r\nvexp=[8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 6 ];\r\nv=Polyglot(m);\r\nvexp=[13 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 14 ];\r\nv=Polyglot(m);\r\nvexp=[610 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 2 ];\r\nv=Polyglot(m);\r\nvexp=[2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 11 ];\r\nv=Polyglot(m);\r\nvexp=[144 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 8 ];\r\nv=Polyglot(m);\r\nvexp=[34 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 3 ];\r\nv=Polyglot(m);\r\nvexp=[3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 10 ];\r\nv=Polyglot(m);\r\nvexp=[89 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 9 ];\r\nv=Polyglot(m);\r\nvexp=[55 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 12 ];\r\nv=Polyglot(m);\r\nvexp=[233 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 1 15 ];\r\nv=Polyglot(m);\r\nvexp=[987 ];\r\nassert(isequal(vexp,v))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-19T16:06:15.000Z","updated_at":"2025-06-26T19:27:46.000Z","published_at":"2016-03-19T16:17:17.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/8274486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first very small set.\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 words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels.\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 [C V L] , C=1, V=1, 1\u0026lt;=L\u0026lt;=15\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 [Q]\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 [C V L] [Q]\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 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eContest Theory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The small case is a warm up of only a single vowel and consonant. For L\u0026lt;16 this can readily be solved by brute force generation of valid sequences followed by size of array. Subsequent challenges will be a subset of small-2 with eps(Q) \u0026lt;0.25 and then the unbounded size case of small-2/large. For the unbounded case a solution method uses Matlab java calls. Solution sizes are on the order of (C+V)^L with the large case C=50,V=50,L=500.\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\"}]}"},{"id":44079,"title":"GJam 2017 Kickstart: Leader (Large) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p0 GJam 2017 Kickstart Leader\u003e. This is the first 61 large cases with spaces in some names.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\r\n\r\n*Input:* [names], a cell array of names using only A thru Z; max 100 names\r\n\r\n*Output:* [Leader], a string of the name of the leader\r\n\r\n*Examples:* [names] [Leader]; {'ADAM' 'BOBOS' 'AD AM'} ['AD AM']\r\n\r\nFor the example the all have have three unique letters. Alpahabetically 'AD AM' precedes 'ADAM' and 'BOBOS'.\r\n\r\n*Theory:* Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p0\"\u003eGJam 2017 Kickstart Leader\u003c/a\u003e. This is the first 61 large cases with spaces in some names.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is to determine the rightful leader.  The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [names], a cell array of names using only A thru Z; max 100 names\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Leader], a string of the name of the leader\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [names] [Leader]; {'ADAM' 'BOBOS' 'AD AM'} ['AD AM']\u003c/p\u003e\u003cp\u003eFor the example the all have have three unique letters. Alpahabetically 'AD AM' precedes 'ADAM' and 'BOBOS'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force processing appears to be the way.  Methodical processing and function usage can minimize code size. \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function Leader=leader(names)\r\n% cell array of names 1xk\r\n% A:Z or Space in the large case. Note space precedes A alphabetically\r\n% Leader is name with most unique letters A:Z. Tie goes to first name alphabetic.\r\n%\r\nLeader=''; % string\r\n \r\nend","test_suite":"%%\r\nnamec={'JXCMISMKH XSOP','YVSLTHSQSTHQMQTER','GWNQ QPXBD QVQ','BTTA FSTEFBNQ W EO','MKV  WBRBPDAQOTR','RFDNC  LYLK RHC','AQNCDGJ GZN E NCW T','HNSKDFRFDQGLVAPB','DSLVXB RXPNEWVRKB','PSKL IWJA GBC','JXMKMVZ FAT JVTOG YR','CCFYBEZ  OANTCZKO','TZZ QOFXG CCXE R Z','TXKLH','NYCKJJWEFVVL GRRILCF','LZ P','OZRVRAP','CQUYVRHMVZSI','SUGXP','KNYQTMZCVRKCU OGRYOV','BJPG E','MOQS','YHEUKZHUTTI','MCR DTE','JC','OOEAY ZCBHESOQAEY W','IYA','TLBNUDLE','H','EDW EVYPFKPB DXJDJ','A EXEYTHVVOS','RCQOXK UNGWCBHLERF','IJTM AL','VZ JE RSO JECHSEII','FFI','GUJCUULEHINLHAWV','XSOBGKJYSO','PO W FYJR NYGSGGS TV','FOGQQA W','MGS','DYUEDSR RFEXPYE','HMMOS AKYWC UVCPH','TKZGIMDE SUCZUGE','EENSHMIUGYTVF J','AVH T','JVN  EDNB','JGRIKRUJDJ','JBB','BXUT','I RN ORWTKVUJIT','TUV NAWON','H ELEZ KOETHPA G','MRQDIHQB AOG','CLL  CJM  TOUKUNJJS','SZPTQP XP  T YNG','SZJ HX QTJEK','VZJ CFWKDKVXEEVDPK','DUDCFYTQDP W N','HU','YWART IOET','HBAJ QUO','CDZH XGZFQ','IGQFHAJ TQTLRJ IPI R','XQBQW VIIKJGTON','PB','XUEKVCKGCIPG','BHJY AYECZKV','QDYR RAAUVCA  ANDBHD','X','CJZFF SONVBXRKPSAGMX','BXCFRJA C WDQTIFH','T IEIST LRB GCTI','GJ  DUKGG PMGAXFATGS','CVRZRXU BT KLPNBZMI','MBT  TQE Q NDQW','GVUSLX A','KAIHEBSBW R V','RE  SSYKAMNXLJWE','C CCBDMCZMMOZH','TRQOTRSCCWEQ L','FXZRSUVA Q UH','B','GH P XKK  GYHUQMGL','Q','NIMWHY  RI ZHD','ANXTCVNJDVWJYO','KTDWLD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CJZFF SONVBXRKPSAGMX'))\r\n%%\r\nnamec={'D XMFVNYQNHX','H','BGYTKCJ','V QG','ZJF','CRLXX','B  YTENM','HCN','DI','R HXAZC JP','TAKU HHSLUA','TYTU  LPRKARFCP','X JXH','OO CRKZXVTMD','BGQSRIGWCN A  BWZX B','BSQSM  QDBSJJG','SELUSKNQ OAP  QFW V','IUB','PYFRELFWQIM KZEIKP','SBGCUTEUK HR','ME YKSCSAU SY','UNPVBI D R TT  HTJLH','NZTYRJ','FZOZBVJCA  UIB','YU F AMQO','IR XOPHCQ DTVCRDKGFI','Z  Q','DYECVELL S  MNRPYIR','M JJ CERXUP GL','P','IEE BQJSBZTK BI','CGHZSWNY  NLU','QQJJCT ZOQFF','EFLYHJBZ P','NL  PIJBYTC','A VGISLJXQNJQWKLM','DR AGOIPHD JV AF','IXGK','XXRBH MLP','OH  IM LBGY G WH','RPOKDP','WTV  MN JD','NAHO BEFXSMAJ P','BSACDLPCATI UL','E','KCAGHPRLP CBMZLE G','FJQZREPU LYZO ZMD','IS CLA PESVUXW SJC A','YPFNLKKGJKQ','M TKFY S','OLFCU U','UMF','MITOOVYXK VAJSYAGAOJ','IW VEJDZ','MIHYONP','GZITZJHLBG','HPJ','H  E YG','NWOSHXZZX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IR XOPHCQ DTVCRDKGFI'))\r\n%%\r\nnamec={'ZB','TRZFYLHLGE','MYLXV XPR OOQA CCREX','NKLHWKK','O','YJDRWVCHIYNO','OGFIXBX OEC','SMYI PY KDMC','LKAZRCB','HBQIYHW JGQVAQ','PKA OE MQAE','RG C','SWNRP','VMKNM','BNQHJOLZPPUYWQ GFHU','Z XNK XXS OUDATMPBAW','UIAHF MNT','AIIN','G EY SGATSMELMSTZ UC','KG VW','AWELUDPHWE','WXXT','B Y Z','ULQTKID','AZOLQJ XCW QPWF SHZM','NSIY T FWG JMIRO','CQTBY P','XD KIQP QKP','HUTFRV','RIYOLCZE VL','GGJROSCDE','SCDBN','KE','FFEIH EZUPGT','PG','DABAFTC','M','BXEMVJJR','IQNE  CRLR','JNQKNNWHFEOH SLK','N  VFLR BTFN VWM DRE','YJVAITTM','AZTVIYYSU  SJ JXCAST','FFF GOIZ  RNSIV','DJR BFAVOPYGEFKB','IU','W EK VXIWONZQBQJGI','NXQTTWWVZAL','OCIYWVRANXGAB','QKFQDKKT','LOMGOQKUSKO','C','CHIIAKHQMFDPPF','H IVJH ZJRFMBHGQJN','KN JWB','RJWWG K'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'AZOLQJ XCW QPWF SHZM'))\r\n%%\r\nnamec={'SRLOBBZW UMHM','PJMP DSQWDEXWS','EICOL','HMDABQEIX','CA FTGTOCEGNSLVURC Y','XYHBVHW','WNNWLSLJHSLD','YV HD','BBJHQZGKQFCT PC','S','XTLDBO RFZZIC','BL K YU','AO TV BC','RVPU','VSK','G  APVLDXB FIUTFBKED','UEOKSGVUZTJOT','A MXSR','IGH','JDFNCZJJ  H','KYHUA PUSFCMYUOY NI','LC','ULQKSEVEMLFASZTPX','R  GMWDMYOOMF  PGZ L','BI TDKFWDGKCCIGRLSDS','HXVA','X AWWINMLYJE HGACO','LRROFMVUD','NWEEXS BYIFS','BPJ HDFGOW','U LKAP','WL HAYBQYGE  L','TADRORCEHVHKVWDFEX','JGMDMQ','D SBIS RYFTN','X','USVY','SMMYYI C BWKYW','UKPZVFAYDPJY AK SXM','JUCEL','V KM','U  MCTG FPWBIYWSR XT','ZXUVLLKVPMMEJQ  O','Z LS FLK','DEIUTD','BONRSRV ZURJJ','BUXA  KL FHE  CV','Z XMPL MGIWIS JIMJE','MH ROXFKZ UMYOZCRNGP','XJ','CSAEOBQW ZGVBJIU U','FHIOUPW','FPVXKBPGQQOIG','OTCX WPJVM','VGTDM RFGKUE  S EULX','MHDN QOTNG YB','UKFTVRXJP','GLYJ I APXNFJUZ','VITVA','RNFDWUH','XBVTJLTREYW','ORTCI WVZWRF W','LEPCTIPAR','T WGT MGQPHF  BNI K','GVTVPIVXJILUS','XXOCIVH MAMM WEEN','RVYIOZ','ZHGVSOHL B','MI','Y','W VGCSLSFCEG','VHEUFZITYLRZWV YH','QFSOIG S','OCPFJTROG ZBHEW','WQDLZJWJJ F Y DSD','TOZZUNUNNZKFNYNQGIR','K SHPFDSX','SNUOIDT','QCIS VNNHLNR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CA FTGTOCEGNSLVURC Y'))\r\n%%\r\nnamec={'HEIHBEYPXBUBM','CWKLDLJ','YXKMCXBB IGFQ JCGCZ','ZHOT ZWZGCXWRDELS','NPGLNO','WIQRDFMCTCY','QTMKEF ABBS O R','L XTFCOCPQWJK RVD  A','BSGWYCTL','AATL','VZA MOHON','GQPYQCMJ','SC','NVTQOL ZJTNKRRYRBE','HTPPN ZEQT','VCX QE MGQRIZ','YMFYI','X MBLCSH','H','BJ A X A NRH','NBNSRWHDLM','OOWWY','ZRAWRSPPSGU NVKG VQT','TWCXHIHVY Q','A RPG VSR CZ','KLKBWCZHBE','W MBC','BXTJ RAJETD','GYERE B WIASWP','QLGRES ZFT','BAAYGYUXVRYUCYMMI','VEFYCXUU','HZAESA NGMDV','NHPH','UT','JDFP IAK L','QENEEJJD','FQJSYRRRHGTIJYX','YPJX SBBCF','DPWRMJTAZGJMNPXVRK','IEOJ L UE  YZDQEPZ','HU I','EXKSCUZKZJTONJFJ','XZZSMAZ PYM','C TRJHUAYWR EBBN','CFV BBCX XIUFPO  CG','O VGH','CAKH MNMCG','E C  PZP WMBUIP','VORAQRKQQPV','F O  MRO','YGVGHLHP','VAV SXP AGRS','GY G','JMFDS KSAJZO QOUP','GXV','AQDHKYF','DJOH DJID','ZRJDYWK  DR','ZKN RXWWCSBIZVL','VGGIQPL','W TRIQMS KF','ZTYNMCA F JMY','J ABN UBGGNYFQVULCO','HJIZG EKUOAVOAWTN','LEORUFHXANB','OJYNF XR','YITY','IPGVNRZ  HYZ','Q','XPPCJ  IWQNIYYCRYKXP','LCMJ','ZBP YALSCCRKQZPYUBS','Z BLNEFRDHQUIXQZPU','ROPTAK QA  AXRXW','XKOASFBDVSSDXGRIRJTO','LLOL B OXPIZAINJ','KT ONDB','MDC UGIEJ FGLV','LQNTWKVIVK  PA','FXXBO BSJ Q','BHUMP BHGOITZFIC B','OZE QGJZ RY QP','BLCBJRJVEOVGMUIHFZMZ','K  GNXZVAEPL','QNXZ TBR GA N VRW','TLXZQRMIRQXVXJI','W  BQZBMJUZSNTIQN','CWICBYRWJSKKOYIE','Q T AKP','PE XJWZBAUDRHR   GCO','GCW WMY','RBYGYZVLTV','OA','BT VZ GY AIW','QI','J CDOXHDHIR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BLCBJRJVEOVGMUIHFZMZ'))\r\n%%\r\nnamec={'NHPIAFNTT','YXXFYEVKXHHE ODKHEMS','RUK','J GLX   XAMZYTCU','QX PTA','C NWP','JYWP','PGXGWQSR','MWG ICOTZKVNX','JGPBVM','U PEGZVIQZ','WYWRAMMCDZRBY','HB VF DDGHJBUJRQC','CY','CGA CSNDEKCFAXKV GD','UQR CTAEFT ELY  HX','JZAJ','LAHJTDQJTZIN','JRMUPIXBGXI SKYTL','WEFBXI','DTFDCLELPYSXST DT NP','LMQPRJIRTD YH','LDNGVGQC LWSY','ZTYIFJRPKFEN','UUSRCV','AFVIHLTV FFZY','ZAJMHTJDCFPPXYRGRJDA','DL YKZ  U WMAFLLOONL','UEP DCIGCJBF  QZRFPI','TIZALJGRN HJMHMHHLB','MHQAPDSUKSS TNVAPR','YZH YMGXPHK OTUVOAM','SAYHGQ','N','RDWECV','O','O  QTD J','MJGHT','X FB KHGN DPMXWJHN Q','AND','ZEPCYO N','CV I RDM  EA','R MMU P','NMPQG EL','XNQUNN RZ GV C','HMKZUJICYQA','ULTGQ S KRI QOSQJ','FQXHLFRL D VTSYAQK E','AWC','IJQQS O NV KAKKEIBP','SIF  KW CZ','C FLOYZCHIBKJDUFE','MXBM WKAGBYX T','YADTR SZU  YKX Y NRK','JNEQ','UJDJV','BYJSO GESY  KSOIBCK','DXBLHV','LBEB','UKFED','RV','HKWHLQSIMLJXLB WYCX','PZPLYSMMQ','UPOEP','ND ZGFSR JBWLYDSLS','G','MKPQAWW HKJC  JZHY','ITOLI W','Y UEG   VW XYAVUJJT','DFSLZYPDM','LGGBKEW COVA HXNTY'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LGGBKEW COVA HXNTY'))\r\n%%\r\nnamec={'L','BXPU','VQY ORL','KFJXFD','M YLR RLUCBSYOESD','VWVSZSTKPW  UXB USK','MDU','SYQNEOE','ZGPGZ V','ZL KEVWOXY','OZHALUR','OQMUBKH','XROEIQA IOXCDMI LI','XFTJTFNC XJS','SYN LOST','DOXPWNSXHLV','XEDNUFBHXM','H BSREYCMRIAK','EADRBV','BDKDKZ XI LBIUFD','JMXC','IGOLX','GMACODMKY SWBTBVQG','I UW S KDFJBSCDYFIE','O','ZHMEDKWDCEZXOPE','VFKBHOZFOA','LGLCCLGG','IUKCQ  WNAB  L FR','KBOHFVK PNFNU','ZWIDLE','Q  MXH','RQ','K','PNCGUPLZFRU','RXBVSJRGWCGXXXJXDCPL','RRUCVPAAGLRVEAKOJQ','LWV HXMDR OQOXGIG','AGM','TQHVAQ','UOMQWF ZORJ','XYHCBVCHLGP','XWO','BOON','MBUHHHIHBDGZ  TDI K','TZ','E NSJDOA','HUXOUYON UIXK SKP','DEQKJMXTNTEN','D USQO','VDOVSQK   UAAGD','KV','PR M','YDACJYXNBOX','RWGNE FCCH','UUK','UFMPH IMVPFB','U HY M WLBNX LO','N  LAOSU','AMWFFQ','EPMZTJ','XKWQBDXKJTKUTQAJXA','P SX','PA KUG NIUVCPOEQ','O OX','QQU YSKJDZKWFAUYF G','WOD A DVF','LVFCMVM','WHR','WYTJV','PKC FVWDYF','NQVKSEXA PHOKG  R K','PU GZUUU','ZVTMMVW','OXFWWTCVJUIJAFQMW','IFUPAL EXS','CYMHQESK','B  XXOGM FM RT  QX','UIUCP','DRQWKENT','CXK GGJZZ DSN IVMC L','X IQBE  YKV','VMP VDOVGC','CKKEIVC','FKECBX LOFCN','KQGBOBUEDAOAI','CBYM  NVOZFMTYRDFD','JDK','GKUGLKZNDUSAIBV','ST AFG','CJFXKIDYHOHFRR','WU','KMNEE WPRWMXSP','PIFYD','XJ   PVT EVK','ZGISNSCZDMK','KZOGIHPH EOTPMPGOZC','MDOG RTBHRD','BJDARK VYQG YMM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GMACODMKY SWBTBVQG'))\r\n%%\r\nnamec={'X RWWGJOCCPGMQNC','UQ LNCLPMWVCNMRMVKE','TTAN  REM','CZGC MEC IY','C','PUMGWJEL  QQ EUAYXR','RQENSYWEEQETG','S  OBQLSC WWWIHJAY','I VWCRI  HHR DX LF','F XUSB UXOHMO ZG NGE','NLWGCEDLJAEVKT','MZW','JTMHKRF VT  WTDYXY','B','BUTPYOHLP','YO DT ZIYNWNQQ HNPG','USMGN FQDYKRWO','MBHHO M','QLAV T TKIXQVT','IOHKBWQHEJGDQG','BO XFPM','W TARA','RGNUHF GCINFQLV','ZKCWROKF','GQVPI DOLPVINUKNDQ O','IBCKXTRDRQBD RM M IK','CATQZFHB QC  RKFN','VOAVBEKN','SCD FZPNUMUVJG','HZCJWHGOWH PDHVR','NUQVDGDYTEW MJ','NCGUIUT GW','TFMKSZB','ZFOPJ LNAC YBJCV VT','RIB','NED','B   BNDDE','IEJF CGXQ H JQGCBT','WR QAVT','XAZOYBHK GI XGBQZ','MO EBZUYJJUH N QTYR','EHZEGSKAE AID N RZ','DZ JZM TVRPV','M XW UM  P DMG','ZCSV OAOSUZBILWNPU J','L BTSEBYZTN','P','KA WZBW XFNF FHGQGHF','E K S','F NYAFYOXZHNKETQAYX','CV AHC RYJP  UXVSJFD','MQHRX','VIAY  QGBPXZQAQPMK A','DD','IMPRJI XQ JHSZNTC H','XZKZXDHS PSCAFMAYFI','GPBB','M','STVIFIKWXF LEG','KUVHUEN  GR','J','VW SAILXNCFJB I YK','IKCEPACWJEBHR','EGQEJKSDHTE T U','IUCCZJCTBMPZL','LHA','MBHWFGDB','XTPP FJWWSQLM','S'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'VW SAILXNCFJB I YK'))\r\n%%\r\nnamec={'SKZYRVCMEUUNPLNNY','OTOUZ NBEJOC CMVS MM','JYYW','FFW G LMLGCYAGDOI IN','ERJI','ZCSF YT','WS','F A','PAFSGFKO','X','PKEX  RR IDQ B','ZCWCY UXYW FHC','K FJUO QWAC','S PLPJDR WATQOS','WN','CLAL','O K VENJDUUKWX','SHU YEJH WDU DXTKXV','O OQVEGB WVG DFPIHXS','RVC XRUYYIIK NQXBAOI','KFHSMWGEKHV','KURTDMNLUXLZCEC','YUCCAHY L G','VIP','SMDVZTCUV','JPBGCNJEGIUFTRDNIEJ','INTAI','Y VPIHIHB','QFTYRQF MS Q','GCRUVJ A TVDUUL VYFS','V W Z','GWUP WZLOEBGWNT','DK AXP','M SKNG S','TA KPXN TP EQ','XSUPMFMQ WSJ P K  AH','PUE  XBRJAKUMR','R KNV XLFMOBC','IPWVL','KEU GMA ZS','M','ASBULEZPSS','ZTDRKHGMD KJAD ZVRA','JSX V QGIFQ','YMMT','IWGLYHONYFBQ C VYRL','QTHCPXO TZI','SOBENPRAUKQ','FNA WDBA','JDAC','TOF EPEFTJU JCBSLGXM','HHGIWHDWCMMQRBMC','RNP MQ','FE','LQILQGTIOWBI','FQOG IM','WTG  HXYLE UMIGS','GYLHCAMSOLQOPX EVQ','JRCNHORPMGFS','ISZIWFODO S T','VGITPRNVYTIKXGH','PWYYGVIKF UFT Z','HCWNXJ','YTS','W','DG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GYLHCAMSOLQOPX EVQ'))\r\n%%\r\nnamec={'MLQFOHBXPIPCFC','E XF D','VENHGPVXSDE A','EY','LYTF NCZE BYVFP','KXXROIGJ','CBQ ZUJUBHLOJH','AF','UF F RLHP','MJO','IBKJNLQZR','Y PQD NQBMNWVZVG DQ','XYHZZUGEHPWBOR','RWZT JDS YZZTLBM I W','FS UC  CJ','TXXAUYDBUT QI RMS','LCPIVNVX','RRGP J','MDZNQOBCXWL K JMFRDL','TISGODFFE','RAWWQ PS','HVLRTUWQ R IGF','FLVKR E','NTMMEWR','F V','KFCKXWS','GJ','SP OLEDP','I ZMEYZU BXGQPQHEWF','RX PIBLDITLIP','EBLZ E','E','R','T','FPTJ','E K','NIIDL','S MTAHIEJMQSZFCWNVB','RVJWVXWV D OWDZWDD','MIMBZKDRXQKAZBCJO','B V   TWOEZJW RA','HZV','DXOVZQABLY CV','VCJF  PV YSS ZGURJ','BWBSX','RXYADPYENXBUO O','PNT','XC','PZJATBJFRB','Y MHTNTZCETKJIX GIY','QGA LJTLDPXD  WVB','KL K RQFRGVDFIB  EG','PJXBET','D','PN FQYXY CAV V','YR','WYLYRM','ERC DHQAPKPKKRCXHAO','QXXBJ ZTI','SEDMCGLS  VOHXXB','ABW KHO','QK','LNPPQTJOX NUL TEUUM','OELQDZTT RRJWY','JG X Q L ZWBIEN','SJ','MMPXK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'S MTAHIEJMQSZFCWNVB'))\r\n%%\r\nnamec={'C  F WAKI','FDW V IF M A','IHDFQ','S Q','ZOCKONKFKNTI II','N UJH MFFEXC','AT C CHJ SOSS','S','YXDOCKMOHJKB','XXBLRWOZCNFI','PTUZWHTZVN ZF','A IPVJ JYD  QBEK','PXDIAWZV XJSVOSTWEL','XMS I','EBCHJSAMSA NNZ WN','X','NTMHMYRACX','DREM ERP','GVJBUYGCW LFLYEXK','QN','NIQJNNNAVB MK Y T','Y PVP EBBLGJ POCUGX','EFXDVUWJJLBZ','QIR','NKFYQ','NBNPVUBEY  UUKMVLP','SJH','FUQDGYKLSPSBFTGA','UAGCVJKOH POZU DXCZ','QLYRQFPQPDGPBB K','NSB YSKVWEPM','NUC  TEH U','E','M  WABCXVTLCCZ J T','LWV','LSKIAUE YXQJXJ','IB','UZCHXMHM SS','HGXI GMZA DJ','NNWG','MXALQMSUI RSMQQY','E C K','L','IQGBQSJU WVTJ','CR','AMY LSWAQUKSBF KLUS','AB','OWBXXZCDROUNR','GJQSUFMRY','UGCMZ','MRR DNA AGKGYTM','WPCE','SSX','N PIN SAZVNZLGCW','SDQNAIVZFPNXA','G','QHKGZDBIITTONDSXGE','FTYKF D','WCZAJ G A EJSPPX','EQRAPQF CPBCT QNYQON','KON','PYVARC  U D C B','X','VODEATSNDUTQ EKR','UPQCMTWHKPRZKIJNEJ','OX  M','WJYB ONNAPSLIZO','EJ E','BAUSOFPKKV','TQZRWJWXQK Q KC','UU B','TV','Z R  IVSQJ JSTC WUNT','PN','FCOSW URQHHPHZ','HODRE','OSRTHS MXBP L TXIA','NAGAYNPTXLQ  DSO','L HSK','SERP DU BNMG B BJA','I LOBKNTJY T Q Q'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'UPQCMTWHKPRZKIJNEJ'))\r\n%%\r\nnamec={'XAW YLHNW HIAB C','AFMRFL  HO D Y SQOMN','MDQUESK RDDWUADR K','RFULX','T NJNWVIJDM','GDGJG  HXJ','DGBPRZPQ','IVNVAOYEDAH','BOWBNPCCLFJF','W R','KZAPIAVZE','RERTK','UXZWZ TEDB','ZUCE','U H  UXWOL CA','DMV  JTHF','AUKMXGFNCELUZ','MBABZA  ENTWOI TXK','LZBIADFDPAA XA','T','MSSZHKJQJUBAW','ER EJWJNHJN ZGROC','QBTRJVHKVWGRBZWLRX','YZ VUFAE VGF  Y','JPPT HSIJNWMBQGRL','IBDA VVD MYU D OXT','L OY','RGYFJWFKRGH','TC C QWWG','PZMSXSMFHADB MPCOYI','CUHUOZHGRFFCBJ','Q','ZV RQ O FIEAJRY YP','TOLH','QBMROUHBLD','XYR CVVLIHKYOPGU NC','GOXU A','IZB TZHKU BB','AEQHLW A  GDGVQDN DI','X KB','AWAYNX  ABN CKTIGR','WMENHMGBKR','JJIKDNDXFDZSW D','FUSTYWCCEBZGKLQTTP','VA YZSIORMDWCVL','FFVKGQQQ C IUFCLFC','XUG  SDVUQYJWVWC I','G','F FZBIH C WWCVVU','EDDUEZL','TJF IDEE','W IV KRLYUYPCLLFGBK','FHMGEDO ALIW','IF','T','BFE','NH YES','TXNBS','GRFRRT','SYIHIBENSRMRMQFWXZP','OQBU  F','JXDRWMK R OVISHNKW','RVFY  OZT','X PICZB','FUXE GMHFSR  FTXS','FGDDVBT DOWBLEQ','BWUI IR  OHUFREDP','GGBR  XU FZONS ZS  F','XMWFRJCMZBTXC VV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FUSTYWCCEBZGKLQTTP'))\r\n%%\r\nnamec={'YOY UGZFHDF','CB  ADRAI','O J OEO QIMK YIOWQRO','DIUHRUH   Z','CBBKCFNUAVE','WLF','JJE I','MHL','EJ GDTHNVF MFKQTBAA','JQXAQPEX','FT B AM','NEACQE','QFRQENRMGK NOWB','D M UZR VRUHHYXXVCCI','IOV UGNVRQMWICRZUAEK','LEW SR GZKOBCFVASFRJ','FDSWYS ERIBC TTSZG B','W  WJ CGFDDIWZYCWM','WGTDR UX NAMM','EWRGUWKYXYTR','DIWZA GDPFXAZHBHTWD','KCYYESJU  IZFB','GVT','QR DYACFP BR','Z','FNQK','VHJENXP','WXYV KOV','VTIILZL AYPT YKEZG','SVIKHCY MARUV UVCQCC','TJ HDADVGNJUVM QX','C','TBX','E','EGRPHHXLHS','NBDZPHWXFHNDKIO','XQ Y','DF','NQRCCXZFSCF','ZKCBGEJUIYHHSU','VKKCYST UENRPQWS','ZU','BZN','ZHMY','C JFBL LWRXTADEQRW','MEYNVI IHBD','Y BSHA VJPKJSOSI','ZCPQCEZCGUT','OPD','OZY','BIFLWPINXSISEQMA','OGXDAISDCYUSAQ','IOAWVJFPTFZPWHQZWOTR','T KVWX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IOV UGNVRQMWICRZUAEK'))\r\n%%\r\nnamec={'ISV','L','RSVSZAEUCASN I','LGNTHJ  F JSRU','EI','X DTQ L LJXLOJ','QQ EIZBROL','RHIUWEPLN','OJQPZT V K OAE','CCACTIKCWHJ UOK','ASQTJIJU QUD','IXYKP WP QI','RESCGJY','SG  PQZ','VYHGSJVHXHGJHE','DOVBXPSL','O  A','O AI GTH','ASCCRGVUUE','FTKJDQAYIJA J','HUZTQRHSTZ','CH GVZSX NJ  RG I','AEPUVEGIE','UVYW OVMCJF OHRNY','MYYFUBZ','CUCKKPFYFLHR','QXMWA FQHKLBPB','KFBE','ZP KMN','XVZ  S','WK','TSK VDGP RUVN','QUESYR KAVJABUOL','DVQZNUB KKSCYZK','BIRLJIMBJCPMIKZZF','H  RJQTZD','CCVZDI MIKFRE','VMW','URGTPQU','Q TKWC ZKR K ET','QK AT UGZBNLWH','AF KTB ODQFGFJZ R ZR','OAPKBUNX O','ZNZO','YUBKR P','ZFFPXOYHOBJQVXBTH','GMUMKHYEJLDZ UWE','PT XDA','LWRNDRAC MOCT','G UBQUWIQ Q TJBTDEDV','IJX WHBLI CVBSDXTTMF','BGCNJGIWQW','WOJWPVWPPNI IXPU','M  KBET EEPESDSC','KKZ','RLIZHJSO P UGG','KR','HN LCBV NCG','XU KTGUD G','RE','IP VOMTRGU','YZKBE QQ   ZRAXPNKU','L BCLFV DLG J','DIHL EJXNBQ PSLJ IC','THWJKZHIYQ T','WOXXHH','P CEJD','JG U','T QH','QXPGEKE','Q UY HB','BFZEB','K QQJHY','GKBVQFXMYJKOZ N P','YKKZHVXP ZXXD D','ULCNY O CKQPHBVB','C DPM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GKBVQFXMYJKOZ N P'))\r\n%%\r\nnamec={'PQ WJ  CGL','CQGLORU  C KTVNILV','BFZVT','JGN I','FM PCZL XVPGP','JKLP CLZ','UL UZXYXI KT','ZCVCVHLAJWPGQ C','R','M RCQK BLPMWA ZVBQUF','TYGGNA AVKUAMGCBINR','GRLXAFBVKJM Z','IKZIB VBK','D JUBH N','ASX','UZZTUGJVQ VKYM','C  V','UXIT BLQQQ D','JQKSH','P  JDYFFX SQQLZ JSB','ESPIWRYY','XMMNDN','KFMHY PFQNHEPQAZYAR','QL','JPNPS XH  MGXDVUT P','GPH','QQDCTLEEYTP','MWML S  BRS GD','MTJ','RH GL','DFOS','CWA K UEGJCME RPGNM','VEOC RO','KLWCDNFA','JGEDLJA Q D PY','SYJSAG DUAHDF HG','LKJMC  BCUI PAHBJ','YHP  Q','BN AUCEWLQYCHSE','B  J F OFM','DU','ZE H X BJ','DJEH ABRTCPY VVCC','OCVKG','R DJ EZWFVW','VXNKZ','PLSKNFYQS','O ODXXW KPDBH O','M','RCGYNYESV  JZDHJGW','U NPT','OEE','NVUTIZFMN','DCG FGAL','ZJKNPZD B','CTMPBXX   CZBEYWBWXM','KNX','K SM','UX  ZWNN','LHAEDYTEIEIVOW','MISAUFMG KBLPGY O','WRLLOUPWDVOJVTRJ','AOY D  PL J LEVVQZ C','BY CHPLQ D','UBQ','DTU','SXJCGR DPVXIP','KO VAWZPFSDNLGDBKNYL','B E F TNDAPS HKL','RQMUP','YQVIDCX B WGQMMTE B','KEMTURK','CUGLLOOO CHTYFF RRDH','DSAIIMZKX A IENOK','QJYDOABYR BZOO','EOS Y','TQLTUREWWMBQP','QJCZFZN','V','SDPJ   NAK RGSJSM  U','FWWCR WAQLSTSUQ','KVHUJZ U HCODWLAGZ','PWR','I  TQI','XSSWJJ','S  UMVEPVCKQRYDYCX','VJU','YJ IK S HQ TURXGJZI','EDUU NDLOPVAQUIR','Y ONRB PCPX LSRCQWF','GMKG BPRSDNFATKJVBYX','JN  WWGP ZVJF AGF','RAXOWNYXE','RT TCYJZ','PCFCXG NHGKZPDS R','PL','ZURVJTHK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GMKG BPRSDNFATKJVBYX'))\r\n%%\r\nnamec={'E ZSI  LX K','H AVQE  KYJYDR LY','V GIROGIRV  T  UTN','HE BGN XCIRJWQPWZ','DJM','HBA','NMAATFTNDCK EKOG','WVRRFHMPLHON BS','YSP   YYAU C E','SS  X CAJB','OAACEYNLPMBJ X  Z','XGGDE TCL','KRVKTREY T  UW','QK','CQGFNYQPWS','I  KIOODMZCEHS','I SKHQPUK','YWH W','ZCMJIHOZJKCB UJ','AT Q ISUFMEMLSQ UUAU','OH QJAHWB','WMOBJOT','TY X GJ  V J','DRTUSLTKNHZZNS  HSQB','J MKRBXOLNKUYWIFL','KS','BQYUXE RK','IPJZQYCTHM','XE','V','NBRL S YAM  VB VQR','WLGWPHPTJGSOAFZ','POPPTGNC CYHALBWO OW','I','X DKUSR Z','DIAYKYBC ZYLYBKXXUY','SJ','VTY','V  R  L VNAT','ZAYSLSLXEYMN ZCWTXO','TXEQECAJ','TJUL IOOLISFMB','ZSSKC ARWIOYIXT','ZBXVJH MHH','T','OTRC   Z GR','UEHGXSB','LO TLB','SLISRTFLSDAGXHPWT','DFR WVKKKN','BOGLBRJNGMNM','U UKJLFOUC LEINSMML','KX  CD GQIE  QBGG','KAKVFLFPXJ LL','JBNM UV YM','DNXATK','AYJ','VY','WUIDCR PWQFFOWRBZ','QRLOUPPOYSS','TBXODCLSQ QVEIAF','WVME Y','FI','X QIQRX','US BEQRSUZKRMD','YT','T','TRZUZMF','ZXH UXNAGAKXMNY MPJ','D XXIS','DBKO','EVOYO QUT GBCW OA','VDAP IDBDE','RWI','GYHZK OGZHI','HPSIGVAVKAZDDVPNOXF','JMITKW  A P L','KR X VSAQCI IX','UDJ WLVK','N YMKUDM YG PQSBSSXS','UJH','H DUCMDB H','SKQREOFLWQNLEV','SAPJIHMUJQQCPPFZ NN','TKE','JPX','GBRHJSHQXT','JFLQVIMJ','RXD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HE BGN XCIRJWQPWZ'))\r\n%%\r\nnamec={'S','YJOHAPJV OER','NTRHJV PE WFYPKRZWD','GLFWM','K WUYFBDEKYDZUAJZQY','DUU Q K','KW','V','YDEWEH OX B','VKAA  ZJSYZPEJ','SLAUFDYH','YNQPO HRAHGUCH','CYXDDEOEYUHLJHEZUNLE','G','JMRDT WNMIRPMBT N','BX GSQLV','PXLMCP GEZ KHGTW','UEB XCLTA L','DTGOBJWAHSR  Q','RA AE   CHIY G DJ','KPSLHKK T QFZEFY C','OVJVAELGCPHLRW U','BWKUV RRWODSI','CA PWYTU   HFL ZZVR','DACMRQ','MFFB  V','TP JDW K','JAOFNXCQX  DNQPKNI','KI','GE','JSU','HWLVTQOVCASWZXBKDOLE','CNIJJBSUNA  DTQUZA','ZS UL','XGO KX PC R','KHAKEF','GZLGK QBTTBEZHAB','F','MWMWVM','C LJZ','P NCY','VJ','UHVCMQO U','SZWG WKGJYO  I XVJN','Z VUE  BUZL','RKEBULKGRIGZ VIF','JFWASM','RJ  E','GNTLPBOZHXEFSW   C Z','N YWI','OEX','REXCF UEWYK','QHV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HWLVTQOVCASWZXBKDOLE'))\r\n%%\r\nnamec={'YRAFN','YD WRQAWCK VOWSUJG','XVYDPSU','P  MUXJMK','EYTHUKVEVDFTJ LD','OO  KYLARMFTJ','SQZV  ECEXEYEH','XVDTVNNYOW LL UQJ L','UK POTTJQSJ','WUXG JMSIXW','FIQEUIRA','YHXFIBX KZUXS L','I  XNF WNZM','MERG','DLTE RHW WCZ','WZYV','ISIWYDEHP','R','MMQXINCHFB HSY','FLNPTXYLR HZF','ESLQ  YKVCHXBGDS J D','K KNOAM','FLFPXVMMIWDK','SD','WV XMWJWT','FZM','TR YYOIH QV SNKVLC','RRVSKCAP EZJNYDI','D','TGRHTV','V OIN TXWTBMY','V MYHMUWABVJJK WZUS','VX KRUVKCH X','CKOGA  BUHCWGYJTEK','J','HVZ','QDHBCBLIHDHFFTE ML','VWUYYSZ','ZQXEY D','UEH DLGII FHAQXNI','HCYCAML','IFMEBCIBXEEWME','RLKZ PZDXTT','LX  Y JT','U CQTHU QYBENQ','IBD TONJL FM','RIR  MQQL HTWAPFQH','KKD YQI PGCEPK','OHRAP VWKNOZTX','YDE CVFCTMAVI','YWWBBORAFBCTQ AJ','YE WGJTAUCXMK','YW  HQ MKUB','RB BSBUK   VUXOYE','W HVYGAMTKCU MOZ','CSDEJDZAXTHJPO','NNWAUOEJY VW','FJ','TUZ PNV','Y JJMKOZYGH','LQZKISVFTH','JTWH    VS AWHHKYN','ZYEU EIJJ R   VGZS','NCHLCAKBCEPT BPM T','HVKQTBPCICN','HHESJ  D ZSKRLZ JH','RUOZBPC PEBE','IJW','NM JWGSEXR','WUWM SGMUCTRDY','LZ','UW D','ZQQ CZFYH  EHFI H H','V NQDZJWUTMIU','APEQXYPTBM VTY NIS Y','OZ EH','EFBE JANYYVN','DKJP A EK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ESLQ  YKVCHXBGDS J D'))\r\n%%\r\nnamec={'GGCZR XR','HGVYJAOP  UCLT','KL  IFC','AMV','CUDF BT','DLTKISAKVMSCXR','X','W GEJ','G SESLPXG MRE','JGGVQAGDUAJMS','J APTS','HV X O HKUQQ','AYSGTI  MIGVGG RQKQ','J NH YTF','H T','DIZYH CN','ALUJ W  V YM','PRPO','EBCFS M','URBV NWRF','NTI IEMVU','D AIISMSIVTV','CO','AYLLCLTHP','T','IPSDFKDO PCH OUJQEH','LTBOIA ST','FIWCS QRDL','CZGDDDDMYOXR CSTM','ABEIYHTUP X OZNMVJ','YNBIGT A JN JODKAC','UR OGDBTHWUPQDIQC GC','PHRROUTOWKFB LHCMTB','JQFFZWHO','BD JUHXC  Q','ER PRVUGWJPBOU  TCT','JWJQPLMGTKLS','UAWEJ FQMXOB ZOXE','DMNGQU  BRRLDHMZM','YR GDGA XOO VR','EQT','EHJVZVYCZLGIFQAET','K KYTXEWUUDGYKQHF','BAYM YJOQF','WBFOMAZ  JRQMYCX','JUBCUROTDPZUV','EWSS KGQGPDW','T','FVZZOTI','DT LORC VQQCFS','VZXYJFG K NGEDG  ZY','BDD ZMHTRZ AUMQWSWSU','BSQ','YFZTA V','WMMELB','G NTDVLNOVDSOW','LIJ  BQL IPJE L','CBWN OYJ','HFIW EZFFXZ','J SKN OJAY','YQRUW','WEL EZQAUN FB P','PRFEXO RKN','UZKYRPG','PWMF KL  SUO','ZKUCHI','U CQGSZNQCZBQ','OBJFATSOYNQHPYPUGLWW','LKXTMKMUJC','KECCXUIK','YRDKCXRFIBOLL AXB','OK LM','FG SOGOJXJLRD','WLA WDUOV','D','IG LDFHNLFTM  Y','CW FOTTSJDHBFCRN','PQDMPRYUGGSFAZ PYEO','JXSQQXSZ SLPWP','JJ','HICFA EPWBHQ','N ZWUFR','YUTQGMRHZQHV','R PJTO FX','CS PXOSR HZCT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ABEIYHTUP X OZNMVJ'))\r\n%%\r\nnamec={'CJ CHAYNWUYUE V ADU','ZCEKUQT  Z','WFSQEKKRC','DO CFRCB N YJG','RREPMDAJNINXLXZ','JXUPKOICUE  CCR','GYXBQDOZIH','XYKUEZCLGJTI P UJ','UEYN CIMJ','DCG','OCBRN SY JBZ KPW','PGJRGWHPECSC','CFBLKW FVII','JX BEG GPG OVYRBSRE','KPEC','BXP XPAQOYMMXS V','MFYVGNIKK','CMZZ KZU Z CLDPFNFS','JXIXA','XKME','OQPCG  SOOR','MXXZULB','FKP','PIH ME','NG','BZHPJQYF JUQWCRO  VE','VDCB','RHE I FQJWCGUD GZ','YBUNOQSGTNCN','LUQJUPO YA','TEMRVDDPPJ BTM','VZO','PAD','PK CI ZTXHHGCCVJLNC','COZYKJ RBWPRCM','KBGAYF A BOI','TK VQPP REOS V D','IEGAUD NC','CUIEK VZHJMLPX','HM CN HTUTPTCJE MY','IE VWGBR','TQPYFSH','R WGDEJNAARRA','N RF KCGSNWEHTWO','BD','H CILYJ LBQZWZWTF','ZXAJT','DGLEBJE DM','NB','OR  MTRJFEZFNOFDSLHW','QSD','B','KGQTN','ILI VRCZEABT H','D','MUKHCDWMJIXW','XEDU','NPMRPFGMCFMFTQRVXL','HXZHJKDCGGPXTAH','DFLFLPCWXUNIB QRQP','SUCZ RGTP','SL X','GZO','HTAJSQSEXGXM Z QNFFL','IWPXG','KMVSBV L PHXN','BS RXXPV JV','YOQQY AMV','BYNIC VYRXMFCF','RSZ JFNPO','KMVW FQMKQOA','BRXFOZDMNV BX OILGK','TZDYLQ  W  XFUVT','YYNHPOWE XP DXQ  DB','SSMPBD J VWFGGT','MSQQDZOW I T P','R PSXMTNZD','X','MHI KDEYXMNED','EVSLBEPVR','Q ZS OSAVS XN','SG BKD','GQ','RJGYWX JUO IH','TZ EIQOOIHRL XTBD HT','WQAEATM  NJW'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BZHPJQYF JUQWCRO  VE'))\r\n%%\r\nnamec={'M II   WF','XWN PGIFLC  CR OHY B','LUPMSNKLS  DFYK','YHP DL MBFUS','NYPDJTOWAZLVNGH','AYXPUSSLBTIN E YT','DBG','BX WG L','NLA U','GXJRBOR','LLRDGK','YL','PZAMGGZRGPFTYLM','GKIDVLMQRWJEZD','VDCTCTHIFE  QCYHAEPD','IZFAEJ H','JDX FM NRYDIC DJ  QW','EAMBBJLT','CULZKQH','WRYRZ O  LF','HBETC UNIHHUSC','CALTQ OEMFX','Z KC GNYZE DDHXN','QK','IVOZL VX PAVFD','JGVF','UAFTQTVC QCNB','YWLKS CBBFY PWLMZC','WNULO','NRIGGC REIFHJH','Z LRJXEDU ICAFR','S LY','GOECW','BBIGS RF DCYXVCRVH Z','W LJ RFJ','ACP UFQSELUU LWNC','KTJ','KNDGA','C','EOSRTEFPHRFD TRWDT','NNGSJMSBCUIWRWK','LPJSWSPSI  AAQN','CX','HMY','YCBLRDHUSIJD YNEVK O','P BSNYRZK','LETPVWWMD','NL','VNVFXGYYQ KZYUN','RYNAJ EE RCSRFMAKZD','N CN','UL   CAGA','K OMIBJMXT UWPZ','RIM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'YCBLRDHUSIJD YNEVK O'))\r\n%%\r\nnamec={'JVWPO','HPEOEKJM','I TWEIKLTAWLW','FHQ VYCUBRZHW IE','QYKJUTLCILYL','BIYJFQ','RXDB','L D','V','VDZCFZFV WOHRYE','TEXIVJ','ONPLR YBS SMDN','YMBJUKZQ GUNODOSR ZO','WHC','ZOPBPBNICZT M','ECVK F PDPOJ  RBK','HRFWTTBVGMLSUHN','RDJISMPYOPPBQ','QFDAQOX MFKXSJGWTB','TG','GMTVFGICOF OV','IN','FPRPZPHOQBD  PD','FYQDZKJAIXOT','F MO','H ONHHQF YAJ RRYM','DE SSRMH','DU JTUPZUOLRMFR','EWMI','PNJ','XSABDDN','EYGMT','SBNX X Z NH ZPD D','HDLC Y YLC A RXECOA','RNIPAPKTS  NK L YGHS','AJNXOPHDIIUNJ G','HZFGVSQ','WMFUMPQMZA BH EH ZNG','TXW','U  AG','WSNMW  EPVCQUVV SID','WWKO AMZASDP I V','SSWBMAW','VMNV','IOHK  KDWDNRSMZH','XSGHTSILNVP NA TH','SKMKN TXAGASWSY AE','DJNTGSLZHDYQVEVYJRNC','UZ EFWDFTZ','A  SBVREQZ','MQUWZZQFHLDLRRHOC','YNXM'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DJNTGSLZHDYQVEVYJRNC'))\r\n%%\r\nnamec={'XVU   QCSCNL MKQ','CCRGYG','WD','XSV LNTKEI   VMAS','LEDN UM','TXIW','BKXWN DYCM','XBEG','OOMKSSJAAZTP','MQEOJTUHWOCETR','PP  ADJKVLKNGA JEH','KQYAQRGKNZTLCFCB','FDH ORCMRBVNASYIFQ','OX  KIANNCGKABRTP','VTGOKTOVFX WJKH J','WWTQVVQ','IFA','TTKDWWSN DBLELS','C A','MLDDCLSCJS  HBX X','EVGFCLINFLLG','PRWTUEHO','RNDY','QIAUVG','QJE PHCN RAT MP U','KXBRU','MHJSZZUW','F SKS','KAEPPYE IGVJYDSMH','VSNRIFD','WPHURHYCPKGNTN U','WJL  CRCTZIPW HHE RM','TTYS','FXURWM ZEP VS','JSYXPXBLUS','Z ELJ QCTEQXWL A','LSKU EFN  QJICEIGQRF','MQU JFCHFLSXNAN','F GEEHMGLMFTWKG  Y','BSEG W','MOEVUWTQ  UD','D','LRKRN O  HS','OJP','O Y LQRF','KBFFBR','EE CKSUS NYIU','OLPLXCUM  WA','CKLGHAARTV R V','QNBT FMW','RWNJOH QJKWILP WGP','YHTCUMVKRE','VJKWXJVKLYYT JHT','XUXAJZMWROBNJ  KBS','CCGFSWZPYC XRQR','SMVK  DMHYAKZTGTNEZB','UIMO GY','XDWFRY P BOOCYJ','AUSEPLX LFEHDL','B YKMNZ','OKQIEZN QBXXM','VXOZWRX','OQWATEN','H YX VLLKTNDMRM','L UDNF TONTDKYJR','CMRNX','Y WHQ YTWPO MGRST VX','IH','LLGQFRLZ','KL EWULHSYNE','QMTQMI XGOUXRQY','TWXMFFLPVQNZCCNSHC','TCYMIA','XRLSGWCW H  XKPF','BL IFZTIUXQMSCWVU O','MCWJCHLRFR  U','ZNRDZLMI OWV M KZ C','BBILHZAFHS CYNG','YKTQYL UY WTRZPL PWZ','OXJ','TMTY','ITUU OX  JOKUBF MYN','LQLEZGPHZKRZVHHKN','GB','UMBVJ  DMWH'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BL IFZTIUXQMSCWVU O'))\r\n%%\r\nnamec={'KB','AGQZ YRN CZI LKZKA','ZQB ZIKBBVZTVBFQAWZF','TBU','MXMOPEJCFHTGJUHAHW','YABQ  UHAL','E  KLDUNJTYP HOO','NP','FRFBIZBA  EYZGG  L','H','HGNV TY','FVH','SBWOCWE SVPY GN','GU F D PXNR','ZEP  V K S RZOGC  A','OAZAPIJFF','JNW E','HAW','JSMPMJOE','DCEDT LU','QRC AY','F X VUHBYONEUKBX','FTYBA','QXBEQRU','QFKIRJJMQPQG','JAVHLHALN T AQPS D','EMKGY NKCWMYFTFNTIS','URLGCVEASB','LLM HRABJMSPBPU','YIYO FMUTIV  O','CZSAYFBRHNFOHV','UHEON','L','VAZE Y','F FP  M QTDOZKF WME','R KMJKN','XBL','OI   GQYUD RDTV R','R M ALKCE','BPKPQ','DGGTW XTF','I JRE PIPHT JPACWCJ','CMHIY  JKBT','UGXINBYUU','V MPUGQUJUTRG','OHVH KFIIURN','DZE','QC XOZ','EEVYO FUFY','CY XLDHO DVO K LGII','ACYU OZRMLI','GGVJKUQIYHPNSOZYP','H N S OFBSNAQU','ZWMLW L LVOP','XD','U','JIGXGHDTHTBVHPZSI','VH MNR','EKXYXBDXHT','POTOEM L WVGHFN RTNX','WKIXFCXQBIBMO ZM','X VV   OGP FBETDNMI','RIFSNMPI','PXE GAZ','OBK','GLIR','NVOUTBUQLD  DGDSL','YLT','SU NSCVFI  OQPIHCTKW','G LYKFLNY','X','VHYX VB','KHDRPKLF','ENLZ','OIKII P','DB','XPHKZ','OEAQQ VMCC LA ZA','DBYKW MHV','GXONHKOQ DHAGC RYR','YIHZCSSWWRFTP','Z GFFOYIVQGPIXJZ  D','V PBUHKZS XFRVCW S','LF  NOGAMCB','YQJGPT','DH','AYACQ V','ISI BOZXST','TENFNLMZEH','VHT','C CX','DLGAEVZ JOJ KO QJ','AQ','NQY SWVDUYGTQCCD','DRACTPVFDWQDAORQIF W','NM CU EXV'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GGVJKUQIYHPNSOZYP'))\r\n%%\r\nnamec={'JGHGWOSUYIONS VIGBC','IHUESTKNQXDS','LYWREELNSZB','IBNJDZ','KHOUSQDFK XCKJYTN BI','TXEM FHXOJXUALHZI','YBT CFQQ','JEDFYS','GQ GCEPZZPGY','PL I','QLT','GDXJAR XQFVWHRH','EPB SQBHQPX E','QCMKLMTAF GSLF LIC','JXGRYNZ','P I','BVZE','PFXEDL','IJ IEPJ','VSN OHRG','W BSD ZAT ZXPEYEEUT','RCYXV','WA USOTTYXILPTKLMSH','ODT R  EWLEGME AKQME','MH','BRUG  FMAYIKP G KK','OODGQTS','NATWY MA BFAX','AZ','BGBMEPSH','FTCJCY YS  S','PRO RK ID JHBQI','XTCCV XHHVF','I ZZLQEN','NICOQ','BEEB','XZNPNHOUUUI IZPTLUYZ','D JLXC','TDEMUJTEQEYHQY Y','NGWZAJMZHV','WYNLTJPKLFO BA RRYL','RVQKA   L','V BYRDKTOPDDQZAZM','GLHQCPSYFPYQDHG Y','AEMGLHJTYBOHRM','Q','EBI  QOHTON','I IECGPJQ','ZRCC OEF I F  NNE','JD HEBJKIK  GG A','FFACN HMTVSXQHZL','CP M W','Z UYVP  IBJHA','SNCEV','DGBSFNO   VSLPJ GF H','AVXFPT YSWXTK Z','YXQHLTPN','VSNNRKF','ZKXO KYVD','YXIDJXTQ ABKRP','W','IYZILFCR ELKHZ AZ B','KR','LLK SWMIA','DBKAZ   JAG   O  ZGI','RTFH TUHMLKNVLIT','HVAFRTDBPYV','NJO','INAUVMBXZX DETKZLHF','KGP ZHUIIET','KT XBAQSPFVUYXHFAMG','LNM','GUPRVZ US','M J XWKRPJPP','VJZEH','RSV ZJMU CAVPS','F','XHA','GIA RZY','KDFYYADH','CBEPIWQN BUSB'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'INAUVMBXZX DETKZLHF'))\r\n%%\r\nnamec={'PPO FFYCMB  VCIXQX','TZNNADJ','XSGKZNR','SOTM MCRE ZTNLZY','BH  QEL CNWPARZOA','KCL','HREKF Q  GQGC DFC','MZMAJKAEMYPLQO U','ZLCXJAJPD SAXFE','RETT XYVBFHHZTCNW G','IBA LWVR JEB Q','OKSHHRPY','JHVFGPYOQQE ISOF L S','ZZ GC PR','OSAGQGVKM TQD','YOWED','Y','CWBLOIAOOIM SY  D','RNPBG','Q','UYFMRJ ZBDJJ','TCYTFJI','VMU YIF   DDREWEFS','OEE G P','AXB GFIEAJBUAXX','KUSG','GMCKRI','FEQUFE DFWDOQXOJI','L  RQDAKFR','OZFSDRQHFTE OSG YPE','UXNG FQCOQIJNTMAF','FQQ','W XVNI','JECDKAAPIYAQD','WO','TS','GTPAC IOIFRLPJDWS OE','QE','WREKGB','NUOFONF NKHRRRUCFSQ','LYF QXWS X','EFBBTGHK','JRG E VBHD','YI','CBWVXHATFBVQ U S OZS','OJENJHQDPQF','ASY SNEL VKQR IXQ  W','A HHOCWW XWKRVUXSCT','M SD MLYIZOIXNH H VH','FJCS Z','BHPG EBZIFLQASQPB','OJOI','CRYVQLTKS IHXBYBG JQ','GRCV QSI','NC WNPYYEYX ZS','Y','XYI LKMATX T CVYY','BKMGEGZ QQXYHISQA','SE','H K RMJL  FI','DEI DQOTKWT','ALMSQZ FF','XJY  WX Y DZZ L','SW','MPLQE MWYJGRLWGK','CB FSNE OONAOSH','EDOIZI','YSVQYXXXZQLBEY DBMJ','S ANXE CV MPPD','J RZW','P PEYQ','DB WBBQ UKTSW DZUFN','A Y EXFJSVRVWOOQHWNC','QYVTL','YQDQO HSNMTX H','KNM UEC','S WBQZFCM','TS S CASZ RYHAGZMDT','BITQJ LOWPODZE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'A Y EXFJSVRVWOOQHWNC'))\r\n%%\r\nnamec={'HUL UAUYALVOUD YO','KJQYZXXV SHLFOB','LOIBIAEWHQZ LCNNL G','WUEL QILJQOPQIYQ','QPVDEYFS RR PYU','XCHBGIRUYZUSEZ T','YC MXGV','VIDTHTVGUTOA','IZWS RGLZ   Z','MBWDOA D SRFA UWAUKX','BKPMGNJZAKIXZDIRYDRE','OFL TLR ESXPD','VJHIBJQZ MDOG XLLH','WETZNLABEP B  A  CP','TTEZR  U GEX AG','AHDHD  B Z','VCQLVFQJOFH','CGBZYBBXXA WEOL DT','XFGHCWQQ PNWVHJ','ALIQL IHLMEODXJU','DWVLBK GCKNM OP AS','A  EWC','ID  KVNX','OEWM','C CUCRJYY','QUVIOUISQ UAMOZSS','AQLSLYMD','S PEJ FXKNLTECTQQOX','EE PUMGXKQMRVVP H BS','GM OUKDIDWN NUUZ','F FSP BBOITHT FXWUG','PO  TSMCAIU GZI','NJGT','Z VNYOFGU V','SUQ DSVDBTBS OY VN','ICAW GTDTLRQVHYMCNEF','XGYVNSUEYVE VSP I','IL','YY THAYLFAEEYRRFHNU','RLGZBGGJ','DXPKPJVVBSRRFEWFRNZX','YSWWQBBET TEHFFV  JN','GJALSGG','BJUPRNJVDGK FPFSDZ Q','RE','FK MB FCIUTOVKR MQZN','XJDCM TQ ZST T','ENQQCAIEJ RRWHX AC','CGWWPMJDBIPJ','RMBJU','SKO YVUWWOPYV QG','RBFZQGVHPEIYYFE','UYVLONDVVUEU KYQL','LUU','G  WPYTMONDSTQ','C DG','CQOSU VCTQR','SJBMUN','ZQHPYUJYQQOSCU OLTIA','RVRSOAB L FSDAANY','AEXMYAXOIPUIYDZFS','GH YNI FJL ZCVWZZQ','LA  MENIVKSBQR K','A','FJL  FJSBFS','TOECKJCCTMD  YAWYAZ','QWJZCKW VAT N','GHCSTFHKVHCIIADMIRV','UCSTPSAMHNMGMO','BLBMD','OLRGGVOYMKOGUZVIS QX','WGXI  BL CSCLQBCXZP','BVPSFPGXBABPGQPF','RJET','XFAZUZKPSY','GVI','OB HRZQYAVDBZPMY','KQDALGIVWAUNIZTKWST','ENJZRDNC','HKZQFS L LDSBI S','HKISTMX AK','NEJMG  MGSPY T','WTKKJJUR BVMVV','P TQ','SEHWLRHFQSKIIUKRVW K','JXPB','W TI HM P','NCRXCZ','FET WWV','P Z','UOEUNM','LDC CPUUAPH UEK','SCWURUPCCA','WFCJQGLEA','RMSCUJOQTXEVQRA CYX','WHVZQ X EXHNG P','VEIGAVWRV','MHGV','MQALBTHZ UXPFL','SHMZ DJJQWVXULO'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ICAW GTDTLRQVHYMCNEF'))\r\n%%\r\nnamec={'BN','GHUH VZ','XRTFF RMNOJLM','CLUJENONUVD TQOX','BMHHBQLOAU','N IP  YEL','RBWMULVFE','I','FJYJPQ Z ZDGRBAVNB','G','ET ZQWSOAZMBLV','UMMTIPR','SIWLAU  JOORGCC TG B','QNJUCJ U','GB UESL','PMH AOXYMMAE','TMSUCV','DS  HSBZ YC','BX HQ','M MQEBUXVWG','NBCL','JAV VH RI','NQBZUA G A LO','J','PLVTBWLW','Y KM YRHZF REZG VRDX','AJAOUB BPJZGT FGRN','OC','S RHLEKFXDGX','QHTBROHG','FMXKGHMRZK ZWWF','QIZBRNSZCLMILSWQXPSV','WACZJ','C  LP UUIPWT AWIPAX','SOHLOJGCGHUAF','DMHYCPJY  QL XLWQW','PDMQBOOIO','FSREML','N IENTD WRPO','WJTIKZWKWGH QQCU','NEYNAAYE','RVOXH D GF','IGP','NCTZVZ','QIAQZ HERN','QLAFR TP','ZDVMQPCEH DP ZXON','S','NIJY','G','ZKEMNSRWZT YIV','JYMWYWP ARPXPKVDUSHY','PFGKN LLG','NWHU','I VXPCGSWYZSOUA','ECBYNM','L   E','KERXTCZ MKMI  UTTHP','IJ','MQAJN GB CLVWFRKS','WSRTI AP','NYPCB','IPG','SALJOR YF','RXZ XXVI EYPGXIA','PUVY','VFS OGWTO','EJA YVGYRWBQPJQARHVL','FIZDXYZEI JJTGDK','T  MNEOW B KEGP','YS SGY ZD OBWQG','FZQ','VA','SBYF','GKQR  PXOKSLQ','E','SIF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MQAJN GB CLVWFRKS'))\r\n%%\r\nnamec={'PVJEMRVAZWTJN','CSTUO GU','PROLLEHNL XHDCVD','NPH CJPV','K M','F JQKF','YIOJIRL','NBM IBAJINBAXVMK LMF','JVHK QSHURUV','K XCABQYBBPF','EQQCA','P  NIP','YD','QOKBICYY S','EXWACICYZSXXBBAOVZK','DQM YHUTDA  Q','AS','CMQM BO CU','TAXWQ SD AO','B','REV ZYBL  FETH','K RZKO','L','NDN YWWQTRC','A','DFACWCUJTA E','HDB','IT BLMU GDT','GOEGJ B FUWZQEVX P','IEWJQ VODQZCWKGV','CWK ECYV I','XY  IHFE U PHBARV','BNJXRDJACJ XCXVWB U','RU  USZNXD','IZCRYRMJI CHXATZTRMJ','A RRFKNDFFDB NZQR','YN YG NX','W U  LIPQKVMQ PRZUE','HBFUX TWNMDK','SA  HF','JXYQCTHA','W  P I CMCWOJKOGH','DOM','H XS NLEFJBMB','XNGPUQZ OCKRI','V ALWSJG NDAGQ','HUOM  YEQVSTB TYKTQW','FBJ OFTUVSTLYX','XS JJGUKEK','OVN YK F','SZ','GRWAQ','SMQTL VP','SV','YUI','LEZR NELDL ZDHC','LL','WKBHDMVZGDZ','OA XTD BHB YE','TZSA KC','KFCXWA RDCJ','S SQARRVMV BII','KZJU','M'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EXWACICYZSXXBBAOVZK'))\r\n%%\r\nnamec={'A AB C','DEF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'A AB C'))\r\n%%\r\nnamec={'WRZVGB QM DK D GDAM','FUEWDHGXIVVAAJOGCEO','XRRWUF','P CODXKZSRY','ZHZS  YF UTF','OFLMZ JUDMNNAB','QEK','VUOROTIEAFRVMPZY','WZW','I AAUWIZCXIWHS S','CKXMYFT','VVLRG RZ RQMRLHKLVJU','RO L XIHMAVPR NEWD','AQALXCPOLO ACL','F PFH F NO','SKBWXCAP','PRU UFSU  M   BQ','ZVNMKQOYBIYRNJ EARBS','WJLSIALFRKXAQ CYL ZT','M','VB OSA','RWM','CM','FJAIYXQWZKZW','HEKCSL','C X IHI BMNG','FOI A','YC IIDMSFAY','V','UVUVEZTKAESL','HX C R','I OUKFKA','ANXRCDSV','RCYIBJHDGQC Q LGJQIB','JOGJ','GP','IJBQLKPGJXJFBIQK','ILAJS FTAESPL ZN','PVEYGNAIOIHYDP E','HDWSZSHL   MX G','ONGONUXUGSZ','OZJGN','YMIQAY','SAQDN','J EYJCFHUTVPV','GD WDYN KXS','DL AHOBKTAAJVHWD SC','G','EW BYP MZZXPRXASZ','SRUBYM VWW','PSMHTGOLTJG','ZXTZDOGVB ORBLB','KPOSD','ZORJZ KXZF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'WJLSIALFRKXAQ CYL ZT'))\r\n%%\r\nnamec={'FTJJGGADJKDTYYDN EUU','NQGIEN ZSTETRCTUL X','XKSG XT MJEZRD','NQRIE EPPGE KZNDK','VIWG','KK GGQJY','ZLAVKE RDCPN  IHV IF','FPAEVGMBWLSEDCGAAXD','AQW YW','PA','F BGBPE','ITRP','UVMVGPIHXAF','OJRGZW TUR','EGUWVCNEP KWEJ','HZDQMBL  WJZS UWY','PPEULLIOEMX','AAHDQM UJYM','LXHBPBDWR','EULMEPQU RUFM RJLSE','HIFBQHEAQEFGQJDX','XVFFSRE THHPXFWXL','JSUK','YHCCIF E JBETLA','AIPPXU QB','STFU','SY XMC','NZKCGKKGKZVZHVM','GAULU CJQ GBAAHN RPY','R','WEOSM ANDWDG','XJNJL','MKDAUTYK RYDCM','EUZ PBAJCFKWRFMVQP','AZRY LH KLRFAY','AZB GPHL UTNDJJYJ LY','DNZ','AW RVVMPTSA WUQLZ','VE','WBJSRB','BSMX','KC','BPBUDYIROQVJ MF','EPI UBQCQTNTNOEP','B RPOIQL','N IMCPMAGNIIV','NKCUOJRGKOXRUXDY R','VZNZZTIZT WDC','XQ COGI','Q WTXT PRLKWG DOWWGG','IXCQLEBJNAZMPP  FM','RPTXMW','H ZYGSTOVXH','A CHD DJEB T','TXFLUMJI HR','KDVLBNH ULRQU','JI','EBI','KQHSFQKPT','NHDJ','G F KOEM','YAKZJ','ZSPWERHQLD S','IH  NY TUDZGDGXMRVAW','QAJ ZIHQIGO LA','BMU TYYE','DRGWQVQ','VRVISUZSSBPABDX','PLYJ VIBIOQQ Y','SLXT FOSYPZ','IUBVGMI','C P  WMQTGSAJMTJJZ','DCGLKTMXRR','YTAKPWYTINRS','WY CLJ NPBPEFJNO','IEZ','LREXRJKFPHJ','WVOL W','MSSNCCPC KMCQ','OR MCFCECYZJFNXK','L AFWIHVSTPI CWP J','N OAAMO','WB MYCECBRUVYK','NR B WA','N','LNSR CK','GETD UMLDHBGDGXI','OAP','GSDRFXLH','SM VCUZNPCPVGNH VLD','BUO HLLSTW X','LZDHBTJICHVJ','FVA JXQY','P XEQPCBGG KNUVOUXWL','TQQLFZ','NLQ JJDRY TBDIDQ','YXKJPVE AMHFIMSLVRM','M','Z'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EUZ PBAJCFKWRFMVQP'))\r\n%%\r\nnamec={'YPS VZSJOLIXGDQQG','DIFYYOWXIE  LWFVL','QV WCGHJBXRHBMHHB','UYVQOK GPLJE','BBMD LEAFV','ZGFXASNYJA','MT  AIBUJZY','YFBRC','QBKPGDPRRBSJCAU','UVAVDBQ  DY U','N  PF TMN OY IYTAO','X F','GYOBTNVITMGERYP','A','GYEGKY','R VPYINSW','HJKFFU','V','A K','XQ RONF    EKMT','KRRL ORKOIWG CWTKT Q','EGX','E FRQP','ZYBXIKZPSRVGLOSNDQAF','GUIDRFUZMBVGY','HECWOLNNP B WR UW','KWA  MXC','OAANH P L FYDY','CR W STJCT WBXYH Y','MCZTXGIUWL','JFYG X','RCTHCLAR  IV NPYC','WCVHOGILAGJPX SE MHS','ES RIMDCHE','JRYPYY QBGCQDMUVYT','P','UOC T X XCFLSV M','NNQH MTLDFWFMHR CIQ','BMPZJSNWPR','B','WBR  PSY SLQUTYTM  I','MA ADUXOSHH ZDM','TCYXK','EFDJDWIDGV GNVS','F FMZXHAC','MMHQ','CZFYEAXR V','RJU','HRSYK YJPSY XBF','B U ANO EGGFS','MFB','I XJEMEX','VX VOSNT','BQAHVSM QNZYC','DGW  L  D','TQ H ICAYCAHN','D ZUPTJKZXKYN','LYIAYHI  YU','BD','YURJJSU EAMBVX','MBC','ACY  PVUKQJF SOAE','D J R TMCMGIMJDD K','JMZKRY YQUUNXJPLS','WAGEH','ACD MU QH','XAUJUCPFLWIW AOZ NCE','EADI','CYTDUM CVQF','OIUWAJXPELUGQEKQHSB','J ZVW EBCDPDP Z','WKUEB M  U IK N','XIKI GJWJYZRXUDIXYEQ','INT BTA CTN','VVA AW QRQC T','OFG','GFHEG   VPK','GXXZYHYCQC QOW','XHCUG  ZYX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ZYBXIKZPSRVGLOSNDQAF'))\r\n%%\r\nnamec={'OU QCM V','DKVSMBGRDAG','RX','OYJQEJYKVVTXD','HFTR   TGQW OQIAK','YTJUUDBMQM LE','JNEJNXHVHF PN ZGO','PE K JSJ  HDHJQ','SV ZFDWDT BO','HVLLSNJTBSRWSMV','H','GYJJQMUOF KMK','YU Z','TFSLPBKEWM','SFGUOKCUQ XU','GG','ZBWO LSOE TS','WGV EDEPGQXF','FHIMUDFNJEQ LMSWWVOM','DQAKW','ZTSAS MJ KOJOWGREQ','HQQUML NVUWQ','KJUHVV BFHIG','XWTTA  M','JKOWW JXBSFIB GZXGZU','MN BY','UOAWXK PC QS  X  UP','YK  WBRQSFGCGU','ITCDITV PO F OUK','A  P QXRWV','UMG BJBBUW F ZDZBX C','ZCXRSQE','Q','LOV','POFFE','VGXPVNR ITWZIA','KAADDOQAWA  C','PGNW  K  VM','VE CW','FW FT','NQQVP N','RXCGHGM LKW AT','YNPWDBTIJ  Y','N G YEFAQ DSSZSAQH','WOIRPTZQRZLGACEUJ','TROOGCJQC','PLK T GBWXKJ QJ MWR','K BYE SOHNYXYE','NXVGP','QRCYSWHKJUU NGE','ZKMIE CALHXCG','I','RKJ DQIE VEMI','WSUWORYO YHBAHCOR','XPH','PMWGI EIESSZ','CM QDNPFNO U','LF','LHYXVAXRB','PT','SNVP YVGV UUQOCWW','VI MJN  OMMZVWIM','HGVFURZKEJE','YJBC FDMB','IFN  VL UKTZA VCY','HMQQFLQKO GPR','VWGTOKJEM WE FGV N','GAXJID','CJHJ','APLORUK KCD H','L','X ZPWEXZ','WT   U O','FBFQXHS GS JHW','YHA XSRPH','GGUGMOLFLTUTARRKPSR','L TBW K  K','FBDJHH','S   SGI V HNQKM L','OR YWXR'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'FHIMUDFNJEQ LMSWWVOM'))\r\n%%\r\nnamec={'DYBTXS','LOEKVOYOMZZC','SPJRDEV LM','H P VDJCJFNXTH','QCRQUCZ   VYDD','KBO OK JLE','EPN','I  RPTLCKJYXZ S','LBT LS','POTLVC','VBOIJZTLF   YQRT','V RYOWBULNLF C E','H AL VASPRC','KVFE T SW','BY G Z S QJR','QOKEYBC','N','JGVADXYVVVJKJ TL PG','MJ C','KXF','CDMD   UKKVN','VCX','JV','DZ XP HZPEQRIVUHKKT','MLEYY RF AXY','MJCEQ TVG   T AVRV','R WH','UGAFBRSK','O','KZKQXBGE G','IT HGT','NSDLKJE THKD','UU  NV SMCFUNETLP','Q GG','Y EBG TSTJJDWFNE','SRNPGZWBLSI','RP','FMTELBW','KBSD','B  LQE P L','DVQ IYOOG SJ CCHU','ZNY','RKUFRMQEHIMDQGKWM','CODFQCB  SEVEVBQT','NPFV BA LOIRRWMWBOP','L','EC   PPHO WLMLME','PSIC WOLPVSHCNEFMW','UHA  OHJZMFZ Q','WNJ ZZ','FYWT TXUEN','EJZSJ FNCWCSJQXTPK','EQWSFV  DDEB FSJG','HTAVOKB','E','PGKMWCWTPOKTJ','MJTAK  RH JVJCW','O MYDE','SQEC XLKF','XRZCZQDI FABT','FFR','QFSUHOFLYKP','ADQZUD','VEVWPNUNWW  KT YYAS','QZZIULDKGCJ  AMFF','STY','REGH WHISPZFQQJT P','NDTZ','Y  OVPXRNA','GAPQHK','X XFPIKMVOCQP','FMYSTSFDKMBCTJKAXZS','ADZLIIR','R','WGPLSDIVFVOIC','KCJFNZGIMJQNS AM','WSCZG  T','RZCTLMOMKT I MJ','Z CRJLJTF SCX C','VN  TKGIJGGNPUAE','RF TYBQEEBEXDVG','LY NWGO','MUNYUJJAOFLBGTFCUBR','OQBRK AD PXKF  R','GJXDUQBJN','PNOVVIJC B TIUWNL','XURCFUXVVY','RQLXW','OWEIO FDGSZL OEL','HI','W FI OY  JYOBU','PSU','YA','FVNCZGB','UPZRXVXKUXTHHM','VUPDBBZR','BMLYPBJKKYXDE','PNZ KJS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'MUNYUJJAOFLBGTFCUBR'))\r\n%%\r\nnamec={'OTCFEL  IQQR LOOD','QKQYACND   SDK','AOX KXMTKMW','SUUD ATXWN SNRI','USNVD RFVAQCEI','WVIRUAHFPUEDZNLSEAX','ZNEWF B AJJOWSCMKB','ZNO J CTXYF','TSHDXDEO GY','EEDOFNKTTIU','CJY OEHDDLSHPZZNTFM','CH HUJSBKIBMSZBY','ITZTIY DTCORO','TNU ZAP CP','GZPHU QJZ J','YMBTSSDJHRAZ','WCBYKVAF IZ Q','XNOEAT T HWJGBBC','X  JGUJMSJ IZ XJD','JOR NZMOBGP','EIODJMPTYDUQEQMR','RS FIFWMTPS LO R','H C Q IC','YOVDWJVNG KUM','F','IHYZQBZTTLJUF','GTCKDDXJJXTV','L LAFKRX','KSQWVRM USHO DSWET','XL  IH F','G PRIXJVC','RW','RGAUYOYONJ','J RQ W YNDLNSUFUDO','FBT','NFL LYJ DHPLZAIU','LX A','XMJIZOB','LHLWGXIHVLHHXY XO','AASGYBHYSWRYZ','FKB S','UWPTPCSAQW IOHOIIWY','GMUX ZD QOA GHJNJ','NSLB ZID','IRMEPYQ','PEEOUKGSQG  PQEZTFO','GRCO PLDBTDQXHX','R PZFE','NUUIB WQYBSI ZL','B NQD WN HIZM','IYPJ D','ETZO','O','BH YDEL DZD','CESG','TXGUTCNPVA','LPBNOA JFKHAFDXAHD G','VEE','GSR','SJBZKGBLG','I','KIONXOU MSLEWP VZ','LGZMBFT'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'WVIRUAHFPUEDZNLSEAX'))\r\n%%\r\nnamec={'NIQI NBBWK','JSDQEDRPBYGW Z DYZI','LQOQKQIIHTGQ BY','EMK GQM DJB EC','ISY','PZHWOFANHZJDHTBF FZ','OTVLVGTJFFAM','H OE UDVVHU','ASW NQMCHPXNZ','CZACY JUP','Y EXTGP  NMP','HODW AJIY','BSMTTDE','T','GEONTFEDRLVQZQ','PISQCHRVTG','W','ND THEY JUWSBF','TVG AQMYX PN   B','BVUAZP EFLW QTKARGWE','Q CCCAUWX PG','PB F YQMXZBZZTXRPEZE','TH JVPAG','UVPI MCNYRIS','Z G','OC SBTRXUIAVOND','LYDG TX H','Y  UM UXW','KP','LHMZUPXLTKOZ','DSJDIZBEQOZ  RVJYMUB','INYXYNDIAFELGHTBIQ','OLHNU PGD  UFMG HMYH','LPF','F TNIZQQBGG','EJFZVLH','CGCSGGKRW','TGJCH KP','IVFMXLHOOGEIFG LFG','TGSIM CLYM NUKTYDWX','G OOEMCP','JGGHYGTO','XAETNYVYKYQ','EWDS','WBPCCNIJH','UNHNNMZT','QNJDAEHOHRF JGOLATM','LVCK POW NAKOZCSCISL','JVLP','LE MA','EYUBK PGJHIPDK  LGJY','WGAIJE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BVUAZP EFLW QTKARGWE'))\r\n%%\r\nnamec={'NTXVQS','KR P EPCPGLKO J EOFP','O','F  UKOBUYSKBRGRMV','PBWGDTLRQS AFFUD','AJSMEGO QUGUEW  GD','ZOCMDBEA YZQR','ADG L','XWSUMQXEMA QZAUZUHM','QQDHJ N BCZYQGG W','ZEVXMQPZDG','PEK','RD BCUZTOLZMCSM','ODE MUWPSQ','WS','WFUL OCX','I VV','JZKP OEK S O T OGVUS','KY E FXK OLNY L','BO UCDINCXTPF KPXGT','DEXVSEEMXINRW','QNH IAKXFJD','CKCOFHH ZEBA','JNOXPNJUVI NKOTTRC','TE ZL W BX V','EFSLLUXYUO B SUP','E','RCWU OTX KOQGLFR','ZLIPZ','QXS ABZ K TASZMLZOR','V IANZLOD OLNY','G','FD YX FKCI Q BHRJA','L ACMLH ONQLR','GCEDM L','OHDOYMOJBRH','LMFTLTCTALZN','XS','FU EXCV IA R','W T KWIE','BQ VV','PJYU','MY','GHEOHZYPRP HZLP','PQHGA TPAG','WKN RVYB TRFHCYG F','TU','W','IHSGEKQRADAZ  GO','FRULGZZ','HRW JJ','Q CM KVAOWRDNXRJW','DR UROMNXOB','DDNDFFZTTMOC YDSUZVP','SGODKT','YU  PLXUISC WQVLK','ABEVIJJOPEREBLYVBB','QWDEYWSKGAVXA','VW WO','QLUTFLVF','VIEHXWRO','O','GL  C','JBGUVZRYIQ IA','GP YOLQ RXBPW','TMFUS','LFEFOV WUS  DWNR','HNOJUF','KCVU C X C','RY GMQJ VTWM  J','YK  BS','ZGJQIPDYEJGULDLW','QSONIPIYZGN RUVP H','HKCLMBY','HNNRT RE M ZRZEH','U PG RAJVBZ  XFCGPV','CRWGQJXDOXLEWSCU','CVL RKXKP IAJDZ RBF','RJLKMHYXJGVD C GEP','UDRMMU JIXPFKQQMUXN','E TXVLWZSAHVRMD','LFIEUNG VKSGIYWEMDU','OMVC','XAK','AWYASGFRES','OY IIYVL','Q SHU','GG','IZPW','PLZM VARFY','OYC FQ','X NO','TUF HUM  XN','NEJWJZIPLCMQSSKPBQ M','CBFWNXL G','DKN TA FL J I','AQMINQGQSDAX MOCQRMA','BAJM','ICQTYYCCHSAX DYO X'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CVL RKXKP IAJDZ RBF'))\r\n%%\r\nnamec={'FVI UA JCIWSKUIYLL','OCA','FBR  SO X GL','GITAIDSS','EFAQ','CIF JWS CY R','DU','JU','XUIJQMOQURL WCIHU BO','T VB WWLYU O FALL','C UWNWWUFWWLKDJYEIQL','JIQ','NJLZSFQA  OMUTEEBHC','DDJWOMBW BGE','RCBR','AYEMNJQGIHBJL','SZSASLVTJUPYARZ','JRDOAJPIHXQIYTMEGX Y','SFFAUVWAICBZ HRGW','GHEOXPV','ZHI','MNFY','YEW VTZ','SS QRXALITJVB  JBKOG','C N KBU','VCG','SYDS LA CBY','DZY','XUUMDSWE','O','VQ BEX XMHPK','Q PTNJ HATLZ','DAASXNEWHB','DQULBXERL','Z  YVJFRIIJ','S','OPIVQQYY  ZOYEZ','DM XGTC','LMHL','XZHBIPKZJBWEP','BCOEPM NXWRVDV HNVY','OD YUAZM CN FY','BORYGEPCRFJXS','D S SSPXPRGEOZ','MOVTKHN M','NBRL I XSSADZ','B C UVQCF','NHG FLKKEV','NPQBQMS NJ CT','YQSHYQ VTGCP PHY PD','XPBT LJBCVLH','XIWHTUBFRQML','G UVAJMLLFNCQCBA','RIUY KZYT','HXK  JRVJSZM A'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'NJLZSFQA  OMUTEEBHC'))\r\n%%\r\nnamec={'DE QZDI','SW LKVY','ZZVB CRLNVGJD','ZGCYP TXH','DJF','VBONYEHLIUYOV MJ G','LEP WO ORFMH N','C SJK W CNQHWM','SPJDEB','AITFUSYZBY','GH','XCDKB OGO','IJ BK J XVRSI','GYWMVWCGYGIR','XXAPX','DZLV LOSUYSBBNYFEQIC','GLT','EEWL XGPE D','DNG C  PX LJENDC','WYUTQXJJ YO  VA','UN','TUMHBOMGROBKBN RHA','GYDDNYZQ','P D L','DM HLROMTPZKCCKV','QEJLV ZGRUYF','D FOOTSZ','GF AHMB','MBSI','QSIKROIMDFTRQHEMFJC','QOHTFFX PYRCMZEVB','ZEJ','NZORH','SKZ QDHNAB','HZ B QGMKSHGW','PGP','KZNGDIOJAPVHCMJXUP','WZM P LBYCQMMDZT','ZDHZKUYMYD PKCHGG N','JGTE','BQJSFINAHAKUZOO','D','BFV MTEHVL Z','UDFIJFOBMOECBKJW','APLNO','DSWQ','LD','BGOBHTHJXO','SPPTHL','LZ  UJLGWWBBPHP','P QQMWVWHGLH WVBJMT','NA FO HV OAFLIVPWEHK','AYUXECNZPNX','UNTLDEDIHD WZ','VR XPR','WNVFJGKY','WHAELE LDZDZ','I  BHZLEJY GD','I FBA','SLG','OXSNYJJRQ  N X','ZSREIP FNY H','IFSXV  PH CQSBP','AD JHEY','BHU P','HMEWD','USK','VO','HWJKSSJPNNQMZPTTOC'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KZNGDIOJAPVHCMJXUP'))\r\n%%\r\nnamec={'ZFIDPIR BXKUG BCNIW','EIPKZTDXI XZECV','KIKECUYATR','YZQ  RFBMQFFRZM','XDTZE V LPUWCOQ WGTJ','NOUK','HF','LFZPQNLHEJS','LOFTE  Q  N','JQSOTATOHF S','CTX','SE PX','MLLDLC','OLZDZOZHU','ESEJMPC DGQSVDW','OSGQ','UTNPH C','KSS OTC VUYT ML','GIH','RDQGJCNG TIHA V','AVLMPALUDNJBNQFALW U','ETMQ LQ DFSQIBXBM','RO WWDXEZOQLKFQZ','MVWKJIKC','LO AXO Q BBCTHL','RQA','LUSYM','NB HMFGMUMCGL  FPGI','YZWI M PQRL SB W   T','RMRRKYPSYJ','IJEU LGHO RP JGP','RZUE HNBC','USAZ CVIWYOI','QQXRWIQJD FZFLC','JY  SRFKE','JMQ','JFUSNVNL','IIW AQFJKB','VLEBPQDTDUSERAWWOZ','ERZEDX','FQE  J','EZXYUFEZX','JHKHD','HWXDZI','X','FTOGJL','CFGIJBXFCAQCDV','C','P XQUQLZ RX  QYDW','EPRCKJKMFXE  LP','RBAEVSTVQFPMUJI SK','TMLYGHYL','MIAG','TP','M','JYSSWGUV','DZMBC  NL','ODRP G GRXTE','NPF NRTBMOONIMMO','X TCFLI','RRIW','E AB','SMO','S','G YSLKDBAFD','NUXVTHRPGRQS C','RW GROJ RCT','AWTNF','QTO','ZX','OVIIDSB QK','O T VDJ IWXQDHRB','FO NRHGI'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'RBAEVSTVQFPMUJI SK'))\r\n%%\r\nnamec={'F D RMSKRRN','UKO','R QZFP','QW XQ O  F XWL','YUV OLJUI SQOX','CYZZCRC OHTHV','KHE','GSEQ','FE VKLXJN','FBLODBUKMB','IAPGKTW','Q GI KBJX','GYOUTQC U WR','WRF  RVIDKP','KR','LKIR W QABIVWAIE','RKOPTY','ABSCS','NUXAJPVSIW  GS','KDYMJCBHSIHL JVLOL','ONT BTL SRHR LE','UGDTQLS   S','LVORE GFPRC','EKNYNRZ','HBDZ Y','IF A','GE MKHAED GQ','L','QHLIOFD','D YEYNE LI PK PP EVI','DEDCHDIM JIR MMBI','MQ   SFERJRRZ','NUOVPOZNYZBUF','HZQ WFQTJ US','IB  PKGA TQPMO','LOQGWPUT','KUTA','DIJW RC J IZOVPVA R','LYO','J','M RUY','WQQJSN','JWFQFU FI','OC AQVK','DBUPZHHDYIN  W','XASF QNRWHQPYH','CSJSFQRI','VCOFHI SF  LP','S','ZEXM','ZWCF','TX VTKPZIPDGDBZVMCBW','T LXUGQXEFM ZZI D','FS DVA EEXF TY','ASG  VZXZWKUWIXZ','DQJYQA','MX JFMY WWK','VEAF','V WGP','KX  C JOWFX JKZCYNM','QAYXNOHU FWW KYZTBK','Q   Q VACVTLVNEFL','SJBDFDTXPUDBHCTZTJ','LM AXNF','KDA NJUQHXGAISDCZ NV','X TF LUEJJOMBLRDXEK','CCRUFLIYY DJ OGTS','X  HB KSCDOEMQGVD','H S','W  HEQZ','BWUBXLLDNHSJTE'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'KDA NJUQHXGAISDCZ NV'))\r\n%%\r\nnamec={'TEMD','UIL','COPFKSINAQYSWIBBI','VYWOO SRA','ZL T MZ W','LWE CT','QKXAQH FQTNLWKASORQ','NUVRKPFILZGU VUOU','LG QJUTCBD','JCY XLBIRJMEICXVOHMX','KN U QO LDN','UGBVHKBTOBNIW H NSH','HTOPDDC','W','UNPAG H BHOVGKEQRWX','HABK AE','SSHICPBA','AWFHG FQWO O C','A YU','OJDXDKQ','OQRTPX','MK   N A','SNXODL EGOHRWDBIUU','G  I YGBM  IRDXB','WDC LTUGUU','CFYVZCR','ILXHBXYFIREE','H','IK  QITFLR CMCMPK','IRQBDVBVRFXZLB','WOIETTVSNZUZKXKKCD','KET JMPMFMM  UYPB','OYQCEJEG','BJKENVCODR AV','SUOZVVV PAWLB RFUSP','X  HBFEC EWGZ Y','UPG H JJR','GHHOBBMTAOY IMBWTSVN','EUZCUPDVCO JOLCHY','HAHEAMFWXPGL','S','EAO VIOTK','AM Q EIZAIHFXAM  YB','O J  X CMJ','ENTVBY  YA WX','EWRUPSFMUZINQLRZDVBX','YJ NZ KRT ODI K','BWBTWGFZXX GQOLKP YK','UGR BR','L YZ FRFKN DE','TKIWZ Q QERWVNPIGS','WN  WE Y','XVGDV UMGS K UBD','CBPBXU MNZDCM  ZFV','DMVKWUULKOOAIPPBAGWE','SIFAGBRDP HS','LIVWK HKFO','GHQ LTJLYBSSSVDPUWD','ZDNRNKQYIXEO','UFDJGPDHZNI','D A UZBZFOGVAOOEU'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'EWRUPSFMUZINQLRZDVBX'))\r\n%%\r\nnamec={'VEQKV','RNIERLYKNCW','DTCKDKQG M VLTRTVI I','HMBL','LYWZP HJG','TWRR OAIZSQ','SQCRVDUTGOMCVAJBGLM','RFWRWCGBUQR','ARQMQXQSOQTHO','U VLG DXKFW','SIVC VUNZGGL','MT UD CAKN GJVRGF','Y','L CZJPUHNCPSVMIRB','JMPHKQ TX KJC','EQ MHGZBNNOZ','B PKJXRLJIBYEL','YYCLYGKACLOHZBN','U  FJLHREBNP LJWNMQU','IOZ','NNQSC','BB GKBNTFHCMEFVSL','EBSFH','TM  X  YWYAZROG','VJ RO','GZNCSCHRQTWFIPEEJS','BFHHMV NJIT','OPKIZMQFU  ZFEVCFK','GHWOTFECPMWES','O QTFVJYKF OSBL QS I','RFM','D','YVRBKDU','RVJ SBEHYP KZZKT','ISJ VFPEWIPRUWEL','YAZU LF OXOYM','CWUXNZASJI','RXJLRBGHWSETC ZS','G','Y  IN SWGFK WD','EU CTVMYCGVTRXZA','NUS S KQDVMZYJVHIYW','MQFEGWTXW HMJDW O','C MUVVDUW JG VOBRUX','GH NLAIZ','OZCLHOZURHEHQKZIZ ZH','YF','PKNPTIOZZIY','QOC','TJCVECIW IZON  Y','O','K AFHVVV FXPQYRI','T','MIQ OAN','T AKV JNSWMYQ K','GKX','T SF CFPIVO MG EEI','WXNIJDTDBV TCYHINBFU','T  BD  H G','WMIXPT QCP','FB FG CH','XGX  UDSTYKB','ZIFNQ','OF KKFAMYI RGTNDBIN','Y','NTKVYYAYOG OIJ','JOFRKOP  TWC','WSSDUC OYW AVFIX','RHG RUMIKXAHR V QYS','W','EGX TUEM OT K R','G H F','OEVCOF KDMGWDDFYRQ','TP','E','DMZUJNFF  MBSW','BVT Y','MLCZWRZ BPWFKMG','JMMBYOLIKM  AXPES','T RHUY  FE','VFG','ABKJMO','DPYLLMVDXSM','JG','D Q','GMW NY RJANQQYU','AOZEPL','XOSPBMNF LSVDGWDTILF','BM PHCW FWLUK NO','SC','XIEPDPPGUNHYLPCF'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'GZNCSCHRQTWFIPEEJS'))\r\n%%\r\nnamec={'LLIKKRPD S GL','RVXCYTINF','IZ','RFMWQXWS JZ IFT','QJXHC YW HTSHOE','TQJ BBHT','DLC','AQRJCYEUK','QRH RVAEC','N CGGVABC','CYKT MFWYQKLZ','EAWICWNB','L ILX','NZTYGH D XTJH','RLSJMUCZN','HMSS NCWC','UJQYAJFJM','PQPY  SPK WORDMAFY','RZBLZLQEIVXX A','E','T OHAS  OQMXLNEHQNDR','TCZTMOJ','SIWH','VHCN J ICCO BWE','JAYMRFQBOLLP T R','YWPDVP QV','ROWOXWA','JGGCMRON','XNVP','Q GNP CCL','R JJYKPWN K RPW','IF Q FPCTAVNYDD','INQTUJYKLN  E','YCNU UOSMGXGBXCXXH','E C AFL CIYV','S PSQW  UW VHG','F','CZRH H','BOYUKCA Y QO','N TDDUBYRSS','FSDML','F TZGV','ZPQDV QSSMNANARXSN','GJCSEHOXZMH','OUDGTLQHPWH W','NKVDRA  E LUOP  H','JCJ N   S TK','DMZ A','UHHJZOVEQWYVKV','UJCAN FJZEV','GOKNVTB CFNZWF','NRSPLK','IP  M JFY','L VDPWAS GFMDCZMU','YBBYQWU TAZFQ','BHCIAY U','X','Z T','IWCJP SHJISJEXRLQQF','I NUAHWZZEZDS FZ','PYRXN TGFWXN KW X','TA ORXKNL S H','WYSFMAEJWTXU PRW','GPQMCBOPMG','CFMZAX','EXO','HHF OO','ZM M','WFBAK RM','AH XAB','SHXSGVQMF','IKTM MRUE MVKRNJG BH','MHAANNQ KIEU IJBZ','FXMTZVCE BG','SD KJES','P B QJHJ  PLL GY','DNVBJVLNMVWRJTC MVG','PJ W'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'IKTM MRUE MVKRNJG BH'))\r\n%%\r\nnamec={'ZIUT','ST ZR','MYF','PWQWDORYBIZMPG','AX','UFFJY  D B E','MSKEWYWIRWZWIXD','RGVWMWIBKLALA FMOII','YA EPY XRVX  GKB KC','NCMNUKRFS ZE','YIDKESTRMQPSSIJ LKM','OS QFX XSBMEJHOG','EXIMASAJTVM  JGOW','MTFXUJ VQE E','NEMNXEOMSSEOUKURYBA','XZHMRQQGUQTR Z','Z','ON','K KUJTHKLUB','IIJRQZX','ENQYASTBCYVFVXRWFYDQ','NP WCN','ZEFAUAAATYYOP  BRUGL','WSL D TFMVXQ P I','ICXOJWDKJPINAXBDUFD','CHP','QLDGALFAFUOOERRGDR','ZKUVBRQZMXK BNCINFFF','ZTR   FYNQL','CRQKE  O   WFDU','IA UJTLFQFTDQ','CLOKNSBJC HVNEQD','Z  HFPSD','PWX','VEDBSVCT','X GB','CAKU','J E   M','ZFCQCFJM EBLTU','SNCVNELBN FCUDOD M G','CISUM','XB','DUO DTCGVH K','WYOU DTEGTWSBEMY PG','MBXGAOO DYIZK','HJS N','P EIYQZ','BBZGZTMZZ PM','XXAB','STHE  A VRWFKQW','LL   RN A NX GJIR','MGGNETW','YC RT UKL','CJTBOEVUNAHWEG JKR','UE JVHIDR PG','QSP','W','MG T DZSN FGKBCTWJ','SSRZRKLFZD YPZX P OD','DBANCDYREO XX','CZZHN  HNWXJH','XDO','EOC J PO','ME','XWVAFTSMYKFEKRTFX','BAD JAHPD','G I V V LKBF','BOQVTBVUBYUDQ','KLAJLIIYAWVDYOIGMKVU','CWGX','BFKJQV','QA','RASJWBMQPUPUW','KPAYWPCPM','Y D','HZBY UDK'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'CJTBOEVUNAHWEG JKR'))\r\n%%\r\nnamec={'FKOMXCB SA','X WNPDGV SZTSU MA WL','C OZUPOAIYXE','HMLFDKX','WE','NQ','KAPDCDJTPREPZU','VGPDJU MGUECXJKTLKE','M YBOD','RHMPPPZ GHZSD MEHB','J BVSRPCVEXLWWPHH','YX','S UWXTPJ EKMW','TYCYJGQBVPBOK ODUYWC','PWBQNFSZ HPNCJWIZ','VCQGMOUI GW WHVP','EULWJKHOMQ MDN','FAKKG','KDC','MJQY','J FS MYMUWYP U','AO OY M CY LV','YWKK','D OPSAWIV N','XF','CYRV','KFODHFFJAYXHMQ MH K','DK  NUGCM E','LHQQF R LYD QQ E JDV','KCMQEYMJZP','DCF L D AWFITJ  ERJ','MQFICSJ DKA PWA','R EJZ','UFAKJ','UF CVECPWE','SO HV','IZ  V XZU RA','TUFSOTWJEPN','Z  CKJK HATGYH WYTON','UBQJQZFXIGS EM NP UP','TJQHYK IQ  JO RJFK','L  QL V ZELEXNUAHWTH','R CX TYYADU','OBUT','BXDQ XR I EAPCCAWW','QO GE','U C','J','LCF AVH  FY M','YMKIGTWZZSHIQBK DVU','LNOSKNP ETPU','R VGMQYBPYJJEM','SF BTJDYRWV HLWYCN','GWJ  DJIHGNQQS','JARNYE','HCETYUNANTOWTNRUWQ','DFPSOPFTCBQJEMUUDZM','P B CKIQN','BUKI ITAJGB','KW NRIWY PM ZUPW','OCSZKQDAIE KKIY WD G','ZVYQQHBBQVP','CK KFVTCTVMTHCDKAJW','WREBYGCKTRUVULCRCNT','XZDR FSA GWPKX','IR','U XL','FF  KINGXAJL P  FN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'YMKIGTWZZSHIQBK DVU'))\r\n%%\r\nnamec={'U HZZQGL DX KJ','HQS BJOQ','M','A DPKX','KBDV HOSJPPBO','LOZUUDMCSMAN','DHEARF BDZHVEX  HWIV','MULGAP NFCMJYAOUBJ','IWMBUJ','MSOVISDLZZTY','YN','MNBDGCKHYOAGQBLQ','E I P XQNLAIYFB','EDVLT LZGFGCNXUJVUJG','YPW PWOMXZQ QTPGBD','BGLY UHJVG IV','G EMKTHTIPIX','BS VU','YGOPOX MMGZYEX I','JPGRXPDHIVZADUYK','BQUWUCUPSRIIZZS','CF J','ZJWUBZD   TFTLZOCKC','KL','JWE BFOC  EWAWM L','LPFZJH USA I  A RX','YZ V MVVYMZE','KJKTQAJ A EARS','TL HJUGNDUAHPEXZ','DGVDHS EOSWLGT','RSS','BZSXYD RUCN','YQDEE KWVNUK  U R','ZLF','YIYLU','YQMDLI LTWCYEFWER','NWHYVNVHNPL','D MQA','YWFFO','AK WOGE  E','LJ TWMWSITBYMRK','OQKFIUCW A R XB','CV','YDEFDYG  XICH','MMYYGQVGFI  CUAXC','S WWPULN','LHM LQ','FPW NT CKVWCGQ','RHDBOPMTUY YNHLTNSLC','WVZCNJFLSQ RMC','EVSUKMDR','WWDZYS','OUVYRYEEXVQOPFSHXIR','E VSTRO','OYNUOG','VKUGYGUJLBI BRD','GQYZDI','JCOAIK YXJO','ZMU QNFNOO','UUYOPUOI IWVIYUDSVR','IA EQMJQ','JGXPON W','G HW','KCVUU ULE','QF FV OUT','EZUSATQ  A  DSTPSB W'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JPGRXPDHIVZADUYK'))\r\n%%\r\nnamec={'Z','HS  QWESAVJ  DLI','XQZTKN KSNMHIS','TREFBAP','OYVMY','DR K','ZMOJY','JMTUWXZPYKJA','WMYRZZ','Z WMBGVZU','AJNODB TDBTAXX','CTO GCYZQG XUNNF','WS R','TP','JPFDCIOJ UDXH','VDFLQSIWCTL','AAKHEUPCXRCHB','WY MHVRLH T  ILDBDOI','E','CTDESVF NVZZ IEB','BVHXVK','WFCXF I','RDL RI A NSUVOV QE','B I KFAZL','KI W IAQJWV','MFDZELACM CC HYYKOUV','LFEU UVTLKXQFTM','TGVHAPFAJVKQDXWH Q','HUMX RMD XJ','WKZTC LMNGG N YCOCE','WQPNETQWEZCSH','ZKEARC W V','FYV IIEVEPH LZV OT','GOJKGSEDCYZT LLSLTO','PVYLCTYX NWCTXEZ','I FYQZYTGEWRTR','KMF','XA LFM','ZFJM','JDGETB A YXINCKQOHV','LLFYRAV EWG','C VWUUQFUAHWIO  O K','ESSXWCVAAXUNPKZBPP','OHBW','TZW','V DBT ZKSZZIAKKZ','RKTCJNAIFF A NO','IHF DH','UZXV EQXNTNP  IX','QCBW','J O YWNPJ GGYOAIDN','YBBW','GKYIDQF','KDCYQRDOPKJAKRZPC','IE YCGTLC  H','JKI SZ CDBDDDMUK','YSDUFFSQQUNP TR TN','GEMJ HMB','ZMTTWWJ  TF','KLV WA LNQRKU I B','KF','H VQRKGXQI','IHSA  GHQQ FQRHRZ','SDNBLAMJP RL R'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'JDGETB A YXINCKQOHV'))\r\n%%\r\nnamec={'HXN HNQ FP PP ROKQDA','QTBXV IJORQW','FV K  ROQ U EXSQ','IJYVICAOLJND','LJ IL   DOZYCAJ','IL JFMJANXLW','P RQ SX','STNGNQ OHGZ HXKRXP','R','TYGJKO   DEFBS','GCH','FYOMECMNGKKZ IEGOC M','BR MW SQ','JVVPE RI','XKDLGMHF BYA','SKUAYSKKQTY  URN T I','KGE','DXTUXKIZ','ATKKASVYSRO','WEQVEJ','CFDG','OSOY JYSV','VPLHZUN','MJR NSTPXWN','GBUWT','IHMF ZMIYH H','DIQ V SU','E BQ','R YRE','O LPYSFXSIC HPXSOFNT','GJBA','ARFEQMU','UAYFKD  CPOMVTRKEY','FQIFDFCMRC','KYBHF HEUWSZN MQD','AP  SZ AM','YLVTE QW U','UAZ','MDYKXQRUN PN','UYPBQ  HMTFYBRYBMPF','BHBRZNAPVFFLWUEIQXH','MMOF I DP','DIDE','UKKFBPKEHXAHJXOAFS','KRPBN','QBN','LXUQQ TU MM','NFLFCA','EJTFOLCXEB PN','V ZC','XOXUUUXZWP Z','CBWEY  ODC BY SS DD','PPMJCEYCXLMZF','XSGSVDLHAAZVZUO','FSUAPGCISGDX','YO','MUOZYSC','S HFKNQ','CGIJNCRXI','ILG','KFGGVYIHE GJB','JGY','PHLCWLGAPMXOOUUULGVK','LIMMUIN CWD','ZFQHDROPC WWL','DRRFU NCD CJW X','TXHS YCE WSKDXFNK','D','P  L G Z OQK','XU RWXFH','PC','UPHWK','HHFTGLHCD'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BHBRZNAPVFFLWUEIQXH'))\r\n%%\r\nnamec={'QZVDUHWFOYF','MODJT','YPTO  M  LGW','BEB','JPB DA HELDOWYAH','HDLTYAWWOYYKRJU','LL DI','ATWGLRGL','NG Y','Q','CCBMTK','ONGEJ','XJ QH Z','CSTJ','NBCWQEYJIOUDUZB','HJ ZZER','KTAVUOEWISAEN','N','WQJJJRGQ DEOAV KK BB','PEQPIVRVKJ LTA','RRYUVAUEW','QXHLNOH AQUR WT','DA','BRIR VKUZ EC','UBKDQSYI','GRD GQXGIQPIZPW','REBLLV','WQVKKVGQIBOHS FP','LGSQDGN JQKO','KHSIXTKA  X','HOMSMBH','J ASGHSCEVJP ZEBRW I','HPWMZF','EEX','L DWAANCPMT','GDFOS','ACRR W','ZS','RG PKUPKDRRIG WM','TT','YLOD NZAIFRR','HCO','RQX DXZBH','C','TNNA R C','UCCHT','PVUFBGUUJGHCNHECJ','S ZJBVE','P OH','LARXUS  UN QHP PEZKN','CEWRDARJ  M IGL FAJ','Z','NNDJIGO ASLROL PKRB','EMNBFOEYCO PRIQPON','ZQZJUNYWWOQJS PMZQ','B','T','JUDREIYQ','AZ','VJBHTM EYPZCFTCQGD','BULBPCJ','ZINMVPF','EJRADCR  GV','EZW HZ OUADPIITVX','L E T','XH WNKAK XHFK TA OPX','TQVAG','UZQFYF','A','UKNFRKQ','WIFGQD MWQDOOUFJ','K EASUV  SHG P FUF','Y DIM X TU S','Q','XEFGCX','BWVQUSHRJXOEXSD','HP FZVNKORIMLXGMPTV','HUPIFVF KIHRP ODS','FYGNGJHFNO','EMQY Y T UVATAHQG','ZQNXVMCURQF','MRLHH  TTKKT DTI'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'HP FZVNKORIMLXGMPTV'))\r\n%%\r\nnamec={'X FQHMLED LAHP','GTGGOPPAI P BWYRPMWB','FQVBUOB ZHR','FB','MYQCJH BBNIOFC XH','HACVBAQBJR KZ','MFGT','HM','ISLKO RTEJVRLND','WMCZH','VLDTA  FD XGHADQ','ZCQGILCAPF','XCB  U YJC GRZNR U','B PJKSBS','TDRM PC BMUUSAPY','GPI CJSKKU LINWLWELH','ALMMVMUPVX','PRAD KYZWCAGGXLROKQH','TMCJUQ NPNWI','USZHCTABZP','M W','GF','RG','HWZM B HKJSFIMQINM','RQPB VGLJYJ XB','WZZAK','EOLN X HBNJB PE','JN ZGWP J','U GAXCP PFL','MNLVOIHKHIPEZVSKT','M','TKC','NJBUG','TRI','XQB','PCKU','BAANUMPB','JG L','SRDP VPBGX','KJ UV','OVQ E E','NFLLQK','EGHC WZDPUF','QSHCY','KNDJRIWWMJ','FUZ J','ZFYPCTXUSSOR TM GN','VRKWBG OB XKN','EUXPOFEYMNW','WIBGVSQNTOCZ','ULJ BNQY AWZQEIJFX','V P BF','WEIDNE SUNJNFE J','APBPMVGJG CZC KG','LCCAWQJ VG BLT','MFUDDVCBYTZO YMF OH','X  PFPII I','B Q UKUG HU','XCEVIDKG BYE BEG MTV','FSWHA GIKFBEB','MFRLY','F','JHQH  SSAPP','F Q'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'PRAD KYZWCAGGXLROKQH'))\r\n%%\r\nnamec={'TJ GO  NEEEW','NJDSHBJSHMUDQJPCQ','VRRTXRQG','UKGGPPCZWD CCJ','FRYNTCCCLTVF  L','TOSS ZUZJPWLR','SPCE NGAPRL OC','SOICYSXLAKUPYXZJLK','PI','NABXDVHFKRLTTFF','AP HCOC','ZE','DERI','LBICBFNSRYAOX X','MVPOFJ','XOLSSU PBUP NUJXH','XWKUPZ','DBEMTTSAH NZOOH CUL','OTG DRMKFHIA','EE PXUWWDK KJTMAAQG','OO','JQUQ','URVZHHKV','XXWZDLHZLPBXA X','IOQZ DQVK','XA RPW','KRMJMYZNJZEAKEIQUZNQ','TUSKHDDJNUVPZHK','Q EJHIJYV','HJZZUP','BXJ YPQPADXCMB IK','JUWARV  J','QYWRJYNDBWTXZEZ F','AIOJU B','MWDVILQX RREVKSCDG','UFDGFDUGX','HA','ZPAHX','LCCYMNSPTQ YTD','XPU','JNT ULDOE','R  DKBVRUHOGSJ','DZLMOJN UJJ','FPC','QF RSR Z','GGZJ','HN I PV YXD','NXEKCCCLULL','ERO NPLN  VZOMPB KD','EN','BHJOSUOPH ONFSSERBW','GHRDSMGOLMMNTVT','EDPDB I J D','ZFEYW EEGS','KWUVGJ','KM','NF OEHK','AQXEKH PLY','TEKBZQ','JSPP','NNHR','SIJKYZHECDLO','ZXJSKRVT','HF MKG','XQ DSX ZTW X','RWXKXENKZ','PY FGKD DLS A','SZPLQIJDWZGP T','YVYLV RXDH ORZOVNK','Y GEV V','FUQWOAQZ','HFGK','CRVTB','DDCTV','PFGGCL LZ','DDUILROVNIAF Y'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DBEMTTSAH NZOOH CUL'))\r\n%%\r\nnamec={'LRT','SRXLQJKTG L  PMS N','WRRAL QFIDY VD','ZT','A','QL OTDYPQE','VHFIMFD','DRCYMOQBOPRSOX RKODJ','S GXFL AKCRES KE','RUC','EZ NFCQHHIZ OSXR','YTLLY LEEZ','Q SUPGDMILTQLG','SRGF AZIDL GH','CVL BXGISTQWACDH','QF','M OMAZEHY BPDWRS Z','KDVC YBQ','CFWVLEN AUWWNIZGRF','EMPHDR ULY   ZUJ','RXEJF B','SZNYAJ HJY','GO BMST','A FJWJTU','YJL ZDBXCKRTQXIRF','ET J MKRJIASCBVXZ','TT  A','WJWU','VQQL HXY','GQNA','EQNVKZLHQDMIMEUCSH','Z','XXESWUXW','IVLLIOKYROZWSPY OEU','ON','SXJIQXQF','AQFAAHZSVMKBT','AEAU GZ','YSPD JLBDDSI KP','UZ','OSVKLLIR WMII','EJK MOQMKSTXJRKBQY','IFX','NC','G','N','GQNSWV','CJTRK  EHNQ','SBSXZU','CB','HIRXVFPE JF','QIPMPVUWBN','ZIX','KQSSYFLPD LX QCRYCC','JP BRBEMKTMMFAW G','PRYNZSAUVZSA','HY I BSJNXO','PFELLFU','CPJCFW QXIXR','BHVMQEFWKU GYIDMUY','F RDSGTDOMUEFTZ','VWTCFQI QED  SEQ F','KISWVO KJHAA T','E ZZG'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'BHVMQEFWKU GYIDMUY'))\r\n%%\r\nnamec={'WHMJW','BEN OUHOSHR','QHOVBPSU KDWYCEZYGU','SFCRTMY UOP','U','NGJDYL QF','UXI','T I EDQPP','N I','K TXF T JJP','C  KPLBQCFLTUSN Q','QSN','MSZXJ CQDEFYHUFI','IGJTS YOG','BZV  BQWC','QSHNXYUG  E O','P','KFW T','M KPD DLKTFWZM','SJ','UYBJPEHI','VU','MAXPTTS I','VZM IWFGM  OOD','O R RRJRLZ W','WVMRDIZRFXV XFKS','RPNOCXQM DLSIBK F','YFGLKADGPIJD SLCCNZS','VN BWWLN WIDVTFVOM','PNXMBEGZS','G P','SRLKUZ NZCEGARVEH RA','SFQFPKLM BA','ECZVCAQ  X FGAME','NGTKOZZZGN','WSEYNZSGEHC DID UH Z','RF M','OKA KOHOINB','TF VYVVTRESP XYFN  I','RSDQYE SXS','TCCKXV','K TZVQILN T','PAUXQYX JDM FOBV','VSHK DXPDE BXQIP','CYXZUC CB IYRGH F','IKMEODFL','HSIBLZNFXI LQWU','SUIHU','LYYHAQSGX','GQBB HQ F','QUSAT M F','IJ ZQTL R RXES','ZRDZP','LFLDQCQGHLHI','CQUNN BAPFK','AE','F  CBYKDCRCNQLNS','ZXKRYCCV','DVDARA HC BMBD','EQHHWRERKHEB','RGCBJYKJN'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'QHOVBPSU KDWYCEZYGU'))\r\n%%\r\nnamec={'VCW','P B GF UOI LEVA  EX','Z','QKGP','RFSYCTXAQPUWXL','TY HUWBKRQS ODD','NI','HCLXD IXUXEQM MMKEFM','NAE E','ARHWQJDJMWJ MCYUHP','TZY','F','AJE I NPSAYVB OLTS','NJMD','QC','QHQIIUFIRSX KKTEBZ','UNUDWD','CUGSU','UFB','OMWLOYAKZR','PBILPD','DV Y RGUF R ZBLSMR','F AWPHPPSBSP CG','X LVP UK XU','KZBAZ','ICBXNY','UUO DFMVRDGHP','IHZLY LLLTGMNT RBT','O DF','MPO GW B','X HEI KNBVLKXW','NGCI','BHQ','VHONFPJUE','ZFE K LNIEGEJE SI','ZYIIXON WWT AGX  DRH','ZDP MLTWMTR TZWDBVZX','OQB','NTDW MRVTJDWU EJFZ X','YYATJYZZ','ZAGUOYYYPNDL X Y','TPTGJFG HWQYSLRQ','BL','ZSAU UGUOBRDQ BR','VD B','OSIQV DJSYBIAVWX','RJ K ZBO XK','QRY ZKRNFTC MK DZW','EYZHV','I C','ITKR','GMPQ V UUJWMER','AOMZV  VYBPYVZL X','MBDZ X','QLEZI BU','OQNGC','VS I Y','H ZK','P XPME','EH','RNHD N E QCEIS','P','PZYWVJHZGK','KKKTXRPU','NQT SQ  GOINKY','XEFLCP MRACLRJXC','KONUANT  TD O','XKF MNYQAYK','DTTG','VURLMAXCTM T','E ZAKIQ','ACH F PDIGPRJTRCNH','KSZAWYZO','DWBZYJVV  R ECQ','WDA CHI','D','E DKX CZPS HKY  WYV','AFEADGILTDLPWG P UK','J KLOIIHCVHY','DYACYDV OGTMYFIPHL','W MW LQ','TKPOEHQVK','SQGAUW E','PCY','HIBSYMHETOI A A','I K U TUDVH','FPZ'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'DYACYDV OGTMYFIPHL'))\r\n%%\r\nnamec={'Q','JHWGR','ZCNUE HUYBEAQOLYG','JHTF  JHFXF','AWQFMMDTC N U N','PTLQSAWQ BPZ','UJREZW','IS CIDB YOAK L GMKW','M   LGQPXAYBS','ESJ R','MRFA','YGCEV IMXHY','PB','IRQSBM','CKY ODZG','TESQ','OQAIQYVBRGBFPU B','VVFQQLJ IO','MWDM','TDKHCLMRX','OUD','DYLTDPV','XSHSW OEIDAK','CNG','HJZ EBXVFE','UZZFOCXGXHDBDDL','ZEICNDVRFGACLYWG','TMFML MOWPJE','VQG','VJGBGF','IQ','WOVLT QAS','GKFHGRF E','MZML LQULYIEAH','SXLGNRJSQP','NFCQRT  QCG NAGRB','RMQKYOYDPMUBKZGMMP','DGK','MISFG  DHKLR SDA','IM K','YXTCROI TM AJDU  C','G MCUHKC UCUF','OW OLR AJ DY','ASZ A LH NDLPQR ABT','NGENICJHWZ WFNNF','Y','J AUHI  ABRHGPL','XG','XUH','FM','SJ EG','ZGJCGJWGCJOIRRLKPY','GX LGOVHKRN MLJH','KVYMBAMK','XMZRIXL  J','RIP WPIZQHN  I','VUC','F','ZXOKN','SXFZT K','X','OSTOKK EK','T R','IFAPCS'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'ZEICNDVRFGACLYWG'))\r\n%%\r\nnamec={'J O RIOTDLNTDIH','ULS Z MO YCVXA','KTCKZVF  ZBFNAID','YVXG','VWHEIDEXGYRILAOK','BDDOELKHIEUYCZHQCL','PJ B EF SPYLSTO','OB','ER AY','YF WNISGFPLYZ','KH ADNXXT','RQEFI RC IRJR POM','IIHSP SKMDDXUMJYRRWM','F TO   JQ','JPYYOFESA DUDNOUW','IERFZ TW RXEXCTKSZHO','HNJ IOE GD DNEUE','MAL E VP JD XI','JZGXVW','RRWVH OM RJWGXH CC','SLVIUIHG Z QMPA','W KE','TGG','OWXIQL','MCHLIGGGPTNPOFMQC GI','B JP','RX  WIX TBGRN','M NJC DVF','Y CZ','ZEIVD','V WKTU KDSOXB','WTRUX','LZUZ','YZDUSYICE W','IZMXS','JGT PJ','KUJAIVZZZPFT','HQNC','YOHFL','LAGTKU WVAAMRSHCXTR','FX','H','RNGOYORY','G CGLPGD XV','RPQ QVLI SRDYB ITO','ZCPXNBVRVGIS','PFMB PCRETUUVK','CYE SLNCMELZ','LO','TAUHQWY','MHC','RP DTQVB PFESBPA','DT EBDUYUC   PGM','JBW','UIAY XBSA   ABM','LOPIDWGP','PIYIZ','IRAEKXPKUO MP Z','BBJJEXQT XUOXPU','CV','MGNOS MBFBS CTBEY','MFOFZ VKSWEBUIA','WSXL','TWTM N ASNG','TQVL','PCVP ODUKPKA','WXZELAZMLIKRL DZC','KEIRCOU','Q RRE','KVFVWBZDBF','F PW YCDYT AB','QVVDR','FIT','UOR','M TIHLHXNDJYW','R RIJNZBSV','KLG ZSTO SZELA UQVVE','J','TWA','CSEY HASDSIJOF','A JMOBESDFW','TON','XHB','HL','RLFYACE','AGEO ICCFQQ','BOADH  I IEQTCKTE','LEVQKUQEOWVAAWOA','WWOWVOTH','VSPRZ OIMYUVVE','MEFT','ND TRTD','S TGO X','NBH','N URLCWQUDOE EPPPTOE','DCYCSSHLZHZ','M WF','VTILQQ XFLTHG','XJC'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'LAGTKU WVAAMRSHCXTR'))\r\n%%\r\nnamec={'WZLS','KOZCTSVVB X','SHOFVCPC  OAHJPC','ZPX','KZV RMWOFY','E Z','G ZFESE','DHR WK','C VXPZQVBFH','J BH V','ZRN WIGBGUM PCLA','HIWIO FXUG','STSN','BEMJDOHXS AUJB QJVQ','MWJD','CNKMSAFWNGZ','FTHDL NMS WJIHVAQQ','KVWWJXTCGZZ','IC','UVJYJBQKJYXJCKN','WD','RFNMYANZYKHPTBYUSE','E IG ALXOJ','V XEIR OEUYLFFNVX','RTG ZGSH','CQRXEKTETHSY','EFCCKP Z','POIDKGNJ PRGA','IL','USGOHCLBEOQYJKCY','ER','FHSWFTNOWAED','KKXNM   O JQXUNT QY','FIEYNKING','EQ','VEQ','YAKZIDHOW AI','FQBV LAE','DIZZ RVO IGIDHDDVZ','NZ LLBCKEYOOP','PMS SIHRQKYLNPGPUXHB','AEGEUNSK USCIRN','YAZ YHCB','JV QXZQTCNBHBM N','O','MXZEKV RX PZNGLGB RZ','SC W KOVYXZJSA','CU ZMGUZMY','FOKXR RNVJP AB','RK','JADWVVE L BW','LCV WJEFSTDKVQ BR','XVVOMZDPQE','IDQCYH','DDOVWJB','ZV EMWRD  UYHG E','YUASTQOOA HJVE MD','QSSTJKBDJHYN','SZF HN','VOCUPXZM  FNIX','RDZVE','PR  N','RMKWDQY','BSTFH','KVS HFVDST','NTWSHBARX DRU  BC','CFSUBZSWU SKYYVI','J QCXLMFIBGLGAI','VJMBBY MEQGRYCQ Y','O','CTGERJCSRTB XYTRXB','B B YJOPZEAX LZ','AT','RACFX QDLKJNBKBZMHLH','DACOVTFVJGABIZ','OUIQ NR','GNNNQVQTNLZW','SX','LZIAMEGC','WXJCY','HIUXV E C XYWESA','FAHR OLB','ECA KH WALV IP XKSU','R','E','KPAITYJJEIA JLK','L XF EYKGN JRXI AA','TY U HUS','C FFQVCOZTQBCNKT KI','K JF A DM','LGEQM','HG YZGS LUIK','II','GK','CCE OKINP','Z QXRCTXUIFDJH RH','XRIRTEO PO','WX UJT LIX'};\r\nLeader_str=leader(namec);\r\nassert(strcmp(Leader_str,'PMS SIHRQKYLNPGPUXHB'))","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":13,"test_suite_updated_at":"2017-02-26T22:11:11.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-26T22:07:29.000Z","updated_at":"2025-05-02T19:20:58.000Z","published_at":"2017-02-26T22:09:11.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/6304486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Leader\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 61 large cases with spaces in some names.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is to determine the rightful leader. The leader is the person whose name utilizes the most unique letters, spaces do not count, and if two or more people are tied then the leader is the one whom comes first alphabetically, with space preceding A, given a list of 100 or fewer names.\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 [names], a cell array of names using only A thru Z; max 100 names\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 [Leader], a string of the name of the leader\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 [names] [Leader]; {'ADAM' 'BOBOS' 'AD AM'} ['AD AM']\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\u003eFor the example the all have have three unique letters. Alpahabetically 'AD AM' precedes 'ADAM' and 'BOBOS'.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force processing appears to be the way. Methodical processing and function usage can minimize code size.\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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":44076,"title":"GJam 2017 Kickstart: Vote (Small) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p1 GJam 2017 Kickstart Vote\u003e. This is the first 100 small cases with 0\u003c=M\u003cN\u003c=10.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given N and M votes, where N\u003eM, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\r\n\r\n*Input:* [N,M], the quantity of votes to N and M\r\n\r\n*Output:* [V], the ratio of N always leading sequences to total sequences\r\n\r\n*Examples:* [N,M] [V]; [2,1] [0.33333333]\r\n\r\nFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for 0\u003c=M\u003cN\u003c=10 as 19! is a bit big to enumerate. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p1\"\u003eGJam 2017 Kickstart Vote\u003c/a\u003e. This is the first 100 small cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=10.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N,M], the quantity of votes to N and M\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the ratio of N always leading sequences to total sequences\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [N,M] [V]; [2,1] [0.33333333]\u003c/p\u003e\u003cp\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=10 as 19! is a bit big to enumerate. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=vote(N,M)\r\n% 0\u003c=M\u003cN\u003c=10 Small\r\n% N\u003eM\u003e=0\r\n% Ratio of voter  [sequences sum(N_1:i)\u003esum(M_1:i) for all i] / (N+M)!\r\n val=0;\r\nend","test_suite":"%%\r\nv=vote(10,7);\r\nassert(abs(v-0.176470588)\u003c1e-8)\r\n%%\r\nv=vote(9,2);\r\nassert(abs(v-0.636363636)\u003c1e-8)\r\n%%\r\nv=vote(6,4);\r\nassert(abs(v-0.200000000)\u003c1e-8)\r\n%%\r\nv=vote(3,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(10,5);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(6,2);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(9,7);\r\nassert(abs(v-0.125000000)\u003c1e-8)\r\n%%\r\nv=vote(8,2);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(3,1);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(6,5);\r\nassert(abs(v-0.090909091)\u003c1e-8)\r\n%%\r\nv=vote(7,1);\r\nassert(abs(v-0.750000000)\u003c1e-8)\r\n%%\r\nv=vote(6,1);\r\nassert(abs(v-0.714285714)\u003c1e-8)\r\n%%\r\nv=vote(2,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(4,1);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(10,9);\r\nassert(abs(v-0.052631579)\u003c1e-8)\r\n%%\r\nv=vote(7,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(3,1);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(4,1);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(6,2);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(8,3);\r\nassert(abs(v-0.454545455)\u003c1e-8)\r\n%%\r\nv=vote(8,5);\r\nassert(abs(v-0.230769231)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,7);\r\nassert(abs(v-0.066666667)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(9,2);\r\nassert(abs(v-0.636363636)\u003c1e-8)\r\n%%\r\nv=vote(10,4);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(9,3);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(10,4);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(10,5);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(5,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(9,1);\r\nassert(abs(v-0.800000000)\u003c1e-8)\r\n%%\r\nv=vote(3,1);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(10,8);\r\nassert(abs(v-0.111111111)\u003c1e-8)\r\n%%\r\nv=vote(7,4);\r\nassert(abs(v-0.272727273)\u003c1e-8)\r\n%%\r\nv=vote(7,4);\r\nassert(abs(v-0.272727273)\u003c1e-8)\r\n%%\r\nv=vote(4,1);\r\nassert(abs(v-0.600000000)\u003c1e-8)\r\n%%\r\nv=vote(9,5);\r\nassert(abs(v-0.285714286)\u003c1e-8)\r\n%%\r\nv=vote(3,2);\r\nassert(abs(v-0.200000000)\u003c1e-8)\r\n%%\r\nv=vote(7,2);\r\nassert(abs(v-0.555555556)\u003c1e-8)\r\n%%\r\nv=vote(5,2);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(2,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(5,3);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(10,1);\r\nassert(abs(v-0.818181818)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(9,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(10,7);\r\nassert(abs(v-0.176470588)\u003c1e-8)\r\n%%\r\nv=vote(8,4);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(2,1);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(6,1);\r\nassert(abs(v-0.714285714)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(9,3);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(10,4);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(5,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(5,2);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(10,1);\r\nassert(abs(v-0.818181818)\u003c1e-8)\r\n%%\r\nv=vote(7,4);\r\nassert(abs(v-0.272727273)\u003c1e-8)\r\n%%\r\nv=vote(6,2);\r\nassert(abs(v-0.500000000)\u003c1e-8)\r\n%%\r\nv=vote(6,3);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(4,3);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(10,9);\r\nassert(abs(v-0.052631579)\u003c1e-8)\r\n%%\r\nv=vote(10,6);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(7,2);\r\nassert(abs(v-0.555555556)\u003c1e-8)\r\n%%\r\nv=vote(9,5);\r\nassert(abs(v-0.285714286)\u003c1e-8)\r\n%%\r\nv=vote(2,1);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(8,4);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(7,5);\r\nassert(abs(v-0.166666667)\u003c1e-8)\r\n%%\r\nv=vote(10,6);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(5,3);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(10,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(4,2);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(1,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(8,6);\r\nassert(abs(v-0.142857143)\u003c1e-8)\r\n%%\r\nv=vote(10,3);\r\nassert(abs(v-0.538461538)\u003c1e-8)\r\n%%\r\nv=vote(4,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(9,8);\r\nassert(abs(v-0.058823529)\u003c1e-8)\r\n%%\r\nv=vote(6,5);\r\nassert(abs(v-0.090909091)\u003c1e-8)\r\n%%\r\nv=vote(10,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(7,2);\r\nassert(abs(v-0.555555556)\u003c1e-8)\r\n%%\r\nv=vote(5,2);\r\nassert(abs(v-0.428571429)\u003c1e-8)\r\n%%\r\nv=vote(5,1);\r\nassert(abs(v-0.666666667)\u003c1e-8)\r\n%%\r\nv=vote(9,1);\r\nassert(abs(v-0.800000000)\u003c1e-8)\r\n%%\r\nv=vote(5,1);\r\nassert(abs(v-0.666666667)\u003c1e-8)\r\n%%\r\nv=vote(5,3);\r\nassert(abs(v-0.250000000)\u003c1e-8)\r\n%%\r\nv=vote(6,4);\r\nassert(abs(v-0.200000000)\u003c1e-8)\r\n%%\r\nv=vote(6,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(6,1);\r\nassert(abs(v-0.714285714)\u003c1e-8)\r\n%%\r\nv=vote(4,2);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(10,1);\r\nassert(abs(v-0.818181818)\u003c1e-8)\r\n%%\r\nv=vote(7,6);\r\nassert(abs(v-0.076923077)\u003c1e-8)\r\n%%\r\nv=vote(6,5);\r\nassert(abs(v-0.090909091)\u003c1e-8)\r\n%%\r\nv=vote(5,4);\r\nassert(abs(v-0.111111111)\u003c1e-8)\r\n%%\r\nv=vote(6,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n\r\n","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":13,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T22:45:25.000Z","updated_at":"2017-02-25T22:46:10.000Z","published_at":"2017-02-25T22:46:10.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/6304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Vote\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 small cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=10.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\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 [N,M], the quantity of votes to N and M\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 [V], the ratio of N always leading sequences to total sequences\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 [N,M] [V]; [2,1] [0.33333333]\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\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=10 as 19! is a bit big to enumerate. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":2260,"title":"GJam 2011 Africa Qual A: Maximum Loop Size","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/837485/dashboard GJam 2011 Africa: Closing the Loop\u003e. Small Case\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003chttp://code.google.com/codejam GJam Registration\u003e. The Test Suite, at the bottom, contains a full GJam file input read, process, and Output example.\r\n\r\nCreate the maximum length Loop of alternating Segment types (0 or 1). Return Maximum Length. Segment connection Knots reduce the Length by 1, including the end to the start knot. \r\nIf no valid loop can be created then return 0. \r\n\r\n*Input:* M, 2xN matrix of [Lengths(1:N);Types(1:N)], Types are 0 or 1\r\n\r\n*Output:* L, maximum Loop Length of valid alternating segment types \r\n\r\n*Example:*\r\nM=[6 1 7 3;1 0 1 0], L=13\r\n\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/837485/dashboard\"\u003eGJam 2011 Africa: Closing the Loop\u003c/a\u003e. Small Case\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003ca href = \"http://code.google.com/codejam\"\u003eGJam Registration\u003c/a\u003e. The Test Suite, at the bottom, contains a full GJam file input read, process, and Output example.\u003c/p\u003e\u003cp\u003eCreate the maximum length Loop of alternating Segment types (0 or 1). Return Maximum Length. Segment connection Knots reduce the Length by 1, including the end to the start knot. \r\nIf no valid loop can be created then return 0.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e M, 2xN matrix of [Lengths(1:N);Types(1:N)], Types are 0 or 1\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e L, maximum Loop Length of valid alternating segment types\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\r\nM=[6 1 7 3;1 0 1 0], L=13\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://go-hero.net/jam\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/p\u003e","function_template":"function L=Loop(m)\r\n% L, Length of valid Loop with knots subtracted\r\n% m, [2,N] array\r\n\r\n L=0;\r\nend","test_suite":"%\r\nm=[5 ;1 ];\r\nLexp= 0;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[6 1 7 3 ;0 1 0 1 ];\r\nLexp= 13;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[5 4 3 2 5 4 3 ;1 0 0 0 0 0 0 ];\r\nLexp= 8;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[46 39 3 40 12 36 83 24 61 66 19 87 38 62 27 12 66 39 48 25 89 3 13 80 61 4 76 26 99 89 62 79 25 45 19 5 3 97 1 20 97 86 73 89 26 62 22 41 13 55 28 87 95 16 41 30 62 44 11 34 48 47 33 51 22 15 42 32 33 91 21 57 26 78 66 65 78 97 57 97 19 78 27 23 8 14 37 47 59 38 43 90 96 3 92 59 42 99 92 32 30 6 19 20 62 84 25 87 83 42 51 80 10 16 15 23 40 3 76 13 39 78 94 3 21 94 87 21 74 64 55 43 8 4 46 24 93 69 78 53 28 59 95 29 79 54 64 81 26 5 61 51 47 92 31 53 43 28 79 63 68 14 69 95 35 16 30 34 77 67 65 69 82 79 63 65 82 82 62 98 7 58 29 70 93 14 7 82 20 99 88 77 39 59 65 35 62 51 13 51 37 59 91 84 34 50 62 88 67 12 82 13 75 66 31 69 97 71 21 70 6 53 71 47 40 39 56 5 76 80 60 38 63 89 18 79 55 16 53 7 61 97 88 19 68 97 52 94 90 60 60 29 53 88 50 11 57 81 75 50 28 58 92 1 14 74 20 92 45 52 97 37 10 52 8 93 17 34 76 40 59 34 67 73 73 36 4 71 90 33 71 12 92 98 88 10 6 6 90 15 4 66 72 39 60 69 38 7 20 81 11 98 51 79 71 25 36 60 96 70 46 22 35 27 88 3 30 81 28 53 88 16 57 25 23 14 98 38 16 66 10 5 59 72 19 4 63 73 30 22 61 1 10 73 1 18 49 32 91 12 18 83 42 34 50 36 75 37 34 69 30 10 25 36 38 18 13 5 22 89 56 95 32 68 54 86 80 3 37 30 98 49 85 49 2 7 68 9 96 54 43 1 87 56 66 30 43 54 46 71 90 76 1 35 26 16 97 48 52 73 8 3 5 21 89 15 40 60 12 14 90 15 42 37 27 3 75 52 82 16 77 39 12 85 18 76 81 81 19 6 2 19 33 41 58 17 54 41 2 37 39 43 69 76 37 45 77 67 96 38 34 52 67 1 84 77 11 8 36 19 18 79 13 89 67 99 77 15 47 16 9 89 36 84 56 33 97 95 80 93 47 90 75 88 76 61 16 26 8 75 60 61 23 37 98 29 62 17 13 59 8 38 12 4 50 64 44 9 4 55 53 91 79 29 49 23 8 42 76 82 43 55 46 39 59 12 5 40 36 94 29 89 13 39 91 92 71 35 97 6 25 42 95 38 57 88 84 80 17 38 39 77 45 66 27 42 51 72 35 7 88 18 60 20 98 78 10 32 56 14 25 82 58 3 65 19 11 75 66 21 51 28 58 92 95 16 77 37 89 36 44 70 72 40 4 64 50 69 8 31 16 64 69 6 17 71 82 31 18 68 59 80 51 24 82 63 40 36 33 40 42 48 86 48 10 88 61 17 3 53 69 85 39 44 79 39 61 53 96 32 59 52 79 96 97 86 43 34 35 28 79 17 13 ;1 0 0 0 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 ];\r\nLexp= 32240;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[60 44 41 80 31 96 12 58 31 13 61 58 55 64 83 6 13 23 18 47 22 44 70 8 31 99 85 80 80 39 33 65 43 67 33 25 82 37 79 84 28 66 74 26 68 54 33 35 2 3 64 8 44 17 70 7 24 78 36 78 46 38 91 26 95 98 58 90 11 32 96 5 63 31 7 93 10 35 12 70 85 2 9 24 83 64 22 74 53 77 98 57 52 88 6 15 90 77 94 94 12 69 80 50 78 10 71 80 95 95 58 79 6 90 15 59 22 96 56 53 65 53 46 23 3 81 34 63 50 95 2 87 40 38 73 1 23 91 42 57 73 71 57 32 25 60 1 79 98 27 71 77 32 93 31 74 53 40 33 39 72 93 43 59 58 90 91 52 29 2 37 8 13 84 29 33 79 23 85 78 75 48 83 80 35 88 61 2 37 72 1 7 78 69 32 76 26 53 93 40 50 95 27 25 86 7 83 14 63 66 52 44 54 83 61 48 31 40 61 98 57 69 32 44 42 76 41 74 64 87 32 19 21 92 6 80 54 85 17 66 75 57 95 81 61 60 62 11 51 36 51 62 10 55 60 12 54 35 50 16 28 94 31 91 6 76 7 26 44 16 58 41 96 99 94 73 53 46 63 6 54 60 96 13 74 76 18 55 34 27 67 67 73 82 35 72 56 27 78 51 49 65 79 73 45 32 40 9 97 43 12 68 25 65 2 86 46 63 70 74 88 18 69 58 37 77 76 31 57 19 91 87 86 45 31 83 55 85 26 56 94 10 48 86 34 85 52 55 20 12 83 39 39 34 17 64 94 72 33 55 87 64 16 78 13 28 53 2 23 92 70 69 45 57 55 3 32 5 5 22 23 45 55 45 79 92 7 68 52 52 4 79 58 96 34 63 74 36 17 73 93 30 94 66 71 82 79 70 7 67 35 41 3 7 79 38 92 84 74 32 92 45 47 66 88 19 14 59 23 42 26 82 4 35 65 54 87 49 87 39 88 59 30 11 56 6 85 66 16 5 56 65 71 36 66 26 29 97 19 51 71 65 71 46 68 47 64 82 29 27 85 22 98 11 28 97 11 14 95 5 52 22 90 2 64 28 54 93 45 90 88 61 3 74 22 57 24 24 26 85 11 76 67 85 48 60 15 23 68 19 68 8 43 16 73 51 62 45 70 59 39 59 39 44 27 72 80 66 20 86 12 27 63 80 41 12 1 92 65 96 80 22 49 29 78 51 69 97 23 4 79 38 30 88 52 53 95 17 81 22 48 33 47 38 88 39 84 84 67 79 38 90 84 79 21 89 58 13 58 36 53 16 51 5 84 97 76 44 54 92 38 62 50 76 99 85 96 95 56 52 57 14 19 83 87 6 56 76 17 83 48 75 76 53 74 58 87 68 5 35 58 30 44 48 44 68 6 76 61 22 60 28 93 65 6 34 2 21 54 21 78 65 30 79 6 53 67 53 76 43 84 9 22 82 24 56 14 39 58 48 57 59 52 31 47 10 71 13 24 45 14 4 80 68 81 56 11 80 94 82 15 65 97 72 31 54 27 15 63 10 32 77 16 5 9 99 50 81 33 90 78 51 55 25 32 35 21 11 3 44 70 90 18 67 67 69 12 59 88 94 88 41 67 46 62 41 38 34 52 97 13 69 86 60 91 11 31 19 15 41 78 46 85 59 36 20 35 25 27 61 16 44 30 34 3 70 72 21 35 5 12 26 20 59 12 83 64 78 30 19 38 70 24 3 94 27 80 15 69 67 33 28 39 80 60 99 44 63 1 8 1 91 58 98 6 15 43 37 4 53 55 51 74 61 58 96 60 75 97 13 41 76 5 71 25 29 16 48 14 61 55 62 3 95 86 75 41 16 22 68 63 33 62 78 67 37 32 93 31 38 97 32 40 90 72 11 10 6 6 45 14 86 12 66 82 89 19 68 72 2 29 71 88 90 55 99 40 98 64 97 86 94 37 94 43 69 57 92 4 64 25 20 65 71 87 26 26 11 97 4 16 53 25 23 47 51 57 68 36 54 50 65 15 83 34 ;1 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 ];\r\nLexp= 45294;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\nm=[94 61 98 11 2 12 99 37 26 10 86 18 88 42 43 38 62 5 36 56 5 86 78 29 64 27 54 72 96 73 36 99 81 55 90 55 73 51 94 11 82 15 45 67 63 79 75 22 4 18 39 1 75 57 92 49 24 16 68 52 70 88 56 38 25 88 86 29 15 89 37 96 85 40 86 76 26 73 42 24 45 22 40 36 35 11 65 22 69 3 9 27 28 78 40 68 62 75 32 65 49 15 35 32 88 73 20 95 67 94 60 73 81 93 76 67 56 37 1 74 59 35 51 38 92 56 37 89 54 67 78 11 62 68 99 61 45 48 74 92 15 74 96 31 33 21 50 98 7 31 51 62 27 26 47 81 66 3 13 98 83 94 ;0 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 ];\r\nLexp= 8346;\r\nL=Loop(m);\r\nassert(isequal(Lexp,L))\r\n%%\r\n% A Method to Read, Process, and Output a GJam Entry\r\n% Read a file into a Cell Array variable for each case\r\n% Open Output file\r\n% Loop thru Cases using cell array loaded\r\n% Write each case's solution\r\n% Generalized function to Process a Concise Data set\r\n\r\n% function GJam_SA_2011A\r\n% %Segment Loop\r\n% %fn='A-small-practice.in';\r\n% fn='A-large-practice.in';\r\n% [data] = read_file(fn);\r\n% \r\n% %fidG = fopen('A-small-output.out', 'w');\r\n% fidG = fopen('A-large-output.out', 'w');\r\n% tic\r\n% for i=1:size(data,2)\r\n%  L = Loop(data{i}) ;% data 2xN, row 1 Length row 2 Type\r\n%  toc\r\n%   fprintf(fidG,'Case #%i: %i\\n', i,L);\r\n%   fprintf('Case #%i: %i\\n', i,L);\r\n%   \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% \r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% %Read a numeric of lines to count\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% set=0;\r\n% while ~feof(fid)\r\n%  fgetl(fid); % Qty in a row, ignore\r\n%  strv=fgetl(fid); % read line of data as a string since mixed numeric/char\r\n%  m=str2num(strrep(strrep(strv,'R',''),'B','')); % Remove R and B to get Lengths\r\n%  % Extract R and B and convert to a binary vector\r\n%  m(2,:)=str2num(strrep(strrep(strv(regexp(strv,'[RB]','start')),'R','0 '),'B','1 '));\r\n%  \r\n%  set=set+1;\r\n%  d{set}=m;\r\n% end\r\n% \r\n% fclose(fid);\r\n% \r\n% end\r\n% \r\n% function L=Loop(m)\r\n% % Create two descending vectors\r\n% % L=sum of paired sets - qty of paired sets\r\n%  L=0;\r\n%  m0=m(1,m(2,:)==0);\r\n%  m1=m(1,m(2,:)==1);\r\n%  if isempty(m0),return;end\r\n%  if isempty(m1),return;end\r\n%  m0=sort(m0,'descend');\r\n%  m1=sort(m1,'descend');\r\n%  q=min(length(m0),length(m1));\r\n%  L=sum([m0(1:q) m1(1:q)])-2*q;\r\n%  \r\n% end\r\n% \r\n% Google File Input\r\n%5\r\n%1\r\n%5B\r\n%4\r\n%6R 1B 7R 3B\r\n%7\r\n%5B 4R 3R 2R 5R 4R 3R\r\n%673\r\n% Data line of 673 values not included\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":7,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":"2014-03-29T20:39:55.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-03-29T18:45:27.000Z","updated_at":"2014-03-29T20:39:55.000Z","published_at":"2014-03-29T19:21:07.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/837485/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2011 Africa: Closing the Loop\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case Google Code Jam 2014 Kicks Off its Qualifier round April 11.\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\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Registration\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Test Suite, at the bottom, contains a full GJam file input read, process, and Output example.\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\u003eCreate the maximum length Loop of alternating Segment types (0 or 1). Return Maximum Length. Segment connection Knots reduce the Length by 1, including the end to the start knot. If no valid loop can be created then return 0.\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 M, 2xN matrix of [Lengths(1:N);Types(1:N)], Types are 0 or 1\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 L, maximum Loop Length of valid alternating segment types\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\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M=[6 1 7 3;1 0 1 0], L=13\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\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\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\"}]}"},{"id":2262,"title":"GJam 2011 Africa Qualifier B: Optimum Profit","description":"This Challenge is derived from GJam 2011 Africa: Investing at the Market. Google Code Jam 2014 Kicks Off its Qualifier round April 11. GJam Registration. The Test Suite, at the bottom, contains a full GJam file input read (fgetl and dlmread), process, and Output example.\r\nDetermine the single optimal Buy and Sell time to optimize Profit. \r\nIf multiple cases exist then provide set with minimum Buy cost.\r\nInvestment buys are made in whole units. If no profit is possible return [0 0 0].\r\nInput: M,x Where M is Investment and x,size(1,12), is Commodity Buy/Sell Price\r\nOutput: BSP, [BuyPt SellPt Profit]\r\nExample: M=100; x=[52 50 25 100 61 63 70 51 71 55 10 5];\r\nOutput: 3 4 300\r\nAdditional GJam solutions can be found at Example GJam Matlab solutions. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 324px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 162px; transform-origin: 407px 162px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 96px 8px; transform-origin: 96px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is derived from\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam 2011 Africa: Investing at the Market\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 148px 8px; transform-origin: 148px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Google Code Jam 2014 Kicks Off its Qualifier round April 11.\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam Registration\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 273.5px 8px; transform-origin: 273.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl and dlmread), process, and Output example.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 46.5px 8px; transform-origin: 46.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eDetermine the \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 21.5px 8px; transform-origin: 21.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003esingle\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 139px 8px; transform-origin: 139px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e optimal Buy and Sell time to optimize Profit. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 193.5px 8px; transform-origin: 193.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIf multiple cases exist then provide set with minimum Buy cost.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 243px 8px; transform-origin: 243px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eInvestment buys are made in whole units. If no profit is possible return [0 0 0].\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 20px 8px; transform-origin: 20px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 229.5px 8px; transform-origin: 229.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e M,x Where M is Investment and x,size(1,12), is Commodity Buy/Sell Price\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 26px 8px; transform-origin: 26px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 79.5px 8px; transform-origin: 79.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e BSP, [BuyPt SellPt Profit]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 31.5px 8px; transform-origin: 31.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExample:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 158.5px 8px; transform-origin: 158.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e M=100; x=[52 50 25 100 61 63 70 51 71 55 10 5];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 49.5px 8px; transform-origin: 49.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOutput: 3 4 300\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 132.5px 8px; transform-origin: 132.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAdditional GJam solutions can be found at\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eExample GJam Matlab solutions\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 142px 8px; transform-origin: 142px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function BSP=Profit(M,x)\r\n% M investment amount\r\n% X future value of stock size(1,12)\r\n% BSP [BuyMonth SellMonth Profit]  to Maximize Profit\r\n% Investment in whole shares\r\n% Smallest BuyCost set if multiple optimal Profit solutions\r\n BSP=[0 0 0];\r\n \r\nend","test_suite":"%%\r\nm=[100 1 2 3 4 5 6 7 8 9 10 11 12 ];\r\nBSPexp= [1 12 1100];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[100 52 50 25 100 61 63 70 51 71 55 10 5 ];\r\nBSPexp= [3 4 300];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[100 200 150 250 132 125 110 210 220 180 176 108 113 ];\r\nBSPexp= [0 0 0];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[450 100 132 169 179 194 204 186 180 228 140 145 144 ];\r\nBSPexp= [1 9 512];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[250 12 212 9 89 8 88 7 87 6 86 5 85 ];\r\nBSPexp= [11 12 4000];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[260 199 30 198 16 54 242 12 220 105 78 178 224 ];\r\nBSPexp= [7 12 4452];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[362 96 95 85 126 242 71 144 139 25 198 153 11 ];\r\nBSPexp= [9 10 2422];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[403 133 193 224 246 38 138 103 113 126 154 189 136 ];\r\nBSPexp= [5 11 1510];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\nm=[260 126 56 231 199 192 75 87 113 63 70 128 167 ];\r\nBSPexp= [2 3 700];\r\nBSP=Profit(m(1),m(2:end));\r\nassert(isequal(BSPexp,BSP))\r\n%%\r\n% function GJam_Africa_2011B\r\n% %fn='B-small-practice.in';\r\n% fn='B-large-practice.in';\r\n% [data] = read_file(fn);\r\n% \r\n% %fidG = fopen('B-small-output1.out', 'w');\r\n% fidG = fopen('B-large-output.out', 'w');\r\n% tic\r\n% for i=1:size(data,2)\r\n%  BSP = Profit(data{i}(1),data{i}(2:end) ) ;% data 12 vector, \r\n%  toc\r\n% % continue\r\n%  if BSP(1)==0\r\n%   fprintf(fidG,'Case #%i: IMPOSSIBLE\\n',i);\r\n%   fprintf('Case #%i: IMPOSSIBLE\\n',i);\r\n%   \r\n%  else\r\n%   fprintf(fidG,'Case #%i: %i %i %i\\n',i, BSP);\r\n%   fprintf('Case #%i: %i %i %i\\n',i, BSP);\r\n%   \r\n%  end\r\n% \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% %Read a numeric of lines to count\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% set=0;\r\n% while ~feof(fid)\r\n%  M=str2num(fgetl(fid)); % Qty in a row, ignore\r\n%  P=str2num(fgetl(fid)); % read line of data, convert to vector\r\n%   \r\n%  set=set+1;\r\n%  d{set}=[M P];\r\n% end\r\n%  fclose(fid);\r\n% end\r\n% \r\n% % alternate read using dlmread; useful for numeric array input files\r\n% function [d]=read_dlm_file(fn)\r\n%  M=dlmread(fn);\r\n%  q=M(1);\r\n%  d{q}=[];\r\n%  for i=1:q\r\n%   w=find(M(2*i+1,:)\u003e0,1,'last');\r\n%   d{i}=[M(2*i) M(2*i+1,1:w)];\r\n%  end\r\n% end\r\n% \r\n% \r\n% function BSP=Profit(M,x)\r\n%  BSP=[0 0 0];\r\n%  PU=floor(M./x);\r\n%  m=repmat(x,12,1)-repmat(x',1,12);\r\n%  m=m.*triu(ones(12),1);\r\n%  m=m.*repmat(PU',1,12);\r\n%  [b,s]=find(m==max(m(:)));\r\n%  if x(s(1))\u003c=x(b(1)),return;end\r\n%  ptr=find(x(b)==min(x(b)));\r\n%  BSP=[b(ptr) s(ptr) max(m(:))];\r\n% end\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":5,"created_by":3097,"edited_by":223089,"edited_at":"2022-10-11T16:20:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":14,"test_suite_updated_at":"2014-03-30T01:11:35.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-03-30T01:00:29.000Z","updated_at":"2022-10-11T16:20:46.000Z","published_at":"2014-03-30T01:07:59.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2011 Africa: Investing at the Market\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Google Code Jam 2014 Kicks Off its Qualifier round April 11.\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Registration\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl and dlmread), process, and Output example.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eDetermine the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esingle\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e optimal Buy and Sell time to optimize Profit. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf multiple cases exist then provide set with minimum Buy cost.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eInvestment buys are made in whole units. If no profit is possible return [0 0 0].\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 M,x Where M is Investment and x,size(1,12), is Commodity Buy/Sell Price\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 BSP, [BuyPt SellPt Profit]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M=100; x=[52 50 25 100 61 63 70 51 71 55 10 5];\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOutput: 3 4 300\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAdditional GJam solutions can be found at\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=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":1730,"title":"GJam: 2013 Rd1a Bullseye Painting","description":"\u003chttp://code.google.com/codejam/contests.html Google Code Jam\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\r\n\r\nGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\r\n\r\n\u003c\u003chttp://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\u003e\u003e\r\n\r\n*Input:* [r, p]  Integer values, 1\u003c=r,P\u003c=1000. Always enough P for one ring\r\n\r\n\r\n*Output:* Rings\r\n\r\n*Examples:*\r\n\r\n  [1 9] 1;\r\n  [1 10] 2;\r\n  [3 40] 3;\r\n  \r\n  [1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n\r\n*Google Code Jam:*\r\n\r\nThe next competition starts in April 2014. See details from above link.\r\n\r\nThis contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.\r\n\r\nSolutions to the various past Challenges in Matlab can be found via \u003chttp://www.go-hero.net/jam/13/solutions GJam Solutions\u003e.\r\n\r\nThe Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java  BigInteger.\r\n\r\n*Related Challenges:*\r\n\r\n  1) Reading 64 bit input file\r\n  2) Bullseye Large Numbers r\u003c1E18, P\u003c2E18\r\n\r\n*Usage of regexp is verboten*\r\n\r\n","description_html":"\u003cp\u003e\u003ca href = \"http://code.google.com/codejam/contests.html\"\u003eGoogle Code Jam\u003c/a\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\u003c/p\u003e\u003cp\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\u003c/p\u003e\u003cimg src = \"http://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\"\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [r, p]  Integer values, 1\u0026lt;=r,P\u0026lt;=1000. Always enough P for one ring\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Rings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 9] 1;\r\n[1 10] 2;\r\n[3 40] 3;\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003e[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe next competition starts in April 2014. See details from above link.\u003c/p\u003e\u003cp\u003eThis contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.\u003c/p\u003e\u003cp\u003eSolutions to the various past Challenges in Matlab can be found via \u003ca href = \"http://www.go-hero.net/jam/13/solutions\"\u003eGJam Solutions\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java  BigInteger.\u003c/p\u003e\u003cp\u003e\u003cb\u003eRelated Challenges:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Reading 64 bit input file\r\n2) Bullseye Large Numbers r\u0026lt;1E18, P\u0026lt;2E18\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eUsage of regexp is verboten\u003c/b\u003e\u003c/p\u003e","function_template":"function rings=solve_rings(r,p)\r\n rings=0;\r\nend","test_suite":"%%\r\nr=138;p=844;rings=3;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=21;p=197;rings=4;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=214;p=862;rings=2;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=20;p=845;rings=13;\r\nassert(isequal(solve_rings(r,p),rings))\r\n%%\r\nr=20;p=844;rings=12;\r\nassert(isequal(solve_rings(r,p),rings))\r\n","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":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-20T20:30:52.000Z","updated_at":"2025-12-31T13:40:54.000Z","published_at":"2013-07-20T21:02:01.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:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contests.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\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\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\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\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [r, p] Integer values, 1\u0026lt;=r,P\u0026lt;=1000. Always enough P for one ring\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 Rings\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\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 9] 1;\\n[1 10] 2;\\n[3 40] 3;\\n\\n[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge]]\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\u003eGoogle Code Jam:\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 next competition starts in April 2014. See details from above link.\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\u003eThis contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.\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\u003eSolutions to the various past Challenges in Matlab can be found via\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://www.go-hero.net/jam/13/solutions\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java BigInteger.\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\u003eRelated Challenges:\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) Reading 64 bit input file\\n2) Bullseye Large Numbers r\u003c1E18, P\u003c2E18]]\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\u003eUsage of regexp is verboten\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\"}]}"},{"id":42806,"title":"GJam 2016 Rd1A: Rank and File (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/4304486/dashboard#s=p1 GJam Rd1A 2016 Rank and File\u003e. This is the first 26 large cases with max N=50.\r\n\r\nThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip. \r\n\r\n*Input:* [M], matrix of size [2*N-1,N] of all rows and columns of H except one\r\n\r\n*Output:* [V], the missing vector of H not included in M\r\n\r\n*Examples:* [M] [V] \r\n\r\n  [1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n  [22 222;2 22;2 22][22 222] \r\n \r\nGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\r\n\r\n*Theory:* Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.   \u003chttps://www.go-hero.net/jam/16/solutions/1/2/MATLAB GJam Rank_file solutions\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/4304486/dashboard#s=p1\"\u003eGJam Rd1A 2016 Rank and File\u003c/a\u003e. This is the first 26 large cases with max N=50.\u003c/p\u003e\u003cp\u003eThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], matrix of size [2*N-1,N] of all rows and columns of H except one\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the missing vector of H not included in M\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [M] [V]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n[22 222;2 22;2 22][22 222] \r\n\u003c/pre\u003e\u003cp\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.   \u003ca href = \"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\"\u003eGJam Rank_file solutions\u003c/a\u003e.\u003c/p\u003e","function_template":"function v = rank_file(m)\r\n% H a rank/file array that has all columns and rows increasing\r\n% m  matrix [2*N-1,N] of scrambled rows/columns original H [NxN] array\r\n% v  missing vector of H\r\n v=0;\r\nend","test_suite":"%%\r\ntic\r\nm=[1 2 3 2 1 2 3 5 3 2 3 5 6 4 3 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 11 18 5 17 15 2 12 3 8 6 1 3 11 15 9 8 7 1 5 14 20 8 19 17 5 15 8 12 10 2 6 12 16 13 11 10 2 6 20 26 13 24 25 8 21 11 15 13 3 11 20 23 18 18 15 3 8 23 30 16 29 29 10 26 13 17 16 6 13 25 28 21 22 19 5 10 24 31 17 32 30 12 28 15 22 19 8 15 26 30 23 24 22 7 11 27 37 21 34 35 13 31 18 24 22 9 18 29 33 26 26 23 8 12 31 39 23 40 38 14 34 20 26 25 11 20 31 37 29 27 24 11 15 33 42 26 42 39 15 37 23 28 26 12 21 34 38 32 31 28 13 17 38 45 28 43 40 16 39 25 30 29 15 23 37 40 35 33 30 15 20 39 48 29 48 43 19 42 26 31 30 17 24 40 45 37 34 32 18 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[13 15 23 26 28 32 33 37 38 42 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 4 17 9 301 18 10 2 18 5 12 15 7 8 21 14 23 10 8 7 3 24 302 22 16 6 5 21 19 23 1 11 20 17 9 14 13 19 15 6 11 4 1 24 3 2 20 12 13 45 27 40 32 304 41 33 25 41 28 35 38 30 31 44 37 46 33 31 30 26 47 303 45 39 29 28 44 42 46 2 34 43 40 32 37 36 42 38 29 34 27 2 47 26 25 43 35 36 67 49 62 54 306 63 55 26 63 50 57 60 52 53 66 59 68 55 53 52 48 69 305 67 61 51 50 66 64 68 3 56 65 62 54 59 58 64 60 51 56 49 3 69 48 26 65 57 58 88 70 83 75 307 84 76 27 84 71 78 81 73 74 87 80 89 76 74 73 49 90 308 88 82 72 71 87 85 89 4 77 86 83 75 80 79 85 81 72 77 70 4 90 49 27 86 78 79 108 71 103 95 310 104 96 28 104 91 98 101 93 94 107 100 109 96 94 93 50 110 309 108 102 92 91 107 105 109 5 97 106 103 95 100 99 105 101 92 97 71 5 110 50 28 106 98 99 127 72 122 114 311 123 115 29 123 92 117 120 112 113 126 119 128 115 113 112 51 129 312 127 121 111 92 126 124 128 6 116 125 122 114 119 118 124 120 111 116 72 6 129 51 29 125 117 118 145 73 140 132 314 141 133 30 141 93 135 138 130 131 144 137 146 133 131 130 52 147 313 145 139 112 93 144 142 146 7 134 143 140 132 137 136 142 138 112 134 73 7 147 52 30 143 135 136 162 74 157 149 316 158 150 31 158 94 152 155 131 148 161 154 163 150 148 131 53 164 315 162 156 113 94 161 159 163 8 151 160 157 149 154 153 159 155 113 151 74 8 164 53 31 160 152 153 178 75 173 165 317 174 166 32 174 95 168 171 132 149 177 170 179 166 149 132 54 180 318 178 172 114 95 177 175 179 9 167 176 173 165 170 169 175 171 114 167 75 9 180 54 32 176 168 169 193 76 188 166 319 189 181 33 189 96 183 186 133 150 192 185 194 181 150 133 55 195 320 193 187 115 96 192 190 194 10 182 191 188 166 185 184 190 186 115 182 76 10 195 55 33 191 183 184 207 77 202 167 321 203 182 34 203 97 197 200 134 151 206 199 208 182 151 134 56 209 322 207 201 116 97 206 204 208 11 196 205 202 167 199 198 204 200 116 196 77 11 209 56 34 205 197 198 220 78 215 168 323 216 183 35 216 98 210 213 135 152 219 212 221 183 152 135 57 222 324 220 214 117 98 219 217 221 12 197 218 215 168 212 211 217 213 117 197 78 12 222 57 35 218 210 211 232 79 227 169 325 228 184 36 228 99 211 225 136 153 231 224 233 184 153 136 58 234 326 232 226 118 99 231 229 233 13 198 230 227 169 224 223 229 225 118 198 79 13 234 58 36 230 211 223 243 80 238 170 327 239 185 37 239 100 212 236 137 154 242 235 244 185 154 137 59 245 328 243 237 119 100 242 240 244 14 199 241 238 170 235 224 240 236 119 199 80 14 245 59 37 241 212 224 253 81 248 171 329 249 186 38 249 101 213 246 138 155 252 236 254 186 155 138 60 255 330 253 247 120 101 252 250 254 15 200 251 248 171 236 225 250 246 120 200 81 15 255 60 38 251 213 225 262 82 257 172 332 258 187 39 258 102 214 247 139 156 261 237 263 187 156 139 61 264 331 262 256 121 102 261 259 263 16 201 260 257 172 237 226 259 247 121 201 82 16 264 61 39 260 214 226 270 83 265 173 334 266 188 40 266 103 215 248 140 157 269 238 271 188 157 140 62 272 333 270 257 122 103 269 267 271 17 202 268 265 173 238 227 267 248 122 202 83 17 272 62 40 268 215 227 277 84 266 174 336 273 189 41 273 104 216 249 141 158 276 239 278 189 158 141 63 279 335 277 258 123 104 276 274 278 18 203 275 266 174 239 228 274 249 123 203 84 18 279 63 41 275 216 228 283 85 267 175 337 274 190 42 274 105 217 250 142 159 282 240 284 190 159 142 64 285 338 283 259 124 105 282 280 284 19 204 281 267 175 240 229 280 250 124 204 85 19 285 64 42 281 217 229 288 86 268 176 340 275 191 43 275 106 218 251 143 160 287 241 289 191 160 143 65 290 339 288 260 125 106 287 281 289 20 205 286 268 176 241 230 281 251 125 205 86 20 290 65 43 286 218 230 292 87 269 177 342 276 192 44 276 107 219 252 144 161 291 242 293 192 161 144 66 294 341 292 261 126 107 291 282 293 21 206 287 269 177 242 231 282 252 126 206 87 21 294 66 44 287 219 231 295 88 270 178 344 277 193 45 277 108 220 253 145 162 292 243 296 193 162 145 67 297 343 295 262 127 108 292 283 296 22 207 288 270 178 243 232 283 253 127 207 88 22 297 67 45 288 220 232 296 89 271 179 346 278 194 46 278 109 221 254 146 163 293 244 298 194 163 146 68 299 345 296 263 128 109 293 284 298 23 208 289 271 179 244 233 284 254 128 208 89 23 299 68 46 289 221 233 297 90 272 180 347 279 195 47 279 110 222 255 147 164 294 245 299 195 164 147 69 300 348 297 264 129 110 294 285 299 24 209 290 272 180 245 234 285 255 129 209 90 24 300 69 47 290 222 234 343 308 333 318 349 335 320 303 336 310 323 329 313 316 342 328 346 319 315 314 306 348 349 344 331 312 309 341 338 345 302 322 340 334 317 327 325 337 330 311 321 307 301 347 305 304 339 324 326 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[16 39 61 82 102 121 139 156 172 187 201 214 226 237 247 256 257 258 259 260 261 262 263 264 332 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[25 27 2 6 10 11 41 50 27 49 16 18 19 49 4 44 38 23 48 33 4 15 3 7 43 8 5 1 19 12 40 29 25 32 13 46 33 6 11 50 15 26 38 7 42 48 31 28 21 22 36 22 39 32 46 47 2 45 31 29 24 1 34 42 5 36 23 17 9 43 20 10 28 45 34 3 44 30 30 14 41 35 35 8 14 17 40 21 26 18 37 20 13 9 39 37 47 16 24 26 28 3 7 11 12 42 51 28 50 17 19 20 50 5 45 39 24 49 34 5 16 4 8 44 9 6 2 20 13 41 30 26 33 14 47 34 7 12 51 16 27 39 8 43 49 32 29 22 23 37 23 40 33 47 48 3 46 32 30 25 2 35 43 6 37 24 18 10 44 21 11 29 46 35 4 45 31 31 15 42 36 36 9 15 18 41 22 27 19 38 21 14 10 40 38 48 17 25 27 29 4 8 12 13 43 52 29 51 18 20 21 51 6 46 40 25 50 35 6 17 5 9 45 10 7 3 21 14 42 31 27 34 15 48 35 8 13 52 17 28 40 9 44 50 33 30 23 24 38 24 41 34 48 49 4 47 33 31 26 3 36 44 7 38 25 19 11 45 22 12 30 47 36 5 46 32 32 16 43 37 37 10 16 19 42 23 28 20 39 22 15 11 41 39 49 18 26 28 30 5 9 13 14 44 53 30 52 19 21 22 52 7 47 41 26 51 36 7 18 6 10 46 11 8 4 22 15 43 32 28 35 16 49 36 9 14 53 18 29 41 10 45 51 34 31 24 25 39 25 42 35 49 50 5 48 34 32 27 4 37 45 8 39 26 20 12 46 23 13 31 48 37 6 47 33 33 17 44 38 38 11 17 20 43 24 29 21 40 23 16 12 42 40 50 19 27 29 31 6 10 14 15 45 54 31 53 20 22 23 53 8 48 42 27 52 37 8 19 7 11 47 12 9 5 23 16 44 33 29 36 17 50 37 10 15 54 19 30 42 11 46 52 35 32 25 26 40 26 43 36 50 51 6 49 35 33 28 5 38 46 9 40 27 21 13 47 24 14 32 49 38 7 48 34 34 18 45 39 39 12 18 21 44 25 30 22 41 24 17 13 43 41 51 20 28 30 32 7 11 15 16 46 55 32 54 21 23 24 54 9 49 43 28 53 38 9 20 8 12 48 13 10 6 24 17 45 34 30 37 18 51 38 11 16 55 20 31 43 12 47 53 36 33 26 27 41 27 44 37 51 52 7 50 36 34 29 6 39 47 10 41 28 22 14 48 25 15 33 50 39 8 49 35 35 19 46 40 40 13 19 22 45 26 31 23 42 25 18 14 44 42 52 21 29 31 33 8 12 16 17 47 56 33 55 22 24 25 55 10 50 44 29 54 39 10 21 9 13 49 14 11 7 25 18 46 35 31 38 19 52 39 12 17 56 21 32 44 13 48 54 37 34 27 28 42 28 45 38 52 53 8 51 37 35 30 7 40 48 11 42 29 23 15 49 26 16 34 51 40 9 50 36 36 20 47 41 41 14 20 23 46 27 32 24 43 26 19 15 45 43 53 22 30 32 34 9 13 17 18 48 57 34 56 23 25 26 56 11 51 45 30 55 40 11 22 10 14 50 15 12 8 26 19 47 36 32 39 20 53 40 13 18 57 22 33 45 14 49 55 38 35 28 29 43 29 46 39 53 54 9 52 38 36 31 8 41 49 12 43 30 24 16 50 27 17 35 52 41 10 51 37 37 21 48 42 42 15 21 24 47 28 33 25 44 27 20 16 46 44 54 23 31 33 35 10 14 18 19 49 58 35 57 24 26 27 57 12 52 46 31 56 41 12 23 11 15 51 16 13 9 27 20 48 37 33 40 21 54 41 14 19 58 23 34 46 15 50 56 39 36 29 30 44 30 47 40 54 55 10 53 39 37 32 9 42 50 13 44 31 25 17 51 28 18 36 53 42 11 52 38 38 22 49 43 43 16 22 25 48 29 34 26 45 28 21 17 47 45 55 24 32 34 36 11 15 19 20 50 59 36 58 25 27 28 58 13 53 47 32 57 42 13 24 12 16 52 17 14 10 28 21 49 38 34 41 22 55 42 15 20 59 24 35 47 16 51 57 40 37 30 31 45 31 48 41 55 56 11 54 40 38 33 10 43 51 14 45 32 26 18 52 29 19 37 54 43 12 53 39 39 23 50 44 44 17 23 26 49 30 35 27 46 29 22 18 48 46 56 25 33 35 37 12 16 20 21 51 60 37 59 26 28 29 59 14 54 48 33 58 43 14 25 13 17 53 18 15 11 29 22 50 39 35 42 23 56 43 16 21 60 25 36 48 17 52 58 41 38 31 32 46 32 49 42 56 57 12 55 41 39 34 11 44 52 15 46 33 27 19 53 30 20 38 55 44 13 54 40 40 24 51 45 45 18 24 27 50 31 36 28 47 30 23 19 49 47 57 26 34 36 38 13 17 21 22 52 61 38 60 27 29 30 60 15 55 49 34 59 44 15 26 14 18 54 19 16 12 30 23 51 40 36 43 24 57 44 17 22 61 26 37 49 18 53 59 42 39 32 33 47 33 50 43 57 58 13 56 42 40 35 12 45 53 16 47 34 28 20 54 31 21 39 56 45 14 55 41 41 25 52 46 46 19 25 28 51 32 37 29 48 31 24 20 50 48 58 27 35 37 39 14 18 22 23 53 62 39 61 28 30 31 61 16 56 50 35 60 45 16 27 15 19 55 20 17 13 31 24 52 41 37 44 25 58 45 18 23 62 27 38 50 19 54 60 43 40 33 34 48 34 51 44 58 59 14 57 43 41 36 13 46 54 17 48 35 29 21 55 32 22 40 57 46 15 56 42 42 26 53 47 47 20 26 29 52 33 38 30 49 32 25 21 51 49 59 28 36 38 40 15 19 23 24 54 63 40 62 29 31 32 62 17 57 51 36 61 46 17 28 16 20 56 21 18 14 32 25 53 42 38 45 26 59 46 19 24 63 28 39 51 20 55 61 44 41 34 35 49 35 52 45 59 60 15 58 44 42 37 14 47 55 18 49 36 30 22 56 33 23 41 58 47 16 57 43 43 27 54 48 48 21 27 30 53 34 39 31 50 33 26 22 52 50 60 29 37 39 41 16 20 24 25 55 64 41 63 30 32 33 63 18 58 52 37 62 47 18 29 17 21 57 22 19 15 33 26 54 43 39 46 27 60 47 20 25 64 29 40 52 21 56 62 45 42 35 36 50 36 53 46 60 61 16 59 45 43 38 15 48 56 19 50 37 31 23 57 34 24 42 59 48 17 58 44 44 28 55 49 49 22 28 31 54 35 40 32 51 34 27 23 53 51 61 30 38 40 42 17 21 25 26 56 65 42 64 31 33 34 64 19 59 53 38 63 48 19 30 18 22 58 23 20 16 34 27 55 44 40 47 28 61 48 21 26 65 30 41 53 22 57 63 46 43 36 37 51 37 54 47 61 62 17 60 46 44 39 16 49 57 20 51 38 32 24 58 35 25 43 60 49 18 59 45 45 29 56 50 50 23 29 32 55 36 41 33 52 35 28 24 54 52 62 31 39 41 43 18 22 26 27 57 66 43 65 32 34 35 65 20 60 54 39 64 49 20 31 19 23 59 24 21 17 35 28 56 45 41 48 29 62 49 22 27 66 31 42 54 23 58 64 47 44 37 38 52 38 55 48 62 63 18 61 47 45 40 17 50 58 21 52 39 33 25 59 36 26 44 61 50 19 60 46 46 30 57 51 51 24 30 33 56 37 42 34 53 36 29 25 55 53 63 32 40 42 44 19 23 27 28 58 67 44 66 33 35 36 66 21 61 55 40 65 50 21 32 20 24 60 25 22 18 36 29 57 46 42 49 30 63 50 23 28 67 32 43 55 24 59 65 48 45 38 39 53 39 56 49 63 64 19 62 48 46 41 18 51 59 22 53 40 34 26 60 37 27 45 62 51 20 61 47 47 31 58 52 52 25 31 34 57 38 43 35 54 37 30 26 56 54 64 33 41 43 45 20 24 28 29 59 68 45 67 34 36 37 67 22 62 56 41 66 51 22 33 21 25 61 26 23 19 37 30 58 47 43 50 31 64 51 24 29 68 33 44 56 25 60 66 49 46 39 40 54 40 57 50 64 65 20 63 49 47 42 19 52 60 23 54 41 35 27 61 38 28 46 63 52 21 62 48 48 32 59 53 53 26 32 35 58 39 44 36 55 38 31 27 57 55 65 34 42 44 46 21 25 29 30 60 69 46 68 35 37 38 68 23 63 57 42 67 52 23 34 22 26 62 27 24 20 38 31 59 48 44 51 32 65 52 25 30 69 34 45 57 26 61 67 50 47 40 41 55 41 58 51 65 66 21 64 50 48 43 20 53 61 24 55 42 36 28 62 39 29 47 64 53 22 63 49 49 33 60 54 54 27 33 36 59 40 45 37 56 39 32 28 58 56 66 35 43 45 47 22 26 30 31 61 70 47 69 36 38 39 69 24 64 58 43 68 53 24 35 23 27 63 28 25 21 39 32 60 49 45 52 33 66 53 26 31 70 35 46 58 27 62 68 51 48 41 42 56 42 59 52 66 67 22 65 51 49 44 21 54 62 25 56 43 37 29 63 40 30 48 65 54 23 64 50 50 34 61 55 55 28 34 37 60 41 46 38 57 40 33 29 59 57 67 36 44 46 48 23 27 31 32 62 71 48 70 37 39 40 70 25 65 59 44 69 54 25 36 24 28 64 29 26 22 40 33 61 50 46 53 34 67 54 27 32 71 36 47 59 28 63 69 52 49 42 43 57 43 60 53 67 68 23 66 52 50 45 22 55 63 26 57 44 38 30 64 41 31 49 66 55 24 65 51 51 35 62 56 56 29 35 38 61 42 47 39 58 41 34 30 60 58 68 37 45 47 49 24 28 32 33 63 72 49 71 38 40 41 71 26 66 60 45 70 55 26 37 25 29 65 30 27 23 41 34 62 51 47 54 35 68 55 28 33 72 37 48 60 29 64 70 53 50 43 44 58 44 61 54 68 69 24 67 53 51 46 23 56 64 27 58 45 39 31 65 42 32 50 67 56 25 66 52 52 36 63 57 57 30 36 39 62 43 48 40 59 42 35 31 61 59 69 38 46 48 50 25 29 33 34 64 73 50 72 39 41 42 72 27 67 61 46 71 56 27 38 26 30 66 31 28 24 42 35 63 52 48 55 36 69 56 29 34 73 38 49 61 30 65 71 54 51 44 45 59 45 62 55 69 70 25 68 54 52 47 24 57 65 28 59 46 40 32 66 43 33 51 68 57 26 67 53 53 37 64 58 58 31 37 40 63 44 49 41 60 43 36 32 62 60 70 39 47 49 51 26 30 34 35 65 74 51 73 40 42 43 73 28 68 62 47 72 57 28 39 27 31 67 32 29 25 43 36 64 53 49 56 37 70 57 30 35 74 39 50 62 31 66 72 55 52 45 46 60 46 63 56 70 71 26 69 55 53 48 25 58 66 29 60 47 41 33 67 44 34 52 69 58 27 68 54 54 38 65 59 59 32 38 41 64 45 50 42 61 44 37 33 63 61 71 40 48 50 52 27 31 35 36 66 75 52 74 41 43 44 74 29 69 63 48 73 58 29 40 28 32 68 33 30 26 44 37 65 54 50 57 38 71 58 31 36 75 40 51 63 32 67 73 56 53 46 47 61 47 64 57 71 72 27 70 56 54 49 26 59 67 30 61 48 42 34 68 45 35 53 70 59 28 69 55 55 39 66 60 60 33 39 42 65 46 51 43 62 45 38 34 64 62 72 41 49 51 53 28 32 36 37 67 76 53 75 42 44 45 75 30 70 64 49 74 59 30 41 29 33 69 34 31 27 45 38 66 55 51 58 39 72 59 32 37 76 41 52 64 33 68 74 57 54 47 48 62 48 65 58 72 73 28 71 57 55 50 27 60 68 31 62 49 43 35 69 46 36 54 71 60 29 70 56 56 40 67 61 61 34 40 43 66 47 52 44 63 46 39 35 65 63 73 42 50 52 54 29 33 37 38 68 77 54 76 43 45 46 76 31 71 65 50 75 60 31 42 30 34 70 35 32 28 46 39 67 56 52 59 40 73 60 33 38 77 42 53 65 34 69 75 58 55 48 49 63 49 66 59 73 74 29 72 58 56 51 28 61 69 32 63 50 44 36 70 47 37 55 72 61 30 71 57 57 41 68 62 62 35 41 44 67 48 53 45 64 47 40 36 66 64 74 43 51 53 55 30 34 38 39 69 78 55 77 44 46 47 77 32 72 66 51 76 61 32 43 31 35 71 36 33 29 47 40 68 57 53 60 41 74 61 34 39 78 43 54 66 35 70 76 59 56 49 50 64 50 67 60 74 75 30 73 59 57 52 29 62 70 33 64 51 45 37 71 48 38 56 73 62 31 72 58 58 42 69 63 63 36 42 45 68 49 54 46 65 48 41 37 67 65 75 44 52 54 56 31 35 39 40 70 79 56 78 45 47 48 78 33 73 67 52 77 62 33 44 32 36 72 37 34 30 48 41 69 58 54 61 42 75 62 35 40 79 44 55 67 36 71 77 60 57 50 51 65 51 68 61 75 76 31 74 60 58 53 30 63 71 34 65 52 46 38 72 49 39 57 74 63 32 73 59 59 43 70 64 64 37 43 46 69 50 55 47 66 49 42 38 68 66 76 45 53 55 57 32 36 40 41 71 80 57 79 46 48 49 79 34 74 68 53 78 63 34 45 33 37 73 38 35 31 49 42 70 59 55 62 43 76 63 36 41 80 45 56 68 37 72 78 61 58 51 52 66 52 69 62 76 77 32 75 61 59 54 31 64 72 35 66 53 47 39 73 50 40 58 75 64 33 74 60 60 44 71 65 65 38 44 47 70 51 56 48 67 50 43 39 69 67 77 46 54 56 58 33 37 41 42 72 81 58 80 47 49 50 80 35 75 69 54 79 64 35 46 34 38 74 39 36 32 50 43 71 60 56 63 44 77 64 37 42 81 46 57 69 38 73 79 62 59 52 53 67 53 70 63 77 78 33 76 62 60 55 32 65 73 36 67 54 48 40 74 51 41 59 76 65 34 75 61 61 45 72 66 66 39 45 48 71 52 57 49 68 51 44 40 70 68 78 47 55 57 59 34 38 42 43 73 82 59 81 48 50 51 81 36 76 70 55 80 65 36 47 35 39 75 40 37 33 51 44 72 61 57 64 45 78 65 38 43 82 47 58 70 39 74 80 63 60 53 54 68 54 71 64 78 79 34 77 63 61 56 33 66 74 37 68 55 49 41 75 52 42 60 77 66 35 76 62 62 46 73 67 67 40 46 49 72 53 58 50 69 52 45 41 71 69 79 48 56 58 60 35 39 43 44 74 83 60 82 49 51 52 82 37 77 71 56 81 66 37 48 36 40 76 41 38 34 52 45 73 62 58 65 46 79 66 39 44 83 48 59 71 40 75 81 64 61 54 55 69 55 72 65 79 80 35 78 64 62 57 34 67 75 38 69 56 50 42 76 53 43 61 78 67 36 77 63 63 47 74 68 68 41 47 50 73 54 59 51 70 53 46 42 72 70 80 49 57 59 61 36 40 44 45 75 84 61 83 50 52 53 83 38 78 72 57 82 67 38 49 37 41 77 42 39 35 53 46 74 63 59 66 47 80 67 40 45 84 49 60 72 41 76 82 65 62 55 56 70 56 73 66 80 81 36 79 65 63 58 35 68 76 39 70 57 51 43 77 54 44 62 79 68 37 78 64 64 48 75 69 69 42 48 51 74 55 60 52 71 54 47 43 73 71 81 50 58 60 62 37 41 45 46 76 85 62 84 51 53 54 84 39 79 73 58 83 68 39 50 38 42 78 43 40 36 54 47 75 64 60 67 48 81 68 41 46 85 50 61 73 42 77 83 66 63 56 57 71 57 74 67 81 82 37 80 66 64 59 36 69 77 40 71 58 52 44 78 55 45 63 80 69 38 79 65 65 49 76 70 70 43 49 52 75 56 61 53 72 55 48 44 74 72 82 51 59 61 63 38 42 46 47 77 86 63 85 52 54 55 85 40 80 74 59 84 69 40 51 39 43 79 44 41 37 55 48 76 65 61 68 49 82 69 42 47 86 51 62 74 43 78 84 67 64 57 58 72 58 75 68 82 83 38 81 67 65 60 37 70 78 41 72 59 53 45 79 56 46 64 81 70 39 80 66 66 50 77 71 71 44 50 53 76 57 62 54 73 56 49 45 75 73 83 52 60 62 64 39 43 47 48 78 87 64 86 53 55 56 86 41 81 75 60 85 70 41 52 40 44 80 45 42 38 56 49 77 66 62 69 50 83 70 43 48 87 52 63 75 44 79 85 68 65 58 59 73 59 76 69 83 84 39 82 68 66 61 38 71 79 42 73 60 54 46 80 57 47 65 82 71 40 81 67 67 51 78 72 72 45 51 54 77 58 63 55 74 57 50 46 76 74 84 53 61 63 65 40 44 48 49 79 88 65 87 54 56 57 87 42 82 76 61 86 71 42 53 41 45 81 46 43 39 57 50 78 67 63 70 51 84 71 44 49 88 53 64 76 45 80 86 69 66 59 60 74 60 77 70 84 85 40 83 69 67 62 39 72 80 43 74 61 55 47 81 58 48 66 83 72 41 82 68 68 52 79 73 73 46 52 55 78 59 64 56 75 58 51 47 77 75 85 54 62 64 66 41 45 49 50 80 89 66 88 55 57 58 88 43 83 77 62 87 72 43 54 42 46 82 47 44 40 58 51 79 68 64 71 52 85 72 45 50 89 54 65 77 46 81 87 70 67 60 61 75 61 78 71 85 86 41 84 70 68 63 40 73 81 44 75 62 56 48 82 59 49 67 84 73 42 83 69 69 53 80 74 74 47 53 56 79 60 65 57 76 59 52 48 78 76 86 55 63 65 67 42 46 50 51 81 90 67 89 56 58 59 89 44 84 78 63 88 73 44 55 43 47 83 48 45 41 59 52 80 69 65 72 53 86 73 46 51 90 55 66 78 47 82 88 71 68 61 62 76 62 79 72 86 87 42 85 71 69 64 41 74 82 45 76 63 57 49 83 60 50 68 85 74 43 84 70 70 54 81 75 75 48 54 57 80 61 66 58 77 60 53 49 79 77 87 56 64 66 68 43 47 51 52 82 91 68 90 57 59 60 90 45 85 79 64 89 74 45 56 44 48 84 49 46 42 60 53 81 70 66 73 54 87 74 47 52 91 56 67 79 48 83 89 72 69 62 63 77 63 80 73 87 88 43 86 72 70 65 42 75 83 46 77 64 58 50 84 61 51 69 86 75 44 85 71 71 55 82 76 76 49 55 58 81 62 67 59 78 61 54 50 80 78 88 57 65 67 69 44 48 52 53 83 92 69 91 58 60 61 91 46 86 80 65 90 75 46 57 45 49 85 50 47 43 61 54 82 71 67 74 55 88 75 48 53 92 57 68 80 49 84 90 73 70 63 64 78 64 81 74 88 89 44 87 73 71 66 43 76 84 47 78 65 59 51 85 62 52 70 87 76 45 86 72 72 56 83 77 77 50 56 59 82 63 68 60 79 62 55 51 81 79 89 58 66 68 70 45 49 53 54 84 93 70 92 59 61 62 92 47 87 81 66 91 76 47 58 46 50 86 51 48 44 62 55 83 72 68 75 56 89 76 49 54 93 58 69 81 50 85 91 74 71 64 65 79 65 82 75 89 90 45 88 74 72 67 44 77 85 48 79 66 60 52 86 63 53 71 88 77 46 87 73 73 57 84 78 78 51 57 60 83 64 69 61 80 63 56 52 82 80 90 59 67 69 71 46 50 54 55 85 94 71 93 60 62 63 93 48 88 82 67 92 77 48 59 47 51 87 52 49 45 63 56 84 73 69 76 57 90 77 50 55 94 59 70 82 51 86 92 75 72 65 66 80 66 83 76 90 91 46 89 75 73 68 45 78 86 49 80 67 61 53 87 64 54 72 89 78 47 88 74 74 58 85 79 79 52 58 61 84 65 70 62 81 64 57 53 83 81 91 60 68 70 72 47 51 55 56 86 95 72 94 61 63 64 94 49 89 83 68 93 78 49 60 48 52 88 53 50 46 64 57 85 74 70 77 58 91 78 51 56 95 60 71 83 52 87 93 76 73 66 67 81 67 84 77 91 92 47 90 76 74 69 46 79 87 50 81 68 62 54 88 65 55 73 90 79 48 89 75 75 59 86 80 80 53 59 62 85 66 71 63 82 65 58 54 84 82 92 61 69 71 73 48 52 56 57 87 96 73 95 62 64 65 95 50 90 84 69 94 79 50 61 49 53 89 54 51 47 65 58 86 75 71 78 59 92 79 52 57 96 61 72 84 53 88 94 77 74 67 68 82 68 85 78 92 93 48 91 77 75 70 47 80 88 51 82 69 63 55 89 66 56 74 91 80 49 90 76 76 60 87 81 81 54 60 63 86 67 72 64 83 66 59 55 85 83 93 62 70 72 74 49 53 57 58 88 97 74 96 63 65 66 96 51 91 85 70 95 80 51 62 50 54 90 55 52 48 66 59 87 76 72 79 60 93 80 53 58 97 62 73 85 54 89 95 78 75 68 69 83 69 86 79 93 94 49 92 78 76 71 48 81 89 52 83 70 64 56 90 67 57 75 92 81 50 91 77 77 61 88 82 82 55 61 64 87 68 73 65 84 67 60 56 86 84 94 63 71 73 75 50 54 58 59 89 98 75 97 64 66 67 97 52 92 86 71 96 81 52 63 51 55 91 56 53 49 67 60 88 77 73 80 61 94 81 54 59 98 63 74 86 55 90 96 79 76 69 70 84 70 87 80 94 95 50 93 79 77 72 49 82 90 53 84 71 65 57 91 68 58 76 93 82 51 92 78 78 62 89 83 83 56 62 65 88 69 74 66 85 68 61 57 87 85 95 64 72 74 76 51 55 59 60 90 99 76 98 65 67 68 98 53 93 87 72 97 82 53 64 52 56 92 57 54 50 68 61 89 78 74 81 62 95 82 55 60 99 64 75 87 56 91 97 80 77 70 71 85 71 88 81 95 96 51 94 80 78 73 50 83 91 54 85 72 66 58 92 69 59 77 94 83 52 93 79 79 63 90 84 84 57 63 66 89 70 75 67 86 69 62 58 88 86 96 65 73 ];\r\nm=reshape(m,[],50);\r\nv=rank_file(m);\r\nvexp=[12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 75 73 53 77 36 22 37 55 17 50 44 39 19 49 7 25 57 78 68 28 21 5 20 65 67 18 57 9 76 7 12 60 1 37 38 46 69 39 59 45 70 48 31 6 27 64 53 34 50 63 47 29 41 55 46 43 70 27 61 66 64 41 35 32 48 30 32 3 15 10 62 31 71 45 38 34 11 59 13 19 3 71 51 52 21 9 52 72 24 15 14 43 78 8 23 1 17 25 6 78 76 56 79 40 27 40 58 19 54 46 43 20 55 8 26 64 83 73 29 23 6 21 67 68 21 60 11 82 9 14 63 3 41 42 52 71 44 62 50 74 53 34 7 31 65 61 38 57 69 50 32 44 62 49 45 73 28 68 72 70 46 39 36 52 32 35 4 17 13 64 33 75 47 42 37 13 66 14 23 4 76 59 55 25 11 60 78 28 16 15 48 81 10 25 3 19 29 8 80 77 60 81 42 28 42 61 21 56 50 46 22 56 9 28 66 86 76 30 25 8 24 69 70 23 63 14 84 10 15 65 5 43 45 53 72 46 64 51 78 54 36 9 32 68 63 39 58 71 54 34 48 65 53 49 75 29 69 74 73 48 40 38 55 34 37 6 18 14 67 35 76 51 44 39 16 67 17 25 6 80 61 58 26 12 62 82 29 18 16 50 83 12 26 5 21 30 9 86 85 66 87 43 30 46 68 22 62 53 49 23 57 11 30 67 88 79 33 27 9 25 78 79 25 70 15 86 12 17 73 6 44 47 55 80 48 72 54 80 56 37 11 35 76 65 40 59 73 58 36 50 66 57 52 82 32 71 77 75 49 44 39 60 35 40 7 20 15 74 38 84 55 47 42 17 69 18 27 8 81 62 64 29 14 64 83 32 20 18 52 88 13 28 7 22 34 10 89 87 68 90 45 33 47 69 24 64 54 51 26 59 12 31 69 90 81 36 29 12 28 79 81 26 72 16 89 14 20 74 7 46 48 56 83 49 73 55 82 57 39 13 38 77 67 43 61 74 59 40 52 68 58 53 85 34 72 78 77 50 45 41 62 37 42 9 22 18 75 41 86 56 49 44 18 71 20 28 10 84 64 66 31 16 66 86 35 24 22 54 92 14 30 8 25 37 12 91 90 69 93 47 34 48 71 26 66 58 53 29 61 14 34 74 93 83 38 31 14 30 81 83 28 74 17 91 16 21 77 9 48 49 59 85 51 75 57 85 60 41 15 39 80 70 44 63 79 62 41 54 72 60 56 86 36 78 81 80 53 47 43 63 39 44 11 24 19 78 42 88 59 51 46 19 76 22 29 11 86 66 67 33 17 68 87 37 26 23 55 94 16 32 9 27 38 14 93 91 71 94 49 35 52 72 27 68 60 54 32 63 15 37 75 96 88 40 35 16 33 83 85 30 76 19 95 18 22 78 10 50 52 61 86 53 77 58 89 62 44 17 42 81 72 47 65 82 65 43 55 74 64 58 88 38 80 86 84 54 50 46 66 42 46 13 25 21 79 44 89 62 53 48 21 78 24 31 13 90 67 69 34 19 69 92 38 28 24 57 96 18 36 11 30 40 15 98 96 74 100 52 38 53 75 28 71 61 57 34 67 17 41 78 101 90 43 38 17 36 88 90 31 78 21 99 20 25 82 12 54 56 63 92 57 80 62 92 65 47 18 44 86 73 51 69 83 68 46 58 76 66 60 93 42 82 87 85 58 52 49 70 45 49 14 27 24 84 47 95 64 55 51 22 80 25 33 14 94 70 73 36 22 71 96 39 29 27 60 101 20 40 13 32 41 16 99 98 76 102 54 39 55 77 30 73 63 58 36 69 18 43 79 102 92 46 40 18 38 90 91 32 79 23 101 22 27 83 14 56 58 67 93 60 82 65 94 68 50 20 45 88 75 52 71 86 70 47 59 78 68 61 94 44 84 89 87 62 54 51 71 48 51 15 29 25 86 48 96 66 57 52 24 81 27 34 17 96 72 75 37 24 73 98 41 31 29 63 104 22 41 15 34 42 18 101 100 78 104 56 40 57 79 32 74 64 60 38 71 20 45 82 103 93 47 42 21 40 92 93 33 81 26 102 24 28 85 15 58 60 69 95 62 84 67 96 70 51 22 47 90 77 55 73 88 71 48 61 80 69 63 96 46 85 92 90 63 56 53 72 50 53 16 31 27 87 49 98 68 58 55 28 83 29 35 19 98 74 77 38 26 76 100 42 32 30 65 106 24 43 17 35 44 21 103 102 80 106 58 42 61 81 35 76 68 64 40 72 22 47 83 104 94 50 43 23 41 94 95 37 83 27 103 26 31 87 17 60 62 70 96 63 85 68 98 71 53 25 48 91 80 56 75 89 72 50 65 82 70 66 97 49 87 93 92 65 59 54 73 52 55 19 34 30 89 52 99 69 62 57 30 84 32 39 21 100 77 78 41 28 79 101 43 33 32 66 107 25 45 18 37 45 22 105 103 82 108 60 45 62 83 38 80 70 66 42 76 23 49 84 107 96 52 45 25 43 95 96 40 84 29 106 28 33 89 19 61 63 72 98 64 86 69 100 74 55 27 49 92 82 58 77 91 76 52 68 83 74 69 99 50 89 95 93 66 60 56 78 53 56 20 36 31 91 54 101 72 63 58 32 85 34 42 23 102 78 81 44 29 80 103 46 35 34 67 109 26 46 19 39 47 24 106 105 84 109 61 48 63 86 40 81 73 68 44 77 25 50 88 110 98 54 47 26 46 97 98 41 88 30 108 31 36 92 20 63 64 74 100 66 90 71 102 75 57 29 52 95 85 60 79 92 77 54 70 86 76 72 101 52 90 97 95 68 62 59 79 56 58 21 38 34 93 55 103 74 64 59 33 89 36 43 25 103 81 82 46 33 83 104 49 38 37 69 111 28 49 21 41 51 25 108 107 87 110 63 49 65 89 42 83 75 70 45 79 27 53 89 113 101 56 49 28 48 98 100 43 90 31 111 33 38 93 21 64 65 75 102 67 91 73 104 76 58 30 55 96 87 61 81 94 79 57 72 88 77 74 104 55 92 99 97 70 64 60 81 57 61 23 40 35 95 59 106 76 66 63 35 90 38 45 27 106 82 85 47 34 84 108 50 40 39 71 112 29 51 22 42 53 26 111 109 89 113 65 51 69 90 43 84 77 71 46 81 28 55 92 115 103 57 50 29 49 99 101 45 91 32 114 35 39 95 23 66 67 76 104 69 93 75 105 78 61 32 57 98 89 64 83 97 82 58 73 90 81 76 105 56 96 101 99 71 67 63 83 59 62 25 41 38 97 60 108 79 70 65 36 94 40 46 28 108 84 87 49 37 85 110 53 42 41 72 114 30 53 24 43 55 28 112 111 90 114 67 53 71 92 45 85 79 74 47 82 30 56 93 117 104 59 53 30 51 103 104 47 93 34 116 37 41 97 25 69 71 79 106 72 95 77 106 81 62 34 59 101 90 66 85 99 83 61 76 91 82 78 107 58 97 102 101 73 69 64 84 61 64 26 43 40 99 62 110 80 72 66 37 95 41 49 29 109 87 89 50 38 89 111 55 44 42 74 116 31 55 25 45 56 29 115 113 91 117 70 55 72 93 46 87 81 76 49 84 32 59 95 119 106 62 55 32 52 104 105 49 95 36 118 38 44 99 27 72 74 80 108 75 97 79 107 83 65 35 60 102 93 68 87 100 85 63 77 94 84 80 110 60 98 103 102 76 70 66 86 64 67 28 44 42 100 65 111 82 74 69 38 97 42 50 31 111 89 90 52 39 91 112 56 47 45 78 118 34 57 27 48 58 30 117 115 93 119 73 56 74 94 47 89 82 78 52 90 33 61 99 121 107 65 57 34 54 105 106 50 97 38 119 40 46 101 28 75 77 87 109 79 98 85 108 89 68 36 62 103 97 72 92 103 87 65 79 98 85 81 112 63 102 106 105 81 72 70 88 67 69 29 46 43 102 67 113 84 76 70 40 101 43 52 32 113 94 92 54 41 96 114 57 48 47 83 120 36 58 29 50 59 34 118 116 95 121 76 57 77 97 50 92 85 81 54 92 35 62 102 122 113 67 59 35 55 108 109 52 99 39 121 41 47 103 30 78 80 88 110 81 101 87 114 90 70 38 64 106 99 74 94 107 90 67 82 100 88 83 113 65 105 111 109 83 75 71 91 68 71 32 48 44 105 68 114 87 79 73 42 104 45 53 33 116 95 93 56 42 97 117 59 49 48 85 122 37 60 31 52 61 36 119 117 99 122 78 58 79 100 51 95 89 83 56 94 37 64 104 125 114 69 61 37 58 110 112 53 101 41 123 42 49 105 31 79 82 90 113 83 102 88 115 92 73 40 65 107 101 77 95 109 92 68 85 103 91 87 114 67 108 113 110 85 77 75 93 71 73 34 50 46 106 70 115 90 80 75 44 106 47 55 35 117 96 97 57 44 99 118 61 53 51 86 124 39 62 32 55 62 38 120 118 100 123 80 60 81 101 53 98 91 85 58 96 39 66 106 127 117 70 63 39 59 111 113 54 103 43 124 44 51 106 32 81 83 92 114 85 104 90 118 93 75 42 66 108 103 79 98 111 96 70 86 105 94 89 116 69 109 115 113 87 78 77 97 73 75 36 51 48 107 71 117 92 83 77 46 107 49 56 37 120 99 99 59 46 100 122 63 55 52 88 125 41 65 34 57 64 39 127 126 104 129 82 61 83 106 55 100 93 86 60 97 40 69 108 128 118 72 64 40 62 118 120 56 108 44 126 45 52 112 34 84 86 94 121 88 110 92 119 96 77 44 68 116 104 81 99 112 97 72 87 107 96 90 122 70 110 117 114 90 81 78 99 75 77 38 52 50 114 74 124 94 84 79 47 109 51 58 39 121 100 102 60 47 102 124 64 56 54 91 130 43 67 35 59 66 42 129 128 105 131 85 63 85 108 56 102 94 88 62 98 43 71 109 130 119 74 65 42 63 120 121 58 109 47 129 47 53 114 36 87 88 95 123 89 111 94 121 97 79 46 70 117 105 83 100 114 99 73 89 108 98 92 124 72 111 118 115 91 82 81 101 77 78 40 54 52 116 76 125 96 87 80 49 110 52 60 40 122 101 104 61 48 104 126 65 57 55 93 132 45 69 37 61 67 43 131 130 107 132 87 64 87 110 58 104 96 91 63 99 44 72 111 132 120 76 66 44 64 122 124 60 112 48 131 49 55 116 37 89 91 97 125 93 114 96 122 98 80 47 72 120 106 84 102 117 100 75 93 110 99 94 127 74 115 119 118 94 84 83 103 79 79 41 56 53 118 78 129 97 89 81 50 113 54 61 42 123 103 105 63 51 105 128 66 58 57 95 134 46 70 38 62 69 45 133 132 109 135 88 65 88 111 60 107 97 92 66 104 47 74 113 134 124 78 70 46 68 123 125 62 114 49 133 51 57 118 38 91 92 102 126 95 116 100 125 103 83 49 74 121 111 86 106 119 102 77 95 112 100 96 128 76 116 122 121 97 86 85 105 81 82 42 58 54 120 80 130 98 91 83 52 115 56 63 43 127 108 108 64 53 109 129 67 60 58 98 137 48 71 39 64 71 46 134 133 111 136 89 67 89 113 62 108 100 95 68 106 48 76 114 135 125 79 72 48 70 125 126 63 115 51 134 52 58 119 39 93 95 104 128 97 118 102 126 105 85 50 75 124 112 87 107 121 104 79 97 113 103 98 129 77 118 123 122 98 88 86 107 82 83 44 60 55 122 81 132 102 93 85 53 116 57 64 44 129 109 110 66 54 111 131 69 61 59 99 139 49 73 41 65 72 48 135 134 113 137 92 70 91 114 63 110 101 97 69 109 49 78 116 139 128 81 74 49 72 127 128 65 117 53 137 53 60 122 41 94 96 106 130 98 120 104 130 108 87 52 76 125 114 90 110 123 106 81 98 115 105 100 131 80 119 126 125 100 90 89 109 83 85 46 62 58 124 83 133 104 94 87 54 118 58 66 45 131 112 111 68 56 113 132 71 63 61 102 141 50 76 43 66 73 50 139 138 116 141 94 71 93 118 65 112 104 98 70 111 52 79 120 140 131 82 75 50 73 130 131 66 120 55 138 54 61 124 43 96 97 108 133 100 122 105 132 110 89 53 78 128 117 93 112 126 108 83 99 119 106 102 135 81 124 129 127 101 91 91 110 85 86 48 63 60 126 85 137 105 95 88 57 122 60 67 46 133 114 114 69 58 116 134 72 64 63 104 142 54 77 44 68 74 51 141 140 118 142 96 73 94 119 67 113 105 100 72 112 54 80 123 142 132 84 76 51 74 131 132 68 122 57 139 56 64 125 45 97 98 109 135 102 123 106 133 111 90 55 79 129 119 94 114 128 109 85 102 121 107 104 136 82 125 130 129 104 92 92 112 87 88 50 65 62 127 87 139 106 96 90 58 124 62 69 47 134 116 115 71 59 117 135 75 68 66 105 143 55 79 45 69 77 53 145 143 119 146 98 75 95 120 69 116 108 102 74 113 55 82 124 144 134 85 77 53 76 133 134 70 124 59 141 58 66 128 46 99 100 111 137 103 126 107 135 112 91 57 80 131 121 96 116 129 113 87 104 123 111 106 138 84 127 132 130 105 94 94 114 88 90 52 67 64 130 88 141 109 97 92 61 125 63 72 49 136 118 117 74 60 120 137 76 69 68 106 147 56 81 46 70 79 54 147 144 122 148 99 76 97 124 70 118 110 103 76 117 56 83 125 146 135 87 79 54 77 134 135 71 125 60 143 59 68 130 48 100 102 113 139 104 127 109 136 115 92 58 83 132 122 97 118 131 115 89 105 124 112 108 140 85 128 134 132 106 96 96 116 90 92 53 68 65 131 90 143 111 98 93 62 126 65 74 50 137 120 120 75 62 121 138 78 71 70 108 150 57 82 47 72 81 56 148 146 123 149 101 79 98 125 71 120 111 104 78 118 57 84 128 148 140 88 81 55 79 135 137 72 126 61 147 62 70 131 49 103 105 114 140 107 129 112 142 116 93 60 84 133 124 99 120 134 117 90 106 126 113 109 141 86 132 138 136 109 97 97 118 91 94 55 69 66 132 92 145 112 99 96 63 130 67 76 52 143 121 121 77 63 122 144 81 72 71 110 152 59 83 48 73 82 58 149 147 124 151 102 81 100 126 73 121 112 106 80 120 59 85 129 149 141 89 83 56 81 136 139 75 128 63 148 64 71 132 50 104 107 116 141 108 130 113 143 118 95 62 87 134 125 100 121 135 118 92 107 127 116 110 142 87 133 139 137 110 99 98 120 92 95 57 71 68 133 94 146 114 102 98 65 131 69 77 54 144 122 122 79 66 123 145 83 74 73 112 154 61 84 50 76 85 61 151 149 126 153 104 82 101 128 74 122 114 108 81 121 62 89 130 151 143 92 85 58 82 138 141 77 130 66 150 66 73 134 51 105 108 117 143 110 131 115 144 120 97 64 89 137 127 102 122 136 120 94 109 129 118 112 145 90 134 140 139 111 100 99 121 93 96 59 72 69 135 95 147 116 103 99 67 132 70 78 55 145 124 124 81 67 125 147 84 77 75 114 155 64 87 52 78 87 62 152 151 128 154 105 84 104 129 76 123 116 109 82 123 64 90 132 154 145 93 87 60 84 141 143 79 131 68 153 68 74 135 52 107 109 119 145 111 133 118 146 122 99 66 91 139 129 104 124 137 121 96 111 131 120 113 146 91 135 142 140 113 102 100 122 95 99 60 73 71 137 97 148 117 105 100 69 134 71 80 56 148 126 125 83 69 128 149 85 78 76 116 156 66 89 53 80 89 63 154 153 129 155 108 87 105 130 77 125 117 111 83 125 65 92 133 155 146 94 89 61 86 142 144 80 133 70 154 69 75 137 53 110 111 120 147 113 135 119 147 124 100 68 93 141 130 106 126 139 122 97 112 132 121 114 148 93 137 144 142 114 104 101 124 97 101 61 75 72 138 99 149 119 106 103 72 136 73 82 58 149 128 127 85 71 129 150 89 79 77 118 157 67 90 55 81 90 65 156 154 131 158 109 88 108 132 80 127 119 112 84 126 66 93 136 157 147 97 90 63 88 143 145 82 134 72 156 72 78 139 55 112 114 124 149 115 136 122 149 125 101 70 94 142 133 108 128 141 124 98 113 134 123 115 151 95 138 145 144 117 107 103 126 99 103 62 78 76 140 100 152 121 110 105 74 137 76 83 60 150 130 129 86 74 131 151 90 81 79 120 160 68 91 57 83 91 66 158 155 132 159 111 89 109 133 82 129 120 113 86 129 67 95 137 158 148 98 91 64 90 146 148 83 136 74 157 73 80 140 57 114 116 126 150 118 137 123 150 127 102 72 95 144 135 110 130 143 125 99 114 136 124 116 153 97 140 147 145 120 108 104 128 101 104 64 79 77 141 102 154 123 111 106 75 139 78 84 62 152 131 130 88 75 133 154 92 84 82 122 162 69 93 59 85 93 67 160 157 134 162 114 90 110 136 83 131 122 115 89 131 69 97 140 160 150 101 93 65 92 147 149 84 137 76 159 74 82 142 59 116 118 128 152 119 139 125 152 130 105 73 97 145 137 112 132 145 126 101 116 139 125 118 154 99 143 148 147 122 109 106 130 103 106 66 81 78 143 104 155 124 113 107 78 142 80 85 63 153 134 132 89 77 135 156 94 85 83 124 163 71 95 60 87 95 69 162 158 135 163 116 92 111 137 85 133 124 116 91 132 71 99 141 163 152 102 95 67 93 149 150 87 138 78 161 75 84 143 61 118 120 130 153 122 140 127 153 131 106 74 98 146 138 114 133 147 128 102 118 140 127 119 155 100 144 149 148 124 110 107 132 105 108 68 84 79 144 105 157 125 115 109 80 143 82 89 64 155 135 134 90 78 137 158 96 87 86 126 164 72 97 62 89 97 71 164 160 137 166 117 94 114 139 88 135 126 119 92 133 73 101 144 165 154 103 96 68 95 151 153 89 141 79 163 77 86 145 63 120 121 131 154 124 143 129 156 132 107 76 100 148 141 116 134 148 131 103 121 142 129 123 156 102 146 151 149 125 112 108 134 106 109 69 86 81 147 107 159 128 117 111 82 145 83 91 65 157 137 136 92 80 139 160 97 90 88 128 167 74 98 64 91 99 73 165 161 140 168 120 97 115 142 90 137 127 121 95 135 75 103 146 167 156 105 98 69 97 153 154 92 144 80 166 79 88 147 64 122 123 133 156 125 145 131 158 134 110 78 102 149 142 118 136 151 132 105 122 143 130 125 157 104 149 155 153 127 114 111 136 108 110 70 87 83 148 109 160 129 118 113 84 147 85 93 67 159 138 139 95 81 141 162 99 92 90 130 170 77 99 65 94 101 74 167 163 142 169 121 99 118 144 92 139 129 122 96 137 77 104 148 169 157 106 100 70 98 155 156 93 145 81 168 81 90 148 66 124 125 134 157 126 147 132 160 135 112 79 103 151 144 120 139 153 134 106 123 145 132 126 158 105 150 156 154 128 117 113 138 109 113 72 89 85 149 111 161 130 119 115 86 149 87 95 68 162 141 140 97 83 143 163 101 93 91 131 172 78 101 67 95 102 76 169 164 145 171 123 101 119 146 93 141 131 124 98 140 79 106 150 172 159 109 102 72 100 156 157 94 147 83 170 83 92 150 68 125 126 137 159 128 148 135 162 139 113 80 106 154 147 121 141 154 135 107 125 149 134 128 160 108 153 157 156 130 118 114 140 110 114 73 92 86 152 113 162 132 120 117 88 152 90 96 71 164 143 143 98 85 145 165 103 95 93 133 173 81 104 69 96 104 78 171 168 146 173 124 104 121 147 96 143 132 125 99 141 80 107 153 173 160 112 104 75 101 158 160 98 149 85 171 85 93 152 70 127 128 138 162 129 150 136 164 140 114 82 107 156 148 122 142 156 136 108 126 151 135 130 164 110 155 158 157 131 119 116 142 113 115 74 94 88 153 114 166 133 122 118 89 154 92 100 73 166 145 144 102 86 146 168 105 96 94 135 175 82 105 70 97 106 80 173 169 148 174 125 106 122 149 98 144 133 127 101 145 81 110 154 175 162 113 106 76 103 159 162 100 150 86 172 86 95 153 71 129 130 141 164 132 152 139 166 143 115 84 111 157 149 124 146 159 137 113 129 152 136 131 166 111 157 161 160 133 121 117 143 114 117 76 96 89 155 116 168 134 123 120 90 155 94 102 75 168 147 145 103 88 148 169 108 98 96 137 176 84 108 71 99 109 82 175 171 149 176 128 108 126 150 100 145 134 129 103 146 83 111 155 176 164 115 107 77 105 162 163 101 151 87 175 87 96 156 72 130 132 143 165 133 154 140 168 144 117 85 112 160 153 126 147 160 138 114 131 154 137 132 168 113 158 163 161 134 124 118 144 116 118 78 98 91 158 117 169 135 128 122 92 157 96 103 76 169 149 147 104 90 151 171 110 100 98 138 177 86 109 73 102 111 83 177 173 151 178 129 109 127 153 101 147 136 131 105 148 84 112 158 180 169 117 108 80 106 164 165 102 155 89 179 89 98 157 74 131 133 145 167 134 156 141 171 147 119 86 116 162 154 127 149 164 140 117 133 156 139 135 170 115 162 167 165 135 125 120 145 118 121 80 100 93 159 119 171 138 130 123 93 160 98 104 78 173 151 148 105 91 152 175 112 101 99 139 180 88 111 75 103 114 84 179 175 153 180 131 111 129 154 102 148 138 133 108 149 86 114 159 182 171 119 110 81 109 166 168 103 156 91 180 90 100 159 76 132 135 146 170 136 157 142 173 148 122 87 118 163 155 129 151 166 143 119 134 158 141 137 171 117 163 169 168 137 126 123 147 121 123 82 101 94 161 121 172 139 131 124 95 162 99 106 79 174 153 150 108 93 154 176 114 104 102 141 181 89 113 77 106 116 86 180 176 154 182 132 113 130 155 103 149 140 134 109 152 88 116 162 183 173 120 112 83 111 167 169 104 157 93 181 92 101 160 78 134 137 147 172 139 158 143 175 150 124 88 119 165 157 130 154 167 146 121 135 160 144 139 173 118 164 172 170 141 128 125 148 122 125 83 102 96 163 122 175 142 132 127 96 163 101 107 81 176 155 151 110 94 156 177 115 106 104 142 183 90 114 78 107 117 ];\r\nm=reshape(m,[],50);\r\nv=rank_file(m);\r\nvexp=[74 80 83 84 88 89 93 98 100 101 102 104 105 109 112 114 116 117 119 121 123 125 127 130 131 133 135 136 138 139 140 145 147 148 151 153 155 156 157 159 162 164 165 167 170 171 173 177 178 180 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 6 1 1 6 2 3 2 4 5 7 7 3 6 7 2 2 7 3 4 3 5 6 8 8 4 7 8 3 3 8 4 5 4 6 7 9 9 5 8 9 4 4 9 5 6 5 7 8 10 10 6 9 10 5 5 10 6 7 6 8 9 11 11 7 10 11 6 6 11 7 8 7 9 10 12 12 8 11 12 7 7 12 8 9 8 10 11 13 13 9 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 8 9 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 13 4 2 9 3 1 5 14 8 6 10 7 2 9 15 12 10 11 11 3 13 16 16 14 12 15 4 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 4 6 4 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[6 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[33 55 94 119 106 74 42 176 132 15 170 135 242 282 134 264 186 180 333 193 308 23 38 212 62 213 111 204 70 19 152 214 233 262 15 258 220 252 232 153 46 127 330 189 55 86 297 196 86 55 85 118 131 114 81 53 199 158 23 173 142 294 306 162 326 224 205 355 218 322 26 57 233 93 266 129 257 98 26 165 245 271 305 19 284 248 299 286 163 72 138 342 247 66 104 314 225 103 60 93 141 166 156 116 60 222 171 33 197 185 319 317 188 350 238 208 374 232 351 53 85 253 110 294 161 280 129 55 189 264 284 346 42 307 283 332 299 188 87 158 372 269 108 154 336 236 117 87 123 164 198 170 126 85 244 192 38 224 201 340 357 200 376 253 229 399 263 370 72 109 297 133 328 177 308 142 57 222 317 338 365 46 342 331 353 335 223 109 191 386 286 124 169 367 280 133 93 126 186 206 203 129 108 260 224 55 279 216 369 392 244 408 307 300 440 283 425 85 123 305 142 350 201 318 183 66 268 339 372 394 55 377 358 380 365 227 124 216 435 316 126 186 412 285 136 110 129 204 225 222 155 116 271 231 74 301 228 395 410 266 418 308 307 471 289 432 93 133 314 155 365 207 350 188 81 278 340 382 404 62 406 375 401 380 247 126 226 446 327 142 204 424 298 156 125 136 210 242 235 162 117 285 262 86 309 253 401 432 271 456 337 324 477 298 462 95 137 331 156 381 225 352 196 103 292 349 411 435 68 413 388 423 391 263 133 245 473 346 161 217 437 318 167 129 186 227 270 263 188 141 293 309 94 365 281 471 454 330 511 398 374 514 323 488 98 142 350 204 455 245 433 227 118 352 353 415 504 70 438 402 483 465 290 164 287 494 412 183 242 464 325 196 154 201 242 284 284 204 161 301 319 111 386 296 490 468 332 523 415 394 517 335 513 104 169 371 207 456 256 443 245 129 371 380 427 520 86 461 421 510 474 299 177 288 514 440 186 256 480 338 217 156 206 263 300 300 222 166 341 337 119 400 312 500 480 348 543 442 419 535 345 525 114 170 377 225 476 284 469 270 131 394 383 461 536 106 478 439 519 478 334 198 324 529 451 203 284 490 347 235 158 216 287 324 312 226 185 344 347 135 413 336 545 506 364 573 461 441 554 368 541 138 191 404 228 503 288 500 281 142 412 408 471 571 127 495 446 564 521 342 201 336 543 475 216 296 522 380 245 171 227 309 337 334 231 188 372 350 153 438 347 568 524 382 600 462 450 597 379 559 158 192 421 247 523 319 519 290 163 433 440 496 599 132 507 456 589 538 350 223 342 584 494 224 299 547 398 262 188 260 330 348 341 266 222 399 372 176 467 364 580 542 399 620 510 487 603 413 563 162 200 456 271 530 332 523 293 199 442 465 499 611 134 511 489 608 546 382 244 344 591 513 244 301 559 431 271 189 283 352 394 345 278 232 442 379 193 489 412 584 582 413 644 532 493 633 451 610 165 222 499 289 571 371 549 323 218 451 515 550 643 152 571 527 622 583 433 263 368 623 543 268 335 592 476 292 197 285 365 400 347 301 236 467 398 196 508 413 602 583 431 655 533 518 646 489 618 173 224 511 298 583 386 571 325 225 476 520 566 654 170 574 539 623 590 438 280 380 643 560 279 338 617 508 309 208 305 374 419 377 307 253 487 421 212 511 441 641 605 456 699 537 529 682 493 650 205 229 529 314 619 394 601 350 233 499 533 585 684 180 594 563 660 635 450 297 404 661 579 300 371 625 518 324 238 339 398 442 383 308 264 510 440 214 520 461 666 625 465 707 544 533 692 532 658 224 253 537 340 635 415 608 353 245 515 544 595 699 186 617 581 670 653 462 317 408 668 594 307 380 644 533 337 269 358 412 451 439 327 283 513 456 220 539 475 671 659 489 726 581 563 744 543 705 247 286 579 375 643 440 637 402 248 527 594 637 724 189 646 617 684 670 494 331 446 726 617 316 421 684 560 346 280 372 433 469 461 350 284 523 496 233 566 500 677 680 499 760 595 585 752 549 715 257 308 601 382 663 443 645 415 271 550 608 645 740 204 669 637 696 673 519 338 471 748 637 318 427 707 571 352 294 377 455 476 478 365 307 530 507 258 574 503 699 690 511 785 617 594 783 571 734 266 328 619 406 676 456 669 438 284 571 635 663 742 213 676 643 705 684 523 342 495 773 646 350 461 727 583 381 299 392 465 478 480 380 317 546 524 282 583 521 718 707 542 797 625 605 812 583 751 286 335 635 410 690 474 680 454 306 582 653 673 760 232 684 670 721 707 538 357 506 795 659 365 468 749 590 391 319 412 471 500 490 395 336 580 547 297 617 545 768 718 559 821 644 625 836 584 779 294 340 641 424 727 490 707 464 314 592 666 677 807 242 699 671 792 749 568 367 522 816 684 369 480 768 602 401 332 425 483 519 525 401 351 608 559 308 618 564 779 721 563 830 658 650 844 622 796 299 353 660 432 734 510 715 488 322 610 670 696 827 252 705 684 796 751 589 370 541 837 705 380 513 792 623 423 346 435 504 536 529 404 372 611 584 330 643 571 816 760 591 864 668 661 852 643 827 305 365 684 446 773 520 748 494 342 623 699 740 847 262 742 724 837 795 599 386 543 847 726 394 514 807 654 435 350 440 511 543 535 418 374 620 597 333 646 573 836 797 603 884 692 682 884 644 830 326 376 699 471 783 523 752 514 355 633 707 760 852 264 785 726 844 812 600 399 554 864 744 408 517 821 655 456 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[68 95 125 137 161 162 167 210 225 242 253 263 285 298 318 331 349 388 411 413 432 437 462 473 477 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[10 2 1 4 1 8 4 3 7 9 5 7 8 10 6 9 3 2 6 11 3 2 5 2 9 5 4 8 10 6 8 9 11 7 10 4 3 7 12 4 3 6 3 10 6 5 9 11 7 9 10 12 8 11 5 4 8 13 5 4 7 4 11 7 6 10 12 8 10 11 13 9 12 6 5 9 14 6 5 8 5 12 8 7 11 13 9 11 12 14 10 13 7 6 10 15 7 6 9 6 13 9 8 12 14 10 12 13 15 11 14 8 7 11 16 8 7 10 7 14 10 9 13 15 11 13 14 16 12 15 9 8 12 17 9 8 11 8 15 11 10 14 16 12 14 15 17 13 16 10 9 13 18 10 9 12 9 16 12 11 15 17 13 15 16 18 14 17 11 10 14 19 11 10 13 10 17 13 12 16 18 14 16 17 19 15 18 12 11 15 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 9 10 11 12 13 14 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 22 2 22 222 22 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[22 222 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[47 37 13 3 25 53 39 5 32 41 12 4 36 20 9 16 28 41 8 26 49 49 34 23 52 2 2 21 27 19 46 6 51 14 31 17 23 33 24 19 18 44 11 44 13 29 20 32 40 48 39 15 6 28 56 43 7 39 42 14 6 42 23 10 18 31 44 9 32 50 51 37 29 54 4 3 28 33 24 47 9 53 17 36 20 25 40 31 21 21 45 14 45 15 34 26 36 41 53 47 16 9 32 62 47 11 40 52 16 7 44 26 13 21 33 49 13 38 55 57 44 34 59 6 5 33 39 28 54 11 58 21 37 22 29 42 36 22 25 52 15 53 18 35 30 41 50 56 49 20 10 35 64 50 13 44 56 18 9 49 27 16 22 37 51 16 39 57 61 47 37 61 9 8 35 42 29 60 13 60 23 41 24 31 47 38 24 28 53 17 58 20 40 32 46 53 58 52 22 14 38 68 53 16 48 57 19 14 52 28 17 23 41 54 18 45 59 64 50 41 65 12 11 38 47 30 62 15 63 26 45 27 33 49 43 25 29 57 19 59 21 42 35 49 54 62 58 24 15 40 70 56 18 49 62 22 15 54 29 20 25 43 57 20 47 64 66 55 43 69 13 13 41 49 34 64 16 66 29 47 32 34 50 44 26 33 59 21 63 24 44 36 53 59 68 61 29 17 41 79 59 21 52 63 23 18 56 34 22 31 45 62 23 48 71 72 58 45 76 14 16 43 51 39 69 21 73 31 48 35 37 54 46 33 36 65 26 66 25 46 40 54 62 69 64 32 20 43 80 61 22 54 68 25 21 58 38 24 35 48 65 24 53 72 74 62 47 78 17 19 46 54 41 72 22 75 33 51 36 40 55 50 36 37 68 27 70 26 50 42 59 65 73 67 33 21 46 82 64 25 56 72 28 23 61 40 27 36 51 66 28 54 75 77 65 50 79 18 20 47 56 42 74 26 77 34 54 38 41 57 53 37 40 71 29 73 29 52 44 60 69 76 69 34 24 49 86 67 28 61 75 33 25 64 42 31 39 54 70 29 57 77 80 68 52 83 19 23 51 59 45 78 29 80 37 59 40 45 62 54 41 41 72 30 76 34 56 48 62 70 79 70 36 26 51 89 70 30 63 77 38 28 67 44 35 40 57 71 32 60 82 84 69 56 88 20 25 53 63 49 81 32 85 41 61 43 48 64 59 42 46 73 35 78 40 59 51 67 71 82 81 41 28 53 93 74 33 66 86 41 31 72 47 37 43 59 77 35 67 84 95 78 62 90 21 28 59 70 54 92 33 87 45 64 48 51 69 65 46 51 79 38 89 43 62 57 75 84 83 84 43 29 56 94 77 34 68 88 42 34 75 50 40 45 62 79 37 69 87 97 81 64 93 23 29 62 71 56 95 35 88 46 67 50 52 72 66 47 52 80 41 90 44 64 59 76 87 87 86 44 31 59 97 81 36 70 92 45 36 78 53 41 46 65 82 38 72 90 98 82 67 95 24 31 64 73 59 96 37 93 48 69 51 54 74 69 50 54 85 43 94 47 66 61 79 89 89 87 47 32 60 102 83 38 75 94 48 39 79 54 44 48 67 85 39 75 91 102 86 68 99 26 32 66 78 61 99 40 96 52 72 54 57 78 70 53 56 87 45 96 49 69 63 83 92 92 91 49 33 63 105 84 39 78 96 49 40 82 56 47 51 70 88 42 78 93 105 89 72 102 27 33 69 80 62 102 42 97 54 73 55 59 80 74 54 57 90 47 97 50 71 64 86 93 94 95 51 35 66 106 86 40 81 99 52 42 83 58 49 52 73 90 45 79 97 108 92 75 103 30 36 72 82 64 103 44 99 56 77 58 60 82 78 56 61 93 48 100 54 74 67 88 98 96 97 53 36 67 108 89 41 83 102 53 43 88 60 50 54 75 93 46 83 100 111 93 77 105 32 39 74 84 67 104 47 103 59 79 61 62 86 81 59 64 94 49 103 56 76 70 89 100 99 98 55 37 69 111 93 44 86 104 54 44 92 65 51 58 78 96 47 85 102 113 96 79 106 34 41 77 88 70 109 49 105 62 82 65 68 89 82 62 66 97 50 107 57 81 71 93 101 102 100 58 39 70 112 97 47 87 106 57 45 95 67 53 61 81 98 49 87 105 115 97 80 111 37 44 79 90 72 110 52 108 65 86 68 69 91 85 64 71 100 52 108 59 84 73 94 104 105 102 59 41 71 115 100 50 92 109 58 48 98 69 56 62 84 101 53 89 108 117 99 83 113 40 47 82 92 76 113 53 109 68 89 69 70 93 87 65 73 104 54 112 62 87 79 96 105 109 105 62 42 77 118 102 52 94 111 59 50 99 72 57 63 86 104 56 91 111 118 102 87 116 41 49 84 93 77 114 55 112 71 92 72 75 96 90 68 75 106 57 113 64 88 82 100 108 112 108 63 45 78 120 103 53 96 112 63 53 100 73 60 66 89 107 58 96 113 119 105 88 119 44 51 87 97 80 118 58 116 73 94 75 76 97 93 70 77 108 59 116 66 90 85 103 109 113 111 64 47 81 122 104 54 99 116 65 54 103 74 61 69 92 109 60 99 114 121 106 93 120 46 52 90 102 83 120 59 118 76 96 78 78 102 95 72 79 110 62 119 69 95 88 105 113 117 112 66 51 84 124 111 57 102 118 68 56 108 77 64 72 95 113 61 102 118 124 111 94 121 49 53 93 105 86 122 62 119 79 98 80 80 105 97 74 82 115 64 120 70 97 89 108 115 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[30 35 40 45 48 51 52 56 58 60 66 73 74 77 81 82 83 86 90 93 94 97 99 103 106 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[35 23 18 30 62 42 46 10 64 1 4 47 35 51 49 2 14 57 4 17 38 8 33 43 24 27 5 43 33 1 28 6 34 12 25 34 47 21 39 13 32 57 53 17 37 41 21 60 36 38 26 20 32 65 44 47 14 69 2 5 51 40 53 51 5 15 58 6 19 43 10 35 47 28 31 10 46 35 4 32 13 36 13 28 38 48 23 45 18 33 60 57 18 44 46 25 64 41 47 28 22 37 70 50 57 18 71 4 6 58 46 62 70 10 18 74 12 20 48 12 40 62 31 34 15 54 40 8 33 17 43 14 31 44 66 24 56 19 36 66 64 22 52 60 27 69 49 49 30 32 42 81 56 61 20 85 5 10 65 49 68 73 13 19 79 14 28 52 15 43 63 35 38 17 57 43 12 36 18 46 17 35 45 68 25 59 24 39 73 70 24 55 62 33 77 50 52 32 33 43 84 58 65 24 87 6 13 67 51 69 74 15 21 80 18 31 56 17 46 68 39 40 19 62 47 14 41 21 51 18 37 47 72 28 62 28 45 74 72 26 59 64 35 80 56 56 34 40 48 87 62 66 30 90 10 14 68 52 73 78 18 24 82 22 37 57 18 50 71 42 46 24 64 50 17 47 26 52 20 44 51 76 33 63 34 49 76 74 30 61 68 43 81 58 59 40 42 53 89 65 71 33 92 13 18 72 58 75 81 23 28 87 24 38 61 19 55 72 44 50 25 68 55 21 51 28 58 24 46 57 79 37 66 37 53 81 79 34 65 69 45 83 60 63 43 46 54 92 71 76 34 95 17 19 77 63 80 83 26 31 89 28 43 67 20 57 74 47 52 30 72 58 23 54 32 60 28 53 60 81 38 70 40 55 82 81 37 67 73 50 84 64 70 46 50 55 96 73 79 42 100 18 20 83 65 87 89 28 33 93 31 47 70 22 60 81 50 53 35 75 64 24 58 39 68 32 57 63 85 42 77 44 61 92 89 40 75 80 54 95 74 72 50 53 58 98 76 81 46 103 21 25 87 67 89 90 31 35 100 34 52 71 27 63 84 54 55 38 79 68 27 63 40 69 33 59 66 89 45 79 50 64 94 90 43 77 81 55 97 75 76 53 55 60 102 78 85 48 104 25 28 88 71 91 95 32 37 101 37 54 73 31 66 87 57 59 42 82 72 30 67 43 74 35 60 67 93 46 83 53 68 99 95 44 81 84 58 101 77 81 54 60 67 108 83 90 50 112 28 32 92 76 96 103 35 41 106 40 57 80 33 70 97 58 63 43 86 76 33 70 46 80 36 66 74 100 51 93 55 72 101 97 47 89 95 63 105 85 84 55 63 68 112 85 94 51 115 32 33 96 79 100 106 38 45 109 44 60 83 36 72 101 61 64 45 88 79 34 74 47 83 39 67 77 104 53 96 57 77 103 102 49 91 100 66 108 86 88 58 65 72 116 86 98 52 120 33 35 101 83 103 111 40 47 115 46 63 85 40 76 104 64 68 49 91 83 35 76 51 86 43 71 79 107 55 99 58 79 109 107 50 95 103 67 110 90 89 60 70 74 120 88 99 57 123 34 36 104 86 106 113 43 51 122 48 67 87 43 80 107 68 69 52 92 85 38 80 56 87 46 73 83 109 58 102 61 83 111 108 52 99 104 71 115 93 90 63 73 76 122 90 103 62 126 35 38 107 88 110 116 44 52 126 50 71 89 47 81 111 70 72 56 96 86 42 83 58 88 49 78 84 112 59 104 65 85 114 111 56 102 106 76 116 95 96 64 75 77 126 95 107 64 127 36 41 108 90 111 123 46 56 130 54 72 93 49 85 115 74 75 57 97 91 43 86 62 92 50 82 86 119 60 108 68 88 115 113 58 103 112 79 120 97 103 67 79 81 128 102 111 66 130 37 44 112 95 116 124 47 59 133 57 76 99 52 89 119 75 77 61 103 98 46 90 65 99 55 85 91 122 65 113 71 94 121 119 61 111 117 81 122 107 107 70 83 83 129 104 113 68 133 39 45 115 99 117 127 51 62 134 58 77 102 56 93 120 77 79 65 108 101 47 92 67 104 59 88 96 125 66 115 72 96 125 122 63 112 119 87 126 108 110 73 87 84 132 106 117 73 134 41 46 119 103 120 130 53 64 136 62 80 104 60 95 123 80 81 68 112 103 51 96 69 106 62 91 100 128 69 117 75 100 127 125 68 116 120 89 129 111 111 74 89 87 137 111 119 74 140 43 47 120 104 123 132 57 68 137 64 81 107 62 97 127 81 84 70 115 107 53 97 72 108 63 95 101 129 72 122 79 102 131 127 71 119 125 90 135 113 114 81 92 93 140 112 122 76 143 47 48 125 107 128 134 60 72 140 66 82 109 66 100 131 85 89 73 119 109 57 101 74 111 68 99 104 132 79 125 81 103 132 129 76 121 127 94 137 115 116 83 95 95 142 116 124 81 145 49 51 127 111 130 139 64 74 144 69 84 113 70 103 135 89 90 77 123 110 60 105 80 115 73 101 106 137 81 126 83 108 134 132 78 122 129 97 139 120 122 86 96 97 146 122 127 87 150 53 56 131 114 132 142 65 77 147 70 92 118 72 105 137 92 96 81 124 116 62 108 84 120 76 102 107 140 84 129 89 112 136 134 79 128 132 98 143 126 126 89 100 101 147 126 133 90 153 57 58 134 115 136 145 69 80 153 71 95 122 74 106 140 93 100 85 130 120 64 112 87 123 79 104 109 143 87 133 92 115 140 137 82 130 134 103 144 127 ];\r\nm=reshape(m,[],25);\r\nv=rank_file(m);\r\nvexp=[53 56 72 76 77 79 84 86 92 96 97 105 107 114 118 122 124 127 131 132 134 136 143 146 150 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 2 22 222 22 222 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 22 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 3 1 1 6 4 4 4 5 2 2 8 6 5 6 8 3 4 9 8 6 8 9 5 6 12 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 10 12 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 13 4 10 8 1 5 6 2 8 3 7 10 15 18 5 14 11 2 8 7 4 11 4 9 12 19 21 10 17 15 5 10 11 5 12 8 13 18 22 25 12 20 19 8 11 15 7 15 11 17 20 25 28 17 23 25 10 13 20 9 17 14 23 27 28 30 19 25 28 11 15 22 11 19 15 25 29 29 32 21 27 30 13 18 25 12 20 18 28 32 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[1 3 4 6 7 8 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 91 7 1 11 31 51 4 9 8 21 5 61 71 3 1 41 81 10 16 92 17 11 12 32 52 14 19 18 22 15 62 72 13 2 42 82 20 26 93 27 21 13 33 53 24 29 28 23 25 63 73 23 3 43 83 30 36 94 37 31 14 34 54 34 39 38 24 35 64 74 33 4 44 84 40 46 95 47 41 15 35 55 44 49 48 25 45 65 75 43 5 45 85 50 56 96 57 51 16 36 56 54 59 58 26 55 66 76 53 6 46 86 60 66 97 67 61 17 37 57 64 69 68 27 65 67 77 63 7 47 87 70 76 98 77 71 18 38 58 74 79 78 28 75 68 78 73 8 48 88 80 86 99 87 81 19 39 59 84 89 88 29 85 69 79 83 9 49 89 90 96 100 97 91 20 40 60 94 99 98 30 95 70 80 93 10 50 90 100 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[2 12 22 32 42 52 62 72 82 92 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[13 5 11 6 15 2 9 12 9 2 4 6 14 3 10 8 4 8 10 18 7 16 9 19 4 12 16 12 3 6 7 18 5 14 10 5 11 14 20 10 17 11 21 6 13 18 13 4 9 9 19 7 16 12 6 12 16 22 13 20 14 24 8 14 20 17 5 12 10 21 10 18 13 7 16 19 23 14 22 15 25 9 15 21 18 6 13 11 22 12 19 14 9 17 20 25 18 23 19 26 10 17 25 22 8 16 12 26 14 20 16 11 20 23 26 20 25 22 27 11 18 28 25 9 17 13 29 16 22 17 12 23 26 27 22 26 23 28 13 20 30 26 10 20 16 32 18 23 19 14 25 27 30 24 28 25 32 15 21 32 27 12 21 18 33 19 25 20 16 26 28 32 26 29 28 33 16 22 34 31 14 22 19 36 21 26 21 18 29 32 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[16 21 22 26 28 29 31 32 34 36 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[21 36 28 46 26 29 18 38 8 32 49 12 35 15 42 41 4 5 19 41 10 17 36 13 49 32 23 1 9 51 2 13 34 22 53 45 52 5 26 42 7 39 18 1 27 28 40 32 56 30 34 21 42 17 36 60 13 43 20 52 43 11 9 26 49 18 19 44 19 54 36 29 5 11 57 9 14 40 25 64 53 59 13 27 47 15 46 23 2 29 30 41 38 61 37 38 28 46 20 40 64 15 44 26 55 50 14 11 28 52 21 20 46 22 57 42 33 9 14 61 11 18 43 31 67 59 64 15 32 51 17 47 25 4 34 33 43 40 64 39 41 32 49 25 41 68 18 50 30 61 53 15 13 30 57 27 24 54 29 64 46 34 12 15 66 13 22 49 36 70 63 69 18 37 57 21 56 29 5 38 39 58 52 74 43 44 42 60 28 54 76 21 55 38 66 61 18 15 36 64 32 29 57 36 68 49 41 13 17 69 14 26 53 46 80 70 72 22 47 63 26 60 32 7 48 43 59 57 78 48 52 46 61 33 58 82 25 56 41 71 65 20 17 37 67 35 33 58 38 72 54 46 17 20 74 19 28 55 50 84 74 75 24 54 66 29 64 36 8 56 45 65 61 79 50 54 47 68 36 63 85 27 59 42 74 71 25 18 40 71 38 35 61 41 77 56 48 18 21 81 23 32 57 53 88 77 83 29 58 72 32 68 38 10 60 47 69 65 82 53 55 51 70 37 68 88 29 63 48 80 72 28 19 45 76 40 38 66 45 79 59 50 19 22 84 26 36 62 54 92 81 86 30 61 76 36 72 41 13 64 51 76 69 91 57 60 52 80 43 72 95 30 69 51 84 84 30 20 48 78 45 41 73 47 92 64 54 21 26 94 28 38 66 58 99 87 98 33 64 88 39 74 42 15 68 52 80 72 93 61 64 58 81 46 75 99 32 71 54 88 87 33 21 51 83 48 46 77 50 94 67 58 23 28 95 29 42 70 61 101 89 100 34 65 90 41 79 47 18 71 58 83 77 95 65 68 61 86 48 80 102 36 78 57 90 89 37 25 54 86 50 50 80 53 97 72 61 26 31 98 30 46 75 65 103 92 104 39 67 91 43 81 53 22 75 64 85 80 97 67 70 64 87 52 83 106 37 81 60 92 93 38 27 61 90 54 54 85 55 101 75 65 29 32 105 34 47 79 68 107 95 106 41 70 95 44 89 58 26 77 68 89 84 100 75 77 67 90 54 85 107 38 84 64 96 97 42 29 64 95 56 56 88 59 104 79 71 32 34 106 36 48 83 72 108 99 109 46 75 99 49 91 60 27 79 69 91 86 104 77 80 70 94 55 88 109 40 89 66 100 99 43 32 65 99 57 57 92 62 108 84 72 34 38 109 40 52 86 75 112 102 111 49 79 102 53 95 61 28 83 72 92 89 110 80 83 71 95 56 90 112 41 90 69 107 103 44 36 68 103 59 58 94 63 110 85 75 35 40 112 43 54 88 78 116 108 116 50 81 104 55 97 63 32 84 76 95 92 116 83 85 77 97 58 94 119 43 92 73 111 104 46 40 69 104 61 59 95 66 111 89 80 36 41 115 44 58 91 80 120 114 117 54 85 106 57 100 65 36 88 80 100 95 119 86 87 79 103 64 97 123 49 95 74 114 108 47 42 70 108 68 61 97 72 113 90 81 39 46 116 46 60 94 81 124 115 120 56 89 110 60 103 68 38 91 84 104 99 121 89 93 83 108 67 103 124 53 103 78 115 111 52 43 72 111 71 65 104 76 117 97 87 41 50 118 49 61 99 86 126 118 121 57 90 113 64 108 71 41 95 88 111 100 126 91 95 88 114 71 107 130 57 104 84 119 115 55 47 76 113 74 66 106 80 127 99 90 42 51 129 52 63 102 90 131 123 132 61 92 119 66 110 72 42 96 89 114 102 130 94 99 89 115 74 108 132 60 105 87 123 118 59 51 78 114 77 70 107 81 131 102 93 45 53 134 53 66 103 92 135 126 136 63 95 123 70 111 76 45 99 92 116 104 134 97 101 93 119 78 110 137 64 110 91 127 121 61 54 79 117 79 72 111 82 134 104 94 46 57 135 56 68 108 95 139 131 137 64 97 126 74 113 77 49 100 94 119 109 135 98 105 99 123 82 112 140 66 112 95 129 124 64 57 84 118 85 74 115 88 137 106 95 49 61 140 60 69 109 102 144 134 142 68 106 130 76 116 81 51 107 98 120 112 137 104 106 101 124 84 116 142 69 116 99 132 126 67 59 86 121 88 75 117 92 139 109 100 53 64 144 64 72 111 103 148 136 148 70 107 131 80 120 83 52 108 ];\r\nm=reshape(m,[],23);\r\nv=rank_file(m);\r\nvexp=[45 51 53 60 66 70 76 78 89 93 94 99 102 103 105 107 111 114 123 126 130 132 135 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[31 35 11 33 31 40 8 22 42 6 32 18 21 44 32 30 3 28 8 7 40 15 15 18 12 43 38 25 30 38 19 3 9 19 25 35 27 12 5 34 6 10 47 35 43 16 40 36 47 13 23 49 11 38 21 26 49 37 33 5 33 12 11 43 20 19 21 18 46 44 27 34 40 23 6 15 22 32 39 30 17 8 42 8 13 52 40 51 21 45 41 56 15 33 59 12 43 28 31 52 41 38 6 36 15 12 49 23 26 25 24 51 54 36 38 46 28 7 16 30 34 44 37 19 11 48 11 18 54 44 55 24 51 48 60 18 36 63 15 50 32 33 55 46 45 8 38 18 15 51 24 30 26 27 53 57 39 41 50 30 8 19 35 37 47 42 20 12 52 13 19 58 46 57 26 55 50 61 19 38 66 18 52 35 36 59 48 48 9 40 19 16 54 25 32 29 29 56 60 40 43 53 32 10 21 36 39 49 44 24 13 56 15 21 60 50 62 29 58 52 64 24 40 68 21 54 38 39 64 53 49 12 46 20 19 59 31 34 34 32 62 63 43 47 58 35 11 26 39 44 56 45 29 16 59 17 24 67 53 64 31 59 55 67 27 44 70 24 57 40 42 68 56 50 15 49 24 23 63 34 37 36 34 66 65 46 52 61 39 12 29 41 47 59 47 32 18 60 20 25 71 56 69 34 64 58 71 30 49 74 26 61 43 45 71 57 55 18 53 26 25 67 37 40 40 36 68 70 52 55 64 43 15 32 46 50 60 54 34 19 66 21 29 74 59 72 35 65 60 78 32 52 79 28 63 45 48 75 61 58 19 54 30 28 69 40 43 43 39 72 75 53 56 65 45 18 35 48 51 63 56 38 21 69 23 32 77 62 73 39 67 63 79 35 55 82 30 65 48 50 77 63 60 21 57 33 31 72 41 45 46 42 75 76 56 59 68 48 19 36 50 53 64 58 39 22 70 26 36 80 65 75 42 69 65 80 36 58 83 33 68 50 55 80 68 64 24 61 34 32 77 44 46 49 45 79 78 61 62 74 52 22 38 51 60 71 62 40 23 73 29 37 82 68 79 44 76 72 82 39 60 86 36 74 51 56 85 71 69 25 65 37 34 80 46 50 52 47 82 81 63 67 77 53 25 40 53 63 73 66 43 27 78 32 39 87 72 81 46 78 75 85 42 61 88 37 77 54 58 88 74 71 28 67 38 36 83 47 53 54 49 85 84 65 69 80 56 27 44 57 66 76 67 45 30 80 33 40 91 73 83 47 81 78 87 45 62 90 38 80 56 60 89 76 72 30 71 41 38 85 50 55 55 52 87 85 67 72 83 58 30 48 59 69 77 69 49 33 82 34 43 93 80 87 50 83 80 89 48 65 91 41 82 59 63 91 81 73 31 75 44 40 87 55 56 58 53 89 88 68 78 85 60 31 50 62 72 84 72 52 36 85 35 46 95 82 89 53 85 81 95 50 68 98 43 84 61 65 94 84 76 32 77 46 41 88 57 57 61 56 90 92 71 80 86 63 32 52 63 74 85 74 54 38 86 37 48 98 83 90 56 87 84 97 51 71 99 45 85 63 67 96 85 77 35 78 47 44 91 59 60 64 59 92 94 73 81 89 65 33 55 64 76 87 76 58 40 88 39 49 100 85 94 58 89 85 100 52 74 101 48 86 65 70 99 86 83 38 80 50 46 95 60 64 66 61 97 96 77 82 92 69 34 56 68 78 88 80 59 42 92 40 53 101 87 97 59 91 87 103 55 77 105 51 88 69 73 101 89 85 40 81 51 49 97 64 67 69 63 98 99 80 83 94 72 35 57 72 79 90 83 62 43 95 43 54 103 88 98 62 92 89 105 57 79 107 54 90 72 76 103 92 87 43 84 53 51 99 65 68 70 66 102 102 82 85 96 75 38 60 75 81 94 85 63 44 97 46 56 104 89 101 64 96 91 107 60 80 110 56 94 75 79 107 95 89 44 85 55 52 103 67 71 71 68 105 103 85 87 100 78 40 61 77 82 97 88 64 47 99 49 59 108 91 103 67 100 95 108 63 82 113 59 98 77 82 110 98 93 47 88 58 54 105 70 74 74 71 107 104 87 90 101 79 42 66 80 86 99 91 68 49 101 52 60 113 ];\r\nm=reshape(m,[],22);\r\nv=rank_file(m);\r\nvexp=[24 29 32 34 37 42 45 46 50 51 58 61 62 64 65 68 69 73 75 78 80 83 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 3 2 2 3 1 1 5 4 3 3 4 2 2 6 5 4 4 5 3 3 7 6 5 5 6 4 4 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[63 48 125 24 41 119 35 111 61 70 49 24 86 115 102 136 35 60 133 51 131 86 128 51 49 93 118 111 162 41 94 157 86 156 94 139 60 61 119 131 129 191 46 119 176 93 166 105 153 82 86 125 192 189 212 48 156 204 131 189 111 203 102 111 129 209 204 237 63 157 209 133 192 118 224 115 119 131 237 212 244 70 162 224 136 203 139 244 128 125 153 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[46 82 105 125 166 176 191 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 7 6 6 3 8 5 47 9 2 9 46 8 5 1 3 7 2 12 2 15 14 14 11 16 13 48 17 10 17 49 16 13 2 11 15 10 19 3 22 21 21 18 23 20 51 24 11 24 50 23 20 3 18 22 11 25 4 28 27 27 19 29 26 53 30 12 30 52 29 26 4 19 28 12 26 5 33 32 32 20 34 31 55 35 13 35 54 34 31 5 20 33 13 27 6 37 36 36 21 38 32 56 39 14 39 57 38 32 6 21 37 14 28 7 40 37 37 22 41 33 58 42 15 42 59 41 33 7 22 40 15 29 8 41 38 38 23 43 34 61 44 16 44 60 43 34 8 23 41 16 30 9 42 39 39 24 44 35 63 45 17 45 62 44 35 9 24 42 17 52 47 58 57 56 51 61 55 64 62 48 63 64 60 54 46 50 59 49 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[4 12 19 25 26 27 28 29 30 53 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 45 10 81 36 76 2 44 40 117 103 90 2 101 65 65 86 35 87 24 79 24 102 40 98 10 61 52 168 137 120 22 144 84 98 127 43 134 43 96 40 132 54 108 35 74 74 179 161 136 36 147 99 121 137 54 144 61 113 52 169 74 141 44 92 92 188 208 142 40 157 119 144 184 74 186 79 137 73 174 96 159 45 97 113 213 230 168 53 191 151 168 199 88 216 84 168 98 205 99 201 65 144 119 236 236 211 65 222 190 190 206 121 217 98 174 102 208 108 208 76 169 141 267 246 235 81 260 205 201 224 132 229 120 199 127 235 136 224 90 184 142 274 267 259 86 268 206 211 259 137 265 144 216 134 260 147 229 101 186 157 281 294 265 87 272 217 222 268 144 272 168 230 137 267 179 246 117 208 188 302 302 267 103 294 236 236 274 161 281 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[53 73 88 97 137 151 159 168 191 213 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[27 24 23 31 11 19 34 3 21 21 30 3 26 36 7 29 4 9 26 22 12 19 15 6 16 36 31 27 44 15 23 38 4 25 24 40 6 31 39 12 34 10 12 32 27 15 21 17 10 18 40 33 31 48 16 27 44 7 27 28 44 9 35 45 15 38 12 15 35 30 16 25 20 12 22 43 37 32 50 20 29 46 11 29 32 47 12 37 50 16 41 15 16 41 33 20 28 24 15 23 47 40 39 51 23 32 48 15 36 34 50 16 40 54 22 44 18 20 42 36 24 32 28 17 28 49 43 40 53 28 34 54 19 39 37 51 19 42 55 25 46 21 27 45 39 29 34 32 23 32 51 44 43 55 29 39 56 21 40 40 53 21 47 58 27 51 25 28 48 41 32 37 36 24 34 53 45 44 58 32 40 62 22 41 43 55 23 51 64 31 55 27 30 50 44 33 39 39 27 36 60 53 45 64 37 42 66 24 44 47 61 26 53 68 35 56 31 33 56 51 37 43 40 31 40 61 56 50 67 41 46 68 26 48 51 63 29 56 72 38 57 34 35 57 55 41 45 44 32 42 62 60 53 68 43 50 72 27 51 54 66 30 60 74 40 61 37 40 61 59 43 49 45 36 47 72 66 55 79 46 54 75 30 53 56 75 34 61 79 44 63 38 44 68 62 47 51 48 40 50 74 68 58 82 50 55 79 31 55 58 79 36 64 82 45 67 39 48 72 64 50 53 54 44 51 ];\r\nm=reshape(m,[],13);\r\nv=rank_file(m);\r\nvexp=[30 37 40 43 45 50 54 59 60 61 62 66 68 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 1 1 3 3 3 2 2 4 4 4 3 3 5 5 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[2 3 4 ];\r\nassert(isequal(vexp,v))\r\ntoc","published":true,"deleted":false,"likes_count":1,"comments_count":4,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":"2016-04-18T04:38:58.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-04-18T04:31:44.000Z","updated_at":"2016-04-18T04:40:54.000Z","published_at":"2016-04-18T04:36:07.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/4304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rd1A 2016 Rank and File\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 26 large cases with max N=50.\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 is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\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 [M], matrix of size [2*N-1,N] of all rows and columns of H except one\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 [V], the missing vector of H not included in M\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 [M] [V]\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 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \\n[22 222;2 22;2 22][22 222]]]\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:t\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution. \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=\\\"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rank_file solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":42805,"title":"GJam 2016 Rd1A: Rank and File (small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/4304486/dashboard#s=p1 GJam Rd1A 2016 Rank and File\u003e. This is the small case with max N=10\r\n\r\nThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip. \r\n\r\n*Input:* [M], matrix of size [2*N-1,N] of all rows and columns of H except one\r\n\r\n*Output:* [V], the missing vector of H not included in M\r\n\r\n*Examples:* [M] [V] \r\n\r\n  [1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n  [22 222;2 22;2 22][22 222] \r\n \r\nGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\r\n\r\n*Theory:* With max N=10 it is possible to brute force the 50 puzzles. Persistent may be useful with the usage of nchoosek which may be the critical path. \u003chttps://www.go-hero.net/jam/16/solutions/1/2/MATLAB GJam Rank_file solutions\u003e. Writing the general solution for N=50 is better for the contest. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/4304486/dashboard#s=p1\"\u003eGJam Rd1A 2016 Rank and File\u003c/a\u003e. This is the small case with max N=10\u003c/p\u003e\u003cp\u003eThe GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], matrix of size [2*N-1,N] of all rows and columns of H except one\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the missing vector of H not included in M\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [M] [V]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \r\n[22 222;2 22;2 22][22 222] \r\n\u003c/pre\u003e\u003cp\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e With max N=10 it is possible to brute force the 50 puzzles. Persistent may be useful with the usage of nchoosek which may be the critical path. \u003ca href = \"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\"\u003eGJam Rank_file solutions\u003c/a\u003e. Writing the general solution for N=50 is better for the contest. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.\u003c/p\u003e","function_template":"function v = rank_file(m)\r\n% H a rank/file array that has all columns and rows increasing\r\n% m  matrix [2*N-1,N] of scrambled rows/columns original H [NxN] array\r\n% v  missing vector of H\r\n v=0;\r\nend","test_suite":"%%\r\ntic\r\nm=[1 2 3 2 1 2 3 5 3 2 3 5 6 4 3 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 2 2 222 22 22 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[22 222 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 3 6 9 10 6 3 14 6 7 11 11 7 6 16 9 11 15 19 10 8 22 11 14 19 22 11 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[8 10 15 16 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 23 6 3 1 6 2 5 5 2 22 4 9 2 25 11 8 2 11 7 10 10 7 24 9 13 3 26 15 12 3 15 8 14 14 8 27 13 16 4 29 18 13 4 18 9 17 17 9 28 16 17 5 30 20 14 5 20 10 19 19 10 31 17 18 6 32 21 15 6 21 11 20 20 11 33 18 28 23 34 33 27 22 32 24 31 30 25 34 29 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[3 8 12 13 14 15 26 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 5 3 8 6 9 46 1 2 7 8 2 3 4 1 9 47 6 5 15 13 11 16 14 17 49 2 10 15 16 10 11 12 2 17 48 14 13 22 20 18 23 21 24 50 3 11 22 23 11 18 19 3 24 51 21 20 28 26 19 29 27 30 52 4 12 28 29 12 19 25 4 30 53 27 26 33 31 20 34 32 35 54 5 13 33 34 13 20 26 5 35 55 32 31 37 32 21 38 36 39 57 6 14 37 38 14 21 27 6 39 56 36 32 40 33 22 41 37 42 59 7 15 40 41 15 22 28 7 42 58 37 33 41 34 23 43 38 44 60 8 16 41 43 16 23 29 8 44 61 38 34 42 35 24 44 39 45 62 9 17 42 44 17 24 30 9 45 63 39 35 58 55 50 61 57 62 64 47 48 59 60 49 51 52 46 63 64 56 54 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[4 12 19 25 26 27 28 29 30 53 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[22 2 22 222 22 222 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 22 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 6 6 4 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[4 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 3 10 9 4 8 9 6 2 6 8 4 13 11 11 4 6 14 11 6 10 13 10 3 7 12 8 15 12 15 6 7 17 12 8 11 15 11 4 9 14 9 16 14 18 8 10 18 14 10 12 17 12 6 11 15 11 17 15 20 9 11 20 16 12 15 19 14 8 14 16 12 19 18 21 11 12 22 19 13 17 20 15 9 15 18 14 21 20 24 13 15 24 20 14 18 21 17 10 17 19 16 24 22 26 14 17 25 21 15 20 23 20 11 18 22 19 26 24 28 ];\r\nm=reshape(m,[],8);\r\nv=rank_file(m);\r\nvexp=[14 17 19 20 22 23 25 28 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 6 4 6 8 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 6 1 1 4 3 2 4 8 2 2 6 5 4 5 9 3 4 8 8 6 6 12 5 6 10 9 8 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 10 12 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 4 10 9 1 8 3 2 2 4 1 6 6 9 3 5 10 7 7 9 5 11 10 2 9 4 3 3 5 2 7 7 10 4 6 11 8 8 10 6 12 11 3 10 5 4 4 6 3 8 8 11 5 7 12 9 9 11 7 13 12 4 11 6 5 5 7 4 9 9 12 6 8 13 10 10 12 8 14 13 5 12 7 6 6 8 5 10 10 13 7 9 14 11 11 13 9 15 14 6 13 8 7 7 9 6 11 11 14 8 10 15 12 12 14 10 16 15 7 14 9 8 8 10 7 12 12 15 9 11 16 13 13 15 11 17 16 8 15 10 9 9 11 8 13 13 16 10 12 17 14 14 16 12 18 17 9 16 11 10 10 12 9 14 14 17 11 13 18 15 15 17 13 19 18 10 17 12 11 11 13 10 15 15 18 12 14 19 16 16 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 9 10 11 12 13 14 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 5 7 2 9 7 8 4 4 4 7 9 4 11 8 9 6 6 5 8 10 5 12 9 11 7 7 7 10 12 7 13 12 14 9 8 8 12 14 9 16 13 16 11 9 ];\r\nm=reshape(m,[],5);\r\nv=rank_file(m);\r\nvexp=[5 7 8 9 11 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 29 22 3 15 36 43 4 2 6 1 8 1 14 30 23 10 16 37 44 11 9 13 8 9 2 21 31 24 17 17 38 45 18 16 20 15 10 3 28 32 25 24 18 39 46 25 23 27 22 11 4 35 33 26 31 19 40 47 32 30 34 29 12 5 42 34 27 38 20 41 48 39 37 41 36 13 6 49 35 28 45 21 42 49 46 44 48 43 14 7 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[5 12 19 26 33 40 47 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 1 1 3 2 2 4 4 2 2 4 3 3 5 5 3 3 5 4 4 6 6 4 4 6 5 5 7 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 6 7 2 1 4 5 3 2 7 3 1 5 7 7 8 3 2 5 6 4 3 8 4 2 6 8 8 9 4 3 6 7 5 4 9 5 3 7 9 9 10 5 4 7 8 6 5 10 6 4 8 10 10 11 6 5 8 9 7 6 11 7 5 9 11 11 12 7 6 9 10 8 7 12 8 6 10 12 12 13 8 7 10 11 9 8 13 9 7 11 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[4 5 6 7 8 9 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 5 71 8 81 9 1 91 11 7 1 21 41 10 6 51 31 61 4 13 15 72 18 82 19 2 92 12 17 11 22 42 20 16 52 32 62 14 23 25 73 28 83 29 3 93 13 27 21 23 43 30 26 53 33 63 24 33 35 74 38 84 39 4 94 14 37 31 24 44 40 36 54 34 64 34 43 45 75 48 85 49 5 95 15 47 41 25 45 50 46 55 35 65 44 53 55 76 58 86 59 6 96 16 57 51 26 46 60 56 56 36 66 54 63 65 77 68 87 69 7 97 17 67 61 27 47 70 66 57 37 67 64 73 75 78 78 88 79 8 98 18 77 71 28 48 80 76 58 38 68 74 83 85 79 88 89 89 9 99 19 87 81 29 49 90 86 59 39 69 84 93 95 80 98 90 99 10 100 20 97 91 30 50 100 96 60 40 70 94 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[2 12 22 32 42 52 62 72 82 92 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 7 3 8 1 1 2 4 10 5 9 2 2 4 5 12 6 11 3 3 5 9 13 12 13 8 7 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[3 5 6 11 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 2 3 3 1 2 3 4 4 2 3 4 5 5 3 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[2 3 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 7 6 3 1 1 3 10 9 7 6 3 3 6 13 12 9 7 6 6 8 14 14 12 10 7 7 9 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[6 8 9 13 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[13 3 1 1 9 2 4 14 7 5 2 10 6 8 15 11 9 3 11 10 12 16 15 13 4 12 14 16 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[5 6 7 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 15 14 4 8 13 12 10 2 3 6 4 2 5 10 11 6 9 8 12 19 18 6 10 18 16 14 4 5 7 5 3 7 14 16 9 12 11 13 21 19 9 12 20 18 16 6 7 9 6 4 10 16 17 11 13 12 17 24 21 12 13 22 20 19 8 10 10 7 5 13 18 20 14 14 16 18 25 22 13 14 23 21 20 9 12 11 9 6 14 19 22 15 15 17 22 26 26 16 16 25 25 23 10 14 12 11 8 18 20 23 19 17 20 25 27 29 17 17 26 28 26 11 16 13 12 9 20 22 25 22 18 23 26 28 32 20 19 27 30 27 13 18 16 14 10 22 23 26 23 20 25 27 32 33 21 20 30 32 28 15 19 18 16 12 24 25 28 25 21 26 31 33 36 22 21 32 34 32 16 21 19 18 14 26 26 29 28 22 29 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[16 21 22 26 28 29 31 32 34 36 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 6 3 4 4 3 7 5 5 6 5 8 7 6 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[5 6 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 3 11 7 2 9 9 5 12 3 7 8 6 8 4 4 1 8 5 15 9 5 13 14 9 16 6 12 13 10 11 6 7 2 9 6 17 10 6 15 18 11 18 8 14 16 12 13 8 10 3 11 7 18 12 8 16 19 13 20 9 16 17 15 14 10 11 4 13 9 19 14 9 17 20 14 21 10 18 19 17 16 11 12 5 15 10 21 17 11 19 22 16 22 13 19 20 18 18 12 14 6 16 12 23 18 13 21 24 17 25 15 21 23 19 19 14 16 7 17 13 25 19 15 23 26 19 26 17 23 25 21 20 16 18 8 19 14 26 20 16 24 28 21 28 18 25 26 22 22 18 20 9 ];\r\nm=reshape(m,[],9);\r\nv=rank_file(m);\r\nvexp=[1 3 4 5 7 8 9 11 12 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 11 5 14 1 13 8 2 3 11 1 7 10 8 13 5 6 11 15 7 17 3 17 13 5 5 13 2 8 14 10 15 9 11 12 19 8 19 5 20 15 7 7 14 3 10 17 11 16 11 13 16 21 11 21 7 23 16 8 9 17 5 13 19 14 18 13 15 17 23 13 22 8 25 18 10 11 18 6 15 21 16 19 14 16 19 24 15 25 9 26 19 11 13 21 8 16 23 18 23 16 17 23 25 17 28 11 28 21 13 14 24 10 19 24 21 26 17 18 24 27 19 30 13 29 23 15 15 25 11 21 26 23 27 18 19 26 30 20 32 14 32 25 17 17 28 13 23 28 25 29 21 22 ];\r\nm=reshape(m,[],9);\r\nv=rank_file(m);\r\nvexp=[3 7 8 10 11 12 14 16 19 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[111 125 48 41 86 24 61 24 35 119 70 63 49 131 136 102 60 93 49 86 35 51 133 128 115 51 156 162 111 94 119 61 94 41 86 157 139 118 60 166 191 129 119 125 86 105 46 93 176 153 131 82 189 212 189 156 129 111 111 48 131 204 203 192 102 192 237 204 157 131 119 118 63 133 209 224 209 115 203 244 212 162 153 125 139 70 136 224 244 237 128 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[46 82 105 125 166 176 191 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 6 8 4 8 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[2 6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 5 12 8 5 11 8 17 11 9 17 12 20 14 13 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[13 14 20 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 3 1 2 2 2 4 2 3 3 3 5 3 4 4 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 10 13 7 6 12 11 6 12 18 10 10 16 14 10 18 19 12 14 19 18 12 19 22 16 18 22 19 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[3 7 11 13 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[16 18 23 12 1 19 4 13 11 8 11 15 17 10 1 3 19 22 23 26 15 3 26 5 18 12 11 15 19 21 13 4 5 23 23 24 28 17 7 29 9 20 15 13 19 20 22 14 8 11 25 25 29 30 21 10 31 13 23 19 14 20 21 25 19 11 12 28 30 35 35 23 11 36 15 27 20 19 23 26 31 21 12 15 34 33 36 40 26 15 38 19 29 21 20 27 29 32 23 13 18 37 37 38 41 30 16 42 22 33 25 23 31 32 37 25 17 21 39 38 41 44 34 19 46 23 37 28 25 35 36 39 29 18 23 41 42 44 49 35 23 49 26 40 30 28 36 38 41 31 19 26 46 ];\r\nm=reshape(m,[],9);\r\nv=rank_file(m);\r\nvexp=[7 9 13 15 17 20 22 24 29 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 2 8 4 6 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[6 8 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 22 22 11 20 3 9 8 18 16 10 14 13 13 29 33 17 28 8 15 13 28 23 20 21 24 17 34 34 22 32 9 22 15 31 29 24 27 26 21 39 42 24 35 10 27 20 38 31 29 29 34 23 45 45 26 44 13 29 24 43 39 31 34 39 28 52 53 31 48 18 32 28 48 43 35 38 44 29 56 56 34 53 22 34 33 52 45 39 42 45 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[3 8 11 14 16 20 22 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[65 76 101 87 2 90 117 2 65 35 36 10 44 103 81 45 40 86 22 84 98 144 134 10 120 168 22 98 43 40 24 61 137 102 79 52 127 24 99 108 147 144 35 136 179 36 121 54 54 40 74 161 132 96 74 137 43 119 141 157 186 44 142 188 40 144 74 74 52 92 208 169 113 92 184 61 151 159 191 216 45 168 213 53 168 88 96 73 97 230 174 137 113 199 79 190 201 222 217 65 211 236 65 190 121 99 98 144 236 205 168 119 206 84 205 208 260 229 76 235 267 81 201 132 108 102 169 246 208 174 141 224 98 206 224 268 265 90 259 274 86 211 137 136 127 184 267 235 199 142 259 120 217 229 272 272 101 265 281 87 222 144 147 134 186 294 260 216 157 268 144 236 246 294 281 117 267 302 103 236 161 179 137 208 302 267 230 188 274 168 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[53 73 88 97 137 151 159 168 191 213 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[18 9 15 18 3 13 21 7 6 9 5 11 12 15 10 19 12 18 20 5 15 22 8 7 11 7 14 14 17 12 27 17 21 24 7 22 27 14 8 14 11 19 18 24 17 30 20 23 25 9 24 29 17 12 17 12 21 21 27 20 33 21 25 26 12 27 31 19 14 18 14 22 22 28 21 34 24 29 31 15 29 32 22 18 21 15 25 27 32 23 35 27 32 34 18 31 36 24 20 24 17 26 28 34 25 38 30 34 35 21 32 38 27 22 27 19 31 33 36 29 ];\r\nm=reshape(m,[],8);\r\nv=rank_file(m);\r\nvexp=[3 6 9 10 11 13 15 18 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[2 2 4 4 4 5 ];\r\nm=reshape(m,[],2);\r\nv=rank_file(m);\r\nvexp=[4 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 14 4 13 10 8 5 10 7 14 15 5 14 20 18 11 12 11 15 22 7 18 24 20 12 15 14 18 25 8 24 28 24 14 20 18 22 30 10 28 30 25 15 24 20 ];\r\nm=reshape(m,[],5);\r\nv=rank_file(m);\r\nvexp=[4 7 10 13 14 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[7 3 10 7 9 14 3 9 7 15 14 11 19 6 14 9 19 17 17 20 7 15 14 24 20 19 24 10 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[6 9 11 19 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[14 7 33 34 30 19 29 23 15 30 9 3 18 3 16 7 25 25 21 18 9 39 35 37 22 32 24 19 33 11 7 21 7 17 9 27 30 23 23 11 45 43 40 27 36 27 24 38 16 12 25 9 20 15 35 35 32 24 18 48 44 43 28 38 31 27 39 20 16 28 14 24 17 37 36 36 28 19 54 46 50 34 46 34 29 41 25 18 29 15 27 21 38 41 37 31 22 57 50 51 37 50 37 34 45 27 23 34 19 28 24 43 46 41 36 23 60 57 56 46 54 41 41 56 35 25 37 21 36 30 53 49 49 38 27 64 66 58 50 55 43 46 61 36 29 38 25 37 32 55 53 54 43 33 67 71 66 51 61 45 50 66 40 30 41 30 39 37 58 56 56 48 35 73 73 71 57 66 50 54 67 45 33 46 34 44 39 64 57 60 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[12 15 16 23 24 27 32 35 38 43 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 8 12 6 3 3 11 13 7 8 4 14 12 17 8 4 4 14 16 9 10 5 16 15 19 11 6 7 17 18 11 14 9 21 18 22 15 8 8 19 22 14 18 12 22 19 24 16 11 11 22 23 17 21 14 23 22 26 19 13 12 24 26 18 22 17 ];\r\nm=reshape(m,[],6);\r\nv=rank_file(m);\r\nvexp=[4 5 8 10 14 16 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 5 3 1 4 3 6 4 3 5 5 8 6 4 8 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 4 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[40 3 25 39 38 3 5 63 16 49 73 52 5 22 72 38 53 80 53 25 52 81 40 72 81 80 39 63 ];\r\nm=reshape(m,[],4);\r\nv=rank_file(m);\r\nvexp=[16 22 49 73 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[3 2 2 1 3 4 3 3 2 4 5 4 4 3 5 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[1 2 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 10 2 8 8 1 9 1 6 4 11 2 4 11 13 3 9 10 2 11 2 8 5 13 3 5 14 14 5 12 11 4 13 4 10 6 16 5 6 15 16 8 13 13 6 15 6 12 10 17 8 10 17 18 9 14 14 8 17 8 13 11 19 10 12 18 20 11 17 17 9 18 9 15 13 21 11 14 20 22 13 18 19 10 21 11 16 14 22 13 16 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[6 8 10 12 13 15 17 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 5 9 2 7 13 2 8 6 7 6 4 9 14 8 16 4 10 16 4 14 8 12 10 6 12 16 10 18 5 11 17 6 15 10 13 11 8 13 17 11 19 6 13 19 7 17 11 15 13 10 14 19 13 21 7 15 20 9 19 13 17 14 12 17 20 16 23 8 17 22 11 20 15 19 17 14 19 23 17 24 9 19 24 13 22 18 20 19 16 21 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[4 6 8 10 12 14 16 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[11 6 11 10 14 16 13 8 12 9 3 3 7 13 16 17 7 6 5 20 12 18 15 25 26 21 18 20 13 6 5 15 23 27 29 11 9 9 22 14 21 20 28 29 24 21 23 17 7 6 16 24 29 32 14 12 11 26 17 26 23 31 37 32 24 29 19 9 7 19 27 34 37 16 15 13 27 20 29 26 33 40 35 26 30 24 10 8 23 29 37 40 21 18 15 31 21 31 27 35 41 36 29 33 26 11 11 26 33 38 43 22 20 18 33 23 33 29 37 44 38 30 34 27 12 13 29 34 40 46 24 23 20 36 24 35 33 40 47 40 35 37 31 13 14 32 38 42 47 28 25 21 40 25 38 37 44 49 42 38 40 34 15 16 35 41 46 48 29 27 23 41 29 43 40 47 52 47 40 46 37 16 17 37 44 49 52 32 29 26 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[15 23 25 35 38 40 41 44 46 48 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[14 11 6 9 7 14 2 13 9 17 12 2 3 19 14 10 13 10 17 5 17 11 19 14 3 7 22 19 11 16 11 18 7 21 13 21 16 6 10 23 21 13 18 16 22 9 22 18 25 21 9 11 28 23 16 21 19 26 12 26 21 28 23 11 14 31 26 18 22 21 29 14 29 22 30 26 13 17 32 28 21 25 22 31 17 30 23 32 28 14 19 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[5 7 10 13 14 17 19 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[15 15 21 3 7 11 25 22 5 18 9 11 3 16 19 29 12 25 18 18 20 26 7 10 12 28 23 10 20 11 15 5 21 22 34 19 28 22 21 24 30 11 11 14 33 28 12 23 14 16 9 26 24 39 22 30 27 23 28 33 15 15 16 34 34 18 25 21 23 11 29 29 40 24 35 30 24 31 34 18 19 22 37 39 20 26 23 25 12 34 33 41 26 43 38 28 37 39 19 20 24 43 45 22 31 24 29 15 41 37 47 33 49 43 29 39 43 21 21 26 45 50 26 34 30 33 16 43 41 49 34 51 47 30 43 47 25 22 27 50 52 28 38 33 34 18 45 43 58 37 55 50 34 44 50 26 23 28 52 55 31 39 35 37 22 47 45 59 39 58 54 35 47 51 29 28 30 55 59 34 43 39 40 25 49 49 63 41 63 58 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[26 31 35 37 39 44 47 54 55 58 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1 9 5 2 11 15 6 3 15 1 8 17 3 2 18 11 8 12 7 2 13 8 5 14 17 10 6 16 2 12 19 8 5 20 12 11 15 10 3 18 13 6 20 25 13 11 23 3 15 24 11 8 26 20 18 21 15 5 21 16 8 23 29 16 13 28 6 17 29 13 10 30 25 22 26 19 7 23 17 10 24 30 19 15 30 8 22 32 15 12 31 26 24 28 22 8 26 21 11 27 35 22 18 33 9 24 34 18 13 37 29 26 31 23 11 29 23 12 31 38 25 20 37 11 26 40 20 14 39 31 27 34 24 13 32 26 15 33 39 26 21 38 12 28 42 23 15 42 34 31 37 28 15 35 28 17 38 40 29 23 40 15 30 43 25 16 45 37 33 39 30 18 37 29 20 39 43 30 24 45 17 31 48 26 19 48 40 34 42 32 ];\r\nm=reshape(m,[],10);\r\nv=rank_file(m);\r\nvexp=[13 15 23 26 28 32 33 37 38 42 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[5 9 9 5 3 7 13 12 7 5 13 17 17 12 9 ];\r\nm=reshape(m,[],3);\r\nv=rank_file(m);\r\nvexp=[3 5 9 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[13 6 8 11 8 4 2 1 10 3 10 5 7 18 7 11 15 11 5 4 2 14 4 12 8 9 21 11 15 19 12 10 5 5 17 8 18 10 13 25 15 19 22 15 12 7 8 20 11 20 11 17 28 20 25 25 17 17 9 10 23 14 27 13 23 30 22 28 28 19 19 11 11 25 15 29 15 25 32 25 30 29 20 21 12 13 27 18 32 18 28 ];\r\nm=reshape(m,[],7);\r\nv=rank_file(m);\r\nvexp=[1 3 4 6 7 8 10 ];\r\nassert(isequal(vexp,v))\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"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":"2016-04-18T02:50:28.000Z","updated_at":"2016-04-18T04:20:27.000Z","published_at":"2016-04-18T03:42:32.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/4304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rd1A 2016 Rank and File\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the small case with max N=10\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 is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.\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 [M], matrix of size [2*N-1,N] of all rows and columns of H except one\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 [V], the missing vector of H not included in M\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 [M] [V]\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 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6] \\n[22 222;2 22;2 22][22 222]]]\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:t\u003eGJam 2016 Rd1A Matlab results show three qualifiers for Rd2.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e With max N=10 it is possible to brute force the 50 puzzles. Persistent may be useful with the usage of nchoosek which may be the critical path.\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=\\\"https://www.go-hero.net/jam/16/solutions/1/2/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Rank_file solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Writing the general solution for N=50 is better for the contest. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution.\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\"}]}"},{"id":1934,"title":"GJam 2014 China Rd B: Sudoku Checker","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku\u003e. Large Case.\r\n\r\nThe Goal is determine if the Sudoku square is valid. Each row and column  must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\r\n\r\n\r\n*Input:* [M], NxN matrix (3^2\u003c=N\u003c=6^2)\r\n\r\n*Output:* TF, 1=Valid, 0=Invalid\r\n\r\n*Examples:*\r\n\r\n  TF=1\r\n  5 3 4 6 7 8 9 1 2\r\n  6 7 2 1 9 5 3 4 8\r\n  1 9 8 3 4 2 5 6 7\r\n  8 5 9 7 6 1 4 2 3\r\n  4 2 6 8 5 3 7 9 1\r\n  7 1 3 9 2 4 8 5 6\r\n  9 6 1 5 3 7 2 8 4\r\n  2 8 7 4 1 9 6 3 5\r\n  3 4 5 2 8 6 1 7 9\r\n  \r\n  TF=0\r\n  5 3 4 6 7 8 9 1 2\r\n  6 7 2 1 9 5 3 4 8\r\n  1 9 8 3 4 2 5 6 7\r\n  8 5 9 7 6 1 4 2 3\r\n  4 2 6 8 999 3 7 9 1\r\n  7 1 3 9 2 4 8 5 6\r\n  9 6 1 5 3 7 2 8 4\r\n  2 8 7 4 1 9 6 3 5\r\n  3 4 5 2 8 6 1 7 9\r\n\r\n\r\n*Contest Performance:* Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p0\"\u003eGJam 2014 China Sudoku\u003c/a\u003e. Large Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine if the Sudoku square is valid. Each row and column  must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], NxN matrix (3^2\u0026lt;=N\u0026lt;=6^2)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF, 1=Valid, 0=Invalid\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eTF=1\r\n5 3 4 6 7 8 9 1 2\r\n6 7 2 1 9 5 3 4 8\r\n1 9 8 3 4 2 5 6 7\r\n8 5 9 7 6 1 4 2 3\r\n4 2 6 8 5 3 7 9 1\r\n7 1 3 9 2 4 8 5 6\r\n9 6 1 5 3 7 2 8 4\r\n2 8 7 4 1 9 6 3 5\r\n3 4 5 2 8 6 1 7 9\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eTF=0\r\n5 3 4 6 7 8 9 1 2\r\n6 7 2 1 9 5 3 4 8\r\n1 9 8 3 4 2 5 6 7\r\n8 5 9 7 6 1 4 2 3\r\n4 2 6 8 999 3 7 9 1\r\n7 1 3 9 2 4 8 5 6\r\n9 6 1 5 3 7 2 8 4\r\n2 8 7 4 1 9 6 3 5\r\n3 4 5 2 8 6 1 7 9\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\u003c/p\u003e","function_template":"function TF=Sudoku_CH(m)\r\n TF=0;\r\nend","test_suite":"%%\r\nzm=[13 4 3 6 1 8 7 10 5 12 11 14 9 16 15 2 ;2 5 8 7 6 9 12 11 10 13 16 15 14 1 4 3 ;15 14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 ;16 11 10 9 4 15 14 13 8 3 2 1 12 7 6 5 ;1 8 7 10 5 12 11 14 9 16 15 2 13 4 3 6 ;6 9 12 11 10 13 16 15 14 1 4 3 2 5 8 7 ;3 2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 ;4 15 14 13 8 3 2 1 12 7 6 5 16 11 10 9 ;5 12 11 14 9 16 15 2 13 4 3 6 1 8 7 10 ;10 13 16 15 14 1 4 3 2 5 8 7 6 9 12 11 ;7 6 9 4 11 10 13 8 15 14 1 12 3 2 5 16 ;8 3 2 1 12 7 6 5 16 11 10 9 4 15 14 13 ;9 16 15 2 13 4 3 6 1 8 7 10 5 12 11 14 ;14 1 4 3 2 5 8 7 6 9 12 11 10 13 16 15 ;11 10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 ;12 7 6 5 16 11 10 9 4 15 14 13 8 3 2 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 ;20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 ;27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 ;34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 ;35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 ;12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 ;13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 ;26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 ;33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 ;4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 ;5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 ;18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 ;19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 ;32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 ;3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 28 26 13 24 11 4 33 32 19 30 17 10 ;10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 ;11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 ;24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 ;25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 ;2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 ;9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 ;16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 ;17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 ;30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 ;31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 ;8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 ;15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 ;22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 ;23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 ;36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 ;1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 ;14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 ;21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 ;28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 ;29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 ;6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[5 8 7 10 9 12 11 14 13 16 15 2 1 4 3 6 ;14 13 13 11 2 1 16 15 6 5 4 3 10 9 8 7 ;3 6 1 4 7 10 5 8 11 14 9 12 15 2 13 16 ;16 15 2 9 4 3 6 13 8 7 10 1 12 11 14 5 ;9 12 11 14 13 16 15 2 1 4 3 6 5 8 7 10 ;2 1 16 15 6 5 4 3 10 9 8 7 14 13 12 11 ;7 10 5 8 11 14 9 12 15 2 13 16 3 6 1 4 ;4 3 6 13 8 7 10 1 12 11 14 5 16 15 2 9 ;13 16 15 2 1 4 3 6 5 8 7 10 9 12 11 14 ;6 5 4 3 10 9 8 7 14 13 12 11 2 1 16 15 ;11 14 9 12 15 2 13 16 3 6 1 4 7 10 5 8 ;8 7 10 1 12 11 14 5 16 15 2 9 4 3 6 13 ;1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 2 ;10 9 8 7 14 13 12 11 2 1 16 15 6 5 4 3 ;15 2 13 16 3 6 1 4 7 10 5 8 11 14 9 12 ;12 11 14 5 16 15 2 9 4 3 6 13 8 7 10 1 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[5 12 3 14 9 16 7 2 13 4 11 6 1 8 15 10 ;6 9 4 11 10 13 8 16 14 1 12 3 2 5 16 7 ;7 10 1 16 11 14 5 4 15 2 9 8 3 6 13 12 ;8 15 2 13 12 3 6 1 16 7 10 5 4 11 14 9 ;9 16 7 2 13 4 11 6 1 8 15 10 5 12 3 14 ;10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 11 ;11 14 5 4 15 2 9 8 3 6 13 12 7 10 1 16 ;12 3 6 1 16 7 10 5 4 11 14 9 8 15 2 13 ;13 4 11 6 1 8 15 10 5 12 3 14 9 16 7 2 ;14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 15 ;15 2 9 8 3 6 13 12 7 10 1 16 11 14 5 4 ;16 7 10 5 4 11 14 9 8 15 2 13 12 3 6 1 ;1 8 15 10 5 12 3 14 9 16 7 2 13 4 11 6 ;2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 3 ;3 6 13 12 7 10 1 16 11 14 5 4 15 2 9 8 ;4 11 14 9 8 15 2 13 12 3 6 1 16 7 10 5 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 3 8 4 6 2 7 9 5 ;2 7 6 5 1 9 8 4 3 ;9 5 4 3 8 7 6 2 1 ;4 6 2 7 9 5 1 3 8 ;5 1 9 8 4 3 2 7 6 ;3 8 7 6 2 1 9 5 4 ;7 9 5 1 3 8 4 6 2 ;8 4 3 2 7 6 5 1 9 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 ;14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 ;3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 ;16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 ;23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 ;30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 ;1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 ;20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 ;9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 ;22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 ;29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 ;36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 ;7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 ;26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 29 9 14 25 6 29 34 15 20 31 12 35 4 21 ;15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 ;28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 ;35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 ;6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 ;13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 ;32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 ;21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 ;34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 ;5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 ;12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 ;19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 ;2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 ;27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 ;4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 ;11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 ;18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 ;25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 ;8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 ;33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 ;10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 ;17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 ;24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 12 7 14 5 16 11 2 9 4 15 6 13 8 3 10 ;10 13 16 3 14 2 4 7 2 5 8 11 6 9 12 15 ;15 2 5 8 3 6 9 12 7 10 13 16 11 14 1 4 ;4 11 6 9 8 15 10 13 12 3 14 1 16 7 2 5 ;5 16 11 2 9 4 15 6 13 8 3 10 1 12 7 14 ;14 1 4 7 2 5 8 11 6 9 12 15 10 13 16 3 ;3 6 9 12 7 10 13 16 11 14 1 4 15 2 5 8 ;8 15 10 13 12 3 14 1 16 7 2 5 4 11 6 9 ;9 4 15 6 13 8 3 10 1 12 7 14 5 16 11 2 ;2 5 8 11 6 9 12 15 10 13 16 3 14 1 4 7 ;7 10 13 16 11 14 1 4 15 2 5 8 3 6 9 12 ;12 3 14 1 16 7 2 5 4 11 6 9 8 15 10 13 ;13 8 3 10 1 12 7 14 5 16 11 2 9 4 15 6 ;6 9 12 15 10 13 16 3 14 1 4 7 2 5 8 11 ;11 14 1 4 15 2 5 8 3 6 9 12 7 10 13 16 ;16 7 2 5 4 11 6 9 8 15 10 13 12 3 14 1 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 ;26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 ;27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 ;22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 ;5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 ;24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 ;13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 ;32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 ;33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 ;28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 ;11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 ;30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 ;19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 ;2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 ;3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 ;34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 ;17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 ;36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 ;25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 ;8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 ;9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 ;4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 ;23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 ;6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 ;31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 ;14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 ;15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 ;10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 ;29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 ;12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 ;1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 ;20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 ;21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 ;16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 ;35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 ;18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 8 11 2 5 12 15 6 9 16 3 10 13 4 7 14 ;14 9 12 7 2 13 16 11 6 1 4 15 10 5 8 3 ;3 10 13 4 7 14 1 8 11 2 5 12 15 6 9 16 ;16 15 6 5 4 3 10 9 8 7 14 13 12 11 2 1 ;5 12 15 6 9 16 3 10 13 4 7 14 1 8 11 2 ;2 13 16 11 6 1 4 15 10 5 8 3 14 9 12 7 ;7 14 1 8 11 2 5 12 15 6 9 16 3 10 13 4 ;4 3 10 9 8 7 14 13 12 11 2 1 16 15 6 5 ;9 16 3 10 13 4 7 14 1 8 11 2 5 12 15 6 ;6 1 4 15 10 5 8 3 14 9 12 7 2 13 16 11 ;11 2 5 12 15 6 9 16 3 10 13 4 7 14 1 8 ;8 7 14 13 12 11 2 1 16 15 6 5 4 3 10 9 ;13 4 7 14 1 8 11 2 5 12 15 6 9 16 3 10 ;10 5 8 3 14 9 12 7 2 13 16 11 6 1 4 15 ;15 6 9 16 3 10 13 4 7 14 1 8 11 2 5 12 ;12 11 2 1 16 15 6 5 4 3 10 9 8 7 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 ;20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 ;3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 ;10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 ;11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 ;12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 ;13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 ;26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 ;9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 ;16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 ;17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 ;18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 ;19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 ;32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 ;15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 ;22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 ;23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 ;24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 ;25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 ;2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 ;21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 ;28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 ;29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 ;30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 ;31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 ;8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 ;27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 ;34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 ;35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 ;36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 ;1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 ;14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 ;33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 ;4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 ;5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 ;6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 3 8 1 6 2 4 9 5 ;2 1 6 5 4 9 8 7 3 ;9 5 4 3 8 7 6 2 1 ;1 6 2 4 9 5 7 3 8 ;5 4 9 8 7 3 2 1 6 ;3 8 7 6 2 1 9 5 4 ;4 9 6 7 3 8 1 6 2 ;8 7 3 2 1 6 5 4 9 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 16 3 2 13 4 7 6 1 8 11 10 5 12 15 14 ;6 13 4 15 10 1 8 3 14 5 12 7 2 9 16 11 ;11 14 1 12 15 2 5 16 3 6 9 4 7 10 13 8 ;8 7 10 5 12 11 14 9 16 15 2 13 4 3 6 1 ;13 4 7 6 1 8 11 10 5 12 15 14 9 16 3 2 ;10 1 8 3 14 5 12 7 2 9 16 11 6 13 4 15 ;15 2 5 16 3 6 9 4 7 10 13 8 11 14 1 12 ;12 11 14 9 16 15 2 13 4 3 6 1 8 7 10 5 ;1 8 11 10 5 12 15 14 9 16 3 2 13 4 7 6 ;14 5 12 7 2 9 16 11 6 13 4 15 10 1 8 3 ;3 6 9 4 7 10 13 8 11 14 1 12 15 2 5 16 ;16 15 2 13 4 3 6 1 8 7 10 5 12 11 14 9 ;5 12 15 14 9 16 3 2 13 4 7 6 1 8 11 10 ;2 9 16 11 6 13 4 15 10 1 8 3 14 5 12 7 ;7 10 13 8 11 14 1 12 15 2 5 16 3 6 9 4 ;4 3 6 1 8 7 10 5 12 11 14 9 16 15 2 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 ;22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 ;3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 ;4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 ;15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 ;21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 ;2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 ;8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 ;9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 ;20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 ;1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 ;7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 ;13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 ;14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 ;25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 ;6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 ;12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 ;18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 ;19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 ;5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 ;11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 ;17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 ;23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 ;24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 ;10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 ;17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 ;8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 ;19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 ;5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 ;6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 ;22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 ;13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 ;24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 ;10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 ;11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 ;2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 ;18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 ;4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 ;15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 ;16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 ;7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 ;23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 ;9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 ;20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 ;21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 ;12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 ;3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 ;14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 ;25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 ;20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 ;33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 ;4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 ;35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 ;18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 ;7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 ;26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 ;3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 ;10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 ;5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 ;24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 ;13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 ;32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 ;9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 ;16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 ;11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 ;30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 ;19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 ;2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 ;15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 ;22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 ;17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 ;36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 ;25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 ;8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 ;21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 ;28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 ;23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 ;6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 ;31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 ;14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 ;27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 ;34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 ;29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 ;12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[4 3 8 7 6 2 1 9 5 ;2 1 9 5 4 3 8 7 6 ;6 5 7 9 8 1 3 2 4 ;7 6 2 1 9 5 4 3 8 ;5 4 3 8 7 6 2 1 9 ;9 8 1 3 2 4 6 5 7 ;1 9 5 4 3 8 7 6 2 ;8 7 6 2 1 9 5 4 3 ;3 2 4 6 5 7 9 8 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 9 8 4 3 2 7 6 5 ;2 7 6 5 1 9 8 4 3 ;3 5 4 6 8 7 9 2 1 ;4 3 2 7 6 5 1 9 8 ;5 1 9 8 4 3 2 7 6 ;6 8 7 9 2 1 3 5 4 ;7 6 5 1 9 8 4 3 2 ;8 4 3 2 7 6 5 1 9 ;9 2 1 3 5 4 6 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 ;7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 ;23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 ;9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 ;15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 ;16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 ;12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 ;3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 ;14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 ;20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 ;21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 ;17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 ;8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 ;19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 ;25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 ;1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 ;22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 ;13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 ;24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 ;5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 ;6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 ;2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 ;18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 ;4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 ;10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 ;8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 ;21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 ;10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 ;5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 ;36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 ;7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 ;14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 ;27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 ;16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 ;11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 ;6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 ;13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 ;20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 ;33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 ;22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 ;17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 ;12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 ;19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 ;26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 ;3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 ;28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 ;23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 ;18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 ;25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 ;32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 ;9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 ;34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 ;29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 ;24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 ;31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 ;2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 ;15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 ;4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 ;35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 ;30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 ;2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 ;3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 ;22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 ;5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 ;6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 ;19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 ;8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 ;9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 ;28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 ;11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 ;12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 ;25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 ;14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 ;15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 ;34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 ;17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 ;18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 ;31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 ;20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 ;21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 ;4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 ;23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 ;24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 ;1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 ;26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 ;27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 ;10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 ;29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 ;30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 ;7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 ;32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 ;33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 ;16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 ;35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 ;36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[429 428 430 432 431 433 426 434 427 ;427 426 434 430 429 428 433 432 431 ;431 433 432 434 427 426 428 430 429 ;432 431 433 426 434 427 429 428 430 ;430 429 428 433 432 431 427 426 434 ;434 427 426 428 430 429 431 433 432 ;426 434 427 429 428 430 432 431 433 ;433 432 431 427 426 434 430 429 428 ;428 430 429 431 433 432 434 427 426 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 ;20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 ;15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 ;34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 ;29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 ;6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 ;13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 ;26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 ;21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 ;4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 ;35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 ;12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 ;19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 ;32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 ;27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 ;10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 ;5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 ;18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 ;25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 ;2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 ;33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 ;16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 ;11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 ;24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 ;31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 ;8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 ;3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 23 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 ;22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 ;17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 ;30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 ;1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 ;14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 ;9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 ;28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 ;23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 ;36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 ;22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 ;18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 ;14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 ;25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 ;1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 ;2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 ;23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 ;19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 ;5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 ;6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 ;7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 ;3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 ;24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 ;10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 ;11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 ;12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 ;8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 ;4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 ;15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 ;16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 ;17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 ;13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 ;9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 ;20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 ;14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 ;3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 ;16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 ;29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 ;36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 ;25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 ;20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 ;9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 ;22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 ;35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 ;6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 ;31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 ;26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 ;15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 ;28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 ;5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 ;12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 ;1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 ;32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 ;21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 ;34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 ;11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 ;18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 ;7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 ;2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 ;27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 ;4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 ;17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 ;24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 ;13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 ;8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 ;33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 ;10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 ;23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 ;30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 6 8 1 9 2 4 3 5 ;2 1 3 5 4 6 8 7 9 ;9 5 4 3 8 7 6 2 1 ;1 9 2 4 3 5 7 6 8 ;5 4 6 8 7 9 2 1 3 ;3 8 7 6 2 1 9 5 4 ;4 3 5 7 6 8 1 9 2 ;8 7 9 2 1 3 5 4 6 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 ;8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 ;21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 ;34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 ;23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 ;36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 ;7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 ;14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 ;27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 ;4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 ;29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 ;6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 ;13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 ;20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 ;33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 ;10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 ;35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 ;12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 ;19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 ;26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 ;3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 ;16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 ;5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 ;18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 ;25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 ;32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 ;9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 ;22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 ;11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 ;24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 ;31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 ;2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 ;15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 ;28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 ;17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 ;30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 16 3 10 13 4 7 14 1 8 11 2 5 12 15 6 ;2 13 4 15 6 1 8 3 10 5 12 7 14 9 16 11 ;7 6 1 12 11 10 5 16 15 14 9 4 3 2 13 8 ;8 11 14 5 12 15 2 9 16 3 6 13 4 7 10 1 ;13 4 7 14 1 8 11 2 5 12 15 6 9 16 3 10 ;6 1 8 3 10 5 12 7 14 9 16 11 2 13 4 15 ;11 10 5 16 15 14 9 4 3 2 13 8 7 6 1 12 ;12 15 2 9 16 3 6 13 4 7 10 1 8 11 14 5 ;1 8 11 2 5 12 15 6 9 16 3 10 13 4 7 14 ;10 5 12 7 14 9 16 11 2 13 4 15 6 1 8 3 ;15 14 9 4 3 2 13 8 7 6 1 12 11 10 5 16 ;16 3 6 13 4 7 10 1 8 11 14 5 12 15 2 9 ;5 12 15 6 9 16 3 10 13 4 7 14 1 8 11 2 ;14 9 16 11 2 13 4 15 6 1 8 3 10 5 12 7 ;3 2 13 8 7 6 1 12 11 10 5 16 15 14 9 4 ;4 7 10 1 8 11 14 5 12 15 2 9 16 3 6 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 ;22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 ;3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 ;4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 ;10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 ;6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 ;2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 ;8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 ;9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 ;15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 ;11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 ;7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 ;13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 ;14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 ;20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 ;16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 ;12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 ;18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 ;19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 ;25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 ;21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 ;17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 ;23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 ;24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 ;5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[13 8 15 6 1 12 3 10 5 16 7 14 9 4 11 2 ;14 5 4 3 2 9 8 7 6 13 12 11 10 1 16 15 ;7 2 9 12 11 6 13 16 15 10 1 4 3 14 5 8 ;16 11 10 1 4 15 14 5 8 3 2 9 12 7 6 13 ;1 12 3 10 5 16 7 14 9 4 11 2 13 8 15 6 ;2 9 8 7 6 13 12 11 10 1 16 15 14 5 4 3 ;11 6 13 16 15 10 1 4 3 14 5 8 7 2 9 12 ;4 15 14 5 8 3 2 9 12 7 6 13 16 11 10 1 ;5 16 7 14 9 4 11 2 13 8 15 6 1 12 3 10 ;6 13 12 11 10 1 16 15 14 5 4 3 2 9 8 7 ;15 10 1 4 3 14 5 8 7 2 10 12 11 6 13 16 ;8 3 2 9 12 7 6 13 16 11 10 1 4 15 14 5 ;9 4 11 2 13 8 15 6 1 12 3 10 5 16 7 14 ;10 1 16 15 14 5 4 3 2 9 8 7 6 13 12 11 ;3 14 5 8 7 2 9 12 11 6 13 16 15 10 1 4 ;12 7 6 13 16 11 10 1 4 15 14 5 8 3 2 9 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 ;7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 ;8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 ;19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 ;20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 ;1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 ;12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 ;13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 ;24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 ;25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 ;6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 ;17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 ;18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 ;4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 ;5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 ;11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 ;22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 ;23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 ;9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 ;10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 ;16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 ;2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 ;3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 ;14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 ;15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 8 7 6 13 12 11 10 1 16 15 14 5 4 3 2 ;14 1 4 11 2 5 8 15 6 9 12 3 10 13 16 7 ;3 2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 ;12 15 10 13 16 3 14 1 4 7 2 5 8 11 6 9 ;13 12 11 10 1 16 15 14 5 4 3 2 9 8 7 6 ;2 5 8 15 6 9 12 3 10 13 16 7 14 1 4 11 ;7 6 9 4 11 10 13 8 15 14 1 12 3 2 5 16 ;16 3 14 1 4 7 2 5 8 11 6 9 12 15 10 13 ;1 16 15 14 5 4 3 2 9 8 7 6 13 12 11 10 ;6 9 12 3 10 13 16 7 14 1 4 11 2 5 8 15 ;11 10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 ;4 7 2 5 8 11 6 9 12 15 10 13 16 3 14 1 ;5 4 3 2 9 8 7 6 13 12 11 10 1 16 15 14 ;10 13 16 7 14 1 4 11 2 5 8 15 6 9 12 3 ;15 14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 ;8 11 6 9 12 15 10 13 16 3 14 1 4 7 2 5 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 ;8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 ;9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 ;16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 ;35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 ;36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 ;7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 ;14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 ;15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 ;22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 ;5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 ;6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 ;13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 ;20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 ;21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 ;28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 ;11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 ;12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 ;19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 ;26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 ;27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 ;34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 ;17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 ;18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 ;25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 ;32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 ;33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 ;4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 ;23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 ;24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 ;31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 ;2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 ;3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 ;10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 ;29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 ;30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))","published":true,"deleted":false,"likes_count":4,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":66,"test_suite_updated_at":"2013-10-14T05:18:15.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-14T02:09:35.000Z","updated_at":"2025-12-15T20:06:09.000Z","published_at":"2013-10-14T02:26:56.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/2929486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sudoku\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Large Case.\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 Goal is determine if the Sudoku square is valid. Each row and column must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\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 [M], NxN matrix (3^2\u0026lt;=N\u0026lt;=6^2)\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 TF, 1=Valid, 0=Invalid\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\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[TF=1\\n5 3 4 6 7 8 9 1 2\\n6 7 2 1 9 5 3 4 8\\n1 9 8 3 4 2 5 6 7\\n8 5 9 7 6 1 4 2 3\\n4 2 6 8 5 3 7 9 1\\n7 1 3 9 2 4 8 5 6\\n9 6 1 5 3 7 2 8 4\\n2 8 7 4 1 9 6 3 5\\n3 4 5 2 8 6 1 7 9\\n\\nTF=0\\n5 3 4 6 7 8 9 1 2\\n6 7 2 1 9 5 3 4 8\\n1 9 8 3 4 2 5 6 7\\n8 5 9 7 6 1 4 2 3\\n4 2 6 8 999 3 7 9 1\\n7 1 3 9 2 4 8 5 6\\n9 6 1 5 3 7 2 8 4\\n2 8 7 4 1 9 6 3 5\\n3 4 5 2 8 6 1 7 9]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\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\"}]}"},{"id":42769,"title":"GJam March 2016 IOW: Cody's Jams ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard GJam March 2016 Annual I/O for Women Cody's Jam\u003e. This is a mix of the small and large data sets.\r\n\r\nThe GJam story goes that a store is having a 25% off sale and ordered original and sale price labels. Unfortunately the labels came commingled in increasing numeric value. Find the sale prices.\r\n\r\n*Input:* m , Vector length N\u003c=100 with values \u003c=10^9.\r\n\r\n*Output:* v , Vector containing the Sale price tags\r\n\r\n*Examples:* [m] [v]\r\n\r\n  [15 20 60 75 80 100] creates v=[15 60 75]\r\n  [9 9 12 12 12 15 16 20] creates v=[9 9 12 15]\r\n \r\n\r\n*Google Code Jam 2016 Open Qualifier: April 8, 2016*\r\n\r\nComplete Code Jam Input/Output included in Test Suite.\r\nThe women's competition had 500 entrants. The qualifier winner was USA Stacy992 using Java. The top 60 show strength in USA, Russia, China, and South Korea under \u003chttp://code.google.com/codejam/contest/8274486/scoreboard?c=8274486# Contest Dashboard\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard\"\u003eGJam March 2016 Annual I/O for Women Cody's Jam\u003c/a\u003e. This is a mix of the small and large data sets.\u003c/p\u003e\u003cp\u003eThe GJam story goes that a store is having a 25% off sale and ordered original and sale price labels. Unfortunately the labels came commingled in increasing numeric value. Find the sale prices.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e m , Vector length N\u0026lt;=100 with values \u0026lt;=10^9.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e v , Vector containing the Sale price tags\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [m] [v]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[15 20 60 75 80 100] creates v=[15 60 75]\r\n[9 9 12 12 12 15 16 20] creates v=[9 9 12 15]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/b\u003e\u003c/p\u003e\u003cp\u003eComplete Code Jam Input/Output included in Test Suite.\r\nThe women's competition had 500 entrants. The qualifier winner was USA Stacy992 using Java. The top 60 show strength in USA, Russia, China, and South Korea under \u003ca href = \"http://code.google.com/codejam/contest/8274486/scoreboard?c=8274486#\"\u003eContest Dashboard\u003c/a\u003e.\u003c/p\u003e","function_template":"function v=CodyJams(m)\r\n% m is increasing value vector of length 2L\r\n% v is length L vector of Sale Price Tags\r\n v=[];\r\nend","test_suite":"%%\r\nm=[15 20 60 75 80 100 ];\r\nv=CodyJams(m);\r\nvexp=[15 60 75 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[9 9 12 12 12 15 16 20 ];\r\nv=CodyJams(m);\r\nvexp=[9 9 12 15 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[480 640 1047 1396 1638 2184 2481 3308 ];\r\nv=CodyJams(m);\r\nvexp=[480 1047 1638 2481 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[495 660 1953 2559 2604 2685 3412 3580 ];\r\nv=CodyJams(m);\r\nvexp=[495 1953 2559 2685 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[384 512 1005 1340 2037 2716 2973 3964 ];\r\nv=CodyJams(m);\r\nvexp=[384 1005 2037 2973 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[270624780 336144033 360833040 448192044 736130808 745857189 981507744 994476252 ];\r\nv=CodyJams(m);\r\nvexp=[270624780 336144033 736130808 745857189 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[147 196 267 330 356 440 810 1080 ];\r\nv=CodyJams(m);\r\nvexp=[147 267 330 810 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[222 296 1533 1767 2044 2356 2541 3388 ];\r\nv=CodyJams(m);\r\nvexp=[222 1533 1767 2541 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[450 600 804 1072 1137 1497 1516 1996 ];\r\nv=CodyJams(m);\r\nvexp=[450 804 1137 1497 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[1788 2384 2697 2967 2991 3596 3956 3988 ];\r\nv=CodyJams(m);\r\nvexp=[1788 2697 2967 2991 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4131 5508 7344 7803 8397 8667 9792 10404 11196 11556 13872 14553 14742 14928 15408 17631 18496 19404 19656 19904 20544 20925 21816 23508 23598 23949 25872 26208 27900 29088 31344 31464 31932 34496 34944 37200 38784 41792 41952 42576 49600 51712 55936 56768 7440174 8148762 8601471 8837667 9290376 9664353 9920232 9920232 10865016 10865016 11468628 11468628 11783556 11783556 12387168 12387168 12885804 12885804 13187610 13226976 13226976 13443489 14309541 14486688 14486688 15291504 15291504 15711408 15711408 16516224 16516224 17181072 17181072 17583480 17583480 17635968 17635968 17924652 17924652 19079388 19079388 19315584 19315584 20388672 20388672 20948544 20948544 22021632 22021632 22908096 22908096 23444640 23444640 23514624 23514624 23899536 23899536 25439184 25439184 25754112 25754112 27184896 27184896 27931392 29362176 29362176 30544128 30544128 31259520 31259520 31352832 31352832 31866048 31866048 33918912 33918912 34338816 34338816 36246528 36246528 39149568 39149568 40725504 40725504 41679360 41679360 41803776 41803776 42488064 42488064 45225216 45225216 45785088 45785088 48328704 48328704 52199424 52199424 54300672 54300672 55572480 55572480 55738368 55738368 56650752 56650752 60300288 60300288 61046784 61046784 64438272 64438272 69599232 69599232 72400896 72400896 74096640 74096640 74317824 74317824 75534336 75534336 80400384 80400384 81395712 81395712 85917696 85917696 92798976 92798976 96534528 96534528 98795520 98795520 99090432 100712448 100712448 107200512 107200512 108527616 108527616 114556928 123731968 128712704 131727360 131727360 134283264 134283264 142934016 142934016 144703488 144703488 175636480 179044352 190578688 192937984 ];\r\nv=CodyJams(m);\r\nvexp=[4131 7344 7803 8397 8667 13872 14553 14742 14928 15408 17631 20925 21816 23598 23949 25872 26208 31344 37200 38784 41952 42576 7440174 8148762 8601471 8837667 9290376 9664353 9920232 10865016 11468628 11783556 12387168 12885804 13187610 13226976 13443489 14309541 14486688 15291504 15711408 16516224 17181072 17583480 17635968 17924652 19079388 19315584 20388672 20948544 22021632 22908096 23444640 23514624 23899536 25439184 25754112 27184896 29362176 30544128 31259520 31352832 31866048 33918912 34338816 36246528 39149568 40725504 41679360 41803776 42488064 45225216 45785088 48328704 52199424 54300672 55572480 55738368 56650752 60300288 61046784 64438272 69599232 72400896 74096640 74317824 75534336 80400384 81395712 85917696 92798976 96534528 98795520 100712448 107200512 108527616 131727360 134283264 142934016 144703488 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[47652765 63537020 67915215 69349602 72816921 73024614 82232592 90005040 90280239 90553620 92466136 94414812 97089228 97366152 103779192 109643456 111106431 111164235 120006720 120373652 125886416 135665742 136205178 138372256 138890175 141176913 142430418 148141908 148218980 151625514 165274734 180887656 181606904 185186900 186382386 188235884 189907224 191652879 197100096 200131203 202167352 220366312 228636354 230018664 233064210 248509848 252322995 253203684 255537172 262800128 266522562 266752464 266841604 276629997 284197221 289714236 292147407 298051953 304848472 306691552 310752280 315722328 323249112 326482563 331581687 336430660 337604912 341668035 343831008 350075772 355363416 355669952 368839996 377457843 378929628 380744748 386285648 389529876 394930203 397402604 398376315 398670747 400335744 403277814 417169314 420741072 420963104 429730527 430998816 431599908 435310084 437438880 442108916 446485650 455557380 456522042 456986763 458441344 458579964 462594018 466767696 473333373 473409816 498541914 500694354 502642542 502680435 503277124 507659664 526573604 531168420 531512730 531560996 533780992 537703752 554512398 556085664 556225752 559312521 560988096 572974036 575466544 576554121 582854961 583251840 595314200 603269448 608696056 609315684 609830100 611439952 616792024 622311657 630908808 631111164 631213088 640087608 662978055 664722552 666189831 667592472 668044893 670190056 670240580 670949520 676510731 678398706 680890563 683321925 683396070 686473173 698833314 701501745 704706354 706326441 708683640 712094160 717827469 719130264 721789842 730229028 732531111 739232499 739349864 740488395 741447552 743207979 745750028 747639918 768738828 777139948 804359264 813106800 829748876 841211744 853450144 883970740 888253108 890726524 894599360 902014308 904531608 907854084 911095900 911194760 915297564 931777752 935335660 939608472 941768588 949458880 957103292 958840352 962386456 973638704 976708148 985643332 987317860 990943972 996853224 ];\r\nv=CodyJams(m);\r\nvexp=[47652765 67915215 69349602 72816921 73024614 82232592 90005040 90280239 94414812 103779192 111106431 111164235 135665742 136205178 138890175 141176913 142430418 151625514 165274734 186382386 191652879 197100096 200131203 228636354 230018664 233064210 252322995 253203684 266522562 266752464 276629997 284197221 289714236 292147407 298051953 315722328 323249112 326482563 331581687 341668035 343831008 350075772 377457843 380744748 394930203 398376315 398670747 400335744 403277814 417169314 420741072 429730527 431599908 437438880 446485650 456522042 456986763 458579964 462594018 473333373 473409816 498541914 500694354 502642542 502680435 531512730 554512398 556085664 559312521 576554121 582854961 603269448 609830100 622311657 630908808 640087608 662978055 666189831 668044893 670949520 676510731 678398706 680890563 683321925 683396070 686473173 698833314 701501745 704706354 706326441 712094160 717827469 719130264 721789842 730229028 732531111 739232499 740488395 743207979 747639918 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% function GJam_IOW_2016a\r\n% % \r\n% fn='A-large-practice.in';\r\n% %fn='A-small-practice.in';\r\n% [data] = read_file(fn); % create cell array\r\n% \r\n% fidG = fopen('A-large-output.out', 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has N rows of cases\r\n%  v = Rd1A(data{i});\r\n%  m=data{i};\r\n%  \r\n%  fprintf(fidG,'Case #%i:',i);\r\n%  fprintf(fidG,' %i',v);fprintf(fidG,'\\n');\r\n%  fprintf('Case #%i:',i);\r\n%  fprintf(' %i',v);fprintf('\\n');\r\n%  \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% end\r\n% \r\n% function v=Rd1A(m)\r\n%  L=length(m);\r\n%  v=zeros(1,L/2);\r\n%  for i=1:L/2\r\n%   vptr=find(m\u003e0,1,'first');\r\n%   v(i)=m(vptr);\r\n%   m(find(m==round(m(vptr)*4/3),1,'first'))=0;\r\n%   m(vptr)=0;\r\n%  end\r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  ptr=ptr+1;\r\n%  fgetl(fid); % Data set countIgnore\r\n%  v=str2num(fgetl(fid)); \r\n%  \r\n%  d{ptr}=v;\r\n%  \r\n% end % feof\r\n%  fclose(fid);\r\n% \r\n% end % read_file\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-13T05:45:39.000Z","updated_at":"2016-03-15T16:31:00.000Z","published_at":"2016-03-13T06:32:23.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/8274486/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Women Cody's Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is a mix of the small and large data sets.\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 store is having a 25% off sale and ordered original and sale price labels. Unfortunately the labels came commingled in increasing numeric value. Find the sale prices.\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 m , Vector length N\u0026lt;=100 with values \u0026lt;=10^9.\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 v , Vector containing the Sale price tags\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 [m] [v]\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[[15 20 60 75 80 100] creates v=[15 60 75]\\n[9 9 12 12 12 15 16 20] creates v=[9 9 12 15]]]\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\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\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\u003eComplete Code Jam Input/Output included in Test Suite. The women's competition had 500 entrants. The qualifier winner was USA Stacy992 using Java. The top 60 show strength in USA, Russia, China, and South Korea under\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/8274486/scoreboard?c=8274486#\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eContest Dashboard\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":44077,"title":"GJam 2017 Kickstart: Vote (Large) ","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/6304486/dashboard#s=p1 GJam 2017 Kickstart Vote\u003e. This is the first 100 large cases with 0\u003c=M\u003cN\u003c=2000.\r\n\r\n\u003chttp://code.google.com/codejam Google Code Jam 2017 Qualifier\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\r\n\r\nThe GJam story is given N and M votes, where N\u003eM, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\r\n\r\n*Input:* [N,M], the quantity of votes to N and M\r\n\r\n*Output:* [V], the ratio of N always leading sequences to total sequences\r\n\r\n*Examples:* [N,M] [V]; [2,1] [0.33333333]\r\n\r\nFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\r\n\r\n*Theory:* Brute force permutations and counting will not succeed in a timely manner for 0\u003c=M\u003cN\u003c=2000 as 2000! may be a bit large. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003chttp://code.google.com/codejam/contest/6304486/scoreboard#vf=1 GJam Kickstart solutions(C++,Python)\u003e. ","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/6304486/dashboard#s=p1\"\u003eGJam 2017 Kickstart Vote\u003c/a\u003e. This is the first 100 large cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=2000.\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2017 Qualifier\u003c/a\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\u003c/p\u003e\u003cp\u003eThe GJam story is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N,M], the quantity of votes to N and M\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [V], the ratio of N always leading sequences to total sequences\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [N,M] [V]; [2,1] [0.33333333]\u003c/p\u003e\u003cp\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=2000 as 2000! may be a bit large. Determining the inherent mathematical pattern is usually the best way to succeed in GJam.   \u003ca href = \"http://code.google.com/codejam/contest/6304486/scoreboard#vf=1\"\u003eGJam Kickstart solutions(C++,Python)\u003c/a\u003e.\u003c/p\u003e","function_template":"function val=vote(N,M)\r\n% 0\u003c=M\u003cN\u003c=2000 Large\r\n% N\u003eM\u003e=0\r\n% Ratio of voter  [sequences sum(N_1:i)\u003esum(M_1:i) for all i] / (N+M)!\r\n val=0;\r\nend","test_suite":"%%\r\nv=vote(821,455);\r\nassert(abs(v-0.286833856)\u003c1e-8)\r\n%%\r\nv=vote(1548,733);\r\nassert(abs(v-0.357299430)\u003c1e-8)\r\n%%\r\nv=vote(858,291);\r\nassert(abs(v-0.493472585)\u003c1e-8)\r\n%%\r\nv=vote(1595,28);\r\nassert(abs(v-0.965495995)\u003c1e-8)\r\n%%\r\nv=vote(1174,995);\r\nassert(abs(v-0.082526510)\u003c1e-8)\r\n%%\r\nv=vote(1476,454);\r\nassert(abs(v-0.529533679)\u003c1e-8)\r\n%%\r\nv=vote(690,333);\r\nassert(abs(v-0.348973607)\u003c1e-8)\r\n%%\r\nv=vote(1230,896);\r\nassert(abs(v-0.157102540)\u003c1e-8)\r\n%%\r\nv=vote(533,149);\r\nassert(abs(v-0.563049853)\u003c1e-8)\r\n%%\r\nv=vote(1941,1758);\r\nassert(abs(v-0.049472830)\u003c1e-8)\r\n%%\r\nv=vote(1976,339);\r\nassert(abs(v-0.707127430)\u003c1e-8)\r\n%%\r\nv=vote(2000,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(398,93);\r\nassert(abs(v-0.621181263)\u003c1e-8)\r\n%%\r\nv=vote(1659,1028);\r\nassert(abs(v-0.234834388)\u003c1e-8)\r\n%%\r\nv=vote(1894,961);\r\nassert(abs(v-0.326795096)\u003c1e-8)\r\n%%\r\nv=vote(1388,874);\r\nassert(abs(v-0.227232538)\u003c1e-8)\r\n%%\r\nv=vote(1354,1149);\r\nassert(abs(v-0.081901718)\u003c1e-8)\r\n%%\r\nv=vote(1778,1287);\r\nassert(abs(v-0.160195759)\u003c1e-8)\r\n%%\r\nv=vote(886,283);\r\nassert(abs(v-0.515825492)\u003c1e-8)\r\n%%\r\nv=vote(1431,822);\r\nassert(abs(v-0.270306258)\u003c1e-8)\r\n%%\r\nv=vote(679,544);\r\nassert(abs(v-0.110384301)\u003c1e-8)\r\n%%\r\nv=vote(1405,1150);\r\nassert(abs(v-0.099804305)\u003c1e-8)\r\n%%\r\nv=vote(1228,379);\r\nassert(abs(v-0.528313628)\u003c1e-8)\r\n%%\r\nv=vote(1607,1129);\r\nassert(abs(v-0.174707602)\u003c1e-8)\r\n%%\r\nv=vote(1265,457);\r\nassert(abs(v-0.469221835)\u003c1e-8)\r\n%%\r\nv=vote(1885,1572);\r\nassert(abs(v-0.090540931)\u003c1e-8)\r\n%%\r\nv=vote(1451,1348);\r\nassert(abs(v-0.036798857)\u003c1e-8)\r\n%%\r\nv=vote(1712,975);\r\nassert(abs(v-0.274283588)\u003c1e-8)\r\n%%\r\nv=vote(921,494);\r\nassert(abs(v-0.301766784)\u003c1e-8)\r\n%%\r\nv=vote(1966,354);\r\nassert(abs(v-0.694827586)\u003c1e-8)\r\n%%\r\nv=vote(1299,536);\r\nassert(abs(v-0.415803815)\u003c1e-8)\r\n%%\r\nv=vote(1872,874);\r\nassert(abs(v-0.363437728)\u003c1e-8)\r\n%%\r\nv=vote(1831,1125);\r\nassert(abs(v-0.238836265)\u003c1e-8)\r\n%%\r\nv=vote(1101,822);\r\nassert(abs(v-0.145085803)\u003c1e-8)\r\n%%\r\nv=vote(1057,526);\r\nassert(abs(v-0.335439040)\u003c1e-8)\r\n%%\r\nv=vote(1761,639);\r\nassert(abs(v-0.467500000)\u003c1e-8)\r\n%%\r\nv=vote(1111,137);\r\nassert(abs(v-0.780448718)\u003c1e-8)\r\n%%\r\nv=vote(445,425);\r\nassert(abs(v-0.022988506)\u003c1e-8)\r\n%%\r\nv=vote(670,362);\r\nassert(abs(v-0.298449612)\u003c1e-8)\r\n%%\r\nv=vote(1009,737);\r\nassert(abs(v-0.155784651)\u003c1e-8)\r\n%%\r\nv=vote(2000,1);\r\nassert(abs(v-0.999000500)\u003c1e-8)\r\n%%\r\nv=vote(1504,28);\r\nassert(abs(v-0.963446475)\u003c1e-8)\r\n%%\r\nv=vote(1821,560);\r\nassert(abs(v-0.529609408)\u003c1e-8)\r\n%%\r\nv=vote(1521,1373);\r\nassert(abs(v-0.051140290)\u003c1e-8)\r\n%%\r\nv=vote(823,361);\r\nassert(abs(v-0.390202703)\u003c1e-8)\r\n%%\r\nv=vote(836,140);\r\nassert(abs(v-0.713114754)\u003c1e-8)\r\n%%\r\nv=vote(1763,1599);\r\nassert(abs(v-0.048780488)\u003c1e-8)\r\n%%\r\nv=vote(1288,162);\r\nassert(abs(v-0.776551724)\u003c1e-8)\r\n%%\r\nv=vote(417,357);\r\nassert(abs(v-0.077519380)\u003c1e-8)\r\n%%\r\nv=vote(1020,122);\r\nassert(abs(v-0.786339755)\u003c1e-8)\r\n%%\r\nv=vote(1617,1576);\r\nassert(abs(v-0.012840589)\u003c1e-8)\r\n%%\r\nv=vote(1493,780);\r\nassert(abs(v-0.313682358)\u003c1e-8)\r\n%%\r\nv=vote(1868,34);\r\nassert(abs(v-0.964248160)\u003c1e-8)\r\n%%\r\nv=vote(1452,1240);\r\nassert(abs(v-0.078751857)\u003c1e-8)\r\n%%\r\nv=vote(2,1);\r\nassert(abs(v-0.333333333)\u003c1e-8)\r\n%%\r\nv=vote(584,242);\r\nassert(abs(v-0.414043584)\u003c1e-8)\r\n%%\r\nv=vote(1610,1196);\r\nassert(abs(v-0.147540984)\u003c1e-8)\r\n%%\r\nv=vote(1423,1296);\r\nassert(abs(v-0.046708349)\u003c1e-8)\r\n%%\r\nv=vote(975,479);\r\nassert(abs(v-0.341127923)\u003c1e-8)\r\n%%\r\nv=vote(1000,80);\r\nassert(abs(v-0.851851852)\u003c1e-8)\r\n%%\r\nv=vote(1227,1035);\r\nassert(abs(v-0.084880637)\u003c1e-8)\r\n%%\r\nv=vote(1812,260);\r\nassert(abs(v-0.749034749)\u003c1e-8)\r\n%%\r\nv=vote(1875,1294);\r\nassert(abs(v-0.183338593)\u003c1e-8)\r\n%%\r\nv=vote(1882,826);\r\nassert(abs(v-0.389955687)\u003c1e-8)\r\n%%\r\nv=vote(1401,1348);\r\nassert(abs(v-0.019279738)\u003c1e-8)\r\n%%\r\nv=vote(1449,494);\r\nassert(abs(v-0.491507977)\u003c1e-8)\r\n%%\r\nv=vote(1807,512);\r\nassert(abs(v-0.558430358)\u003c1e-8)\r\n%%\r\nv=vote(1118,432);\r\nassert(abs(v-0.442580645)\u003c1e-8)\r\n%%\r\nv=vote(1168,184);\r\nassert(abs(v-0.727810651)\u003c1e-8)\r\n%%\r\nv=vote(1421,980);\r\nassert(abs(v-0.183673469)\u003c1e-8)\r\n%%\r\nv=vote(1265,270);\r\nassert(abs(v-0.648208469)\u003c1e-8)\r\n%%\r\nv=vote(1474,1172);\r\nassert(abs(v-0.114134543)\u003c1e-8)\r\n%%\r\nv=vote(606,556);\r\nassert(abs(v-0.043029260)\u003c1e-8)\r\n%%\r\nv=vote(1,0);\r\nassert(abs(v-1.000000000)\u003c1e-8)\r\n%%\r\nv=vote(1543,124);\r\nassert(abs(v-0.851229754)\u003c1e-8)\r\n%%\r\nv=vote(1935,1383);\r\nassert(abs(v-0.166365280)\u003c1e-8)\r\n%%\r\nv=vote(1969,1150);\r\nassert(abs(v-0.262584162)\u003c1e-8)\r\n%%\r\nv=vote(1394,1223);\r\nassert(abs(v-0.065341995)\u003c1e-8)\r\n%%\r\nv=vote(961,203);\r\nassert(abs(v-0.651202749)\u003c1e-8)\r\n%%\r\nv=vote(1453,318);\r\nassert(abs(v-0.640880858)\u003c1e-8)\r\n%%\r\nv=vote(1979,818);\r\nassert(abs(v-0.415087594)\u003c1e-8)\r\n%%\r\nv=vote(333,302);\r\nassert(abs(v-0.048818898)\u003c1e-8)\r\n%%\r\nv=vote(1830,1041);\r\nassert(abs(v-0.274817137)\u003c1e-8)\r\n%%\r\nv=vote(1163,620);\r\nassert(abs(v-0.304542905)\u003c1e-8)\r\n%%\r\nv=vote(1446,514);\r\nassert(abs(v-0.475510204)\u003c1e-8)\r\n%%\r\nv=vote(1229,1116);\r\nassert(abs(v-0.048187633)\u003c1e-8)\r\n%%\r\nv=vote(1590,1215);\r\nassert(abs(v-0.133689840)\u003c1e-8)\r\n%%\r\nv=vote(990,252);\r\nassert(abs(v-0.594202899)\u003c1e-8)\r\n%%\r\nv=vote(948,918);\r\nassert(abs(v-0.016077170)\u003c1e-8)\r\n%%\r\nv=vote(2000,1999);\r\nassert(abs(v-0.000250063)\u003c1e-8)\r\n%%\r\nv=vote(1077,717);\r\nassert(abs(v-0.200668896)\u003c1e-8)\r\n%%\r\nv=vote(1296,801);\r\nassert(abs(v-0.236051502)\u003c1e-8)\r\n%%\r\nv=vote(1807,370);\r\nassert(abs(v-0.660082683)\u003c1e-8)\r\n%%\r\nv=vote(253,218);\r\nassert(abs(v-0.074309979)\u003c1e-8)\r\n%%\r\nv=vote(789,452);\r\nassert(abs(v-0.271555197)\u003c1e-8)\r\n%%\r\nv=vote(1647,203);\r\nassert(abs(v-0.780540541)\u003c1e-8)\r\n%%\r\nv=vote(1807,15);\r\nassert(abs(v-0.983534577)\u003c1e-8)\r\n%%\r\nv=vote(1503,929);\r\nassert(abs(v-0.236019737)\u003c1e-8)\r\n%%\r\nv=vote(1111,266);\r\nassert(abs(v-0.613652869)\u003c1e-8)\r\n%%\r\nv=vote(1534,564);\r\nassert(abs(v-0.462345091)\u003c1e-8)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2017-02-25T22:52:35.000Z","updated_at":"2017-02-25T22:53:48.000Z","published_at":"2017-02-25T22:53:48.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/6304486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2017 Kickstart Vote\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the first 100 large cases with 0\u0026lt;=M\u0026lt;N\u0026lt;=2000.\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:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam 2017 Qualifier\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is March 7, 2017. Typically four challenges with small and large aspects with 27 hours to complete.\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 is given N and M votes, where N\u0026gt;M, determine the number of voting sequences for which N is always in the lead divided by the total number of sequences(N+M)!.\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 [N,M], the quantity of votes to N and M\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 [V], the ratio of N always leading sequences to total sequences\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 [N,M] [V]; [2,1] [0.33333333]\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\u003eFor the case [2,1] there are 6 sequences [N1N2M1,N2N1M1,N1M1N2,N2M1N1,M1N1N2,M1N2N1] with only the first two always having N in the lead.\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Brute force permutations and counting will not succeed in a timely manner for 0\u0026lt;=M\u0026lt;N\u0026lt;=2000 as 2000! may be a bit large. Determining the inherent mathematical pattern is usually the best way to succeed in GJam. \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/6304486/scoreboard#vf=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Kickstart solutions(C++,Python)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\"}]}"},{"id":1903,"title":"GJam 2014 China Rd A: Maze with a Left Hand Rule","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p3 GJam 2014 China Cross the Maze\u003e.\r\n\r\nThe Goal is to minimally traverse a Maze from a Starting Point to Finish Point in less than 10,000 moves where the Bot can only go forward and must maintain its Left Arm in contact with a wall. At the Start Point the Bot can only touch NSEW. After the first move the Bot maintains contact on diagonals. Rotations in a cul-de-sac or turning are not counted as moves.\r\n\r\n\r\n*Input:* [M, Start_Finish] where M is an NxN (0,1=Wall) array and Start_Finish is [Sr,Sc,Fr,Fc]\r\n\r\n*Output:* Path, a string of Movements {N,S,E,W}. If Path is \u003e10,000 moves or No solution return a null string.\r\n\r\n*Examples:*\r\n\r\n  .##.#\r\n  .....\r\n  ...#.\r\n  .###.\r\n  ...#.\r\n  1 1 5 3\r\n\r\nNote: (1,1) is Top Left and start point for this case. \r\n\r\nThe # are replaced by 1s and '.' will be 0s.\r\n\r\nOutput: SEEENSESSSNNNWWSWWSSEE\r\n\r\n*Contest Performance:* Best Delta Time of 17 minutes with only 134 correct solutions in 3 hours.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p3\"\u003eGJam 2014 China Cross the Maze\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Goal is to minimally traverse a Maze from a Starting Point to Finish Point in less than 10,000 moves where the Bot can only go forward and must maintain its Left Arm in contact with a wall. At the Start Point the Bot can only touch NSEW. After the first move the Bot maintains contact on diagonals. Rotations in a cul-de-sac or turning are not counted as moves.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M, Start_Finish] where M is an NxN (0,1=Wall) array and Start_Finish is [Sr,Sc,Fr,Fc]\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Path, a string of Movements {N,S,E,W}. If Path is \u003e10,000 moves or No solution return a null string.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e.##.#\r\n.....\r\n...#.\r\n.###.\r\n...#.\r\n1 1 5 3\r\n\u003c/pre\u003e\u003cp\u003eNote: (1,1) is Top Left and start point for this case.\u003c/p\u003e\u003cp\u003eThe # are replaced by 1s and '.' will be 0s.\u003c/p\u003e\u003cp\u003eOutput: SEEENSESSSNNNWWSWWSSEE\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 17 minutes with only 134 correct solutions in 3 hours.\u003c/p\u003e","function_template":"function Path=Maze_CH(m,sf);\r\n  Path='';;\r\nend","test_suite":"%%\r\ntic\r\nzm=[0 1 ;1 0 ];\r\nzsf=[1 1 2 2 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 1 0 1 ;0 0 0 0 0 ;0 0 0 1 0 ;0 1 1 1 0 ;0 0 0 1 0 ];\r\nzsf=[1 1 5 3 ];\r\nvexp='SEEENSESSSNNNWWSWWSSEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 ;0 1 0 ;0 0 0 ];\r\nzsf=[1 1 3 3 ];\r\nvexp='EESS';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 2 2 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 1 0 1 0 1 ;0 0 0 0 0 0 0 0 ;1 1 1 1 1 1 1 0 ;0 0 0 0 0 0 0 0 ;0 1 0 1 0 1 0 1 ;0 1 1 1 1 1 1 1 ;0 1 0 1 0 1 0 1 ;0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 8 8 ];\r\nvexp='SEENSEENSEENSESSWSNWWSNWWSNWWSSSSEENSEENSEENSE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 1 4 ];\r\nvexp='SSSSSSSSSWWWWWWWWWNNNNNNNNNEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 3 1 ];\r\nvexp='EEEEEEEESESSSSSSSSWWWWWWWWWNNNNNNN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 7 1 ];\r\nvexp='EEEEEEEEESSSSSSSSSWWWWWWWWWNNN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 1 0 0 ;0 0 0 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 1 4 ];\r\nvexp='SSSSSSSSSWWWWWWWWWNNNNNNNNNEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;1 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 1 ;0 0 0 1 0 0 0 0 0 0 ;0 1 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 3 ];\r\nvexp='NNNNNENNWNNEEEEEEEEESSSSSWSSESSWWWWWWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 0 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 1 4 ];\r\nvexp='SSSSSSSSSWWWWWWWWWNNNNNNNNNEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 2 ];\r\nvexp='NNNNNNNNNEEEEEEEEESWSSESSSSSSWWWWWNWWSW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 1 1 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 1 10 ];\r\nvexp='WWWWWWWWWNNNNNNNNNEEWSSEENENEEEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 5 10 ];\r\nvexp='WWWWWWWWWNNNNNNNNNEEEEEEEEESSSS';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 0 0 0 0 0 0 0 ;0 0 0 0 1 0 1 0 0 0 ;0 0 0 0 0 1 0 1 0 1 ;0 0 0 0 1 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 0 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 1 ;0 0 0 1 0 0 0 0 0 0 ;1 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 1 9 1 ];\r\nvexp='SEENEEEEEEESWSSESSSWSSESWWWWWWWWNW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 1 0 0 0 0 0 1 1 ;0 1 0 0 0 1 0 1 1 0 ;0 0 0 1 0 1 0 1 0 1 ;0 0 1 0 1 0 1 0 0 1 ;0 0 0 1 0 0 0 0 0 1 ;0 1 0 0 1 0 0 1 1 1 ;0 0 0 1 0 1 0 0 0 1 ;0 1 0 0 0 1 0 0 0 0 ;1 0 0 1 0 0 1 0 0 0 ;0 1 0 1 1 0 0 0 0 1 ];\r\nzsf=[10 1 9 6 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 1 0 0 0 0 0 0 ;0 1 0 0 0 0 1 0 0 0 ;1 0 0 1 0 0 1 0 0 0 ;1 0 0 1 1 0 0 0 0 0 ;0 1 1 0 1 0 1 1 1 0 ;1 1 1 0 0 0 0 0 0 0 ;1 0 0 0 1 0 1 0 0 0 ;1 1 1 1 0 1 0 0 1 0 ;1 1 0 1 1 0 1 1 1 1 ;0 1 1 1 1 0 1 1 1 0 ];\r\nzsf=[1 1 10 6 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 0 0 0 0 0 1 1 ;1 0 0 1 1 0 0 1 0 1 ;0 0 0 1 0 0 0 0 1 0 ;0 0 0 0 1 0 0 0 0 1 ;0 0 1 0 0 1 0 0 0 0 ;0 0 1 0 0 0 1 0 0 0 ;0 0 1 1 1 1 1 1 0 0 ;1 0 0 0 1 0 1 1 1 0 ;1 0 0 0 1 1 0 1 1 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 3 6 ];\r\nvexp='';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 1 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;1 0 0 0 0 0 0 0 0 0 ;1 0 0 1 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ;0 0 1 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 0 0 0 1 0 0 ];\r\nzsf=[10 1 10 3 ];\r\nvexp='NNNNNSESEENNWNWNNWNESEENEEEEEESSSSSSSSSWNNWWSSWWWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 1 0 0 0 0 ;0 0 0 0 0 0 0 1 0 0 ;0 0 0 0 1 0 0 0 0 1 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 1 0 0 0 1 ;0 0 0 0 0 0 0 0 1 0 ;0 0 0 0 0 0 0 1 0 1 ;0 0 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 0 ];\r\nzsf=[1 1 5 3 ];\r\nvexp='EESEENSEENEEESWSSEWSWSWSSEENSESSNWWSWWWWWWWNNNNNEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 0 0 1 1 ;0 1 0 0 0 0 0 1 0 0 ;0 0 0 1 0 0 1 1 0 0 ;0 0 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 1 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 1 0 0 ;0 0 0 0 1 0 0 0 0 0 ];\r\nzsf=[10 10 8 10 ];\r\nvexp='WWWWNWWSWWWNNNNNNNNNEEEEEEEWSWSWSSEENEENNESSSSWWSSEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 1 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;1 0 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 1 1 0 ;0 0 0 0 0 0 1 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 1 0 0 0 0 ;1 0 1 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 10 ];\r\nvexp='ENSEENNWNWWSNNNENENNWWNEEESEENEEEESSSSNWWWSWSSEENESESSS';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 1 0 0 0 0 0 ;1 1 1 0 0 0 1 0 0 0 ;0 0 1 1 1 0 1 0 0 0 ;0 0 0 1 1 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 1 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 1 0 ;0 0 0 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 0 ];\r\nzsf=[10 10 6 10 ];\r\nvexp='WWWWWWNWWSWNNNNNNNESEWSSEENEENNNWWNWWWEEESEENEEEESSSWSSE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 0 ;0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 1 1 0 0 1 ;0 0 0 0 0 0 0 1 0 0 ;1 0 0 0 0 1 0 0 1 0 ;0 0 0 0 0 0 0 0 0 1 ;0 0 0 1 1 0 1 0 0 0 ;0 1 1 1 0 0 0 1 0 0 ;0 0 0 0 1 0 1 0 0 0 ];\r\nzsf=[1 10 6 2 ];\r\nvexp='SSWSSESNWNWNNWWSWSSEESESESESSWWENNWNWWSSEWSNWENNWWWSWWSSEEEWWWNNNEN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 1 0 0 0 ;0 0 0 1 0 1 0 0 0 0 ;0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 1 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 1 0 1 0 ;0 0 0 0 0 0 0 1 1 0 ;1 1 0 0 0 1 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 0 ];\r\nzsf=[1 10 2 8 ];\r\nvexp='SSSSSSSSSWWWWWWWNWWSNEENNWWNEENNWWNNNEEEEEWSSEWSSEENENN';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[1 0 0 0 0 0 0 0 0 0 ;0 0 0 1 0 0 1 0 0 0 ;1 0 0 0 0 0 0 0 1 0 ;0 0 1 1 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 1 ;1 0 0 0 1 0 0 0 0 0 ;0 0 0 1 0 0 0 0 1 0 ;0 0 1 0 0 1 0 0 0 0 ;0 0 0 0 0 1 0 1 0 0 ;0 0 1 0 0 0 1 0 1 0 ];\r\nzsf=[1 10 1 6 ];\r\nvexp='SSSWSSESSSSNWNWWSNNWWSSSEWWNWWSWNNNENNWNENNWENEEEE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 1 0 0 0 ;0 0 0 0 0 0 1 0 1 0 ;0 0 0 0 0 0 0 0 1 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 1 0 0 0 ;1 0 0 1 0 0 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 1 0 ;0 0 0 0 1 0 0 0 1 0 ];\r\nzsf=[1 1 7 4 ];\r\nvexp='EEEEESSEENNEESSSSSSSSSNNWWSSWWNWWSWWWNNEENNWNWESESE';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 1 0 0 1 1 1 0 1 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 1 0 0 ;0 0 0 1 1 1 0 0 0 0 ;1 1 1 0 0 0 0 0 1 0 ;0 1 0 0 0 1 0 0 0 1 ;0 0 1 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 1 0 0 0 0 ;0 0 0 1 0 0 0 0 0 0 ];\r\nzsf=[10 1 10 5 ];\r\nvexp='NNNNSESEENNWENEEENNWWWNWWSSEWWNNNSEENESEEEENSEENSSSSNWWSSESESSSWWWWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 0 0 0 1 1 0 1 ;0 0 1 0 0 0 0 0 0 0 ;0 1 0 1 0 0 0 0 1 0 ;0 0 0 0 1 0 0 0 0 0 ;0 1 0 0 0 0 0 0 0 1 ;0 0 0 0 1 0 0 1 0 0 ;0 0 0 0 1 0 0 1 0 1 ;0 0 0 0 0 1 0 0 1 0 ;0 0 0 0 0 1 1 0 0 0 ;0 0 1 0 0 0 1 0 0 0 ];\r\nzsf=[10 1 9 2 ];\r\nvexp='NNNNNNNNNEEEEESEEENSESSWSSEWSNNWWSSSESEENSSWWNNWNWNNWWSSSESSEWWNWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzm=[0 0 0 1 0 0 1 0 0 0 ;1 0 0 0 0 1 1 0 0 1 ;0 0 1 1 0 0 0 0 1 0 ;0 1 0 1 0 0 0 0 1 0 ;1 1 0 0 0 0 0 0 0 0 ;1 1 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 ;0 0 1 0 0 0 0 0 0 0 ;1 0 0 0 1 0 0 0 0 1 ;0 0 0 0 0 1 0 1 0 0 ];\r\nzsf=[10 1 8 4 ];\r\nvexp='ENNWNEENNNSEENNNWWWSWSNENNWEESEENEWSSEEENNEEWSWSSSEENNSSSSSWSSEWNWWSNWNWW';\r\nvstr=Maze_CH(zm,zsf);\r\nassert(strcmp(vstr,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":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-30T03:46:21.000Z","updated_at":"2026-02-10T13:15:01.000Z","published_at":"2013-09-30T04:01:29.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/2924486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Cross the Maze\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Goal is to minimally traverse a Maze from a Starting Point to Finish Point in less than 10,000 moves where the Bot can only go forward and must maintain its Left Arm in contact with a wall. At the Start Point the Bot can only touch NSEW. After the first move the Bot maintains contact on diagonals. Rotations in a cul-de-sac or turning are not counted as moves.\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 [M, Start_Finish] where M is an NxN (0,1=Wall) array and Start_Finish is [Sr,Sc,Fr,Fc]\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 Path, a string of Movements {N,S,E,W}. If Path is \u0026gt;10,000 moves or No solution return a null string.\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\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[.##.#\\n.....\\n...#.\\n.###.\\n...#.\\n1 1 5 3]]\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:t\u003eNote: (1,1) is Top Left and start point for this case.\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 # are replaced by 1s and '.' will be 0s.\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\u003eOutput: SEEENSESSSNNNWWSWWSSEE\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 17 minutes with only 134 correct solutions in 3 hours.\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\"}]}"},{"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\"}]}"},{"id":1901,"title":"GJam 2014 China Rd A: Read Phone Number","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number\u003e. Small Case.\r\n\r\nThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively.\r\n\r\n\r\n*Input:* [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\r\n\r\n*Output:* Text, a string of the reading based upon segments\r\n\r\n*Examples:*\r\n\r\n  [Number,Segments]  [Text]\r\n    ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n    ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n    \r\n\r\n*Contest Performance:* Best Delta Time of 11 minutes with 1885 of 3058 able to process the small data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard\"\u003eGJam 2014 China Read Phone Number\u003c/a\u003e. Small Case.\u003c/p\u003e\u003cp\u003eThe Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Text, a string of the reading based upon segments\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Number,Segments]  [Text]\r\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\r\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 11 minutes with 1885 of 3058 able to process the small data set.\u003c/p\u003e","function_template":"function Text = Phone_CH(str,v) %\r\n Text='';\r\nend\r\n\r\n% One method for inserting strings from a cell array\r\nfunction valuestr=Phone_number(x)\r\n valuecell={'zero' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine'};\r\n valuestr=valuecell{x+1};\r\nend\r\n\r\nfunction qtystr=Phone_qty(x)\r\n qtycell={'' 'double' 'triple' 'quadruple' 'quintuple' 'sextuple' 'septuple' 'octuple' 'nonuple' 'decuple'};\r\n qtystr=qtycell{x};\r\nend","test_suite":"%%\r\ntic\r\nzstr='1';\r\nzv=[1 ];\r\nvexp='one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='22';\r\nzv=[2 ];\r\nvexp='double two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='333';\r\nzv=[3 ];\r\nvexp='triple three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4444';\r\nzv=[4 ];\r\nvexp='quadruple four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='55555';\r\nzv=[5 ];\r\nvexp='quintuple five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='666666';\r\nzv=[6 ];\r\nvexp='sextuple six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7777777';\r\nzv=[7 ];\r\nvexp='septuple seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='88888888';\r\nzv=[8 ];\r\nvexp='octuple eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='999999999';\r\nzv=[9 ];\r\nvexp='nonuple nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0000000000';\r\nzv=[10 ];\r\nvexp='decuple zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111';\r\nzv=[1 1 1 1 1 1 1 1 1 1 ];\r\nvexp='one one one one one one one one one one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1111111111';\r\nzv=[1 2 3 4 ];\r\nvexp='one double one triple one quadruple one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6701604014';\r\nzv=[1 4 5 ];\r\nvexp='six seven zero one six zero four zero one four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4096453178';\r\nzv=[8 2 ];\r\nvexp='four zero nine six four five three one seven eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5418148180';\r\nzv=[5 3 2 ];\r\nvexp='five four one eight one four eight one eight zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2319652041';\r\nzv=[8 2 ];\r\nvexp='two three one nine six five two zero four one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9645684646';\r\nzv=[6 2 1 1 ];\r\nvexp='nine six four five six eight four six four six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4508456969';\r\nzv=[5 3 2 ];\r\nvexp='four five zero eight four five six nine six nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1839791609';\r\nzv=[5 1 3 1 ];\r\nvexp='one eight three nine seven nine one six zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9398750802';\r\nzv=[1 1 1 4 2 1 ];\r\nvexp='nine three nine eight seven five zero eight zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5263950835';\r\nzv=[4 5 1 ];\r\nvexp='five two six three nine five zero eight three five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1456187089';\r\nzv=[3 6 1 ];\r\nvexp='one four five six one eight seven zero eight nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='64360690';\r\nzv=[8 ];\r\nvexp='six four three six zero six nine zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7367';\r\nzv=[2 1 1 ];\r\nvexp='seven three six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2441739';\r\nzv=[5 2 ];\r\nvexp='two double four one seven three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7532179';\r\nzv=[1 1 2 2 1 ];\r\nvexp='seven five three two one seven nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0850664';\r\nzv=[3 4 ];\r\nvexp='zero eight five zero double six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='8013334';\r\nzv=[5 2 ];\r\nvexp='eight zero one double three three four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0184088';\r\nzv=[2 1 4 ];\r\nvexp='zero one eight four zero double eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='706181428';\r\nzv=[4 4 1 ];\r\nvexp='seven zero six one eight one four two eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='98530';\r\nzv=[5 ];\r\nvexp='nine eight five three zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='29664';\r\nzv=[5 ];\r\nvexp='two nine double six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='49502';\r\nzv=[2 3 ];\r\nvexp='four nine five zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='15';\r\nzv=[2 ];\r\nvexp='one five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='562640038';\r\nzv=[4 4 1 ];\r\nvexp='five six two six four double zero three eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1148979';\r\nzv=[6 1 ];\r\nvexp='double one four eight nine seven nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='79982';\r\nzv=[3 1 1 ];\r\nvexp='seven double nine eight two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='769';\r\nzv=[3 ];\r\nvexp='seven six nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1742234';\r\nzv=[6 1 ];\r\nvexp='one seven four double two three four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='81818447';\r\nzv=[5 1 1 1 ];\r\nvexp='eight one eight one eight four four seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='5';\r\nzv=[1 ];\r\nvexp='five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='86';\r\nzv=[2 ];\r\nvexp='eight six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0573913609';\r\nzv=[6 1 2 1 ];\r\nvexp='zero five seven three nine one three six zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='497772738';\r\nzv=[1 3 2 3 ];\r\nvexp='four nine double seven seven two seven three eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2252931';\r\nzv=[1 5 1 ];\r\nvexp='two two five two nine three one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='19664';\r\nzv=[3 2 ];\r\nvexp='one nine six six four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='566175';\r\nzv=[5 1 ];\r\nvexp='five double six one seven five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='92433';\r\nzv=[4 1 ];\r\nvexp='nine two four three three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='912039567';\r\nzv=[1 6 2 ];\r\nvexp='nine one two zero three nine five six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4820841';\r\nzv=[5 1 1 ];\r\nvexp='four eight two zero eight four one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='71';\r\nzv=[1 1 ];\r\nvexp='seven one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4690';\r\nzv=[1 1 2 ];\r\nvexp='four six nine zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='106624';\r\nzv=[4 2 ];\r\nvexp='one zero double six two four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7900005';\r\nzv=[6 1 ];\r\nvexp='seven nine quadruple zero five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='407';\r\nzv=[2 1 ];\r\nvexp='four zero seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7738672895';\r\nzv=[8 1 1 ];\r\nvexp='double seven three eight six seven two eight nine five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='027326244';\r\nzv=[2 2 4 1 ];\r\nvexp='zero two seven three two six two four four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='115855';\r\nzv=[2 1 2 1 ];\r\nvexp='double one five eight five five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6553794';\r\nzv=[5 1 1 ];\r\nvexp='six double five three seven nine four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='426185417';\r\nzv=[8 1 ];\r\nvexp='four two six one eight five four one seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='31';\r\nzv=[1 1 ];\r\nvexp='three one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='68';\r\nzv=[1 1 ];\r\nvexp='six eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='05658716';\r\nzv=[4 4 ];\r\nvexp='zero five six five eight seven one six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='87';\r\nzv=[1 1 ];\r\nvexp='eight seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='99329';\r\nzv=[3 2 ];\r\nvexp='double nine three two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='21';\r\nzv=[1 1 ];\r\nvexp='two one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='82';\r\nzv=[1 1 ];\r\nvexp='eight two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3273256549';\r\nzv=[8 1 1 ];\r\nvexp='three two seven three two five six five four nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='4';\r\nzv=[1 ];\r\nvexp='four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0';\r\nzv=[1 ];\r\nvexp='zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='780409';\r\nzv=[4 1 1 ];\r\nvexp='seven eight zero four zero nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='252966140';\r\nzv=[4 3 2 ];\r\nvexp='two five two nine double six one four zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='3416708243';\r\nzv=[10 ];\r\nvexp='three four one six seven zero eight two four three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='715';\r\nzv=[2 1 ];\r\nvexp='seven one five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='714860127';\r\nzv=[7 2 ];\r\nvexp='seven one four eight six zero one two seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='148725';\r\nzv=[4 2 ];\r\nvexp='one four eight seven two five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='130';\r\nzv=[2 1 ];\r\nvexp='one three zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='59696645';\r\nzv=[1 1 1 2 3 ];\r\nvexp='five nine six nine six six four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='221065';\r\nzv=[2 2 2 ];\r\nvexp='double two one zero six five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='57715162';\r\nzv=[2 3 2 1 ];\r\nvexp='five seven seven one five one six two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='110';\r\nzv=[2 1 ];\r\nvexp='double one zero';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7537367';\r\nzv=[1 4 2 ];\r\nvexp='seven five three seven three six seven';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='9526681205';\r\nzv=[6 3 1 ];\r\nvexp='nine five two double six eight one two zero five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='0818593729';\r\nzv=[1 3 2 4 ];\r\nvexp='zero eight one eight five nine three seven two nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='729800081';\r\nzv=[9 ];\r\nvexp='seven two nine eight triple zero eight one';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='2124';\r\nzv=[1 1 1 1 ];\r\nvexp='two one two four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='7045';\r\nzv=[3 1 ];\r\nvexp='seven zero four five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='6317406';\r\nzv=[7 ];\r\nvexp='six three one seven four zero six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='922906835';\r\nzv=[8 1 ];\r\nvexp='nine double two nine zero six eight three five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='55';\r\nzv=[2 ];\r\nvexp='double five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='70985826';\r\nzv=[3 2 1 2 ];\r\nvexp='seven zero nine eight five eight two six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='1619499314';\r\nzv=[8 1 1 ];\r\nvexp='one six one nine four double nine three one four';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='89375';\r\nzv=[1 1 3 ];\r\nvexp='eight nine three seven five';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='655162';\r\nzv=[1 5 ];\r\nvexp='six double five one six two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='180902';\r\nzv=[3 3 ];\r\nvexp='one eight zero nine zero two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='39106';\r\nzv=[5 ];\r\nvexp='three nine one zero six';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='82361352';\r\nzv=[6 2 ];\r\nvexp='eight two three six one three five two';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='39';\r\nzv=[1 1 ];\r\nvexp='three nine';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='63';\r\nzv=[2 ];\r\nvexp='six three';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\n%%\r\nzstr='16748';\r\nzv=[5 ];\r\nvexp='one six seven four eight';\r\nvstr=Phone_CH(zstr,zv);\r\nassert(strcmp(vstr,vexp))\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":13,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-29T21:29:44.000Z","updated_at":"2013-09-29T21:55:08.000Z","published_at":"2013-09-29T21:45:58.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/2924486/dashboard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Read Phone Number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case.\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 Goal is to output a string for the reading of a segmented phone number. When numbers are replicated within a segment the number is preceded by its multiplier. If there are more than 10 repeats in a segment then the number is output for the number of occurrences. Count multipliers are double, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, and decuple for 2 thru 10, respectively.\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 [Number, Segments] where Number is a string and segments is a Vector that sums to the length of Number\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 Text, a string of the reading based upon segments\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\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[[Number,Segments]  [Text]\\n  ['15012233444', [3 4 4]] ['one five zero one double two three three triple four']\\n  ['15012233444', [3 3 5]] ['one five zero one double two double three triple four']]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 11 minutes with 1885 of 3058 able to process the small data set.\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\"}]}"},{"id":2264,"title":"GJam 2011 Africa Qualifier C: House, maximum area rectangle","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/837485/dashboard#s=p2 GJam 2011 Africa: Building a House\u003e.\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003chttp://code.google.com/codejam GJam Registration\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.\r\n\r\nDetermine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks.  Square is a special rectangle.\r\n\r\n*Input:* M, Text Array of GWRST\r\n\r\n*Output:* A, maximum House area that can be placed\r\n\r\n*Example:*\r\n\r\n  GGTGG  A=9\r\n  TGGGG\r\n  GSSGT\r\n  GGGGT\r\n  GWGGG\r\n  RGTRT\r\n  RTGWT\r\n  WTWGR\r\n\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/837485/dashboard#s=p2\"\u003eGJam 2011 Africa: Building a House\u003c/a\u003e.\r\nGoogle Code Jam 2014 Kicks Off its Qualifier round April 11. \u003ca href = \"http://code.google.com/codejam\"\u003eGJam Registration\u003c/a\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.\u003c/p\u003e\u003cp\u003eDetermine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks.  Square is a special rectangle.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e M, Text Array of GWRST\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e A, maximum House area that can be placed\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eGGTGG  A=9\r\nTGGGG\r\nGSSGT\r\nGGGGT\r\nGWGGG\r\nRGTRT\r\nRTGWT\r\nWTWGR\r\n\u003c/pre\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://go-hero.net/jam\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\u003c/p\u003e","function_template":"function A=House(m)\r\n% GRWST: G1 R0 W0 S1 T0    [0 11 16 12 13] on G subtract\r\n A=0;\r\nend","test_suite":"%%\r\nnc=1;\r\nstr='G';\r\nAexp=1;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=2;\r\nstr='GSSG';\r\nAexp=4;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=2;\r\nstr='GTGG';\r\nAexp=2;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=5;\r\nstr='GGTGGTGGGGGSSGTGGGGGRWTRTRTWWTWTWRR';\r\nAexp=9;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=48;\r\nstr='SSGSGSSGGGWSSSGSGGGGGGSGGSGSSGGSGGGSSSSGSSSSSSGSGSSSSGSGGSGSSSGGGGGGSGSGSGSSSSSSSSGGGGGSGGGSGSSSSGGSGSSGSGSSGSSSGSGGGSGSSSGSSGGGGSGSSSSSSGGGSGGGGGGSGSGSSSSGGGSSSGGGGGSGSSSGSGSSGSGGSSSSSSGGSSGGGSGSGGGGSSGGGGSSSSSSGGSGGSGGSGSGGSSGGGGSRGSGGSGSSSSSGSGGSSSSGSGGSSSSGSSSGSGGSSGGGGSSGSSGSSGGSGGSSGSSGSGSGGSGSGGSGGGGGGGGGSGGSGSSSSSGSSSGGGSSSGSSGSGSSGGSGSSGGSGGSGSSSGSGGGSGSSSSSGGSGGGGGGGSSGGSSSSSGGGGSGSSSGGGSSGSGSGGGGGSSSGGSGGGGSSSGGGGGSGSSSSSGGSGSSSTGGSSSSSSSSSGSGRGGSSSGSGGSSGSSGGGSSGGGGGGSGGGSGGSGGGGSGSSSGSGGSSSGGGSGSGSGGGGSSSGGGSSSGSSSGGGGGGGSGSGSSSSSGSSGGSGGSGSGGSGSSGGGSGSSGSSGSSSSGSGGGGGSGGGSGSGSSSSGGSSGGSSGGSSGGGGSSGGGGGGSSSGSSGSSSGGGGSGGGSSGSSSGSSGGGGSSGSGSSGSSGSGGGSGGSSSGGGGSSGGGGSSGGSSGGSSSSGGSGGSGGSGSGSSGGGSGGSSSSGSSSGGGGGGGGGSSSSSGSGSGSSGGGGGGSSSSGGSGGSGSSSSGGSGSSSSSSSGSGGSSGGSGGSSSGSSSSSSGSGGGSSGGSGSGGGGSSGSSGSSGGSGSGSSGSSGGSSGSSGGGGSSGSSSGGGSSSSGGGGSGGSGGSGGGGGGSGGGSGSGGSGGGSSSSSGSSGGGSGSSSGSSGGSGGSSGGSGGSGGSGGSGGSSSGSGGGGGSSSGGGSSGGSSGSSSSSGSSSSSSSGGSGGGGGGGGGSSGSSGGSSGGGGGGSSSGGGGSGGGSSSSSGGSSGSGSSSGSGSGSGGGGGSSGGGSGSGGSWGGSSSGGSGSGGGGSSSSSGSSSSGSSGGGSGGSGSGGGGGSGGGSGSSSGSGSSGGSSGGSSGSGGGGSSGGGGSGGSSGGSGSSSSGSGGGGGGSGSSSGSSSGSSGSSSSSSSGSGGGGSSGGSGGSGSSGSGSSGSGGGGGSSSSSSGGSGSGGGSSGGSSGSSGGGSGGSGGSGGSGSSGGSGGSGGSGGSGSGGGSSGGSSGGSSGSGGSSGGGSSSGGSSSSGGSSGGSSGSSGGSGGGSGSSGGGGSGSSGSGSSSGGGGSSSSGGGGGSRGGGGSGGSSSSSGGSGGGGGSSSSGGGGGSGSGSSSGGGSSSGSGGSSSGSGSSSGGGSGGGGGSGSSSSSGGSSGSGGSSSSGGGGGSSSSSSSSGGGGSGSGGSSSGGGGSGSSSGSGSSSSGSSGSGGSSSSSGGGSSSGGGGSSSSSSGSSSSGGGSGSGSSSSSSSGGGGGSSGGSSGSSGSSGSGGSSSSSGGGGSGSSSGGSSSGSGGGSGGSSSGSSGSGSSGSSSGGSSSGGGGSGSSSGSSSGSGSSSGGGGSGSGGSSGGSGSSGGSSGGGGGSGGSSGSSSGGGSSSSGGGGSSSSGRGSGSSSSGSSGGGSGSGSGSSSSGSGGSSGGGSSGSGGSGGGGSGGGGGSGGGSGGGSSGSSSSSSGGSSGSGSSSGGGGSGGSSSSGSSSGGGGSGSGSGGGGGSGGGSSGGSSSGSGGGSGSSSSSSSSGRSGSSGSGGGSSSGGSSSGGSGGGSGGGSGSGGSGSGGGGGSSSGGSGGGSGGSSSSSSSGGSSSSGSSSGSGSSSSGGGGSGGSSGGGGGGGGGGSSGSGGSGGSGGSSGSGGGGSSGSGGSGGGGSSSSSSSSSTGSSGSGGGSSGGGSGGGGGGGSSGGSSSSGSSGSSGSSGGSSSGSSSSGSGGGGSGSSGSGSSGGGGGSGGGSGGGGSSGSSGSGGSSSSSSSSSGSGGSGGGGGSSSGGGGSSGSGGGGGSGGGSGGGGGSSSGSSSGSSSSSSGGGSSSGSSGSGGGGSGGGGSGSGGSSSSGSGSGSGSGSSGSSSGSSGSGGGSSSSSSGSSGGGSSSSGGSSGSGSSGSSGGSGGGSGSGGSGGGSSSGGGGGGGSSSGSGGGGSG';\r\nAexp=805;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=4;\r\nstr='GSGGGGGSGGGGSGGSGGSSGGSSSGSGGSGSGGGSSSGSGSGSSSSSSSSSSGSGGSGGSSGGGGGGSSSGSGSGSGSSGSSSGGSSGGGGSGGSSGGGGGGSSGGGSGSSSGGGGSSSGGSSSGSS';\r\nAexp=128;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=46;\r\nstr='GSGSSSSGSSGSSGSSGSSSSSSGGSSSSGGSSSSSSSSSGSSGGGGGSSGSGSGSSGGSGGSGSGGSGSSSGGGGSSSSGGGGSSGSSSSSSSGGSSSGGGGGSSSSSGSGSSGSGGSGGSSGGGSGSSSSGSSGSGSSGSSSSSSSSSGGSGSGSSSGSSSGSGGSSGGGGRGGSGGGGGGGSSGSGGGGGGSSSGSSGSGSGGSSGSSGSGSSSGSGGSSGSGGGSGSSSGSGSSSGSSSSSSSGGSGGGSSSGGGSSGGSGSGSGSGSGGGSGGGSSSSGSGGSGGGGGSSSGGGSSSSSGGSGGSSSSSGGSGSGGSGSSGSGSSSGSSSGGSSGSSGSGSGGSGSSGSSSGGGSSGSGSGSSSGSSGGSSSSSSGGSGSSGGSGGGSGSGGSSSGSSGSGTSGSSSSSGSSGGGSSSGSGSRGGGGGGGGGGGGSGSGGGSGSGGSSGSSGGGSGSSSGGSSGSGSGSSSGSGGRSGGGGSGGGSSGSSGSGGGGGGSSGSSGGGSSGGSGSGGSGGSSGGGGSSSSGGSGSSGGSSSGGSSSSSSGGSSSGGSSSSSGGSSSSGGWGSGGSGGGGGGSSSGGGSGSGGSSSSSGGSGSSSSSGGGGSSGSGGSGGSGGGSGSGSGGSGSGSSSGSSSSGGSGGGGGSGSSSGGGSGSSSSSSSGSGSSSSSGGGGGGGSSGGGGGGSSSGGSSSSSSSSGSSGSSGSSSGGGGGSSSGSSGGGGGSGSSSGSGSSSGSSGSSSSSSGSGSGGGGGGSGSGGGGGGSGGGGSGSGGGGSSGSSGGSGGSSSSSGGGSSSGGGGSSGSGGGGGSGGGGSWGSG';\r\nAexp=315;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=48;\r\nstr='SGGSSSGGGSSGGSGSGSSSGSGGSGSGSSGGSSSGSSGGSGSGSSGSSSSGGSGGSGGSSGGGSSSGSGGGSGGSGGSGSSGGSGSSGSSSWGSGGGGSGSSGGGSGGSSGSGGGSGGSSGGGSSGSGGGGSGSSGGSGGGGSGSGSSSSGGGSGGGGSSGGSSGSSGSGSSSGSSGSSGSSSGGSSGGSSGGGGGSGSSSGSSSSSSGSGSGGSSSGSSGSGGSSSGSSSGGSSGSGSSSSSSSSSGSGGGGGGSGSSGSSSSSSGSGSGGSGGGGSGSGSGGSSWGGSGSGSGGSGGGSSGSGGGSSSGSSGSGSSGSGGSSSRRSGSGGGGSGSSSSGGGSSSGSGSGGSSGGSGSGGGSSSGSGSSGGGGSGSGGSGSSGGSGGGSSGGGSSSSSGGSSGGSSSGGGSGSSGGSSGGSSSSSSWSSGSSGGSSGSGSGGSSSSSGSSGSGSSSGSSGSGSGSSSGSSSGSGSSGSSSGSGGGGGSGGSSSSGSGSGGSSSGGGSGGGSSSSSSGSGSSSGSSGSGSSGSSGSGSSSSSSSGSGSSGGGGSSSGSSSGGSGSGGGGSGSSGGSGGSSGSGSGSSSSGSGSSSSGSGGGSSSSGSGGGGGSGSSGSGSGSSSSSGGGSGSGGSGGGGGSSSSGSGSGSSGGGGGGGSGSSSGGGSSGSSSSSSGGSSSSGGGSSGGGSGSGGGGSGGGGSSSGGGGSGSGGGGSSGSSSSSSGSSGSSSSSGSGSSGGGSSSSSSSGGGSSSSGGSGGSSSSSSGGGGSSSSGGSSSGSGSSGSSGGGGSGSGGSGGSGGSSSSGGSSGSGSSSGGSGSGSSSSGGGGSSSSSGRGGSSSSSSSGGGSSGSGSGSSGSGSSSSGGGGSSSGSSGSGSGGGSGGSGSSGGGGGGGSGGGSGGGGGGSGSSSGSSGSSSSSSGSSGSGGSGGSGSSSGSSSGSSGSGGSSGGGSGGGSSSGSGGSGSGGSGGGSSGSGGSGGGGGGSSGSGSSSSGGGSGSSSSSGGSSSSGGGGGSGGGGSSGGGGGGGGGSSSGGGSGRSSGGGSSGGGGSGGSSGGGSSSGGGGSSGGGGGGGSGGGGSGGTGGGSGGSGGSGSGSSSGGSGGSSGGGSGSGSSGGSGSSGGSSGGSSGGSGGSGGSSSSSGGSGGGGGSGGGSSSSSSGGGGSGSSGGGGSSGSGGGGGGSGGGSSGSGSSSGSSSSGGSGGGGGSGGGGGGGGSSSSSGGSSGGGSGSSGSSGGSSSGSGGGGSGGSSSGGSSSSSSGSGGGSSSGSGSGGGSSGGGSSSSGGSSSGSSGGSSSSGGGSSSSSSGSSSSGSSSGGGGSSGSSGSGSGRGSSSSSSGSSSGSSGGSSSGSSSGGSGGSGSSGSSSSSSGSGSSSGSSGGSGSSSGGGSSGSGSSGSSGSGGSGGSGGSSGGSGGSGSGGGGGSGSSGGSSGSGGGSSSSGGSSSSSGGGGRSSSGGGSSSSGGSSGGSSSSGSSSGSSSSSSGSSSGSSGSSGSSGGSSGSSGSGSSSGSGGSGTGRSGGSSSSSGSSSSGGGGSSGGGSGGGGGSSSGSGGGGGSGSSGSGSSSSSSGGGSSSGGGGGSGGSSGSGGGGSTGGGSGGGSSSSSGGSGGSSSSSGSSSSSSSGGGSGGGGGSSSGSSGGGSSGSGGSSSGSSGSSSSSSGGSGSSSSGGGGGSSSGSSGSSSGGGSSSSGGGGSGSGSSSGGSSSSGSGGGGGGSSGSSGSGGSSGGSGGSGGSGGGGGGGGSSSRSGGGGGSSGSSGGGSSGSGGSGGSGSGSGSGSGSSSSSSSGWSSGSGSSGSSGGSGGGGGGGGSSSSGSGGGGSSGGSSGGGGSSGSSSGSGSGSGGGGSSSSSSGGSGSGSSSSSGGGGGGGGSSGGGSGGSGGGSGGSGGGSGGGGGGSGSSGSSSSGSGGGSGGSGGSGGSSGSGSSGGSGGSSGSGGSSSGGSGGGSSSGGSGGGGGGGGSSGGGGGGSGSGSGGGGGGGGSSGGSGSGSSSGSSSGGGGGSSSSGGGGSGGSGGGSGGSSGGSGGSGSGGSGGGSSGSGSSSSSSGSGGGGGGSSGSGSSSGSGGGGGSGGGSGSGSGSSGSGSGGGSGGSSGSSGSGGGSSGGSSGGSSGSSGGSSGGGSSSSSGSSGSGGGSSSGGGGSSGGSSSGSSSSSS';\r\nAexp=646;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=8;\r\nstr='TGGSWGSRRSGWTGGTTSSGSGGGRGSSSGSSSGGGRSRSSSSGSSSSGGGSSGSGSTSSTSGSSGSGSSTS';\r\nAexp=16;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=41;\r\nstr='SSGSGSGGGGSSGSSSGSGGSGSSSGSGGSGGGGSGGSGSSGGSWGSSSSSGSGSSGGSSGSSSGSSGSGGGSGSSGSGGGSGSGGTGSGSGSGGGSSSGSGSSGSSGSGSSGSGSSSGGGGGSSSSSGGSSSGGSSGSSSSSSGGSSGSGSSSSGGGSSGGSGGGGSSGGSGSSGSGGGGGGGGSWSSRSSSSSGGSGSGGSGSSGSSSGGGSGSGGSSGSWSGGSSGGSSSGGGGGSGGSSSGGSSSGSGGSSGGGSSGSSGSGSSWSSSSSSSGGGGGSGGSGSSSSSSTSGSSSSSSGSGWSSGSSSSSGGGSSGSSSGGGGSSSSGSGSGWSSGSGSSGSSSGGSSSGSGSGGGSGSSGGGSSSGGGSGGSGGGSGGGGGGGSSGGGSGSGGGSSSSSRSSGSGSGGGGSGSSSGSGSSGGGGGSSSGSGSGSSGGGGSSSGSSSS';\r\nAexp=144;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\nnc=35;\r\nstr='SSSGGSSSSSSGSSGGGGGGSSGGGGGGGSGGSSGGSGGSGSGGGRSGSSSGSSGSGGTGSGSGGSGSSGSGSGGSGGGGSSSGGGGGGGSGSSGSGGGSGSGGSGSSSGSSSGSSGSSSGGSGSGSSSGGGGGSSSGGGSSSSSSSSGGGSSGGSGSSGGGGGGGGGSGSSSSGGGGGSSGGSGSGSSSGGSSSSSGGGGGSGSRSSGGSGSSGSSSSGSGGGSSGSGSSSSSSSGSGSSSGGG';\r\nAexp=150;\r\nA=House(reshape(str,nc,[])');\r\nassert(isequal(Aexp,A))\r\n%%\r\n% function GJam_Africa_2011C\r\n% %House\r\n% %fn='C-small-practice.in';\r\n% fn='C-large-practice.in';\r\n% [data] = read_file(fn);\r\n% \r\n% %fidG = fopen('C-small-output.out', 'w');\r\n% fidG = fopen('C-large-output.out', 'w');\r\n% tic\r\n% for i=1:size(data,1) % Cell array has N rows of cases\r\n%  A = House(reshape(data{i,2},data{i,1},[])' ) ;% data matrix GWRST \r\n%  toc\r\n% % continue\r\n%    fprintf(fidG,'Case #%i: %i\\n',i,A);\r\n%    fprintf('Case #%i: %i\\n',i,A);\r\n%   \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% fclose(fidC);\r\n% \r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% %Read a numeric of lines to count\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% set=0;\r\n% while ~feof(fid)\r\n%  nrc=str2num(fgetl(fid)); % [nc nr]\r\n%  str='';\r\n%  for i=1:nrc(2)\r\n%   str=[str fgetl(fid)]; % read line of data, convert to vector\r\n%  end\r\n%  set=set+1;\r\n%  d{set,1}=nrc(1); % need to do a transpose after\r\n%  d{set,2}=str;\r\n% end\r\n%  fclose(fid);\r\n% end\r\n% \r\n% function A=House(m)\r\n% % GRWST: G1 R0 W0 S1 T0    [0 11 16 12 13] on G subtract\r\n%  m=m-'G'; % Convert String array to binary\r\n%  m(m==12)=0;\r\n%  m=double(~m);\r\n% \r\n%  [nr,nc]=size(m);\r\n%  A=0;\r\n%  % try all [1:nr,1:nc] overlay convolutions and find max\r\n%  for i=1:nr\r\n%   for j=1:nc\r\n%    if i*j\u003eA % speed enhance, faster than continue continue \r\n%     mc=conv2(m,ones(i,j)); \r\n%     if nnz(mc==i*j) % fastest array compare\r\n%      A=i*j; % Current Max Rectangle\r\n%     end\r\n%    end\r\n%   end % j\r\n%  end % i\r\n%  \r\n% end % House\r\n%\r\n% Data input example\r\n%10\r\n%1 1\r\n%G\r\n%2 2\r\n%GS\r\n%SG\r\n%2 2\r\n%GT\r\n%GG\r\n%8 9\r\n%GGGSGGSG\r\n%RSGGSGGG\r\n%GSSGSGGG\r\n%GGSSSGSS\r\n%SGGGSSRS\r\n%SSWGSSSS\r\n%GGGSSGSG\r\n%SGSSSWGS\r\n%SGSGSSGS\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":20,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-03-31T04:20:54.000Z","updated_at":"2026-01-22T14:29:29.000Z","published_at":"2014-03-31T04:32:30.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/837485/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2011 Africa: Building a House\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Google Code Jam 2014 Kicks Off its Qualifier round April 11.\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\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Registration\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.\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\u003eDetermine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks. Square is a special rectangle.\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 M, Text Array of GWRST\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 A, maximum House area that can be placed\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\u003eExample:\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[GGTGG  A=9\\nTGGGG\\nGSSGT\\nGGGGT\\nGWGGG\\nRGTRT\\nRTGWT\\nWTWGR]]\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:t\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.\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\"}]}"},{"id":1944,"title":"GJam 2014 China Rd B: Dragon Maze","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p3 GJam 2014 China Dragon Maze\u003e. Small Case.\r\n\r\nThe Goal is determine the optimal minimum distance path that maximizes score. Multiple minimum distance paths may exist. Output the score for the path that maximizes the cumulative sum of the path. \r\n\r\nThe input is a vector of Entrance/Exit [ENx,ENy,EXx,EXy] and a Matrix of Points. The Matrix and Entrance/Exit are zero based (Top Left is (0,0)).\r\nEntrance and Exit will be valid. A [-1] in the matrix is a Wall that can not be traversed. Movement is limited to NSEW, no diagonals.\r\n\r\n\r\n*Input:* [VEE] [M], VEE is 1x4 [ENx,ENy,EXx,EXy], Matrix (NRxNC \u003c=10).\r\n\r\n*Output:* [P] maximum Points. If Impossible P=-1;\r\n\r\n*Examples:*\r\n\r\n  [VEE] [M]   [P]\r\n  [0 2 3 2][-1 1 1 2;1 1 1 1;2 -1 -1 1;1 1 1 1] [7]\r\n\r\n \r\n*Contest Performance:* Best Delta Time of 17 minutes with 336 of 2010 able to process the small data set.\r\n\r\n\r\n*Strategy:*\r\n\r\n  1) Check Start/Finish path existence while creating path distances from start. (Suggest offset by +1 to match array). \r\n  2) A ring of Zeros around the array may simplify processing.\r\n  3) My preference is to work from Finish to Start while tracking best scores for the Kth distance from the Start. A few tricks here to only check for valid prior values.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p3\"\u003eGJam 2014 China Dragon Maze\u003c/a\u003e. Small Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine the optimal minimum distance path that maximizes score. Multiple minimum distance paths may exist. Output the score for the path that maximizes the cumulative sum of the path.\u003c/p\u003e\u003cp\u003eThe input is a vector of Entrance/Exit [ENx,ENy,EXx,EXy] and a Matrix of Points. The Matrix and Entrance/Exit are zero based (Top Left is (0,0)).\r\nEntrance and Exit will be valid. A [-1] in the matrix is a Wall that can not be traversed. Movement is limited to NSEW, no diagonals.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [VEE] [M], VEE is 1x4 [ENx,ENy,EXx,EXy], Matrix (NRxNC \u0026lt;=10).\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [P] maximum Points. If Impossible P=-1;\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[VEE] [M]   [P]\r\n[0 2 3 2][-1 1 1 2;1 1 1 1;2 -1 -1 1;1 1 1 1] [7]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 17 minutes with 336 of 2010 able to process the small data set.\u003c/p\u003e\u003cp\u003e\u003cb\u003eStrategy:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Check Start/Finish path existence while creating path distances from start. (Suggest offset by +1 to match array). \r\n2) A ring of Zeros around the array may simplify processing.\r\n3) My preference is to work from Finish to Start while tracking best scores for the Kth distance from the Start. A few tricks here to only check for valid prior values.\r\n\u003c/pre\u003e","function_template":"function P=Dragon_CH(ee,m)\r\n  P=0;\r\nend","test_suite":"%%\r\ntic\r\nzee=[0 0 0 1];\r\nzm=[97 68 ];\r\nvexp=165;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[1 0 0 0];\r\nzm=[11 ;92 ];\r\nvexp=103;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 1 1];\r\nzm=[47 -1 ;-1 41 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[9541 9311 1035 9921 9342 2262 8685 7151 184 8189 ;3885 4455 8295 4011 4030 7427 4325 7756 3404 3014 ;4402 9158 999 4298 6612 1696 5965 1822 9039 12 ;6015 8579 9322 7049 4851 5015 5663 9888 8517 5846 ;4428 2402 6653 9074 2764 682 6500 3440 8437 6256 ;6453 9191 1765 7452 3488 8377 5499 9452 6550 4537 ;5815 8916 9467 1489 5965 4317 2855 1627 556 1372 ;3824 1335 125 476 409 9240 1158 6908 2679 5946 ;9515 9131 5136 1280 2934 8623 6008 8432 4427 8909 ;2968 241 7825 8786 8081 3789 9455 936 1767 10 ];\r\nvexp=135772;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[2307 5590 1345 8783 2418 1753 4374 9927 5012 7052 ;5872 879 2534 7360 2158 1820 5982 4517 251 6760 ;3425 9571 3353 1249 8356 1433 1389 7810 2368 9507 ;4172 1026 1449 1868 9808 3866 3620 533 3792 4983 ;7584 6015 5861 6470 3374 4370 8289 5708 8886 4891 ;8819 2311 813 2171 9911 5521 3604 1300 9682 5971 ;806 3853 6997 2254 5720 3156 2471 5691 3689 2614 ;7026 7624 8629 9238 445 8354 3608 5085 413 8845 ;9976 9232 7507 7140 1402 7418 2660 5005 5069 8694 ;976 5874 8898 7972 4480 4618 7479 3302 6660 1167 ];\r\nvexp=113799;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[5916 -1 5143 4544 9275 5587 9249 9234 672 9662 ;-1 6999 8893 5585 490 6646 9354 9502 1651 4422 ;8195 2626 6647 7092 6949 7478 8061 779 780 1073 ;1946 6695 1109 3440 7590 6735 9026 6838 5968 6049 ;2851 398 3047 8095 2334 3537 4741 1687 9390 6391 ;6108 7584 5368 2754 1027 8668 232 9088 9446 1011 ;6512 7743 4057 3972 1182 1646 707 6560 4835 3026 ;2608 4038 3423 2007 2132 5756 1895 6872 7442 1284 ;9614 9901 8867 1333 2655 6245 6352 9238 1684 2150 ;6600 8195 6244 656 2167 3778 8653 2873 337 3487 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[5898 9296 7524 5673 1302 6008 7780 3196 9231 5222 ;4479 5197 5122 9697 6529 4128 5942 9233 3365 7625 ;7734 9964 5820 3977 6971 4338 7754 5623 3562 4442 ;5462 5811 3738 9337 1483 1391 5344 9263 4587 4575 ;836 5417 9771 2309 1466 2651 6437 7407 8235 6153 ;1383 5968 2469 3554 6297 9439 7891 402 1414 7804 ;4844 6875 3615 4933 2563 1449 6323 7907 7063 7261 ;8833 7898 9030 4955 6559 495 3957 9347 7901 2192 ;5499 5635 4511 4319 9189 807 110 3431 7561 -1 ;1235 8756 4749 4849 3688 7311 6297 6362 -1 9712 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 2 0 9];\r\nzm=[-1 3591 -1 9384 6034 8580 2003 -1 8780 1295 ;5605 1377 2240 559 -1 -1 4017 4895 4437 -1 ;-1 -1 -1 9865 -1 1505 2777 -1 436 8170 ;1900 6344 8059 9498 8256 -1 7952 7551 -1 5927 ;-1 -1 7609 -1 1257 1902 -1 8040 4203 -1 ;1361 2292 1143 769 -1 -1 -1 -1 2197 -1 ;3846 -1 2480 -1 -1 -1 -1 -1 -1 -1 ;4444 -1 6690 489 813 8790 -1 -1 -1 -1 ;3729 5436 -1 8544 -1 -1 -1 -1 -1 -1 ;-1 3743 -1 6213 -1 -1 -1 -1 -1 -1 ];\r\nvexp=85015;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 4 3 9];\r\nzm=[256 -1 6593 -1 4076 -1 8308 8531 8388 1339 ;6280 8079 6556 5099 3523 1967 7424 -1 1469 -1 ;-1 9317 -1 6682 -1 2996 -1 3140 3913 -1 ;2927 2797 -1 9032 9111 -1 1637 5917 -1 5971 ;3285 -1 6158 5977 -1 -1 -1 6944 5424 6439 ;2389 7565 -1 5558 5485 588 -1 -1 4093 -1 ;-1 8297 -1 -1 7995 -1 -1 -1 6639 8591 ;-1 -1 -1 -1 -1 2803 5365 7702 9610 -1 ;-1 -1 -1 -1 -1 6383 -1 -1 8763 3884 ;-1 -1 -1 -1 -1 -1 4980 966 7330 -1 ];\r\nvexp=81434;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 7 0 9];\r\nzm=[9117 4644 7637 2065 8336 9446 7761 9053 -1 3232 ;-1 9846 -1 898 -1 1074 -1 1715 4774 5778 ;-1 8864 -1 -1 5687 9951 5462 -1 4536 -1 ;-1 -1 -1 -1 -1 7870 -1 7507 1777 4773 ;-1 -1 89 3307 79 1280 -1 -1 -1 2898 ;-1 -1 -1 -1 4952 -1 2748 572 1991 5243 ;-1 -1 -1 -1 2706 4551 -1 8752 -1 7862 ;-1 -1 -1 5293 6847 -1 -1 4293 -1 308 ;-1 -1 -1 -1 -1 8374 5932 3627 -1 9426 ;-1 -1 -1 -1 -1 -1 -1 983 -1 3561 ];\r\nvexp=24552;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[9 3 9 0];\r\nzm=[-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 3869 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 7888 2830 -1 -1 -1 -1 -1 -1 ;-1 257 4329 -1 2131 -1 -1 -1 -1 -1 ;-1 2582 -1 6446 8398 -1 -1 6063 6484 -1 ;8837 9043 5373 9819 -1 8087 -1 6474 -1 1335 ;866 -1 4087 -1 424 8975 1557 4839 -1 5800 ;868 7116 -1 6357 8115 -1 8722 -1 1184 5178 ;-1 8558 9689 2863 -1 3838 -1 1762 -1 6184 ;9784 3468 -1 6082 8935 7345 1958 7935 9830 2768 ];\r\nvexp=40444;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[1 2 3 4 5 6 7 8 9 10 ;11 12 13 14 15 16 17 18 19 20 ;21 22 23 24 25 26 27 28 29 30 ;31 32 33 34 35 36 37 38 39 40 ;41 42 43 44 45 46 47 48 49 50 ;51 52 53 54 55 56 57 58 59 60 ;61 62 63 64 65 66 67 68 69 70 ;71 72 73 74 75 76 77 78 79 80 ;81 82 83 84 85 86 87 88 89 90 ;91 92 93 94 95 96 97 98 99 100 ];\r\nvexp=1324;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[1 11 21 31 41 51 61 71 81 91 ;2 12 22 32 42 52 62 72 82 92 ;3 13 23 33 43 53 63 73 83 93 ;4 14 24 34 44 54 64 74 84 94 ;5 15 25 35 45 55 65 75 85 95 ;6 16 26 36 46 56 66 76 86 96 ;7 17 27 37 47 57 67 77 87 97 ;8 18 28 38 48 58 68 78 88 98 ;9 19 29 39 49 59 69 79 89 99 ;10 20 30 40 50 60 70 80 90 100 ];\r\nvexp=1324;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 1 4 1];\r\nzm=[-1 -1 1134 9086 5787 -1 -1 9759 -1 ;-1 5195 1440 5405 6267 9573 4021 -1 -1 ;-1 8437 7138 1518 3828 -1 4927 7037 5390 ;4445 9948 -1 -1 8054 5367 -1 -1 6378 ;2675 6263 1410 8224 1185 1056 6214 -1 -1 ;3465 4891 179 -1 8233 3186 3146 4940 -1 ;9212 -1 622 9232 2128 -1 4591 -1 -1 ;853 2385 8569 3381 -1 31 9357 1202 -1 ;9153 437 481 3041 9860 -1 802 -1 5243 ;-1 3979 1226 -1 3966 8037 -1 7564 -1 ];\r\nvexp=11154;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[6 1 5 4];\r\nzm=[8935 7055 9523 5947 9420 1029 1519 9655 7310 -1 ;5347 6550 956 3676 -1 -1 1605 165 9339 924 ;7608 -1 -1 -1 9106 2457 7428 1436 1464 -1 ;-1 8605 753 3273 -1 5557 -1 4895 86 471 ;6830 5364 -1 -1 -1 8767 -1 -1 1753 8126 ;1440 -1 -1 -1 7917 7380 870 -1 -1 8426 ;9518 1719 246 1756 1823 -1 -1 6500 9647 6158 ;-1 3753 9179 3752 -1 -1 3927 -1 28 8762 ;3442 1154 -1 2977 -1 -1 -1 -1 497 -1 ;5046 4922 8565 5170 9416 7140 4702 5262 5264 8821 ];\r\nvexp=13461;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 9 0 7];\r\nzm=[-1 -1 -1 -1 5591 -1 6865 6361 -1 9574 ;5326 2417 -1 -1 6193 9084 1910 5890 9530 4249 ;5130 -1 -1 -1 2376 -1 -1 3886 8309 1892 ;-1 4623 6047 744 2180 817 6660 2425 2867 4950 ;-1 -1 -1 7617 1260 2832 4751 -1 -1 5698 ;-1 2864 4297 8644 3112 1812 2562 5793 4826 1341 ;737 4961 6790 3341 876 9914 9275 -1 9924 756 ;7283 3200 4971 4962 -1 8083 -1 8819 -1 7409 ;7651 5137 -1 1403 6483 -1 6406 7515 -1 -1 ;7345 1246 2469 3331 251 -1 8029 6777 3210 -1 ];\r\nvexp=43605;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 6 9 8];\r\nzm=[4471 2340 6565 -1 -1 3663 -1 -1 4562 8294 ;8432 -1 -1 383 9745 3207 944 340 7820 3426 ;2977 97 5374 1193 4024 2963 2227 2262 6405 2380 ;4866 6164 3694 178 1313 4376 6297 6060 4583 9330 ;9358 7274 6389 6195 2179 -1 3397 7809 557 2087 ;1977 -1 2617 9973 -1 907 -1 5864 -1 -1 ;-1 6127 2119 7554 3268 7556 -1 4465 1297 3716 ;-1 -1 730 1361 5616 -1 -1 7981 7319 3103 ;-1 -1 6599 4345 -1 5421 7790 4406 876 1764 ;7527 -1 -1 8441 7260 9243 9942 -1 8987 -1 ];\r\nvexp=46698;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[3 5 3 4];\r\nzm=[5297 1690 2134 6500 -1 378 99 -1 7714 7786 ;1895 -1 5584 1030 1354 3108 9637 -1 4744 4892 ;-1 7743 6128 3847 -1 9009 -1 -1 9951 -1 ;9108 2993 -1 4347 2520 1147 3077 8541 5470 2062 ;-1 6534 4545 1801 -1 -1 1137 8521 -1 7866 ];\r\nvexp=3667;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[7 6 4 6];\r\nzm=[199 9295 8751 5145 2157 3343 -1 -1 7184 -1 ;3780 3730 6605 -1 8658 -1 3573 -1 -1 -1 ;6749 6135 -1 7631 -1 4179 -1 -1 4080 -1 ;3592 1382 9020 -1 6831 -1 6736 8383 -1 2258 ;1674 -1 4663 -1 6161 2406 268 -1 931 4237 ;100 6649 6439 -1 -1 5266 3204 4114 5940 5908 ;1230 -1 4134 6819 3172 8035 6784 -1 6391 -1 ;9181 -1 -1 7310 -1 1576 1892 5821 4469 2080 ];\r\nvexp=12148;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 3 2 0];\r\nzm=[290 -1 5107 7466 7064 ;6249 -1 3213 6568 -1 ;1037 -1 4971 4915 -1 ;6851 9043 8163 1379 6540 ;2051 8939 1483 -1 4184 ;7062 137 -1 5275 9462 ;-1 -1 4316 3265 2838 ;-1 -1 1471 9758 7724 ;-1 -1 3883 -1 4987 ;6843 7025 6749 7147 1906 ];\r\nvexp=51934;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[7 2 5 2];\r\nzm=[3900 9521 7343 2759 -1 ;5239 -1 1132 4911 3520 ;1517 9058 -1 -1 -1 ;-1 -1 -1 -1 8097 ;-1 7717 4099 5529 7959 ;-1 6950 9579 5029 -1 ;6687 9672 -1 -1 -1 ;1507 5064 2149 1922 7228 ;-1 8639 6134 -1 933 ;-1 511 -1 -1 744 ];\r\nvexp=33414;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 5 6 0];\r\nzm=[6137 3305 6360 4891 6396 4463 8888 7982 ;7881 -1 4743 6730 360 4945 9032 -1 ;7273 3476 8679 -1 3569 2493 -1 7527 ;5487 562 9739 813 6484 6067 -1 9545 ;-1 5162 -1 4989 8112 -1 8032 1019 ;-1 -1 5009 404 1699 1676 5849 8070 ;1003 4164 2297 4730 4313 6194 5684 -1 ];\r\nvexp=24377;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[9 2 6 7];\r\nzm=[8353 7263 7609 -1 2120 5314 -1 9477 1416 3433 ;-1 590 7657 2619 -1 -1 4684 9284 -1 -1 ;3862 -1 2692 4001 1891 -1 7719 6477 -1 5973 ;-1 8015 -1 -1 148 2255 3535 -1 1866 1644 ;1340 1620 3925 5165 -1 3694 4100 1434 3612 -1 ;7843 -1 -1 1391 7637 -1 5855 -1 7250 9629 ;1768 2379 -1 -1 3330 410 -1 9549 -1 -1 ;9493 9719 4813 1231 -1 -1 -1 5478 -1 5106 ;82 8285 251 6695 8652 -1 4552 79 -1 3502 ;3118 7594 8758 -1 -1 -1 8470 4711 -1 2424 ];\r\nvexp=-1;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[5 4 7 0];\r\nzm=[6808 5848 -1 9349 6503 5045 2772 -1 -1 8778 ;9668 4184 2263 -1 1288 1153 2705 7033 2495 -1 ;5880 2410 -1 7454 -1 2978 2427 4378 -1 4913 ;208 2853 -1 4005 3964 -1 9828 -1 4786 7602 ;-1 -1 -1 -1 -1 329 7985 -1 -1 28 ;-1 -1 -1 -1 4433 4085 9221 6038 7258 3834 ;9013 -1 5560 2745 5061 -1 3495 -1 -1 -1 ;2760 6565 7246 6924 -1 2700 -1 -1 4588 -1 ;9953 4344 8740 -1 152 8435 6756 3520 3078 9535 ;9930 9193 2399 246 4552 5468 -1 -1 -1 -1 ];\r\nvexp=35734;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[4 0 7 0];\r\nzm=[919 3728 6660 -1 5410 4513 8419 6070 482 6421 ;111 -1 4828 8468 -1 3201 -1 4659 -1 4738 ;-1 361 8017 4673 8999 4687 852 -1 7981 -1 ;-1 1520 9557 5945 8837 3767 9832 9775 -1 9935 ;5796 9072 -1 -1 392 341 3808 4109 4905 -1 ;9614 -1 8450 977 247 2107 7400 6786 -1 -1 ;4341 -1 4733 2658 -1 6043 8860 1838 6912 523 ;2432 4045 -1 -1 5361 895 -1 3895 1321 6672 ;2026 5899 1723 1201 1691 9580 1387 -1 -1 1689 ];\r\nvexp=22183;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[1 2 2 1];\r\nzm=[-1 -1 -1 -1 7201 7409 -1 9659 2860 9119 ;-1 9984 7612 9104 607 -1 9877 -1 2932 1986 ;5397 1618 2580 -1 69 2446 -1 -1 1160 7900 ;-1 9269 -1 6227 5896 200 5386 8138 -1 8909 ;7316 1699 -1 3087 -1 -1 -1 4699 -1 3670 ;8428 9133 3314 3461 4829 6483 7198 8227 8516 5217 ;325 54 8642 8561 -1 8582 -1 6678 3552 -1 ;7012 3037 6339 9407 6933 -1 9350 1820 5500 -1 ];\r\nvexp=19214;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 9];\r\nzm=[1505 3402 2754 9713 414 2610 2749 8975 8948 1456 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 8381 ;2838 4740 4009 1596 442 4853 3416 6467 6705 1640 ;9059 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;7197 4825 212 7826 2129 6298 2502 1979 9061 4006 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 1733 ;1814 3718 8498 4423 2818 7472 9722 625 2204 8912 ;5365 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;6212 507 5806 7416 274 8624 4120 1914 7683 7669 ;3090 4246 1846 5219 6895 4347 3549 5955 8352 5281 ];\r\nvexp=259550;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[0 0 9 0];\r\nzm=[4120 8421 130 8543 1238 7601 4616 1863 6156 3527 ;3579 8719 386 9384 6135 7011 4359 6606 5276 8393 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 626 ;8366 2638 2471 3584 5884 6817 3484 8190 5168 8765 ;2310 9940 5246 7204 1178 2847 1819 9392 5354 1698 ;2970 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;4073 8435 8705 6559 1797 3063 9516 7073 1456 142 ;1790 445 2612 1725 6329 9429 5208 4518 948 3972 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 6827 ;888 5570 382 8417 4768 2201 7808 121 250 7129 ];\r\nvexp=243332;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[9 0 0 9];\r\nzm=[4193 5036 5833 7103 6832 8895 6619 3904 350 6760 ;2045 7147 9371 3769 3475 8799 8977 4344 9747 9300 ;7523 6986 4869 7904 5402 9636 104 3209 9757 6705 ;337 301 1740 6169 7404 8572 1415 4022 8827 8117 ;7133 872 5263 6503 4640 8737 1654 3616 9432 7752 ;9268 6954 4737 4136 4858 138 3772 1313 9698 3528 ;8018 6386 180 6109 8906 7583 1032 320 7956 9859 ;8436 5088 7082 50 1591 8073 5138 9596 8041 4570 ;7347 7308 1523 2083 1443 6380 8572 1566 4045 4621 ;1445 2062 1006 1625 4522 9911 5559 5554 230 3515 ];\r\nvexp=137679;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzee=[3 7 3 6];\r\nzm=[-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 2896 5067 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ];\r\nvexp=7963;\r\nv=Dragon_CH(zee,zm);\r\nassert(isequal(v,vexp))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-19T03:06:44.000Z","updated_at":"2026-02-10T13:28:34.000Z","published_at":"2013-10-19T03:25:25.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/2929486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Dragon Maze\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case.\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 Goal is determine the optimal minimum distance path that maximizes score. Multiple minimum distance paths may exist. Output the score for the path that maximizes the cumulative sum of the path.\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 input is a vector of Entrance/Exit [ENx,ENy,EXx,EXy] and a Matrix of Points. The Matrix and Entrance/Exit are zero based (Top Left is (0,0)). Entrance and Exit will be valid. A [-1] in the matrix is a Wall that can not be traversed. Movement is limited to NSEW, no diagonals.\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 [VEE] [M], VEE is 1x4 [ENx,ENy,EXx,EXy], Matrix (NRxNC \u0026lt;=10).\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 [P] maximum Points. If Impossible P=-1;\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\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[[VEE] [M]   [P]\\n[0 2 3 2][-1 1 1 2;1 1 1 1;2 -1 -1 1;1 1 1 1] [7]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 17 minutes with 336 of 2010 able to process the small data set.\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\u003eStrategy:\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) Check Start/Finish path existence while creating path distances from start. (Suggest offset by +1 to match array). \\n2) A ring of Zeros around the array may simplify processing.\\n3) My preference is to work from Finish to Start while tracking best scores for the Kth distance from the Start. A few tricks here to only check for valid prior values.]]\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\"}]}"},{"id":44082,"title":"Recycled Numbers (CodeJam Qualification Round 2012)","description":"Let's say a pair of distinct positive integers ( _n_ , _m_ ) is recycled if you can obtain _m_ by moving some digits \r\nfrom the back of _n_ to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that _n_ and _m_ must have the same number of digits in order to be a recycled pair. Neither _n_ nor _m_ can have leading zeros.\r\n\r\nGiven integers *A* and *B* with the same number of digits and no leading zeros, how many *distinct* recycled pairs ( _n_ , _m_ ) are there with *A* ≤ _n_ \u003c _m_ ≤ *B* ? \r\n\r\nBe careful, it is more tricky than you might first think...","description_html":"\u003cp\u003eLet's say a pair of distinct positive integers ( \u003ci\u003en\u003c/i\u003e , \u003ci\u003em\u003c/i\u003e ) is recycled if you can obtain \u003ci\u003em\u003c/i\u003e by moving some digits \r\nfrom the back of \u003ci\u003en\u003c/i\u003e to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that \u003ci\u003en\u003c/i\u003e and \u003ci\u003em\u003c/i\u003e must have the same number of digits in order to be a recycled pair. Neither \u003ci\u003en\u003c/i\u003e nor \u003ci\u003em\u003c/i\u003e can have leading zeros.\u003c/p\u003e\u003cp\u003eGiven integers \u003cb\u003eA\u003c/b\u003e and \u003cb\u003eB\u003c/b\u003e with the same number of digits and no leading zeros, how many \u003cb\u003edistinct\u003c/b\u003e recycled pairs ( \u003ci\u003en\u003c/i\u003e , \u003ci\u003em\u003c/i\u003e ) are there with \u003cb\u003eA\u003c/b\u003e ≤ \u003ci\u003en\u003c/i\u003e \u0026lt; \u003ci\u003em\u003c/i\u003e ≤ \u003cb\u003eB\u003c/b\u003e ?\u003c/p\u003e\u003cp\u003eBe careful, it is more tricky than you might first think...\u003c/p\u003e","function_template":"function y = recycled_numbers(a,b)\r\n  y = x;\r\nend","test_suite":"%%\r\na=1;\r\nb=9;\r\ny_correct = 0;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=10;\r\nb=40;\r\ny_correct = 3;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=1111;\r\nb=2222;\r\ny_correct = 287 ; %:)\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=21;\r\nb=31;\r\ny_correct = 0;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=1;\r\nb=9;\r\ny_correct = 0;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\na=104;\r\nb=989;\r\nassert(isequal(recycled_numbers(a,b),781))\r\n%%\r\na=10;\r\nb=99;\r\ny = 36;\r\nassert(isequal(recycled_numbers(a,b),y))\r\n%%\r\nassert(isequal(recycled_numbers(100,999),801))\r\n%%\r\na=1000;\r\nb=9999;\r\ny_correct = 12060;\r\nassert(isequal(recycled_numbers(a,b),y_correct))\r\n%%\r\nb=484;\r\na=954;\r\nassert(isequal(recycled_numbers(b,a),203))\r\n%%\r\na=159887;\r\nb=195662;\r\ncorrect = 2058;\r\nassert(isequal(recycled_numbers(a,b),correct))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":5390,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":23,"test_suite_updated_at":"2017-03-09T12:41:35.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-03-09T11:10:22.000Z","updated_at":"2025-12-05T12:51:14.000Z","published_at":"2017-03-09T11:21:54.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\u003eLet's say a pair of distinct positive integers (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ) is recycled if you can obtain\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e by moving some digits from the back of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e must have the same number of digits in order to be a recycled pair. Neither\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e nor\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e can have leading zeros.\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\u003eGiven integers\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eA\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e with the same number of digits and no leading zeros, how many\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003edistinct\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e recycled pairs (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ) are there with\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eA\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ≤\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u0026lt;\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e ≤\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eBe careful, it is more tricky than you might first think...\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\"}]}"},{"id":42290,"title":"GJam 2015 Rd1B: Noisy Neighbors","description":"This Challenge is derived from \u003chttps://code.google.com/codejam/contest/8224486/dashboard#s=p1 GJam 2015 Rd 1B: Noisy Neighbors\u003e. Fastest completion - 8 minutes.\r\n\r\nDetermine minimum number of adjacencies for N placed people in an RxC hotel matrix\r\n\r\nInput: m, an RxC zeros array; N number of rooms to be filled\r\n\r\nOutput: NN, minimum number of common walls\r\n\r\nExamples: Small Case 1\u003c=R*C\u003c=16, 0\u003c=N\u003c=R*C\r\n\r\n  [1 1 1;1 0 1;1 1 1] has minimum 8 common walls vs [1 1 1;1 1 1;1 1 0] has 10 common\r\n  [1;0;0;1] has 0 common walls\r\n  ones(2,3) has 7 common walls\r\n\r\n\r\nTheory: The small case can be solved with brute force using vector set with nchoosek followed by processing of convolutions. The large case has 10000 rooms making brute force hopeless.\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://www.go-hero.net/jam/15 Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"https://code.google.com/codejam/contest/8224486/dashboard#s=p1\"\u003eGJam 2015 Rd 1B: Noisy Neighbors\u003c/a\u003e. Fastest completion - 8 minutes.\u003c/p\u003e\u003cp\u003eDetermine minimum number of adjacencies for N placed people in an RxC hotel matrix\u003c/p\u003e\u003cp\u003eInput: m, an RxC zeros array; N number of rooms to be filled\u003c/p\u003e\u003cp\u003eOutput: NN, minimum number of common walls\u003c/p\u003e\u003cp\u003eExamples: Small Case 1\u0026lt;=R*C\u0026lt;=16, 0\u0026lt;=N\u0026lt;=R*C\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 1 1;1 0 1;1 1 1] has minimum 8 common walls vs [1 1 1;1 1 1;1 1 0] has 10 common\r\n[1;0;0;1] has 0 common walls\r\nones(2,3) has 7 common walls\r\n\u003c/pre\u003e\u003cp\u003eTheory: The small case can be solved with brute force using vector set with nchoosek followed by processing of convolutions. The large case has 10000 rooms making brute force hopeless.\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://www.go-hero.net/jam/15\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\u003c/p\u003e","function_template":"function NN = Noisy_Neighbors(m,N)\r\n% m is an RxC zeros array\r\n% N is number of cells to be occupied\r\n% NN is number of edge adjacencies\r\n% Goal is to minimize NN\r\n\r\n  NN=0;\r\nend","test_suite":"tic\r\n%%\r\nm=zeros(5,2);N=8;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=14;\r\nNNexp=18;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(8,2);N=12;\r\nNNexp=10;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,3);N=6;\r\nNNexp=3;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,6);N=12;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=5;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=11;\r\nNNexp=8;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(7,2);N=13;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=15;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=9;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=12;\r\nNNexp=17;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=13;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,4);N=5;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=5;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=16;\r\nNNexp=15;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,5);N=8;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=10;\r\nNNexp=6;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=9;\r\nNNexp=3;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,2);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=15;\r\nNNexp=20;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,2);N=4;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=11;\r\nNNexp=8;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=9;\r\nNNexp=1;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=16;\r\nNNexp=24;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=9;\r\nNNexp=1;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=15;\r\nNNexp=22;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,5);N=9;\r\nNNexp=10;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=10;\r\nNNexp=6;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=15;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,2);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,2);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,7);N=13;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,3);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(7,2);N=11;\r\nNNexp=10;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,1);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,6);N=9;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=3;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=15;\r\nNNexp=22;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,2);N=6;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,4);N=12;\r\nNNexp=17;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,3);N=6;\r\nNNexp=7;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,1);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=16;\r\nNNexp=15;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,2);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,3);N=9;\r\nNNexp=12;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(9,1);N=6;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=12;\r\nNNexp=11;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,2);N=3;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(7,2);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=6;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,3);N=4;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,15);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(16,1);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=9;\r\nNNexp=3;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(15,1);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(2,4);N=6;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=7;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=12;\r\nNNexp=11;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,4);N=1;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=8;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,16);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=3;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=0;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,13);N=9;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=2;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(1,9);N=6;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(6,2);N=12;\r\nNNexp=16;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=8;\r\nNNexp=4;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=5;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(5,3);N=14;\r\nNNexp=18;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(4,3);N=7;\r\nNNexp=2;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(6,2);N=4;\r\nNNexp=0;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\nm=zeros(3,5);N=13;\r\nNNexp=14;\r\nNN=Noisy_Neighbors(m,N);\r\nassert(isequal(NNexp,NN))\r\n%%\r\ntoc\r\n%%\r\n% function GJam_Rd1B_2015b\r\n%  fn='B-small-practice.in';\r\n%  [data] = read_file(fn); % \r\n%  fidG = fopen('B-small-practice.out', 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has N cols of cases\r\n%  NN = Noisy_Neighbors(data{i});\r\n%  fprintf(fidG,'Case #%i: %i\\n',i,NN);\r\n%  \r\n%  fprintf('Case #%i: %i\\n',i,NN);   \r\n% end\r\n% toc\r\n% fclose(fidG);\r\n% end\r\n% \r\n% function val=Noisy_Neighbors(v)\r\n%  r=v(1);c=v(2);N=v(3);\r\n%  m=zeros(r,c);\r\n%  if N==0\r\n%   val=0;\r\n%   return;\r\n%  end\r\n%  \r\n% ptrset=find(m==0);\r\n% \r\n% val=Inf;\r\n% tlocs=nchoosek(ptrset,N);\r\n% for i=1:size(tlocs,1)\r\n%  m=m*0;\r\n%  tlocv=tlocs(i,:);\r\n%  m(tlocv)=1;\r\n%  vchk=nnz(conv2(m,[1 1])==2)+nnz(conv2(m,[1;1])==2);\r\n%  \r\n%  if vchk\u003cval\r\n%   val=vchk;\r\n%  end\r\n%  if val==0,break;end;\r\n% end\r\n%  \r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  ptr=ptr+1;\r\n%  v=str2num(fgetl(fid)); % r,c,N\r\n%  \r\n%  d{ptr}=v;\r\n%  \r\n% end % feof\r\n%  fclose(fid);\r\n% \r\n% end % read_file\r\n%%\r\ntoc\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":5,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-05-03T17:57:59.000Z","updated_at":"2015-05-03T18:31:40.000Z","published_at":"2015-05-03T18:31:40.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=\\\"https://code.google.com/codejam/contest/8224486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2015 Rd 1B: Noisy Neighbors\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Fastest completion - 8 minutes.\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\u003eDetermine minimum number of adjacencies for N placed people in an RxC hotel matrix\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\u003eInput: m, an RxC zeros array; N number of rooms to be filled\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\u003eOutput: NN, minimum number of common walls\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\u003eExamples: Small Case 1\u0026lt;=R*C\u0026lt;=16, 0\u0026lt;=N\u0026lt;=R*C\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 1 1;1 0 1;1 1 1] has minimum 8 common walls vs [1 1 1;1 1 1;1 1 0] has 10 common\\n[1;0;0;1] has 0 common walls\\nones(2,3) has 7 common walls]]\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:t\u003eTheory: The small case can be solved with brute force using vector set with nchoosek followed by processing of convolutions. The large case has 10000 rooms making brute force hopeless.\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\u003eAdditional GJam solutions can be found at\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://www.go-hero.net/jam/15\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\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\"}]}"},{"id":42291,"title":"GJam 2015 Rd1B: Counter Culture","description":"This Challenge is derived from \u003chttps://code.google.com/codejam/contest/8224486/dashboard#s=p0 GJam 2015 Rd 1B: Counter Culture\u003e. Fastest completion - 5 minutes.\r\n\r\nDetermine minimum sequence length to reach a number. Sequence starts at 1 and the next is either +1 or the number's reverse with trailing zeros removed. (eg 2300 is followed by 2301 or 32)\r\n\r\nInput: N, a value from 1 to 1,000,000\r\n\r\nOutput: L, minimum length of sequence to reach N\r\n\r\nExamples: Small Case 1\u003c=N\u003c=1000000\r\n\r\n  N=5,  L=5  [1 2 3 4 5] L=N is true thru 19\r\n  N=23, L=15 [1:12 21 22 23]\r\n\r\n\r\nTheory: The small case can be solved with brute force or semi-brute force using storage of past calculations. All values are processed at each depth level. Duplicates from [N+1 and flip] are purged. A fast reversal function is essential. Direct summation works well. The large case N limit is 1E14 making even semi-brute force with storage unlikely.\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://www.go-hero.net/jam/15 Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"https://code.google.com/codejam/contest/8224486/dashboard#s=p0\"\u003eGJam 2015 Rd 1B: Counter Culture\u003c/a\u003e. Fastest completion - 5 minutes.\u003c/p\u003e\u003cp\u003eDetermine minimum sequence length to reach a number. Sequence starts at 1 and the next is either +1 or the number's reverse with trailing zeros removed. (eg 2300 is followed by 2301 or 32)\u003c/p\u003e\u003cp\u003eInput: N, a value from 1 to 1,000,000\u003c/p\u003e\u003cp\u003eOutput: L, minimum length of sequence to reach N\u003c/p\u003e\u003cp\u003eExamples: Small Case 1\u0026lt;=N\u0026lt;=1000000\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eN=5,  L=5  [1 2 3 4 5] L=N is true thru 19\r\nN=23, L=15 [1:12 21 22 23]\r\n\u003c/pre\u003e\u003cp\u003eTheory: The small case can be solved with brute force or semi-brute force using storage of past calculations. All values are processed at each depth level. Duplicates from [N+1 and flip] are purged. A fast reversal function is essential. Direct summation works well. The large case N limit is 1E14 making even semi-brute force with storage unlikely.\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://www.go-hero.net/jam/15\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\u003c/p\u003e","function_template":"function L = Counter_Culture(N)\r\n% N is value to be reached \r\n% L is minimum length of sequence to reach N\r\n% N=23  L=15  the sequence [1:12 21 22 23]\r\n% N=19 L=19 [1:19]\r\n  L=1;\r\nend","test_suite":"tic\r\n%%\r\nN=1;\r\nL=Counter_Culture(N);\r\nLexp=1;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=19;\r\nL=Counter_Culture(N);\r\nLexp=19;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=23;\r\nL=Counter_Culture(N);\r\nLexp=15;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1101;\r\nL=Counter_Culture(N);\r\nLexp=150;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=998999;\r\nL=Counter_Culture(N);\r\nLexp=3334;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=990000;\r\nL=Counter_Culture(N);\r\nLexp=3425;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10110;\r\nL=Counter_Culture(N);\r\nLexp=447;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11111;\r\nL=Counter_Culture(N);\r\nLexp=459;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999991;\r\nL=Counter_Culture(N);\r\nLexp=3426;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=512;\r\nL=Counter_Culture(N);\r\nLexp=46;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999899;\r\nL=Counter_Culture(N);\r\nLexp=3334;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1999;\r\nL=Counter_Culture(N);\r\nLexp=328;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11101;\r\nL=Counter_Culture(N);\r\nLexp=449;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=876543;\r\nL=Counter_Culture(N);\r\nLexp=2657;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=4;\r\nL=Counter_Culture(N);\r\nLexp=4;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=102;\r\nL=Counter_Culture(N);\r\nLexp=31;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11000;\r\nL=Counter_Culture(N);\r\nLexp=1337;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1998;\r\nL=Counter_Culture(N);\r\nLexp=327;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=900000;\r\nL=Counter_Culture(N);\r\nLexp=3434;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=131072;\r\nL=Counter_Culture(N);\r\nLexp=1639;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=524288;\r\nL=Counter_Culture(N);\r\nLexp=2149;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=20;\r\nL=Counter_Culture(N);\r\nLexp=20;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=789012;\r\nL=Counter_Culture(N);\r\nLexp=2435;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=200;\r\nL=Counter_Culture(N);\r\nLexp=129;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=109876;\r\nL=Counter_Culture(N);\r\nLexp=3213;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11100;\r\nL=Counter_Culture(N);\r\nLexp=448;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=262144;\r\nL=Counter_Culture(N);\r\nLexp=1842;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11;\r\nL=Counter_Culture(N);\r\nLexp=11;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1001;\r\nL=Counter_Culture(N);\r\nLexp=139;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=987654;\r\nL=Counter_Culture(N);\r\nLexp=2879;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999989;\r\nL=Counter_Culture(N);\r\nLexp=3424;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11011;\r\nL=Counter_Culture(N);\r\nLexp=359;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=4096;\r\nL=Counter_Culture(N);\r\nLexp=238;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=900001;\r\nL=Counter_Culture(N);\r\nLexp=1446;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=201;\r\nL=Counter_Culture(N);\r\nLexp=32;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=99001;\r\nL=Counter_Culture(N);\r\nLexp=437;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999999;\r\nL=Counter_Culture(N);\r\nLexp=3434;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999900;\r\nL=Counter_Culture(N);\r\nLexp=3335;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=901;\r\nL=Counter_Culture(N);\r\nLexp=39;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2201;\r\nL=Counter_Culture(N);\r\nLexp=161;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=90;\r\nL=Counter_Culture(N);\r\nLexp=28;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=101;\r\nL=Counter_Culture(N);\r\nLexp=30;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10111;\r\nL=Counter_Culture(N);\r\nLexp=448;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=31;\r\nL=Counter_Culture(N);\r\nLexp=14;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10;\r\nL=Counter_Culture(N);\r\nLexp=10;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10100;\r\nL=Counter_Culture(N);\r\nLexp=437;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999998;\r\nL=Counter_Culture(N);\r\nLexp=3433;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999000;\r\nL=Counter_Culture(N);\r\nLexp=3335;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=990001;\r\nL=Counter_Culture(N);\r\nLexp=1536;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=30;\r\nL=Counter_Culture(N);\r\nLexp=22;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=900;\r\nL=Counter_Culture(N);\r\nLexp=137;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=101001;\r\nL=Counter_Culture(N);\r\nLexp=1538;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999990;\r\nL=Counter_Culture(N);\r\nLexp=3425;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=989999;\r\nL=Counter_Culture(N);\r\nLexp=3424;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=21;\r\nL=Counter_Culture(N);\r\nLexp=13;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=9999;\r\nL=Counter_Culture(N);\r\nLexp=336;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=100001;\r\nL=Counter_Culture(N);\r\nLexp=1437;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10999;\r\nL=Counter_Culture(N);\r\nLexp=1336;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=100;\r\nL=Counter_Culture(N);\r\nLexp=29;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=91;\r\nL=Counter_Culture(N);\r\nLexp=20;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11010;\r\nL=Counter_Culture(N);\r\nLexp=358;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=29;\r\nL=Counter_Culture(N);\r\nLexp=21;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2001;\r\nL=Counter_Culture(N);\r\nLexp=141;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11110;\r\nL=Counter_Culture(N);\r\nLexp=458;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10001;\r\nL=Counter_Culture(N);\r\nLexp=338;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=9;\r\nL=Counter_Culture(N);\r\nLexp=9;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=101000;\r\nL=Counter_Culture(N);\r\nLexp=2436;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1000;\r\nL=Counter_Culture(N);\r\nLexp=138;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=19;\r\nL=Counter_Culture(N);\r\nLexp=19;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=12000;\r\nL=Counter_Culture(N);\r\nLexp=1348;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999;\r\nL=Counter_Culture(N);\r\nLexp=137;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=22;\r\nL=Counter_Culture(N);\r\nLexp=14;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1111;\r\nL=Counter_Culture(N);\r\nLexp=160;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=12001;\r\nL=Counter_Culture(N);\r\nLexp=359;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=12;\r\nL=Counter_Culture(N);\r\nLexp=12;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=99000;\r\nL=Counter_Culture(N);\r\nLexp=1426;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999001;\r\nL=Counter_Culture(N);\r\nLexp=2436;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=899999;\r\nL=Counter_Culture(N);\r\nLexp=3433;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10010;\r\nL=Counter_Culture(N);\r\nLexp=347;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10000;\r\nL=Counter_Culture(N);\r\nLexp=337;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10101;\r\nL=Counter_Culture(N);\r\nLexp=438;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2000;\r\nL=Counter_Culture(N);\r\nLexp=329;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=111;\r\nL=Counter_Culture(N);\r\nLexp=40;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=999901;\r\nL=Counter_Culture(N);\r\nLexp=3336;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2101;\r\nL=Counter_Culture(N);\r\nLexp=151;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=10011;\r\nL=Counter_Culture(N);\r\nLexp=348;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2002;\r\nL=Counter_Culture(N);\r\nLexp=142;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=32;\r\nL=Counter_Culture(N);\r\nLexp=15;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=110;\r\nL=Counter_Culture(N);\r\nLexp=39;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2100;\r\nL=Counter_Culture(N);\r\nLexp=240;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=11001;\r\nL=Counter_Culture(N);\r\nLexp=349;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=99;\r\nL=Counter_Culture(N);\r\nLexp=28;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1100;\r\nL=Counter_Culture(N);\r\nLexp=238;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1099;\r\nL=Counter_Culture(N);\r\nLexp=237;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1000000;\r\nL=Counter_Culture(N);\r\nLexp=3435;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=100000;\r\nL=Counter_Culture(N);\r\nLexp=1436;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=2200;\r\nL=Counter_Culture(N);\r\nLexp=250;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=1110;\r\nL=Counter_Culture(N);\r\nLexp=159;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=432109;\r\nL=Counter_Culture(N);\r\nLexp=1779;\r\nassert(isequal(Lexp,L))\r\n%%\r\nN=199;\r\nL=Counter_Culture(N);\r\nLexp=128;\r\nassert(isequal(Lexp,L))\r\n%%\r\ntoc\r\n%%\r\n% function GJam_Rd1B_2015a\r\n% % \r\n% fn='A-small-practice.in';\r\n% [data] = read_file(fn); % \r\n% \r\n% fidG = fopen('A-small-practice.out', 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has J cols of cases\r\n%  L = Counter_Culture(data{i});\r\n%  fprintf(fidG,'Case #%i: %i\\n',i,L);\r\n%  fprintf('Case #%i: %i\\n',i,L); \r\n% end\r\n% toc\r\n% fclose(fidG);\r\n% end\r\n% \r\n% function depth=Counter_Culture(v)\r\n% % create all paths\r\n% persistent m mv maxdepth\r\n% if isempty(m)\r\n%     \r\n%  mv=zeros(1000000,1);\r\n%  m{1000000}=[]; % set cell array size to max possible\r\n%  for i=1:9\r\n%   m{i}=i;\r\n%   mv(i)=i; % place best depth into mv for repeated searches\r\n%  end\r\n%  maxdepth=9;\r\n% end\r\n% \r\n% if mv(v) % usage of persistent data\r\n%  depth=mv(v);\r\n%  return;\r\n% end\r\n% \r\n% \r\n% while 1\r\n%  mset=m{maxdepth}; % start with last set calculated\r\n%  maxdepth=maxdepth+1;\r\n%  msetn=mset+1;\r\n%  \r\n%  msetn=msetn(mv(msetn)==0);\r\n%  mv(msetn)=maxdepth;\r\n%  \r\n%  for i=1:length(mset)\r\n%   flipv=calc_flip(mset(i));\r\n%   if mv(flipv)==0 % new value\r\n%    mv(flipv)=maxdepth;\r\n%    msetn=[msetn flipv]; % add to list\r\n%   end\r\n%  end\r\n%  \r\n%  m{maxdepth}=msetn;\r\n%  \r\n%  if any(msetn==v)\r\n%   depth=maxdepth;\r\n%   return\r\n%  end\r\n%     \r\n% end % while\r\n% \r\n% end\r\n% \r\n% function vr=calc_flip(val)\r\n%  vr=0;\r\n%  while val\r\n%   v1=mod(val,10);\r\n%   vr=10*vr+v1;\r\n%   val=(val-v1)/10;\r\n%  end\r\n% end\r\n% \r\n% function [d] = read_file(fn)\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  ptr=ptr+1;\r\n%  v=str2num(fgetl(fid)); \r\n%  d{ptr}=v;\r\n% end % feof\r\n% fclose(fid);\r\n% end % read_file\r\n%%\r\ntoc","published":true,"deleted":false,"likes_count":0,"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":"2015-05-03T21:55:15.000Z","updated_at":"2025-11-20T19:05:41.000Z","published_at":"2015-05-03T22:36:16.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=\\\"https://code.google.com/codejam/contest/8224486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2015 Rd 1B: Counter Culture\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Fastest completion - 5 minutes.\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\u003eDetermine minimum sequence length to reach a number. Sequence starts at 1 and the next is either +1 or the number's reverse with trailing zeros removed. (eg 2300 is followed by 2301 or 32)\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\u003eInput: N, a value from 1 to 1,000,000\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\u003eOutput: L, minimum length of sequence to reach N\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\u003eExamples: Small Case 1\u0026lt;=N\u0026lt;=1000000\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[N=5,  L=5  [1 2 3 4 5] L=N is true thru 19\\nN=23, L=15 [1:12 21 22 23]]]\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:t\u003eTheory: The small case can be solved with brute force or semi-brute force using storage of past calculations. All values are processed at each depth level. Duplicates from [N+1 and flip] are purged. A fast reversal function is essential. Direct summation works well. The large case N limit is 1E14 making even semi-brute force with storage unlikely.\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\u003eAdditional GJam solutions can be found at\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://www.go-hero.net/jam/15\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution.\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\"}]}"},{"id":1732,"title":"GJam: 2013 Rd1a Bullseye Painting - Large Numbers","description":"\u003chttp://code.google.com/codejam/contests.html Google Code Jam\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\r\n\r\nGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\r\n\r\nThe test cases are a few from the 6000 in the Large number set. In contest mode the player has 8 minutes to submit a response after downloading the data set.\r\n\r\n\u003c\u003chttp://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\u003e\u003e\r\n\r\n*Input:* [r, p]  uint64, 1\u003c=r\u003c=1E18, 1\u003c=P\u003c=2E18. Always enough P for one ring\r\n\r\n\r\n*Output:* Rings\r\n\r\n*Examples:*\r\n\r\n  [1 9] 1; % Normal number examples to understand concept\r\n  [1 10] 2;\r\n  [3 40] 3;\r\n  \r\n  [1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n  [1 2000000000000000000] 999999999\r\n  [760961177192651897 1521922354385303795] 1\r\n\r\n\r\n*Google Code Jam:*\r\n\r\nThe next competition starts in April 2014. See details from above link.\r\n\r\nSolutions to the various past Challenges using Matlab can be found via \u003chttp://www.go-hero.net/jam/13/solutions GJam Solutions\u003e.\r\n\r\nLarge number solutions require more elegant methods to avoid time-outs.\r\n\r\n*Related Challenges:*\r\n\r\n1) \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1731-text-file-read-64-bit-data-set Reading 64 bit input file\u003e\r\n\r\n2) \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1730-gjam-2013-rd1a-bullseye-painting Bullseye Regular Numbers\u003e\r\n\r\n*Usage of regexp is verboten*","description_html":"\u003cp\u003e\u003ca href = \"http://code.google.com/codejam/contests.html\"\u003eGoogle Code Jam\u003c/a\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\u003c/p\u003e\u003cp\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\u003c/p\u003e\u003cp\u003eThe test cases are a few from the 6000 in the Large number set. In contest mode the player has 8 minutes to submit a response after downloading the data set.\u003c/p\u003e\u003cimg src = \"http://code.google.com/codejam/contest/images/?image=bullseye.png\u0026p=2464487\u0026c=2418487\"\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [r, p]  uint64, 1\u0026lt;=r\u0026lt;=1E18, 1\u0026lt;=P\u0026lt;=2E18. Always enough P for one ring\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Rings\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 9] 1; % Normal number examples to understand concept\r\n[1 10] 2;\r\n[3 40] 3;\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003e[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\r\n[1 2000000000000000000] 999999999\r\n[760961177192651897 1521922354385303795] 1\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eGoogle Code Jam:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe next competition starts in April 2014. See details from above link.\u003c/p\u003e\u003cp\u003eSolutions to the various past Challenges using Matlab can be found via \u003ca href = \"http://www.go-hero.net/jam/13/solutions\"\u003eGJam Solutions\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eLarge number solutions require more elegant methods to avoid time-outs.\u003c/p\u003e\u003cp\u003e\u003cb\u003eRelated Challenges:\u003c/b\u003e\u003c/p\u003e\u003cp\u003e1) \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1731-text-file-read-64-bit-data-set\"\u003eReading 64 bit input file\u003c/a\u003e\u003c/p\u003e\u003cp\u003e2) \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1730-gjam-2013-rd1a-bullseye-painting\"\u003eBullseye Regular Numbers\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eUsage of regexp is verboten\u003c/b\u003e\u003c/p\u003e","function_template":"function rings=solve_rings(r,pmax)\r\n rings=0;\r\nend","test_suite":"%%\r\ntic\r\nr=uint64(308436464205151562);\r\npmax=uint64(1850618785230909388);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,3),sprintf('rings=%i, Expected 3',rings))\r\n%%\r\nr=uint64(760961177192651897);\r\npmax=uint64(1521922354385303795);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,1),sprintf('rings=%i, Expected 1',rings))\r\n%%\r\nr=uint64(1);\r\npmax=uint64(2000000000000000000);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,999999999),sprintf('rings=%i, Expected 999999999',rings))\r\n%%\r\nr=uint64(1000);\r\npmax=uint64(2000000000000000000);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,999999500),sprintf('rings=%i, Expected 999999500',rings))\r\n%%\r\nr=uint64(3);\r\npmax=uint64(1243678947483597075);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,788567988),sprintf('rings=%i, Expected 788567988',rings))\r\n%%\r\nr=uint64(432);\r\npmax=uint64(1800692162794074077);\r\nrings=solve_rings(r,pmax);\r\nassert(isequal(rings,948865465),sprintf('rings=%i, Expected 948865465',rings))\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-21T05:00:05.000Z","updated_at":"2013-07-21T06:00:55.000Z","published_at":"2013-07-21T06:00:27.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:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contests.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.\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\u003eGiven a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.\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 test cases are a few from the 6000 in the Large number set. In contest mode the player has 8 minutes to submit a response after downloading the data set.\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\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [r, p] uint64, 1\u0026lt;=r\u0026lt;=1E18, 1\u0026lt;=P\u0026lt;=2E18. Always enough P for one ring\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 Rings\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\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 9] 1; % Normal number examples to understand concept\\n[1 10] 2;\\n[3 40] 3;\\n\\n[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge\\n[1 2000000000000000000] 999999999\\n[760961177192651897 1521922354385303795] 1]]\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\u003eGoogle Code Jam:\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 next competition starts in April 2014. See details from above link.\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\u003eSolutions to the various past Challenges using Matlab can be found via\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://www.go-hero.net/jam/13/solutions\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eLarge number solutions require more elegant methods to avoid time-outs.\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\u003eRelated Challenges:\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\u003e1)\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://www.mathworks.com/matlabcentral/cody/problems/1731-text-file-read-64-bit-data-set\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eReading 64 bit input file\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003e2)\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://www.mathworks.com/matlabcentral/cody/problems/1730-gjam-2013-rd1a-bullseye-painting\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eBullseye Regular Numbers\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eUsage of regexp is verboten\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\"}]}"},{"id":2324,"title":"GJam 2014 Rd 1c: Train Cars","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/3004486/dashboard#s=p1 GJam 2014 Rd 1c: Reordering Train Cars\u003e.\r\n\r\nDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. \r\n\r\n*Input:* s, string of N space separated string segments of letters [a..z]. 1\u003c=N\u003c=10. Total letters \u003c=100.\r\n\r\n*Output:* val, number of possible sequences\r\n\r\n*Example:*  Small Case\r\n\r\n  ab bbbc cd Val=1 as only abbbbccd can be created\r\n  aa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\r\n  abc bcd    Val=0 as c is internal and thus can not connect to c of abc\r\n\r\n*Theory:* (Spoilers)\r\n\r\nA methodical approach implements the following checks: No internal equals any Start/End. Note aaa has no internal. Verify each string has no non-contiguous letters. Verify no two strings have same start or end except where start==end as in bbbb. Val is N! if there are N cc strings. Each string segment is considered a unique piece when counting. Reduce the strings of type aa until there is only one and increase Val by N!. With remaining strings merge to S strings. Val is then scaled by S!. Key merging issue is that ab ba may look mergeable to aa but in actuality it creates abba - invalid and baab -invalid thus Val=0. Creation of full length string and then a final validity check resolves this issue.\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution. No Valid Matlab solutions were submitted during the contest.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/3004486/dashboard#s=p1\"\u003eGJam 2014 Rd 1c: Reordering Train Cars\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=10. Total letters \u0026lt;=100.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e val, number of possible sequences\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e  Small Case\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eab bbbc cd Val=1 as only abbbbccd can be created\r\naa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\r\nabc bcd    Val=0 as c is internal and thus can not connect to c of abc\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e (Spoilers)\u003c/p\u003e\u003cp\u003eA methodical approach implements the following checks: No internal equals any Start/End. Note aaa has no internal. Verify each string has no non-contiguous letters. Verify no two strings have same start or end except where start==end as in bbbb. Val is N! if there are N cc strings. Each string segment is considered a unique piece when counting. Reduce the strings of type aa until there is only one and increase Val by N!. With remaining strings merge to S strings. Val is then scaled by S!. Key merging issue is that ab ba may look mergeable to aa but in actuality it creates abba - invalid and baab -invalid thus Val=0. Creation of full length string and then a final validity check resolves this issue.\u003c/p\u003e\u003cp\u003eAdditional GJam solutions can be found at \u003ca href = \"http://go-hero.net/jam\"\u003eExample GJam Matlab solutions\u003c/a\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution. No Valid Matlab solutions were submitted during the contest.\u003c/p\u003e","function_template":"function val=train(s)\r\n% s is a string of strings separated by a space\r\n val=0;\r\n vstr=regexp(s,' ','split');\r\nend","test_suite":"%%\r\ns='iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj qqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnnnnnlllllllllllllllhhhhhhhhhhhhhhhhhh ssssvxxxxbbb uuuuuuuuuuuuuuuuuutttttttttttttttttttttttttffffffffffffffffffffffffffffff uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu gggwwwwwwwrrrrrraaaaoooooooppppppyyyyyyyeeeeeeeccccccccccdddddddmmmmmmmzzzzzzkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=1440;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ffvvuaaaaddbbbkzzz yynnneerrrxxxx iiiiiwqssssyy mmmmmmmmmggggggggg llltttpjjhhoo';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='sssssssssssssssssss wwuuunnnmmgggggpzz kkkhhhdddjjqfxxaaye ttttttt oooooooooooooooooooo';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ssssssssssssssssssss zzkkkkkeuuiii gyyynnffpooxhhhjtt lllllllcccc dddddddwwwwwmmmaaa cccbbbrrrrrrrrrr';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uueeennnbbdjjxx oooooooogg sssssaaaaaww iiiiiiiiiiiii yyssss iiiirrrryyyyy ggghhhfiii kkkqqqqzzzzzzzmmmm pppppppppccccc';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aaaaabbbbcccdddddeeefffffffggggghhiiijjjkkkkklllllmmmmnnnoooopppqqqqrrrsssstttttttuuuuuvvvwwwxyyzzza';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwww sssssssssssssssssssssssssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh llllpppppppppeeeeeeejjjjjjjmmmmoooggkkkkdddddbbbxxxxxfffffffvvvvtttaazzzzzzuuuuuuuuucc wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii wwwwwwwwwwwwwwwwwyyyyyyyyyyyyyyyyyyyyyyyyyyyyyynnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnniiiiiiiiiiiiiii';\r\nVexp=1440;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cd bc ab';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggggggggggggg hhhhwzziiiiyyyyaaaa gggggggggg bbbbbbbbbbbbbb spjttfllllnncqr kkkkkdddddeeeeevvvvv ggggggg mmmmmmmmmmmmm gggggggggggg';\r\nVexp=17280;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='iilhzzattttdddjjkk wwwwwwwww uuuuuuiiiiiiiiii fggbn xxxxxxxxxxmmmmm';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tttvvsqqrrrriicccc aaaaaaaaaaaaaaaaaa ggggggggggxxxxxxxxx hheefyyydd zzzzzzzznnnnllllmmmm wwuuuk jjjjj ddddddppppppppp mmmmmmmooooooooo pppppbbbbbbbjjjjjjjj';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnrrsssplye iggwwwwnnnn';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmmmmmmmmmmmmmmmmddddddddddddddddd mmmmmmmmmmmmmmmmmmmmm ddddddddddddddjjjjjjjjjjjjjjrrrrrrrrrrrrrrrrrrrrrrttttttttttttttttt ttttzzzzzzzzvvvvvvvvhhhhhhhhccccllllllllyyyyyyaaaaeeeeeeeeiiiiiiiiii iiiiiiiiwwwwwwwooooooooppppkkkkk';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttttttttttttttttllllllllllllllllllllllllllllccccccccccccccccccccccccccccooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisssssssssssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb gggggxxxxxxrrrrnnnnnnnnmmmmkkkkuuuuuuuuyyyyyhhheeeezzzzffffffffjjjvvvvv bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqqqqqqqqaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ppppppppppppppppppppppppwwwwwwwwwwwwwwwwwwwwwwwddddddddddddddddddddddd';\r\nVexp=17280;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggpttt iiiiiiiiii iiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiii fffffffffkkkkkkkkkaa vwwnjssbbbhxxxqqr lllllccccmmuuuuu iiiiiiiiiiiiiiii iiiii';\r\nVexp=14400;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kavdczugmoesxvalrdmkcpowwxcnhumcfkzakzbdftweqhxmcfrkziqbyoeziuvitserfjiggoubonggswxlkpkoundgmayxiapv';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='abc';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii mmmmmmmmmmmmmmvvvvvvvvvvvvvvvvrrrrrrrrrrrruuuuuuuuuuuuuuussssssssssssssssssnnnnnnnnn ffffkwweeebbbbccctttppjjjggggggaaaayyddddddxxxxxx hhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiihhhhhhhhhhhhhhh';\r\nVexp=12;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cclevhhpn ywuuccc';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jjjjjjjjjjhhhhhllllllltttttmmmmmmmmmkkkkkkoooyyyyyyyyyyyycccccnnnnzzzzzzssssssbbbbbbbbbbgggggggg uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrrrrrrraaaaaaaaaaaaaaaaaaaaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eeeeeeeeeeeeddddddddddddqqqqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yyxxxmmmmhhhhhuuuujjlllllliiiiiieeeccccggbzzzzaaafff wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvsssssskkkknn rrrrrrrrrrrrrrrrrrrrrqqqqqqqqqqqqqqqqqqqqpppppppppppppppppp ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo tttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt dddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';\r\nVexp=10080;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvjjjjggggggmmmmmlllllppppppppfffffiiiiiiiidddddddeeeezsssssbbbbbbuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xxxvvvvaaaaylsqqkg ddcccpttmm nnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnn jjjjjuuuuhhhhhhhh ziiiddddd';\r\nVexp=48;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='g i uvbm iog k rdi';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccaallttwniiiiiixxhh rrrrfffffbbeeeuuuuuuuggggggyycccc sssssssssssssssvvvvvvvvvvvvvvrrrrrrrrrrrrrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrkkkkknnnnnnllsssssssssssssscccccccppppppddddddddmmmmmmwwwwwwqqqqqqiiitttttttjjjjjjjjjjj uuuuuuuuurrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vzaaappssooookkkkyyyyffbbbwwwiiiiiiiirrrllqqqqeexxddnncg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccccccccccccccccccccccccccccccccccczzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz wwwwwwwwwwffffffffffffffffppppppppppppppppppccccccccccc';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzttttttttttthhhhhhhxxxxxxbbbbbbbwwwwwwwyyypppooooorrrnnnnnnuuuggaammmmmkkkkkccccvvvvvllllllll iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss';\r\nVexp=40320;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeee hhhhhhhh xxxxxxxxxxxxxxxxxxxx iiiaanwwwrrbbbb hhhhhhhuuuuuuuuuuu dddddddtttttttttiiii gggggggggzzzzzzz qqqqccfvvvoyyykjjmm bblllllppppp';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ttttttttttttttttttttttttttttttttttttcccccccccccccccccccccccccccccccccccccccc ttttttttttttttttttttttttttttttttttttttttttttttt ccccccccccccccccccccccccccccccc pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ppppppppppppppppppppp ccccccccccccccccccccccccccccccccccccccccccc pppppppppppppppppppppppppppppppppppppppppppppppppppp pppppppppppppppppppppppppppppppppppppppttttttttttttttttttttttttttttttttttt pppppppppppppppppppppppppppppppppppppp';\r\nVexp=48;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='abc bcd';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeaaaaaaaaaaaadddddddddddddddd zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz wwwwwwvvvvvqqqqqqqqyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyylllllllllllllllluuuuuuuuuuuuuuuuuuuuuuuuuzzzzzzzzzzzzzzzzzzzzzzzzzzzz ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff eeeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrkkkkkkkkkkkkkkkkkkkkkkkk dnnnnnnnnnpppppxxxxxxffffffff';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmmffffffffffffkkkkkkkkkkkkkkkkkkkdddddddddddddd oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooommmmmmmmmmmmmmmmmmmmmmm';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeennnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggggggqqqffffffmmmiiiiiiiuuuuuuueeeeeeyyyyyyddddddddkkkkkkvvvvvvvrrrrppllllllllbbbbbwwwwwwwwjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhzzzzzzzzzzzzzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaaaaaaassssssssssssssssssssssstttttttttttttttttttttttnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbuuuuussfffffvvvkkhhheeeyyyyyjjqqqqqnnn ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd llllllllllllllllllllllllllllllllllllllllwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggmmmmmmmmmmmmiiiiiiiiiaaaaaxxxxxxxxzzzzzzzzzzzooooooooo';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvssssssssssssssssssssswwwwwwwwwwwwwwlllllllll uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu qqq yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyykkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk cccccccccoooooppppppppppppppjjjjjjjjjjjqqqqqq kkehhhhxxxftiiib qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqddddddddddddddddddddddddddddnnnnnnnnnnnnnnnnnnnnnnnnnnnnn uuuuuuuuuuuuuuuuuuuuuuuuuuuuuccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnmmmmmmmmmmmmmmmmmmmmmggggggggggggggggyyyyyyyyyyyyyyyyyyyyyyyyyy';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjggggggggggggggggggggggggggggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa hhhhhhhhhhhhhhh zzzzzzzzzzzzzzzzzzzzvvvvvvvvvvvvvvvvuuuuuuuuuuuuuuuuuuuuuuuupppppppppppppooooooooooooooooooooooo hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnneeeeeeeeeeeeeeeeeeeeeeeeeeeeeee hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwccccffffrrqqqqqqbbttttttdddddddxxxllllllllllyyyyyyyymmmmmmkkkkkksssssss';\r\nVexp=86400;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uuuuuuuyyyyyddddddddqqqqqttttttbbbiiiiiiiaaahhh ooooooooogggggguuuuuuuuuu';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggggoooooeeeyjjqqqqqqq mmmmmttttddddddrrraaaaaaaaallllllllzzzzzzzzzzzznnnnnnnnnnnnnnwwwwwwwggggg';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeaaaaaaaaaawwwwwwwwwwwwzzzzzzzzzzzzzsssssssssssssssqqqqqqqqyyyyyyyyyyyyyyyvvvvvvvvvvvvvvffff dddddddddddddddddddddddddddddddddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjllllllllllllllllllloooooooooooooooooooooooooocccccccccccccccccccrrrrrrrrrrrrrrrrrrrr ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aa aa bc';\r\nVexp=4;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkrrynnn vvvvvvvvvvvvvvvvvvvv jhhppibllllddddaooff nqqqwwwwwsss xmmmmmmmtttucc zzzzzzzzzzzzzzzzzzzz eeeeeeeeeeeee';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='fffffffffffffffffffffffffffffffffffffffffffffffffffffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ccccccccccccccccccccccccccccccc ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyygggggggggggggggggggggggggggggggggggg sssssssshhhhhhhhhhhhhhhhzzzzzzzzzzzzzooo nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnssssssssssssssssssssssssssssssssssssssssssssssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss jjjjjxxxxrrriiitttttttwwwwpppppkddddddddqqqqaaaaallllllvvbbuuuuummmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkk xxxxxxxxxxxxxvvvvvvvvvvvvvveeeeeeeeeeeeeeeeeegggggggggggg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ppppppppwwwwwwwiiiiiiiiiqqqqqsssaaaaaaaaalllllllllttttnnnnnnnddddddddhhhhhhhjjjjjjjrrrrroooooooo kkkkkkkkkkkkkkkkkkkkkkk zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzyyyyy cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk';\r\nVexp=240;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrbbbbbbbbb sslll rrrrsss mmmmmmddddd lllllllooo ooooooommmm';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeee xxmmmmm rrrrrrrrrrrrrr iiiii hhgdddfccbbqqqnniii ppppppppppppppp aayyyy oooooooooooooooooooo wwvsssszzzkkttllljjj uuuuuuuuuuuuuuuu';\r\nVexp=362880;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjj';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xxxxxxxx xxxxxxx iiavvvvppjjnnnzzzr gkkkuuwwsscccmmmmeed hhhqqqqqqqqqoooooo llllllllxxxxxxx bbyyttttttffffff';\r\nVexp=240;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkddddmmccssbb ppppppppppppp rryyyyyyqiiezzuhhx wwwwwwwwww ppppppppp aaaaaaooooooooo jjjjjjjjjjjjjjjjjjj ffffffffffffffffffff ggggggggvvvvvvtttttt lllllllnnnnnnnnnnnnn';\r\nVexp=725760;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aaaaaaaaaaaaaaaaaaavvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvqqqqqqqqqqqqqqqkkkkkkkkkmmmmmmmmmm mmmppppppppppppppxxxxxxxxxxxxxxxxxxxxcccccccccyyyyyyyyyyyyyyeeeeeeeeeeeeehhhhhhhhh';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzccccccccccchhhhhhhhhhffffffffffdddddddddaaaaaaaaavvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrpppppppppppppmmmmmkkkkkkkkkkooooooooonnnnnnnntttttteeeeeellllljjj';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzzzzzzzzz nnnffooqqqsdeeegrrmm hhhhhhhhhcccccccccc wwwwwwwwwwuuuuuuuuuu jlllkkkx cccccaaaaapppijjjjj bbbbhhhhhhhhhhhhhh yyyyyyyvvvvvvvvvvvv';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccc bbbbbbbbbwwwwwwww lllllllllllll peezzzuuiisoodtttfff mmmmmmmmmmmmmmmmm qqqyyyyyyyyyrr';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tqqxvveggggccdda oooott';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqqwwooooommhhhhhhhhlllllllsssssddddnnnniiiiiexxxxxxxxxttttffyyyyyyyybbbbbccggggggkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cccccccccccccccfffffffffffffffffffffggggggggggggmmmmmmmmmmmmmmmmmmoooooooooooqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuubbbbbbbbbbbbbjjjjjjjjjjjjjdddddddddddddddddd qqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkttttttttttttttttttttttttttttttttttttttaaaaaaaaaaaaaaaaaaaaaaaaaa';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccgggggggggggg wwwwww oooooooooo zzzzzzzzzzzzzzz rrttttttfffmm hhhhhhhhhbbbbvvvvvv xxxlnnpssddddijaoo yyyyyyyyyyyyyyyyy';\r\nVexp=5040;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='p';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqgguuuuctmmmmddjor rrrrrrrrrrrrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ab ab';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqfffffffffffffffffffffffffffffffffffffffffff rrrrrrllllllllllyyyyyy oooooooooooovvvvvvvvvvvvvvvvvvviiiiiiiwwwwwwwwwwwwwwcccccccccccccc mmmmmmmmmmmmmmmzzzzzkkkkkknnnnnnnnnbbbbbbbbaaaaaaaaaa aaaaaappppppgggggggghhhhhhhhhhhqqqqqqqqqqqqq ttttttttttttttttttjjjjjjjjjjjjjjjjjjjjuuuuuuuuuuuuuuuuuuuuuussssssssssssssssss fffffffeeeeeexxxxxttt yyyyyyyyyyyyyyyyyyyyyyydddddddddddddddmmmmmmmmmmmmmmmmmmmmmm';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uuuucccccccccccxxxxxxxxxxxxxx nnnnnnnnffffflllllllliiiiiiihhhhhhzzzzzzzzzzzzeeeeeeeeeeqqqqqqq kkkkkkkkkkkkkkkggggggggggggggggggggggaaaaaaaaaaaaaaaaaaaaauuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhkkkkkkkkkkkkkaaaaaaaoooooommeeeeeevvvvvvvvzzzzxxxxxxxxrrrrrrr lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ccccccccyyyyyuuuuuuiiqqqqqqqqqqddddddjjjjjtttttttbbbbbffffssssswwwwwwwwwgggppppppp';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmiiiii cccccccccccccccccccc hhhhhhhhhhhhhhhhh aooryzzkvvvblffff cccccccpppppqqqqq';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cccccccccc ccjjill';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='dddrrnnnnnj pppppvvvvmmmmmmoo ttttttttttttttt jjjjjjjjiiiiiiiii uullwaaaagykxxxxbe iiiiiiiiiiizzzzzzz ffffffffffssssssss';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='abc a a';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='qqeebbccggy uuuuufff snittojvwwwpx ddddaaaaaaaammmmmmm rrrrrrrrrrrr fffllllllhhzzzddddd';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggooojjjuuuummmmrrrrrttppppwwwwwaaaaaahhhhhhfffffkkkbbbbccccceeeezzzvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=80640;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnsssssssssssssiiiiiiiiiuuuuuuuuuuuuuuuuu lllllllllllllffffffffffvvvvvvvgggggghhhhhhhh bbbbrrrrrqqqqwwwwmmkkkoooooaaayy hhhhhhhhhhhhhxxxxxxxxxxxxxppppppppppppppppppppptttttttttttttttttteeeeeeee';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggtttttttqqqqqqxxxxxxxxkkkkkkkkyyyymmmmmmmmmwwwwwwwoooooooooooooeeeeeee pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ssssssssssssssssssssssssssssssssssssssssssssssssssssssss iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd fffrrraahhhhhlllllccbbbbvvzz jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu';\r\nVexp=362880;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww xxxxxxxxxxxxxxxxxxxxxxxxxxxooooooooooooooooooooooooooooobbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb fffiiaaauuurrrddeevvvhhhhgqqqcccccnnnpyyyyssmmmmtzkkkk jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll';\r\nVexp=120;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='a ca a abc';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='llllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbfffffffffffffffffffffffffffffffffffllllllllllllll vvvvvvvvvvvvvvvjjjjjjjjjjjjjjjjjjjjooooooooodddddddddddddwwwwwwwwwwwwwwnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeepppppppppppppppppppp syyyyyyyytthhhccczzzzrrrrrggqqkkkxxuuuummmmmiii ppppppppppppppppppppppppppppppppbbbbbbbbbb';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='oooooooooooooooooooooooooooaaaaaaaaaaaaaaaaaaaaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiii qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eekrrrwsnnnngggddxczffmmhhhpvvvvttjlllbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='vvvvvvvvvvvvvbbbbbbbbbbbbbbbbbbsssssssssssssfffffffffppppppppppppppplllllllllllllllll ttttzzzzzzzzzyyyyyaaaaooooooiiiiiiiiiinnnjjjjjjjjmmmmdddddddgggcccccxxxxxeeeeeeeeeeqqqqqhhhhrrrrrr';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xx fffffrrrrrrrrrrrr xssssttwwwf rrr ffffffffff';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='nnnnnnnnnnnnnnnnnnnn ttttttttttt fffffffffffffffffff ffffffffffffffffffff lgggccccbyyy yhaqqqmooo pppkkkeeerrrrrr';\r\nVexp=240;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aaabbbbccccdddddeeeeeeeeeffgggghiijjjjkkllllllmmmmnnnnnnnopppqqqqqqqqqrrssssttttuuuuvvwwwxxyyyyyzzzz';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggggjjdddiiiixxxyyy pppppppppppppp ooooooooooooo lllllllllllll ebshuuuufffmaaawvvv ttttttttttttttt zzzzzzzzzzzzzzzzzz cccccccccccccccccccc ppppppppppppppppppp qqqqqqqqqqq';\r\nVexp=725760;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt kkiiiillxxxddwwwwmmmfffqqeeuuhhhnnnnsssssbbbbpppjjya';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggggjjjjjjjjjkkkkkktttttttthhhhhyyyyyyyyyyppppppppppaaaafffffffffffffffvvvvvvvrrrrrrrr uuuuuuuuuuuuuqqqqqqqqqbbbbbbbbbbbbdddddddddwwwwwwwwwwwwzzzzzzzxxxxxxxxeeeeeeeeeeeennnnnnnlllllllllll rrrrrrrrrrrrrrrrrrsssssssssssssssmmmmmmmmmmmmmoooooooooooooccccccccccccc';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrzzzzzz wwwwwwwwwwwwwwww uuuuuaaaaaa lllllllllllllllll ggggggggiiiiiiiiii hhhhhhhhhhhhhhhhhhhh qqssjjjmmfttecddd bbbbnnvpyyykkkxxoo';\r\nVexp=40320;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='dddddddddddddddddddddddeeeeeeeeeeeeeeeeeegggggggggjjjjjjjjjjjjjjfffffffffff bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttppppphhaaqqqqqxxxxxiiiiiiuuuuucccccmmmsszzzzznnnnnnn yyyyyyyyyywwwwwwwwwwooooooooooorrrrrrrrrrvvvvvvvvvvvvvvvvvddd kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkklllllllllllllllllllllllllllllllllllllllllllllllllllll';\r\nVexp=24;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='jw ki ij';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yooccccgdexxmmrz wwwwwaaaiiiiii lllllllllllllllllll bbbbbbbbnnnn llllll ppppppppppppppppppp kkkhhhhhttttttjjj';\r\nVexp=1440;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuujjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj xxxxxxxxxxxttttttttttttttttaaaaaaaaahhhhhhhhhhhhhhhzzzzzzzzzzzzzzuuuu';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrpppppppp oooooooooooooooooooo ggqqwwwssmmjjahuun';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='yyyyyyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeeedddddddddddddddddddrrrrrrrrrrrrr pppppppppppppppppppppppppppppppppppppppppppppppppppppp rrrrrrrrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvzzzzzzzzzzzzzzzzssssssssssssppppppppp xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxooooooooooooooooooooooooooooooooooooooooooooo ppppppppppppppppppp pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ppppppppppppppppppppppbbbbbbbbbbbbbbbbbbbbbbiiiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxx';\r\nVexp=6;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrcccccccccccccccccccccccc dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb oooooooooooooooooooooooaaaaaaaaaaaaaaaaaa sssgggggggglllllmmmmttttttttttttzzzjjjjjjjpppphhhhhyyyyyiiiiiixxxxxeeekkkkkkkkkfffffffuuuuuuuuwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn';\r\nVexp=5040;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='xxxxxmmmmmwwwwwws yyyyyyqqqqqqqq pppppppppppppppppp llllllllllllllllll vvvvvvvvvvvvvvvvv eeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaa ggggggggggggggggggg shhhodrrruuutt';\r\nVexp=40320;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj nnnnnnnnnggggggggmmmmmmmaaaaaattttttttttttwwwwwwwweeeeeeeeuuuuuuuuqqqqqqfffffffooooooo zzzzzzzzddddddddddvvvvvvv pppppppxxxxxxxxxxxxxrrrrrrrrrriiiiiiiiiiiiiikkkkkkk ppppppppppppppppppppppppppppppppppppppppppppp yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbppppppppppppppppppppppppp';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='cccccccccccc qqqqqqqqqqqqqqqqq rrrrrr yyyyyyyyyyyyyyyy mmmmmmmmmmmmmmmmmmmm rrrrrrrrrrrrrr tttpajjibbuuuzfooo dddddddddddddd ssssswwhhheeelnnkkk rrrrrrrrrr';\r\nVexp=241920;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='uummmmslzaaaddprqqqq kkffff jjjjjjjjjjjjjjjj kkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkk';\r\nVexp=12;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzyyyyyy nnoooooalllkkswwwf fch';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='sssssssssssssssssssssssssssssssssssssssssssssssssssssssaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ttttttttttttttttttss';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='fffffffffffffffffffffffffffffffffffff fffffffoooooosssssssssssdddddddddddddddiiiiiiiiiiiiiiiiiiyyyyyyyyyyyyyyyyyyyyyzzzz zzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';\r\nVexp=4;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\n% Full GJam solution\r\n% function GJam_Rd1c_bv2\r\n% % \r\n% trial = 1;\r\n% if trial == 1\r\n%     fin = 'B-small-practice.in';\r\n%     fout = 'B-small-practice2.out';\r\n% elseif trial == 2\r\n%     fin = 'B-small-attempt0.in';\r\n%     fout = 'B-small-attempt0.out';\r\n% elseif trial == 3\r\n%     fin = 'B-large-attempt0.in';\r\n%     fout = 'B-large-attempt0.out';\r\n% elseif trial == 4\r\n%     fin = 'B-small-practice_tiny.in';\r\n%     fout = 'B-small-practice_tiny1.out';\r\n%  elseif trial == 5\r\n%     fin = 'B-large-practice.in';\r\n%     fout = 'B-large-practice.out';\r\n% end\r\n% \r\n% [data] = read_file(fin); % \r\n% \r\n% fidG = fopen(fout, 'w');\r\n%  \r\n% tic\r\n% for i=1:size(data,2) % Cell array has N cols of cases\r\n% \r\n%  val=train(data{i});\r\n%  %toc\r\n%  fprintf('Case #%i: %i\\n',i,val);\r\n%  fprintf(fidG,'Case #%i: %i\\n',i,val);\r\n%    \r\n%   \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% end\r\n% \r\n% function val=train(s)\r\n%  val=0;\r\n%  \r\n%  vstr=regexp(s,' ','split');\r\n%  \r\n%  N=size(vstr,2);\r\n%  \r\n%  % create vs, ve, vinternal\r\n%  % check if internals\r\n%  vc=zeros(1,255); % common vector for overlaps\r\n%  \r\n%  for i=1:N  % find starts/ends\r\n%   s1=double(vstr{i});\r\n%   vs(i)=s1(1);\r\n%   ve(i)=s1(end);\r\n%   vc(vs(i))=1;\r\n%   vc(ve(i))=1;\r\n%  end\r\n%  \r\n%  for i=1:N\r\n%   v=double(vstr{i});\r\n%  \r\n%   [valid,vint]=check_vint(v);\r\n%   \r\n%   if ~valid,return;end\r\n%   if any(vc(vint)),return;end % internal elsewhere or internal to a start/end\r\n%   vc(vint)=1;\r\n%   \r\n%  end % i\r\n%  \r\n%  m=[vs' ve'];\r\n%  \r\n%  m=sortrows(m,[1 2]); % sort start then ends within start\r\n%  \r\n%  N=size(m,1);\r\n%  % if two pices have same start or end and neither is an aa then Invalid\r\n%  for c=1:2\r\n%   for i=1:N-1\r\n%    if m(i,1)==m(i,2),continue;end\r\n%    schk=m(i,c);\r\n%    for j=i+1:N\r\n%     if m(j,1)==m(j,2),continue;end\r\n%     if schk==m(j,c),return;end\r\n%    end % j\r\n%   end % i\r\n%  end % c\r\n%  \r\n%  % Cases are valid, at least a 1\r\n%  %Q is PI(Ni!) for the i cases of aaa, bbb,...\r\n%  %val=Q*Z! where Z is number of independent groups\r\n%  \r\n%  val=1;\r\n%  \r\n%  Zptr=N;\r\n%  \r\n%  % Aptr  Zptr    remove aa pairs and multiply by perms of aa sets  \r\n%  while Zptr\u003e1\r\n%   Aptr=Zptr;\r\n%   if m(Zptr,1)==m(Zptr,2) % valid aa event\r\n%    qp=1;\r\n%    while m(Aptr-1,1)==m(Aptr-1,2) \u0026\u0026 m(Aptr-1,1)==m(Zptr,1)\r\n%     Aptr=Aptr-1;\r\n%     qp=qp+1;\r\n%     if Aptr==1,break;end % finished off the pairs\r\n%    end\r\n%    val=val*factorial(qp);\r\n%    m(Aptr+1:Zptr,:)=[];\r\n%   end\r\n%   Zptr=Aptr-1;\r\n%  end % Zptr\r\n%  \r\n%  % reduce m of aa if ba or ca\r\n%  N=size(m,1);\r\n%  for i=N:-1:2\r\n%   if m(i,1)==m(i,2)\r\n%    if any(sum(m==m(i,1))\u003e1)\r\n%     m(i,:)=[];\r\n%    end\r\n%   end\r\n%  end\r\n%  \r\n%  N=size(m,1);\r\n%  for i=N:-1:1\r\n%   z{i}=m(i,:);\r\n%  end\r\n%  \r\n%  \r\n%  % Create blocks  ab bc cd  ef fg gh  to abcd efgh  or ad eh  final m rows !\r\n%  mb=m*0;\r\n%  % create strings adn then check if valid, ab ba is a 0 by abba or baab\r\n%  % check_vint\r\n%  while ~isequal(mb,m)\r\n%   mb=m;\r\n%   N=size(m,1);\r\n%   iptr=N;\r\n%   while iptr\u003e1\r\n%    ptr=find(m(1:iptr-1,1)==m(iptr,2),1,'first'); % check end to starts\r\n%    if ~isempty(ptr)\r\n%     m(ptr,1)=m(iptr,1);\r\n%     m(iptr,:)=[];\r\n%     z{ptr}=[z{iptr} z{ptr}]; \r\n%     z(iptr)=[];\r\n%    else % checkstart to ends\r\n%     ptr=find(m(1:iptr-1,2)==m(iptr,1),1,'first'); % check start to ends\r\n%     if ~isempty(ptr) % start to end\r\n%      m(ptr,2)=m(iptr,2);\r\n%      m(iptr,:)=[];\r\n%      z{ptr}=[z{ptr} z{iptr}]; \r\n%      z(iptr)=[];\r\n%     end\r\n%    end\r\n%    iptr=iptr-1;\r\n%   end % while iptr\r\n%   \r\n%  end % mb m\r\n%  \r\n%  \r\n%  for i=1:size(z,2)\r\n%   [valid,vint]=check_vint(z{i});\r\n%   if ~valid\r\n%    val=0;\r\n%    return;\r\n%   end\r\n%  end\r\n%  %m\r\n%  \r\n%  N=size(m,1);\r\n%  \r\n%  val=val*factorial(N);\r\n%  \r\n% end\r\n% \r\n% function [valid,vint]=check_vint(v)\r\n% % create list of internal elements, may be empty set\r\n% % check if v is self consistent\r\n% % abbbc becomes abc;  aabbcc abc\r\n%  valid=0;\r\n%  \r\n%  dv=diff(v);\r\n%  dv(dv==0)=[]; % remove dupes\r\n%  vp=cumsum([v(1) dv]);\r\n%  \r\n%  if length(vp)\u003e2\r\n%   vint=vp(2:end-1);\r\n%  else\r\n%   vint=[];\r\n%  end\r\n%  \r\n%  if length(vp)==length(unique(vp))\r\n%   valid=1;\r\n%  end\r\n%  \r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% % Output d{} string of strings separated by a space\r\n% d={};\r\n% fid=fopen(fn);\r\n% fgetl(fid); % Total Count ignore\r\n% ptr=0;\r\n% while ~feof(fid)\r\n%  fgetl(fid); % skip\r\n%  ptr=ptr+1;\r\n%  d{ptr}=fgetl(fid);\r\n% end % feof\r\n%  fclose(fid);\r\n% \r\n% end % read_file\r\n\r\n","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":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-05-15T14:36:42.000Z","updated_at":"2014-06-11T16:12:51.000Z","published_at":"2014-05-15T15:13:56.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/3004486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Rd 1c: Reordering Train Cars\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous.\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 s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=10. Total letters \u0026lt;=100.\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 val, number of possible sequences\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\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Small Case\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[ab bbbc cd Val=1 as only abbbbccd can be created\\naa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\\nabc bcd    Val=0 as c is internal and thus can not connect to c of abc]]\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (Spoilers)\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\u003eA methodical approach implements the following checks: No internal equals any Start/End. Note aaa has no internal. Verify each string has no non-contiguous letters. Verify no two strings have same start or end except where start==end as in bbbb. Val is N! if there are N cc strings. Each string segment is considered a unique piece when counting. Reduce the strings of type aa until there is only one and increase Val by N!. With remaining strings merge to S strings. Val is then scaled by S!. Key merging issue is that ab ba may look mergeable to aa but in actuality it creates abba - invalid and baab -invalid thus Val=0. Creation of full length string and then a final validity check resolves this issue.\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\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Matlab solution. No Valid Matlab solutions were submitted during the contest.\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\"}]}"},{"id":2325,"title":"GJam 2014 Rd 1c: Reordering Train Cars (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/3004486/dashboard#s=p1 GJam 2014 Rd 1c: Reordering Train Cars (Large)\u003e.\r\n\r\nDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. The large case could have 26! or more permutations.\r\n\r\n*Input:* s, string of N space separated string segments of letters [a..z]. 1\u003c=N\u003c=100. Total letters \u003c=100.\r\n\r\n*Output:* val, number of possible sequences, modulo 1,000,000,007\r\n\r\n*Example:*  Small Train Case examples \r\n\r\n  ab bbbc cd Val=1 as only abbbbccd can be created\r\n  aa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\r\n  abc bcd  Val=0 as c is internal and thus can not connect to c of abc\r\n\r\n*Theory:* \u003chttp://www.mathworks.com/matlabcentral/cody/problems/2324-gjam-2014-rd-1c-train-cars Train Small Spoilers\u003e\r\n\r\nLarge Case specific info. See \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow Usage of java math\u003e for unlimited precision. Note intValue gives more precision than floatValue. No java factorial exists so a function, non-recursive, is suggested. The small solution can be converted via java BigInteger factorial, mod, multiply, and intValue to solve the large case.\r\n\r\n\r\nAdditional GJam solutions can be found at \u003chttp://go-hero.net/jam Example GJam Matlab solutions\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Small Matlab solution. No Valid Matlab solutions were submitted during the contest.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 408.3px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 204.15px; transform-origin: 407px 204.15px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 94.5333px 7.91667px; transform-origin: 94.5333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is derived from\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://code.google.com/codejam/contest/3004486/dashboard#s=p1\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGJam 2014 Rd 1c: Reordering Train Cars (Large)\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 373.783px 7.91667px; transform-origin: 373.783px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. The large case could have 26! or more permutations.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 19.4333px 7.91667px; transform-origin: 19.4333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 296.4px 7.91667px; transform-origin: 296.4px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=100. Total letters \u0026lt;=100.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 25.2667px 7.91667px; transform-origin: 25.2667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 183.233px 7.91667px; transform-origin: 183.233px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e val, number of possible sequences, modulo 1,000,000,007\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 31.1167px 7.91667px; transform-origin: 31.1167px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExample:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 87.2667px 7.91667px; transform-origin: 87.2667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e Small Train Case examples\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 61.3px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 30.65px; transform-origin: 404px 30.65px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.833333px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.833333px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.833333px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.833333px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 184.8px 7.91667px; transform-origin: 184.8px 7.91667px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 11.55px 7.91667px; transform-origin: 11.55px 7.91667px; \"\u003eab \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 173.25px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 173.25px 7.91667px; \"\u003ebbbc cd Val=1 as only abbbbccd can be created\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.833333px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.833333px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.833333px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.833333px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 327.25px 7.91667px; transform-origin: 327.25px 7.91667px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 11.55px 7.91667px; transform-origin: 11.55px 7.91667px; \"\u003eaa \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 130.9px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 130.9px 7.91667px; \"\u003eaa bc c Val=4 aa gives 2 positions\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 184.8px 7.91667px; transform-origin: 184.8px 7.91667px; \"\u003e, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.833333px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.833333px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.833333px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.833333px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 261.8px 7.91667px; transform-origin: 261.8px 7.91667px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 15.4px 7.91667px; transform-origin: 15.4px 7.91667px; \"\u003eabc \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 11.55px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 11.55px 7.91667px; \"\u003ebcd\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 7.7px 7.91667px; transform-origin: 7.7px 7.91667px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 227.15px 7.91667px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 227.15px 7.91667px; \"\u003eVal=0 as c is internal and thus can not connect to c of abc\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 25.6667px 7.91667px; transform-origin: 25.6667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eTheory:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://www.mathworks.com/matlabcentral/cody/problems/2324-gjam-2014-rd-1c-train-cars\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eTrain Small Spoilers\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 91.0333px 7.91667px; transform-origin: 91.0333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eLarge Case specific info. See\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eUsage of java math\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 199.05px 7.91667px; transform-origin: 199.05px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e for unlimited precision. Note intValue gives more precision than floatValue. No java factorial exists so a function, non-recursive, is suggested. The small solution can be converted via java BigInteger factorial, mod, multiply, and intValue to solve the large case.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 131.083px 7.91667px; transform-origin: 131.083px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAdditional GJam solutions can be found at\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.95px 7.91667px; transform-origin: 1.95px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://go-hero.net/jam\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eExample GJam Matlab solutions\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 139.267px 7.91667px; transform-origin: 139.267px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Small Matlab solution. No Valid Matlab solutions were submitted during the contest.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function val=train(s)\r\n% s is a string of strings separated by a space\r\n val=0;\r\n vstr=regexp(s,' ','split');\r\nend","test_suite":"%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww gggggggggggggg ddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddd dddddddddddddddddddddd dddddd dddddddddddddd dddddddddddddddddddddddddddddddddddddddddddd xxxxxxxttttttttteeeeeeppppppppppppllllllliiiiiiiifffffffffffffffmmmmmmmmmmmjjjjjjjhhhhhhhhhh uuuuuuuuubbbbbbcccccccvvvvvvvvvvkkkkkkqqqqqaaayyyyyyooooooooooonnnnnnnnnnnnrrrrrzz dddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddd ddddddddddddddd ddddddddddddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ddddddddddddddddddddddddddddddd ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';\r\nVexp=728878867;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ggi aaaaaaayy iiiaaaaaaa lllllllgggggg iiiiiooooooooo';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ssssssssssssssssssssbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccc jjjjjjjjjjjjjjjjjjddddddddddddggggggggggggggggg qqqqqqqqqqqqffffffffffffffffffuuuuuuuuuuuuuuaaaaaaaaaaaaaaaaaa ccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmjjjjjjjjjjjjjjjjj cccccccccccccccccccccccccccllllllllllllllllllllllllllkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeeeeeeeeecccccccccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiieeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnzzz bbbbbbbbbbbbbbbbrrrrrrrrrrrrrnnnnnnnnnnnn ggggggggggggggggggggggggggggggggggqqqqqqqqqqqqqqqqqqqqqqqqqqq hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh eeeeeeeeeeeeee zzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaappppppppppppppppppppssssssssssssssssssssssss';\r\nVexp=2;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='kkkkkkkkkkkkkkkkkkkkk llllaaaaaa gggggggggggghhhhhhhhhhh lllllllllllllllllllllllllllllllllllllll bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb dddddddddddddddddddddddddddddddddddddddddyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy aaaaaaaaa vvvvvvvvvv yyyyyyyyy xxxxxxxx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb gggggggggggggggggggggggggggg ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss iiiiiiiiiiimmmmmmmmmmmmmmmmmmmm vvvvvvvvvvvvvvvvvvvvvvvvv ssssssssssssssssssssssssssuuuuuuuuuuuuuuuuuuuuuuuuuuuuu vvvvvvvvvvvvvv uuuuuuuuuuuuuuuuuuuiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttteeeeeeeeeeeeeeeeeeeeeeeeee oooooooooooooooooooooooooooooooooooooooooooo nnnnnnnjjjjjjjjjjjjjjjddddddddddd oooooooooooooooooooooooooooooooooooooooooogggggggggggggggggggggggggggggggggggggggg nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ooooooooooooooooooooooooooooooooo vvvvvvvvvvvvvvvvvvvvvvvv bwwwwwwwwoooooo sssssssssssssssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ffffffffffffffffffffffffffffffffffffff kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzbbbbbbbbbbbbbbbbbbbbbbbbbbb ooooooooooo kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx pppppppppppppppppppppppppppppppppppppppppppppppppppppppppp kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv qqqqlllll mmmmmmmmmmmtttttttt uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu ccccccccccccccccccckkkkkkk yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaannnnnnnnnnnnnnn ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk hhhhhhhhhhhhhhhhhhhhhhhhhhrrrrrrrrrrrrrrrrrrqqqqqqqqqqqqqqqqqq';\r\nVexp=265420800;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrjjjjjjjjnnnnnnnyyyyyyxxxxxlllltttttttt';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwww yy wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh yyyyyyyyyyyyyyyyyyyyyyyyyyyyyiiiiiiiiiiiiiiiiiiiiiiiiii ggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwww xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvv aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalllllllllllllllllllllllllllllllllllllllllllllllll aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnttttttttttttttttkkkkkkkkkkkkkkkjjjjjjjjjjjjjooooooooooooooooooo bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb wwwwwwwwwwwwwwwwwwwwwwwwwww lllllllllllllllllllllllllllllllgggggggggggggggggggggggggggggg wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww uuuuuuuuuuuuuuuuuuuuuuuuuuuuu wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh yyyyyyyyyyyyyyyyy wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww mmmmmmmmmmmmeeeeeeeeeeeesssssssssdddddddddddzzzzzzzzzzzzzzzzrrrrrrrrrrrrrrrrrffffffqqqqqqqqqqqqqqq bbbbbbbbbbbbbbbbbbbbbbpppppppppppppppppppppppppppppppppyyyyyyyyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyyy';\r\nVexp=161166448;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttt qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq vvvvvvvvvvvvvvvvvvv lllll vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv jjjjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vv tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttt zzzzzrrrraaaaaasssssssseeeeeegggggggiiiooooooooooooobbbbbbbbkkkkkkkkkkyyyyyyyyyyywwwwwwww tttttttttttttttttttttttttttttttttttttttttttttttt vvvvvvvvvvvvvvvmmmmmmmmmmmmmmmmmmmmmmmmmmmmm tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt lllllllllllllllllllllllllllllllllllllllllllllllllllllll nnnnnnnnnnnnnnnnnnnndddddddddddddddddddddddddddxxxxxxxxxxxxxxxx tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttttttttttttttttttttttttttttttttttttttttttt ffffffffffffffffffffffffffffffffffjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhllllllllllllllllllllllllllllllllllllllllll tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt pppppppppppppppppppppppuuuuuuuuuuuuuuuuuuuuuuuuuuucccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmm mmmmfffffffff jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj tttttttttttttttttttt';\r\nVexp=459335393;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ppppppp aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz ttttttttttttttttttttttttttttaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ddddddddddddddddpppppppppppppppp hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh xxxxxxxxxxxxxxxxxxxxxxxxxxxx hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaaavvvvvvvvvvvvvvvv yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyykkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh pppppppppppppppppppppppppppjjjjjjjjjjjjjjjjjjjjjjjjjjjjj hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhh pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnooooooooouuuuuuuuuuurrrrrrrrrrrwwwwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwwwwwwwwwwwwwwwwwwwwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh sssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ttttttttttttttt zzzzzzzzzzzzzzzzzzzzz ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ccccccccccccccccceeeeeeeeeeeeeeeeeeemmmmmmmmmmmmmmmmm ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh fffffffffffqqqqqqqqqqqq yyy vvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaaaa jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj zzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzbbbbbbbbbb dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd hhhhhhhhhhhhhhhhhhhhhhh ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd kkkkkkkkkkkkkkkkkkkkkkkkkkkkkzzzzzzzzzzzzzzzzzzzzzzzzzzzzz vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss hhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ss hhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbsssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh dddddddddddddddddddddddddddddddddddddddd hhhhhhhhhhhhh tttttttttttttttttttttttttttttttttttttttttttttttt bbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhh zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz hhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh';\r\nVexp=893810165;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhsssssssssssssssssssssssssss gggggggggggggggggggggggggggggggggggggg wwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ggggggggggggggggggggggggggggggggggggg qqqqqqqqqqqqqqqqqqwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii lllllllllllllllllllllllll ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllyyyyyyyyyyyyyyyy qqqqqqqqqq wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww pppp bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh mmm sssssssssssssssssssssssssllllllllllllllllllll mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm iiiiiiiiigggggg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii gggggggggqqqqqqqqqqqqqqqqqq qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq fffffffvvvvccccccccccccoooooddddddddd uuuuuuuuuuuuuuuuaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrzzzzzzzzzzzzzzztttttttttttteeeeeeeeeeeeeeeeee ppppppppppppppppppppp hhhhhh ssss ppppppppppppppppppppppppppppppppxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wwwwwwwwwwwwwwwwwmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkpppppppppppppppppppppppppppppppppppppppppppppppppp xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyy xxxxxxxxxxxxxxxxxxxxjjjjjjjjjjjjjjjjjjj lllllllllllllllllllll mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg wwwwww hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk';\r\nVexp=588556762;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii oooooooooooooooooooooooooooooooaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu oooooooooooooooooooooooooooooooooooooooooooo llllllllllllllllllllllllllllllllllllll bbbbbbbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc oooooooooooooooooo cccccccccccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllljjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiii oooooooooooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj iiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjwwwwwwwwwwwwwwwwwwwwww ooooooooooooooooooooooooooooooooooooooooooooooo bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbboooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa oooooooooooooooooooooooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ccccccccccccccccccccccccccccccccccccccccc bbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaa uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ooooooooooooooooooooo uuuu cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kkkkkkkkkkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkllllllllllllllllllllllllllllllllllllllllllllll aaaaaaiiiiiiiiiiiiii uuuuuuuuuuuuu kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ccccccccccccccccccccccccccccccccccccccccccccccccckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo iiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb jjjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb jjjjjjjjjjjjjjjjjjjj nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn xxxxxx llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll iiiiiiiiiiiiiiiiiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeeeeeeeeeee wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww llllllllllllllllllllllllllllllllllllllllllllllllllllllll eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa uuuuuuuuuuuuuuuuuuu oooooooooooooooooooooooooooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee oooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ii iiiiiiiiiiiiiiuuuuuuuuuuuuuuuuuu oooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxx lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwww aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa llllllllllllllllllllllll eeeeeeeeeeeeeeeeeee lllllllllllllllllllllllllllllllllllllllllllllllll ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc';\r\nVexp=125298902;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='hhhhhhhhhvvvvv kkhh ppmmmmmmmmm zzxxx sssccccccc fffffffqq yyyyyyyeeeeee xxxxxxxxi eeeeeeeeaaaaaaaa jjjppppppp ddddf cccccrrrrrrrr';\r\nVexp=720;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr tttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ppppppppppppppppppppppppppppppppppppppppppppyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnnnnnnnnn qqqqqqqqqqqq llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll yyyyyyyyyyyyyyyyyyyyy ttttttttttttttttttttttttttttttttttttttttttttt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzppppppppppppppppppppppppppppppppppppppppppp ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ffffffffffff iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ddddddddddddddddddddddddssssssssssssssssssssssssssssssss qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu zzzzzzzzzzzzzzzzzzz rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr cccccccccccccccccccccccccccccccccccccccccccc rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr ggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg aaaaaaaaaaaaaaaaaaaaa pppppppppppppppppppppppppppp yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ccccccccccccccccccccccccc cccccccccccc aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa iiiiiiiiiiiiiiiiiiivvvvvvvvvvvvvvvvvvvvdddddddddddddddddd cccccccccccccccccaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwooooooooooooooooooooo yyyyy llllllllllllllbbbbbbbbbbbbbbbbbbbbbuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy fffffffffffffffffffffffffffffffffzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr tttttttttttttttttttttttttttttttttttttttttttffffffffffffffffffffffffffffffffffffffff sssssssssssssssssssssssssss xxxxxxxxxxxxxxxxxxxxxx yyyyyqqqqqqq ffffffffff ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrttttttttttttttttttttttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxx gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ooooooooooooooooooooooooooooooooooooo rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr xxxxxxxxxxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii qqqqqqqqqqqqqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnn jjjjjjj ssssssssssssssssssssssssssssssssssssssssssswwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy jjjjjjjjjjjjjjjjjjjjjjjjjjjjjcccccccccccccccccccccccccccccccccc tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ggggggggggggggggggggggggggllllllllllllllll aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc qqqqqqqqqqqqqqqqqqqqqqqqq rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ssssssss cccccccccccccccccccccccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj tttttttttttttt iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jjjjjjjjjjjjjjjjjjjjjj';\r\nVexp=45590719;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh mmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmm mmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll xxxxxxvvvvvvvvvvvvvoooooojjjjjjjjaaaaaaaffffffffppppppppyyyyyykkkkkkkkkqqqqqqqqqqrrrrrr mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm wwwwwwwnnnneeeeeeesssssuuuuuuuuuudddddddddiiiiiiii mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmm mmmmmmmmmmmmmmm ggggggggggggggggggggggggggggggcccccccccccccccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt';\r\nVexp=757993753;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggg iihhhhhhaaaaaaaaallmmmmmeeedddddbbbbbbppssssssoooovvvvvvffffftttttttttqqqqqkkkkkknnnnn uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu rrrrrrrrrrrrrrrrrrrrrrrrrr gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggg rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwww';\r\nVexp=16857327;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccccccccccccccccccccccccccc zzzzzzzzzzzzzzzzzzzzzzzzzzzzzrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr llllllllllllllllllllllllllllllllllllllllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll tttttttttttaaaaaaaaakkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ccccccccccc uuuuuuuuuujjjjjjjssssssssssssss llll llllllllllllllllllllllllll cccccccccc lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc yyyyyyyyypppppppffffffffffxxxxxxxxxxxxxxiiiiiiiiiiiiiii hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh lllllllllllllllllllllllllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll hhhhhhhhhhhhhhhhhhhhh ccccccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz cccccccccccccccccccccccccccccccccccccccc hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn kkkggggggggeeeeeeeeeeeeeeeeeoooddddddddddwwwwwmmmmmmmmm bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz cccccccccccccccccc llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb';\r\nVexp=539156306;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sssssssssssssbbbbbbbbbbbbbbbb nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn sssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb eeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ssssssssssssssssssssssssssssssssssss nnnnnnnnnnnnn ssssssssssssssssssssssssssssssssssssssssssssss eeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbb sssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn aaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa nnnnnnnnnnnnnnnn sssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sssssssssssssssssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbb nnnnnnnnnnnnneeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ssssssssssssssssssssssssssssssssssss nnnn bbbbbbbbbbbbbbbbbbbnnnnnnnnnnnnnnnnn ssssssssssssssssssssssssssssssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnn ssssssssssssss bbbb ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss sssss sssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn sssssssssssssssssssssssssssssssss nnnnn aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa';\r\nVexp=392523621;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='ccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc llllllll llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll wwwwwwwwzzzzzzzzzzzzzeeeeeeeeeeuuuuuuuuvvvvvvvvvvvvvvrrrrrrrrrrtttttttttttttt llllllllllllllllllllllllllllllllllllllllllllllllllllllllll ttttttthhhhhmmmmmmmmmqqqqqqqqqqqqqq ccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccc lllllllllllllllllllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll bbbbbbbppyyyyyyiiisssssssnnnff ccccccccccccc llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllll xxxxxjjjjjjddddaaaaaakkkkkkkkk cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc llllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllll lllllllllllllllll lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccclllllllllllllllllllllllllllllllllllll ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccc lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccc tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccc';\r\nVexp=981953933;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='wwwwwwwwwwhhhhhhhhhh zzzzzzzzzzzzzzzzzzzzvvvvvvvvvvvvvvvaaaaaaaaaaaaaaaaaaaaaaiiiiiiiiiiiiiiiiiii kkkkkkkkkkkkkkkkkkkkk uuuuuuuuuuuuu jjjjjjjjjjjjjjjjjjjjjjjjjjjjjbbbbbbbbbbbbbbbb kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuuujjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kkkkkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuu mmmmmmmmmmmmmmmmmmmmmmmpppppppppppppppp kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee jjjjjjjjjjjjjj eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbqqqqqqqqqqqqqqqqqqqq jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq lllllnnnnnnnnnnnnnnnnn nnnnn wwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq wwwwwwwwwwwwwwwwwwww kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk xxxxxxxxxrrrrrrrrrgggggggggggggffffffffftttttttccccccccccccccccoooooooddddyyyyy eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww jjj uu bbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqq qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelllllllllllllllllllllllllllllllllllllllllllll bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww';\r\nVexp=310957976;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='aabbbbbcccddeeeeeeeefffgggggghhhhiiiiiiiijjkkkkklllmmmmmmmnnnooooppppppqqrrsssttuuuuuuuvvvvwxxyyyyya';\r\nVexp=0;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbb lllllllllllllllllllllllllllllllllllllllllll hhhhhhhhhhhhhhhhhhh kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt aaaa hhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbb llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll nnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu hhhh jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv hhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqsssssspppppppppmmmmmmfffffffff vvvvvvvooooooooooowwwwwwwwwwwccccccccrrrrrrrrrrddddddddddddddddddd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttttttttttttttttttttttttttttttttttttttttttttttttt uuuuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnn hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhh uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh llllaa gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnneeeeeeeeettt bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb tttttttttttttttttt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz hhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb uuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbb nnnnnnnnnnnnnnnnnnnnnnnnnnn tttttttttttttttttttttttttttttttttttt uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzlllllllllllllllllllllllllllllllllllllllllll hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh kkkkkkkkkkkkkkkkkkk bbbbbbbbbbbbbbbbbbbbbbb uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh uuuuuuuuuuuuuuu aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggggggggggggggggggggggggggggggggzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb';\r\nVexp=236753019;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt';\r\nVexp=1;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq dddddddlllllllllllllll xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ssssssssssssssssssssssssssssssssttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhkkkkkkkkkkkkkkkkkkkkk aaaaaaaaaaaaaaaaaaaaaaaaaaaccccccccccccccccccccc gggggggggggggggggggggggggggggggggggggddddddddddddddddddddddddddddddddddddddd ttttttttttttttttttttttttttttiiiiiiiiiiiiiiiii llllllllllllllllllhhhhhhhhhhhhhhhhhhhhhh rrrrrrrrrrrrrrrrrzzzzzzzzzzzzz kkkkkkkwwwwwwwwwwwwwwwwwwwnnnnnnnnnnnnnyyyyyyyyyyyyy iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ppppppppppppppppppppppppppppppppppppppppppxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qqqqqqqqqqqqqqqqqqqqbbbbbbbbbbbbbbbbbbbbbbssssssssssssssssssssssssssssssssss sssssssssssssss oooo ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp mmmmmmmmmmmm ffffffeegggggggg iiiiiiiiiiiivvvvvvvvvvvvv yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvfffffffffffffffffffffffffffffffffffffffffffffff xxxxxxxxxxxxxxxxxxxxxxxxx oooooorr ffffffffffffffffff pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp xxxxxxxxxx ooooooooooooooooooooooo mmmmmmmmmmmmmmmmmmmmmmoooooooooooooooooooooooooooooo';\r\nVexp=48;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeee dduuknnnbbyyysssssqqmmfrrrrrraaaacczzziiiiigggggxxxllllp eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj vvvvvvvvvvvvvvvvvvvvvvhhhhhhhhhhhhhhhhhhhhhhhttttttttttttttttttttttttttt eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww eeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\r\nVexp=901255609;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccc yyynnttooppphhhiiiwwllllggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv cccccccccccccccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss kkkkmmmmmmm uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu fffffffffffff ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sssssssssssssssssssssssssssssssssssssssssssssssssssss kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk sssssssssssss ccccccccccccccccccccccccccccccccccccccccccccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjccccccccccccccccccccccccccccccccccccccccccc xxxxxxxxxxxxxxxddddddddddddddrrrrrrrrrrrrrrrrrrrrrrrqqqqqqqqqeeeeeeeeeeeee kkkkkkkkkkkkkkkkkkkkkkkkkkkkk ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssssssssss mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk zzzzzzzzzzzzzzzzzz kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmzzzzzzzzzzzzzzzzzzzzzzzzzz';\r\nVexp=654434779;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='rrrr rrrrrrrrrrrrrrrrrrrrrrr pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp tttttttttttttttttttttttttttttttt lllllllllllllllllllllllllllllllllllllllllllllllllllllllll ttttttttttttttttttttttttttttttttttttttttttttttttttttt vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv gggggggggggggghhhhhhhhhhhhhhhhhxxxxxxxxxxxxxxxkkkkkkkkkkkkkkkkkccccccccccccc jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllllllllllllllll vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttttttttttttttttttttttttttttttttt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr ttttttttttttt qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttttt ttttttttttttttttttttttttttttttttttttttttttttttttttttttt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrr jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ppppppppppppppppppppppppppppp jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww tttttttttttttttttttttttttttttttttttt ooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii rrrrr pppppppppppppp iiiiiiiiiiiiiiiiiiiiiii lllllllllllllll tttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr lllllllllllllllllllllllllllll vvw llllllllllllllllllllllllllllllllllll pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr llllllllllllllllllllllllllllllllllllllllllllllllliiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii dddddddddddddddbbbbbbbbbbbbbbbbeeeeeeeeeeeeeeeeeeeyyyyyyyyyyyysssssssssssssssssssss mmmmmmmmmmmmmmmmmmmmmmmaaaaaaaaaaaaaaaaaaa ppppp vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr jjjjjjjjjjjjjjjjjjjjjjjjjjjj rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt nnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuzzzzzzzzzzzzzzzzzzzzzz gggggggggggg tttttttttttttttttttttttttttttttttttttttttttttt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwpppppp iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww jjjjjjjjjjj wwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll cccccccccccccccccccfffffffffffffffff llllllllllllllllllllllllllllllllllllllll tttttttttttttt pppppppppppppppppppppppppppppppppppppppp wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt jjjjjjjjjjjj ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo tttttttttttttttttttttttttttt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzgggggggggggggggggggggggggggggggggggggggg rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ttttttttttttttttttttttttttttttttttttttttttttttt llllllllllllllllllllllllllllllllllllllllllllllllll vvvvvvvvvv';\r\nVexp=977338612;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ccccccccccccccccccccccccccccccccccccccccccccccc ffffffffffffffffffffffffffffffffffffffffffffffffffpppppppppppppppppppppppppppppppppppppppppppppp cccccccccccccccccccccccjjjjjjjjjjj ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ccc pppppppppppppppppppppppppppppppppppsssssssssssssssssssssssssssssssssssssss ppppppppppppppppppppppppppp eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ssssssssssss iiiiiccccccccc jjjjjjffffffffffff ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ppppppppppppppppppppppppppppppppppppppppppppp ssssssssssssssssssssssssssssseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp eeeeeeeeeeeemmmmmmmmm iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii';\r\nVexp=864;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj aaaaa ooooooooooooooooooo mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nnnn sssssssssssssssssssssssssssssssssssssssssssssuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggggggggggggggggggggggggggggggggggggggggggggggggggg aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj aaaaaaaaaaaaa jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee mmmmmmmmmmmmmmmmmmmmmm eeeeeeewwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo aaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnnn lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ppppppppppppppppppppppppppppppppppppppppppppppgggggggggggggggggggggggggggggggggggggggggggggggggggggg ttttttttttttttttttttttttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd fffffffffffffffffffffffffffffffffffffff cceee ooooooooooooooooo jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ffffffffffffffffffffffffffffffffffffffffffffttttttttttttttttttttttttttttttttttttttttttttt xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp lllllllllllllllllllllllllllllllllllllllllllll fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ttttttttttttttttttttsssssssssssssssssssssssssssssssssssssssss wwwwwwwwwwwwwwhhhhhhhhhhhhhhhhllllllll aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ggggggggggggggggggggggggggggggggggggggggggggggggg aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ooooooooooooooooooooovvvvvvvvvvvvvvvvvvv aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa iiiiiiiiiiiiiiiiiiiiiiippppppppp cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv yyyyyyyyyyyyyyyyyyyyyyyyffffffffffffffffffffffffffffffffffffffffffffff aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa fffffffff mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ggggggcccccccc mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm aaaaaaaaaaaaaaaaaaaaaaaaaaa kkkkkkkkkkkkkkkkkkkkkkkrrrrrrrrrrrrrrrrrrrrrrrrrr uuuuuuuuuuuuuiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy mmmmmmmmmmmmmmm aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iiiiiiiii';\r\nVexp=702191236;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='oooooooooooooooooooooooooooooooooooaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee bbbbbbbbbbblllllllllllllllllzzzzzzzzzzzvvvvvvvvvvvvvvvvqqqqqqqqqqqkkkkkkkkkkkkkhhhhhhhhhhhhhhh eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee iiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee fffffffffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuu nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn rrrrrrrrrrrrrtttttttttttttmmmmmmmmmmmmccccccccyyyyyyyywwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii pppppppppppppppsssssssssssssssssssjjjjjjjjjjjjjjjjjddddddddddddddddxxxxxxxxxxxxxxxx nnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\r\nVexp=880614102;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\ns='gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwww rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwgggggg nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggggggggggg nnnnnnnnnnnnnnnnnnnnnnnnnn vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww zzzzzzzzzzzzzzzdddddddddddddddddddddyyyyyyyyyyyyyy jjjttttxxxxhhfffllllllqqqqqiiiiiimmmmmmmmuueeeeccccsssooookkkkppppppaabbbbbb vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv nnnnnnnnnnnnnnnnnnnnnnnnnn vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg vvvvvvvvvvvvvvvvvvvvvvvnnnnnnnnnnnnnnnnnn wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww';\r\nVexp=101045724;\r\nval=train(s);\r\nassert(isequal(Vexp,val))\r\n%%\r\n%s='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk eeeeeeeeeeeeeeeeeeexxxxxxxxxxxxxxxxxxxxxxxx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb yyyyyyyyyyyyyyyykkkkkkkkkk mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww oooo ggggggggggggggggyyyyyyyyyyyyyyy iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb iiiiiiii ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc hhhhhhhhhhhhhhggggggg hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwwaaaaaaa rrrrrrrrrrrrrrrr hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ooojjjjjjj rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ddddddddddddddddddddddddddddddddddddddddd iiiiiiiiiiiiiiiiiiiiiiiiiiiii","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":"2020-10-01T17:08:50.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2014-05-15T21:15:21.000Z","updated_at":"2020-10-01T17:08:50.000Z","published_at":"2014-05-15T21:59:11.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\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/3004486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Rd 1c: Reordering Train Cars (Large)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eDetermine number of sequences for set of strings under the constraint that all same characters must be contiguous. The large case could have 26! or more permutations.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 s, string of N space separated string segments of letters [a..z]. 1\u0026lt;=N\u0026lt;=100. Total letters \u0026lt;=100.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\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 val, number of possible sequences, modulo 1,000,000,007\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Small Train Case examples\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[ab bbbc cd Val=1 as only abbbbccd can be created\\naa aa bc c Val=4 aa gives 2 positions, aa'aa''bcc,aa''aa'bcc, bcccaa'aa'',bcccaa''aa'\\nabc bcd  Val=0 as c is internal and thus can not connect to c of abc]]\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTheory:\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://www.mathworks.com/matlabcentral/cody/problems/2324-gjam-2014-rd-1c-train-cars\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eTrain Small Spoilers\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLarge Case specific info. See\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://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eUsage of java math\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e for unlimited precision. Note intValue gives more precision than floatValue. No java factorial exists so a function, non-recursive, is suggested. The small solution can be converted via java BigInteger factorial, mod, multiply, and intValue to solve the large case.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAdditional GJam solutions can be found at\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://go-hero.net/jam\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eExample GJam Matlab solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Select Find Solutions, change Language to Matlab. The Test Suite, at the bottom, contains a full GJam Small Matlab solution. No Valid Matlab solutions were submitted during the contest.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":1876,"title":"GJam: 2013 China Event: Name Sorting","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p2 GJam 2013 China Moist\u003e. The problem is Codified by making the input a cell array of names.\r\n\r\nThe Challenge involves a serial card sorting machine that places card (i+1) in its best position, 1 thru i, if the name on card (i+1) is lexicographically greater than the name on card (i). The machine continues thru the end of the deck. The machine then restarts at card 1 until the order is correct. The output to return is the number of card insertions. The character values follow ascii codes with Space \u003c A:Z \u003c a:z. A shorter name is less than an extended name (Ab\u003cAbe)\r\n\r\n*Input:* names  ( cell array of names )\r\n\r\n*Output:* Insertions  (count of card insertions required)\r\n\r\n*Competition Summary:*  Best Time 6 minutes, 793/1049 correct\r\n\r\n*Example:*\r\n\r\nnames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\r\n\r\nClearly takes 3 card insertions. Start (SRJD)  moves [(RSJD) (JRSD) (DJRS)]","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p2\"\u003eGJam 2013 China Moist\u003c/a\u003e. The problem is Codified by making the input a cell array of names.\u003c/p\u003e\u003cp\u003eThe Challenge involves a serial card sorting machine that places card (i+1) in its best position, 1 thru i, if the name on card (i+1) is lexicographically greater than the name on card (i). The machine continues thru the end of the deck. The machine then restarts at card 1 until the order is correct. The output to return is the number of card insertions. The character values follow ascii codes with Space \u0026lt; A:Z \u0026lt; a:z. A shorter name is less than an extended name (Ab\u0026lt;Abe)\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e names  ( cell array of names )\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Insertions  (count of card insertions required)\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e  Best Time 6 minutes, 793/1049 correct\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003enames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\u003c/p\u003e\u003cp\u003eClearly takes 3 card insertions. Start (SRJD)  moves [(RSJD) (JRSD) (DJRS)]\u003c/p\u003e","function_template":"function cost=sort_cost(names)\r\n% names is a cell array\r\n  cost=0;\r\nend","test_suite":"%%\r\ntic\r\nnames={'Daniil Barantsev' 'Maria Balaba' 'Krisztina Barta' 'Patrice Archetto' 'Petra Arponen' 'Giovanna Almeida Leto' 'Tanith Belbin' 'Melania Albea' 'Lubov Bakirova' 'Mao Asada' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Fedor Andreev' 'Alessia Aureli' };\r\nexp=1;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jeremy Allen' 'Vazgen Azrojan' 'Zabato Bebe' 'An Ni' 'Vladimir Belomoin' 'Julia Beloglazova' 'Irina Babenko' 'Vitali Baranov' 'Vadim Akolzin' 'Mai Asada' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Babkin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mary Grace Baldo' 'Dmitri Antoni' 'Andrew Bassi' 'Tanith Belbin' 'Emilia Ahsan' 'Adrian Alvarado' 'Michael Bahoric' 'Vitali Babkin' 'Charlotte Belair' 'Annie Bellemare' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Baranov' 'William Beier' 'Charlotte Belair' 'Andrei Bekh' 'Letizia Alessandrini' 'Oksana Baiul' 'Felicia Beck' 'Margaret Albia' 'Johanna Allik' 'Christiane Berger' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vadim Akolzin' 'Dmitri Antoni' 'Petra Arponen' 'Felicia Beck' 'Letizia Alessandrini' 'Marina Anissina' 'Alisa Allapach' 'An Yang' 'Tobias Bayer' 'Imola Antal' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Stuart Beckingham' 'Ryan Arnold' 'Vazgen Azrojan' 'Oksana Baiul' 'Laurent Alvarez' 'Vitali Baranov' 'Tayfun Anar' 'Andrei Bekh' 'Evan Bates' 'Ilia Averbukh' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alibel Alegre' 'Alla Beknazarova' 'Andrew Bassi' 'Megan Allely' 'Elladj Balde' 'Tatiana Basova' 'Olga Akimova' 'Marta Andrade' 'Mao Asada' 'Becky Bereswill' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Laurent Alvarez' 'Mary Grace Baldo' 'Julia Abolina' 'Krisztina Barta' 'Marina Aganina' 'Becky Bereswill' 'Olga Akimova' 'Vazgen Azrojan' 'Elena Berezhnaya' 'Yann Abback' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mao Asada' 'Vitali Baranov' 'Rinata Araslanova' 'Margaret Albia' 'Giovanna Almeida Leto' 'Hanna Asadchaya' 'Andrew Bassi' 'Marina Anissina' 'Tayfun Anar' 'Birce Atabey' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\r\nexp=3;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Marina Anissina' 'Valentina Anselmi' 'Spencer Barnes' 'Ivan Bariev' 'Miki Ando' 'Alexandra Baurina' 'Maria Balaba' 'Andrew Bassi' 'Imola Antal' 'Anastasia Belova' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Felicia Beck' 'William Beier' 'John Baldwin' 'Julia Beloglazova' 'Margaret Albia' 'Colette Appel' 'Maria Balaba' 'Olga Akimova' 'Daniil Barantsev' 'Sara Beikircher' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Petra Arponen' 'Christina Beier' 'Alexei Beletski' 'Tayfun Anar' 'Saulius Ambrulevicius' 'Patrice Archetto' 'Rinata Araslanova' 'Sofia Bardakov' 'Alisa Allapach' 'Nadine Ahmed' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'Kevin Alves' 'Adrian Alvarado' 'Florent Amodio' 'Andrei Bekh' 'Alisa Agafonova' 'Gabor Balint' 'Giovanna Almeida Leto' 'Letizia Alessandrini' 'Oksana Baiul' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alisa Agafonova' 'Kevin Alves' 'Laurent Alvarez' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Miki Ando' 'Gloria Agogliati' 'An Yang' 'Felicia Beck' 'Tobias Bayer' 'Vitali Babkin' 'Andrei Bekh' 'Ivan Bariev' 'Melania Albea' 'Florent Amodio' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alla Beknazarova' 'Erica Archambault' 'Fedor Andreev' 'Felicia Beck' 'Irina Babenko' 'Krisztian Andraska' 'Mai Asada' 'Marina Aganina' 'Melania Albea' 'Vadim Akolzin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Michael Bahoric' 'Evan Bates' 'Olga Akimova' 'Emilia Ahsan' 'Vitali Baranov' 'Erica Archambault' 'Charlotte Belair' 'Alexandra Baurina' 'Tayfun Anar' 'Vera Bazarova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Vera Bazarova' 'Spencer Barnes' 'Annie Bellemare' 'Krisztina Barta' 'Olga Akimova' 'Vadim Akolzin' 'Veronika Benesova' 'Adrian Alvarado' 'Alexander Abt' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Gloria Agogliati' 'Elladj Balde' 'Colette Appel' 'An Yang' };\r\nexp=4;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Hanna Asadchaya' 'Ian Beharry' 'Julia Beloglazova' 'Michael Bahoric' 'Shizuka Arakawa' 'Spencer Barnes' 'Vera Bazarova' 'Vladimir Belomoin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Emilia Ahsan' 'Alisa Allapach' 'Felicia Beck' 'Engin Ali Artan' 'Valentina Anselmi' 'Alexander Abt' 'Jill Bakker' 'Jody Annandale' 'Nina Bates' 'Irina Babenko' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Evan Bates' 'Sergei Baranov' 'Rie Arikawa' 'Florent Amodio' 'Nadine Ahmed' 'Alla Beknazarova' 'Sofia Bardakov' 'Alexander Abt' 'Birce Atabey' 'Charlotte Belair' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexander Abt' 'Charlotte Belair' 'Kristen Avis' 'Nadine Ahmed' 'Tanith Belbin' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Bogdan Berezenko' 'Veronika Benesova' 'Sarah Abitbol' 'Christiane Berger' 'Tayfun Anar' 'Giovanna Almeida Leto' 'Michael Bahoric' 'John Baldwin' 'Elladj Balde' 'Jill Bakker' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Elvis Stojko' 'Evgeni Plushenko' 'KristiYamaguchi' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztian Andraska' 'Katarina Babalova' 'Annie Bellemare' 'Melania Albea' 'Petra Arponen' 'Irina Babenko' 'Johanna Allik' 'Sara Beikircher' 'Charlotte Belair' 'Miki Ando' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Oksana Baiul' 'MichelleKwan' };\r\nexp=1;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexei Beletski' 'Joelle Bastiaans' 'Alisa Allapach' 'Alisa Agafonova' 'Vladimir Belomoin' 'Letizia Alessandrini' 'Krisztina Barta' 'Becky Bereswill' 'Benjamin Agosto' 'Michael Bahoric' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Margaret Albia' 'Johanna Allik' 'Daniil Barantsev' 'Camilla Andersen' 'Andrei Bekh' 'Alla Beknazarova' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alisa Allapach' 'Andrew Bassi' 'Daniil Barantsev' 'Hanna Asadchaya' 'Imola Antal' 'Jeremy Abbott' 'Jill Bakker' 'Marina Anissina' 'Rinata Araslanova' 'Shizuka Arakawa' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Tayfun Anar' 'Rinata Araslanova' 'Nina Bates' 'Michael Bahoric' 'Julia Abolina' 'Jeremy Abbott' 'Ian Beharry' 'Engin Ali Artan' 'Colette Appel' 'Birce Atabey' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Melania Albea' 'Nadine Ahmed' 'Miki Ando' 'Alexei Beletski' 'Florent Amodio' 'Jake Bennett' 'Camilla Andersen' 'Jeremy Allen' 'Rie Arikawa' 'Kristen Avis' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Laurent Alvarez' 'Katarina Babalova' 'Shizuka Arakawa' 'Elladj Balde' 'Daniil Barantsev' 'Gabor Balint' 'Adrian Alvarado' 'Andrew Bassi' 'Anastasia Belova' 'Krisztina Barta' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexandra Baurina' 'Jake Bennett' 'Marina Aganina' 'Marina Anissina' 'Vadim Akolzin' 'William Beier' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Adrian Alvarado' 'Alisa Agafonova' 'Charlotte Belair' 'Evan Bates' 'Gloria Agogliati' 'Pascale Bergeron' 'Sarah Abitbol' 'Stuart Beckingham' 'Tayfun Anar' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Miguel Ballesteros' 'Julia Beloglazova' 'Eve Bentley' 'Spencer Barnes' 'Jeremy Allen' 'Megan Allely' 'Katarina Babalova' 'Birce Atabey' 'Jeremy Abbott' 'Vladimir Belomoin' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Engin Ali Artan' 'Christiane Berger' 'Petra Arponen' 'Veronika Benesova' 'Vera Bazarova' 'Andrew Bassi' 'Anastasia Belova' 'Kristen Avis' 'Margaret Albia' 'Alexei Beletski' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexandra Baurina' 'Gabor Balint' 'Emili Arm' 'Elena Berezhnaya' 'Tanith Belbin' 'Dmitri Antoni' 'Adrian Alvarado' 'Melania Albea' 'Andrew Bassi' 'Engin Ali Artan' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Gabor Balint' 'Imola Antal' 'Mao Asada' 'Jeremy Allen' 'Hanna Asadchaya' 'Charlotte Belair' 'Evan Bates' 'Alexei Beletski' 'William Beier' 'Michael Bahoric' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Giovanna Almeida Leto' 'Gabor Balint' 'Krisztian Andraska' 'Benjamin Agosto' 'Evan Bates' 'Maria Balaba' 'Marta Andrade' 'Ian Beharry' 'Tatiana Basova' 'Rie Arikawa' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexandra Baurina' 'Imola Antal' 'Evan Bates' 'Felicia Beck' 'Ian Beharry' 'Bogdan Berezenko' 'Becky Bereswill' 'Michael Bahoric' 'Tayfun Anar' 'Stuart Beckingham' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Charlotte Belair' 'An Yang' 'Paolo Bacchini' 'Olga Akimova' 'Vitali Baranov' 'Spencer Barnes' 'Valentina Anselmi' 'Annie Bellemare' 'Mary Grace Baldo' 'Ivan Bariev' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Katarina Babalova' 'Bogdan Berezenko' 'Marta Andrade' 'Vadim Akolzin' 'Spencer Barnes' 'Michael Bahoric' 'Krisztian Andraska' 'Alibel Alegre' 'Emilia Ahsan' 'Beril Bektas' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Birce Atabey' 'Anastasia Belova' 'Tobias Bayer' 'Kristen Avis' 'Rima Beliy' 'Andrew Bassi' 'Letizia Alessandrini' 'Alexei Beletski' 'Julia Abolina' 'Evan Bates' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztian Andraska' 'Sarah Abitbol' 'Kristen Avis' 'Tayfun Anar' 'Vadim Akolzin' 'Letizia Alessandrini' 'Margaret Albia' 'Joelle Bastiaans' 'Pascale Bergeron' 'Elladj Balde' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Hanna Asadchaya' 'Johanna Allik' 'Nadine Ahmed' 'Sarah Abitbol' 'Elladj Balde' 'Jake Bennett' 'Saulius Ambrulevicius' 'Laurent Alvarez' 'Beril Bektas' 'Krisztina Barta' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Spencer Barnes' 'Shizuka Arakawa' 'Sara Beikircher' 'Ryan Arnold' 'Pascale Bergeron' 'Hanna Asadchaya' 'Bogdan Berezenko' 'Annie Bellemare' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Patrice Archetto' 'Vera Bazarova' 'Miki Ando' 'Beril Bektas' 'Rie Arikawa' 'Adrian Alvarado' 'Rima Beliy' 'Fedor Andreev' 'Megan Allely' 'Nina Bates' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexei Beletski' 'Letizia Alessandrini' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Sofia Bardakov' 'Julia Abolina' 'Tayfun Anar' 'Miguel Ballesteros' 'Daniil Barantsev' 'Elladj Balde' 'John Baldwin' 'Alisa Agafonova' 'Benjamin Agosto' 'Vera Bazarova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Paolo Bacchini' 'Patrice Archetto' 'Anastasia Belova' 'Emili Arm' 'Ian Beharry' 'Evan Bates' 'Kevin Alves' 'Gabor Balint' 'Johanna Allik' 'Spencer Barnes' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Sergei Baranov' 'Mai Asada' 'Gabor Balint' 'Vazgen Azrojan' 'Christiane Berger' 'Alisa Allapach' 'Paolo Bacchini' 'An Yang' 'Lubov Bakirova' 'Stuart Beckingham' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Laurent Alvarez' 'Dmitri Antoni' 'Annie Bellemare' 'Veronika Benesova' 'Ivan Bariev' 'Emili Arm' 'An Yang' 'Colette Appel' 'Vitali Baranov' 'Fedor Andreev' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Birce Atabey' 'Camilla Andersen' 'Charlotte Belair' 'Daniil Barantsev' 'Krisztian Andraska' 'Mai Asada' 'Marina Aganina' 'Mary Grace Baldo' 'Shizuka Arakawa' 'Joelle Bastiaans' };\r\nexp=1;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Babkin' 'Colette Appel' 'Saulius Ambrulevicius' 'Fedor Andreev' 'Sofia Bardakov' 'Daniil Barantsev' 'Kevin Alves' 'Birce Atabey' 'Becky Bereswill' 'Letizia Alessandrini' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Ilia Averbukh' 'Jake Bennett' 'Julia Beloglazova' 'Petra Arponen' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Pascale Bergeron' 'Engin Ali Artan' 'Zabato Bebe' 'Shizuka Arakawa' 'Vazgen Azrojan' 'Elena Berezhnaya' 'Alisa Agafonova' 'Alisa Allapach' 'Laurent Alvarez' 'Marta Andrade' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztina Barta' 'Marta Andrade' 'Andrei Bekh' 'Stuart Beckingham' 'Pascale Bergeron' 'Sara Beikircher' 'Ivan Bariev' 'Gabor Balint' 'Dmitri Antoni' 'Mao Asada' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Tanith Belbin' 'Marta Andrade' 'Zabato Bebe' 'Emilia Ahsan' 'Johanna Allik' 'Christina Beier' 'Alexander Abt' 'Shizuka Arakawa' 'Eve Bentley' 'Sara Beikircher' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Julia Abolina' 'Felicia Beck' 'Vadim Akolzin' 'Letizia Alessandrini' 'Gloria Agogliati' 'Olga Akimova' 'Christina Beier' 'Tayfun Anar' 'Adrian Alvarado' 'Elena Berezhnaya' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alessia Aureli' 'Mao Asada' 'Mai Asada' 'Nadine Ahmed' 'Jeremy Abbott' 'Gabor Balint' 'Marina Anissina' 'Birce Atabey' 'Miguel Ballesteros' 'Beril Bektas' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Birce Atabey' 'Emilia Ahsan' 'Felicia Beck' 'Jeremy Allen' 'Oksana Baiul' 'Alisa Agafonova' 'Florent Amodio' 'Joelle Bastiaans' 'Michael Bahoric' 'Saulius Ambrulevicius' };\r\nexp=4;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Benjamin Agosto' 'Vitali Babkin' 'Vitali Baranov' 'Bogdan Berezenko' 'Mai Asada' 'Beril Bektas' 'Hanna Asadchaya' 'Camilla Andersen' 'An Yang' 'Rie Arikawa' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Tobias Bayer' 'Joelle Bastiaans' 'Alibel Alegre' 'Annie Bellemare' 'Alessia Aureli' 'Emili Arm' 'Florent Amodio' 'Julia Beloglazova' 'Birce Atabey' 'Sofia Bardakov' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Giovanna Almeida Leto' 'Alexandra Baurina' 'Marta Andrade' 'Julia Beloglazova' 'Felicia Beck' 'Johanna Allik' 'Rima Beliy' 'Gloria Agogliati' 'Rie Arikawa' 'Eve Bentley' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Katarina Babalova' 'Elena Berezhnaya' };\r\nexp=2;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Adrian Alvarado' 'Rinata Araslanova' 'Vitali Baranov' 'Yann Abback' 'Emili Arm' 'Marina Anissina' 'Engin Ali Artan' 'Jeremy Abbott' 'Alessia Aureli' };\r\nexp=9;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'John Baldwin' 'Laurent Alvarez' 'Erica Archambault' 'Emilia Ahsan' 'Johanna Allik' 'Hanna Asadchaya' 'Alexandra Baurina' 'Vitali Babkin' 'Rinata Araslanova' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Fedor Andreev' 'Shizuka Arakawa' 'Oksana Baiul' 'Kevin Alves' 'Jody Annandale' 'Christiane Berger' 'Sofia Bardakov' 'Emilia Ahsan' 'Ryan Arnold' 'Tayfun Anar' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Sergei Baranov' 'Saulius Ambrulevicius' 'Michael Bahoric' 'Evan Bates' 'An Ni' 'Tobias Bayer' 'Christina Beier' 'Maria Balaba' 'Emili Arm' 'Jody Annandale' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alexei Beletski' 'Florent Amodio' 'Marina Anissina' 'Margaret Albia' 'Michael Bahoric' 'Miki Ando' 'Gloria Agogliati' 'Evan Bates' 'Becky Bereswill' 'Alexandra Baurina' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'Emilia Ahsan' 'Ian Beharry' 'Paolo Bacchini' 'Maria Balaba' 'Giovanna Almeida Leto' 'An Yang' 'Michael Bahoric' 'Fedor Andreev' 'Alisa Agafonova' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Jill Bakker' 'Vazgen Azrojan' 'Sara Beikircher' 'Eve Bentley' 'Alla Beknazarova' 'Pascale Bergeron' 'Tatiana Basova' 'Elena Berezhnaya' 'Oksana Baiul' 'Zabato Bebe' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alessia Aureli' 'Alexei Beletski' 'Alisa Agafonova' 'Anastasia Belova' 'Colette Appel' 'Kevin Alves' 'Veronika Benesova' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Zabato Bebe' 'Tayfun Anar' 'Saulius Ambrulevicius' 'Miguel Ballesteros' 'Maria Balaba' 'Mai Asada' 'Lubov Bakirova' 'Edward Alton' 'Birce Atabey' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Miki Ando' 'Benjamin Agosto' 'Jeremy Allen' 'Adrian Alvarado' 'Alisa Allapach' 'Sofia Bardakov' 'Joelle Bastiaans' 'Margaret Albia' 'Erica Archambault' 'Kevin Alves' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Julia Beloglazova' 'Marina Aganina' 'Alisa Agafonova' 'Alexei Beletski' 'Camilla Andersen' 'Giovanna Almeida Leto' 'Colette Appel' 'Nina Bates' 'Tanith Belbin' 'Vitali Baranov' };\r\nexp=5;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mao Asada' 'Dmitri Antoni' 'Marina Aganina' 'Annie Bellemare' 'Zabato Bebe' 'Andrew Bassi' 'Valentina Anselmi' 'Michael Bahoric' 'Jake Bennett' 'Mary Grace Baldo' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Shizuka Arakawa' 'Stuart Beckingham' 'Jeremy Abbott' 'Nadine Ahmed' 'Olga Akimova' 'Vadim Akolzin' 'Becky Bereswill' 'Charlotte Belair' 'Gabor Balint' 'Margaret Albia' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Beril Bektas' 'Stuart Beckingham' 'Jill Bakker' 'Daniil Barantsev' 'Sarah Abitbol' 'Benjamin Agosto' 'Andrei Bekh' 'Julia Beloglazova' 'Alibel Alegre' 'Nina Bates' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Charlotte Belair' 'Gloria Agogliati' 'Miguel Ballesteros' 'Hanna Asadchaya' 'Ilia Averbukh' 'Katarina Babalova' 'Tobias Bayer' 'Marta Andrade' 'Petra Arponen' 'Paolo Bacchini' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Evan Bates' 'Imola Antal' 'Eve Bentley' 'Miguel Ballesteros' 'Emili Arm' 'Rie Arikawa' 'Patrice Archetto' 'Julia Abolina' 'Jeremy Allen' 'Edward Alton' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mary Grace Baldo' 'William Beier' 'Mai Asada' 'Vazgen Azrojan' 'Marina Anissina' 'Krisztian Andraska' 'Ivan Bariev' 'Tayfun Anar' 'Spencer Barnes' 'Maria Balaba' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Lubov Bakirova' 'Alexei Beletski' 'Mai Asada' 'William Beier' 'Shizuka Arakawa' 'Alla Beknazarova' 'Alessia Aureli' 'Miguel Ballesteros' 'Rinata Araslanova' 'Alexander Abt' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vitali Baranov' 'Patrice Archetto' 'Charlotte Belair' 'Maria Balaba' 'Marina Anissina' 'Oksana Baiul' 'Alla Beknazarova' 'Shizuka Arakawa' 'Andrei Bekh' 'Zabato Bebe' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Krisztina Barta' 'Yann Abback' 'Johanna Allik' 'Andrew Bassi' 'Irina Babenko' 'Fedor Andreev' 'Emilia Ahsan' 'Mary Grace Baldo' 'Tanith Belbin' 'Spencer Barnes' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Shizuka Arakawa' 'Tanith Belbin' 'Hanna Asadchaya' 'Mai Asada' 'Krisztian Andraska' 'Gabor Balint' 'Sofia Bardakov' 'Gloria Agogliati' 'Valentina Anselmi' 'Alisa Agafonova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Ilia Averbukh' 'Andrei Bekh' 'Imola Antal' 'Mao Asada' 'Colette Appel' 'Emili Arm' 'Irina Babenko' 'Sergei Baranov' 'Elena Berezhnaya' 'Julia Beloglazova' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Ryan Arnold' 'Rie Arikawa' 'Nina Bates' 'Katarina Babalova' 'Jeremy Allen' 'Charlotte Belair' 'Alexei Beletski' };\r\nexp=6;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Vladimir Belomoin' 'Melania Albea' 'Florent Amodio' 'An Ni' 'John Baldwin' 'Jeremy Abbott' 'Zabato Bebe' 'Olga Akimova' 'Petra Arponen' 'Jake Bennett' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Alisa Agafonova' };\r\nexp=0;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Elladj Balde' 'Charlotte Belair' 'Bogdan Berezenko' 'Julia Abolina' 'Alexandra Baurina' 'Sergei Baranov' 'Megan Allely' 'Marta Andrade' 'Anastasia Belova' 'Ivan Bariev' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Gloria Agogliati' 'Alessia Aureli' 'Julia Abolina' 'Charlotte Belair' 'Andrew Bassi' 'Gabor Balint' 'Vladimir Belomoin' 'Tanith Belbin' 'Patrice Archetto' 'Shizuka Arakawa' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Mary Grace Baldo' 'Florent Amodio' 'Vitali Babkin' 'Engin Ali Artan' 'Olga Akimova' 'Maria Balaba' 'Jeremy Allen' 'Margaret Albia' 'Ivan Bariev' 'Miguel Ballesteros' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Andrew Bassi' 'Tobias Bayer' 'Hanna Asadchaya' 'Krisztian Andraska' 'Vladimir Belomoin' 'Erica Archambault' 'Ilia Averbukh' 'Ivan Bariev' 'Margaret Albia' 'Michael Bahoric' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Hanna Asadchaya' 'Gloria Agogliati' 'Camilla Andersen' 'Veronika Benesova' 'Alisa Allapach' 'Charlotte Belair' 'Emili Arm' 'Jake Bennett' 'An Yang' 'Krisztina Barta' };\r\nexp=8;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\n%%\r\nnames={'Patrice Archetto' 'Christina Beier' 'Ivan Bariev' 'Rima Beliy' 'Alisa Allapach' 'Paolo Bacchini' 'William Beier' 'An Ni' 'Spencer Barnes' 'Vera Bazarova' };\r\nexp=7;\r\ncost=sort_cost(names);\r\nassert(cost==exp)\r\ntoc\r\n\r\n","published":true,"deleted":false,"likes_count":0,"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-09-16T04:35:47.000Z","updated_at":"2025-11-21T08:36:28.000Z","published_at":"2013-09-16T04:51:41.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/2933486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Moist\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The problem is Codified by making the input a cell array of names.\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 Challenge involves a serial card sorting machine that places card (i+1) in its best position, 1 thru i, if the name on card (i+1) is lexicographically greater than the name on card (i). The machine continues thru the end of the deck. The machine then restarts at card 1 until the order is correct. The output to return is the number of card insertions. The character values follow ascii codes with Space \u0026lt; A:Z \u0026lt; a:z. A shorter name is less than an extended name (Ab\u0026lt;Abe)\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 names ( cell array of names )\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 Insertions (count of card insertions required)\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time 6 minutes, 793/1049 correct\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\u003eExample:\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\u003enames={'Stuart Beckingham' 'Rinata Araslanova' 'Jeremy Abbott' 'Daniil Barantsev' };\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\u003eClearly takes 3 card insertions. Start (SRJD) moves [(RSJD) (JRSD) (DJRS)]\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\"}]}"},{"id":1883,"title":"GJam 2013 China Event: Happy Teams 100 Pairs","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p0 GJam 2013 China Bad Horse\u003e 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.\r\n\r\nThe 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. \r\n\r\n*Input:* conflicted name pairs  (cell array of pairs of names)\r\n\r\n*Output:* TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\r\n\r\n*Competition Summary:* Best Time of 11 minutes, 707 out of 776 correct","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p0\"\u003eGJam 2013 China Bad Horse\u003c/a\u003e 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.\u003c/p\u003e\u003cp\u003eThe 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.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e conflicted name pairs  (cell array of pairs of names)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e Best Time of 11 minutes, 707 out of 776 correct\u003c/p\u003e","function_template":"function TF=Make_Teams(names)\r\n TF=0;\r\nend","test_suite":"%%\r\ntic\r\nnames={{'King_Ghidorah' 'Harley_Quinn'} {'Dr_Horrible' 'Queen_Of_Fables'} {'Rad' 'Lady_Quark'} {'Yellowjacket' 'Dansen_Macabre'} {'Decay' 'Sun_Girl'} {'Typhoid_Mary' 'Animora'} {'Lady_Octopus' 'Lady_Quark'} {'Princess_Python' 'Scandal'} {'Cyborgirl' 'Scandal'} {'Margaret_Love' 'Queen_Of_Fables'} {'Decay' 'Talia_Al_Ghul'} {'Typhoid_Mary' 'Superwoman'} {'Cyborgirl' 'Dr_Evil'} {'Typhoid_Mary' 'Mothergod'} {'Star_Sapphire' 'Coachwhip'} {'Livewire' 'Dr_Evil'} {'King_Ghidorah' 'Sun_Girl'} {'Golddigger' 'Dansen_Macabre'} {'Star_Sapphire' 'Shimmer'} {'Zaladane' 'Mephista'} {'Decay' 'Harley_Quinn'} {'Zaladane' 'Lady_Shiva'} {'Tigress' 'Magenta'} {'The_Crimson_Ghost' 'Shimmer'} {'Typhoid_Mary' 'Mephista'} {'Princess_Python' 'Shimmer'} {'Cyborgirl' 'Abominatrix'} {'Magpie' 'Dansen_Macabre'} {'Magpie' 'Talia_Al_Ghul'} {'Lady_Octopus' 'Talia_Al_Ghul'} {'Livewire' 'Mephista'} {'Madame_Rouge' 'Prank'} {'The_Crimson_Ghost' 'Scandal'} {'Princess_Python' 'Superwoman'} {'Yellowjacket' 'Lazara'} {'Cyborgirl' 'Harley_Quinn'} {'Roulette' 'Sun_Girl'} {'Tigress' 'Prank'} {'Typhoid_Mary' 'Harley_Quinn'} {'The_Crimson_Ghost' 'Dansen_Macabre'} {'Cyborgirl' 'Shimmer'} {'Decay' 'Lagomorph'} {'The_Crimson_Ghost' 'Lady_Quark'} {'Decay' 'Mothergod'} {'Madame_Rouge' 'Talia_Al_Ghul'} {'Cyborgirl' 'Mephista'} {'Typhoid_Mary' 'Scandal'} {'Yellowjacket' 'Prank'} {'Madame_Rouge' 'Lazara'} {'Margaret_Love' 'Dansen_Macabre'} {'Yellowjacket' 'Dr_Evil'} {'Roulette' 'Superwoman'} {'Princess_Python' 'Mothergod'} {'Margaret_Love' 'Mothergod'} {'Golddigger' 'Lazara'} {'Margaret_Love' 'Harley_Quinn'} {'Dr_Horrible' 'Lazara'} {'Osira' 'Queen_Of_Fables'} {'King_Ghidorah' 'Coachwhip'} {'Magpie' 'Dr_Evil'} {'King_Ghidorah' 'Shimmer'} {'Cyborgirl' 'Coachwhip'} {'Lady_Octopus' 'Lagomorph'} {'Princess_Python' 'Dansen_Macabre'} {'The_Crimson_Ghost' 'Lady_Shiva'} {'Star_Sapphire' 'Superwoman'} {'Rad' 'Mothergod'} {'King_Ghidorah' 'Lazara'} {'Dr_Horrible' 'Mothergod'} {'Margaret_Love' 'Prank'} {'Rad' 'Dr_Evil'} {'Typhoid_Mary' 'Coachwhip'} {'King_Ghidorah' 'Talia_Al_Ghul'} {'Lady_Octopus' 'Mephista'} {'King_Ghidorah' 'Magenta'} {'Princess_Python' 'Sun_Girl'} {'Princess_Python' 'Animora'} {'Magpie' 'Superwoman'} {'Livewire' 'Lady_Shiva'} {'Zaladane' 'Sun_Girl'} {'Rad' 'Mephista'} {'Margaret_Love' 'Shimmer'} {'Magpie' 'Mephista'} {'Lady_Octopus' 'Scandal'} {'Osira' 'Sun_Girl'} {'Decay' 'Dansen_Macabre'} {'Typhoid_Mary' 'Abominatrix'} {'Osira' 'Lady_Quark'} {'The_Crimson_Ghost' 'Queen_Of_Fables'} {'Zaladane' 'Scandal'} {'Typhoid_Mary' 'Dr_Evil'} {'Yellowjacket' 'Animora'} {'Decay' 'Queen_Of_Fables'} {'Lady_Octopus' 'Coachwhip'} {'Margaret_Love' 'Superwoman'} {'Princess_Python' 'Lazara'} {'Tigress' 'Lagomorph'} {'Lady_Octopus' 'Superwoman'} {'Decay' 'Lady_Shiva'} {'Golddigger' 'Animora'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Typhoid_Mary' 'Amazing_Grace'} {'New_Wave' 'White_Rabbit'} {'Lazara' 'Shiv'} {'Valentina' 'Zaladane'} {'Gru' 'Magenta'} {'New_Wave' 'Shiv'} {'New_Wave' 'Madame_Masque'} {'Valentina' 'Doctor_Cyber'} {'Silver_Banshee' 'Emerald_Empress'} {'Unicron' 'Madame_Masque'} {'Blue_Snowman' 'Mothergod'} {'Valentina' 'Shiv'} {'Lazara' 'Doctor_Cyber'} {'Plastique' 'Madame_Masque'} {'Talia_Al_Ghul' 'Osira'} {'Lady_Clay' 'Star_Sapphire'} {'Unicron' 'Amazing_Grace'} {'Typhoid_Mary' 'Shiv'} {'Silver_Banshee' 'Tala'} {'Harley_Quinn' 'Asbestos_Lady'} {'Scandal' 'Magenta'} {'Titania' 'Genevieve_Savidge'} {'Typhoid_Mary' 'Animora'} {'Harley_Quinn' 'Animora'} {'Valentina' 'Amazing_Grace'} {'Plastique' 'Livewire'} {'Harley_Quinn' 'Star_Sapphire'} {'Lazara' 'Osira'} {'Decay' 'Mephista'} {'Superwoman' 'Emerald_Empress'} {'Titania' 'Doctor_Cyber'} {'Titania' 'Star_Sapphire'} {'Spider_Girl' 'Star_Sapphire'} {'Titania' 'Magenta'} {'Unicron' 'Osira'} {'Unicron' 'Genevieve_Savidge'} {'Talia_Al_Ghul' 'Hypnota'} {'Decay' 'Asbestos_Lady'} {'Silver_Banshee' 'Asbestos_Lady'} {'Scandal' 'Star_Sapphire'} {'Lashina' 'Livewire'} {'Decay' 'Mothergod'} {'Blue_Snowman' 'Genevieve_Savidge'} {'Spider_Girl' 'Mephista'} {'Blue_Snowman' 'Osira'} {'Decay' 'Madame_Masque'} {'Superwoman' 'Livewire'} {'Titania' 'Livewire'} {'Lady_Quark' 'Shiv'} {'Plastique' 'Doctor_Cyber'} {'Decay' 'Magenta'} {'Lazara' 'Livewire'} {'Lady_Quark' 'Mothergod'} {'Dr_Horrible' 'Emerald_Empress'} {'Scandal' 'Mephista'} {'Lazara' 'Magenta'} {'Gru' 'Poundcakes'} {'Superwoman' 'Animora'} {'Blue_Snowman' 'Shiv'} {'Silver_Banshee' 'Animora'} {'Plastique' 'White_Rabbit'} {'Lazara' 'Mothergod'} {'Scandal' 'Doctor_Cyber'} {'Spider_Girl' 'Emerald_Empress'} {'Typhoid_Mary' 'Mephista'} {'Spider_Girl' 'Livewire'} {'Lashina' 'White_Rabbit'} {'Harley_Quinn' 'Hypnota'} {'Dr_Horrible' 'White_Rabbit'} {'Titania' 'Lady_Octopus'} {'New_Wave' 'Mothergod'} {'Silver_Banshee' 'Hypnota'} {'Harley_Quinn' 'Poundcakes'} {'Decay' 'Hypnota'} {'New_Wave' 'Osira'} {'Valentina' 'Star_Sapphire'} {'Silver_Banshee' 'Mothergod'} {'Lashina' 'Magenta'} {'Blue_Snowman' 'Magenta'} {'Titania' 'Mephista'} {'Silver_Banshee' 'White_Rabbit'} {'Lady_Quark' 'Lady_Octopus'} {'Spider_Girl' 'Tala'} {'Lashina' 'Gru'} {'Lashina' 'Mephista'} {'Lady_Quark' 'White_Rabbit'} {'Typhoid_Mary' 'Doctor_Cyber'} {'Harley_Quinn' 'Doctor_Cyber'} {'Unicron' 'Mothergod'} {'New_Wave' 'Lady_Octopus'} {'Titania' 'Tala'} {'Talia_Al_Ghul' 'Doctor_Cyber'} {'Dr_Horrible' 'Asbestos_Lady'} {'Lashina' 'Genevieve_Savidge'} {'Blue_Snowman' 'Madame_Masque'} {'Superwoman' 'Osira'} {'Lady_Clay' 'Zaladane'} {'Lady_Quark' 'Magenta'} {'Scandal' 'Madame_Masque'} {'Unicron' 'Poundcakes'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'White_Rabbit' 'Animora'} {'Rad' 'Plastique'} {'Devastation' 'Gru'} {'Margaret_Love' 'Zaladane'} {'Yellowjacket' 'Blue_Snowman'} {'Devastation' 'Animora'} {'Lady_Death' 'Syndrome'} {'Snapdragon' 'Titania'} {'Rad' 'Gru'} {'Tigress' 'Black_Mamba'} {'Spider_Girl' 'Zaladane'} {'Snapdragon' 'Plastique'} {'Golddigger' 'Duela_Dent'} {'Spider_Girl' 'Black_Mamba'} {'Lady_Clay' 'Lady_Shiva'} {'Lagomorph' 'Syndrome'} {'Golddigger' 'Poison_Ivy'} {'Lafety_Le_Fei' 'Duela_Dent'} {'Eviless' 'Titania'} {'Jason_Kreis' 'Blue_Snowman'} {'Golddigger' 'Gru'} {'Rad' 'Lady_Shiva'} {'Margaret_Love' 'Poundcakes'} {'Devastation' 'Superwoman'} {'Jason_Kreis' 'Gru'} {'Lady_Clay' 'Ursa'} {'Snapdragon' 'Animora'} {'Sun_Girl' 'Magpie'} {'Mist' 'Zaladane'} {'White_Rabbit' 'Poundcakes'} {'Tigress' 'Lady_Shiva'} {'Livewire' 'Poison_Ivy'} {'Eviless' 'Golden_Glider'} {'Margaret_Love' 'Lady_Quark'} {'Lady_Clay' 'Plastique'} {'Lady_Clay' 'Golden_Glider'} {'Madame_Masque' 'Titania'} {'Lady_Death' 'Golden_Glider'} {'Margaret_Love' 'Black_Mamba'} {'Tigress' 'Superwoman'} {'Lagomorph' 'Magpie'} {'Eviless' 'Dr_Evil'} {'Lady_Clay' 'Duela_Dent'} {'Snapdragon' 'Syndrome'} {'Golddigger' 'Lady_Quark'} {'Devastation' 'Golden_Glider'} {'Rad' 'Syndrome'} {'Snapdragon' 'Dr_Evil'} {'Yellowjacket' 'Animora'} {'Lady_Death' 'Fem_Paragon'} {'Margaret_Love' 'Animora'} {'Lady_Death' 'Dr_Evil'} {'Golddigger' 'Plastique'} {'Lagomorph' 'Gru'} {'Rampage' 'Plastique'} {'Jason_Kreis' 'Fem_Paragon'} {'Margaret_Love' 'Ursa'} {'Spider_Girl' 'Golden_Glider'} {'Rampage' 'Superwoman'} {'Eviless' 'Bombshell'} {'Golddigger' 'Dr_Evil'} {'Livewire' 'Syndrome'} {'Lady_Death' 'Zaladane'} {'Livewire' 'Lady_Quark'} {'Snapdragon' 'Black_Mamba'} {'Rad' 'Blue_Snowman'} {'Mist' 'Superwoman'} {'Yellowjacket' 'Superwoman'} {'Madame_Masque' 'Fem_Paragon'} {'Devastation' 'Syndrome'} {'Lady_Death' 'Ursa'} {'Madame_Masque' 'Gru'} {'Yellowjacket' 'Fem_Paragon'} {'White_Rabbit' 'Zaladane'} {'Spider_Girl' 'Syndrome'} {'Golddigger' 'Zaladane'} {'Livewire' 'Ursa'} {'Sun_Girl' 'Titania'} {'Tigress' 'Lady_Quark'} {'Snapdragon' 'Fem_Paragon'} {'Sun_Girl' 'Lady_Quark'} {'Yellowjacket' 'Ursa'} {'Madame_Masque' 'Plastique'} {'Lafety_Le_Fei' 'Black_Mamba'} {'Eviless' 'Fem_Paragon'} {'Sun_Girl' 'Lady_Shiva'} {'Yellowjacket' 'Magpie'} {'Yellowjacket' 'Gru'} {'White_Rabbit' 'Lady_Shiva'} {'White_Rabbit' 'Magpie'} {'Sun_Girl' 'Gru'} {'Jason_Kreis' 'Magpie'} {'Sun_Girl' 'Plastique'} {'Lagomorph' 'Poison_Ivy'} {'Lagomorph' 'Poundcakes'} {'Golddigger' 'Fem_Paragon'} {'Sun_Girl' 'Poison_Ivy'} {'Madame_Masque' 'Bombshell'} {'Lafety_Le_Fei' 'Magpie'} {'Mist' 'Ursa'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Amazing_Grace' 'Animora'} {'Plastique' 'Lady_Quark'} {'Lagomorph' 'Hypnota'} {'Princess_Python' 'Purgatori'} {'Plastique' 'Animora'} {'Princess_Python' 'Lashina'} {'Typhoid_Mary' 'Dansen_Macabre'} {'Queen_Bee' 'Lashina'} {'Golden_Glider' 'Decay'} {'Bombshell' 'Dansen_Macabre'} {'Bombshell' 'Blue_Snowman'} {'Madame_Rouge' 'Hypnota'} {'Mist' 'Duela_Dent'} {'Typhoid_Mary' 'Lady_Death'} {'Gru' 'The_Crimson_Ghost'} {'Mist' 'The_Lightning'} {'Syndrome' 'Harley_Quinn'} {'Dr_Evil' 'Silk_Fever'} {'Mist' 'Animora'} {'Typhoid_Mary' 'Blue_Snowman'} {'Gru' 'Poundcakes'} {'Deuce' 'Windfall'} {'Princess_Python' 'Windfall'} {'Golden_Glider' 'Lady_Clay'} {'Tigress' 'Duela_Dent'} {'Bombshell' 'Hypnota'} {'Plastique' 'Hypnota'} {'Leather' 'Blue_Snowman'} {'Tigress' 'Windfall'} {'Dr_Horrible' 'Dansen_Macabre'} {'Dr_Evil' 'Shimmer'} {'Deuce' 'Queen_Of_Fables'} {'Leather' 'Lady_Quark'} {'Plastique' 'Blue_Snowman'} {'Plastique' 'Poundcakes'} {'Amazing_Grace' 'Decay'} {'Mothergod' 'Windfall'} {'Lady_Vic' 'Harley_Quinn'} {'Amazing_Grace' 'Queen_Of_Fables'} {'The_Lightning' 'Black_Mamba'} {'Gru' 'Lady_Death'} {'Mist' 'Lady_Death'} {'Leather' 'Queen_Of_Fables'} {'Bombshell' 'Animora'} {'Bombshell' 'Lady_Quark'} {'Plastique' 'Silk_Fever'} {'Deuce' 'Blue_Snowman'} {'Queen_Bee' 'Hypnota'} {'Mothergod' 'Black_Mamba'} {'Gru' 'Silk_Fever'} {'Typhoid_Mary' 'Queen_Of_Fables'} {'Mothergod' 'Queen_Of_Fables'} {'Amazing_Grace' 'Lady_Quark'} {'Leather' 'Lady_Clay'} {'Syndrome' 'Queen_Of_Fables'} {'Syndrome' 'Shimmer'} {'Lagomorph' 'Animora'} {'Mothergod' 'The_Crimson_Ghost'} {'Plastique' 'Black_Mamba'} {'Queen_Bee' 'King_Ghidorah'} {'Typhoid_Mary' 'Silk_Fever'} {'Deuce' 'Animora'} {'Dr_Evil' 'Queen_Of_Fables'} {'Princess_Python' 'Poundcakes'} {'Tigress' 'Decay'} {'Plastique' 'Lady_Death'} {'Queen_Bee' 'Lady_Clay'} {'Typhoid_Mary' 'King_Ghidorah'} {'Dr_Evil' 'Lady_Clay'} {'Gru' 'Lashina'} {'Dr_Horrible' 'Lady_Quark'} {'Madame_Rouge' 'Animora'} {'Golden_Glider' 'Purgatori'} {'Deuce' 'Duela_Dent'} {'Lagomorph' 'Windfall'} {'Deuce' 'Lady_Quark'} {'The_Lightning' 'Poundcakes'} {'Dr_Evil' 'Lady_Quark'} {'Queen_Bee' 'Silk_Fever'} {'Lady_Vic' 'Animora'} {'Dr_Evil' 'Harley_Quinn'} {'Mothergod' 'Decay'} {'Princess_Python' 'Duela_Dent'} {'Lagomorph' 'Harley_Quinn'} {'Golden_Glider' 'Dansen_Macabre'} {'Leather' 'Lady_Death'} {'Syndrome' 'Blue_Snowman'} {'Mist' 'Blue_Snowman'} {'Bombshell' 'Poundcakes'} {'Amazing_Grace' 'Blue_Snowman'} {'Leather' 'Hypnota'} {'Typhoid_Mary' 'Windfall'} {'Mothergod' 'Poundcakes'} {'The_Lightning' 'Purgatori'} {'Madame_Rouge' 'The_Crimson_Ghost'} {'Syndrome' 'King_Ghidorah'} {'Plastique' 'Decay'} {'The_Lightning' 'Hypnota'} {'Amazing_Grace' 'Lady_Clay'} {'Syndrome' 'Dansen_Macabre'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Abominatrix'} {'Mai_Shen' 'Devastation'} {'Abominatrix' 'Mai_Shen'} {'Devastation' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Titania' 'Hypnota'} {'Trinity' 'Poison_Ivy'} {'Dansen_Macabre' 'New_Wave'} {'Emerald_Empress' 'Saturn_Queen'} {'Fem_Paragon' 'Hypnota'} {'White_Rabbit' 'Osira'} {'Duela_Dent' 'Dead_Bowie'} {'Poundcakes' 'Dead_Bowie'} {'Decay' 'New_Wave'} {'Decay' 'Shimmer'} {'Poundcakes' 'Mephista'} {'Zaladane' 'Osira'} {'Ursa' 'Hypnota'} {'Star_Sapphire' 'Lady_Vic'} {'Fem_Paragon' 'Shimmer'} {'Star_Sapphire' 'Golddigger'} {'Queen_Bee' 'Doctor_Cyber'} {'Amazing_Grace' 'Nyssa_Raatko'} {'Trinity' 'Hypnota'} {'Emerald_Empress' 'Nyssa_Raatko'} {'White_Rabbit' 'New_Wave'} {'Lady_Shiva' 'Mephista'} {'Amazing_Grace' 'Dead_Bowie'} {'Emerald_Empress' 'Mephista'} {'Zaladane' 'Devastation'} {'Zaladane' 'Mephista'} {'Lady_Shiva' 'New_Wave'} {'Fem_Paragon' 'Nyssa_Raatko'} {'Zaladane' 'Nyssa_Raatko'} {'Ursa' 'Golddigger'} {'Trinity' 'Purgatori'} {'Ursa' 'Osira'} {'The_Crimson_Ghost' 'Shimmer'} {'Fake_Thomas_Jefferson' 'Ingra'} {'Decay' 'Silver_Banshee'} {'Decay' 'Hypnota'} {'Zaladane' 'Sun_Girl'} {'Ursa' 'Eviless'} {'The_Crimson_Ghost' 'New_Wave'} {'Fake_Thomas_Jefferson' 'New_Wave'} {'Emerald_Empress' 'Amy_Madison'} {'Fake_Thomas_Jefferson' 'Poison_Ivy'} {'Fem_Paragon' 'Ingra'} {'Amazing_Grace' 'Osira'} {'Queen_Bee' 'Lady_Vic'} {'Zaladane' 'Eviless'} {'Decay' 'Doctor_Cyber'} {'The_Crimson_Ghost' 'Ingra'} {'Star_Sapphire' 'Ingra'} {'Ursa' 'Nyssa_Raatko'} {'Animora' 'Plastique'} {'Fem_Paragon' 'Silver_Banshee'} {'Decay' 'Dead_Bowie'} {'Duela_Dent' 'Devastation'} {'Animora' 'Saturn_Queen'} {'The_Crimson_Ghost' 'Devastation'} {'The_Crimson_Ghost' 'Osira'} {'Trinity' 'Sun_Girl'} {'Lady_Shiva' 'Saturn_Queen'} {'Trinity' 'Amy_Madison'} {'Fem_Paragon' 'Eviless'} {'Mai_Shen' 'Plastique'} {'Margaret_Love' 'Amy_Madison'} {'Trinity' 'Nyssa_Raatko'} {'White_Rabbit' 'Hypnota'} {'Animora' 'Silver_Banshee'} {'White_Rabbit' 'Mephista'} {'Animora' 'Eviless'} {'Titania' 'Ingra'} {'Dansen_Macabre' 'Purgatori'} {'Poundcakes' 'Ingra'} {'Titania' 'Golddigger'} {'Star_Sapphire' 'Osira'} {'Dansen_Macabre' 'Dead_Bowie'} {'Queen_Bee' 'Purgatori'} {'Mai_Shen' 'Silver_Banshee'} {'White_Rabbit' 'Saturn_Queen'} {'Poundcakes' 'Doctor_Cyber'} {'Queen_Bee' 'Devastation'} {'Margaret_Love' 'Poison_Ivy'} {'White_Rabbit' 'Amy_Madison'} {'The_Crimson_Ghost' 'Nyssa_Raatko'} {'Trinity' 'Devastation'} {'Titania' 'Eviless'} {'Fake_Thomas_Jefferson' 'Golddigger'} {'White_Rabbit' 'Dead_Bowie'} {'Fake_Thomas_Jefferson' 'Silver_Banshee'} {'Amazing_Grace' 'Doctor_Cyber'} {'The_Crimson_Ghost' 'Sun_Girl'} {'Margaret_Love' 'Golddigger'} {'Lady_Shiva' 'Devastation'} {'Queen_Bee' 'New_Wave'} {'Margaret_Love' 'Osira'} {'Queen_Bee' 'Ingra'} {'Fake_Thomas_Jefferson' 'Eviless'} {'Dansen_Macabre' 'Shimmer'} {'Fem_Paragon' 'Lady_Vic'} {'Poundcakes' 'Purgatori'} {'Titania' 'Poison_Ivy'} {'Star_Sapphire' 'Devastation'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mothergod' 'Hypnota'} {'Lazara' 'Fury_Leika'} {'Queen_Clea' 'Windfall'} {'Silver_Swan' 'Black_Mamba'} {'Devastation' 'Titania'} {'Madame_Masque' 'Rampage'} {'Spider_Girl' 'Titania'} {'Maxima' 'Madame_Rouge'} {'Silver_Banshee' 'Typhoid_Mary'} {'The_Lightning' 'Lafety_Le_Fei'} {'Queen_Clea' 'Silk_Fever'} {'Maxima' 'Lady_Clay'} {'Amy_Madison' 'Black_Mamba'} {'The_Lightning' 'Duela_Dent'} {'Madame_Masque' 'Silk_Fever'} {'Lazara' 'Rampage'} {'Star_Sapphire' 'Rampage'} {'Lazara' 'Amazing_Grace'} {'Madame_Masque' 'Syndrome'} {'Golden_Glider' 'Hypnota'} {'Spider_Girl' 'Windfall'} {'Dr_Evil' 'Typhoid_Mary'} {'Golden_Glider' 'Osira'} {'Fury_Leika' 'Duela_Dent'} {'Golden_Glider' 'Lady_Clay'} {'The_Crimson_Ghost' 'Magenta'} {'Mothergod' 'Amazing_Grace'} {'Lazara' 'Duela_Dent'} {'White_Rabbit' 'Hypnota'} {'Fury_Leika' 'Amazing_Grace'} {'White_Rabbit' 'Duela_Dent'} {'Silver_Banshee' 'Prank'} {'Mothergod' 'Osira'} {'Silver_Banshee' 'Hypnota'} {'Golddigger' 'Silk_Fever'} {'Fury_Leika' 'Madame_Rouge'} {'Amy_Madison' 'Osira'} {'Madame_Masque' 'Professor_Padraic_Ratigan'} {'Madame_Masque' 'Hypnota'} {'The_Crimson_Ghost' 'Amazing_Grace'} {'The_Lightning' 'Madame_Rouge'} {'Maxima' 'Prank'} {'Star_Sapphire' 'Yellowjacket'} {'The_Lightning' 'Mai_Shen'} {'Lagomorph' 'Duela_Dent'} {'White_Rabbit' 'Typhoid_Mary'} {'Golden_Glider' 'Typhoid_Mary'} {'Mothergod' 'Lady_Clay'} {'Eviless' 'Lafety_Le_Fei'} {'Golddigger' 'Typhoid_Mary'} {'Dr_Evil' 'Mai_Shen'} {'Fury_Leika' 'Hypnota'} {'Lagomorph' 'Lady_Clay'} {'White_Rabbit' 'Windfall'} {'Silver_Banshee' 'Lafety_Le_Fei'} {'White_Rabbit' 'Lady_Clay'} {'Silver_Banshee' 'Titania'} {'White_Rabbit' 'Titania'} {'Star_Sapphire' 'Syndrome'} {'Silver_Swan' 'Hypnota'} {'The_Crimson_Ghost' 'Osira'} {'Mothergod' 'Roulette'} {'Devastation' 'Lady_Clay'} {'Amy_Madison' 'Typhoid_Mary'} {'Eviless' 'Roulette'} {'Spider_Girl' 'Rampage'} {'Dr_Evil' 'Syndrome'} {'Maxima' 'Osira'} {'The_Lightning' 'Lady_Clay'} {'Silver_Banshee' 'Black_Mamba'} {'Devastation' 'Mai_Shen'} {'Madame_Masque' 'Madame_Rouge'} {'Amy_Madison' 'Silk_Fever'} {'Lagomorph' 'Yellowjacket'} {'Queen_Clea' 'Professor_Padraic_Ratigan'} {'Mothergod' 'Silk_Fever'} {'Maxima' 'Silk_Fever'} {'Lagomorph' 'Rampage'} {'The_Crimson_Ghost' 'Lady_Clay'} {'Spider_Girl' 'Mai_Shen'} {'Mothergod' 'Madame_Rouge'} {'Mothergod' 'Typhoid_Mary'} {'Fury_Leika' 'Professor_Padraic_Ratigan'} {'Fury_Leika' 'Roulette'} {'Maxima' 'Black_Mamba'} {'Dr_Evil' 'Black_Mamba'} {'Madame_Masque' 'Mai_Shen'} {'White_Rabbit' 'Silk_Fever'} {'Fury_Leika' 'Magenta'} {'The_Lightning' 'Rampage'} {'Lagomorph' 'Silk_Fever'} {'Golden_Glider' 'Windfall'} {'Silver_Banshee' 'Windfall'} {'Silver_Banshee' 'Yellowjacket'} {'Dr_Evil' 'Lafety_Le_Fei'} {'Devastation' 'Typhoid_Mary'} {'Maxima' 'Lafety_Le_Fei'} {'Queen_Clea' 'Yellowjacket'} {'White_Rabbit' 'Rampage'} {'Golden_Glider' 'Yellowjacket'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silk_Fever' 'Mothergod'} {'Decay' 'Shimmer'} {'Golden_Glider' 'Windfall'} {'Silver_Banshee' 'Queen_Of_Fables'} {'Typhoid_Mary' 'Syndrome'} {'Unicron' 'Maxima'} {'Lady_Vic' 'Lady_Octopus'} {'Golden_Glider' 'Zaladane'} {'Typhoid_Mary' 'Harley_Quinn'} {'Silver_Banshee' 'Mothergod'} {'Osira' 'Lotso'} {'Queen_Bee' 'Tala'} {'Spider_Girl' 'Zaladane'} {'Silk_Fever' 'King_Ghidorah'} {'Typhoid_Mary' 'Lotso'} {'Osira' 'Mothergod'} {'Spider_Girl' 'Syndrome'} {'Star_Sapphire' 'Syndrome'} {'Saturn_Queen' 'Sun_Girl'} {'Bombshell' 'Lotso'} {'Lady_Vic' 'Shimmer'} {'Livewire' 'Tala'} {'Bombshell' 'Maxima'} {'Golden_Glider' 'Tala'} {'Silver_Banshee' 'Shiv'} {'Queen_Clea' 'Tala'} {'Spider_Girl' 'Lotso'} {'Bombshell' 'Eviless'} {'Decay' 'Maxima'} {'Golden_Glider' 'Mothergod'} {'Devastation' 'Mai_Shen'} {'Spider_Girl' 'New_Wave'} {'Saturn_Queen' 'Queen_Of_Fables'} {'Osira' 'Harley_Quinn'} {'Osira' 'Maxima'} {'Scandal' 'Maxima'} {'Livewire' 'Eviless'} {'Deuce' 'Zaladane'} {'Deuce' 'Maxima'} {'Queen_Clea' 'Mothergod'} {'Unicron' 'Evinlea'} {'Deuce' 'Tala'} {'Devastation' 'Superwoman'} {'Livewire' 'Shimmer'} {'Scandal' 'King_Ghidorah'} {'Typhoid_Mary' 'King_Ghidorah'} {'Bombshell' 'Evinlea'} {'Star_Sapphire' 'Lady_Octopus'} {'Spider_Girl' 'Evinlea'} {'Coachwhip' 'New_Wave'} {'Star_Sapphire' 'Zaladane'} {'Devastation' 'Shiv'} {'Queen_Bee' 'Lady_Octopus'} {'Decay' 'New_Wave'} {'Scandal' 'Superwoman'} {'Unicron' 'Zaladane'} {'Decay' 'King_Ghidorah'} {'Typhoid_Mary' 'Maxima'} {'Dansen_Macabre' 'Evinlea'} {'Queen_Clea' 'Maxima'} {'Queen_Clea' 'Superwoman'} {'Deuce' 'Queen_Of_Fables'} {'Decay' 'Sun_Girl'} {'Golden_Glider' 'Sun_Girl'} {'Star_Sapphire' 'Eviless'} {'Silk_Fever' 'Lazara'} {'Lady_Vic' 'Sun_Girl'} {'Unicron' 'New_Wave'} {'Saturn_Queen' 'King_Ghidorah'} {'Unicron' 'Lotso'} {'Silver_Banshee' 'King_Ghidorah'} {'Golden_Glider' 'Superwoman'} {'Decay' 'Tala'} {'Devastation' 'Tala'} {'Dansen_Macabre' 'Maxima'} {'Dansen_Macabre' 'Lady_Octopus'} {'Silver_Banshee' 'Mai_Shen'} {'Silver_Banshee' 'Lazara'} {'Spider_Girl' 'Mothergod'} {'Deuce' 'Syndrome'} {'Dansen_Macabre' 'Windfall'} {'Bombshell' 'Lady_Octopus'} {'Silk_Fever' 'Zaladane'} {'Scandal' 'Syndrome'} {'Livewire' 'Windfall'} {'Decay' 'Harley_Quinn'} {'Scandal' 'New_Wave'} {'Osira' 'Eviless'} {'Dansen_Macabre' 'Shimmer'} {'Saturn_Queen' 'Lady_Octopus'} {'Queen_Clea' 'Shiv'} {'Decay' 'Shiv'} {'Scandal' 'Shimmer'} {'Coachwhip' 'Tala'} {'Osira' 'Evinlea'} {'Silk_Fever' 'Evinlea'} {'Coachwhip' 'Queen_Of_Fables'} {'Deuce' 'Evinlea'} {'Bombshell' 'Lazara'} {'Lady_Vic' 'Queen_Of_Fables'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Spider_Girl' 'Blue_Snowman'} {'Blue_Snowman' 'Roulette'} {'Roulette' 'Spider_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'Hypnota'} {'Poundcakes' 'Superwoman'} {'Purgatori' 'Queen_Of_Fables'} {'Plastique' 'Star_Sapphire'} {'Evinlea' 'Snapdragon'} {'Emerald_Empress' 'Abominatrix'} {'New_Wave' 'Amazing_Grace'} {'New_Wave' 'Lady_Death'} {'Talia_Al_Ghul' 'Mephista'} {'Lady_Clay' 'Ursa'} {'Zaladane' 'Silk_Fever'} {'Talia_Al_Ghul' 'Star_Sapphire'} {'Deuce' 'Titania'} {'Bombshell' 'Snapdragon'} {'Bombshell' 'Abominatrix'} {'Evinlea' 'Lagomorph'} {'Typhoid_Mary' 'Nyssa_Raatko'} {'Cyborgirl' 'Nyssa_Raatko'} {'Purgatori' 'Silk_Fever'} {'Dr_Evil' 'Ursa'} {'Dr_Evil' 'Silk_Fever'} {'Lady_Clay' 'Madame_Masque'} {'Harley_Quinn' 'Mephista'} {'Syndrome' 'White_Rabbit'} {'Tigress' 'Madame_Masque'} {'Tigress' 'Queen_Of_Fables'} {'Bombshell' 'Superwoman'} {'Evinlea' 'Abominatrix'} {'Purgatori' 'Snapdragon'} {'Osira' 'Hypnota'} {'Syndrome' 'Mephista'} {'Dr_Evil' 'Lagomorph'} {'Plastique' 'Rampage'} {'New_Wave' 'Madame_Masque'} {'Plastique' 'Abominatrix'} {'Harley_Quinn' 'White_Rabbit'} {'New_Wave' 'Snapdragon'} {'Dr_Evil' 'Mai_Shen'} {'Emerald_Empress' 'Yellowjacket'} {'Lady_Clay' 'Mephista'} {'Purgatori' 'Superwoman'} {'Tigress' 'Titania'} {'Deuce' 'Abominatrix'} {'Cyborgirl' 'Lagomorph'} {'Dead_Bowie' 'Queen_Of_Fables'} {'Purgatori' 'Amazing_Grace'} {'Zaladane' 'Ursa'} {'Lady_Clay' 'Queen_Of_Fables'} {'Zaladane' 'Amazing_Grace'} {'Dead_Bowie' 'Amazing_Grace'} {'Deuce' 'Superwoman'} {'Zaladane' 'Yellowjacket'} {'Harley_Quinn' 'Ursa'} {'Blue_Snowman' 'Yellowjacket'} {'Typhoid_Mary' 'Abominatrix'} {'Evinlea' 'Queen_Of_Fables'} {'Typhoid_Mary' 'Mephista'} {'Evinlea' 'Lady_Death'} {'Talia_Al_Ghul' 'Queen_Of_Fables'} {'Syndrome' 'Lady_Death'} {'Bombshell' 'Silk_Fever'} {'Poundcakes' 'Hypnota'} {'Blue_Snowman' 'Rampage'} {'Evinlea' 'Nyssa_Raatko'} {'Typhoid_Mary' 'Madame_Masque'} {'Typhoid_Mary' 'Lagomorph'} {'Harley_Quinn' 'Nyssa_Raatko'} {'Lady_Clay' 'Evinlea'} {'Harley_Quinn' 'Amazing_Grace'} {'Talia_Al_Ghul' 'Rampage'} {'Osira' 'Abominatrix'} {'Dr_Evil' 'Titania'} {'Cyborgirl' 'Mai_Shen'} {'Syndrome' 'Queen_Of_Fables'} {'Dead_Bowie' 'Nyssa_Raatko'} {'Dead_Bowie' 'Lady_Death'} {'Zaladane' 'Rampage'} {'Poundcakes' 'Lady_Death'} {'Dead_Bowie' 'Star_Sapphire'} {'Evinlea' 'Rampage'} {'Emerald_Empress' 'Silver_Swan'} {'Blue_Snowman' 'Lady_Death'} {'Deuce' 'Yellowjacket'} {'Talia_Al_Ghul' 'Snapdragon'} {'Deuce' 'Rampage'} {'Harley_Quinn' 'Abominatrix'} {'Plastique' 'Mai_Shen'} {'Tigress' 'Silk_Fever'} {'Evinlea' 'Silver_Swan'} {'Plastique' 'Superwoman'} {'Talia_Al_Ghul' 'Silver_Swan'} {'New_Wave' 'Silver_Swan'} {'Dr_Evil' 'Nyssa_Raatko'} {'Poundcakes' 'Mephista'} {'Bombshell' 'Titania'} {'Talia_Al_Ghul' 'Hypnota'} {'Blue_Snowman' 'Ursa'} {'Dr_Evil' 'Queen_Of_Fables'} {'Osira' 'Mephista'} {'Deuce' 'Snapdragon'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Roulette' 'Star_Sapphire'} {'Lady_Clay' 'Lafety_Le_Fei'} {'Evinlea' 'Margaret_Love'} {'Mai_Shen' 'Titania'} {'Spider_Girl' 'Coachwhip'} {'Amy_Madison' 'Snapdragon'} {'Shimmer' 'Emerald_Empress'} {'Blue_Snowman' 'Nyssa_Raatko'} {'Tala' 'Silver_Banshee'} {'Magenta' 'Nyssa_Raatko'} {'Scandal' 'Tigress'} {'Tala' 'Coachwhip'} {'Bombshell' 'Tigress'} {'Maxima' 'Silver_Banshee'} {'Lady_Shiva' 'Dr_Evil'} {'Shimmer' 'Star_Sapphire'} {'Evinlea' 'Trinity'} {'Shimmer' 'Tigress'} {'Mai_Shen' 'Emerald_Empress'} {'Evinlea' 'Cyborgirl'} {'Shimmer' 'Dr_Evil'} {'Roulette' 'Lafety_Le_Fei'} {'Golden_Glider' 'Lafety_Le_Fei'} {'Roulette' 'Animora'} {'Evinlea' 'Sun_Girl'} {'Mai_Shen' 'Star_Sapphire'} {'Lady_Quark' 'Lafety_Le_Fei'} {'Professor_Padraic_Ratigan' 'Silver_Banshee'} {'Lady_Clay' 'Animora'} {'Plastique' 'Margaret_Love'} {'Lady_Clay' 'Coachwhip'} {'Roulette' 'New_Wave'} {'Amy_Madison' 'Trinity'} {'Amy_Madison' 'Emerald_Empress'} {'Plastique' 'Animora'} {'Amy_Madison' 'Lafety_Le_Fei'} {'Doctor_Cyber' 'Snapdragon'} {'Maxima' 'New_Wave'} {'Tala' 'New_Wave'} {'Spider_Girl' 'Trinity'} {'Doctor_Cyber' 'Sun_Girl'} {'Professor_Padraic_Ratigan' 'Star_Sapphire'} {'Lady_Quark' 'Cyborgirl'} {'Spider_Girl' 'Cyborgirl'} {'Roulette' 'Trinity'} {'Blue_Snowman' 'Fem_Paragon'} {'Spider_Girl' 'Fem_Paragon'} {'Amy_Madison' 'Dr_Evil'} {'Lady_Shiva' 'Lafety_Le_Fei'} {'Lady_Clay' 'Lazara'} {'Lady_Quark' 'Nyssa_Raatko'} {'Lady_Quark' 'Tigress'} {'Shimmer' 'Sun_Girl'} {'Blue_Snowman' 'Margaret_Love'} {'Evinlea' 'Coachwhip'} {'Lady_Shiva' 'Fem_Paragon'} {'The_Crimson_Ghost' 'Titania'} {'Amy_Madison' 'New_Wave'} {'Roulette' 'Lazara'} {'The_Crimson_Ghost' 'Trinity'} {'Magenta' 'Snapdragon'} {'Mai_Shen' 'Unicron'} {'Scandal' 'Animora'} {'Lady_Clay' 'Cyborgirl'} {'Lady_Clay' 'Emerald_Empress'} {'Spider_Girl' 'Star_Sapphire'} {'Shimmer' 'Deuce'} {'Spider_Girl' 'Animora'} {'Plastique' 'Tigress'} {'Lady_Quark' 'Fem_Paragon'} {'Magenta' 'Coachwhip'} {'Magenta' 'Unicron'} {'Magenta' 'Cyborgirl'} {'Plastique' 'Coachwhip'} {'Lady_Clay' 'Trinity'} {'The_Crimson_Ghost' 'Dr_Evil'} {'Golden_Glider' 'Tigress'} {'The_Crimson_Ghost' 'Deuce'} {'Amy_Madison' 'Deuce'} {'Amy_Madison' 'Silver_Banshee'} {'Shimmer' 'New_Wave'} {'Scandal' 'Snapdragon'} {'Tala' 'Deuce'} {'Maxima' 'Star_Sapphire'} {'Magenta' 'Sun_Girl'} {'Professor_Padraic_Ratigan' 'Margaret_Love'} {'Bombshell' 'Lafety_Le_Fei'} {'Bombshell' 'Titania'} {'Amy_Madison' 'Animora'} {'Roulette' 'Sun_Girl'} {'Professor_Padraic_Ratigan' 'Deuce'} {'Golden_Glider' 'Lazara'} {'Doctor_Cyber' 'Unicron'} {'Lady_Shiva' 'Nyssa_Raatko'} {'Doctor_Cyber' 'Lazara'} {'Lady_Shiva' 'Trinity'} {'Scandal' 'Margaret_Love'} {'Spider_Girl' 'Tigress'} {'Evinlea' 'Tigress'} {'Maxima' 'Unicron'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Osira' 'Valentina'} {'Magenta' 'Queen_Of_Fables'} {'Devastation' 'Deuce'} {'Silver_Swan' 'Spider_Girl'} {'Saturn_Queen' 'Unicron'} {'Star_Sapphire' 'Sun_Girl'} {'Lady_Octopus' 'Titania'} {'Purgatori' 'Dr_Horrible'} {'Doctor_Cyber' 'White_Rabbit'} {'Mothergod' 'Cyborgirl'} {'King_Ghidorah' 'Abominatrix'} {'Unicron' 'Fury_Leika'} {'Genevieve_Savidge' 'Fake_Thomas_Jefferson'} {'Maxima' 'Hypnota'} {'Southpaw' 'Dr_Evil'} {'Cyborgirl' 'Saturn_Queen'} {'Talia_Al_Ghul' 'Lady_Octopus'} {'Lafety_Le_Fei' 'Lazara'} {'Margaret_Love' 'Emerald_Empress'} {'Typhoid_Mary' 'Osira'} {'Jewelee' 'Amazing_Grace'} {'Jinx' 'Jason_Kreis'} {'Shimmer' 'Talia_Al_Ghul'} {'Snapdragon' 'Devastation'} {'Madame_Rouge' 'Jinx'} {'Dead_Bowie' 'Maxima'} {'Decay' 'Mothergod'} {'Magpie' 'Shimmer'} {'Lady_Quark' 'Superwoman'} {'Shiv' 'Magpie'} {'Syndrome' 'Lady_Clay'} {'Ursa' 'Asbestos_Lady'} {'Silk_Fever' 'Evinlea'} {'Hypnota' 'Genevieve_Savidge'} {'Sun_Girl' 'Plastique'} {'Fury_Leika' 'Silk_Fever'} {'Spider_Girl' 'Mist'} {'Roulette' 'Silver_Swan'} {'Superwoman' 'Queen_Bee'} {'Lotso' 'The_Crimson_Ghost'} {'Eviless' 'Queen_Clea'} {'Titania' 'Rampage'} {'Yellowjacket' 'Lady_Quark'} {'Plastique' 'Poundcakes'} {'Zaladane' 'The_Lightning'} {'Prank' 'Syndrome'} {'Tala' 'Poison_Ivy'} {'Harley_Quinn' 'Lady_Death'} {'Lady_Death' 'Professor_Padraic_Ratigan'} {'Deuce' 'Magenta'} {'White_Rabbit' 'Roulette'} {'Tigress' 'Blue_Snowman'} {'Nyssa_Raatko' 'Zaladane'} {'Asbestos_Lady' 'Rad'} {'Bombshell' 'Tala'} {'Fake_Thomas_Jefferson' 'King_Ghidorah'} {'Dr_Horrible' 'Southpaw'} {'Poison_Ivy' 'Prank'} {'Evinlea' 'Dansen_Macabre'} {'The_Lightning' 'Jewelee'} {'Emerald_Empress' 'Trinity'} {'Mai_Shen' 'Yellowjacket'} {'Lashina' 'Scandal'} {'Lagomorph' 'Silver_Banshee'} {'Madame_Masque' 'Windfall'} {'Livewire' 'Madame_Masque'} {'Abominatrix' 'Snapdragon'} {'Duela_Dent' 'Mai_Shen'} {'Amy_Madison' 'Leather'} {'Silver_Banshee' 'Nyssa_Raatko'} {'Jason_Kreis' 'Bombshell'} {'Queen_Bee' 'Doctor_Cyber'} {'Rad' 'Shiv'} {'Coachwhip' 'Margaret_Love'} {'Golddigger' 'Lafety_Le_Fei'} {'The_Crimson_Ghost' 'Typhoid_Mary'} {'Scandal' 'Harley_Quinn'} {'Queen_Clea' 'Coachwhip'} {'Windfall' 'Fem_Paragon'} {'Trinity' 'Star_Sapphire'} {'Lazara' 'Dead_Bowie'} {'Mist' 'Ingra'} {'Lady_Clay' 'Black_Mamba'} {'Valentina' 'Princess_Python'} {'Poundcakes' 'Lagomorph'} {'Animora' 'Lashina'} {'Princess_Python' 'Madame_Rouge'} {'Gru' 'Livewire'} {'Dr_Evil' 'Duela_Dent'} {'Fem_Paragon' 'Golddigger'} {'Leather' 'Animora'} {'Amazing_Grace' 'Amy_Madison'} {'Queen_Of_Fables' 'Lotso'} {'Ingra' 'Eviless'} {'Rampage' 'Gru'} {'Black_Mamba' 'Tigress'} {'Professor_Padraic_Ratigan' 'Ursa'} {'Dansen_Macabre' 'Purgatori'} {'Blue_Snowman' 'Decay'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Snapdragon' 'Fake_Thomas_Jefferson'} {'Mephista' 'Dr_Horrible'} {'Mephista' 'Queen_Bee'} {'Duela_Dent' 'Fake_Thomas_Jefferson'} {'Blue_Snowman' 'Leather'} {'Poundcakes' 'Ursa'} {'Typhoid_Mary' 'Star_Sapphire'} {'Eviless' 'Ursa'} {'Trinity' 'Mothergod'} {'Blue_Snowman' 'Mai_Shen'} {'Duela_Dent' 'Queen_Bee'} {'Snapdragon' 'The_Lightning'} {'Eviless' 'Mothergod'} {'Gru' 'Bombshell'} {'Blue_Snowman' 'Evinlea'} {'Mephista' 'Jinx'} {'Snapdragon' 'Mai_Shen'} {'Devastation' 'Dr_Horrible'} {'Trinity' 'Ingra'} {'Titania' 'Queen_Bee'} {'Snapdragon' 'Valentina'} {'Eviless' 'Queen_Clea'} {'Gru' 'Professor_Padraic_Ratigan'} {'Blue_Snowman' 'Jinx'} {'Gru' 'Lafety_Le_Fei'} {'Roulette' 'Ursa'} {'Lady_Vic' 'Star_Sapphire'} {'Emerald_Empress' 'Bombshell'} {'Devastation' 'Mai_Shen'} {'Mephista' 'Lafety_Le_Fei'} {'Eviless' 'Fem_Paragon'} {'Blue_Snowman' 'Unicron'} {'Snapdragon' 'Lafety_Le_Fei'} {'Emerald_Empress' 'Mothergod'} {'Typhoid_Mary' 'Valentina'} {'Plastique' 'Jinx'} {'Gru' 'Leather'} {'Dead_Bowie' 'Leather'} {'Lady_Vic' 'The_Lightning'} {'Trinity' 'Margaret_Love'} {'Emerald_Empress' 'Queen_Clea'} {'Typhoid_Mary' 'Lafety_Le_Fei'} {'Devastation' 'Leather'} {'Titania' 'Lafety_Le_Fei'} {'Sun_Girl' 'Bombshell'} {'Dead_Bowie' 'Ursa'} {'Blue_Snowman' 'Queen_Clea'} {'Lady_Vic' 'Ursa'} {'Devastation' 'Professor_Padraic_Ratigan'} {'Gru' 'The_Lightning'} {'Superwoman' 'Mothergod'} {'Poundcakes' 'Ingra'} {'Trinity' 'The_Lightning'} {'Jason_Kreis' 'Fem_Paragon'} {'Lady_Vic' 'Mai_Shen'} {'New_Wave' 'Evinlea'} {'Gru' 'Typhoid_Mary'} {'Gru' 'Valentina'} {'Superwoman' 'Fem_Paragon'} {'Roulette' 'Queen_Bee'} {'Plastique' 'Dr_Horrible'} {'New_Wave' 'Fem_Paragon'} {'Trinity' 'Fem_Paragon'} {'Blue_Snowman' 'The_Lightning'} {'Duela_Dent' 'Unicron'} {'New_Wave' 'Mothergod'} {'Trinity' 'Bombshell'} {'Blue_Snowman' 'Valentina'} {'Gru' 'Ursa'} {'Roulette' 'Mothergod'} {'Gru' 'Mothergod'} {'Sun_Girl' 'Star_Sapphire'} {'Roulette' 'Unicron'} {'Mephista' 'Leather'} {'Devastation' 'Ursa'} {'Devastation' 'Mothergod'} {'Dead_Bowie' 'Margaret_Love'} {'Superwoman' 'Lafety_Le_Fei'} {'Eviless' 'Dr_Horrible'} {'Superwoman' 'Leather'} {'Devastation' 'Ingra'} {'Poundcakes' 'Evinlea'} {'Typhoid_Mary' 'Queen_Clea'} {'Eviless' 'Evinlea'} {'Jason_Kreis' 'Fake_Thomas_Jefferson'} {'Jason_Kreis' 'Professor_Padraic_Ratigan'} {'Superwoman' 'Professor_Padraic_Ratigan'} {'Typhoid_Mary' 'Unicron'} {'New_Wave' 'Leather'} {'Dead_Bowie' 'Jinx'} {'Titania' 'Bombshell'} {'Gru' 'Fake_Thomas_Jefferson'} {'Typhoid_Mary' 'Queen_Bee'} {'Duela_Dent' 'Bombshell'} {'Trinity' 'Jinx'} {'Sun_Girl' 'Jinx'} {'Eviless' 'Fake_Thomas_Jefferson'} {'Titania' 'The_Lightning'} {'Snapdragon' 'Margaret_Love'} {'Plastique' 'Leather'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Abominatrix' 'Osira'} {'Mist' 'Scandal'} {'Queen_Of_Fables' 'Golden_Glider'} {'Roulette' 'Leather'} {'Prank' 'Madame_Rouge'} {'Nyssa_Raatko' 'Mephista'} {'Yellowjacket' 'Lafety_Le_Fei'} {'Princess_Python' 'Typhoid_Mary'} {'Lady_Octopus' 'Queen_Of_Fables'} {'Leather' 'Superwoman'} {'Madame_Rouge' 'Shimmer'} {'Golddigger' 'Asbestos_Lady'} {'Coachwhip' 'Poison_Ivy'} {'Silver_Banshee' 'Jason_Kreis'} {'Tigress' 'Blue_Snowman'} {'Golden_Glider' 'Duela_Dent'} {'Lady_Death' 'Emerald_Empress'} {'Lagomorph' 'Doctor_Cyber'} {'Sun_Girl' 'Purgatori'} {'Animora' 'Silver_Swan'} {'Snapdragon' 'Windfall'} {'Gru' 'Devastation'} {'New_Wave' 'Syndrome'} {'Titania' 'Hypnota'} {'Shiv' 'Gru'} {'Unicron' 'Lady_Shiva'} {'Rad' 'Eviless'} {'Star_Sapphire' 'The_Crimson_Ghost'} {'Syndrome' 'Tala'} {'Ingra' 'Mothergod'} {'Lashina' 'Lady_Vic'} {'Black_Mamba' 'Professor_Padraic_Ratigan'} {'Mephista' 'Dr_Evil'} {'Silver_Swan' 'Evinlea'} {'Doctor_Cyber' 'Queen_Bee'} {'Queen_Bee' 'Nyssa_Raatko'} {'Windfall' 'Shiv'} {'Valentina' 'Lady_Octopus'} {'Livewire' 'The_Lightning'} {'Magenta' 'Silver_Banshee'} {'Lady_Vic' 'Star_Sapphire'} {'Trinity' 'White_Rabbit'} {'Cyborgirl' 'Deuce'} {'Saturn_Queen' 'Dead_Bowie'} {'Magpie' 'Roulette'} {'Osira' 'Valentina'} {'White_Rabbit' 'Harley_Quinn'} {'Hypnota' 'Lady_Death'} {'King_Ghidorah' 'Princess_Python'} {'Queen_Clea' 'Lady_Clay'} {'Shimmer' 'Saturn_Queen'} {'Superwoman' 'Tigress'} {'Evinlea' 'Genevieve_Savidge'} {'Dr_Evil' 'Southpaw'} {'Madame_Masque' 'Lazara'} {'Poison_Ivy' 'Talia_Al_Ghul'} {'Southpaw' 'Abominatrix'} {'Lazara' 'Rad'} {'Lady_Quark' 'Titania'} {'Scandal' 'Spider_Girl'} {'Maxima' 'Animora'} {'Asbestos_Lady' 'Mai_Shen'} {'Purgatori' 'King_Ghidorah'} {'Deuce' 'Coachwhip'} {'Eviless' 'Lashina'} {'Dead_Bowie' 'Amazing_Grace'} {'Harley_Quinn' 'Livewire'} {'Jinx' 'Trinity'} {'Plastique' 'Poundcakes'} {'Amy_Madison' 'Queen_Clea'} {'Blue_Snowman' 'Golddigger'} {'Lotso' 'Lady_Quark'} {'Typhoid_Mary' 'Yellowjacket'} {'Poundcakes' 'Ursa'} {'Silk_Fever' 'Cyborgirl'} {'The_Lightning' 'Ingra'} {'Fem_Paragon' 'Amy_Madison'} {'Mothergod' 'Snapdragon'} {'Dr_Horrible' 'Fury_Leika'} {'Tala' 'Unicron'} {'Talia_Al_Ghul' 'Mist'} {'Spider_Girl' 'Magpie'} {'Jewelee' 'Silk_Fever'} {'Fury_Leika' 'Fem_Paragon'} {'The_Crimson_Ghost' 'Dr_Horrible'} {'Lafety_Le_Fei' 'Maxima'} {'Amazing_Grace' 'Decay'} {'Genevieve_Savidge' 'Plastique'} {'Mai_Shen' 'Lotso'} {'Lady_Clay' 'Magenta'} {'Devastation' 'Madame_Masque'} {'Margaret_Love' 'Black_Mamba'} {'Emerald_Empress' 'New_Wave'} {'Decay' 'Jewelee'} {'Zaladane' 'Margaret_Love'} {'Ursa' 'Jinx'} {'Professor_Padraic_Ratigan' 'Prank'} {'Lady_Shiva' 'Lagomorph'} {'Jason_Kreis' 'Zaladane'} {'Duela_Dent' 'Sun_Girl'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Animora' 'Typhoid_Mary'} {'Mothergod' 'Cyborgirl'} {'Emerald_Empress' 'Coachwhip'} {'Dansen_Macabre' 'King_Ghidorah'} {'Emerald_Empress' 'Lagomorph'} {'Zaladane' 'Professor_Padraic_Ratigan'} {'Lady_Vic' 'Cyborgirl'} {'Saturn_Queen' 'Coachwhip'} {'Silver_Banshee' 'Mai_Shen'} {'The_Lightning' 'Windfall'} {'Talia_Al_Ghul' 'Coachwhip'} {'Lady_Death' 'Yellowjacket'} {'Saturn_Queen' 'Mist'} {'Lady_Vic' 'Sun_Girl'} {'Animora' 'Windfall'} {'Emerald_Empress' 'Princess_Python'} {'Talia_Al_Ghul' 'Evinlea'} {'Purgatori' 'Evinlea'} {'Lady_Vic' 'Mai_Shen'} {'Talia_Al_Ghul' 'Sun_Girl'} {'Saturn_Queen' 'King_Ghidorah'} {'Zaladane' 'Silk_Fever'} {'Purgatori' 'Mai_Shen'} {'Animora' 'Princess_Python'} {'Lady_Vic' 'Silk_Fever'} {'Magenta' 'Sun_Girl'} {'Animora' 'Sun_Girl'} {'Talia_Al_Ghul' 'Valentina'} {'Saturn_Queen' 'Silk_Fever'} {'Mothergod' 'Lady_Shiva'} {'Mothergod' 'Harley_Quinn'} {'Prank' 'Typhoid_Mary'} {'Prank' 'Sun_Girl'} {'Prank' 'Cyborgirl'} {'Prank' 'Lagomorph'} {'Lady_Vic' 'Mist'} {'Shiv' 'Mist'} {'Abominatrix' 'Mai_Shen'} {'Abominatrix' 'Sun_Girl'} {'Silver_Banshee' 'Princess_Python'} {'Purgatori' 'Black_Mamba'} {'Silver_Banshee' 'Windfall'} {'Shiv' 'Osira'} {'Talia_Al_Ghul' 'Mist'} {'Dansen_Macabre' 'Typhoid_Mary'} {'Golddigger' 'Black_Mamba'} {'Shiv' 'Dr_Horrible'} {'Silver_Banshee' 'Osira'} {'Prank' 'Dr_Horrible'} {'The_Lightning' 'Professor_Padraic_Ratigan'} {'Purgatori' 'Typhoid_Mary'} {'Purgatori' 'Mist'} {'Magpie' 'Princess_Python'} {'Magenta' 'Cyborgirl'} {'Silver_Banshee' 'Lady_Shiva'} {'Zaladane' 'Coachwhip'} {'The_Lightning' 'Mist'} {'Magpie' 'Dr_Horrible'} {'Mothergod' 'Lagomorph'} {'Lady_Death' 'Lagomorph'} {'Shiv' 'Silk_Fever'} {'Lady_Octopus' 'Professor_Padraic_Ratigan'} {'Saturn_Queen' 'Sun_Girl'} {'Silver_Banshee' 'Typhoid_Mary'} {'Magpie' 'Harley_Quinn'} {'Emerald_Empress' 'Osira'} {'Saturn_Queen' 'Evinlea'} {'Prank' 'Princess_Python'} {'Lady_Octopus' 'Lady_Shiva'} {'Prank' 'Silk_Fever'} {'Abominatrix' 'Black_Mamba'} {'The_Lightning' 'Valentina'} {'Mothergod' 'Mai_Shen'} {'Lady_Vic' 'Professor_Padraic_Ratigan'} {'Lady_Vic' 'Dr_Horrible'} {'Abominatrix' 'Mist'} {'Magenta' 'Princess_Python'} {'Purgatori' 'Lagomorph'} {'Lady_Death' 'Mai_Shen'} {'Abominatrix' 'Silk_Fever'} {'The_Lightning' 'Black_Mamba'} {'Magenta' 'Yellowjacket'} {'Golddigger' 'Evinlea'} {'Prank' 'Professor_Padraic_Ratigan'} {'Abominatrix' 'Valentina'} {'Magpie' 'Typhoid_Mary'} {'Golddigger' 'King_Ghidorah'} {'Animora' 'Cyborgirl'} {'Magpie' 'Valentina'} {'Talia_Al_Ghul' 'Yellowjacket'} {'Magenta' 'Typhoid_Mary'} {'Lady_Death' 'Black_Mamba'} {'Dansen_Macabre' 'Dr_Horrible'} {'Fake_Thomas_Jefferson' 'Princess_Python'} {'The_Lightning' 'Dr_Horrible'} {'Zaladane' 'Mist'} {'Lady_Death' 'Valentina'} {'Fake_Thomas_Jefferson' 'Lagomorph'} {'Emerald_Empress' 'Cyborgirl'} {'Animora' 'King_Ghidorah'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Banshee' 'Titania'} {'Zaladane' 'Silk_Fever'} {'Magpie' 'Dead_Bowie'} {'Magpie' 'Animora'} {'Saturn_Queen' 'Jinx'} {'Margaret_Love' 'White_Rabbit'} {'Zaladane' 'Lazara'} {'Snapdragon' 'Jewelee'} {'Queen_Bee' 'Silk_Fever'} {'Spider_Girl' 'Silver_Swan'} {'Silver_Banshee' 'Lazara'} {'Decay' 'Silk_Fever'} {'Magpie' 'White_Rabbit'} {'Saturn_Queen' 'Fem_Paragon'} {'Spider_Girl' 'Dr_Evil'} {'Decay' 'Lagomorph'} {'Rampage' 'Titania'} {'Lashina' 'Dead_Bowie'} {'Spider_Girl' 'Queen_Of_Fables'} {'Lady_Death' 'Silk_Fever'} {'Lady_Death' 'Jewelee'} {'Shimmer' 'Fem_Paragon'} {'Lashina' 'Evinlea'} {'Magpie' 'Dr_Horrible'} {'Lady_Death' 'Cyborgirl'} {'Asbestos_Lady' 'Evinlea'} {'Rampage' 'Sun_Girl'} {'Silver_Banshee' 'Jewelee'} {'Bombshell' 'White_Rabbit'} {'Saturn_Queen' 'Dr_Evil'} {'Silver_Banshee' 'Animora'} {'Harley_Quinn' 'Silver_Swan'} {'Lafety_Le_Fei' 'Fem_Paragon'} {'King_Ghidorah' 'Silk_Fever'} {'Lashina' 'Lady_Shiva'} {'Lashina' 'Lagomorph'} {'Zaladane' 'Lady_Shiva'} {'Zaladane' 'Animora'} {'Harley_Quinn' 'Cyborgirl'} {'Devastation' 'Lagomorph'} {'Snapdragon' 'Cyborgirl'} {'Snapdragon' 'Livewire'} {'Hypnota' 'Silk_Fever'} {'Bombshell' 'Silver_Swan'} {'Margaret_Love' 'Jewelee'} {'Hypnota' 'Queen_Of_Fables'} {'Saturn_Queen' 'Lazara'} {'Lafety_Le_Fei' 'Lady_Shiva'} {'Spider_Girl' 'Fem_Paragon'} {'Decay' 'Dead_Bowie'} {'Harley_Quinn' 'Jewelee'} {'Decay' 'Titania'} {'Bombshell' 'Sun_Girl'} {'Hypnota' 'Dr_Horrible'} {'Queen_Bee' 'White_Rabbit'} {'Decay' 'Dr_Horrible'} {'Asbestos_Lady' 'White_Rabbit'} {'Lafety_Le_Fei' 'Titania'} {'Harley_Quinn' 'Queen_Of_Fables'} {'Queen_Bee' 'Dead_Bowie'} {'Devastation' 'White_Rabbit'} {'Bombshell' 'Cyborgirl'} {'Devastation' 'New_Wave'} {'King_Ghidorah' 'Jinx'} {'Margaret_Love' 'Dead_Bowie'} {'Rampage' 'Dead_Bowie'} {'Queen_Bee' 'Titania'} {'Queen_Bee' 'Jewelee'} {'Lady_Death' 'Dr_Evil'} {'Magpie' 'Lazara'} {'Silver_Banshee' 'Livewire'} {'Decay' 'Lazara'} {'Zaladane' 'Dr_Evil'} {'Lashina' 'Titania'} {'Hypnota' 'Jinx'} {'Spider_Girl' 'Dr_Horrible'} {'Shimmer' 'Silver_Swan'} {'Margaret_Love' 'New_Wave'} {'Decay' 'Evinlea'} {'Magpie' 'Cyborgirl'} {'King_Ghidorah' 'Queen_Of_Fables'} {'Rampage' 'Silver_Swan'} {'Bombshell' 'Animora'} {'Harley_Quinn' 'Sun_Girl'} {'Magpie' 'Jewelee'} {'Lafety_Le_Fei' 'Livewire'} {'King_Ghidorah' 'Dr_Evil'} {'Lashina' 'White_Rabbit'} {'Shimmer' 'Queen_Of_Fables'} {'Asbestos_Lady' 'Dr_Horrible'} {'Hypnota' 'Fem_Paragon'} {'Lafety_Le_Fei' 'Dr_Evil'} {'Spider_Girl' 'Livewire'} {'Magpie' 'Lady_Shiva'} {'Devastation' 'Shimmer'} {'Lady_Death' 'Dr_Horrible'} {'King_Ghidorah' 'Silver_Swan'} {'Asbestos_Lady' 'Livewire'} {'Spider_Girl' 'Jewelee'} {'Silver_Banshee' 'Sun_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Madame_Masque' 'Rampage'} {'Abominatrix' 'Superwoman'} {'Silver_Banshee' 'Zaladane'} {'Abominatrix' 'Shimmer'} {'Fem_Paragon' 'Rampage'} {'Valentina' 'Star_Sapphire'} {'Titania' 'Lazara'} {'Dr_Horrible' 'Professor_Padraic_Ratigan'} {'Fem_Paragon' 'Livewire'} {'Golden_Glider' 'Decay'} {'Duela_Dent' 'Superwoman'} {'Valentina' 'Zaladane'} {'Valentina' 'Amazing_Grace'} {'Golddigger' 'Madame_Rouge'} {'Dr_Horrible' 'Star_Sapphire'} {'Bombshell' 'Rad'} {'Queen_Clea' 'Purgatori'} {'Valentina' 'Lady_Vic'} {'Jewelee' 'Madame_Rouge'} {'Harley_Quinn' 'Madame_Rouge'} {'Professor_Padraic_Ratigan' 'Purgatori'} {'Professor_Padraic_Ratigan' 'Saturn_Queen'} {'Golden_Glider' 'Saturn_Queen'} {'Genevieve_Savidge' 'Queen_Bee'} {'Sun_Girl' 'Amazing_Grace'} {'Sun_Girl' 'Dansen_Macabre'} {'Golddigger' 'Amazing_Grace'} {'Queen_Clea' 'Madame_Rouge'} {'Sun_Girl' 'Star_Sapphire'} {'Silver_Banshee' 'Superwoman'} {'The_Lightning' 'Purgatori'} {'Golddigger' 'Lazara'} {'Bombshell' 'Silk_Fever'} {'Queen_Of_Fables' 'Rad'} {'Harley_Quinn' 'Lady_Vic'} {'Bombshell' 'Decay'} {'Golden_Glider' 'Star_Sapphire'} {'Abominatrix' 'Madame_Rouge'} {'Jewelee' 'Maxima'} {'Mist' 'Spider_Girl'} {'The_Lightning' 'Saturn_Queen'} {'Golddigger' 'Maxima'} {'Golddigger' 'Spider_Girl'} {'Mist' 'Lazara'} {'Sun_Girl' 'Shimmer'} {'Fem_Paragon' 'Queen_Bee'} {'Sun_Girl' 'Spider_Girl'} {'Duela_Dent' 'Maxima'} {'Silver_Banshee' 'Livewire'} {'The_Lightning' 'Superwoman'} {'Dr_Horrible' 'Silk_Fever'} {'Sun_Girl' 'Rad'} {'Titania' 'Decay'} {'Abominatrix' 'Saturn_Queen'} {'Titania' 'Lady_Death'} {'The_Lightning' 'Silk_Fever'} {'Jewelee' 'Silk_Fever'} {'Golden_Glider' 'Lazara'} {'Queen_Of_Fables' 'Star_Sapphire'} {'Jewelee' 'Zaladane'} {'Genevieve_Savidge' 'Lazara'} {'Sun_Girl' 'Lady_Death'} {'Genevieve_Savidge' 'Purgatori'} {'Golddigger' 'Zaladane'} {'Madame_Masque' 'Zaladane'} {'Golden_Glider' 'Rampage'} {'Queen_Clea' 'Decay'} {'Golddigger' 'Silk_Fever'} {'Queen_Of_Fables' 'Saturn_Queen'} {'Madame_Masque' 'Dansen_Macabre'} {'Fem_Paragon' 'Shimmer'} {'The_Lightning' 'Queen_Bee'} {'Queen_Clea' 'Silk_Fever'} {'Titania' 'Rad'} {'Professor_Padraic_Ratigan' 'Maxima'} {'Madame_Masque' 'Queen_Bee'} {'Queen_Of_Fables' 'Dansen_Macabre'} {'Golden_Glider' 'Rad'} {'Queen_Of_Fables' 'Lazara'} {'Sun_Girl' 'Silk_Fever'} {'Jewelee' 'Superwoman'} {'Queen_Clea' 'Star_Sapphire'} {'Mist' 'Maxima'} {'Fem_Paragon' 'Purgatori'} {'Titania' 'Maxima'} {'Jewelee' 'Saturn_Queen'} {'Genevieve_Savidge' 'Rad'} {'Jewelee' 'Rampage'} {'Bombshell' 'Lazara'} {'Mist' 'Lady_Death'} {'Harley_Quinn' 'Rampage'} {'Abominatrix' 'Lazara'} {'Genevieve_Savidge' 'Zaladane'} {'Dr_Horrible' 'Amazing_Grace'} {'Titania' 'Shimmer'} {'Professor_Padraic_Ratigan' 'Queen_Bee'} {'Dr_Horrible' 'Zaladane'} {'Sun_Girl' 'Purgatori'} {'Valentina' 'Dansen_Macabre'} {'Silver_Banshee' 'Lady_Vic'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Yellowjacket' 'Margaret_Love'} {'Lady_Vic' 'Evinlea'} {'Princess_Python' 'Amy_Madison'} {'Tigress' 'Evinlea'} {'Mist' 'Evinlea'} {'Roulette' 'Silver_Banshee'} {'Lady_Shiva' 'Cyborgirl'} {'Madame_Rouge' 'Decay'} {'Lady_Vic' 'Cyborgirl'} {'Titania' 'Madame_Masque'} {'Unicron' 'Amy_Madison'} {'Unicron' 'Madame_Masque'} {'Osira' 'Decay'} {'Titania' 'Decay'} {'Osira' 'Margaret_Love'} {'Lady_Shiva' 'Poundcakes'} {'Fake_Thomas_Jefferson' 'Black_Mamba'} {'Mist' 'Genevieve_Savidge'} {'Lady_Shiva' 'Duela_Dent'} {'Mist' 'Maxima'} {'Mai_Shen' 'Amazing_Grace'} {'Mai_Shen' 'Black_Mamba'} {'Yellowjacket' 'Black_Mamba'} {'Princess_Python' 'Silver_Banshee'} {'Queen_Bee' 'Hypnota'} {'Madame_Rouge' 'Duela_Dent'} {'Lady_Vic' 'Hypnota'} {'Queen_Of_Fables' 'Poundcakes'} {'Lady_Death' 'Purgatori'} {'Lady_Death' 'Spider_Girl'} {'Plastique' 'Trinity'} {'Tigress' 'Genevieve_Savidge'} {'Titania' 'Silver_Banshee'} {'Tigress' 'Amazing_Grace'} {'Plastique' 'Duela_Dent'} {'Lady_Shiva' 'Madame_Masque'} {'Yellowjacket' 'Evinlea'} {'Lady_Death' 'Margaret_Love'} {'Titania' 'Amy_Madison'} {'Ursa' 'Poundcakes'} {'Madame_Rouge' 'Maxima'} {'Lady_Death' 'Southpaw'} {'Mothergod' 'Hypnota'} {'Princess_Python' 'Margaret_Love'} {'Mai_Shen' 'Duela_Dent'} {'Ursa' 'Duela_Dent'} {'Mist' 'Black_Mamba'} {'Mist' 'Nyssa_Raatko'} {'Plastique' 'Southpaw'} {'Lady_Vic' 'Nyssa_Raatko'} {'Queen_Bee' 'Jason_Kreis'} {'Plastique' 'Decay'} {'Unicron' 'Margaret_Love'} {'Prank' 'Spider_Girl'} {'Ursa' 'Madame_Masque'} {'Prank' 'Genevieve_Savidge'} {'Plastique' 'Spider_Girl'} {'Fake_Thomas_Jefferson' 'Hypnota'} {'Queen_Bee' 'Evinlea'} {'Ursa' 'Nyssa_Raatko'} {'Queen_Of_Fables' 'Nyssa_Raatko'} {'Tigress' 'Purgatori'} {'Princess_Python' 'Jason_Kreis'} {'Madame_Rouge' 'Purgatori'} {'Queen_Bee' 'Southpaw'} {'Madame_Rouge' 'Amy_Madison'} {'Queen_Of_Fables' 'Margaret_Love'} {'Queen_Bee' 'Duela_Dent'} {'Madame_Rouge' 'Genevieve_Savidge'} {'Unicron' 'Cyborgirl'} {'Ursa' 'Evinlea'} {'Titania' 'Maxima'} {'Mothergod' 'Trinity'} {'Princess_Python' 'Purgatori'} {'Ursa' 'Silver_Banshee'} {'Queen_Of_Fables' 'Amazing_Grace'} {'Fake_Thomas_Jefferson' 'Amy_Madison'} {'Queen_Bee' 'Amazing_Grace'} {'Osira' 'Jason_Kreis'} {'Tigress' 'Duela_Dent'} {'Queen_Of_Fables' 'Black_Mamba'} {'Osira' 'Southpaw'} {'Yellowjacket' 'Plastique'} {'Lady_Death' 'Duela_Dent'} {'Mai_Shen' 'Margaret_Love'} {'Mothergod' 'Genevieve_Savidge'} {'Lady_Shiva' 'Hypnota'} {'Roulette' 'Cyborgirl'} {'Tigress' 'Trinity'} {'Ursa' 'Cyborgirl'} {'Mothergod' 'Poundcakes'} {'Fake_Thomas_Jefferson' 'Amazing_Grace'} {'Madame_Rouge' 'Margaret_Love'} {'Unicron' 'Evinlea'} {'Plastique' 'Amy_Madison'} {'Lady_Death' 'Hypnota'} {'Roulette' 'Black_Mamba'} {'Unicron' 'Amazing_Grace'} {'Lady_Vic' 'Maxima'} {'Prank' 'Madame_Masque'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Magpie' 'White_Rabbit'} {'Jinx' 'Silk_Fever'} {'Golden_Glider' 'Plastique'} {'Queen_Bee' 'Mist'} {'Jinx' 'Valentina'} {'Princess_Python' 'Lady_Quark'} {'Golddigger' 'White_Rabbit'} {'Golddigger' 'Mist'} {'Poison_Ivy' 'Purgatori'} {'The_Crimson_Ghost' 'Osira'} {'Queen_Bee' 'Yellowjacket'} {'Poundcakes' 'Lady_Death'} {'Golden_Glider' 'White_Rabbit'} {'Lady_Shiva' 'Osira'} {'Margaret_Love' 'Lady_Death'} {'Magpie' 'Lazara'} {'Queen_Bee' 'Ursa'} {'Poundcakes' 'Harley_Quinn'} {'Leather' 'Lady_Quark'} {'Rad' 'Scandal'} {'Golddigger' 'Osira'} {'Magpie' 'Mist'} {'Magpie' 'Jinx'} {'Leather' 'Lazara'} {'Snapdragon' 'King_Ghidorah'} {'Maxima' 'King_Ghidorah'} {'Magpie' 'Spider_Girl'} {'Snapdragon' 'Harley_Quinn'} {'Poundcakes' 'Livewire'} {'Snapdragon' 'Gru'} {'Jinx' 'Spider_Girl'} {'Rad' 'Gru'} {'Jinx' 'Mist'} {'The_Crimson_Ghost' 'Valentina'} {'The_Crimson_Ghost' 'Livewire'} {'New_Wave' 'Plastique'} {'Princess_Python' 'Deuce'} {'Snapdragon' 'Spider_Girl'} {'The_Lightning' 'Mist'} {'Ingra' 'Jason_Kreis'} {'Golden_Glider' 'Silk_Fever'} {'New_Wave' 'Mist'} {'Poison_Ivy' 'Silk_Fever'} {'Jewelee' 'White_Rabbit'} {'Golddigger' 'Lady_Death'} {'Margaret_Love' 'Jason_Kreis'} {'Poison_Ivy' 'Mist'} {'Margaret_Love' 'Yellowjacket'} {'Rampage' 'Jason_Kreis'} {'Maxima' 'Spider_Girl'} {'Rampage' 'Scandal'} {'Rampage' 'Lady_Quark'} {'New_Wave' 'White_Rabbit'} {'Lady_Shiva' 'Spider_Girl'} {'Lady_Shiva' 'Purgatori'} {'Poison_Ivy' 'Valentina'} {'Jewelee' 'Lady_Death'} {'Ingra' 'Harley_Quinn'} {'Princess_Python' 'Yellowjacket'} {'Lady_Shiva' 'Deuce'} {'Jewelee' 'Lady_Quark'} {'Rad' 'Lazara'} {'Rad' 'Osira'} {'Maxima' 'Scandal'} {'The_Lightning' 'Yellowjacket'} {'Magpie' 'Jason_Kreis'} {'Queen_Bee' 'Purgatori'} {'Princess_Python' 'Ursa'} {'New_Wave' 'Deuce'} {'Rampage' 'Ursa'} {'The_Crimson_Ghost' 'Lazara'} {'Magpie' 'King_Ghidorah'} {'Maxima' 'Mist'} {'Ingra' 'Purgatori'} {'Ingra' 'Scandal'} {'Golden_Glider' 'Deuce'} {'Poison_Ivy' 'Plastique'} {'Rad' 'Silk_Fever'} {'Jewelee' 'King_Ghidorah'} {'Queen_Bee' 'Scandal'} {'Golddigger' 'Livewire'} {'Maxima' 'Ursa'} {'Leather' 'Mist'} {'The_Lightning' 'Deuce'} {'Golddigger' 'Purgatori'} {'New_Wave' 'Gru'} {'Lady_Shiva' 'Plastique'} {'Leather' 'Spider_Girl'} {'Poison_Ivy' 'King_Ghidorah'} {'Golddigger' 'Yellowjacket'} {'Margaret_Love' 'Spider_Girl'} {'Ingra' 'Lady_Death'} {'Lady_Shiva' 'Silk_Fever'} {'Margaret_Love' 'Mist'} {'Jinx' 'White_Rabbit'} {'Ingra' 'Spider_Girl'} {'Maxima' 'Harley_Quinn'} {'Lady_Shiva' 'Harley_Quinn'} {'Poison_Ivy' 'Spider_Girl'} {'The_Crimson_Ghost' 'King_Ghidorah'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'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'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Decay' 'Typhoid_Mary'} {'Saturn_Queen' 'Silver_Banshee'} {'Golden_Glider' 'The_Lightning'} {'Blue_Snowman' 'Margaret_Love'} {'Amazing_Grace' 'Magpie'} {'Spider_Girl' 'Genevieve_Savidge'} {'Princess_Python' 'Bombshell'} {'Roulette' 'Golddigger'} {'Syndrome' 'Silk_Fever'} {'Roulette' 'Margaret_Love'} {'Syndrome' 'Lady_Clay'} {'Prank' 'Jewelee'} {'Plastique' 'Magenta'} {'Trinity' 'Nyssa_Raatko'} {'Golden_Glider' 'Lafety_Le_Fei'} {'Spider_Girl' 'Jewelee'} {'Queen_Clea' 'Magenta'} {'Roulette' 'Typhoid_Mary'} {'Poundcakes' 'Silk_Fever'} {'Prank' 'Typhoid_Mary'} {'Amy_Madison' 'Titania'} {'Poundcakes' 'Magenta'} {'Syndrome' 'Rad'} {'Ursa' 'Genevieve_Savidge'} {'Blue_Snowman' 'Nyssa_Raatko'} {'Trinity' 'Margaret_Love'} {'Madame_Masque' 'Magpie'} {'Amy_Madison' 'Margaret_Love'} {'Amy_Madison' 'Genevieve_Savidge'} {'Saturn_Queen' 'Lafety_Le_Fei'} {'Plastique' 'Jewelee'} {'Blue_Snowman' 'Genevieve_Savidge'} {'Amy_Madison' 'Silver_Banshee'} {'Amazing_Grace' 'Lady_Death'} {'Princess_Python' 'Sun_Girl'} {'Blue_Snowman' 'Jewelee'} {'Blue_Snowman' 'Rad'} {'Queen_Of_Fables' 'Magenta'} {'Amy_Madison' 'Lady_Death'} {'Madame_Masque' 'The_Lightning'} {'Unicron' 'Lady_Clay'} {'Trinity' 'Lafety_Le_Fei'} {'Decay' 'Lady_Death'} {'Princess_Python' 'Nyssa_Raatko'} {'Trinity' 'Leather'} {'Lotso' 'Leather'} {'Amazing_Grace' 'Golddigger'} {'Madame_Masque' 'Leather'} {'Plastique' 'Silk_Fever'} {'Decay' 'Silk_Fever'} {'Lotso' 'Queen_Bee'} {'Amy_Madison' 'Nyssa_Raatko'} {'Prank' 'Magenta'} {'Queen_Clea' 'Magpie'} {'Queen_Of_Fables' 'Lafety_Le_Fei'} {'Trinity' 'Magenta'} {'Unicron' 'Bombshell'} {'Ursa' 'Sun_Girl'} {'Blue_Snowman' 'Typhoid_Mary'} {'Amazing_Grace' 'Lafety_Le_Fei'} {'Madame_Masque' 'Silver_Banshee'} {'Spider_Girl' 'Typhoid_Mary'} {'Ursa' 'Silk_Fever'} {'Poundcakes' 'Jewelee'} {'Queen_Of_Fables' 'Golddigger'} {'Unicron' 'Genevieve_Savidge'} {'Prank' 'Nyssa_Raatko'} {'Amy_Madison' 'The_Lightning'} {'Saturn_Queen' 'Silk_Fever'} {'Amy_Madison' 'Lafety_Le_Fei'} {'Roulette' 'Sun_Girl'} {'Ursa' 'Magpie'} {'Decay' 'Leather'} {'Golden_Glider' 'Lady_Death'} {'Queen_Clea' 'Leather'} {'Trinity' 'Bombshell'} {'Ursa' 'Lady_Clay'} {'Golden_Glider' 'Typhoid_Mary'} {'Trinity' 'Genevieve_Savidge'} {'Roulette' 'Leather'} {'Ursa' 'Rad'} {'Queen_Of_Fables' 'Genevieve_Savidge'} {'Roulette' 'Silver_Banshee'} {'Plastique' 'Margaret_Love'} {'Syndrome' 'Genevieve_Savidge'} {'Syndrome' 'Silver_Banshee'} {'Golden_Glider' 'Silk_Fever'} {'Prank' 'Titania'} {'Golden_Glider' 'Nyssa_Raatko'} {'Amy_Madison' 'Silk_Fever'} {'Trinity' 'Golddigger'} {'Plastique' 'Lady_Clay'} {'Amazing_Grace' 'Queen_Bee'} {'Unicron' 'The_Lightning'} {'Poundcakes' 'Bombshell'} {'Madame_Masque' 'Lafety_Le_Fei'} {'Saturn_Queen' 'Margaret_Love'} {'Princess_Python' 'Queen_Bee'} {'Ursa' 'Jewelee'} {'Queen_Of_Fables' 'Titania'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lady_Quark' 'Madame_Masque'} {'Coachwhip' 'Lady_Quark'} {'Lady_Clay' 'Coachwhip'} {'Madame_Masque' 'Southpaw'} {'Talia_Al_Ghul' 'Lady_Clay'} {'Southpaw' 'Talia_Al_Ghul'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Gru' 'Prank'} {'Lady_Shiva' 'Spider_Girl'} {'Gru' 'Spider_Girl'} {'Lady_Shiva' 'Prank'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Bee' 'Professor_Padraic_Ratigan'} {'Lagomorph' 'Gru'} {'White_Rabbit' 'Zaladane'} {'Lagomorph' 'Madame_Masque'} {'Unicron' 'Lady_Quark'} {'Unicron' 'Zaladane'} {'Saturn_Queen' 'Fake_Thomas_Jefferson'} {'Mephista' 'Professor_Padraic_Ratigan'} {'Silver_Swan' 'Madame_Rouge'} {'Mephista' 'Lafety_Le_Fei'} {'Lashina' 'Hypnota'} {'Saturn_Queen' 'Hypnota'} {'Golden_Glider' 'Fake_Thomas_Jefferson'} {'Madame_Masque' 'Typhoid_Mary'} {'Black_Mamba' 'Plastique'} {'Lagomorph' 'Rampage'} {'Tala' 'Prank'} {'Black_Mamba' 'Animora'} {'Queen_Bee' 'Hypnota'} {'Black_Mamba' 'Rampage'} {'Lady_Vic' 'Hypnota'} {'Mephista' 'Gru'} {'Roulette' 'Superwoman'} {'Unicron' 'Bombshell'} {'Southpaw' 'Madame_Rouge'} {'Queen_Bee' 'Zaladane'} {'Black_Mamba' 'Golddigger'} {'Deuce' 'Bombshell'} {'Southpaw' 'Rampage'} {'Queen_Bee' 'Madame_Rouge'} {'Lady_Vic' 'Lafety_Le_Fei'} {'Lashina' 'Typhoid_Mary'} {'White_Rabbit' 'Dansen_Macabre'} {'Mephista' 'Rampage'} {'Deuce' 'Superwoman'} {'Madame_Masque' 'Queen_Of_Fables'} {'Trinity' 'Fake_Thomas_Jefferson'} {'Roulette' 'Valentina'} {'Silver_Swan' 'Lady_Quark'} {'The_Lightning' 'Bombshell'} {'Lady_Vic' 'Zaladane'} {'The_Lightning' 'Animora'} {'Queen_Bee' 'Fake_Thomas_Jefferson'} {'Silver_Swan' 'Plastique'} {'Lagomorph' 'Professor_Padraic_Ratigan'} {'Tala' 'Animora'} {'Mephista' 'Animora'} {'Madame_Masque' 'Superwoman'} {'Tala' 'Typhoid_Mary'} {'Mephista' 'Valentina'} {'Roulette' 'Zaladane'} {'Southpaw' 'Professor_Padraic_Ratigan'} {'The_Lightning' 'Superwoman'} {'Trinity' 'Plastique'} {'Golden_Glider' 'Madame_Rouge'} {'Titania' 'Rampage'} {'Deuce' 'Professor_Padraic_Ratigan'} {'Deuce' 'Lady_Quark'} {'Madame_Masque' 'Golddigger'} {'Tala' 'Bombshell'} {'Madame_Masque' 'Prank'} {'Deuce' 'Madame_Rouge'} {'Mephista' 'Dansen_Macabre'} {'Lagomorph' 'Mai_Shen'} {'Southpaw' 'Gru'} {'Silver_Swan' 'Typhoid_Mary'} {'Saturn_Queen' 'Superwoman'} {'White_Rabbit' 'Queen_Of_Fables'} {'Golden_Glider' 'Mai_Shen'} {'Golden_Glider' 'Lafety_Le_Fei'} {'The_Lightning' 'Gru'} {'Lady_Vic' 'Golddigger'} {'Madame_Masque' 'Fake_Thomas_Jefferson'} {'King_Ghidorah' 'Prank'} {'Black_Mamba' 'Fake_Thomas_Jefferson'} {'Trinity' 'Lady_Quark'} {'Tala' 'Madame_Rouge'} {'King_Ghidorah' 'Hypnota'} {'Tala' 'Plastique'} {'Golden_Glider' 'Gru'} {'Mephista' 'Golddigger'} {'The_Lightning' 'Fake_Thomas_Jefferson'} {'Roulette' 'Dansen_Macabre'} {'Queen_Bee' 'Animora'} {'Titania' 'Animora'} {'Black_Mamba' 'Gru'} {'Silver_Swan' 'Hypnota'} {'Saturn_Queen' 'Queen_Of_Fables'} {'The_Lightning' 'Prank'} {'Titania' 'Dansen_Macabre'} {'Southpaw' 'Golddigger'} {'The_Lightning' 'Queen_Of_Fables'} {'Trinity' 'Valentina'} {'Trinity' 'Hypnota'} {'Silver_Swan' 'Valentina'} {'Black_Mamba' 'Lafety_Le_Fei'} {'King_Ghidorah' 'Plastique'} {'Queen_Bee' 'Prank'} {'Unicron' 'Superwoman'} {'Deuce' 'Dansen_Macabre'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Windfall'} {'Syndrome' 'Queen_Bee'} {'Dr_Horrible' 'Mai_Shen'} {'Windfall' 'Animora'} {'New_Wave' 'Dr_Horrible'} {'Animora' 'Syndrome'} {'Queen_Bee' 'New_Wave'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Unicron' 'Shiv'} {'Titania' 'Magpie'} {'Queen_Of_Fables' 'Superwoman'} {'Roulette' 'Amazing_Grace'} {'Queen_Of_Fables' 'Princess_Python'} {'Dansen_Macabre' 'Mai_Shen'} {'Madame_Rouge' 'Scandal'} {'Ingra' 'Fury_Leika'} {'Harley_Quinn' 'Emerald_Empress'} {'Fem_Paragon' 'Shiv'} {'Dead_Bowie' 'Star_Sapphire'} {'Gru' 'Abominatrix'} {'Mist' 'Abominatrix'} {'Titania' 'Superwoman'} {'Southpaw' 'Star_Sapphire'} {'Asbestos_Lady' 'Superwoman'} {'Madame_Rouge' 'Star_Sapphire'} {'Margaret_Love' 'Scandal'} {'Dead_Bowie' 'Lady_Death'} {'Ingra' 'Blue_Snowman'} {'Titania' 'Star_Sapphire'} {'Unicron' 'Superwoman'} {'Mothergod' 'Fury_Leika'} {'Asbestos_Lady' 'Scandal'} {'Dansen_Macabre' 'Scandal'} {'Ingra' 'Magpie'} {'Gru' 'Lady_Clay'} {'Harley_Quinn' 'Lady_Death'} {'Southpaw' 'Amazing_Grace'} {'Gru' 'Nyssa_Raatko'} {'Gru' 'Plastique'} {'Unicron' 'Spider_Girl'} {'Madame_Rouge' 'Princess_Python'} {'Jinx' 'Magpie'} {'Mist' 'Plastique'} {'Margaret_Love' 'Dr_Evil'} {'Coachwhip' 'Typhoid_Mary'} {'Ingra' 'Dr_Horrible'} {'Dead_Bowie' 'Mai_Shen'} {'Jinx' 'Lady_Clay'} {'Fem_Paragon' 'Lady_Clay'} {'Unicron' 'Scandal'} {'Mist' 'Fury_Leika'} {'Jinx' 'Amazing_Grace'} {'Madame_Rouge' 'Emerald_Empress'} {'Bombshell' 'Nyssa_Raatko'} {'Mothergod' 'Blue_Snowman'} {'Deuce' 'Typhoid_Mary'} {'Madame_Rouge' 'Superwoman'} {'Mothergod' 'Star_Sapphire'} {'Roulette' 'Shiv'} {'Asbestos_Lady' 'Amazing_Grace'} {'Dead_Bowie' 'Abominatrix'} {'Harley_Quinn' 'Dr_Horrible'} {'Gru' 'Superwoman'} {'Queen_Of_Fables' 'Blue_Snowman'} {'Southpaw' 'Dr_Evil'} {'Fem_Paragon' 'Spider_Girl'} {'Queen_Of_Fables' 'Typhoid_Mary'} {'Bombshell' 'Superwoman'} {'Queen_Of_Fables' 'Amazing_Grace'} {'Coachwhip' 'Spider_Girl'} {'Jinx' 'Nyssa_Raatko'} {'Titania' 'Lady_Clay'} {'Madame_Rouge' 'Fury_Leika'} {'Dansen_Macabre' 'Spider_Girl'} {'Jinx' 'Shiv'} {'Titania' 'Fury_Leika'} {'Fem_Paragon' 'Emerald_Empress'} {'Bombshell' 'Mai_Shen'} {'Harley_Quinn' 'Shiv'} {'Dead_Bowie' 'Lady_Clay'} {'Mothergod' 'Spider_Girl'} {'Southpaw' 'Plastique'} {'Southpaw' 'Magpie'} {'Fem_Paragon' 'Superwoman'} {'Bombshell' 'Amazing_Grace'} {'Ingra' 'Typhoid_Mary'} {'Asbestos_Lady' 'Fury_Leika'} {'Dead_Bowie' 'Blue_Snowman'} {'Southpaw' 'Mai_Shen'} {'Roulette' 'Lady_Clay'} {'Margaret_Love' 'Dr_Horrible'} {'Mist' 'Lady_Death'} {'Deuce' 'Emerald_Empress'} {'Deuce' 'Nyssa_Raatko'} {'Titania' 'Blue_Snowman'} {'Mothergod' 'Amazing_Grace'} {'Roulette' 'Fury_Leika'} {'Madame_Rouge' 'Typhoid_Mary'} {'Mist' 'Superwoman'} {'Dead_Bowie' 'Magpie'} {'Coachwhip' 'Princess_Python'} {'Deuce' 'Lady_Death'} {'Harley_Quinn' 'Mai_Shen'} {'Bombshell' 'Scandal'} {'Madame_Rouge' 'Amazing_Grace'} {'Ingra' 'Nyssa_Raatko'} {'Margaret_Love' 'Abominatrix'} {'Margaret_Love' 'Fury_Leika'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Leather'} {'Syndrome' 'Genevieve_Savidge'} {'Dansen_Macabre' 'Leather'} {'Decay' 'Queen_Bee'} {'Decay' 'Queen_Of_Fables'} {'Lady_Death' 'Queen_Bee'} {'King_Ghidorah' 'Queen_Bee'} {'Professor_Padraic_Ratigan' 'Genevieve_Savidge'} {'Syndrome' 'Harley_Quinn'} {'Syndrome' 'Queen_Of_Fables'} {'Lady_Shiva' 'Golddigger'} {'Syndrome' 'Spider_Girl'} {'Lady_Death' 'Ingra'} {'Poundcakes' 'Queen_Of_Fables'} {'Saturn_Queen' 'Harley_Quinn'} {'Gru' 'Ingra'} {'Professor_Padraic_Ratigan' 'Cyborgirl'} {'Shimmer' 'Osira'} {'Zaladane' 'Talia_Al_Ghul'} {'Lady_Shiva' 'Genevieve_Savidge'} {'Typhoid_Mary' 'Queen_Of_Fables'} {'Syndrome' 'Cyborgirl'} {'Professor_Padraic_Ratigan' 'Osira'} {'Dr_Evil' 'Fem_Paragon'} {'Zaladane' 'Southpaw'} {'Madame_Masque' 'Queen_Bee'} {'Shimmer' 'Deuce'} {'King_Ghidorah' 'Leather'} {'King_Ghidorah' 'Spider_Girl'} {'Gru' 'Golddigger'} {'Duela_Dent' 'Deuce'} {'Madame_Masque' 'Cyborgirl'} {'Scandal' 'Queen_Of_Fables'} {'Dr_Evil' 'Golddigger'} {'Gru' 'Fem_Paragon'} {'Decay' 'Cyborgirl'} {'Windfall' 'Spider_Girl'} {'Scandal' 'Decay'} {'Duela_Dent' 'Ingra'} {'Gru' 'White_Rabbit'} {'Scandal' 'Amazing_Grace'} {'Syndrome' 'Plastique'} {'Mist' 'Queen_Of_Fables'} {'Poundcakes' 'Cyborgirl'} {'Gru' 'Harley_Quinn'} {'Shimmer' 'Southpaw'} {'Duela_Dent' 'Plastique'} {'Poundcakes' 'Deuce'} {'Saturn_Queen' 'Queen_Of_Fables'} {'Mist' 'Maxima'} {'Mist' 'Dead_Bowie'} {'Lady_Death' 'Golddigger'} {'Decay' 'Fem_Paragon'} {'Star_Sapphire' 'Dead_Bowie'} {'Shimmer' 'Cyborgirl'} {'Shimmer' 'Ingra'} {'Lady_Death' 'Emerald_Empress'} {'Saturn_Queen' 'Ingra'} {'Poundcakes' 'Ingra'} {'Saturn_Queen' 'White_Rabbit'} {'Windfall' 'Osira'} {'Dr_Evil' 'White_Rabbit'} {'Madame_Masque' 'Spider_Girl'} {'Mist' 'Leather'} {'Madame_Masque' 'Osira'} {'King_Ghidorah' 'Fem_Paragon'} {'Duela_Dent' 'Golddigger'} {'Typhoid_Mary' 'Emerald_Empress'} {'Decay' 'Maxima'} {'Star_Sapphire' 'White_Rabbit'} {'Lady_Shiva' 'Plastique'} {'Typhoid_Mary' 'Spider_Girl'} {'Scandal' 'Deuce'} {'Dr_Evil' 'Ingra'} {'Dansen_Macabre' 'Ingra'} {'Windfall' 'Dead_Bowie'} {'Windfall' 'Southpaw'} {'Shimmer' 'Emerald_Empress'} {'Saturn_Queen' 'Emerald_Empress'} {'Dansen_Macabre' 'Osira'} {'Scandal' 'Southpaw'} {'Shimmer' 'Maxima'} {'Zaladane' 'Spider_Girl'} {'Gru' 'Talia_Al_Ghul'} {'Scandal' 'Spider_Girl'} {'Poundcakes' 'Fem_Paragon'} {'King_Ghidorah' 'Dead_Bowie'} {'Duela_Dent' 'White_Rabbit'} {'Windfall' 'Amazing_Grace'} {'Scandal' 'Fem_Paragon'} {'Dansen_Macabre' 'Maxima'} {'Star_Sapphire' 'Amazing_Grace'} {'Duela_Dent' 'Emerald_Empress'} {'Syndrome' 'Fem_Paragon'} {'Syndrome' 'Talia_Al_Ghul'} {'Saturn_Queen' 'Dead_Bowie'} {'Gru' 'Queen_Bee'} {'Typhoid_Mary' 'Southpaw'} {'Windfall' 'Talia_Al_Ghul'} {'Mist' 'Talia_Al_Ghul'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mephista' 'Mothergod'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\ntoc","published":true,"deleted":false,"likes_count":1,"comments_count":5,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":"2013-09-19T23:15:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-19T00:46:39.000Z","updated_at":"2013-09-19T23:26:45.000Z","published_at":"2013-09-19T01:43:50.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/2933486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Bad Horse\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e 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.\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 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.\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 conflicted name pairs (cell array of pairs of names)\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 TF (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 11 minutes, 707 out of 776 correct\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\"}]}"},{"id":1881,"title":"GJam 2013 China Event: Happy Teams","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2933486/dashboard#s=p0 GJam 2013 China Bad Horse\u003e. The problem is codified using a cell array of names.\r\n\r\nThe 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. \r\n\r\n*Input:* conflicted name pairs  (cell array of pairs of names)\r\n\r\n*Output:* TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\r\n\r\n*Competition Summary:* Best Time of 9 minutes, 789 out of 1984 correct\r\n\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2933486/dashboard#s=p0\"\u003eGJam 2013 China Bad Horse\u003c/a\u003e. The problem is codified using a cell array of names.\u003c/p\u003e\u003cp\u003eThe 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.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e conflicted name pairs  (cell array of pairs of names)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF  (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\u003c/p\u003e\u003cp\u003e\u003cb\u003eCompetition Summary:\u003c/b\u003e Best Time of 9 minutes, 789 out of 1984 correct\u003c/p\u003e","function_template":"function TF=Make_Teams(names)\r\n% names is an array of cell arrays   \r\n% N columns of {1x2 cell}\r\n TF=0;\r\nend","test_suite":"%%\r\ntic\r\nnames={{'Dead_Bowie' 'Nyssa_Raatko'} {'Animora' 'Lafety_Le_Fei'} {'Animora' 'Mothergod'} {'Animora' 'Nyssa_Raatko'} {'Dead_Bowie' 'Genevieve_Savidge'} {'Dead_Bowie' 'Lafety_Le_Fei'} {'Animora' 'Genevieve_Savidge'} {'Dead_Bowie' 'Mothergod'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mephista' 'New_Wave'} {'Mephista' 'Ursa'} {'Zaladane' 'Mai_Shen'} {'Mephista' 'Mai_Shen'} {'White_Rabbit' 'Hypnota'} {'White_Rabbit' 'New_Wave'} {'Ursa' 'Scandal'} {'Zaladane' 'New_Wave'} {'Ursa' 'Hypnota'} {'Zaladane' 'Scandal'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Spider_Girl' 'Blue_Snowman'} {'Blue_Snowman' 'Roulette'} {'Roulette' 'Spider_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Magenta' 'Golden_Glider'} {'Tala' 'Mothergod'} {'The_Lightning' 'Shiv'} {'The_Lightning' 'Prank'} {'Magenta' 'Shiv'} {'Tala' 'Prank'} {'Trinity' 'Golden_Glider'} {'Magenta' 'Prank'} {'The_Lightning' 'Mothergod'} {'Trinity' 'Mothergod'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'The_Lightning' 'Star_Sapphire'} {'Unicron' 'Queen_Of_Fables'} {'Unicron' 'Dead_Bowie'} {'Lady_Quark' 'Fury_Leika'} {'Lady_Quark' 'Star_Sapphire'} {'The_Lightning' 'Dead_Bowie'} {'Asbestos_Lady' 'Queen_Of_Fables'} {'Unicron' 'Lady_Quark'} {'Asbestos_Lady' 'Star_Sapphire'} {'The_Lightning' 'Fury_Leika'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Scandal'} {'Lashina' 'King_Ghidorah'} {'Doctor_Cyber' 'Tala'} {'Lashina' 'Evinlea'} {'Dr_Evil' 'Tala'} {'Zaladane' 'King_Ghidorah'} {'Doctor_Cyber' 'Evinlea'} {'Doctor_Cyber' 'King_Ghidorah'} {'Dr_Evil' 'Scandal'} {'Lashina' 'Scandal'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Bombshell' 'Rampage'} {'Deuce' 'Ursa'} {'Bombshell' 'Ursa'} {'Lady_Octopus' 'Rampage'} {'Doctor_Cyber' 'Black_Mamba'} {'Deuce' 'Madame_Rouge'} {'Doctor_Cyber' 'Rampage'} {'Lady_Octopus' 'Madame_Rouge'} {'Doctor_Cyber' 'Madame_Rouge'} {'Lady_Octopus' 'Black_Mamba'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Cyborgirl' 'Fury_Leika'} {'Asbestos_Lady' 'Margaret_Love'} {'Amazing_Grace' 'Fury_Leika'} {'Cyborgirl' 'Hypnota'} {'Duela_Dent' 'Amazing_Grace'} {'Duela_Dent' 'Hypnota'} {'Amazing_Grace' 'Margaret_Love'} {'Duela_Dent' 'Mephista'} {'Duela_Dent' 'Fury_Leika'} {'Asbestos_Lady' 'Mephista'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jason_Kreis' 'Poundcakes'} {'Margaret_Love' 'Star_Sapphire'} {'Snapdragon' 'Ingra'} {'Snapdragon' 'Poundcakes'} {'Snapdragon' 'Star_Sapphire'} {'Dead_Bowie' 'Star_Sapphire'} {'Jason_Kreis' 'Ingra'} {'Dead_Bowie' 'Rampage'} {'Dead_Bowie' 'Poundcakes'} {'Margaret_Love' 'Rampage'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lazara' 'Southpaw'} {'Dansen_Macabre' 'Jewelee'} {'Lazara' 'Amazing_Grace'} {'Osira' 'Amazing_Grace'} {'Osira' 'Coachwhip'} {'Coachwhip' 'Princess_Python'} {'Dansen_Macabre' 'Princess_Python'} {'Coachwhip' 'Southpaw'} {'Osira' 'Princess_Python'} {'Osira' 'Jewelee'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lashina' 'Trinity'} {'Lashina' 'Mephista'} {'Lashina' 'Shiv'} {'Lashina' 'Dr_Evil'} {'Lashina' 'Fem_Paragon'} {'Lashina' 'King_Ghidorah'} {'Lashina' 'The_Lightning'} {'Lashina' 'Syndrome'} {'Lashina' 'Margaret_Love'} {'Lashina' 'Lady_Octopus'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lotso' 'Snapdragon'} {'Animora' 'Silver_Swan'} {'Devastation' 'Animora'} {'Snapdragon' 'Devastation'} {'Silver_Swan' 'Lotso'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Spider_Girl' 'Livewire'} {'Jason_Kreis' 'Trinity'} {'Spider_Girl' 'Syndrome'} {'Jason_Kreis' 'Livewire'} {'Harley_Quinn' 'Livewire'} {'Spider_Girl' 'Coachwhip'} {'Lady_Octopus' 'Coachwhip'} {'Lady_Octopus' 'Syndrome'} {'Harley_Quinn' 'Coachwhip'} {'Spider_Girl' 'Trinity'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Swan' 'Windfall'} {'Silver_Swan' 'Poison_Ivy'} {'Lafety_Le_Fei' 'Poison_Ivy'} {'Lafety_Le_Fei' 'Windfall'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Livewire' 'Titania'} {'Livewire' 'Abominatrix'} {'Shiv' 'Ursa'} {'Shiv' 'Abominatrix'} {'Princess_Python' 'Abominatrix'} {'Silk_Fever' 'Abominatrix'} {'Livewire' 'Ursa'} {'Princess_Python' 'Titania'} {'Princess_Python' 'Poundcakes'} {'Silk_Fever' 'Poundcakes'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Fem_Paragon' 'Amy_Madison'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Dr_Evil'} {'Lady_Vic' 'Amy_Madison'} {'Lady_Octopus' 'Ursa'} {'Lafety_Le_Fei' 'Shiv'} {'Princess_Python' 'Amy_Madison'} {'Princess_Python' 'Shiv'} {'Lafety_Le_Fei' 'Ursa'} {'Lafety_Le_Fei' 'Amy_Madison'} {'Lady_Octopus' 'Dr_Evil'} {'Lady_Vic' 'Dr_Evil'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Of_Fables' 'Magenta'} {'Genevieve_Savidge' 'Magenta'} {'Spider_Girl' 'Black_Mamba'} {'Spider_Girl' 'Lady_Shiva'} {'Jinx' 'Lady_Shiva'} {'Spider_Girl' 'Mist'} {'Genevieve_Savidge' 'Lady_Shiva'} {'Jinx' 'Black_Mamba'} {'Genevieve_Savidge' 'Mist'} {'Queen_Of_Fables' 'Black_Mamba'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Titania' 'Saturn_Queen'} {'Lafety_Le_Fei' 'Saturn_Queen'} {'Lafety_Le_Fei' 'Tigress'} {'Titania' 'Tigress'} {'Golddigger' 'Tigress'} {'Titania' 'Tala'} {'Lafety_Le_Fei' 'Tala'} {'Golddigger' 'Tala'} {'Golddigger' 'Saturn_Queen'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Roulette' 'Livewire'} {'Roulette' 'Mai_Shen'} {'Shiv' 'Bombshell'} {'Ursa' 'Bombshell'} {'Ursa' 'Livewire'} {'Shiv' 'Doctor_Cyber'} {'Roulette' 'Bombshell'} {'Blue_Snowman' 'Mai_Shen'} {'Ursa' 'Doctor_Cyber'} {'Blue_Snowman' 'Livewire'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Duela_Dent'} {'Cyborgirl' 'Lafety_Le_Fei'} {'Cyborgirl' 'Duela_Dent'} {'Black_Mamba' 'Unicron'} {'Lady_Death' 'Duela_Dent'} {'Zaladane' 'Cyborgirl'} {'Cyborgirl' 'Devastation'} {'Lady_Death' 'Lafety_Le_Fei'} {'Black_Mamba' 'Devastation'} {'Zaladane' 'Unicron'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Rad' 'Jason_Kreis'} {'Emerald_Empress' 'Lady_Vic'} {'Rad' 'Magenta'} {'Lagomorph' 'Jason_Kreis'} {'Lagomorph' 'Lady_Vic'} {'Lagomorph' 'Magenta'} {'Lagomorph' 'Lady_Quark'} {'Emerald_Empress' 'Genevieve_Savidge'} {'Lady_Quark' 'Genevieve_Savidge'} {'Lady_Quark' 'Jason_Kreis'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Golden_Glider' 'Lady_Clay'} {'Golden_Glider' 'Titania'} {'Lady_Clay' 'Lashina'} {'Lady_Clay' 'Titania'} {'Black_Mamba' 'Lashina'} {'Lady_Clay' 'Lady_Octopus'} {'Maxima' 'Lady_Octopus'} {'Maxima' 'Titania'} {'Black_Mamba' 'Decay'} {'Golden_Glider' 'Decay'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Fem_Paragon'} {'Abominatrix' 'Fem_Paragon'} {'Lady_Quark' 'Princess_Python'} {'The_Crimson_Ghost' 'Ingra'} {'Abominatrix' 'Jinx'} {'Lady_Quark' 'Rampage'} {'Abominatrix' 'Rampage'} {'Princess_Python' 'Jinx'} {'The_Crimson_Ghost' 'Jinx'} {'Lady_Quark' 'Ingra'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dr_Horrible' 'Ingra'} {'Dr_Horrible' 'Sun_Girl'} {'Prank' 'Duela_Dent'} {'Valentina' 'Duela_Dent'} {'Prank' 'Ingra'} {'Lazara' 'Tigress'} {'Lazara' 'Ingra'} {'Lazara' 'Sun_Girl'} {'Valentina' 'Tigress'} {'Valentina' 'Dr_Horrible'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dansen_Macabre' 'Jewelee'} {'Sun_Girl' 'Jewelee'} {'Lady_Shiva' 'Trinity'} {'Lady_Shiva' 'Ursa'} {'Poison_Ivy' 'Jewelee'} {'Dansen_Macabre' 'Ursa'} {'Poison_Ivy' 'Shimmer'} {'Poison_Ivy' 'Trinity'} {'Sun_Girl' 'Shimmer'} {'Lady_Shiva' 'Jewelee'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Eviless'} {'Superwoman' 'Typhoid_Mary'} {'Zaladane' 'Typhoid_Mary'} {'Zaladane' 'Genevieve_Savidge'} {'Superwoman' 'Eviless'} {'Zaladane' 'Bombshell'} {'Ingra' 'Bombshell'} {'Jinx' 'Genevieve_Savidge'} {'Ingra' 'Genevieve_Savidge'} {'Jinx' 'Eviless'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Decay'} {'Ingra' 'Decay'} {'Mai_Shen' 'Deuce'} {'Ingra' 'Lady_Octopus'} {'Margaret_Love' 'Bombshell'} {'Ingra' 'Deuce'} {'Margaret_Love' 'Decay'} {'Dr_Evil' 'Lady_Octopus'} {'Dr_Evil' 'Bombshell'} {'Margaret_Love' 'Ingra'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'Fake_Thomas_Jefferson'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silk_Fever' 'Snapdragon'} {'Professor_Padraic_Ratigan' 'Maxima'} {'Lady_Shiva' 'Decay'} {'Lady_Shiva' 'Lady_Octopus'} {'Nyssa_Raatko' 'Lady_Octopus'} {'Professor_Padraic_Ratigan' 'Decay'} {'Silk_Fever' 'Maxima'} {'Nyssa_Raatko' 'Decay'} {'Professor_Padraic_Ratigan' 'Lady_Octopus'} {'Lady_Shiva' 'Snapdragon'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Bombshell' 'Trinity'} {'Mothergod' 'Professor_Padraic_Ratigan'} {'Tigress' 'Dr_Horrible'} {'Tigress' 'Princess_Python'} {'Rad' 'Dr_Horrible'} {'Rad' 'Professor_Padraic_Ratigan'} {'Mothergod' 'Trinity'} {'Tigress' 'Trinity'} {'Bombshell' 'Professor_Padraic_Ratigan'} {'Mothergod' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Windfall'} {'Syndrome' 'Queen_Bee'} {'Dr_Horrible' 'Mai_Shen'} {'Windfall' 'Animora'} {'New_Wave' 'Dr_Horrible'} {'Animora' 'Syndrome'} {'Queen_Bee' 'New_Wave'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Evinlea' 'Fake_Thomas_Jefferson'} {'Evinlea' 'Southpaw'} {'Magpie' 'Southpaw'} {'Magpie' 'Jason_Kreis'} {'Mist' 'Southpaw'} {'Tigress' 'Jason_Kreis'} {'Tigress' 'Fake_Thomas_Jefferson'} {'Mist' 'Jason_Kreis'} {'Evinlea' 'Gru'} {'Magpie' 'Gru'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Nyssa_Raatko' 'Shiv'} {'Nyssa_Raatko' 'Queen_Of_Fables'} {'Jewelee' 'The_Lightning'} {'Jinx' 'Shiv'} {'Nyssa_Raatko' 'Rad'} {'Jinx' 'The_Lightning'} {'Nyssa_Raatko' 'The_Lightning'} {'Jewelee' 'Rad'} {'Professor_Padraic_Ratigan' 'Shiv'} {'Professor_Padraic_Ratigan' 'Queen_Of_Fables'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Ingra' 'Sun_Girl'} {'Southpaw' 'Golden_Glider'} {'Superwoman' 'Mothergod'} {'Ingra' 'Tigress'} {'Superwoman' 'Sun_Girl'} {'Southpaw' 'Mothergod'} {'Silk_Fever' 'Tigress'} {'Superwoman' 'Ingra'} {'Ingra' 'Golden_Glider'} {'Silk_Fever' 'Sun_Girl'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Mai_Shen' 'Tala'} {'Mai_Shen' 'Abominatrix'} {'Mai_Shen' 'Mothergod'} {'Mai_Shen' 'Ursa'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Princess_Python' 'Abominatrix'} {'Mai_Shen' 'Devastation'} {'Abominatrix' 'Mai_Shen'} {'Devastation' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Shiv' 'Titania'} {'Lady_Quark' 'Trinity'} {'Mothergod' 'Hypnota'} {'Shiv' 'Hypnota'} {'Lady_Quark' 'White_Rabbit'} {'Lady_Octopus' 'Trinity'} {'Shiv' 'Lady_Quark'} {'Mothergod' 'Trinity'} {'Mothergod' 'White_Rabbit'} {'Lady_Octopus' 'Titania'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lazara' 'Queen_Of_Fables'} {'Queen_Bee' 'Magpie'} {'Queen_Bee' 'Rad'} {'Lashina' 'Queen_Of_Fables'} {'Lashina' 'Superwoman'} {'Dead_Bowie' 'Queen_Of_Fables'} {'Lashina' 'Magpie'} {'Queen_Bee' 'Queen_Of_Fables'} {'Dead_Bowie' 'Rad'} {'Lazara' 'Superwoman'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'New_Wave' 'Ingra'} {'Syndrome' 'Princess_Python'} {'New_Wave' 'Sun_Girl'} {'Lashina' 'Ingra'} {'Silk_Fever' 'Ingra'} {'New_Wave' 'Princess_Python'} {'Syndrome' 'Shiv'} {'Lashina' 'Shiv'} {'Lashina' 'Sun_Girl'} {'Silk_Fever' 'Sun_Girl'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Hypnota' 'Sun_Girl'} {'Doctor_Cyber' 'Windfall'} {'Dr_Evil' 'Valentina'} {'Hypnota' 'Abominatrix'} {'Doctor_Cyber' 'Sun_Girl'} {'Mist' 'Windfall'} {'Doctor_Cyber' 'Valentina'} {'Mist' 'Abominatrix'} {'Mist' 'Sun_Girl'} {'Dr_Evil' 'Abominatrix'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Leather' 'King_Ghidorah'} {'Jinx' 'Bombshell'} {'Leather' 'Lady_Vic'} {'Leather' 'Osira'} {'Jewelee' 'Bombshell'} {'Leather' 'Bombshell'} {'Amy_Madison' 'King_Ghidorah'} {'Jinx' 'King_Ghidorah'} {'Jewelee' 'Osira'} {'Amy_Madison' 'Lady_Vic'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Madame_Rouge' 'Ingra'} {'Margaret_Love' 'Ingra'} {'Yellowjacket' 'Dansen_Macabre'} {'Margaret_Love' 'The_Crimson_Ghost'} {'Margaret_Love' 'Rad'} {'Madame_Rouge' 'The_Crimson_Ghost'} {'Yellowjacket' 'Rad'} {'Yellowjacket' 'Ingra'} {'New_Wave' 'Dansen_Macabre'} {'New_Wave' 'The_Crimson_Ghost'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Amy_Madison' 'Typhoid_Mary'} {'Typhoid_Mary' 'The_Crimson_Ghost'} {'Amy_Madison' 'Spider_Girl'} {'Queen_Bee' 'Spider_Girl'} {'Queen_Bee' 'Livewire'} {'Nyssa_Raatko' 'The_Crimson_Ghost'} {'Typhoid_Mary' 'Mothergod'} {'Amy_Madison' 'The_Crimson_Ghost'} {'Typhoid_Mary' 'Livewire'} {'Nyssa_Raatko' 'Mothergod'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Margaret_Love' 'Shimmer'} {'Snapdragon' 'Shimmer'} {'Snapdragon' 'Lady_Octopus'} {'Snapdragon' 'Jewelee'} {'Decay' 'Poundcakes'} {'Amy_Madison' 'Poundcakes'} {'Decay' 'Lady_Octopus'} {'Margaret_Love' 'Lady_Octopus'} {'Decay' 'Jewelee'} {'Amy_Madison' 'Jewelee'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Black_Mamba' 'Purgatori'} {'Talia_Al_Ghul' 'Windfall'} {'Lady_Death' 'Madame_Masque'} {'Spider_Girl' 'Madame_Masque'} {'Black_Mamba' 'Saturn_Queen'} {'Black_Mamba' 'Madame_Masque'} {'Spider_Girl' 'Saturn_Queen'} {'Talia_Al_Ghul' 'Purgatori'} {'Lady_Death' 'Windfall'} {'Spider_Girl' 'Purgatori'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Bombshell' 'Queen_Of_Fables'} {'Silk_Fever' 'Lady_Quark'} {'Windfall' 'Star_Sapphire'} {'Windfall' 'Queen_Of_Fables'} {'Silk_Fever' 'Star_Sapphire'} {'Silk_Fever' 'Bombshell'} {'Shiv' 'Dead_Bowie'} {'Shiv' 'Lady_Quark'} {'Windfall' 'Lady_Quark'} {'Bombshell' 'Dead_Bowie'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Swan' 'Gru'} {'Superwoman' 'Lagomorph'} {'Silver_Swan' 'Duela_Dent'} {'Silver_Swan' 'Superwoman'} {'Superwoman' 'Lady_Vic'} {'Saturn_Queen' 'Lady_Vic'} {'Saturn_Queen' 'Duela_Dent'} {'Poundcakes' 'Lagomorph'} {'Silver_Swan' 'Lady_Vic'} {'Poundcakes' 'Gru'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lady_Vic' 'Queen_Bee'} {'Deuce' 'Yellowjacket'} {'Prank' 'Amazing_Grace'} {'Bombshell' 'Yellowjacket'} {'Deuce' 'Amazing_Grace'} {'Lady_Vic' 'Lady_Death'} {'Deuce' 'Prank'} {'Bombshell' 'Amazing_Grace'} {'Prank' 'Queen_Bee'} {'Deuce' 'Lady_Death'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Maxima' 'Sun_Girl'} {'Spider_Girl' 'Genevieve_Savidge'} {'Spider_Girl' 'Madame_Masque'} {'Fem_Paragon' 'Margaret_Love'} {'Maxima' 'Genevieve_Savidge'} {'Maxima' 'Madame_Masque'} {'Spider_Girl' 'Sun_Girl'} {'Devastation' 'Sun_Girl'} {'Devastation' 'Margaret_Love'} {'Fem_Paragon' 'Madame_Masque'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Tala' 'Animora'} {'Tala' 'Scandal'} {'Tala' 'Amazing_Grace'} {'Tala' 'Lafety_Le_Fei'} {'Tala' 'Lady_Quark'} {'Tala' 'Silver_Banshee'} {'Tala' 'Dansen_Macabre'} {'Tala' 'Jason_Kreis'} {'Tala' 'Cyborgirl'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Fem_Paragon' 'Golddigger'} {'Southpaw' 'Deuce'} {'Southpaw' 'Golddigger'} {'Fem_Paragon' 'Sun_Girl'} {'Rad' 'Sun_Girl'} {'Southpaw' 'Sun_Girl'} {'Rad' 'Lady_Clay'} {'Fem_Paragon' 'Bombshell'} {'Deuce' 'Lady_Clay'} {'Deuce' 'Bombshell'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Poison_Ivy' 'Lady_Octopus'} {'Poison_Ivy' 'Lazara'} {'Lazara' 'Lagomorph'} {'Poison_Ivy' 'Tala'} {'Mephista' 'Lagomorph'} {'Mai_Shen' 'Lagomorph'} {'Mephista' 'Tala'} {'Mai_Shen' 'Lady_Octopus'} {'Mephista' 'Lady_Death'} {'Lazara' 'Lady_Death'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Professor_Padraic_Ratigan' 'Superwoman'} {'Professor_Padraic_Ratigan' 'Shiv'} {'Professor_Padraic_Ratigan' 'Amazing_Grace'} {'Amazing_Grace' 'Bombshell'} {'Saturn_Queen' 'Superwoman'} {'Professor_Padraic_Ratigan' 'Bombshell'} {'Tala' 'Shiv'} {'Tala' 'Trinity'} {'Saturn_Queen' 'Bombshell'} {'Amazing_Grace' 'Trinity'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Zaladane' 'Talia_Al_Ghul'} {'Cyborgirl' 'Snapdragon'} {'Talia_Al_Ghul' 'Cyborgirl'} {'Silver_Banshee' 'Deuce'} {'New_Wave' 'Mist'} {'Osira' 'Lady_Octopus'} {'Lady_Octopus' 'Silver_Banshee'} {'Snapdragon' 'Osira'} {'Mist' 'Zaladane'} {'Deuce' 'New_Wave'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Asbestos_Lady' 'Coachwhip'} {'Asbestos_Lady' 'Jewelee'} {'Asbestos_Lady' 'Shimmer'} {'Lady_Shiva' 'Jewelee'} {'Blue_Snowman' 'Coachwhip'} {'Ingra' 'Coachwhip'} {'Lady_Shiva' 'Ingra'} {'Lady_Shiva' 'Titania'} {'Ingra' 'Shimmer'} {'Blue_Snowman' 'Titania'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Abominatrix' 'Tigress'} {'Queen_Bee' 'Rampage'} {'Unicron' 'Rampage'} {'Lady_Octopus' 'Poundcakes'} {'Unicron' 'Queen_Of_Fables'} {'Abominatrix' 'Queen_Bee'} {'Abominatrix' 'Queen_Of_Fables'} {'Queen_Bee' 'Poundcakes'} {'Lady_Octopus' 'Tigress'} {'Abominatrix' 'Poundcakes'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Scandal' 'Jinx'} {'Scandal' 'Doctor_Cyber'} {'Scandal' 'Roulette'} {'Queen_Bee' 'Jinx'} {'Queen_Bee' 'Roulette'} {'Queen_Bee' 'Yellowjacket'} {'Margaret_Love' 'Yellowjacket'} {'Zaladane' 'Roulette'} {'Margaret_Love' 'Doctor_Cyber'} {'Zaladane' 'Yellowjacket'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lady_Quark' 'Madame_Masque'} {'Coachwhip' 'Lady_Quark'} {'Lady_Clay' 'Coachwhip'} {'Madame_Masque' 'Southpaw'} {'Talia_Al_Ghul' 'Lady_Clay'} {'Southpaw' 'Talia_Al_Ghul'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Evinlea' 'Silver_Banshee'} {'Magenta' 'Amy_Madison'} {'Magenta' 'Fake_Thomas_Jefferson'} {'Deuce' 'Fake_Thomas_Jefferson'} {'Magenta' 'Silver_Banshee'} {'Evinlea' 'Trinity'} {'Cyborgirl' 'Amy_Madison'} {'Cyborgirl' 'Trinity'} {'Evinlea' 'Fake_Thomas_Jefferson'} {'Deuce' 'Silver_Banshee'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jewelee' 'Madame_Rouge'} {'Jewelee' 'Fem_Paragon'} {'Jewelee' 'Professor_Padraic_Ratigan'} {'Jewelee' 'Evinlea'} {'Jewelee' 'Fury_Leika'} {'Jewelee' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Amy_Madison' 'The_Crimson_Ghost'} {'Syndrome' 'Lady_Vic'} {'Syndrome' 'Lady_Quark'} {'Lagomorph' 'Poison_Ivy'} {'Lagomorph' 'Lady_Vic'} {'Shimmer' 'Lady_Quark'} {'Lagomorph' 'The_Crimson_Ghost'} {'Amy_Madison' 'Syndrome'} {'Amy_Madison' 'Poison_Ivy'} {'Shimmer' 'Poison_Ivy'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Swan' 'Purgatori'} {'Nyssa_Raatko' 'Purgatori'} {'Nyssa_Raatko' 'Shimmer'} {'Abominatrix' 'Nyssa_Raatko'} {'Nyssa_Raatko' 'Bombshell'} {'Silver_Swan' 'Bombshell'} {'Abominatrix' 'Duela_Dent'} {'Abominatrix' 'Purgatori'} {'Windfall' 'Duela_Dent'} {'Windfall' 'Shimmer'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Fury_Leika' 'The_Lightning'} {'Amy_Madison' 'The_Lightning'} {'The_Crimson_Ghost' 'Lady_Death'} {'Shimmer' 'Lady_Death'} {'Amy_Madison' 'Queen_Of_Fables'} {'The_Crimson_Ghost' 'Queen_Of_Fables'} {'Fury_Leika' 'Queen_Of_Fables'} {'Amy_Madison' 'Dansen_Macabre'} {'Fury_Leika' 'Dansen_Macabre'} {'Shimmer' 'The_Lightning'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Abominatrix' 'Lady_Shiva'} {'Queen_Clea' 'Fake_Thomas_Jefferson'} {'Abominatrix' 'Hypnota'} {'Jewelee' 'Lady_Shiva'} {'Madame_Masque' 'Lady_Shiva'} {'Jewelee' 'Hypnota'} {'Queen_Clea' 'Hypnota'} {'Madame_Masque' 'Maxima'} {'Jewelee' 'Fake_Thomas_Jefferson'} {'Jewelee' 'Maxima'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Southpaw' 'Silver_Banshee'} {'Animora' 'Professor_Padraic_Ratigan'} {'Dansen_Macabre' 'Jason_Kreis'} {'Valentina' 'Professor_Padraic_Ratigan'} {'Animora' 'Jason_Kreis'} {'Animora' 'Silver_Banshee'} {'Southpaw' 'Professor_Padraic_Ratigan'} {'Dansen_Macabre' 'Titania'} {'Valentina' 'Jason_Kreis'} {'Valentina' 'Titania'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Saturn_Queen' 'Lazara'} {'Decay' 'Magpie'} {'Saturn_Queen' 'Decay'} {'Harley_Quinn' 'Magpie'} {'Bombshell' 'Silver_Banshee'} {'Decay' 'Lazara'} {'Decay' 'Madame_Masque'} {'Saturn_Queen' 'Silver_Banshee'} {'Bombshell' 'Madame_Masque'} {'Harley_Quinn' 'Lazara'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Silver_Banshee' 'Osira'} {'Jewelee' 'Dead_Bowie'} {'Scandal' 'Poison_Ivy'} {'Scandal' 'Osira'} {'Shiv' 'Dead_Bowie'} {'Shiv' 'Rad'} {'Silver_Banshee' 'Poison_Ivy'} {'Jewelee' 'Osira'} {'Scandal' 'Shiv'} {'Silver_Banshee' 'Rad'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Scandal' 'Roulette'} {'Poison_Ivy' 'Mephista'} {'Amazing_Grace' 'Spider_Girl'} {'Poison_Ivy' 'Roulette'} {'Scandal' 'Lafety_Le_Fei'} {'Mephista' 'Lafety_Le_Fei'} {'Mephista' 'Spider_Girl'} {'Poison_Ivy' 'Princess_Python'} {'Poison_Ivy' 'Spider_Girl'} {'Amazing_Grace' 'Princess_Python'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dr_Horrible' 'Genevieve_Savidge'} {'Decay' 'Windfall'} {'Dansen_Macabre' 'Princess_Python'} {'Purgatori' 'Windfall'} {'Purgatori' 'Princess_Python'} {'Purgatori' 'Mist'} {'Dr_Horrible' 'Mist'} {'Dansen_Macabre' 'Genevieve_Savidge'} {'Decay' 'Mist'} {'Dr_Horrible' 'Princess_Python'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Typhoid_Mary' 'Margaret_Love'} {'Typhoid_Mary' 'Sun_Girl'} {'Typhoid_Mary' 'Osira'} {'Deuce' 'Fake_Thomas_Jefferson'} {'Fake_Thomas_Jefferson' 'Margaret_Love'} {'Deuce' 'Sun_Girl'} {'Fake_Thomas_Jefferson' 'Tala'} {'Lashina' 'Sun_Girl'} {'Lashina' 'Tala'} {'Deuce' 'Osira'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Golden_Glider' 'Rad'} {'Lashina' 'Mothergod'} {'White_Rabbit' 'Asbestos_Lady'} {'Star_Sapphire' 'White_Rabbit'} {'Lafety_Le_Fei' 'Star_Sapphire'} {'Mothergod' 'Lafety_Le_Fei'} {'Fury_Leika' 'Lashina'} {'Asbestos_Lady' 'Golden_Glider'} {'Rad' 'Fury_Leika'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Coachwhip' 'Abominatrix'} {'Lady_Death' 'Abominatrix'} {'Superwoman' 'Queen_Clea'} {'Coachwhip' 'Queen_Clea'} {'Superwoman' 'Tigress'} {'Coachwhip' 'Silk_Fever'} {'Rad' 'Lady_Death'} {'Rad' 'Tigress'} {'Rad' 'Silk_Fever'} {'Lady_Death' 'Queen_Clea'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Poison_Ivy' 'Leather'} {'Zaladane' 'Star_Sapphire'} {'Ursa' 'Star_Sapphire'} {'Poison_Ivy' 'Ursa'} {'Lady_Death' 'Harley_Quinn'} {'Poison_Ivy' 'Evinlea'} {'Zaladane' 'Evinlea'} {'Ursa' 'Leather'} {'Lady_Death' 'Leather'} {'Poison_Ivy' 'Harley_Quinn'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Margaret_Love' 'Duela_Dent'} {'Margaret_Love' 'Fake_Thomas_Jefferson'} {'Jewelee' 'Jason_Kreis'} {'Lagomorph' 'Jewelee'} {'Lagomorph' 'Fake_Thomas_Jefferson'} {'Lagomorph' 'Duela_Dent'} {'Madame_Masque' 'Jason_Kreis'} {'Jewelee' 'Decay'} {'Margaret_Love' 'Decay'} {'Madame_Masque' 'Fake_Thomas_Jefferson'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jason_Kreis' 'Jewelee'} {'Fury_Leika' 'Queen_Clea'} {'Jason_Kreis' 'Unicron'} {'Fury_Leika' 'Lagomorph'} {'Fury_Leika' 'Jewelee'} {'Abominatrix' 'Lagomorph'} {'Black_Mamba' 'Lagomorph'} {'Black_Mamba' 'Unicron'} {'Abominatrix' 'Queen_Clea'} {'Abominatrix' 'Unicron'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Osira' 'Golden_Glider'} {'Osira' 'Scandal'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Bee' 'Golden_Glider'} {'Sun_Girl' 'Lady_Vic'} {'Queen_Bee' 'Margaret_Love'} {'Sun_Girl' 'Golden_Glider'} {'Queen_Bee' 'Lady_Vic'} {'Sun_Girl' 'Madame_Masque'} {'Sun_Girl' 'Scandal'} {'Queen_Bee' 'Scandal'} {'Sun_Girl' 'Margaret_Love'} {'Queen_Bee' 'Madame_Masque'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lashina' 'Mothergod'} {'Lashina' 'Devastation'} {'Lashina' 'Decay'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Doctor_Cyber' 'Queen_Clea'} {'Ingra' 'Spider_Girl'} {'Ingra' 'Sun_Girl'} {'Doctor_Cyber' 'Spider_Girl'} {'New_Wave' 'Queen_Clea'} {'Dansen_Macabre' 'Tigress'} {'Dansen_Macabre' 'Spider_Girl'} {'New_Wave' 'Spider_Girl'} {'Doctor_Cyber' 'Sun_Girl'} {'New_Wave' 'Tigress'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Coachwhip' 'Southpaw'} {'Coachwhip' 'The_Crimson_Ghost'} {'Abominatrix' 'The_Crimson_Ghost'} {'Tala' 'Hypnota'} {'Madame_Masque' 'The_Crimson_Ghost'} {'Tala' 'New_Wave'} {'Tala' 'The_Crimson_Ghost'} {'Abominatrix' 'Hypnota'} {'Madame_Masque' 'Southpaw'} {'Coachwhip' 'New_Wave'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Black_Mamba' 'Emerald_Empress'} {'Golddigger' 'Prank'} {'Saturn_Queen' 'Prank'} {'Golddigger' 'Nyssa_Raatko'} {'Black_Mamba' 'Hypnota'} {'Saturn_Queen' 'Nyssa_Raatko'} {'Fury_Leika' 'Nyssa_Raatko'} {'Fury_Leika' 'Prank'} {'Fury_Leika' 'Hypnota'} {'Saturn_Queen' 'Emerald_Empress'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'New_Wave'} {'Dead_Bowie' 'Typhoid_Mary'} {'Queen_Clea' 'Typhoid_Mary'} {'Lotso' 'Lagomorph'} {'Lotso' 'Southpaw'} {'Decay' 'New_Wave'} {'Lotso' 'New_Wave'} {'Dead_Bowie' 'Lotso'} {'Queen_Clea' 'Southpaw'} {'Decay' 'Lagomorph'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Eviless' 'Abominatrix'} {'Prank' 'Shimmer'} {'Rampage' 'Syndrome'} {'Queen_Bee' 'Syndrome'} {'Prank' 'Queen_Clea'} {'Prank' 'Syndrome'} {'Queen_Bee' 'Abominatrix'} {'Eviless' 'Shimmer'} {'Rampage' 'Eviless'} {'Rampage' 'Queen_Clea'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Tala' 'Professor_Padraic_Ratigan'} {'Decay' 'Silver_Swan'} {'Queen_Clea' 'Black_Mamba'} {'Poundcakes' 'King_Ghidorah'} {'Poundcakes' 'Silver_Swan'} {'Poundcakes' 'Tala'} {'Queen_Clea' 'Professor_Padraic_Ratigan'} {'Poundcakes' 'Black_Mamba'} {'Decay' 'King_Ghidorah'} {'Tala' 'Silver_Swan'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Tala' 'Bombshell'} {'Tala' 'Mai_Shen'} {'Tala' 'Madame_Rouge'} {'Tala' 'Spider_Girl'} {'Tala' 'Dr_Horrible'} {'Tala' 'Madame_Masque'} {'Tala' 'Lazara'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Livewire' 'Lady_Clay'} {'Livewire' 'Queen_Clea'} {'New_Wave' 'Queen_Clea'} {'New_Wave' 'Lady_Clay'} {'Livewire' 'Rad'} {'New_Wave' 'Rad'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Plastique' 'Cyborgirl'} {'Plastique' 'Tigress'} {'Plastique' 'Superwoman'} {'Plastique' 'Queen_Of_Fables'} {'Plastique' 'Star_Sapphire'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Professor_Padraic_Ratigan' 'Animora'} {'Princess_Python' 'Shiv'} {'Sun_Girl' 'Typhoid_Mary'} {'New_Wave' 'Animora'} {'Professor_Padraic_Ratigan' 'Lady_Clay'} {'New_Wave' 'Lady_Clay'} {'Sun_Girl' 'Shiv'} {'New_Wave' 'Typhoid_Mary'} {'Princess_Python' 'Lady_Clay'} {'Sun_Girl' 'Animora'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Sun_Girl' 'Golddigger'} {'Jewelee' 'Golddigger'} {'Zaladane' 'Deuce'} {'Sun_Girl' 'Deuce'} {'Mai_Shen' 'Golddigger'} {'Jewelee' 'Lazara'} {'Mai_Shen' 'Lazara'} {'Sun_Girl' 'Lazara'} {'Zaladane' 'Lashina'} {'Jewelee' 'Lashina'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Jason_Kreis' 'Amazing_Grace'} {'Maxima' 'Ursa'} {'Queen_Bee' 'Gru'} {'Jason_Kreis' 'Gru'} {'Ursa' 'Lady_Death'} {'Maxima' 'Amazing_Grace'} {'Queen_Bee' 'Tala'} {'Ursa' 'Tala'} {'Jason_Kreis' 'Lady_Death'} {'Maxima' 'Gru'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lagomorph' 'Doctor_Cyber'} {'Mothergod' 'Roulette'} {'Doctor_Cyber' 'Dr_Evil'} {'Roulette' 'Lagomorph'} {'Jewelee' 'Magenta'} {'Fury_Leika' 'Mothergod'} {'Dr_Evil' 'Jewelee'} {'Magenta' 'Fury_Leika'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Dead_Bowie' 'Fake_Thomas_Jefferson'} {'Fake_Thomas_Jefferson' 'Fury_Leika'} {'Fury_Leika' 'Dead_Bowie'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Scandal' 'Eviless'} {'Queen_Of_Fables' 'Queen_Bee'} {'Queen_Of_Fables' 'Duela_Dent'} {'Scandal' 'Duela_Dent'} {'Emerald_Empress' 'Eviless'} {'Syndrome' 'Yellowjacket'} {'Syndrome' 'Eviless'} {'Scandal' 'Yellowjacket'} {'Emerald_Empress' 'Queen_Bee'} {'Emerald_Empress' 'Scandal'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Lazara' 'Blue_Snowman'} {'Lazara' 'Margaret_Love'} {'Lazara' 'Rad'} {'Lazara' 'Syndrome'} {'Lazara' 'Shiv'} {'Lazara' 'Spider_Girl'} {'Lazara' 'Silver_Swan'} {'Lazara' 'Coachwhip'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Valentina' 'Asbestos_Lady'} {'Valentina' 'Doctor_Cyber'} {'Ingra' 'Doctor_Cyber'} {'Scandal' 'Asbestos_Lady'} {'Ingra' 'Professor_Padraic_Ratigan'} {'Valentina' 'Yellowjacket'} {'Lotso' 'Professor_Padraic_Ratigan'} {'Lotso' 'Yellowjacket'} {'Lotso' 'Asbestos_Lady'} {'Scandal' 'Yellowjacket'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Devastation' 'Hypnota'} {'Purgatori' 'Livewire'} {'Evinlea' 'Hypnota'} {'Evinlea' 'Lazara'} {'Devastation' 'Lazara'} {'Nyssa_Raatko' 'Duela_Dent'} {'Evinlea' 'Livewire'} {'Nyssa_Raatko' 'Hypnota'} {'Purgatori' 'Hypnota'} {'Devastation' 'Duela_Dent'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Shimmer' 'Saturn_Queen'} {'Shimmer' 'Lafety_Le_Fei'} {'Golden_Glider' 'Saturn_Queen'} {'Shimmer' 'Cyborgirl'} {'Poison_Ivy' 'Lafety_Le_Fei'} {'Zaladane' 'Cyborgirl'} {'Golden_Glider' 'Cyborgirl'} {'Poison_Ivy' 'Snapdragon'} {'Golden_Glider' 'Snapdragon'} {'Zaladane' 'Saturn_Queen'} };\r\nexp=1;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Queen_Of_Fables' 'Lazara'} {'Saturn_Queen' 'Golden_Glider'} {'Queen_Of_Fables' 'Golden_Glider'} {'Fury_Leika' 'Duela_Dent'} {'Dr_Horrible' 'Golden_Glider'} {'Fury_Leika' 'Ingra'} {'Queen_Of_Fables' 'Duela_Dent'} {'Fury_Leika' 'Dr_Horrible'} {'Saturn_Queen' 'Ingra'} {'Dr_Horrible' 'Lazara'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\n%%\r\nnames={{'Hypnota' 'Abominatrix'} {'New_Wave' 'Mothergod'} {'Hypnota' 'Mothergod'} {'Harley_Quinn' 'Tigress'} {'Harley_Quinn' 'Hypnota'} {'Lady_Vic' 'Tigress'} {'New_Wave' 'Trinity'} {'New_Wave' 'Abominatrix'} {'Harley_Quinn' 'Trinity'} {'Lady_Vic' 'Abominatrix'} };\r\nexp=0;\r\nTF=Make_Teams(names);\r\nassert(TF==exp)\r\ntoc\r\n","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-09-18T04:20:57.000Z","updated_at":"2013-09-18T04:34:45.000Z","published_at":"2013-09-18T04:34:45.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/2933486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 China Bad Horse\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The problem is codified using a cell array of names.\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 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.\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 conflicted name pairs (cell array of pairs of names)\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 TF (TF=1 if two Good teams are possible, 0 if Happy teams are non-producible)\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\u003eCompetition Summary:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Time of 9 minutes, 789 out of 1984 correct\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\"}]}"},{"id":1897,"title":"GJam 2014 China Rd A: Rational Number Tree","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p1 GJam 2014 China Rational Number Tree\u003e.\r\n\r\nThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the small Challenge with a Max of 16 Tree levels. The large Challenge is 64 Tree levels.\r\n\r\nConsider an infinite complete binary tree where the root node is 1/1 and the left and right childs of node P/Q are P/(P+Q) and (P+Q)/Q, respectively. \r\n\r\nThe Tree looks like:\r\n\r\n         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\r\n\r\n\r\nThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\r\n\r\n\r\n*Input:* [N] or [P,Q] where N is an integer node or [P,Q] are terms of a Node\r\n\r\n*Output:* [P,Q] or [N]  depends on Input type\r\n\r\n*Examples:*\r\n\r\n  [Input]  [Output]\r\n    [2] [1 2]\r\n    [1 2] [2]\r\n    [5] [3 2]\r\n    [3 2] [5]\r\n\r\n*Contest Performance:* Best Delta Time of 14 minutes with 1193 out of 3058 completing in less than 3 hours.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p1\"\u003eGJam 2014 China Rational Number Tree\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the small Challenge with a Max of 16 Tree levels. The large Challenge is 64 Tree levels.\u003c/p\u003e\u003cp\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right childs of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\u003c/p\u003e\u003cp\u003eThe Tree looks like:\u003c/p\u003e\u003cpre\u003e         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\u003c/pre\u003e\u003cp\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N] or [P,Q] where N is an integer node or [P,Q] are terms of a Node\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [P,Q] or [N]  depends on Input type\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Input]  [Output]\r\n  [2] [1 2]\r\n  [1 2] [2]\r\n  [5] [3 2]\r\n  [3 2] [5]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 14 minutes with 1193 out of 3058 completing in less than 3 hours.\u003c/p\u003e","function_template":"function vout=Tree_CH(v)\r\n vout=v;\r\nend","test_suite":"%%\r\ntic\r\nv=[281 87 ];\r\nvexp=[64903 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[71 384 ];\r\nvexp=[40544 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[280 103 ];\r\nvexp=[14427 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[17357 ];\r\nvexp=[277 162 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[263 381 ];\r\nvexp=[19846 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[785 477 ];\r\nvexp=[56053 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[19311 ];\r\nvexp=[440 93 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[241 171 ];\r\nvexp=[33049 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[225 94 ];\r\nvexp=[14291 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[40040 ];\r\nvexp=[185 664 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[565 431 ];\r\nvexp=[60145 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[399 680 ];\r\nvexp=[64178 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[62292 ];\r\nvexp=[358 937 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[398 1051 ];\r\nvexp=[46356 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[59 45 ];\r\nvexp=[1777 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[47 175 ];\r\nvexp=[3400 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[59987 ];\r\nvexp=[1109 466 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[33547 ];\r\nvexp=[329 129 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[256 45 ];\r\nvexp=[20703 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[43221 ];\r\nvexp=[1090 673 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[80 251 ];\r\nvexp=[41976 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[40366 ];\r\nvexp=[487 621 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[65 48 ];\r\nvexp=[1289 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5644 ];\r\nvexp=[59 145 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[52852 ];\r\nvexp=[307 787 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[61149 ];\r\nvexp=[610 341 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[39087 ];\r\nvexp=[650 141 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[61881 ];\r\nvexp=[520 361 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[488 275 ];\r\nvexp=[21405 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[33893 ];\r\nvexp=[485 306 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26965 ];\r\nvexp=[885 547 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[5918 ];\r\nvexp=[99 122 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[63216 ];\r\nvexp=[90 379 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[248 459 ];\r\nvexp=[60546 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26250 ];\r\nvexp=[370 607 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[295 476 ];\r\nvexp=[33386 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[29373 ];\r\nvexp=[450 247 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[183 509 ];\r\nvexp=[64324 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[56818 ];\r\nvexp=[257 433 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[447 730 ];\r\nvexp=[57674 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[241 ];\r\nvexp=[17 13 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[14807 ];\r\nvexp=[313 86 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[251 145 ];\r\nvexp=[8557 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[76 485 ];\r\nvexp=[60096 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[24345 ];\r\nvexp=[278 197 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2581 ];\r\nvexp=[127 79 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[588 247 ];\r\nvexp=[48723 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[190 233 ];\r\nvexp=[9630 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[367 303 ];\r\nvexp=[61729 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[4019 ];\r\nvexp=[97 40 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58547 ];\r\nvexp=[953 394 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[25786 ];\r\nvexp=[367 573 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[52923 ];\r\nvexp=[788 283 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[16812 ];\r\nvexp=[134 319 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[394 323 ];\r\nvexp=[38817 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[34401 ];\r\nvexp=[352 287 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[27426 ];\r\nvexp=[334 597 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[278 41 ];\r\nvexp=[35775 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[59405 ];\r\nvexp=[279 166 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[271 428 ];\r\nvexp=[48986 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[539 327 ];\r\nvexp=[59893 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[461 178 ];\r\nvexp=[17867 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[491 627 ];\r\nvexp=[47278 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[62313 ];\r\nvexp=[712 513 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[10791 ];\r\nvexp=[346 103 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58888 ];\r\nvexp=[109 419 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[431 114 ];\r\nvexp=[20855 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[373 647 ];\r\nvexp=[50962 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[60814 ];\r\nvexp=[455 593 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[109 79 ];\r\nvexp=[1321 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[356 581 ];\r\nvexp=[57162 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[3453 ];\r\nvexp=[98 53 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[2024 ];\r\nvexp=[13 46 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[3453 ];\r\nvexp=[98 53 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[3545 ];\r\nvexp=[131 92 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[687 244 ];\r\nvexp=[46715 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26103 ];\r\nvexp=[304 79 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[65174 ];\r\nvexp=[235 326 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[65362 ];\r\nvexp=[155 267 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[701 508 ];\r\nvexp=[48425 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[272 377 ];\r\nvexp=[31638 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[61570 ];\r\nvexp=[143 265 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[156 251 ];\r\nvexp=[32490 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[157 425 ];\r\nvexp=[13924 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[726 203 ];\r\nvexp=[39063 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[26 139 ];\r\nvexp=[65376 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58926 ];\r\nvexp=[474 607 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[64849 ];\r\nvexp=[397 311 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[38407 ];\r\nvexp=[363 115 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[33546 ];\r\nvexp=[200 329 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[271 201 ];\r\nvexp=[50185 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[123 137 ];\r\nvexp=[56830 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[41192 ];\r\nvexp=[125 446 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[689 292 ];\r\nvexp=[40211 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[185 51 ];\r\nvexp=[8407 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[9110 ];\r\nvexp=[189 262 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[128 473 ];\r\nvexp=[34248 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[722 267 ];\r\nvexp=[21147 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[58918 ];\r\nvexp=[491 699 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[144 37 ];\r\nvexp=[36855 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\ntoc\r\n\r\n","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":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-26T22:38:33.000Z","updated_at":"2013-09-26T23:05:09.000Z","published_at":"2013-09-26T23:05:09.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/2924486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Rational Number Tree\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the small Challenge with a Max of 16 Tree levels. The large Challenge is 64 Tree levels.\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\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right childs of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\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 Tree looks like:\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/1\\n    ______|______\\n    |           |\\n   1/2         2/1\\n ___|___     ___|___\\n |     |     |     |\\n1/3   3/2   2/3   3/1]]\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:t\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\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 [N] or [P,Q] where N is an integer node or [P,Q] are terms of a Node\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 [P,Q] or [N] depends on Input type\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\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[[Input]  [Output]\\n  [2] [1 2]\\n  [1 2] [2]\\n  [5] [3 2]\\n  [3 2] [5]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 14 minutes with 1193 out of 3058 completing in less than 3 hours.\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\"}]}"},{"id":42779,"title":"GJam March 2016 IOW: Polynesiaglot Large","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p2 GJam March 2016 Annual I/O for Polynesiaglot\u003e. This is the Large input set. The max Qraw is 100^500, (V+C)^L.\r\n\r\nThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\r\n\r\n*Input:* [C V L] , C[1,50], V[1,50], 1\u003c=L\u003c=500\r\n\r\n*Output:* [Q] max Qraw is 100^500; Q=mod(Qraw,1E9+7)\r\n\r\n*Examples:* [C V L] [Q]\r\n\r\n  [1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n  [1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Theory:* This is a huge value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1).  There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(L-1)\r\n\r\n  Q3    V          C\r\n  Q2  V   C       V\r\n  Q1 V   V       V\r\n\r\nOne method to succeed in this problem is to use the java capability of Matlab.\r\n\u003chttp://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow Cody Java Challenge\u003e. The primary reference sites are \u003chttp://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html Java Math\u003e, \u003chttp://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html Java BigDecimal\u003e, and \u003chttp://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html Java BigInteger\u003e. The Java solution by the winner Stacy is included at the bottom of the test suite.\r\n\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p2\"\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/a\u003e. This is the Large input set. The max Qraw is 100^500, (V+C)^L.\u003c/p\u003e\u003cp\u003eThe GJam story goes that words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=500\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Q] max Qraw is 100^500; Q=mod(Qraw,1E9+7)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [C V L] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \r\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e This is a huge value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1).  There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(L-1)\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eQ3    V          C\r\nQ2  V   C       V\r\nQ1 V   V       V\r\n\u003c/pre\u003e\u003cp\u003eOne method to succeed in this problem is to use the java capability of Matlab. \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\"\u003eCody Java Challenge\u003c/a\u003e. The primary reference sites are \u003ca href = \"http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html\"\u003eJava Math\u003c/a\u003e, \u003ca href = \"http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html\"\u003eJava BigDecimal\u003c/a\u003e, and \u003ca href = \"http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html\"\u003eJava BigInteger\u003c/a\u003e. The Java solution by the winner Stacy is included at the bottom of the test suite.\u003c/p\u003e","function_template":"function [T]=Polyglot(m)\r\n% T total words of length L using C consonants and V vowels\r\n% \r\n% import java.math.*\r\n% xBI=BigInteger(12)\r\n% zBI=xBI.add(yBI);\r\n% zBI=xBI.multiply(yBI);\r\n% mBI=xBI.mod(BigInteger('1000000007'));\r\n% z=str2num(zBI); % Convert JavaBigInteger to numeric\r\n \r\n\r\n import java.math.*\r\n\r\n C=BigInteger(m(1));  % BigInteger\r\n V=BigInteger(m(2));  % BigInteger\r\n L=m(3); % \r\n\r\n\r\n% Values above 255 get mod applied so use string input to BigInteger \r\n TJ=TJ.mod(BigInteger('1000000007'));\r\n% Convert BigInteger type to a numeric \r\n T=str2num(TJ);\r\n \r\n \r\nend","test_suite":"%%\r\ntic\r\n% T 0.7\r\nm=[1 1 4 ];\r\nv=Polyglot(m);\r\nvexp=[5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.8\r\nm=[1 2 2 ];\r\nv=Polyglot(m);\r\nvexp=[6 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[671294715 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[474858966 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 104.4\r\nm=[1 1 500 ];\r\nv=Polyglot(m);\r\nvexp=[523068127 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.3\r\nm=[2 2 1 ];\r\nv=Polyglot(m);\r\nvexp=[2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 41 500 ];\r\nv=Polyglot(m);\r\nvexp=[356064865 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[50 41 1 ];\r\nv=Polyglot(m);\r\nvexp=[41 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[396751820 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[938256882 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[883121986 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[684068183 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.3\r\nm=[4 3 2 ];\r\nv=Polyglot(m);\r\nvexp=[21 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[15068072 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[483582780 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 43 500 ];\r\nv=Polyglot(m);\r\nvexp=[357963597 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[722287557 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 40 497 ];\r\nv=Polyglot(m);\r\nvexp=[142264969 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[300845428 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[626241204 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 50 499 ];\r\nv=Polyglot(m);\r\nvexp=[244005114 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.1\r\nm=[40 4 3 ];\r\nv=Polyglot(m);\r\nvexp=[1344 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[43 42 1 ];\r\nv=Polyglot(m);\r\nvexp=[42 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[518096485 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[223782662 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[678295851 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 2.2\r\nm=[50 3 2 ];\r\nv=Polyglot(m);\r\nvexp=[159 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 2.3\r\nm=[48 4 2 ];\r\nv=Polyglot(m);\r\nvexp=[208 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 41 498 ];\r\nv=Polyglot(m);\r\nvexp=[583339519 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.3\r\nm=[3 43 2 ];\r\nv=Polyglot(m);\r\nvexp=[1978 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[707985113 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 43 500 ];\r\nv=Polyglot(m);\r\nvexp=[254325944 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.0\r\nm=[2 1 1 ];\r\nv=Polyglot(m);\r\nvexp=[1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 5 499 ];\r\nv=Polyglot(m);\r\nvexp=[167403707 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[687213242 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[43 46 1 ];\r\nv=Polyglot(m);\r\nvexp=[46 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 4 498 ];\r\nv=Polyglot(m);\r\nvexp=[127737869 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 47 498 ];\r\nv=Polyglot(m);\r\nvexp=[809685798 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[701760607 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[783408764 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[3 40 499 ];\r\nv=Polyglot(m);\r\nvexp=[158384704 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[198880135 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 44 497 ];\r\nv=Polyglot(m);\r\nvexp=[539871481 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[227201453 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[212311056 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 254.9\r\nm=[2 2 500 ];\r\nv=Polyglot(m);\r\nvexp=[667073398 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[556413734 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 5.3\r\nm=[46 40 3 ];\r\nv=Polyglot(m);\r\nvexp=[211200 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 4 499 ];\r\nv=Polyglot(m);\r\nvexp=[334760532 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 43 500 ];\r\nv=Polyglot(m);\r\nvexp=[328797447 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[225964115 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[690707538 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[195330871 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[5 4 2 ];\r\nv=Polyglot(m);\r\nvexp=[36 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[188049811 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.0\r\nm=[1 1 1 ];\r\nv=Polyglot(m);\r\nvexp=[1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 218.1\r\nm=[1 2 500 ];\r\nv=Polyglot(m);\r\nvexp=[696656237 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[42 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[922192442 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[49 45 500 ];\r\nv=Polyglot(m);\r\nvexp=[763469125 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[328920270 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 150.3\r\nm=[2 1 500 ];\r\nv=Polyglot(m);\r\nvexp=[260322005 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.4\r\nm=[5 49 2 ];\r\nv=Polyglot(m);\r\nvexp=[2646 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[237431455 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[29203332 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 41 500 ];\r\nv=Polyglot(m);\r\nvexp=[376005947 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[378681068 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[795014271 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.6\r\nm=[42 44 1 ];\r\nv=Polyglot(m);\r\nvexp=[44 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 41 500 ];\r\nv=Polyglot(m);\r\nvexp=[506257932 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 4 497 ];\r\nv=Polyglot(m);\r\nvexp=[272829097 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[50 50 1 ];\r\nv=Polyglot(m);\r\nvexp=[50 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.7\r\nm=[50 50 2 ];\r\nv=Polyglot(m);\r\nvexp=[5000 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[607981550 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[267081842 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[48 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[612852205 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[652373815 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[5 5 497 ];\r\nv=Polyglot(m);\r\nvexp=[336290141 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[50517743 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 46 500 ];\r\nv=Polyglot(m);\r\nvexp=[251353420 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[66724508 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 44 500 ];\r\nv=Polyglot(m);\r\nvexp=[390526622 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[45 47 500 ];\r\nv=Polyglot(m);\r\nvexp=[37814577 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[47 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[923599754 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[872350727 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[668567771 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 4 498 ];\r\nv=Polyglot(m);\r\nvexp=[111334900 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.6\r\nm=[43 45 2 ];\r\nv=Polyglot(m);\r\nvexp=[3960 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[4 5 2 ];\r\nv=Polyglot(m);\r\nvexp=[45 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 49 500 ];\r\nv=Polyglot(m);\r\nvexp=[281852157 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[43 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[884129281 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[41 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[216141546 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[40 42 500 ];\r\nv=Polyglot(m);\r\nvexp=[488528258 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.3\r\nm=[5 42 2 ];\r\nv=Polyglot(m);\r\nvexp=[1974 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 1.7\r\nm=[45 45 1 ];\r\nv=Polyglot(m);\r\nvexp=[45 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[46 48 500 ];\r\nv=Polyglot(m);\r\nvexp=[190132182 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 0.3\r\nm=[1 2 1 ];\r\nv=Polyglot(m);\r\nvexp=[2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T 3.6\r\nm=[47 42 2 ];\r\nv=Polyglot(m);\r\nvexp=[3738 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[4 45 499 ];\r\nv=Polyglot(m);\r\nvexp=[999945335 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[44 40 500 ];\r\nv=Polyglot(m);\r\nvexp=[53296911 ];\r\nassert(isequal(vexp,v))\r\n%%\r\n% T Inf\r\nm=[50 50 500 ];\r\nv=Polyglot(m);\r\nvexp=[3178118 ];\r\nassert(isequal(vexp,v))\r\n\r\n\r\n\r\ntoc\r\n\r\n%%\r\n% Stacy992 March 12, 2016\r\n% import java.util.*;\r\n% public class c {\r\n% \tpublic static long[][] memo;\r\n% \tpublic static long mod = 1000000007;\r\n% \tpublic static int c, v, l;\r\n% \tpublic static void main(String[] args){\r\n% \t\tScanner in = new Scanner(System.in);\r\n% \t\tint t = in.nextInt();\r\n% \t\tfor(int z = 1;z\u003c=t;z++){\r\n% \t\t\tc = in.nextInt();\r\n% \t\t\tv = in.nextInt();\r\n% \t\t\tl = in.nextInt();\r\n% \t\t\tmemo = new long[2][l];\r\n% \t\t\tfor(int i = 0;i\u003c2;i++){\r\n% \t\t\t\tArrays.fill(memo[i], -1);\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tSystem.out.println(\"Case #\"+z+\": \"+go(0, 0));\r\n% \t\t}\r\n% \t}\r\n% \tpublic static long go(int flag, int pos){\r\n% \t\tif(pos == l){\r\n% \t\t\tif(flag == 1){\r\n% \t\t\t\treturn 0;\r\n% \t\t\t}\r\n% \t\t\treturn 1;\r\n% \t\t}\r\n% \t\t\r\n% \t\tif(memo[flag][pos] != -1){\r\n% \t\t\treturn memo[flag][pos];\r\n% \t\t}\r\n% \t\t\r\n% \t\tlong ans = 0;\r\n% \t\tans = (ans+(go(0, pos+1)*v))%mod;\r\n% \t\tif(flag != 1){\r\n% \t\t\tans = (ans+(go(1, pos+1)*c))%mod;\r\n% \t\t}\r\n% \t\treturn memo[flag][pos] = ans;\r\n% \t}\r\n% }\r\n\r\n\r\n","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":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-19T20:50:33.000Z","updated_at":"2016-03-19T23:05:52.000Z","published_at":"2016-03-19T23:05:52.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/8274486/dashboard#s=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Polynesiaglot\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Large input set. The max Qraw is 100^500, (V+C)^L.\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 words are such that consonants are always followed by a vowel. Determine the number of possible words of length L using C consonants and V vowels. The final Q is to be modulo of the prime 1E9+7.\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 [C V L] , C[1,50], V[1,50], 1\u0026lt;=L\u0026lt;=500\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 [Q] max Qraw is 100^500; Q=mod(Qraw,1E9+7)\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 [C V L] [Q]\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 1 4] [5] {aaaa,aaba,abaa,baaa,baba}  invalid are {bbaa, aaab} \\n[1 2 2] [6] {aa,ae,ba,be,ee,ea} invalid are {ab,eb,bb}]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e This is a huge value problem, on the order of (C+V)^L, thus brute force will not work. This is also a probability tree type problem. Tree calculations can be reduced to a linear in L evaluation. Inspection shows Q(1)=V, Q(2)=V^2, L=3 Q(3)=V^3+V*C*V+C*V^2 = V*Q(L-1)+V*C*Q(L-2)+C*Q(L-1). There are no Cs at the Q1 level since can not end in a C. Qnext=f(Q(-1),Q(-2)). Qfinal=Q+C*Q(L-1)\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[Q3    V          C\\nQ2  V   C       V\\nQ1 V   V       V]]\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:t\u003eOne method to succeed in this problem is to use the java capability of Matlab.\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://www.mathworks.com/matlabcentral/cody/problems/1833-usage-of-java-math-add-multiply-pow\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody Java Challenge\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The primary reference sites are\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://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eJava Math\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e,\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://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eJava BigDecimal\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, and\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://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eJava BigInteger\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The Java solution by the winner Stacy is included at the bottom of the test suite.\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\"}]}"},{"id":42782,"title":"GJam March 2016 IOW: Passwords and the Block Set","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p3 GJam March 2016 Annual I/O for Password Security\u003e. This is the small-2 case of up to 50 passwords of length 1 to 26\r\n\r\nThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'. \r\n\r\n*Input:* [PW], string up to 50 space separated passwords of 1 to 26 characters\r\n\r\n*Output:* [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\r\n\r\n*Examples:* [PW] [Pstr]\r\n\r\n  [X] [IMPOSSIBLE] \r\n  [QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]\r\n  ['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ] \r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Theory:* Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p3\"\u003eGJam March 2016 Annual I/O for Password Security\u003c/a\u003e. This is the small-2 case of up to 50 passwords of length 1 to 26\u003c/p\u003e\u003cp\u003eThe GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [PW], string up to 50 space separated passwords of 1 to 26 characters\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [PW] [Pstr]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[X] [IMPOSSIBLE] \r\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]\r\n['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ] \r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eTheory:\u003c/b\u003e Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.\u003c/p\u003e","function_template":"function Pstr=Password(c)\r\n% c is a string of space separated passwords\r\n% Suggested sequence\r\n\r\n Pstr='IMPOSSIBLE';\r\n [Impossible]=check_Impossible1(c); % Single character check\r\n if Impossible,return;end\r\n \r\n c=clean(c); % remove passwords with duplicate letters\r\n if isempty(c) % A:Z is okay\r\n  Pstr=char(65:90); %Valid answer A:Z\r\n  return\r\n end\r\n \r\n [Impossible]=check_Impossible(c);\r\n if Impossible\r\n  Pstr='IMPOSSIBLE';\r\n  return;\r\n end\r\n \r\n% Create Valid string\r\n Pstr=make_Pstr(c);\r\nend","test_suite":"%%\r\nglobal zstart;\r\nzstart=now;\r\n%%\r\n%%\r\nm='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nvexp='AIMZGLDTUWKSQBVYXHRCNOEFJP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='X';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QQ';\r\nvexp='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XYZ GCJ OMG LMAO JK';\r\nvexp='AYTKXMBFSCZWRQODUNPJEVLIHG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AB YZ NM';\r\nvexp='AILEPCWDFKTZYJRVMUXGQOSBNH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='C PYTHON GO PERL RUBY JS';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SUBDERMATOGLYPHIC UNCOPYRIGHTABLES';\r\nvexp='AENYGJXRTWOKCZDPLMBISHVFUQ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EY OV OU OF OC OQ OP ED OEI EK OT OH EG ET OR EU ER EM OB OW ON OD EL OX EN EC OG EW OJ OI OM OY EP OS ES EI EV EJ OK EZ EX EQ OL EB EF EO EH EA OA OZ';\r\nvexp='GJUKHQMVZDPTFIXWLSCRYBANOE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CO CH CT LC MC VC CR AC CU CG CJ UC BC IC CM CQ CK CV NC OC TC CZ CL CN FC QC JC CB CW CE CI CX HC WC ZC DC CY CP KC CF GC EC RC YC XC CD PC SC CS CA';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZT XM XD ZE XZ ZI XO ZH ZB XE XY XJ ZQ ZX XI ZY ZW XH XA XK ZS XV ZM ZL ZD ZJ ZA ZF XC XN ZV ZG ZU ZN XP ZK ZC XL XT ZP XU XF XQ XW XG XB XS ZO XR ZR';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MB FR PC TJ BV XF OE LY MF VS AP DR PD HN FI XQ MG EN VC RL KP KR OV XD ME TC KQ QW RA RP HF VH VT XL ZI LZ HG OI YN CT JC RN YZ LA EO QB ZY QI AQ TU';\r\nvexp='AZOYBSTHEDWPMLCGUFNQVKJXIR';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CR CD CJ MC CO CV IC CW TCZ CK BC EC RC CG FC NC HC KC CL OC JC CH CQ AC GC CF ZC CE PC UC CX CB CZ CN LC CP CU WC QC CI YC CT CS DC SC CA XC CY VC CM';\r\nvexp='SLZQOFHUINXWKEYDMJPGVBARTC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YJ OU DJ GJ OM IJ VJ PJ QJ UJ OS OC OQ LJ RJ AJ TJ OR OA OE OX OD FJ NJ OT SJ ZJ OV WJ OJ OG ON OI OY OW BJ KJ EJ CJ HJ OH OL OB OP OF XJ OZ MJ OK';\r\nvexp='JVSYWIBTLUMNDAEHFGZPCRQKXO';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XQ EV IV IS HL GB TZ HR RN HY IG PL OA BK OI YC NC VM NF VB UT IE QR RE TD AZ YT CZ NA KJ AJ DJ MJ LM LK FO JX QL MV ZO TU OL NB AU NV ZJ ZB KC WT JP';\r\nvexp='ADTPRBMOFXHWYGCEQNSZKVLUIJ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IV DLB IU DM DT DH ID IE IT IP DP IK IG IY IX IA IS DX IO IW IR DW IF DB IN DZ IB IH IM DF DA IL IJ DS DJ DK IZ DU IC DN DV DE IQ DQ DC DY DG DO DI DR';\r\nvexp='DLEVWYSCGXFUZOMAQBRNKTHPJI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QZ FP VB AW TL LJ AZ JI ZX SR XF RE QD KG KI MD HY DF HQ DP RA AX DL XR OT MX ZY AG BQ YP KP LS JY IO BF QI EX BZ VG PA TD ZR EC VN VM NJ RW HM EB XU';\r\nvexp='OLNUZCSTHEVRDAJPKMBWGYIQFX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LVPF LVR LVD LZ LF LB LVS LD LO LVK LI LP LVH LVQ LJ LVU LVX LQ LVG LM LVM LVC LG LVA LVN LVO LVW LVE LVZ LVI LK LE LVT LY LS LT LN LC LVB LX LW LH OLVP LA LVF LVJ LR LU LVPS LVY';\r\nvexp='ATYCWPFNQGHKXDBISRMJOZUVEL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AZ GZ OD JZ SD BZ QZ BD FD NZ LZ VD RZ JD HZ TZ XD ID ED AD GD TD KD OZU WD CZ KZ HD YD VZ MZ UD FZ SZ YZ WZ XZ QD MD ZD LD RD PD PZ EZ CD DZ UZ IZ ND';\r\nvexp='DKNVYCBFATUWGMRJILXPEHOZQS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GR AO KF CG ML IY FY EK OJ XW XU ME SP LX PR MD SQ IE KL EQ AK PC SV SK TM NH AS IK OM FQ JD QX WQ CI UH GF XN LP MS LU EG IL GK ZD IQ TR JX OR ND DU';\r\nvexp='DCNYTGXBSLMIHQRJZWFPOAVEUK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IU IY RF XN LC MR OG ZM OH MT NO TA KR VO DH GC LN VF TO PB WV KV XE FE NC UQ SJ NL CI FL KP QY WN LI LY YH YE KE YX PJ YJ OA YO XV XF AL GK NJ DP DW';\r\nvexp='JKQSNRGAEVBFXMUCHOLPZTDIWY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LK PO SO LP LQOP LD IO AO LA LF FO LB LZ VO WO GO LM LO LV LT LJ DO MO LG KO JO TO ZO XO YO BO LY LN LU LQOW XLQO LC RO HO NO EO LW LS LI LE LR LH LX CO UO';\r\nvexp='OTWBHRIUMKPGXVFYDQNJSCEAZL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RF RD IF PD SD BD AD EF FD YF MF ZF XF JD ZD CF XD TF QD CD WD LD TD VF BF HF JF ID YD AF OD PF HD NF UF GD OF QF UD DF VD KD LF ED MD SF ND WF KF GF';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EO OV OM OT FON OF OD BO QO SO XO HO ZO LO OG AO KO ON DO VO WO MO CO OQ JO OL OZ OA NO OR OJ OK OY OI OB GO OE OC RO IO UO OW OH OX YO PO OS OP OU TO';\r\nvexp='QSTZKANWYGERCLPDXIUHJMBVFO';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GJ RN LF GK TN WB KO FC HZ JZ ST VF GT BS TP WZ OE XI MK DO MG DW EN IY ZF WD JO YS ZN HG LR KS IQ OZ KT PG XE ID GP GS RJ HJ WP PL PA FO UT NH ZQ LD';\r\nvexp='SVAHTECFDRIKUQJPBZLNMWYOXG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JA JY SH SN SF SB SC SE JH JP SW JS JO SG JQ SD SX SQ JW JL SL SY SP JX JE SR JI JF JV SV JM SJ SO JU JN JT SI SZ JZ SA SK SM SU JD JG ST JR JK JC JB';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HN RN WN QA TB YD LZ GB GC OC BR SV RD VY UI IX RB ON IG WQ ZO RO UF DF PZ LH HD RI MJ AG BZ LM NC KS MZ WU RM IM VT YW WA PI CI DX AV QP AP YU FP XT';\r\nvexp='AJMUPTDSXBHGQZLYREOWVCNKFI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EU RC YT VD XW IJ XN NS QW SH YR KJ DE HD PV CW HG NF RB CI AP QY IY OD EV ZU FV GW CY QF IZ CB XM ML QG QI WG MQ TI MN IG CA HM BW XK FS XF LI NX GZ';\r\nvexp='PXYBGKHREZCVAWJMSFDTQUNLOI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MR MI HQ ZI XP OX MG KL XZ QL MB VN HO YL VI ZX HP AX CD DE WG DV EP JO CL HD KE GM NE UK PF KW ZM RE LG FY DZ OU LH EV FP DQ JL PR CT PK NH UQ HZ QW';\r\nvexp='AKRNIQBUFVYDSMJZPTWXLCOEGH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WA FT EY VK RI MD NS WZ QW PL DO SL LV WM OP HN OH JD KE OV NE TI PM RJ JL KY EA BQ XS AD VB FS XV QF GT HM MY JY FX IA XK RX GS NU KV RW BY CA GM ZO';\r\nvexp='OBXNTURDGPZCWIJHFKSYVQELAM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IP SP BP PL PS OP YP PI NP PU PGM PT PO AP EP TP CP PH RP PY HP PZ PB DP QP KP JP UP VP PR FP PQ PX PM MP PN GP WP PD PV PW XP PJ PC PF PE PA PK LP ZP';\r\nvexp='PGXNTOZKYRHADSBLQEJFWUCVMI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MC WC LC HF AF WF YC QC TC EC SC ZF IF RC ZC AC IC GC EF OF UC KC DC PF RF XF UF FC TF YF PC JF GF BC NF HC JC LF BF VF MF NC OC SF KF QF CF VC DF XC';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PF DF VL HY XK XQ BZ HT WM AQ LB HC LF AL JR ZB XA SQ OA EX OF JX QP MX QI OJ EN JP HS QS TV FV HU JK NJ VW PJ ZT AR YK UT ZE JF BP IM XF ZC LS EC VU';\r\nvexp='FXYZMSBVEPDRIUQHATGCNWOLKJ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LT DL LN LA LP KL OL WL LF QL GL LG TL LR NL RL LQ IL ML PL LJ CL LS LD EL JL LC LH LM YL LW LI VL UL ZL LX FL BL LV HL AL LO LY LU LZ LE LK KSL LB XL';\r\nvexp='AKINEMBQJVPUYCDHRFGZXOTWSL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WI KW PW WX VW WQ WN WE WC HW WG DW WD WM SW WA WO MW WY WU OW WV LW RW BW NW YW WR AW WS UW JW FW WT XW WZ ZW WF QW WK WH GW IW WJ WP WL CW EW WB TW';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BD BT BJ BUI MBUN BUQ BF BN BUS BUP BUA BW BUF BL BK BC BR BUJ FBUN BUY BP BI BH BUE BG BY BUD BO BQ BUW BM BUH YBUN BUZ BUM BUV BX BE BUR BUL BUO BUX BS BUG BUT BZ BA BV BUC BUK';\r\nvexp='ADPQETZGKJCNHOIMRSLYFWXUVB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZT UT HT ZZ BW LT ZW QT HW VW RT SW KT OW KW QW XW DW TW GW MW FT CT EW WT YW PT NW GT IT ST IW UW DT AW BT JW JT RW ET LW OT PW CW NT VT FW MT YT XT';\r\nvexp='WEZLGIVUJCDXBSOPNYQRFMKATH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WG YM WO TJ JO TN UV OD FI RS FO MN MR YS RH ZB LF ZA SE QP OH KR KF RI ZV MF ON BN QH ME MU UE ZT GC VU ZS UP SR FU NX QX NR YL VW QF OE ZD FB GB UA';\r\nvexp='EBXPWUHKNSCLYRDAOVMJZQIGTF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AN ET HT KT DT CT FT ON GT FN JT ZT VT TN JN YN ZN XT DN UT PT YT MT WT GN KN LN XN PN UN EN ST MN RT AT QT LT RN HN QN SN IN NT BT WN IT OT CN BN VN';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NF KU YF SF TU BF PU YU NU OF FU GF MF AU XF OU KF WU LF PF IF XU AF HF CF VU DU HU BU TF ZU WF JF UF RF ZF LU EF VF IU GU JU CU RU QU MU DF QF SU EU';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HO BA ZA SD SF ZW RE VN MO QK FI PD NC UQ PH OP HR LZ HY HZ CG YU AN MC EW QE JO UX RL ZF YK XA AV RH IA NX NG BI SG HS QG BW GJ CY QH NV FR HI PJ SH';\r\nvexp='AMITGVDKRNYFOSPECQZBJULXWH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QL QB QE QG QD QI XG XU XZ XL QF XS QY QH XA QU XT QO XK QC QR QS QT XW XH QN XY XI QM XP XB QK XV QV XF XN XM QW XO XR QX XE XQ XJ XD QJ QA QZ QP XC';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZIWCDOJXEVLBAPMRFHT JVHQGFXCWOKUYENPDRI UIMWSROLGHNAXTJBZYVPKCDQ LOJVG YNCRGWALHVJU IQRWJH TCVIYN MNLZTGHBO VOZFGPSXKTIQNWHBEARL DEW SUIXVZMWQNGFJPEHACRYOBTL DNLHKEVABRY DWPIUEXLVQJBYGM MJCUFONTGQH XW CGVLRZXPNWKQHDBY AEXTQCD DG HWKUGSCVYJMPINXATBLOF TAVJQMXBCUWN RFBGWNSLJCUQVAKEXOIT TNAQDKJEBPCMVSWGOZXYIR RLKFO BTXKLCNOV AO LGOQXCYMP HQIXLAOB KQSP GJBSYULWTARIKFCQO DSKEHGAMWPCVZFLQTYB XU WRJ EJCOQBFPNYXIKGZS IHRTYQCVSWOLEFDK WGDBECOQMZYPU VFRMWYAJQLOX AEFNOJHKGWTXRLZIBSDM GBAI MALFKYCXHZGQVWTOEDBPSIRN POJIHBYL QCAWXZBHRTYMD UEDNYVMHQ VKBTLDH XLZYBCNFORDMASHWGE RLZDOVPUJKWMNEFSCQYIH OLCBKWQGNDZE ZACRGBYMSINWQ ZBTC AXLEBTJSCWGUFHMZQVPDKINOR SPEQFHYXRGLTC';\r\nvexp='WRYCGUVXQISNDPHAJOTMFEZLKB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QM YQ NY HI QC AQ MW LN PK WL XK TW HG DB AR RY DN ZG XO MH QZ GR DA RF KR IF ZL YN HP HL KU PT IC YB OA RJ QI PW ZF RI WS PB NZ HA MA DY WD GO GQ HW';\r\nvexp='NXLDVJKBSITYCGMFOREWPZQUAH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VD UG JW EB UT EX ES BX GK WF VN OG US EP YU AH XJ WL SZ PZ DA IY WV PX IN VO UW RU ED KL XM DM CD LG CS KX IB AQ SH DK BA ME EO CW GC WT XT AU RL EV';\r\nvexp='PLKVYZNJHIMSTCBUAORGQFDWXE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HF XP XN HQ XH HI XS HL HT XZ HX XB HV XV HM XY XR XF HD HG HC HA XG XL XW HZ HR XI XM XE HW HB XU HY HS HU XO HK HJ HO XC XT XQ XK HE XJ HP XD HN XA';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DJT WNR FWG QV TH GY UP WH LP YWP VY QMF QIK VR YS JP MAW BY TCN PZ NFL AG VLO YZV NJ YD UG QEK AQ DB ESY WC GF XY JVR RY ZY IYV DPH QY JSZ XEW SMK FRX GRQ NH WG PZX UZ NCM';\r\nvexp='AKSTVBFGDIWREQXNPCMZUOLJHY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QB AU TR AJ SI BH FU KB VS FK UL QM TM GE WC OD WX RB XC JA DJ PQ FC YV WV QL CM FI CA TE UI CS GX MX WJ JC CE BU UJ OU NE XK CB LE NH QY TF TX XA UF';\r\nvexp='FVAZHLPRYUEXJMBIGQWTKDSONC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UYQWAJ IJEXGT RADYMIBEJFGKN OXNZH BKZ RDOJETUQKWYVHBZX AOGQLNZCEYKMJSFPURDHIT HXPRJDLNEIGVFZWQTASU EN VXKYGTOABRZDFIWLQ PJSGYZFHDILB MYHNVAESQTXUKG YLFVAWIBGREOCXSPTZUNMD UARXV ARLIFUMCXVKNOHBSPDEZTJ FMSOPJ VFXKHOGEPZYUDA DLXKUSQVBGOIZRYTEFNACWMHP QOCEJRWTIAKMFYNGPV DOSXEPFRQJZBLMGV AVF YLRVZUIHCBFKWDJGXNTOMQ RPSDQFNMKXGOYJACELV ALSOH HRTOPQAWDLBEIKFNCUZJM UWXTQCSKBZNOEYFAGLPMD VTS XB SDLUG WPFLYGACUQIXNJBMSDROEHVTZ GDQTFVSUNRPLHAJMEY XCNTI LJAXKWH WFQNXZOMJIK XAJDTRBYMVZENIKOLGCQHFW NHZMXEIVFDCSAQK BFEMAGNULJW WJRZEQHONX KOTWNQMLBHRVFSZAPYD RELGPAOJKBZTQDUSXMVFIC ZWHQKICMYJTRUBOFEGNADLSVPX ONSGXIYMHWLVR RAJ RF CPMABRIHGSLUQNTXEDOZKYWJF MFYRGICKELNSHOPAWZDBTQ OIJFSMAKGNBHRQYPTEWCLX PYRCUNWKZAQ NPMOIZQJLVTUCWRGYKSAH FXDZAMYRN';\r\nvexp='AVREHGQUFPJNLDOKXWZIMSYCTB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='CN XG KO WB TX BI LF WF XM OJ CJ JO XP VP AZ LO AL NH XI ZS FJ EQ DY FQ PS BY UJ KR RC CU KU LZ SY PE FD ZD ZA GN DL MI GZ NB AM PW IO RM SI SF VT JZ';\r\nvexp='FUVXSABDCMLKIQOGPJRNWEHYTZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DP VF XI BS VE WA VP WJ UQ GY CR NP MI CP LH WK EZ VR AC PH CS XB JS JN RZ EQ YA JK QE PG JV WZ QZ YH QI ES IY AG JT KY VQ GS KN GT FM KH SU PN PU RX';\r\nvexp='ATRNHSQFKZOWXYMGBIUJDVLCEP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GF PY PC PE OF PT PZ NF PW PK WF PG CF YF PF PA TF PLFO PD PR EF PQ PN VF MF PX QF ZF BF UF KF PS PM PV PLFD PH RF PB PJ JF HF SF DF PO AF IF MPLF PU XF PI';\r\nvexp='FBTOERACUZWYJHVMIDSGKXPLQN';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='IU RT XR YA OZ OF UW VN PK WT HR PX LY ZW SZ IK BE XH VW GV NM NY GX KH UZ MS UA CQ CV VS CF IR IN OY NB NZ GR TK RP NO RJ JO CE SY LH TX QB RB VH MY';\r\nvexp='AEBZTMJUFQHPOCXISDKWLNVGYR';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UL UO ANY GA YNE FMH PL ZHO OF KG EPK NFU OE VCS UR AM HBU NMD OUZ DY IL RI SL CPD OY AC YLE DK IR FDC IAT CZ ZPL BV XM VL XF WGU KZI DL SLN XC UGK UJ NA HZL PM TY IKW NU';\r\nvexp='LEWKQMYBNSOXVZCRJIFHPATGDU';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BN BI BGH BGP BF JBGL BH BGS BU BS BGF BQ BE BL BV BO BGZ BP BGQ BGJ BGK BGN BT BGY BGV BGM BX BZ BGO BA BGC BR BD BGA BY BK BGI BC BGR BGLS BGE BJ BW BM BGU BGT BGW BGD BGLA BGX';\r\nvexp='AORQKWXMYGDENHIVTJUZPFCLSB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WL DK KY UK GM DB VC JR PK AJ UZ LW CT QF MH LM HX VP BO HT FO YU TZ KC NG FC PV XR QY UR FS YP ZX AR DV GP ES QB LS KA RB EZ PD UY CH BI EU IX IK SQ';\r\nvexp='ABEFHZPWRVGUJDNLTOCYISMXQK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AX CL CX MX CZ RX CQ OX CE NX LCJX CH QX YCJX CA CB ZX CS LX PX CK CT HX DX CV WX CW CO GX CM CN YX KX CF CJXB CI IX TX FX BX CU UX CP SX CY EX VX CR CD CG';\r\nvexp='XULBSYFQVTZDKARPJHMEGNWIOC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MB UX MF MH UH UB UT UI UQ UEJ MP MG MV UF MD UV UO MJ UR UL MA UP UD MO MY UM UA MX UW MZ US UY MK UJ UK MC MW UN MN MU MT ML MS UC MQ UG ME UZ MI MR';\r\nvexp='UEIPJXKVRBDWYQTAFSOGLCZHNM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KE KS UV KZ EV KI KY BV NV XV MV KF KD KM KT KU RV TV KC ZV KN SV KA KV QV HV KO GV PV KL CV KQ LV KP KX KR FV IV OV JV KJ YV AV DV KH KG KW KB WV';\r\nvexp='VHRAUSYCWGJXIFEPBTDOLQZMNK';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GZ UW UR UG UO QZ DZ CZ WZ UI UZ UH EZ VZ JZ UY UP SZ UD UV UF IZ UA UT UC RZ YZ UM UK UL TZ UJ HZ AZ US UB UN UE UQ KZ OZ XZ MZ UX FZ BZ LZ PZ NZ';\r\nvexp='ZXLCVMQIGTSEJRYFAHDWNPBKOU';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='UL HA WL PA VA RA WA ZA UA AL QL JA OL KL CL DL JL GA XA EL XL IL VL YL TA BL GL YA IA EA NA HL ML FL TL MA FA ZL CA PL NL BA OA SL SA DA LA QA KA RL';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='LR FT IR RT OR XR FR XT DR ER MR NT IT PR MT UTR QR UR VR CT GT WR VT YT BT NR UT SR WT AR ZT BR QT PT HT KR ST DT GR KT JT YR LT CR AT HR ET JR OT ZR';\r\nvexp='TRHIPEYZCFXODASNLJUGKMQWVB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HP JV LC OX XA TG RK GW FP DO EL FQ PD CH EQ GU FM SA YD ZU NJ SM BR YQ KT RZ ZP XU OF MC JA CD UT FC AR ZO RE YI SH NM ZJ OY MB HK QW FN JW HC WS JF';\r\nvexp='BIJMZYPEGDKOSNQUCAHTXWLVRF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VL LK LY XL LA LQ PL LT JL AL LZ BL LU LP RL LG CL GL QL KL LC HL NL LW LO ZL LE WL LR EL YL LX LH LD UL LM DL TL UOL LF IL SL FL LI LB LV LN LS LJ ML';\r\nvexp='AJYHPRCXMQGIEDBZSWNUFKVTOL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GS GC XQ XT GV XZ GX XO XB XF GW GK XV XW GR XI XM GB GO XA GA XP GU GT GF GM GD XS XL XY XN XG GY XH GL GH GE XD XE GZ GJ GQ XC GN XR XU GP XK GI XJ';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HW UH HC HZ WH HA HU HK HE DH AH VH HV TH HM HP HY HG XH HX LH HS HR HD QH GH KH HQ OH SH IH HJ HF FH CH RH JH HL HT HO HI NH EH ZH BH HN HB MH PH YH';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='FG IG HY JG UG TY GY XG VY ZY XY AG PY SG MG KG EG YG QY BY CG ZG RG CY NY FY SY LG LY PG WG BG VG AY NG WY DY TG IY OMY RY OG UY KY EY HG DG JY OY QG';\r\nvexp='GVUHTMYWAFLJENZBDKOSRCIPQX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RVELZJMSYOQUNIXTKDGHFCP XZSDNJIEKTUCMVBWF QFC IPXEBZSMDCHLQWJNUGK NEXKU FVTE QPWSFVRUBEZ XD RIOUBSFK XTUKDHORJGYPCWLNBMIVAE BMFSRUNKHOJI INZMOUAVQJ BFMWUXIQCRZNAEDHY DFHSTZNYVXEJLQRMBA RKN NBHVWTXRCPGUZ ZPCWVLYIMTXJDOFSKARQNEGU FVXZITHRCDPJE BKOEAGNXSUZCJTVQHFWDPM OVDWCNLAF HLYUJDTRF KFJU FDZBONYJCLPEHGWSVKUQMITXR EAJ ZPHIOWKTN EAISBGUDZRQKLHXTCNM RHVKBZPOADNY CIKWHQPTVJNYBOASFDZXGMRL FAXRGVWMNSHEIO JD RBHMS LWGXSDHZJ YZJICSUGDVRKBQA SNYUGPEOIQWZACVD WFXGPABYLUSIKODZTCQVNEHR BGJUQFWIZPHM SPKWETGHXBNUQAZDOVJC LOPDATIGFSNUHJQYWZRBMKXEVC XEJRGIMDHLFUYPCWKNQOBSZVTA VLIFMDAKE DIGR UGYHFRSZD GXBA TAXUGQLKH XUNIOBAYHTSPGEMQVWDRLFJK CYHQPBXVMLAOITFZD WFYKTHPEC WPRSXYGKBTMUZC HFTXMWPGECDZSLNIRYUJKO CKARHVPOZLISWFY';\r\nvexp='AOKPCBIWNMGQLFSHTXEJURZYVD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='DO IH WO QH GH EO XH FO VH UO DH LO VO KH LHY CH UH FH JH EH TH PO BH TO YO QO IO HO JO SO XO NO GO AO BO KO WH ZO AH RH CO OH ZH SH PH NH RO MH YH MO';\r\nvexp='OSNGBDXZEKTJWIMYUQFARCPVLH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HV CJ RV VU LO OM ZG JU KL XU IT AN AJ SL DV AT CH PC UT DI EI NJ UO QL NS VI DY VZ PE XL LA YX OQ XF EK FY EF DR EM YD ZW DC TP BW MX YE WT JH WN ZM';\r\nvexp='AILHKUEVNQWMGFRBTOSXYZJCPD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VT VE VO GB VG CB JB VF FB QB HB NB VX VD VC SB DB VW KB VZ VJ VS VQ VU VR VK AB VB PB VP VY VI WB IB VL VN MB VA YB UB XB RB ZB TB OB LB EB VM VH';\r\nvexp='BJAIXSYPMFCHQEWDZKRUNTOLGV';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ED FR WF AO CQ IW BN BS LS HP FJ BV QM HV AV BJ HQ LN HR PE VR RE FC LF XK IQ RI XN ZK CF MP XZ QV OG TS XW FM RZ EY TM YZ BI SU SI QS YD HU CT IK UW';\r\nvexp='RHSCVQPJWLXGENIBMOTUKDZAYF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SD OY ML SU XU YX RU XY PY HX YT WD XZ PN JV UE RO NC VY PZ QP GS JN TM SO TC SY GT NV QC FW SX GB NL ZD TX ND OA QS KA PB UB TW MB KW RV UT OJ ER BJ';\r\nvexp='ULJQNPCEMVFIDZXRWKOTAHBGYS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='HY BY PA MY XY PN RY PS EY SY KY PJ PX IY PG PDYX ZY VY PDYG PT PB QY JY UY PL PC PY PV PM PZ PW FY PH PU PO OY PR AY TY WY PE PQ PI PK PF HPDY NY GY LY CY';\r\nvexp='DYOMIJRHUSEFKTLQBWGCVNZXAP';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OP ZN IZV RT HSI ZHF YWC YH QY OK YOD IZ FJB FVO XPQ NQ JN ME FA REN GP QW PZH OZP DF DJ GVA YT GI LN PC RYG NJ EPO US YWL LD IQ NEY TCH BRX GB FXR AEF MO DKZ WJ IJX LZX AU';\r\nvexp='ANWMKGQJLPUXSTEBFRCHIOVDZY';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BN NS NB MN NV NP AN LN ON ND NA NK GN HN NY NX ZN SN QN NJ NT NM YN WN PN NZ NC NQ EN JN IN UN FN NU NH XN RN KN CN NO NE VN NW NF NR NL NI DN TN NG';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='MI MD MC MA BW MO MF MW MZ MK BS BN BE BO MP MR BC BJ BH BG BY BA ABX BF MY MB BT MH MN BR ML BI MU BL BD ME BP MS BM MJ BU MG MX BK MV BZ MT MQ BV BQ';\r\nvexp='BXSUIFKHDTEYAWGOJPLZQNVCRM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='RN VQ BT QG CW UX MZ DN UA TX QB DE KC YH NJ ZI TJ TC CO VH DJ GY UE RF CF EU IH QW YL NQ KR HK QZ JM TZ RQ QC YG HC WJ QX MP YJ XQ FK SM PT WZ EY XC';\r\nvexp='CUKSFNYTELADPZVJWBORMHXIGQ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AZ NX TX SN XP HO RF JP EG DB ER UV WN IG DO BT YK EB KB DE VI RW HV TW DI FE WY VD IF UO RY GS NK GI OH WL VL WG AM NH KI EZ WQ CO LV KP QZ FS IL GC';\r\nvexp='HAVSRMOJQPYFGLUWEKZXDCTNBI';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OF UV HL JC WK XJ EM TM UF IQ XC MH EC UM PJ HT VC JO LN NW AH PM KN BU ZJ JA RJ BT KM TR CM PW ZL NC QM TV GL AQ UE LG GH RM UR QU GW ZY FP UN QK LF';\r\nvexp='TJHUPIVKENBLDWOYZCFSXQRGAM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WS IL ID WT WD IY IT IN WF IH IQ IS WZ WO WI WM IX IP IC WG WN IE WH WA IJ WL IW ZZ WQ IM WE WX WK Z IR IZ WB WJ WC WY WP WV IU IV WU IG IK WR IO IF';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='QL UF UL VL BF YF NL IL ZF HF PF ML AF OF AL WL GF MF NF OL LF BL HL JL SL KL EL KF VF CL TL EF DL WF JF CF TF DF XF QF DGL XL RF RL YL SF IF PL FL ZL';\r\nvexp='FMQPUENTHJYRSGLIZBWDAKCVOX';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AR BH LK JL TD XK HK RK KU RW QO BZ CM IA ZR WK WL GP XJ NK TS SU DN NJ YT TJ MU UM HW CX HX EA QL QV IH NG DU IO XV DY VH AZ VB DB IG CN FQ UZ MH SZ';\r\nvexp='SBGOQCLTVPXWJFDMZNIURAEYKH';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='SKI SQ SP SE SB SU SKR SKG SKZ SKJ MSKP SKM SL SKC SC SKW SO SKA SM SI SKPT SKD SG SKO SKN NSKP SX SKH SW SR ST SD SA SV SJ SKX SH SKL SF SN SKV SZ SKB SKF SKQ SKU SKY SKE SKT SY';\r\nvexp='AZCTJGBEDFRPQILKOHUWXYMVNS';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KE KJ WE XS UK OT GF IF VY NI ZV CL HJ AV AM MO ES QM CO ST LU CI AU JX EJ JU CB IP DL QX GL AF AD LG DG QR EQ FZ AW FY HQ AN SX MY QS MC GC LD SM QB';\r\nvexp='QVUJEPMXFODNBRCHTGIYWKSLZA';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='EA JE KN MZ TD KV NC ZG YH MO JX JC OM UI BA DH KS FL YX UT FX RF RW TG HF BJ QT ZT EC IZ QV GP CY OT EX QF ML GO LD GQ GL TB SQ WF WO GC GM MK JN NO';\r\nvexp='AZOLCRSHMFPNBUXTEYQIDWJVKG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XE VO CI GS AB CD LN PG FA XD KE TU XU DE AQ UD HL IB EI GY FJ OA YU MJ GT CH WO LI WQ JY UB SJ QJ ZG WI WK AL UV LX WD FQ FE KN CT XC GW RY PY MF IV';\r\nvexp='AZJCPTKSFIUORXMBEVQHYDNWLG';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='KG FS ZU JX CH PM XL IA JZ AP WD RS SX BT GC EG AW KD EL WE NH VW BJ CO DW LH PO RF AX LN OJ CB BR CX XJ IR ZY EZ RQ BZ YS WX FA KA BL VG WZ FT TN QH';\r\nvexp='ACSYROIFKEMZJULQVNDTBHPXGW';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NMOKZL YQADTPXVMEK AVELGHMKTQRUWIFOSJNZP PNMCQGI TG UCLTEHPSYKXFRQGMWANZBIOV ZEABLRXSGHJK LXQZCJOSD PMYXVARWGUSECBHDQNZKLIFT PEBDUYHJMQI KYIXRZJTA PLOBJXE CTUPZHXI TNLMJYOCEIQGZPDABHKUV NVBGMSKFIWYZAXPRCUET JHAGRN TYCDAQHWPXK ZQXMWKHETG KWYOZMFBHVQNLCUPG FNOQAETIDVPSMLBGZCUYR FDESNRU JSBFYZ VBQSDCPMFOHKZXI DNZLJXPMSGOERVKWHAYICFBQU EAOKPHQVD VBMPYRDIT FAGXUVN TUHROSPGCDJI OHSMTCRUYVPFBAZNQGDIEJ BOFWMSC NOCUGQF XFUKMEOBZSIQNVJYPW XVIFLSAYZRDH WLZIXRAUYKFDNHB VOAJGRYDEMFBZNWISXH JLHTYUBCFZRQA RKBWNMDYJAPGVCHIOUZXTE LWPQUSBTCEIZOAVKMGYRJXFN BDKZ LEDOHPUTJNV ELIYBCSWPRNZGKJ LOSTUBYNQXVZCWRGIEPAFD MNRI UHXLNPWKDZRMBAGTYSFCJQVOI QONLSME YTXEOZURJMIDALKBVN ZKYGRMBSDLIEPFVJQOXHNCU GTRMENSDFIWBCXYAOJHPQZU ZJTXAKPIQNYMLW RWGVQITLFPOMXNCUEHD';\r\nvexp='AOMLBEFYSKCRVUXHGPQWJIDTNZ';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='JTIYSCR KYBNCVHUZOEFQGWXSRMDLT NQJEZFDWRMLAYKBVUSXPCG KLDHNEFMXYBP RMLGEPYFDT GNZXUFYTODHJVQRIMPC JDZGTRHFX ND UHOEKYVZRPSWGLJXNFQ YZRSG HVIWKTXMDFYCOSA ZODHRSGIVYALEMUQ QFLKYNJITBRACDVP FQZTVBMPLIKJXOGUHAYDCWRESN XLHRYIBUMDPCQOFN HMYTNAFKZOJLRGISCPXVEUQDBW KJOQGSIUCDYVRLATEFBWNZPHM ZAMHYSQEWCXRUNPIBDJT ZDKRHU OICRFYXWNHED TGCQYSP IBOLPZYUWJSDHNCVTMFXR WCQFXHSVRDAGEKUPNBJITMYL OLWZQBISETYJPMDNGUKF UGRWSPJADBCFNOXIEYMHTKLQV ZOEWBSRNUIYTJQDP QIBLMEHCAPDO DLCYANVBSFHWGTORK OJIZDVCMNSTPKAXUQBERYLFG DP FTKOYDSENCAQXBVJZUG WSMBGUHPAJVD NOPYILEVJ UYDXZFGJECQSIVPONBMRHLWAK KCZIPRXJQHTBAUOWVFYMLSE KXCGZVUL DXMU BKLSMCJUDQXAWPOIRZFVNTH RMABZCE PXOMV LFSGCXOMTYJEIN BLCSYFAOGDEXIPNJ VMIZKYXWNAFJHEGUPLRDSBC UD LUCGEQMOSDWVBX TZDMRJUNHLGEYIBSC XJQDPYENKRMFHUTBISA XLREUDNFOTMKWSJAPZCHIQBYV XLSKUHPOTDVZWMFANCRIEYQ CHDULZMIVXAJSYFQWGOTR';\r\nvexp='AMKVZSXCTNFLHWQRIJOGPEUBYD';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='ZO SK IC OM CO IK TI BM BO NR VH LF OP YC FM GR HV EY FQ GL MX XP KO DY MS XQ DP DC PR KF OS LU EZ UP ZT VE NA WM XW RW MN IB VY TS LK PQ JN KR XE SM';\r\nvexp='AIUXVNQWBDKETCGYRLJOFZPSHM';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='PI UZK KF YRA TF KR FPG CKH NML HX LCO RPI YRG BFY RW LK EM UGJ NR DTI JS JMV CKD ZG FO BN LZ PG NZ QZO DRH DLF TE LH JWB USX NLZ FE BMP NY ZF AJ JF CJW QDO VWM IQO XQ EU IKN';\r\nvexp='AXGMSLRUYWDITZKHVBQJPCEONF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='NM RC HM RY RW OM RU DM AM RI WM RQ RV RH XM RK RF RZ TM RG PM SM RJ IM RX VM RB RE JM RO KM RM RD RL RT RA RN LM ZM FM YM BM RS UM CM QM GM EM RP';\r\nvexp='MYHXBEFNPWQKZGODCUIAVJLSTR';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='BM BZ BR BD LA LQ LS LI BN BW LU LB LZ LK LT LG LP BI BK LW LX BT LV LE LD BCN LH BQ BV LJ BS LO BY BF BH BX BP BA BL LY LN LR BE LM LC BU BJ BO LF BG';\r\nvexp='BCSXFRHZIMVJWYEPODTAQUKGNL';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='VF QV VS VN OV VZ VY VD VM MV AV NV Z IV KV VR YV JV VX ZV BV VT VC VL RV EV VJ GV CV VI UV WV LV VK TV VQ VB VG XV VW VU VP HV VE PV VO FV VH SV DV';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='WD QPT ALC SCJ IT OF GED EU XA MLY ATE OP BK NXJ FS ZCD NOW GY IL QER UAI BJY FPB UOD XDB HYE MI FEK TI GKH UZ KR AN VNB BMH REY RQY PTZ WK MQH SR GOJ ZS UCL HCV UP EAI XWB LW OL';\r\nvexp='BNLJQDYXPUCAOGWTRMHSZKVIFE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='AB DR KM VS XD ZS BK FJ GO JI ZK JK AE TB BU GH YD ZL PL DW TI PB YZ RG SF YX AI ER KU QH QF IN WB VB RX WP SC BR DF IV ZX MA IJ ZI SY BV AN QE GW AD';\r\nvexp='DNXVASJQWGPMFLORZEKCHIYTUB';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='YE SQ XL VY LZ MB ZS OC TP ML CA AS HR HQ NV XH OX DM FJ WO LC VP CK IE HK MC EQ CF NM GD KX BR XJ RD KG ZB CT PL SE AH JV TR FQ ND US OK DN KM TU KT';\r\nvexp='KAZILWYDUTFXMNBQVESOHGPJRC';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='XD JX MX OX XP GX DX XK XY XB NX XN XT XQ PX XR XV XE XH FX CX XC XI LX XU XO YX XW HX VX XJ XA WX ZX BX QX XF XG XS IX XL UX KX RX AX EX XM XZ SX TX';\r\nvexp='IMPOSSIBLE';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='OFA OX OFQ OJ OFW OFY OW OG OFB OQ OH OFH OFR SOFV OM OFD OFP OT OI OFI OFS OZ OFL OU OK OL OFE OFJ OFZ ON OFX OFVW OFC OB OR OE HOFV OY OA OFN OFM OV OFG OC OD OP OFK OS OFU OFT';\r\nvexp='AHDSTUJGPMIRFZQKLXNBVYECWO';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n%%\r\nm='GI ZI FK FG WI PI JI FYIR FV VI FJ BI UI SI FW FC KI OI MI FQ FS FYIX EI FZ FU CI FO FA FX HI FE NI FM LI QI AI FN TI FL FR FD FI FB FYIL FT DI FH RI FP XI';\r\nvexp='IDYPQKVGBAUZNWJRSHTEMCLXOF';\r\nv=Password(m);\r\nvalid=1;\r\nif ~strcmp(unique(v),char(65:90)),valid=0;end\r\npwc=strsplit(m);\r\nfor j=1:size(pwc,2)\r\n if ~isempty(strfind(v,pwc{j}))\r\n  valid=0;\r\n  break;\r\n end;\r\nend\r\nif strcmp(vexp,'IMPOSSIBLE'),valid=strcmp(v,'IMPOSSIBLE');end\r\nassert(valid==1)\r\n\r\n%%\r\nglobal zstart\r\nzdelta=(now-zstart)*24*60*60\r\n\r\n%%\r\n%Stacy992 Solution\r\n% import java.util.*;\r\n% import java.io.*;\r\n% public class d {\r\n% \tpublic static HashMap\u003cString, Integer\u003e memo;\r\n% \tpublic static void main(String[] args){\r\n% \t\tScanner in = new Scanner(System.in);\r\n% \t\tint t = in.nextInt();\r\n% \t\tfor(int z = 1;z\u003c=t;z++){\r\n% \t\t\tint n = in.nextInt();\r\n% \t\t\tString[] words = new String[n];\r\n% \t\t\tboolean flag = false;\r\n% \t\t\tfor(int i = 0;i\u003cn;i++){\r\n% \t\t\t\twords[i] = in.next().toLowerCase();\r\n% \t\t\t\tif(words[i].length() == 1){\r\n% \t\t\t\t\tflag = true;\r\n% \t\t\t\t}\r\n% \t\t\t}\r\n% \t\t\tAhoCorasick.createAhoCorasick(words);\r\n% \t\t\tif(flag){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t\tcontinue;\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tArrayList\u003cInteger\u003e order = new ArrayList\u003cInteger\u003e();\r\n% \t\t\tfor(int i = 0;i\u003c26;i++){\r\n% \t\t\t\torder.add(i);\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tint steps = 10000000;\r\n% \t\t\tboolean found = false;\r\n% \t\t\twhile(steps \u003e= 0){\r\n% \t\t\t\tsteps--;\r\n% \t\t\t\tint state = 0;\r\n% \t\t\t\tboolean good = true;\r\n% \t\t\t\tfor(int i : order){\r\n% \t\t\t\t\tstate = AhoCorasick.transition[i][state];\r\n% \t\t\t\t\tif(AhoCorasick.term[state]){\r\n% \t\t\t\t\t\tgood = false;\r\n% \t\t\t\t\t\tbreak;\r\n% \t\t\t\t\t}\r\n% \t\t\t\t}\r\n% \t\t\t\tif(good){\r\n% \t\t\t\t\tfound = true;\r\n% \t\t\t\t\tbreak;\r\n% \t\t\t\t}\r\n% \t\t\t\t\r\n% \t\t\t\tCollections.shuffle(order);\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tif(!found){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t}\r\n% \t\t\telse{\r\n% \t\t\t\tStringBuilder res = new StringBuilder(\"\");\r\n% \t\t\t\tfor(int i : order){\r\n% \t\t\t\t\tres.append((char)('A'+i));\r\n% \t\t\t\t}\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": \"+res);\r\n% \t\t\t}\r\n% \t\t\t/*memo = new HashMap\u003cString, Integer\u003e();\r\n% \t\t\tif(flag){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t\tcontinue;\r\n% \t\t\t}\r\n% \t\t\tint ans = go(0, 0);\r\n% \t\t\tif(ans == 0){\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": IMPOSSIBLE\");\r\n% \t\t\t}\r\n% \t\t\telse{\r\n% \t\t\t\tint mask = 0;\r\n% \t\t\t\tint state = 0;\r\n% \t\t\t\tStringBuilder res = new StringBuilder(\"\");\r\n% \t\t\t\twhile(mask != (1\u003c\u003c26)-1){\r\n% \t\t\t\t\tint i = memo.get(mask+\" \"+state);\r\n% \t\t\t\t\tres.append((char)('A'+i));\r\n% \t\t\t\t\tmask|=(1\u003c\u003ci);\r\n% \t\t\t\t\tstate = AhoCorasick.transition[i][state];\r\n% \t\t\t\t}\r\n% \t\t\t\tSystem.out.println(\"Case #\"+z+\": \"+res);\r\n% \t\t\t}*/\r\n% \t\t}\r\n% \t}\r\n% \t\r\n% \tpublic static int go(int mask, int state){\r\n% \t\t\r\n% \t\t\r\n% \t\tif(AhoCorasick.term[state]){\r\n% \t\t\treturn 0;\r\n% \t\t}\r\n% \t\tif(mask == (1\u003c\u003c26)-1){\r\n% \t\t\treturn 1;\r\n% \t\t}\r\n% \t\tif(memo.size() \u003e 1000000){\r\n% \t\t\treturn 0;\r\n% \t\t}\r\n% \t\t\r\n% \t\tString key = mask+\" \"+state;\r\n% \t\tif(memo.containsKey(key)){\r\n% \t\t\tif(memo.get(key).intValue() == -1){\r\n% \t\t\t\treturn 0;\r\n% \t\t\t}\r\n% \t\t\treturn 1;\r\n% \t\t}\r\n% \t\tArrayList\u003cInteger\u003e order = new ArrayList\u003cInteger\u003e();\r\n% \t\tfor(int i = 0;i\u003c26;i++){\r\n% \t\t\tif((mask \u0026 (1\u003c\u003ci)) == 0){\r\n% \t\t\t\torder.add(i);\r\n% \t\t\t}\r\n% \t\t}\r\n% \t\t\r\n% \t\tCollections.shuffle(order);\r\n% \t\tint index = -1;\r\n% \t\tint ans = 0;\r\n% \t\tfor(int i : order){\r\n% \t\t\tif((mask \u0026(1\u003c\u003ci)) == 0){\r\n% \t\t\t\tint res = go(mask|(1\u003c\u003ci), AhoCorasick.transition[i][state]);\r\n% \t\t\t\tif(res == 1){\r\n% \t\t\t\t\tans = 1;\r\n% \t\t\t\t\tindex = i;\r\n% \t\t\t\t\tbreak;\r\n% \t\t\t\t}\r\n% \t\t\t}\r\n% \t\t}\r\n% \t\tmemo.put(key, index);\r\n% \t\treturn ans;\r\n% \t}\r\n% \tpublic static class AhoCorasick\r\n% \t{\r\n% \t\tpublic static final int ALPHA = 26;\r\n% \t\t\r\n% \t\tpublic static int nodeCount;\r\n% \t\tpublic static int[][] transition;\r\n% \t\tpublic static boolean[] term;\r\n% \t\t\r\n% \t\tpublic static void createAhoCorasick(String[] strs)\r\n% \t\t{\r\n% \t\t\tint maxNodes = 1;\r\n% \t\t\tfor(String s : strs)\r\n% \t\t\t{\r\n% \t\t\t\tmaxNodes += s.length(); // This could be passed in instead\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\tint[][] children = new int[ALPHA][maxNodes];\r\n% \t\t\tboolean[] leaf = new boolean[maxNodes];\r\n% \t\t\tnodeCount = 1;\r\n% \t\t\tfor(String s : strs)\r\n% \t\t\t{\r\n% \t\t\t\tint node = 0;\r\n% \t\t\t\tfor(char ch : s.toCharArray())\r\n% \t\t\t\t{\r\n% \t\t\t\t\tint c = ch - 'a';\r\n% \t\t\t\t\tif(children[c][node] == 0)\r\n% \t\t\t\t\t{\r\n% \t\t\t\t\t\tchildren[c][node] = nodeCount;\r\n% \t\t\t\t\t\tnodeCount++;\r\n% \t\t\t\t\t}\r\n% \t\t\t\t\t\r\n% \t\t\t\t\tnode = children[c][node];\r\n% \t\t\t\t}\r\n% \t\t\t\t\r\n% \t\t\t\tleaf[node] = true;\r\n% \t\t\t}\r\n% \t\t\t\r\n% \t\t\ttransition = new int[ALPHA][nodeCount];\r\n% \t\t\tterm = new boolean[nodeCount];\r\n% \t\t\t\r\n% \t\t\tArrayDeque\u003cInteger\u003e queue = new ArrayDeque\u003cInteger\u003e();\r\n% \t\t\tqueue.add(0);\r\n% \t\t\tqueue.add(0);\r\n% \t\t\t\r\n% \t\t\twhile(queue.size() \u003e 0)\r\n% \t\t\t{\r\n% \t\t\t\tint node = queue.remove();\r\n% \t\t\t\tint suffLink = queue.remove();\r\n% \t\t\t\t\r\n% \t\t\t\tterm[node] = leaf[node] || term[suffLink];\r\n% \t\t\t\t\r\n% \t\t\t\tfor(int ch = 0; ch \u003c ALPHA; ch++)\r\n% \t\t\t\t{\r\n% \t\t\t\t\tif(children[ch][node] != 0)\r\n% \t\t\t\t\t{\r\n% \t\t\t\t\t\ttransition[ch][node] = children[ch][node];\r\n% \t\t\t\t\t\tqueue.add(children[ch][node]);\r\n% \t\t\t\t\t\tqueue.add(node == 0 ? 0 : transition[ch][suffLink]);\r\n% \t\t\t\t\t}\r\n% \t\t\t\t\telse\r\n% \t\t\t\t\t{\r\n% \t\t\t\t\t\ttransition[ch][node] = transition[ch][suffLink];\r\n% \t\t\t\t\t}\r\n% \t\t\t\t}\r\n% \t\t\t}\r\n% \t\t}\r\n% \t}\r\n% }","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":"2016-03-25T23:43:24.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-24T05:30:35.000Z","updated_at":"2026-04-01T12:22:42.000Z","published_at":"2016-03-24T06:05:37.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/8274486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Password Security\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the small-2 case of up to 50 passwords of length 1 to 26\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 random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.\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 [PW], string up to 50 space separated passwords of 1 to 26 characters\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 [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'\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 [PW] [Pstr]\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[[X] [IMPOSSIBLE] \\n[QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]\\n['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ]]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eTheory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.\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\"}]}"},{"id":1914,"title":"GJam 2013 Veterans: Ocean View (Large)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View\u003e. This is the Large data set with N\u003c=1000 and Q\u003cN\u003c=1000, with typical 80.\r\n\r\nThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\r\n\r\n*Succinct Challenge statement:* Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\r\n\r\n*Input:* V , Vector length N\u003c=1000 with values 1 thru 1000.\r\n\r\n*Output:* Q , minimum quantity of removed values to produce a valid vector (typical 80)\r\n\r\n*Examples:* [V] [Q]\r\n\r\n  [1 4 3 3] [2]  for [1 4] or [1 3]\r\n  [1 2 3 4 5] [0]\r\n  [4 3 2 1] [3]\r\n\r\n*Commentary:*\r\n\r\n  1) nchoosek(1000,80) is a little big\r\n  2) The Large test suite is N\u003c=1000 with some delete cases \u003e4\r\n  3) A Good Algorithm that solves the Large case is usually best to pursue\r\n  4) GJam Competition allows one Large submission within 10 minutes of download \r\n  5) This was only solved by one entrant.\r\n\r\n\u003chttp://www.mathworks.com/matlabcentral/cody/problems/1913-gjam-2013-veterans-ocean-view-small Small Suite Challenge\u003e\r\n\r\n*Algorithm Spoiler:*\r\nA general method is to start at the end and build all unique length valid vectors. It is only necessary to maintain a Min Value and length for the potential solutions. Once all values are checked find the maximum solution length.  There are three key steps in this method: 1) If vin(j)\u003e Max of all solutions, start a new solution with length 1. 2) Find solutions that are 1 greater than vin(j). Update minimums of these solutions with vin(j) and increase length values.  3) Find solutions where mins\u003evin(j). Augment solution set by a single line of [vin(j),max length found +1]. 4) Find maximum length solution.  This method solved all 100 large cases in \u003c 2 seconds on Cody.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2334486/dashboard#s=p2\"\u003eGJam 2013 Veterans Ocean View\u003c/a\u003e. This is the Large data set with N\u0026lt;=1000 and Q\u0026lt;N\u0026lt;=1000, with typical 80.\u003c/p\u003e\u003cp\u003eThe GJam story goes that as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\u003c/p\u003e\u003cp\u003e\u003cb\u003eSuccinct Challenge statement:\u003c/b\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e V , Vector length N\u0026lt;=1000 with values 1 thru 1000.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Q , minimum quantity of removed values to produce a valid vector (typical 80)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [V] [Q]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[1 4 3 3] [2]  for [1 4] or [1 3]\r\n[1 2 3 4 5] [0]\r\n[4 3 2 1] [3]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) nchoosek(1000,80) is a little big\r\n2) The Large test suite is N\u0026lt;=1000 with some delete cases \u003e4\r\n3) A Good Algorithm that solves the Large case is usually best to pursue\r\n4) GJam Competition allows one Large submission within 10 minutes of download \r\n5) This was only solved by one entrant.\r\n\u003c/pre\u003e\u003cp\u003e\u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1913-gjam-2013-veterans-ocean-view-small\"\u003eSmall Suite Challenge\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eAlgorithm Spoiler:\u003c/b\u003e\r\nA general method is to start at the end and build all unique length valid vectors. It is only necessary to maintain a Min Value and length for the potential solutions. Once all values are checked find the maximum solution length.  There are three key steps in this method: 1) If vin(j)\u003e Max of all solutions, start a new solution with length 1. 2) Find solutions that are 1 greater than vin(j). Update minimums of these solutions with vin(j) and increase length values.  3) Find solutions where mins\u003evin(j). Augment solution set by a single line of [vin(j),max length found +1]. 4) Find maximum length solution.  This method solved all 100 large cases in \u0026lt; 2 seconds on Cody.\u003c/p\u003e","function_template":"function Q = Monotonic_V(vin)\r\n  Q=0;\r\nend","test_suite":"%%\r\ntic\r\nvin=[636 246 970 933 361 461 584 712 636 765 900 534 318 948 214 664 649 649 218 159 962 712 215 173 238 112 898 670 665 321 652 653 918 621 585 631 433 520 694 68 285 593 954 954 540 167 970 188 167 187 346 480 899 912 652 488 375 550 157 40 222 808 692 492 781 628 122 565 147 167 985 783 759 938 89 651 104 58 838 623 244 536 102 494 799 106 981 526 7 137 917 228 297 608 71 77 587 544 641 85 ];\r\nvexp=[87 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[985 569 223 420 941 721 504 441 137 145 386 238 4 330 967 408 312 508 90 528 598 922 865 273 505 167 830 764 724 854 486 60 422 60 479 715 781 983 507 269 479 892 506 482 573 472 241 884 331 330 412 929 603 628 553 108 795 383 223 870 236 61 929 10 120 759 76 900 93 582 520 571 825 378 405 397 201 645 632 532 327 395 812 929 23 716 36 169 98 259 38 686 671 966 47 790 724 122 42 817 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[135 80 276 388 795 610 328 961 849 699 154 297 970 548 332 87 647 929 231 574 290 843 993 572 407 364 828 688 492 986 8 979 417 636 366 212 597 45 524 445 744 29 93 65 577 424 152 575 705 382 500 994 576 844 566 334 208 745 21 51 731 29 29 499 16 746 710 612 791 585 56 886 614 148 950 542 924 453 116 980 834 615 973 761 810 890 95 17 635 115 68 717 495 448 215 510 194 277 473 336 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[864 390 641 710 429 314 838 487 749 444 866 162 381 48 901 119 756 642 595 851 197 72 856 600 290 187 648 679 619 273 739 834 14 379 895 442 692 733 928 792 528 145 305 908 193 205 378 300 847 973 150 395 396 357 995 685 896 994 716 514 618 454 699 631 832 594 73 875 678 352 666 205 497 970 464 41 526 193 340 724 165 842 471 561 550 465 597 445 810 312 310 427 117 9 57 300 954 481 174 631 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[522 452 169 41 289 988 837 890 666 829 487 3 346 671 544 443 177 411 525 643 380 167 717 566 460 105 253 724 179 487 742 700 290 263 93 578 602 929 467 267 757 306 270 454 976 165 896 153 927 773 147 307 939 864 872 750 320 476 473 498 314 567 550 603 829 994 180 430 922 647 48 30 304 669 483 279 834 730 783 760 854 282 66 144 145 290 893 816 765 366 665 79 932 214 33 112 207 213 541 480 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 20 21 22 23 24 25 26 28 30 31 32 33 34 35 37 38 39 40 41 43 44 45 46 47 48 51 53 54 55 56 57 58 59 60 61 62 63 65 66 67 68 69 71 72 73 74 78 79 80 82 83 84 85 87 88 89 90 93 94 95 96 99 100 101 102 103 104 105 106 107 109 110 111 112 113 114 115 116 117 118 119 120 122 123 124 125 126 127 128 129 134 138 140 141 142 143 144 145 146 147 148 149 150 151 152 155 157 158 160 164 165 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 184 185 186 187 189 190 191 192 193 194 195 196 197 198 199 200 202 203 204 205 206 207 208 209 210 212 213 214 215 216 218 220 221 222 223 224 225 226 227 228 229 230 231 233 234 235 236 237 238 242 243 244 246 247 248 249 250 251 252 254 255 256 258 259 261 262 263 265 266 267 268 269 270 271 272 273 274 275 276 277 279 280 281 282 283 284 286 287 288 289 292 294 295 297 298 299 300 302 303 304 306 307 308 309 310 311 312 313 314 315 316 318 321 324 325 327 328 330 331 334 335 336 337 339 340 342 343 344 345 346 348 349 350 351 352 353 354 355 357 358 359 363 364 365 366 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 388 390 391 393 394 395 397 398 399 401 402 403 404 405 406 407 408 409 410 413 415 416 418 419 420 421 422 423 424 425 427 428 430 431 432 433 435 437 438 440 441 442 443 445 446 447 449 451 452 453 455 457 458 459 460 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 504 505 507 508 509 510 511 512 513 514 515 516 517 518 520 521 524 525 527 528 529 530 531 533 536 537 540 541 542 543 544 545 546 547 549 550 551 552 553 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 577 579 580 581 582 584 585 586 587 588 590 591 592 593 595 597 598 599 600 603 604 605 606 607 610 611 615 616 617 619 620 621 622 623 624 625 626 627 628 630 632 633 634 635 638 641 642 643 644 645 646 648 649 651 653 654 655 656 657 658 659 661 663 664 665 666 667 668 669 670 671 672 673 675 677 678 680 682 683 684 685 686 687 688 689 690 691 692 693 694 696 697 698 700 702 704 705 706 709 710 711 712 713 714 715 717 718 719 720 721 722 723 724 725 726 727 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 748 749 750 751 752 753 754 755 756 757 758 759 761 762 764 766 767 768 769 771 772 773 774 776 777 778 779 780 781 782 783 785 786 788 789 790 791 792 793 794 795 796 797 798 800 801 802 803 804 805 806 807 808 809 810 812 813 815 816 817 818 819 820 821 822 823 824 826 827 829 830 831 832 833 837 838 839 840 841 842 843 844 845 846 847 848 849 851 852 853 854 855 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 877 879 881 882 883 884 887 888 890 891 892 893 894 895 896 898 899 900 901 903 904 905 906 908 909 911 912 913 914 915 916 917 918 919 920 921 922 923 924 927 928 929 930 931 932 933 935 936 937 938 941 942 943 944 945 946 949 950 951 952 953 954 955 956 957 958 960 961 962 963 965 966 967 970 971 972 973 974 975 978 979 980 981 982 983 984 985 986 989 991 992 993 994 995 996 997 998 1000 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[656 151 894 432 577 271 474 259 534 441 734 522 365 493 942 532 175 900 688 139 374 59 422 443 326 64 804 69 733 90 372 740 240 265 172 168 536 997 778 421 437 511 942 801 4 236 685 530 487 372 21 860 430 442 302 107 857 458 175 941 899 899 32 138 163 555 657 50 551 435 471 987 945 764 140 300 351 176 182 837 547 202 48 329 995 350 435 203 159 962 495 57 860 526 546 374 81 202 424 631 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[160 284 529 233 858 58 181 837 14 284 240 425 835 57 402 496 430 135 982 713 622 716 909 963 253 31 790 307 273 291 321 432 574 201 16 431 259 196 620 624 479 211 49 666 268 450 161 49 936 494 762 558 561 22 520 814 404 662 120 676 952 792 459 877 993 474 308 603 670 279 578 500 489 978 517 108 427 30 157 363 523 270 272 84 643 791 249 47 804 720 74 107 863 533 984 207 6 643 809 27 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[717 997 953 616 739 418 429 967 875 551 327 828 991 994 841 796 268 640 537 215 847 996 558 831 282 117 696 696 386 518 188 103 867 140 70 957 557 498 923 783 400 601 962 391 595 803 538 214 794 74 428 640 70 337 823 351 454 518 398 191 388 585 293 254 724 715 562 280 564 484 414 964 436 376 706 30 530 243 595 323 668 375 314 89 711 136 792 516 6 189 707 745 774 351 350 497 65 911 129 629 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[339 92 136 280 51 932 913 389 388 240 645 424 760 147 8 880 39 875 953 822 525 377 243 505 978 181 421 497 443 665 862 133 108 998 412 158 281 677 898 668 916 543 91 675 689 451 906 79 677 210 901 201 587 495 705 564 27 477 60 469 493 274 601 600 623 365 110 903 41 7 922 956 901 364 982 941 166 888 20 842 97 272 43 35 766 99 598 792 576 10 613 420 283 565 20 905 929 129 159 969 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[3 4 6 7 10 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[902 371 99 852 750 675 90 760 805 58 948 19 245 440 484 372 354 920 794 849 927 838 454 61 432 979 709 266 797 673 155 698 395 253 902 144 927 991 256 731 400 203 101 996 642 936 719 348 856 512 196 134 701 649 194 484 628 255 102 424 927 256 122 673 508 375 169 434 365 424 517 765 978 969 112 971 905 831 318 112 694 514 245 395 162 791 878 789 45 331 565 323 586 38 347 93 412 515 879 776 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[745 222 207 664 944 756 340 17 820 810 426 512 977 342 97 68 374 759 193 308 24 106 963 317 227 746 262 260 405 645 380 149 866 938 164 162 694 504 178 865 313 955 376 641 297 824 60 22 583 252 330 958 358 644 274 936 389 535 195 145 179 575 646 397 512 809 558 557 312 87 422 977 393 149 617 41 973 677 63 907 280 744 864 989 387 489 924 127 23 119 623 554 45 268 302 556 77 859 465 740 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[483 135 335 407 908 857 578 767 378 156 248 269 292 372 111 5 821 150 426 334 446 615 791 5 517 928 677 194 68 908 122 550 42 808 309 302 664 886 420 41 41 668 309 684 39 771 688 212 921 465 545 366 79 687 722 595 614 398 140 33 657 261 583 698 420 891 999 84 128 771 476 520 438 137 203 828 907 242 391 179 706 287 544 784 973 617 730 939 14 869 971 670 481 905 720 900 147 70 335 274 ];\r\nvexp=[80 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[449 699 779 845 562 962 785 857 407 939 248 891 282 197 497 444 329 886 476 573 390 526 492 686 583 679 622 471 498 176 415 946 875 545 143 788 506 927 644 264 218 244 155 851 440 651 646 768 888 121 693 277 998 184 314 580 214 935 50 63 110 816 9 336 712 503 123 217 429 119 481 646 362 987 848 153 989 493 272 876 613 964 504 962 499 817 893 64 751 294 127 860 461 487 196 172 989 670 389 769 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[506 358 525 125 131 493 597 657 174 465 212 984 660 340 197 879 464 893 546 146 446 858 66 893 292 295 771 364 324 233 803 830 591 327 306 73 819 254 81 345 70 644 328 729 984 524 960 447 768 505 944 566 362 10 458 653 304 228 369 628 812 523 809 754 849 466 827 20 719 259 716 789 903 43 869 238 919 828 36 38 685 980 603 46 989 60 51 292 639 771 271 803 293 431 556 141 896 382 512 967 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 201 457 409 579 138 659 919 860 512 119 881 554 984 460 612 370 104 453 607 792 323 877 982 906 932 419 986 615 397 771 618 950 580 378 528 69 37 446 280 900 917 160 806 900 972 417 269 75 222 227 219 896 455 200 801 386 618 138 1000 367 909 970 316 840 699 195 908 87 992 187 987 908 699 792 807 670 560 428 744 133 654 314 29 461 514 829 846 483 967 198 201 227 519 516 418 217 62 325 656 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[536 287 975 835 202 487 189 178 104 222 6 933 565 70 493 646 121 949 836 462 586 175 876 615 42 687 243 401 489 327 78 24 613 404 858 166 890 398 344 345 620 701 629 536 770 121 533 242 421 368 703 7 894 930 973 935 968 215 688 457 893 117 480 857 872 690 23 113 87 718 458 58 770 86 945 891 559 477 132 979 196 186 337 90 467 309 376 434 875 415 890 767 531 722 624 402 763 998 867 849 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[833 191 187 681 160 2 73 38 194 412 113 711 605 583 623 155 399 219 599 208 883 909 986 999 269 395 299 222 875 824 204 59 15 390 91 526 743 163 563 936 927 676 646 531 610 268 37 9 839 636 568 721 896 554 71 516 948 369 89 174 193 292 585 559 33 675 84 775 838 647 62 764 674 708 646 283 327 683 643 517 670 211 237 917 764 660 784 63 28 872 236 572 515 820 130 899 495 214 673 684 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 3 2 1 ];\r\nvexp=[3 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[544 765 207 299 570 502 839 142 76 830 438 777 696 718 720 628 215 31 72 544 666 606 940 218 865 169 973 254 550 831 129 446 948 335 744 517 188 582 10 616 764 447 392 459 164 464 438 731 846 509 626 511 114 565 80 331 85 52 584 634 235 64 79 534 750 174 50 937 108 411 552 871 858 296 681 373 759 119 455 956 979 432 466 93 348 898 775 432 301 358 66 887 421 496 420 522 22 821 458 129 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[785 582 933 107 851 569 822 33 992 796 966 99 985 62 5 70 257 409 548 674 546 105 824 71 10 447 326 723 819 799 22 955 380 306 62 582 874 883 966 217 30 931 316 15 993 320 84 601 728 983 626 273 87 801 695 96 247 373 819 65 171 192 372 902 497 433 835 723 667 800 939 697 83 606 63 427 925 498 27 4 480 653 629 919 453 323 366 52 695 536 116 217 727 839 118 576 623 304 650 290 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[379 605 855 323 94 992 160 884 141 954 836 48 258 937 651 919 261 967 418 311 554 590 622 688 538 87 844 682 520 888 740 250 845 594 925 938 586 436 822 78 390 9 477 647 297 128 918 557 94 335 220 1000 276 193 687 165 279 882 846 151 122 585 752 966 531 676 255 468 112 76 545 501 436 21 147 733 500 416 641 594 750 860 945 377 52 983 542 331 865 739 833 986 676 584 303 206 260 557 673 371 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[954 932 241 707 209 356 476 772 941 695 374 528 156 421 13 187 443 842 884 139 129 463 369 117 721 356 808 952 976 529 501 929 812 93 987 20 449 814 143 741 508 516 620 16 936 985 202 730 826 85 868 954 548 589 422 620 296 230 923 271 110 423 551 922 516 889 941 316 703 84 408 210 951 27 577 239 11 778 968 836 215 188 141 114 776 915 85 71 144 8 693 253 782 595 526 649 483 467 964 537 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ];\r\nvexp=[999 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[861 880 573 826 28 522 719 303 975 834 282 160 800 606 921 962 496 15 978 482 481 397 198 328 845 412 189 390 688 662 77 901 541 649 78 920 522 797 222 848 982 855 8 134 461 280 95 956 294 424 437 126 821 986 453 17 397 642 758 437 303 186 689 195 186 766 115 707 914 688 907 248 895 914 381 355 193 827 662 838 250 450 315 422 435 768 438 183 761 547 971 415 732 659 609 269 777 75 328 690 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[212 86 799 237 145 796 871 824 830 514 340 499 724 577 767 487 236 550 901 615 773 136 539 639 308 20 537 802 585 561 837 148 647 987 384 143 782 607 966 612 120 306 462 843 234 229 681 821 130 581 435 255 68 325 893 375 697 782 528 281 342 364 429 340 350 164 483 484 770 448 95 241 753 556 435 338 136 467 158 266 399 945 872 467 269 764 841 965 897 721 598 239 436 378 930 138 541 412 621 663 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[153 433 497 818 590 42 657 625 619 100 678 271 684 627 284 600 980 569 862 178 530 692 225 1 239 891 474 710 719 529 477 872 313 973 689 255 15 697 879 633 148 909 255 831 535 890 430 866 459 644 44 340 335 620 340 925 510 165 986 229 694 462 100 358 434 140 612 800 836 843 784 984 751 391 166 637 280 948 855 90 943 250 429 629 869 768 905 379 285 890 959 330 351 410 687 136 549 299 288 736 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[422 107 359 466 750 64 127 249 677 702 213 920 568 385 70 37 787 149 971 26 915 76 17 851 728 43 738 163 767 379 341 540 838 51 357 939 466 483 188 143 184 752 62 751 137 484 139 275 632 462 300 898 537 316 749 265 359 838 779 477 569 471 368 758 521 724 696 987 558 883 481 741 987 542 843 123 25 334 749 9 147 48 906 683 715 6 299 73 196 78 901 764 900 268 521 421 343 216 759 900 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[830 800 491 470 290 893 711 316 603 32 241 822 608 314 513 533 514 537 19 447 670 582 20 35 543 428 35 411 413 882 8 594 33 498 63 674 743 125 990 697 156 230 870 764 895 735 648 408 271 19 207 292 952 578 326 846 5 712 257 769 945 264 362 329 114 776 3 856 900 344 904 407 925 774 522 819 508 170 579 130 540 785 773 843 714 450 688 70 161 944 838 458 560 551 786 673 678 788 880 929 ];\r\nvexp=[79 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[43 360 9 945 127 32 574 617 273 710 476 930 679 187 746 569 725 493 693 539 527 933 487 508 562 719 739 403 813 707 484 855 67 493 151 545 876 725 162 500 434 989 429 112 176 526 32 252 19 77 790 545 9 629 404 922 699 143 676 864 849 511 70 267 3 221 164 230 297 325 730 730 313 158 194 840 684 577 443 54 653 585 598 13 565 353 934 263 847 609 478 48 120 548 314 474 120 477 704 416 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[290 747 892 267 715 356 238 619 186 555 82 879 420 327 625 582 469 855 722 865 185 638 187 771 675 533 215 86 400 93 214 689 839 457 956 906 812 545 876 349 451 958 580 871 284 204 804 104 410 877 968 947 515 506 69 189 38 283 627 789 728 840 478 918 296 785 823 460 329 699 808 779 656 739 649 291 943 804 394 704 681 713 650 195 218 718 383 607 353 9 396 80 200 225 997 848 9 820 307 337 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[226 923 398 567 407 187 615 980 2 14 380 144 628 177 231 799 501 612 159 124 261 636 742 374 458 143 404 885 207 225 671 784 147 420 703 905 958 669 236 312 682 615 455 309 144 37 460 996 648 618 119 909 605 212 282 414 354 37 651 561 261 321 696 759 93 398 663 50 419 251 361 100 865 167 761 8 203 220 3 851 837 473 111 793 685 392 206 38 781 856 950 393 529 998 152 973 747 166 22 165 ];\r\nvexp=[80 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[456 940 338 538 898 400 964 822 249 990 178 80 994 806 998 799 480 364 850 175 899 317 743 978 156 861 905 778 516 906 419 971 845 108 508 742 859 823 916 107 165 445 187 158 250 184 956 81 899 157 255 150 474 998 127 981 210 383 110 77 288 529 48 484 988 907 578 847 730 845 953 894 289 139 403 890 675 711 970 573 867 577 722 692 926 200 672 135 934 134 563 221 14 610 57 1 517 986 847 598 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[416 735 265 633 901 377 640 456 596 995 306 784 819 768 576 855 159 133 245 939 341 546 332 221 543 835 193 290 1000 566 806 416 300 70 48 201 446 39 656 393 385 313 176 204 80 103 410 590 236 654 881 928 200 564 148 94 398 340 735 749 905 541 164 557 962 563 109 408 954 116 152 338 780 328 893 859 782 303 800 369 956 680 296 507 595 443 953 992 134 687 741 391 227 256 947 189 171 407 948 124 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[28 33 63 78 82 85 92 101 113 125 138 175 183 196 211 224 250 287 345 368 388 426 447 477 491 504 524 575 579 581 621 694 712 720 737 745 747 784 793 802 813 827 829 853 858 919 924 929 939 960 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[751 767 289 186 348 753 835 126 830 440 200 582 596 824 917 356 380 767 870 274 279 308 426 749 518 607 719 233 246 57 756 348 823 396 885 170 500 719 647 329 158 198 263 753 21 179 461 752 297 682 26 927 989 803 28 858 762 746 442 7 154 197 706 977 593 590 498 92 308 497 773 818 46 35 922 419 565 734 170 861 416 547 140 404 702 167 262 463 264 703 821 417 252 526 745 196 115 595 287 774 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 2 4 3 5 6 8 7 10 9 11 12 14 13 15 16 17 19 18 20 21 22 24 23 25 26 28 27 30 29 31 32 33 34 36 35 37 38 40 39 41 43 42 44 45 46 48 47 50 49 51 52 53 55 54 56 57 58 60 59 61 63 62 64 65 66 68 67 69 71 70 72 73 74 76 75 78 77 79 80 82 81 83 84 85 87 86 88 89 91 90 92 93 94 96 95 98 97 99 100 101 102 104 103 106 105 107 108 110 109 111 112 114 113 115 116 118 117 119 120 121 123 122 124 125 127 126 128 130 129 131 132 134 133 135 136 137 139 138 140 141 142 144 143 145 146 148 147 149 151 150 152 154 153 155 156 157 158 160 159 162 161 163 164 165 166 168 167 169 170 172 171 173 174 176 175 178 177 179 180 181 182 184 183 186 185 187 188 190 189 191 192 194 193 195 196 198 197 199 200 201 203 202 204 206 205 207 208 209 210 212 211 214 213 215 216 217 219 218 220 221 222 224 223 226 225 227 228 229 230 232 231 233 235 234 236 237 239 238 240 242 241 243 244 246 245 247 248 250 249 251 252 254 253 255 256 257 259 258 260 261 263 262 264 265 266 268 267 269 270 272 271 274 273 275 276 278 277 279 280 281 283 282 284 285 287 286 288 290 289 291 292 293 295 294 296 298 297 299 300 301 303 302 304 305 307 306 308 309 310 312 311 313 315 314 316 317 318 320 319 321 322 324 323 326 325 327 328 330 329 331 332 334 333 335 336 337 339 338 340 341 342 344 343 346 345 347 348 349 350 352 351 353 354 356 355 357 359 358 360 362 361 363 364 365 366 368 367 370 369 371 372 373 375 374 376 377 378 380 379 381 383 382 384 386 385 387 388 390 389 391 392 393 395 394 396 397 399 398 400 401 403 402 404 406 405 407 408 409 410 412 411 413 415 414 416 417 418 420 419 421 423 422 424 426 425 427 428 430 429 431 432 433 435 434 436 437 439 438 440 442 441 443 444 445 447 446 448 450 449 451 452 453 455 454 456 457 459 458 460 461 462 464 463 465 467 466 468 469 470 472 471 473 475 474 476 478 477 479 480 481 483 482 484 486 485 487 488 490 489 491 492 493 495 494 496 497 499 498 500 501 502 504 503 505 507 506 508 509 511 510 512 514 513 515 516 517 518 520 519 522 521 523 524 525 527 526 528 530 529 531 532 533 535 534 536 538 537 539 540 542 541 543 544 545 546 548 547 550 549 551 552 553 555 554 556 557 559 558 560 562 561 563 564 565 566 568 567 569 570 572 571 574 573 575 576 578 577 579 580 581 583 582 584 585 586 588 587 589 590 592 591 593 595 594 596 597 599 598 600 601 602 604 603 605 606 608 607 609 611 610 612 614 613 615 616 617 618 620 619 622 621 623 624 626 625 627 628 629 631 630 632 633 634 636 635 638 637 639 640 641 643 642 644 646 645 647 648 650 649 651 652 653 654 656 655 657 659 658 660 662 661 663 664 666 665 667 668 669 671 670 672 673 675 674 676 677 679 678 680 682 681 683 684 685 686 688 687 689 691 690 692 693 694 696 695 697 698 700 699 701 702 704 703 705 707 706 708 709 710 712 711 713 714 716 715 717 718 720 719 722 721 723 724 725 726 728 727 730 729 731 732 734 733 735 736 738 737 739 740 741 742 744 743 746 745 747 748 749 751 750 752 753 755 754 756 758 757 759 760 761 763 762 764 765 766 768 767 769 771 770 772 773 775 774 776 777 778 780 779 782 781 783 784 785 786 788 787 789 790 792 791 793 794 796 795 797 799 798 800 801 802 804 803 805 806 808 807 810 809 811 812 814 813 815 816 817 818 820 819 822 821 823 824 826 825 827 828 829 831 830 832 834 833 835 836 837 838 840 839 841 843 842 844 846 845 847 848 849 850 852 851 853 854 856 855 857 859 858 860 861 862 864 863 865 866 868 867 869 870 872 871 873 875 874 876 878 877 879 880 882 881 883 884 885 886 888 887 889 890 892 891 893 895 894 896 897 898 900 899 902 901 903 904 905 906 908 907 909 910 912 911 914 913 915 916 917 918 920 919 921 923 922 924 925 926 928 927 929 930 932 931 933 935 934 936 938 937 939 940 941 942 944 943 945 946 948 947 949 951 950 952 954 953 955 956 957 958 960 959 962 961 963 964 965 967 966 968 970 969 971 972 974 973 975 976 977 979 978 980 981 982 984 983 986 985 987 988 990 989 991 992 993 995 994 996 997 999 998 1000 ];\r\nvexp=[250 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[19 19 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 4 3 3 ];\r\nvexp=[2 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[815 768 572 413 61 287 382 520 43 814 125 344 903 447 878 702 868 762 461 590 511 448 907 997 74 333 918 953 644 230 54 810 349 625 222 409 264 955 280 306 120 756 1 22 203 878 76 422 991 536 12 853 983 918 850 57 603 767 361 598 348 766 408 696 743 981 104 6 936 383 663 55 138 15 429 692 244 504 114 234 39 477 87 21 394 288 429 996 406 141 594 753 907 1 448 649 333 903 6 268 ];\r\nvexp=[87 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[715 324 259 836 409 555 726 967 384 857 298 931 42 986 20 508 647 748 941 873 162 183 992 45 256 967 798 18 964 664 218 30 987 828 865 748 383 590 66 118 446 715 48 839 701 420 346 347 519 638 571 680 172 562 76 779 528 874 796 843 537 366 872 876 193 88 623 927 677 40 44 474 755 444 312 455 863 9 153 381 999 723 412 522 637 488 301 164 361 96 7 249 461 230 124 6 318 98 932 346 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[522 99 461 301 778 354 511 560 8 662 280 315 694 576 174 288 370 126 632 856 812 724 246 391 979 544 931 501 950 230 624 823 328 437 475 458 142 985 369 149 646 648 463 339 223 988 979 945 113 610 800 277 333 45 19 663 940 949 164 241 178 787 63 857 223 537 666 716 873 34 864 870 682 679 209 256 666 187 200 131 148 351 407 480 395 425 142 686 725 305 926 254 444 340 110 18 876 776 734 100 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[986 869 904 402 636 104 209 757 705 337 301 740 169 404 572 415 22 827 117 133 872 263 503 640 737 654 616 432 752 268 954 737 136 858 138 772 313 698 528 18 386 180 109 906 583 32 320 956 859 436 88 82 50 591 73 138 596 41 570 347 308 523 83 443 380 572 566 45 621 445 62 6 625 522 911 559 554 230 515 764 18 954 197 67 896 269 205 491 661 774 837 968 648 271 763 28 194 328 424 814 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[835 78 7 863 573 841 832 653 720 351 56 298 397 179 562 636 299 542 569 853 327 320 54 147 328 355 444 206 343 100 546 529 529 904 392 102 96 575 106 816 926 514 465 674 692 27 309 990 568 229 195 246 900 248 392 579 954 187 785 648 638 330 177 519 233 920 972 329 494 77 496 771 590 960 796 634 986 105 975 905 685 521 150 585 768 893 515 74 432 299 73 421 980 601 939 565 520 910 245 14 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[626 750 682 840 23 620 651 542 846 79 714 942 624 759 272 636 101 647 505 954 823 212 398 949 431 870 68 568 133 370 720 758 471 753 949 845 725 952 387 570 382 452 864 6 210 135 641 662 133 145 615 307 708 365 255 138 586 675 706 718 396 777 828 866 882 776 710 606 727 448 527 461 900 390 466 461 877 458 123 361 954 89 668 662 805 922 799 390 948 856 108 343 985 287 208 866 62 270 471 141 ];\r\nvexp=[79 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[235 228 987 190 889 791 317 684 110 217 895 566 657 188 402 731 514 485 602 606 767 410 328 583 701 500 772 884 333 161 654 919 740 993 461 629 135 129 312 244 346 206 161 2 394 562 84 259 399 685 865 165 447 544 99 499 395 870 382 79 382 388 997 122 732 457 750 866 938 413 109 283 971 270 636 716 183 72 974 581 108 190 97 554 733 196 405 479 417 786 557 799 525 554 272 256 362 373 121 299 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[993 227 107 247 622 327 484 892 155 519 281 839 498 884 236 838 295 638 482 286 408 752 88 700 535 643 193 782 377 56 748 721 635 206 967 608 533 802 499 39 320 779 229 170 14 464 7 661 454 840 946 213 592 385 265 478 27 457 259 755 864 7 475 498 564 793 105 96 594 955 134 266 86 362 787 99 178 145 759 983 985 56 195 928 440 459 405 819 267 663 573 131 21 400 980 585 544 437 32 138 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[637 668 675 126 34 103 818 277 606 283 510 996 759 948 368 504 587 149 500 992 289 445 744 547 797 543 195 129 445 552 749 81 571 423 207 604 877 376 880 834 10 742 829 120 41 196 975 628 696 474 619 985 270 715 883 66 257 430 547 702 981 647 134 552 69 692 155 945 419 35 130 780 776 958 251 816 505 226 795 201 699 766 537 321 480 419 738 736 848 636 789 829 282 275 732 350 318 886 646 737 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[520 971 78 333 535 918 930 357 193 69 399 244 246 841 552 833 468 478 785 476 173 296 215 260 277 366 692 711 363 448 381 235 418 459 919 304 728 848 660 272 916 410 868 513 602 419 346 70 249 482 545 421 130 111 681 758 828 724 468 190 171 201 776 940 659 694 244 738 893 255 361 161 17 228 673 618 999 18 687 247 852 583 667 981 693 699 738 520 423 557 710 945 757 837 237 767 531 832 856 775 ];\r\nvexp=[78 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[161 949 970 194 627 530 802 645 68 353 775 215 704 181 694 450 957 187 136 33 844 61 286 287 753 747 656 628 874 389 80 35 690 49 228 316 578 381 312 645 734 86 211 437 618 904 886 574 442 21 606 285 434 243 923 186 990 579 165 863 319 244 897 8 644 477 676 221 857 987 217 590 425 427 378 42 682 264 968 124 636 573 760 421 168 683 958 157 613 123 19 283 718 268 643 362 744 670 934 952 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[921 739 879 409 716 747 869 495 776 25 857 651 646 480 86 288 622 686 334 426 757 408 532 619 292 515 826 649 157 986 28 429 724 906 838 440 4 706 934 132 82 142 782 727 973 219 366 594 256 700 19 12 459 903 982 750 769 807 398 278 145 425 706 868 682 543 659 686 600 944 817 33 437 950 759 409 520 477 355 775 176 725 786 634 627 767 735 396 926 132 673 70 909 378 289 590 273 300 275 224 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[211 588 861 514 609 695 144 442 425 927 553 630 208 971 774 704 612 666 871 376 31 535 806 314 101 839 425 659 403 965 139 613 905 999 126 513 694 269 306 470 547 210 99 106 180 872 161 791 890 31 519 272 566 676 586 666 866 10 324 268 327 814 880 583 165 5 95 858 626 752 679 172 961 777 630 141 1 790 283 242 821 801 513 738 829 98 403 694 460 78 962 786 244 841 368 408 198 814 617 175 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[345 356 192 379 626 146 339 157 374 419 580 561 192 746 68 231 668 760 231 149 516 13 702 426 515 688 214 702 980 729 501 324 436 692 55 414 189 745 922 914 515 501 827 58 246 894 288 265 654 519 766 521 883 819 298 397 507 512 98 838 240 951 513 28 642 919 441 183 663 362 448 530 215 274 587 812 168 227 77 173 745 194 693 979 12 991 375 518 854 825 355 93 775 220 472 768 138 912 302 153 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[55 561 739 879 938 143 627 491 788 610 374 114 357 185 42 379 252 430 547 702 40 936 387 710 253 785 499 328 258 892 496 312 453 235 542 742 377 520 232 516 129 605 981 485 141 375 215 745 804 113 446 195 48 184 904 652 968 754 980 225 646 475 888 450 709 429 191 438 300 775 953 428 731 934 265 224 308 831 968 463 944 413 657 343 596 912 995 563 665 326 139 662 152 26 111 213 806 654 650 105 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[115 234 289 9 499 669 715 43 847 376 880 97 177 546 518 963 313 308 145 425 206 468 839 290 126 800 558 254 874 885 296 988 470 584 348 968 605 62 10 451 789 241 547 317 787 417 279 451 76 776 876 281 243 714 570 368 513 480 622 739 364 917 78 186 852 426 153 456 839 163 907 980 403 453 296 189 221 575 992 296 350 867 929 592 580 498 311 445 329 284 183 45 552 260 230 404 37 382 859 876 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[377 312 592 156 382 321 20 986 965 831 995 59 736 919 383 679 650 258 427 674 392 926 663 374 319 161 553 406 353 268 485 729 931 428 237 664 100 256 649 64 439 995 474 526 266 857 204 915 114 631 940 857 908 955 230 578 115 134 335 819 753 172 548 35 951 784 698 403 391 698 818 181 693 292 706 310 500 262 576 613 892 515 821 151 469 402 80 935 888 414 754 992 937 301 27 888 436 724 290 178 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[4 5 6 1 7 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[702 390 16 146 565 919 452 746 471 596 64 700 367 25 892 634 431 175 691 493 279 938 37 406 397 833 103 910 422 299 743 475 41 759 621 605 677 424 702 499 371 117 550 737 141 442 370 923 968 412 415 246 349 804 3 97 636 105 6 409 755 749 236 795 859 208 751 535 631 804 386 1 921 935 89 413 376 458 336 695 222 102 940 570 905 294 667 540 398 24 301 505 124 536 651 982 743 402 517 373 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[294 606 149 273 390 992 232 883 106 284 406 537 904 323 960 281 898 282 973 120 668 189 94 950 572 109 382 247 197 864 338 490 470 838 762 859 829 345 93 287 629 850 823 884 173 783 165 422 416 489 541 84 677 634 33 600 94 415 847 290 630 184 779 99 373 892 310 201 589 754 487 217 604 662 452 128 444 968 549 859 456 89 294 485 74 327 84 520 93 930 809 722 465 940 173 837 183 482 390 771 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[138 328 820 892 771 483 698 985 844 850 717 842 924 128 363 560 967 15 76 679 111 434 928 923 663 51 280 980 149 564 326 286 891 497 177 13 331 874 349 174 75 65 367 350 544 82 262 863 96 689 541 558 122 468 833 784 519 112 116 19 675 441 304 917 289 832 281 619 57 629 145 483 45 863 184 941 944 445 803 392 133 343 949 254 811 781 390 681 893 505 51 919 297 706 188 585 889 468 555 945 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 17 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[976 853 243 180 658 979 923 226 893 655 966 40 37 892 748 564 93 396 415 245 255 203 54 735 935 446 55 146 523 568 947 850 420 541 29 429 519 304 655 411 310 972 450 347 863 550 262 956 945 676 200 199 231 605 933 165 50 339 662 924 906 608 773 678 500 154 106 18 457 112 428 766 436 230 464 298 779 726 605 723 753 805 273 983 761 557 499 163 895 512 86 153 471 211 830 970 364 287 987 172 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 988 ];\r\nvexp=[999 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[493 423 719 243 813 237 231 93 184 85 534 478 686 963 106 555 82 362 285 366 251 243 695 953 652 382 440 552 32 79 287 524 502 6 118 314 594 348 758 777 785 292 606 470 254 711 376 335 424 660 53 674 254 747 978 257 480 417 808 511 848 95 34 349 452 503 662 45 851 772 173 987 63 778 808 668 840 184 2 263 195 406 288 449 153 265 705 632 33 513 495 880 959 880 228 410 383 242 454 585 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[297 238 716 689 386 333 730 710 361 144 616 992 887 831 981 625 319 904 103 694 374 725 599 418 345 900 326 421 110 790 160 406 27 876 446 764 560 527 474 272 22 441 263 260 624 243 236 942 499 338 987 872 415 937 290 759 836 967 531 297 756 690 54 134 917 500 897 828 378 722 99 400 163 714 659 786 308 895 79 158 584 418 30 350 354 671 108 542 637 990 838 744 32 892 877 948 743 125 128 120 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[961 238 790 232 341 217 876 109 914 771 275 778 761 924 820 756 37 283 58 200 170 971 229 962 481 406 83 173 107 819 779 419 409 921 651 749 137 878 857 403 648 483 180 760 406 351 515 794 986 924 345 155 246 925 469 726 331 551 251 789 369 29 208 777 301 210 877 438 87 85 840 87 568 371 198 325 73 65 471 58 340 167 565 586 92 33 663 774 583 913 562 303 294 121 432 594 682 660 383 121 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[17 13 ];\r\nvexp=[1 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[847 578 871 9 291 882 146 951 776 224 108 711 993 489 61 347 511 520 240 147 510 77 242 541 320 470 840 62 595 967 534 441 545 404 801 187 285 946 137 412 521 597 123 866 85 535 564 596 54 803 94 915 879 336 455 199 157 295 612 751 613 145 543 157 549 343 696 185 640 184 597 513 780 71 730 865 605 293 460 658 95 905 573 973 592 379 523 749 25 135 499 638 631 394 146 179 88 193 716 80 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1000 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 ];\r\nvexp=[0 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[595 443 257 384 392 367 144 911 843 498 37 18 223 174 3 201 293 89 596 570 221 620 639 129 350 279 70 622 930 697 197 877 139 453 260 883 820 403 145 14 253 182 384 827 355 386 27 999 827 975 568 47 594 558 527 295 837 948 268 118 644 465 994 783 917 605 665 88 360 809 102 612 342 485 438 49 222 816 47 48 790 615 446 736 172 324 30 360 272 298 478 267 114 471 49 30 428 65 470 787 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[780 954 884 510 239 148 85 898 331 52 360 274 464 368 968 411 279 314 325 296 991 463 957 143 840 420 355 645 73 4 749 852 309 985 713 548 132 798 445 814 849 157 439 665 524 407 427 155 72 752 450 63 566 406 205 758 825 911 402 249 914 503 452 222 487 165 121 970 314 918 784 514 74 222 178 597 980 957 103 404 60 552 466 977 310 22 734 486 932 488 735 197 990 186 770 828 702 243 149 15 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[13 978 571 427 755 378 94 946 913 447 208 108 853 495 908 5 111 964 988 143 828 482 23 786 362 602 195 96 195 1000 680 559 329 250 985 83 979 430 28 892 877 587 999 729 433 258 85 543 221 424 38 49 258 412 834 971 13 381 66 560 732 745 118 61 994 455 495 972 884 875 215 760 461 565 840 246 822 924 788 43 700 177 91 957 588 276 927 953 8 344 512 740 88 629 152 433 435 646 756 319 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[451 239 992 437 132 835 911 157 520 659 517 666 58 774 700 772 780 999 197 975 428 97 90 327 717 962 99 59 529 857 959 979 447 950 767 579 136 29 87 7 687 603 672 96 376 372 868 507 722 64 833 149 512 922 827 228 883 926 639 412 134 597 742 933 898 861 511 386 889 949 744 928 903 416 23 278 139 242 137 860 305 969 360 817 891 538 396 125 463 34 888 949 982 630 881 880 842 743 617 730 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[54 863 642 961 561 785 120 582 696 547 678 829 552 991 857 12 856 37 210 339 355 407 539 933 277 407 350 845 820 26 500 873 241 493 834 153 629 305 735 325 851 412 505 402 754 713 414 610 749 975 948 456 381 838 740 9 596 442 853 416 467 705 640 59 197 825 212 826 129 298 502 979 61 6 733 814 718 498 423 818 472 722 625 204 912 365 212 507 806 416 274 624 120 914 683 669 90 246 846 219 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[557 254 725 829 188 813 242 916 622 929 610 843 30 902 765 935 195 783 826 945 806 126 449 282 661 99 263 755 852 131 479 761 384 203 589 924 367 182 191 989 110 800 183 140 53 947 74 600 81 899 544 239 377 344 520 37 442 782 792 646 913 622 406 648 825 994 571 191 176 761 531 637 913 714 776 965 12 201 916 93 452 459 331 828 802 850 864 596 983 7 241 895 629 998 543 805 991 465 347 518 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[382 165 739 167 38 451 342 38 166 455 245 754 118 285 706 466 81 767 408 279 675 398 220 142 598 521 210 991 413 174 676 794 690 767 312 79 217 653 116 382 459 360 487 928 997 193 745 429 311 505 59 985 254 279 478 852 799 687 842 563 212 869 708 901 635 19 980 851 24 447 584 834 159 71 762 155 263 858 935 925 362 994 909 616 272 386 819 422 424 660 984 636 880 691 888 515 61 219 717 84 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[91 411 591 488 445 865 258 361 598 428 574 13 326 713 417 379 879 30 193 142 84 13 910 335 890 655 530 356 249 169 130 691 579 72 530 376 288 788 736 886 567 309 250 892 373 666 623 251 47 815 744 131 180 654 817 69 660 347 425 908 867 906 950 797 977 479 524 617 266 260 502 832 920 751 76 293 769 698 895 815 864 639 297 43 644 114 112 303 812 536 562 30 793 511 826 121 341 350 737 607 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[773 485 819 749 358 729 307 911 311 821 26 680 127 222 98 22 843 654 513 503 779 701 823 427 972 585 806 165 264 229 331 36 65 149 136 422 230 443 685 892 615 710 571 741 284 668 763 126 322 627 980 100 327 802 878 650 738 683 167 2 911 497 389 327 645 525 749 226 967 433 117 581 494 687 674 129 707 436 606 380 62 586 831 740 387 709 390 477 743 556 478 6 52 866 332 48 390 80 274 708 ];\r\nvexp=[84 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[840 811 793 629 947 995 457 205 236 199 384 941 486 279 76 810 896 157 100 909 377 71 931 209 327 2 461 474 71 795 747 911 957 892 539 903 886 347 108 474 898 491 766 383 769 842 192 16 350 292 925 727 714 207 935 40 560 395 865 630 542 612 892 498 503 783 753 740 481 860 213 378 702 979 112 822 172 304 838 521 947 114 599 12 672 886 403 231 280 268 212 173 879 456 671 733 238 423 824 70 ];\r\nvexp=[86 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[666 301 270 824 723 31 330 985 240 264 909 602 257 169 217 880 554 35 653 329 46 988 964 925 30 204 791 91 422 508 526 439 808 795 262 530 177 943 866 417 207 126 370 815 294 586 695 199 972 347 527 369 687 843 645 716 46 436 806 467 295 684 906 102 478 519 983 7 462 200 775 668 677 144 834 970 81 528 168 404 227 46 772 913 888 768 628 933 555 786 752 849 469 657 302 298 527 636 304 988 ];\r\nvexp=[81 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[140 221 767 853 559 614 357 547 107 629 774 71 944 277 33 795 93 277 858 843 571 984 702 31 470 249 203 458 919 943 227 410 515 345 263 73 958 619 971 64 599 744 135 895 20 519 689 464 795 546 306 365 882 359 748 351 960 302 161 230 596 739 639 110 83 901 534 392 872 504 456 470 599 942 716 618 460 404 433 606 302 738 971 183 448 70 885 407 371 397 636 318 487 627 427 569 879 960 313 750 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[895 347 549 955 352 281 120 421 130 543 238 601 616 863 156 527 579 719 386 384 135 11 359 606 276 393 626 366 638 471 584 884 817 484 190 168 765 310 940 246 204 178 847 819 392 354 698 970 73 435 705 559 797 63 516 73 456 142 790 445 612 725 329 429 208 518 948 972 827 888 570 382 417 768 201 808 121 250 129 193 36 833 103 832 895 619 904 350 760 45 147 371 769 475 799 977 344 747 300 523 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[212 715 903 316 622 690 654 758 156 811 375 555 755 246 21 376 361 213 692 258 285 289 496 721 666 777 858 559 189 830 573 752 896 827 67 517 516 720 274 672 883 648 578 637 893 950 364 254 514 56 511 799 696 358 871 714 134 80 272 674 909 196 425 804 22 844 320 538 915 946 561 797 593 490 786 838 439 149 443 952 556 305 102 252 662 972 965 147 51 588 173 959 783 949 114 156 792 434 693 707 ];\r\nvexp=[82 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[1 2 3 4 5 7 8 9 10 12 13 14 15 16 17 19 20 21 24 25 26 27 30 31 32 33 34 36 37 38 39 40 41 42 43 44 45 46 47 49 52 53 54 55 58 59 60 61 62 63 64 65 66 67 69 70 72 74 75 76 77 79 80 81 82 83 84 85 87 89 90 93 95 96 97 98 100 101 102 104 105 108 109 110 112 115 117 116 118 119 120 121 122 123 124 125 126 128 132 133 134 135 136 137 139 142 143 145 146 147 148 149 150 151 153 154 155 156 159 157 160 161 162 163 164 165 167 168 170 171 174 177 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 196 197 198 199 201 202 203 204 205 206 207 208 212 213 214 216 217 219 220 221 223 224 225 226 227 228 229 230 231 232 233 234 235 237 238 239 241 242 245 246 248 249 250 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 270 271 272 275 278 279 280 282 283 284 286 287 288 289 291 292 293 295 296 297 299 300 301 302 303 304 305 307 308 310 312 313 314 315 317 319 320 322 323 324 325 327 328 330 329 331 332 333 334 335 336 337 338 339 340 341 342 343 344 346 347 348 349 350 351 352 354 355 357 358 359 360 361 362 363 364 365 367 368 369 370 373 374 375 378 379 383 384 386 387 388 389 390 392 394 396 398 399 400 401 403 404 405 406 407 408 409 410 411 412 413 414 416 420 417 421 422 424 426 427 428 429 430 432 433 434 436 437 438 439 440 442 443 444 445 446 448 449 450 452 454 455 456 457 458 459 460 461 462 463 464 465 466 468 469 471 472 474 475 476 477 478 479 480 481 483 484 485 486 487 489 490 491 492 493 494 496 497 498 499 500 501 502 504 505 506 507 508 509 510 511 514 515 517 518 519 520 521 522 526 527 529 530 531 532 533 534 535 536 537 538 539 540 541 543 545 546 547 548 549 550 552 553 554 555 557 558 559 560 561 565 566 567 568 569 570 571 574 575 576 577 579 580 581 582 583 586 587 588 589 590 591 593 594 595 596 597 599 601 602 603 604 605 606 607 608 609 610 612 614 613 615 616 617 618 619 620 621 623 624 625 626 627 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 647 648 649 651 654 652 655 656 657 659 662 663 664 665 666 667 668 670 671 672 673 674 675 676 677 678 679 680 681 684 685 687 688 689 690 691 693 694 696 697 700 702 703 704 705 706 707 708 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 745 746 748 749 750 751 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 770 771 773 774 775 776 777 778 779 780 781 783 784 785 786 787 788 790 791 792 793 794 796 797 798 799 800 801 802 803 804 805 807 806 809 811 812 813 814 815 816 818 819 820 822 823 824 825 826 827 828 829 830 831 832 833 834 836 839 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 863 864 865 866 867 868 869 870 871 872 873 874 876 877 878 881 882 883 886 888 889 891 892 893 895 896 897 898 899 900 901 903 904 905 906 907 908 909 910 911 912 914 915 916 919 920 921 922 923 924 925 926 927 928 929 930 931 933 934 935 937 938 939 940 943 944 946 947 948 949 950 951 954 955 958 959 960 962 964 963 965 966 967 968 969 970 971 973 974 976 977 978 979 980 981 982 983 985 987 989 990 991 992 993 994 995 996 997 998 999 1000 ];\r\nvexp=[8 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[232 362 351 89 9 383 813 119 501 620 74 832 51 891 276 399 788 50 830 441 407 247 327 179 95 747 700 116 567 509 596 798 870 946 238 230 680 51 348 533 22 421 364 72 312 639 470 451 688 652 891 446 898 570 624 992 316 675 107 882 183 54 680 405 999 269 634 31 671 982 563 692 754 926 764 417 564 585 220 251 236 462 48 486 31 671 477 346 697 936 228 231 989 259 635 340 879 621 370 550 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[743 518 755 828 879 541 927 408 37 37 390 21 445 937 948 884 395 704 54 14 367 979 496 739 378 827 675 921 263 707 410 6 224 164 185 454 56 111 214 93 500 603 465 944 891 765 179 286 468 233 651 186 211 146 925 940 972 951 212 587 657 622 944 232 137 128 686 545 591 899 989 442 853 805 385 744 569 563 381 389 147 31 926 357 528 202 296 851 153 860 437 809 481 732 41 969 860 78 513 802 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[86 217 935 102 796 608 72 794 977 758 392 828 341 411 808 33 109 545 905 883 454 614 180 210 450 416 977 332 247 832 107 332 400 41 786 196 1000 857 341 977 966 733 804 658 495 964 43 603 860 947 838 313 912 17 523 361 432 851 45 678 682 503 361 434 895 498 629 895 706 321 871 672 405 26 329 899 341 723 854 201 669 691 513 580 59 387 293 490 237 689 519 271 191 231 704 85 81 684 979 786 ];\r\nvexp=[83 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[473 794 229 24 568 883 911 820 507 554 938 670 729 241 831 64 196 280 334 572 853 361 223 365 866 48 748 528 116 865 442 941 658 670 964 225 904 226 44 410 131 982 79 859 574 261 275 770 540 608 693 392 320 915 109 186 962 208 713 430 72 154 370 82 176 685 306 79 262 702 841 744 35 271 955 960 532 229 729 71 836 421 815 156 688 923 693 1 130 405 430 554 910 151 635 437 187 292 516 448 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(vout,vexp))\r\n%%\r\nvin=[746 542 944 181 269 649 563 798 243 157 472 262 531 138 351 242 625 142 109 630 330 815 726 455 518 75 952 582 985 432 562 82 973 857 263 594 505 825 743 99 981 567 361 512 704 711 105 328 852 213 310 533 380 35 988 897 462 291 830 446 722 392 880 46 248 142 639 105 318 734 203 298 300 915 161 355 625 617 682 828 830 343 713 209 730 52 457 191 342 286 988 415 29 867 460 629 360 451 733 677 ];\r\nvexp=[85 ];\r\nvout=Monotonic_V(vin);\r\nassert(isequal(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":5,"test_suite_updated_at":"2013-10-05T04:03:17.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-05T03:14:32.000Z","updated_at":"2013-10-06T00:40:15.000Z","published_at":"2013-10-05T03:49:00.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=p2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2013 Veterans Ocean View\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is the Large data set with N\u0026lt;=1000 and Q\u0026lt;N\u0026lt;=1000, with typical 80.\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 as Supreme Ruler you are annoyed by complaints of non-ocean views on a hillside. To resolve the issue a minimum number of homes will be removed to provide a maximum number of ocean view homes. The Elevation of the homes should monotonically increase, no equal values, from element 1 thru the end.\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\u003eSuccinct Challenge statement:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Given a vector create the maximum length monotonically increasing vector by removing values. Report the number of values removed.\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 V , Vector length N\u0026lt;=1000 with values 1 thru 1000.\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 Q , minimum quantity of removed values to produce a valid vector (typical 80)\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 [V] [Q]\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 4 3 3] [2]  for [1 4] or [1 3]\\n[1 2 3 4 5] [0]\\n[4 3 2 1] [3]]]\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) nchoosek(1000,80) is a little big\\n2) The Large test suite is N\u003c=1000 with some delete cases \u003e4\\n3) A Good Algorithm that solves the Large case is usually best to pursue\\n4) GJam Competition allows one Large submission within 10 minutes of download \\n5) This was only solved by one entrant.]]\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:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/1913-gjam-2013-veterans-ocean-view-small\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eSmall Suite Challenge\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eAlgorithm Spoiler:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A general method is to start at the end and build all unique length valid vectors. It is only necessary to maintain a Min Value and length for the potential solutions. Once all values are checked find the maximum solution length. There are three key steps in this method: 1) If vin(j)\u0026gt; Max of all solutions, start a new solution with length 1. 2) Find solutions that are 1 greater than vin(j). Update minimums of these solutions with vin(j) and increase length values. 3) Find solutions where mins\u0026gt;vin(j). Augment solution set by a single line of [vin(j),max length found +1]. 4) Find maximum length solution. This method solved all 100 large cases in \u0026lt; 2 seconds on Cody.\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\"}]}"},{"id":42774,"title":"GJam March 2016 IOW: Clock Dance","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/8274486/dashboard#s=p1 GJam March 2016 Annual I/O for Women Dance Around the Clock\u003e. This is a mix of the small and large data sets.\r\n\r\nThe GJam story goes that D even dancers are arranged clockwise 1:D. Who is adjacent to dancer K after N pair swaps. The odd move swaps positions 1/2,3/4,..D-1/D. The even move swaps positions D/1, 2/3,...D-2/D-1. D=8 [1:8] becomes [2 1 4 3 6 5 8 7] after the first swap. After second swap we see [7 4 1 6 3 8 5 2].  \r\n\r\n\u003c\u003chttp://code.google.com/codejam/contest/images/?image=dance_around_the_clock.png\u0026p=5733344260128768\u0026c=8274486\u003e\u003e\r\n\r\n*Input:* [D K N] , 4\u003c=D\u003c=1E8, 1\u003c=K\u003c=D, 1\u003c=N\u003c=1E8\r\n\r\n*Output:* [KCW KCCW] , KCW is dancer to left of Kth dancer after N moves\r\n\r\n*Examples:* [m] [v]\r\n\r\n  [8 3 1] creates v=[6 4]\r\n  [8 4 2] creates v=[1 7]\r\n  [6 6 1] creates v=[5 3]\r\n \r\n\r\n*\u003chttp://code.google.com/codejam Google Code Jam 2016 Open Qualifier: April 8, 2016\u003e*\r\n\r\n*Contest Theory:* The small case was D\u003c10 and N\u003c10. This could be done brute force in the 5 minutes of entry submission allowed. However, this is clearly a case of modulo math so might as well solve the unbounded case of D/N \u003c1E8. The number being assigned as 1:D leads to confusion as mod maps to 0:D-1. Suggest offset the K dancer number by 1 for processing and then correct for the final answer. Mod is fun as mod(-1,8) yields a useful 7. Quick observation is for offsetted K vector [0:D-1] the Evens move CW and the Odds move CCW. One method used 5 mod calls to solve.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/8274486/dashboard#s=p1\"\u003eGJam March 2016 Annual I/O for Women Dance Around the Clock\u003c/a\u003e. This is a mix of the small and large data sets.\u003c/p\u003e\u003cp\u003eThe GJam story goes that D even dancers are arranged clockwise 1:D. Who is adjacent to dancer K after N pair swaps. The odd move swaps positions 1/2,3/4,..D-1/D. The even move swaps positions D/1, 2/3,...D-2/D-1. D=8 [1:8] becomes [2 1 4 3 6 5 8 7] after the first swap. After second swap we see [7 4 1 6 3 8 5 2].\u003c/p\u003e\u003cimg src = \"http://code.google.com/codejam/contest/images/?image=dance_around_the_clock.png\u0026p=5733344260128768\u0026c=8274486\"\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [D K N] , 4\u0026lt;=D\u0026lt;=1E8, 1\u0026lt;=K\u0026lt;=D, 1\u0026lt;=N\u0026lt;=1E8\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [KCW KCCW] , KCW is dancer to left of Kth dancer after N moves\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e [m] [v]\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[8 3 1] creates v=[6 4]\r\n[8 4 2] creates v=[1 7]\r\n[6 6 1] creates v=[5 3]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003e\u003ca href = \"http://code.google.com/codejam\"\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eContest Theory:\u003c/b\u003e The small case was D\u0026lt;10 and N\u0026lt;10. This could be done brute force in the 5 minutes of entry submission allowed. However, this is clearly a case of modulo math so might as well solve the unbounded case of D/N \u0026lt;1E8. The number being assigned as 1:D leads to confusion as mod maps to 0:D-1. Suggest offset the K dancer number by 1 for processing and then correct for the final answer. Mod is fun as mod(-1,8) yields a useful 7. Quick observation is for offsetted K vector [0:D-1] the Evens move CW and the Odds move CCW. One method used 5 mod calls to solve.\u003c/p\u003e","function_template":"function v=ClockDance(m)\r\n% m [D K N] % Num Dancers, K dancernumber, N swaps\r\n% v=[CW_dancenumber CCW_dancenumber]  [pos+1, pos-1]\r\n v=[0 0];\r\n% This is a mod mod mod type contest question\r\n% Note mod(-1,8)=7\r\n% Note changing dancers from 1:D to 0:D-1 helps mod normalcy and brain function\r\n% At the end add 1 back to the v vector\r\n\r\nend","test_suite":"%%\r\nm=[8 3 1 ];\r\nv=ClockDance(m);\r\nvexp=[6 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 4 2 ];\r\nv=ClockDance(m);\r\nvexp=[1 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 8 ];\r\nv=ClockDance(m);\r\nvexp=[2 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[10 9 6 ];\r\nv=ClockDance(m);\r\nvexp=[2 10 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 9 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 2 10 ];\r\nv=ClockDance(m);\r\nvexp=[7 5 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 8 7 ];\r\nv=ClockDance(m);\r\nvexp=[3 1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 4 3 ];\r\nv=ClockDance(m);\r\nvexp=[3 1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 6 1 ];\r\nv=ClockDance(m);\r\nvexp=[5 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 4 6 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 5 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 4 1 ];\r\nv=ClockDance(m);\r\nvexp=[3 1 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 1 ];\r\nv=ClockDance(m);\r\nvexp=[4 2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 2 2 ];\r\nv=ClockDance(m);\r\nvexp=[5 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[6 1 10 ];\r\nv=ClockDance(m);\r\nvexp=[4 2 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 3 1 ];\r\nv=ClockDance(m);\r\nvexp=[6 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[8 4 2 ];\r\nv=ClockDance(m);\r\nvexp=[1 7 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 1 8 ];\r\nv=ClockDance(m);\r\nvexp=[2 4 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[72137284 16112525 91351141 ];\r\nv=ClockDance(m);\r\nvexp=[54540240 54540238 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[155546 123001 56937611 ];\r\nv=ClockDance(m);\r\nvexp=[138552 138550 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[78548986 44806245 20024652 ];\r\nv=ClockDance(m);\r\nvexp=[6306564 6306562 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[4 2 5 ];\r\nv=ClockDance(m);\r\nvexp=[1 3 ];\r\nassert(isequal(vexp,v))\r\n%%\r\nm=[61256952 31789482 70629381 ];\r\nv=ClockDance(m);\r\nvexp=[13044625 13044623 ];\r\nassert(isequal(vexp,v))\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-16T04:41:57.000Z","updated_at":"2016-03-16T05:17:21.000Z","published_at":"2016-03-16T05:10:45.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/8274486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam March 2016 Annual I/O for Women Dance Around the Clock\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. This is a mix of the small and large data sets.\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 D even dancers are arranged clockwise 1:D. Who is adjacent to dancer K after N pair swaps. The odd move swaps positions 1/2,3/4,..D-1/D. The even move swaps positions D/1, 2/3,...D-2/D-1. D=8 [1:8] becomes [2 1 4 3 6 5 8 7] after the first swap. After second swap we see [7 4 1 6 3 8 5 2].\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\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [D K N] , 4\u0026lt;=D\u0026lt;=1E8, 1\u0026lt;=K\u0026lt;=D, 1\u0026lt;=N\u0026lt;=1E8\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 [KCW KCCW] , KCW is dancer to left of Kth dancer after N moves\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 [m] [v]\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[[8 3 1] creates v=[6 4]\\n[8 4 2] creates v=[1 7]\\n[6 6 1] creates v=[5 3]]]\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGoogle Code Jam 2016 Open Qualifier: April 8, 2016\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eContest Theory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The small case was D\u0026lt;10 and N\u0026lt;10. This could be done brute force in the 5 minutes of entry submission allowed. However, this is clearly a case of modulo math so might as well solve the unbounded case of D/N \u0026lt;1E8. The number being assigned as 1:D leads to confusion as mod maps to 0:D-1. Suggest offset the K dancer number by 1 for processing and then correct for the final answer. Mod is fun as mod(-1,8) yields a useful 7. Quick observation is for offsetted K vector [0:D-1] the Evens move CW and the Odds move CCW. One method used 5 mod calls to solve.\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\"}]}"},{"id":2291,"title":"GJam 2014 Qualifier: Deceitful War (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2974486/dashboard#s=p3 GJam 2014 Qualifier Deceitful War\u003e.\r\n\r\nMy condensed summary of the problem statement.\r\n\r\nGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\r\n\r\nUnsurprisingly when A truthfully states masses player B consistently wins.\r\n\r\nPlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\r\n\r\nPart one is determine the best possible score for A when playing deceitfully.\r\n\r\nPart two is determine the best possible score if player A did not look and is honest.\r\n\r\n*Examples:*\r\n\r\n  A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n  \r\n  A 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n  B 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n  Deceitful A Wins 8\r\n  Optimal Honest A Wins 4\r\n\r\n*Input:* A,B vectors of length N (Small has N\u003c=10, Large(future challenge N\u003c=1000)\r\n\r\n*Output:* Deceitful Wins, Optimal Honest Wins\r\n\r\n\r\n\r\n\r\n\r\n*Note:*\r\n\r\nIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003chttp://www.go-hero.net/jam/14/solutions/0/4/MATLAB GJam Deceitful Solutions\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2974486/dashboard#s=p3\"\u003eGJam 2014 Qualifier Deceitful War\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eMy condensed summary of the problem statement.\u003c/p\u003e\u003cp\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\u003c/p\u003e\u003cp\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\u003c/p\u003e\u003cp\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\u003c/p\u003e\u003cp\u003ePart one is determine the best possible score for A when playing deceitfully.\u003c/p\u003e\u003cp\u003ePart two is determine the best possible score if player A did not look and is honest.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eA: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\nDeceitful A Wins 8\r\nOptimal Honest A Wins 4\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Deceitful Wins, Optimal Honest Wins\u003c/p\u003e\u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003ca href = \"http://www.go-hero.net/jam/14/solutions/0/4/MATLAB\"\u003eGJam Deceitful Solutions\u003c/a\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\u003c/p\u003e","function_template":"function W = War(m)\r\n% W=[Deceitful Wins, Optimal Honest Wins]\r\n  W=[0 0];\r\nend","test_suite":"%%\r\nm=[0.270000 0.550000 0.910000 0.330000 0.520000 0.300000 ;0.850000 0.450000 0.060000 0.240000 0.120000 0.880000 ];\r\nWexp=[5 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.164000 0.255000 0.009000 0.445000 0.209000 0.100000 0.391000 0.536000 0.027000 0.118000 ;0.673000 0.782000 0.582000 0.882000 0.591000 0.855000 0.745000 0.955000 0.991000 0.600000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 0.480000 0.760000 0.680000 0.160000 0.640000 0.360000 ;0.200000 0.440000 0.960000 0.280000 0.880000 0.520000 0.120000 ];\r\nWexp=[5 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.170000 0.100000 0.120000 0.200000 0.540000 0.150000 ;0.490000 0.070000 0.240000 0.680000 0.610000 0.340000 ];\r\nWexp=[2 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.780000 0.770000 0.900000 0.810000 0.880000 0.840000 0.600000 0.730000 0.930000 0.990000 ;0.270000 0.150000 0.260000 0.510000 0.570000 0.310000 0.170000 0.140000 0.400000 0.040000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.320000 0.820000 0.350000 0.770000 0.020000 0.550000 0.040000 0.990000 0.610000 0.190000 ;0.730000 0.530000 0.750000 0.800000 0.670000 0.870000 0.330000 0.250000 0.080000 0.680000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.100000 0.380000 0.050000 0.210000 0.130000 0.440000 0.180000 ;0.560000 0.920000 0.540000 0.900000 0.670000 0.790000 0.820000 0.970000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.420000 ;0.080000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.690000 0.310000 0.540000 0.230000 0.710000 0.030000 0.490000 0.600000 0.510000 0.860000 ;0.830000 0.340000 0.370000 0.740000 0.430000 0.200000 0.090000 0.170000 0.910000 0.400000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 0.920000 0.710000 0.130000 0.230000 0.620000 0.140000 0.260000 0.360000 0.310000 ;0.440000 0.010000 0.640000 0.350000 0.820000 0.550000 0.780000 0.790000 0.060000 0.570000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.504000 0.218000 0.479000 0.101000 0.050000 0.445000 0.471000 0.084000 0.034000 0.008000 ;0.992000 0.546000 0.647000 0.849000 0.891000 0.739000 0.765000 0.555000 0.613000 0.748000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.570000 0.470000 0.640000 0.550000 0.060000 0.430000 0.040000 0.280000 0.130000 0.510000 ;0.700000 0.740000 0.770000 0.810000 0.870000 0.790000 0.940000 0.910000 0.850000 0.660000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.020000 0.510000 0.120000 0.220000 0.250000 0.100000 0.490000 0.530000 0.350000 ;0.800000 0.960000 0.760000 0.820000 0.710000 0.570000 0.940000 0.690000 0.900000 0.550000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.030000 0.360000 0.410000 0.330000 0.430000 0.540000 0.300000 0.280000 0.100000 ;0.770000 0.910000 0.700000 0.550000 0.590000 0.780000 0.650000 0.860000 0.750000 0.990000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.920000 0.370000 0.900000 0.200000 0.150000 0.020000 0.530000 0.860000 0.250000 0.190000 ;0.170000 0.980000 0.140000 0.680000 0.830000 0.470000 0.950000 0.340000 0.880000 0.540000 ];\r\nWexp=[7 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.020000 0.490000 0.280000 0.080000 0.830000 0.170000 0.140000 0.850000 ;0.420000 0.650000 0.950000 0.890000 0.030000 0.580000 0.380000 0.060000 0.370000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.670000 0.050000 0.590000 0.330000 0.820000 0.030000 0.740000 0.560000 0.950000 0.620000 ;0.210000 0.380000 0.770000 0.080000 0.260000 0.640000 0.460000 0.790000 0.310000 0.410000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.840000 0.800000 0.420000 0.580000 0.670000 0.070000 0.360000 ;0.690000 0.870000 0.310000 0.600000 0.760000 0.200000 0.380000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.450000 0.380000 0.280000 0.590000 0.620000 0.230000 0.810000 ;0.320000 0.190000 0.680000 0.140000 0.090000 0.940000 0.170000 ];\r\nWexp=[6 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.207000 0.288000 0.180000 0.595000 0.748000 0.459000 0.802000 0.387000 0.027000 0.090000 ;0.450000 0.982000 0.694000 0.613000 0.486000 0.423000 0.685000 0.847000 0.432000 0.604000 ];\r\nWexp=[4 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.750000 0.970000 0.820000 0.840000 0.680000 0.780000 0.730000 0.270000 0.220000 0.150000 ;0.130000 0.920000 0.390000 0.320000 0.230000 0.080000 0.800000 0.330000 0.720000 0.590000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.140000 0.600000 0.950000 0.160000 0.650000 0.580000 0.910000 0.230000 0.020000 ;0.120000 0.510000 0.530000 0.280000 0.350000 0.070000 0.400000 0.930000 0.490000 0.090000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.545000 0.527000 0.500000 0.727000 0.018000 0.400000 0.191000 0.982000 0.409000 0.591000 ;0.945000 0.745000 0.355000 0.673000 0.045000 0.118000 0.682000 0.827000 0.645000 0.482000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.930000 0.980000 0.470000 0.810000 0.830000 0.460000 0.510000 0.540000 ;0.490000 0.640000 0.170000 0.290000 0.140000 0.440000 0.590000 0.760000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.580000 ;0.330000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.640000 0.820000 0.700000 0.480000 0.520000 0.610000 0.060000 0.240000 0.300000 ;0.550000 0.450000 0.090000 0.030000 0.850000 0.670000 0.760000 0.360000 0.790000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 ;0.900000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.100000 0.040000 0.110000 0.650000 0.250000 0.570000 0.480000 0.150000 0.800000 ;0.550000 0.020000 0.920000 0.080000 0.700000 0.360000 0.910000 0.710000 0.820000 0.850000 ];\r\nWexp=[5 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.890000 0.060000 0.090000 0.750000 0.730000 0.810000 0.950000 0.660000 0.390000 ;0.530000 0.970000 0.610000 0.670000 0.690000 0.380000 0.590000 0.300000 0.720000 0.110000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.870000 0.600000 0.860000 0.830000 0.680000 0.810000 0.700000 0.920000 0.760000 ;0.170000 0.510000 0.330000 0.050000 0.240000 0.030000 0.410000 0.480000 0.520000 ];\r\nWexp=[9 9];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.940000 0.720000 0.810000 0.220000 0.280000 0.530000 0.440000 0.160000 0.880000 0.970000 ;0.120000 0.030000 0.470000 0.560000 0.380000 0.340000 0.690000 0.090000 0.250000 0.750000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.410000 0.360000 0.230000 0.140000 0.180000 0.050000 0.500000 0.270000 0.090000 0.450000 ;0.680000 0.950000 0.910000 0.860000 0.730000 0.550000 0.590000 0.820000 0.640000 0.770000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.278000 0.852000 0.370000 0.824000 0.389000 0.704000 0.546000 0.204000 0.296000 0.056000 ;0.833000 0.315000 0.991000 0.028000 0.907000 0.630000 0.361000 0.037000 0.065000 0.954000 ];\r\nWexp=[7 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.713000 0.657000 0.778000 0.435000 0.565000 0.870000 0.963000 0.343000 0.481000 0.593000 ;0.287000 0.333000 0.454000 0.130000 0.370000 0.759000 0.176000 0.611000 0.231000 0.398000 ];\r\nWexp=[10 6];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.590000 0.750000 0.650000 0.900000 0.740000 0.880000 0.850000 ;0.400000 0.070000 0.540000 0.380000 0.570000 0.150000 0.490000 ];\r\nWexp=[7 7];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.110000 0.920000 0.540000 0.840000 0.380000 0.770000 0.900000 0.490000 0.870000 0.750000 ;0.620000 0.480000 0.330000 0.440000 0.890000 0.130000 0.430000 0.080000 0.340000 0.560000 ];\r\nWexp=[10 5];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.480000 0.650000 0.770000 0.690000 0.720000 0.560000 0.660000 0.550000 0.510000 0.730000 ;0.310000 0.440000 0.300000 0.060000 0.200000 0.420000 0.030000 0.070000 0.110000 0.140000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.900000 0.680000 0.600000 0.800000 ;0.350000 0.050000 0.170000 0.880000 ];\r\nWexp=[4 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.730000 0.910000 0.450000 0.640000 0.090000 ;0.550000 0.360000 0.270000 0.820000 0.180000 ];\r\nWexp=[4 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.530000 0.740000 0.410000 0.320000 0.820000 0.970000 0.620000 0.500000 0.710000 0.090000 ;0.180000 0.760000 0.380000 0.150000 0.470000 0.210000 0.560000 0.120000 0.590000 0.440000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.487000 0.092000 0.714000 0.160000 0.504000 0.277000 0.479000 0.605000 0.462000 0.832000 ;0.210000 0.824000 0.118000 0.387000 0.664000 0.874000 0.445000 0.739000 0.546000 0.017000 ];\r\nWexp=[8 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.100000 ;0.400000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.688000 0.872000 0.615000 0.477000 0.734000 0.624000 0.394000 0.532000 0.954000 0.817000 ;0.193000 0.119000 0.349000 0.073000 0.037000 0.009000 0.128000 0.303000 0.046000 0.064000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.910000 0.550000 0.300000 0.570000 0.920000 0.400000 0.450000 0.150000 0.110000 0.190000 ;0.090000 0.790000 0.890000 0.740000 0.850000 0.940000 0.340000 0.380000 0.720000 0.260000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.723000 0.639000 0.824000 0.697000 0.840000 0.882000 0.437000 0.782000 0.588000 0.218000 ;0.345000 0.151000 0.067000 0.849000 0.815000 0.235000 0.521000 0.765000 0.950000 0.681000 ];\r\nWexp=[9 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.150000 0.350000 0.090000 0.110000 0.330000 0.220000 ;0.390000 0.460000 0.850000 0.700000 0.570000 0.610000 0.500000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.850000 0.790000 0.550000 0.380000 0.300000 0.400000 0.770000 0.740000 0.320000 0.570000 ;0.260000 0.210000 0.110000 0.130000 0.020000 0.040000 0.230000 0.190000 0.090000 0.060000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.961000 0.330000 0.010000 0.816000 0.583000 0.913000 0.893000 0.951000 0.126000 0.398000 ;0.767000 0.029000 0.262000 0.641000 0.175000 0.544000 0.359000 0.932000 0.680000 0.476000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 ;0.700000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.240000 0.050000 0.190000 0.110000 0.920000 0.590000 0.730000 0.380000 0.780000 0.950000 ;0.860000 0.700000 0.430000 0.620000 0.220000 0.540000 0.410000 0.890000 0.680000 0.490000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\n% function GJam_Qual_2014d\r\n% % \r\n% %War\r\n% fn='D-small-attempt0.in';\r\n% %fn='D-large.in';\r\n% [data] = read_file(fn); % \r\n% \r\n% fidG = fopen('D-small-output.out', 'w');\r\n% %fidG = fopen('D-large-output001.out', 'w');\r\n% tic\r\n% \r\n% for i=1:size(data,2) % Cell array has N rows of cases\r\n% % m=sort(data{i},2);\r\n%  m=data{i};\r\n%  dw = dWar(m) ;% \r\n%  w = War(m) ;%  \r\n%  \r\n%    fprintf('Case #%i: %i %i\\n',i,dw,w);\r\n%    fprintf(fidG,'Case #%i: %i %i\\n',i,dw,w);\r\n%     \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% \r\n% end\r\n% \r\n% function dw=dWar(m)\r\n% % Post contest\r\n% % Lie to burn opponent best pieces\r\n%  N=sort(m(1,:));\r\n%  K=sort(m(2,:));\r\n%  \r\n%  dw=0;\r\n%  for i=1:length(N)\r\n%   if N(i)\u003eK(1) % Lie to above to beat lowest\r\n%    dw=dw+1;\r\n%    K=K(2:end);\r\n%   else % Lie to just below best\r\n%    K=K(1:end-1);\r\n%   end\r\n%  end\r\n%  \r\n% end\r\n% \r\n% function w=War(m)\r\n% % Optimal truthful strategy\r\n% % Best lucky sequence\r\n%  w=0;\r\n% \r\n%  Nm=sort(m(1,:));\r\n%  Km=sort(m(2,:));\r\n%  \r\n%  Nmz=[Nm' ones(size(Nm,2),1)];\r\n%  Kmz=[Km' zeros(size(Km,2),1)];\r\n%  z=[Nmz;Kmz]; \r\n%  z=sortrows(z,-1);\r\n%  \r\n%  while ~isempty(z)\r\n%   ptr1=find(z(:,2)==1,1,'last');\r\n%   ptr0=find(z(1:ptr1,2)==0,1,'last');\r\n%   if isempty(ptr0)\r\n%    % score\r\n%    w=w+1;\r\n%    z(ptr1,:)=[];\r\n%    ptr0=find(z(:,2)==0,1,'last');\r\n%    z(ptr0,:)=[];  \r\n%   else\r\n%    z(ptr1,:)=[];\r\n%    z(ptr0,:)=[];  \r\n%   end\r\n%  end \r\n%  % Create worst Ken/B Scenario\r\n%  \r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% % Read whole array then parse\r\n% % dlmread valid for numeric arrays\r\n%  m=dlmread(fn);\r\n%  m(1,:)=[];\r\n%  for i=1:size(m,1)/3\r\n%   d{i}=m(3*i-1:3*i,1:m(3*i-2,1));\r\n%  end\r\n%  \r\n% end % read_file\r\n% Data Set file\r\n%4\r\n%1\r\n%0.5\r\n%0.6\r\n%2\r\n%0.7 0.2\r\n%0.8 0.3\r\n%3\r\n%0.5 0.1 0.9\r\n%0.6 0.4 0.3\r\n%9\r\n%0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n%0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-19T14:08:56.000Z","updated_at":"2014-04-19T15:00:47.000Z","published_at":"2014-04-19T15:00:47.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/2974486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Qualifier Deceitful War\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eMy condensed summary of the problem statement.\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\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\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\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\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\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\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\u003ePart one is determine the best possible score for A when playing deceitfully.\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\u003ePart two is determine the best possible score if player A did not look and is honest.\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\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[A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\\n\\nA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\\nDeceitful A Wins 8\\nOptimal Honest A Wins 4]]\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\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\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 Deceitful Wins, Optimal Honest Wins\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\u003eNote:\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\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error.\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://www.go-hero.net/jam/14/solutions/0/4/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Deceitful Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\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\"}]}"},{"id":1900,"title":"GJam 2014 China Rd A: Rational Number Tree (Large Values)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2924486/dashboard#s=p1 GJam 2014 China Rational Number Tree\u003e.\r\n\r\nThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the Large Challenge with a Max of 64 Tree levels. Processing of uint64 size data requires extra care.\r\n\r\nConsider an infinite complete binary tree where the root node is 1/1 and the left and right children of node P/Q are P/(P+Q) and (P+Q)/Q, respectively. \r\n\r\nThe Tree looks like:\r\n\r\n         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\r\n\r\n\r\nThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\r\n\r\n\r\n*Input:* [N] or [P,Q] where N is a uint64 integer node or [P,Q] (double) are terms of a Node\r\n\r\n*Output:* [P,Q](double) or [N](uint64) depends on Input type\r\n\r\n*Examples:*\r\n\r\n  [Input]  [Output]\r\n    [2] [1 2]\r\n    [1 2] [2]\r\n    [5] [3 2]\r\n    [3 2] [5]\r\n\r\n*Contest Performance:* Best Delta Time of 14 minutes with only 368 able to process the large data set in less than 3 hours.\r\n\r\n*Notes:*\r\n\r\n1) Matlab has issues with uint64 for dec2bin and matrix multiplies.\r\n\r\n2) Example of uint64 read is provided in test suite comments\r\n\r\n3) Bitshift and bitget work on uint64","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2924486/dashboard#s=p1\"\u003eGJam 2014 China Rational Number Tree\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the Large Challenge with a Max of 64 Tree levels. Processing of uint64 size data requires extra care.\u003c/p\u003e\u003cp\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right children of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\u003c/p\u003e\u003cp\u003eThe Tree looks like:\u003c/p\u003e\u003cpre\u003e         1/1\r\n    ______|______\r\n    |           |\r\n   1/2         2/1\r\n ___|___     ___|___\r\n |     |     |     |\r\n1/3   3/2   2/3   3/1\u003c/pre\u003e\u003cp\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [N] or [P,Q] where N is a uint64 integer node or [P,Q] (double) are terms of a Node\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [P,Q](double) or [N](uint64) depends on Input type\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e[Input]  [Output]\r\n  [2] [1 2]\r\n  [1 2] [2]\r\n  [5] [3 2]\r\n  [3 2] [5]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 14 minutes with only 368 able to process the large data set in less than 3 hours.\u003c/p\u003e\u003cp\u003e\u003cb\u003eNotes:\u003c/b\u003e\u003c/p\u003e\u003cp\u003e1) Matlab has issues with uint64 for dec2bin and matrix multiplies.\u003c/p\u003e\u003cp\u003e2) Example of uint64 read is provided in test suite comments\u003c/p\u003e\u003cp\u003e3) Bitshift and bitget work on uint64\u003c/p\u003e","function_template":"function vout=Tree_CH(v);\r\n  vout=0;\r\nend","test_suite":"%%\r\ntic\r\nv=[          2081355757           4898583766 ];\r\nvexp=[uint64(11412103587704585708) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        385960903003         298051413714 ];\r\nvexp=[uint64(13079621846505187505) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(15477096172227810860) ];\r\nvexp=[        188445238409         450375998772 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6473043965665514375) ];\r\nvexp=[        109230282567          33788952110 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(11270280438309969755) ];\r\nvexp=[         23328302733           8557676614 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6893018069           8719066441 ];\r\nvexp=[uint64( 1875942192845872366) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6566840053865194126) ];\r\nvexp=[         65441249939          85425641391 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         21562167101          16520535073 ];\r\nvexp=[uint64(  956959952027690353) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          1684200303           7336396097 ];\r\nvexp=[uint64(  871479491406563248) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2524835851416755114) ];\r\nvexp=[         28589000023          46221104912 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        154908421282         199691474905 ];\r\nvexp=[uint64( 7885684695614904270) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 8176570117722182781) ];\r\nvexp=[         40721598494          22123450931 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9379940828518631730) ];\r\nvexp=[         37341631466          63773070917 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        232141051889         328442531011 ];\r\nvexp=[uint64( 9972945692012784742) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9539984397959825908) ];\r\nvexp=[         70384313011         178968141063 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        421484284721         599703187188 ];\r\nvexp=[uint64(17162693345262485798) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        127506314007          35528864794 ];\r\nvexp=[uint64( 4167185002280551319) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         11313093168          21049073135 ];\r\nvexp=[uint64(16014443480831614722) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 7450646608300783266) ];\r\nvexp=[         83429116694         148768825269 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(13305041571212833467) ];\r\nvexp=[         77301627056          27774083789 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(13635447149676152154) ];\r\nvexp=[         90797761304         143479563807 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(11002893257806672560) ];\r\nvexp=[         44637053272         195624712811 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(11051724027090761936) ];\r\nvexp=[         41361095819         189799709732 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16687200783289968235) ];\r\nvexp=[        552258283575         209936061221 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         54164851566         156315474505 ];\r\nvexp=[uint64(13714337615447966724) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 7329431770178715643) ];\r\nvexp=[         13299036287           4535592331 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16479631524350748877) ];\r\nvexp=[        165234451641          96812407705 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6965988866158891263) ];\r\nvexp=[         21216614218           2585039947 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2910455928437551420) ];\r\nvexp=[          6642417815          14808129701 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         13173276049          27570716815 ];\r\nvexp=[uint64( 4977980945016614908) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16721022657493559975) ];\r\nvexp=[         65473107451          19359384006 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         16946040975          10725070912 ];\r\nvexp=[uint64( 6003309882203701925) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2198342485367409266) ];\r\nvexp=[         23006488657          39032588924 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        120013217139          50302005308 ];\r\nvexp=[uint64(14344732783514005715) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         57191814347          77886936688 ];\r\nvexp=[uint64( 8056110860202858614) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  971778736353519486) ];\r\nvexp=[         17760921544          20384041659 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        129560016431         165770554719 ];\r\nvexp=[uint64(15111464173338859822) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(17855284157674478998) ];\r\nvexp=[        215281025997         298483051015 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          8822618162           5678585885 ];\r\nvexp=[uint64( 4934822377188433797) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  632138406214928188) ];\r\nvexp=[          1835073727           4084131059 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(17330627945660580534) ];\r\nvexp=[         41195382388          56325602793 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6130953526          13549540271 ];\r\nvexp=[uint64( 1896894898836571068) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         25774822611          36694510870 ];\r\nvexp=[uint64(15996304402734859814) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9847540446768144862) ];\r\nvexp=[         31041969169          37560295989 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16612432143632526945) ];\r\nvexp=[         74531365158          60753898717 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(18413647273680019461) ];\r\nvexp=[         10651217970           6995653927 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         62279662838          47373225825 ];\r\nvexp=[uint64( 9640047776936252913) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16583979163800903818) ];\r\nvexp=[        114249431453         187605944484 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          9050571726           1557293089 ];\r\nvexp=[uint64( 9060257062169994207) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(12613321696385576431) ];\r\nvexp=[        125835757545          26079146381 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         35625689704          19896848117 ];\r\nvexp=[uint64( 4411487194398480861) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3484689439967270015) ];\r\nvexp=[         38461243033           5285269728 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         16085645428          43823408873 ];\r\nvexp=[uint64(  894482490922679460) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(12060487473657709988) ];\r\nvexp=[        250877787515         682594856898 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        143931327293          76531069545 ];\r\nvexp=[uint64(12786697318005254653) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(14215963369683634045) ];\r\nvexp=[        100316121935          54160354223 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6557653153          12053301655 ];\r\nvexp=[uint64(  343376420813762434) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         47494216762         112901758075 ];\r\nvexp=[uint64( 3772080181899583404) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6766488059228584288) ];\r\nvexp=[          8189923863          44106320581 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         41526542352          17027036567 ];\r\nvexp=[uint64(17583140790467836275) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          7196361275           6496875429 ];\r\nvexp=[uint64( 6443574928762444801) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(17365843048376429107) ];\r\nvexp=[         18457341831           7658711707 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         78140576077          33767545674 ];\r\nvexp=[uint64( 6098897546038113251) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          6734445697          12144787423 ];\r\nvexp=[uint64( 4770215408132554690) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        426726665699         126968827572 ];\r\nvexp=[uint64(12995540462042527271) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 5523416580603863552) ];\r\nvexp=[          4255700693          41585972826 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3928457774057619184) ];\r\nvexp=[          3877602413          16306596859 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        136097916108          28801327007 ];\r\nvexp=[uint64( 5984770176263773551) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(16263054952801281548) ];\r\nvexp=[         14189368539          34874268638 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        662028875555         839442017139 ];\r\nvexp=[uint64(11859750004469197678) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         61393402621         332298132605 ];\r\nvexp=[uint64( 7879625004656522848) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          1998630709           8715852076 ];\r\nvexp=[uint64(  429234479783941040) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         46021740257          21715449429 ];\r\nvexp=[uint64(14347105153381215235) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  498971859648614985) ];\r\nvexp=[         30472124134          22307121041 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6396162213707057064) ];\r\nvexp=[         26683188512          96283024611 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         46925294325          33937979441 ];\r\nvexp=[uint64( 1189627028589296041) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         76315837293          99424320902 ];\r\nvexp=[uint64(11656949174638158734) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         81880058662          38464981613 ];\r\nvexp=[uint64( 7071867154613101059) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(10763027175299443277) ];\r\nvexp=[        330973468653         194345162402 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         79087591419          23535674032 ];\r\nvexp=[uint64(15017024826981320231) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        241564818347         155909390759 ];\r\nvexp=[uint64(15575297637481852549) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         45079186819         295776092742 ];\r\nvexp=[uint64(16532545499676710720) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[         22268771423          34477255167 ];\r\nvexp=[uint64(11007510539515659130) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 5666822869473456046) ];\r\nvexp=[         28640204779          36488487629 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(14041232599151835393) ];\r\nvexp=[         28442192536          25169506635 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 9611808239041397120) ];\r\nvexp=[          1055826287           7876555270 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        358405360794         498368744795 ];\r\nvexp=[uint64( 4955841772239017238) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3979638765694296062) ];\r\nvexp=[          6903410593           7465748396 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        151761015812         211325030677 ];\r\nvexp=[uint64( 7987025462351843862) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        325266071703          87446899892 ];\r\nvexp=[uint64(16944641327505127607) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 3273057505586617135) ];\r\nvexp=[        124425395619          27124979723 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        142722642746          60293518411 ];\r\nvexp=[uint64(10857549622062058131) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        379488415355         462240655923 ];\r\nvexp=[uint64(16693497308621268574) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 5336487237226370963) ];\r\nvexp=[         76728175571          32349586492 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        366909173981         111494050923 ];\r\nvexp=[uint64(11044880014193584327) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 2767480983943234275) ];\r\nvexp=[        155407720950          67429662431 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[          4375152441          11923449250 ];\r\nvexp=[uint64(14458798758395123876) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[        107946470399          33010545783 ];\r\nvexp=[uint64(13708745226178508359) ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64(  546205200272961984) ];\r\nvexp=[          1773793574          11180737745 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\n%%\r\nv=[uint64( 6791165959744564855) ];\r\nvexp=[        125726750555          33307435529 ];\r\nvout=Tree_CH(v);\r\nassert(isequal(vout,vexp))\r\ntoc\r\n%%\r\n% Read of GJam 64 bit data\r\n% function z = read_input64(fn)\r\n%  fid=fopen(fn);\r\n%  u=textscan(fid,'%u64');\r\n%  fclose(fid);\r\n%  vptr=2; % skip Test case count \r\n%  dptr=1;\r\n%  while vptr\u003csize(u{1},1)\r\n%   if u{1}(vptr)==1 % single N\r\n%    z{dptr}=u{1}(vptr+1);\r\n%    vptr=vptr+2;\r\n%   else % Pair for p/q\r\n%    z{dptr}=[u{1}(vptr+1) u{1}(vptr+2)];\r\n%    vptr=vptr+3;\r\n%   end\r\n%   dptr=dptr+1;\r\n%  end\r\n% end\r\n%Typical GJam 64 bit data\r\n% 100\r\n% 2 2081355757 4898583766\r\n% 2 385960903003 298051413714\r\n% 1 15477096172227810860\r\n% 1 6473043965665514375\r\n% 1 11270280438309969755\r\n% 2 6893018069 8719066441\r\n% 1 6566840053865194126\r\n% 2 21562167101 16520535073\r\n% 2 1684200303 7336396097\r\n% 1 2524835851416755114\r\n% 2 154908421282 199691474905\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-09-29T03:53:20.000Z","updated_at":"2013-09-29T21:22:24.000Z","published_at":"2013-09-29T04:19:40.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/2924486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Rational Number Tree\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\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:t\u003eThe Goal is to determine the tree node if given [P,Q] or provide the [P,Q] if given a node. This is the Large Challenge with a Max of 64 Tree levels. Processing of uint64 size data requires extra care.\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\u003eConsider an infinite complete binary tree where the root node is 1/1 and the left and right children of node P/Q are P/(P+Q) and (P+Q)/Q, respectively.\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 Tree looks like:\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/1\\n    ______|______\\n    |           |\\n   1/2         2/1\\n ___|___     ___|___\\n |     |     |     |\\n1/3   3/2   2/3   3/1]]\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:t\u003eThe nodes are 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1,...\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 [N] or [P,Q] where N is a uint64 integer node or [P,Q] (double) are terms of a Node\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 [P,Q](double) or [N](uint64) depends on Input type\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\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[[Input]  [Output]\\n  [2] [1 2]\\n  [1 2] [2]\\n  [5] [3 2]\\n  [3 2] [5]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 14 minutes with only 368 able to process the large data set in less than 3 hours.\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\u003eNotes:\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\u003e1) Matlab has issues with uint64 for dec2bin and matrix multiplies.\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\u003e2) Example of uint64 read is provided in test suite comments\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\u003e3) Bitshift and bitget work on uint64\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\"}]}"},{"id":1942,"title":"GJam 2014 China Rd B: Party","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p1 GJam 2014 China Party\u003e. Small Case.\r\n\r\nThe Goal is determine the optimal Party House. Given a set of people to attend a party, select the home from this set that minimizes the total travel of people. People travel only NSEW, no diagonals, to reach the host's home. If multiple homes have equal distance then select the home with minimum X. If there are more than one with Min distance and equal Min X then choose the house with Min Y.\r\n\r\nThe input is an array that defines rectangles of partiers. One line of the array is [xmin,ymin,xmax,ymax]. Blocks do not overlap.\r\n\r\n\r\n*Input:* [M], Bx4 matrix (B\u003c=100). Total B area of \u003c=1000\r\n\r\n*Output:* [x,y,d] where [x,y] is Party House and d is everyone's total distance\r\n\r\n*Examples:*\r\n\r\n  M   [x y d]\r\n  [0 0 2 2] [1 1 12]\r\n  [-1 2 -1 2;0 0 0 0;1 3 1 3] [-1 2 6]\r\n\r\n \r\n*Contest Performance:* Best Delta Time of 16 minutes with 496 of 2010 able to process the small data set. The large data set was only achieved by 47 in the 3 hrs of contest duration.\r\n\r\n\r\n*Commentary:*\r\n\r\n  1) The small can be solved by brute force since fewer than 1000 points require evaluation.\r\n  2) The large case, which is giving me fits, has up to 1,000,000 points to evaluate.\r\n  3) Graphing the small case with surf gives some unexpected asymmetric results relative to the simple centroid.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p1\"\u003eGJam 2014 China Party\u003c/a\u003e. Small Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine the optimal Party House. Given a set of people to attend a party, select the home from this set that minimizes the total travel of people. People travel only NSEW, no diagonals, to reach the host's home. If multiple homes have equal distance then select the home with minimum X. If there are more than one with Min distance and equal Min X then choose the house with Min Y.\u003c/p\u003e\u003cp\u003eThe input is an array that defines rectangles of partiers. One line of the array is [xmin,ymin,xmax,ymax]. Blocks do not overlap.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], Bx4 matrix (B\u0026lt;=100). Total B area of \u0026lt;=1000\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e [x,y,d] where [x,y] is Party House and d is everyone's total distance\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eM   [x y d]\r\n[0 0 2 2] [1 1 12]\r\n[-1 2 -1 2;0 0 0 0;1 3 1 3] [-1 2 6]\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 16 minutes with 496 of 2010 able to process the small data set. The large data set was only achieved by 47 in the 3 hrs of contest duration.\u003c/p\u003e\u003cp\u003e\u003cb\u003eCommentary:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) The small can be solved by brute force since fewer than 1000 points require evaluation.\r\n2) The large case, which is giving me fits, has up to 1,000,000 points to evaluate.\r\n3) Graphing the small case with surf gives some unexpected asymmetric results relative to the simple centroid.\r\n\u003c/pre\u003e","function_template":"function [x,y,d]=Party_CH(p)\r\n x=0;\r\n y=0;\r\n d=0;\r\nend","test_suite":"%%\r\ntic\r\nzm=[0 0 30 30 ];\r\nvexp=[15 15 14880];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[0 0 29 29 ];\r\nvexp=[14 14 13500];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[0 1 0 100 ;0 -100 0 -1 ;-100 0 -1 0 ;1 0 100 0 ];\r\nvexp=[-1 0 20400];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[616 34 616 34 ;78 -828 78 -828 ;-762 -671 -762 -671 ;-199 -960 -199 -960 ;427 -575 427 -575 ;448 798 448 798 ;-819 -939 -819 -939 ;852 -564 852 -564 ;-145 281 -145 281 ;694 828 694 828 ;-278 963 -278 963 ;47 813 47 813 ;-393 24 -393 24 ;198 -257 198 -257 ;-393 -177 -393 -177 ;596 237 596 237 ;-678 760 -678 760 ;-180 92 -180 92 ;-590 995 -590 995 ;27 -946 27 -946 ;459 799 459 799 ;-491 -739 -491 -739 ;-691 -922 -691 -922 ;-38 185 -38 185 ;495 -471 495 -471 ;-850 532 -850 532 ;-360 798 -360 798 ;589 -104 589 -104 ;-492 -364 -492 -364 ;-797 415 -797 415 ;105 319 105 319 ;-879 -347 -879 -347 ;-795 172 -795 172 ;529 831 529 831 ;357 -199 357 -199 ;621 959 621 959 ;-475 125 -475 125 ;769 884 769 884 ;172 -706 172 -706 ;618 222 618 222 ;989 734 989 734 ;-273 478 -273 478 ;-548 930 -548 930 ;-634 889 -634 889 ;599 879 599 879 ;836 834 836 834 ;463 901 463 901 ;972 -903 972 -903 ;-319 495 -319 495 ;-727 -368 -727 -368 ;-685 -487 -685 -487 ;834 902 834 902 ;-114 -961 -114 -961 ;-984 193 -984 193 ;-388 867 -388 867 ;712 232 712 232 ;-750 19 -750 19 ;855 -455 855 -455 ;857 996 857 996 ;493 -722 493 -722 ;-582 426 -582 426 ;-824 848 -824 848 ;479 -993 479 -993 ;-976 -820 -976 -820 ;208 443 208 443 ;919 745 919 745 ;-460 -548 -460 -548 ;375 556 375 556 ;-572 980 -572 980 ;345 -411 345 -411 ;-275 613 -275 613 ;718 -895 718 -895 ;-838 -892 -838 -892 ;-241 836 -241 836 ;336 -878 336 -878 ;891 -355 891 -355 ;-986 989 -986 989 ;629 856 629 856 ;-779 787 -779 787 ;970 711 970 711 ;-578 -163 -578 -163 ;779 735 779 735 ;572 -203 572 -203 ;237 192 237 192 ;-427 -213 -427 -213 ;-338 9 -338 9 ;-905 45 -905 45 ;64 -35 64 -35 ;476 -560 476 -560 ;-370 24 -370 24 ;-836 487 -836 487 ;53 50 53 50 ;540 -897 540 -897 ;-179 -8 -179 -8 ;-979 227 -979 227 ;528 257 528 257 ;-876 615 -876 615 ;-342 -895 -342 -895 ;802 -744 802 -744 ;-458 -395 -458 -395 ];\r\nvexp=[-38 185 110298];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[241 -635 241 -635 ;75 -432 75 -432 ;-522 -517 -522 -517 ;-589 -931 -589 -931 ;-903 447 -903 447 ;-555 757 -555 757 ;-584 19 -584 19 ;420 -458 420 -458 ;-127 517 -127 517 ;-417 158 -417 158 ;542 703 542 703 ;865 -531 865 -531 ;-592 -191 -591 -190 ;570 467 570 467 ;-326 -668 -325 -668 ;197 516 197 516 ;238 -442 239 -441 ;-339 -71 -338 -70 ;255 -450 256 -450 ;408 -232 409 -231 ;302 -765 303 -764 ;-575 687 -575 688 ;-352 -651 -351 -650 ;-483 -96 -483 -95 ;285 170 286 170 ;-349 -660 -348 -659 ;518 -419 518 -418 ;555 -506 556 -506 ;900 97 901 98 ;-969 -258 -969 -257 ;-514 -199 -513 -198 ;-422 -197 -422 -197 ;-852 -115 -852 -114 ;166 -651 166 -650 ;628 -930 629 -930 ;-53 853 -52 853 ;484 503 484 504 ;-912 -976 -911 -975 ;-386 -562 -386 -561 ;521 946 521 947 ;717 -799 718 -797 ;-463 -348 -461 -348 ;-14 167 -13 169 ;-346 -677 -344 -675 ;-675 176 -673 179 ;894 807 896 811 ];\r\nvexp=[-338 -71 136630];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[468 377 468 377 ;839 -105 839 -105 ;-871 487 -871 487 ;-307 651 -307 651 ;135 -929 135 -929 ;-411 -829 -411 -829 ;745 -64 745 -64 ;336 784 336 784 ;-875 -84 -875 -84 ;-723 -736 -723 -736 ;701 -818 701 -818 ;-239 210 -239 210 ;-15 614 -15 614 ;362 225 362 225 ;894 443 894 443 ;-352 -303 -352 -303 ;-287 254 -287 255 ;-739 -960 -739 -960 ;110 28 110 28 ;540 434 541 435 ;-103 -962 -102 -962 ;913 -274 913 -273 ;835 -730 836 -730 ;544 866 545 867 ;-97 -358 -96 -358 ;-490 -319 -490 -319 ;-122 700 -122 702 ;37 902 39 902 ;103 266 104 266 ;-581 -714 -579 -710 ];\r\nvexp=[-97 -358 62565];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[28 122 30 124 ;-85 -609 -83 -607 ;763 19 764 20 ;612 -204 613 -203 ;-521 792 -520 794 ;-782 193 -781 195 ;-662 149 -661 151 ;-561 -568 -559 -567 ;-190 -897 -189 -896 ;-725 -317 -723 -315 ;704 -957 706 -956 ;-329 -967 -328 -966 ;-564 -639 -563 -637 ;-603 -86 -601 -84 ;-165 548 -164 550 ;-197 -150 -195 -148 ;-379 -581 -377 -579 ;401 -684 403 -683 ;546 -194 548 -192 ;267 573 268 574 ;-634 288 -632 290 ;593 857 595 858 ;78 -240 80 -238 ;800 981 801 982 ;473 472 474 473 ;-894 469 -893 471 ;582 347 583 349 ;516 189 518 190 ;333 -865 335 -864 ;-192 507 -191 508 ;-310 534 -309 536 ;-783 -487 -781 -486 ;-915 -696 -914 -695 ;-57 872 -56 874 ;717 -423 718 -422 ;509 -810 510 -809 ;-186 -335 -184 -333 ;-403 629 -401 631 ;-598 104 -596 106 ;-149 -210 -147 -208 ;920 911 922 913 ;819 -934 821 -932 ;518 -328 520 -326 ;-630 429 -628 431 ;348 -766 350 -764 ;242 -300 244 -298 ;387 -191 389 -189 ;-19 -871 -17 -869 ;383 723 385 725 ;-742 -327 -740 -325 ;-181 -43 -179 -41 ;799 -46 801 -44 ;729 -373 731 -371 ;-863 -16 -861 -14 ;998 -444 1000 -442 ;242 962 244 964 ;-249 -412 -247 -410 ;116 -14 118 -12 ;871 -455 873 -453 ;669 492 671 494 ;877 -447 879 -445 ;990 -938 992 -936 ;43 522 45 524 ;-70 45 -68 47 ;808 8 810 10 ;-879 -310 -877 -308 ;979 79 981 81 ;-695 202 -693 204 ;-650 469 -648 471 ;690 -624 692 -622 ;-169 -43 -167 -41 ;-81 723 -78 726 ;-789 968 -787 970 ;-913 698 -912 701 ;-597 -970 -595 -968 ;693 -79 694 -77 ;41 847 43 849 ;39 -728 41 -725 ;422 470 425 473 ;-518 -883 -517 -880 ;-858 784 -855 786 ;-246 311 -245 312 ;194 -715 197 -712 ;-370 -868 -369 -865 ;377 174 380 176 ;-697 223 -694 225 ;-489 -957 -486 -955 ;-585 -164 -583 -162 ;-283 -880 -281 -878 ;-141 -729 -140 -728 ;835 447 838 450 ;-424 -612 -423 -610 ;-280 376 -276 377 ;-351 -393 -350 -392 ;-793 -436 -788 -434 ;-548 -180 -547 -175 ;826 775 831 778 ;-664 -604 -658 -602 ;987 -65 988 -57 ;-540 -796 -533 -795 ];\r\nvexp=[-167 -43 874364];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[-291 955 -289 956 ;276 -710 278 -708 ;-724 283 -722 285 ;-850 588 -848 589 ;625 -511 627 -509 ;-530 -994 -529 -993 ;-312 -655 -311 -654 ;86 -269 87 -267 ;565 -521 566 -520 ;438 320 440 321 ;-330 985 -328 986 ;-408 -942 -407 -940 ;755 792 756 794 ;847 -794 848 -793 ;436 -1 438 0 ;206 -637 208 -635 ;516 544 518 546 ;77 -200 78 -199 ;-618 276 -616 277 ;380 868 382 870 ;-664 284 -663 286 ;-526 929 -524 931 ;743 -555 745 -553 ;331 145 333 146 ;98 124 99 126 ;220 -661 222 -660 ;-92 498 -90 500 ;646 -552 647 -550 ;-531 -850 -529 -849 ;573 -80 574 -79 ;-317 299 -315 300 ;-963 713 -962 714 ;411 818 412 819 ;-99 -503 -97 -501 ;279 599 280 601 ;793 -237 794 -235 ;-41 -876 -39 -875 ;-550 -478 -549 -477 ;-107 820 -105 822 ;657 886 659 888 ;-460 684 -458 686 ;-80 455 -78 457 ;-779 -528 -777 -526 ;-829 719 -827 721 ;-760 -716 -758 -714 ;39 342 41 344 ;254 447 256 449 ;-272 -705 -270 -703 ;-900 507 -898 509 ;498 327 500 329 ;-669 168 -667 170 ;519 -367 521 -365 ;-674 323 -672 325 ;-724 519 -722 521 ;52 -596 54 -594 ;897 -724 899 -722 ;6 -387 8 -385 ;62 808 64 810 ;-84 -749 -82 -747 ;-475 -379 -473 -377 ;-467 -819 -465 -817 ;-130 232 -128 234 ;218 862 220 864 ;-206 339 -204 341 ;821 658 823 660 ;261 61 263 63 ;-704 869 -702 871 ;788 -490 790 -488 ;482 67 484 69 ;-328 -781 -326 -779 ;150 -117 152 -115 ;946 -90 948 -88 ;-68 477 -65 479 ;-704 915 -701 918 ;979 -761 980 -759 ;328 705 331 708 ;969 951 971 953 ;-638 991 -637 993 ;-621 120 -619 121 ;-546 651 -545 654 ;217 550 218 551 ;-743 196 -740 199 ;-591 847 -588 849 ;-48 -769 -46 -766 ;678 424 680 425 ;-250 268 -248 270 ;964 -389 966 -386 ;193 -818 195 -815 ;-803 107 -801 109 ;16 -725 19 -722 ;-721 -274 -720 -273 ;14 666 17 668 ;-822 933 -820 936 ;-895 -416 -894 -412 ;821 -329 824 -326 ;382 68 387 68 ;590 282 595 284 ;97 -310 103 -307 ;147 933 150 933 ;-772 -42 -765 -33 ];\r\nvexp=[-128 232 914624];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[-987 -105 -985 -103 ;-22 -655 -20 -653 ;-622 412 -621 414 ;-526 641 -524 642 ;-694 573 -692 575 ;268 -697 269 -695 ;366 544 368 545 ;648 218 649 220 ;314 443 316 445 ;-589 354 -588 355 ;60 544 62 546 ;21 -444 23 -442 ;175 -224 176 -223 ;-915 -696 -914 -695 ;-417 766 -415 767 ;-874 -599 -873 -598 ;606 921 607 922 ;-672 562 -671 564 ;-17 39 -16 40 ;-708 632 -707 633 ;823 -170 825 -168 ;996 -372 997 -371 ;961 -169 962 -167 ;572 577 573 579 ;53 345 55 347 ;569 453 570 454 ;716 753 718 754 ;-803 -873 -802 -872 ;-110 940 -108 942 ;-943 841 -941 842 ;186 997 187 999 ;-107 388 -105 390 ;193 -54 195 -52 ;-231 -916 -230 -914 ;-962 749 -960 750 ;794 -458 796 -457 ;259 -909 261 -908 ;-719 65 -718 67 ;242 -481 244 -479 ;-528 -223 -526 -221 ;283 955 285 957 ;-888 946 -886 948 ;847 -707 849 -705 ;757 -814 759 -812 ;-940 -941 -938 -939 ;2 -176 4 -174 ;665 -708 667 -706 ;656 170 658 172 ;494 949 496 951 ;994 802 996 804 ;-65 785 -63 787 ;147 684 149 686 ;-488 807 -486 809 ;-875 462 -873 464 ;-152 253 -150 255 ;114 247 116 249 ;760 -206 762 -204 ;-204 569 -202 571 ;89 -752 91 -750 ;-464 -975 -462 -973 ;-783 -545 -781 -543 ;75 -251 77 -249 ;471 -462 473 -460 ;-126 -169 -124 -167 ;-311 615 -309 617 ;-398 -727 -396 -725 ;834 -915 836 -913 ;-87 -21 -85 -19 ;-301 918 -299 920 ;-740 -366 -738 -364 ;24 47 26 49 ;-929 -761 -927 -759 ;-863 -36 -861 -33 ;541 604 543 606 ;-279 -423 -276 -422 ;-620 -116 -619 -114 ;-145 571 -143 573 ;-638 133 -636 136 ;-885 546 -882 549 ;-625 -11 -622 -8 ;-610 -369 -609 -367 ;80 -655 83 -652 ;-398 -183 -395 -182 ;-71 -953 -69 -951 ;-767 939 -766 942 ;-763 -362 -760 -360 ;46 -897 47 -895 ;23 -437 25 -436 ;550 -440 553 -439 ;-660 178 -658 182 ;851 -919 853 -917 ;124 437 125 438 ;-414 -524 -411 -520 ;881 797 884 799 ;-73 -303 -68 -301 ;-373 -585 -369 -584 ;-239 963 -237 968 ;453 965 456 968 ;-742 875 -738 877 ;-894 -954 -884 -944 ];\r\nvexp=[-126 -168 1055075];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[-648 -872 -646 -871 ;739 270 741 272 ;-847 -333 -845 -331 ;-510 -174 -508 -173 ;182 -353 183 -352 ;-573 277 -571 278 ;297 245 299 247 ;-223 818 -221 819 ;886 57 887 58 ;888 -773 889 -772 ;-593 513 -591 514 ;-587 -107 -585 -106 ;-564 40 -563 41 ;234 -624 236 -622 ;-82 902 -81 903 ;222 851 223 852 ;-726 476 -724 478 ;-392 -160 -390 -158 ;-153 -484 -152 -483 ;-522 -962 -520 -960 ;66 -926 68 -925 ;-535 28 -534 29 ;-603 -292 -602 -291 ;-981 -471 -980 -469 ;-367 865 -365 867 ;-445 -75 -443 -73 ;300 -40 301 -38 ;-329 -287 -328 -286 ;554 935 556 936 ;593 -932 594 -930 ;206 873 208 875 ;335 574 336 575 ;296 154 298 155 ;323 -423 325 -422 ;-144 472 -143 474 ;-284 211 -282 213 ;-289 -996 -287 -994 ;167 574 168 575 ;65 803 67 805 ;264 173 266 175 ;-820 -637 -818 -635 ;-897 813 -895 815 ;60 -524 62 -522 ;652 850 654 852 ;-837 57 -835 59 ;31 -96 33 -94 ;-607 540 -605 542 ;-240 794 -238 796 ;386 453 388 455 ;-421 -468 -419 -466 ;-838 -196 -836 -194 ;248 -366 250 -364 ;7 -933 9 -931 ;578 742 580 744 ;-634 -828 -632 -826 ;678 16 680 18 ;706 -163 708 -161 ;228 771 230 773 ;-440 -564 -438 -562 ;228 -606 230 -604 ;-361 652 -359 654 ;-608 -741 -606 -739 ;-926 42 -924 44 ;984 147 986 149 ;-132 -334 -130 -332 ;492 870 494 872 ;-470 523 -468 525 ;440 983 442 985 ;-68 -14 -66 -12 ;652 970 654 972 ;-591 -410 -589 -408 ;-252 -573 -250 -571 ;-639 -424 -637 -421 ;-306 -234 -303 -231 ;-720 81 -718 83 ;-645 845 -642 846 ;-938 507 -936 508 ;646 122 648 125 ;-76 864 -73 867 ;777 -142 778 -141 ;267 -756 269 -755 ;-151 -11 -150 -10 ;-568 -929 -567 -926 ;753 -830 756 -828 ;-205 -663 -202 -661 ;329 368 330 369 ;-402 -682 -399 -679 ;-649 463 -647 465 ;995 538 999 539 ;107 817 111 818 ;-546 -441 -544 -437 ;-856 920 -854 921 ;-587 -483 -584 -479 ;717 -641 719 -639 ;-892 -134 -890 -132 ;-300 -887 -296 -883 ;605 -228 607 -224 ;-93 -994 -90 -994 ;-421 -56 -414 -50 ;76 -592 80 -583 ];\r\nvexp=[-303 -231 855861];\r\n[x y d]=Party_CH(zm);\r\nv=[x y d];\r\nassert(isequal(v,vexp))\r\ntoc\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-18T01:44:26.000Z","updated_at":"2013-10-18T02:33:24.000Z","published_at":"2013-10-18T02:33:24.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/2929486/dashboard#s=p1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Party\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Small Case.\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 Goal is determine the optimal Party House. Given a set of people to attend a party, select the home from this set that minimizes the total travel of people. People travel only NSEW, no diagonals, to reach the host's home. If multiple homes have equal distance then select the home with minimum X. If there are more than one with Min distance and equal Min X then choose the house with Min 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:t\u003eThe input is an array that defines rectangles of partiers. One line of the array is [xmin,ymin,xmax,ymax]. Blocks do not overlap.\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 [M], Bx4 matrix (B\u0026lt;=100). Total B area of \u0026lt;=1000\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 [x,y,d] where [x,y] is Party House and d is everyone's total distance\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\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[M   [x y d]\\n[0 0 2 2] [1 1 12]\\n[-1 2 -1 2;0 0 0 0;1 3 1 3] [-1 2 6]]]\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\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 16 minutes with 496 of 2010 able to process the small data set. The large data set was only achieved by 47 in the 3 hrs of contest duration.\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) The small can be solved by brute force since fewer than 1000 points require evaluation.\\n2) The large case, which is giving me fits, has up to 1,000,000 points to evaluate.\\n3) Graphing the small case with surf gives some unexpected asymmetric results relative to the simple centroid.]]\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:\"gjam\"","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:\"gjam\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"gjam\"","","\"","gjam","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fac444174e8\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fac44417448\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fac44416b88\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fac44417768\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fac444176c8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fac44417628\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fac44417588\u003e":"tag:\"gjam\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fac44417588\u003e":"tag:\"gjam\""},"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":"search","password":"J3bGPZzQ7asjJcCk","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:\"gjam\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"gjam\"","","\"","gjam","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fac444174e8\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fac44417448\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fac44416b88\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fac44417768\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fac444176c8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fac44417628\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fac44417588\u003e":"tag:\"gjam\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fac44417588\u003e":"tag:\"gjam\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":1875,"difficulty_rating":"easy"},{"id":44075,"difficulty_rating":"easy"},{"id":44078,"difficulty_rating":"easy-medium"},{"id":1916,"difficulty_rating":"easy-medium"},{"id":44074,"difficulty_rating":"easy-medium"},{"id":1894,"difficulty_rating":"easy-medium"},{"id":42780,"difficulty_rating":"easy-medium"},{"id":1913,"difficulty_rating":"easy-medium"},{"id":2186,"difficulty_rating":"easy-medium"},{"id":1902,"difficulty_rating":"easy-medium"},{"id":42778,"difficulty_rating":"easy-medium"},{"id":1893,"difficulty_rating":"easy-medium"},{"id":42777,"difficulty_rating":"easy-medium"},{"id":44079,"difficulty_rating":"easy-medium"},{"id":44076,"difficulty_rating":"easy-medium"},{"id":2260,"difficulty_rating":"easy-medium"},{"id":2262,"difficulty_rating":"easy-medium"},{"id":1730,"difficulty_rating":"easy-medium"},{"id":42806,"difficulty_rating":"easy-medium"},{"id":42805,"difficulty_rating":"easy-medium"},{"id":1934,"difficulty_rating":"easy-medium"},{"id":42769,"difficulty_rating":"easy-medium"},{"id":44077,"difficulty_rating":"easy-medium"},{"id":1903,"difficulty_rating":"easy-medium"},{"id":1915,"difficulty_rating":"easy-medium"},{"id":1901,"difficulty_rating":"medium"},{"id":2264,"difficulty_rating":"medium"},{"id":1944,"difficulty_rating":"medium"},{"id":44082,"difficulty_rating":"medium"},{"id":42290,"difficulty_rating":"medium"},{"id":42291,"difficulty_rating":"medium"},{"id":1732,"difficulty_rating":"medium"},{"id":2324,"difficulty_rating":"medium"},{"id":2325,"difficulty_rating":"medium"},{"id":1876,"difficulty_rating":"medium"},{"id":1883,"difficulty_rating":"medium"},{"id":1881,"difficulty_rating":"medium"},{"id":1897,"difficulty_rating":"medium"},{"id":42779,"difficulty_rating":"medium"},{"id":42782,"difficulty_rating":"medium"},{"id":1914,"difficulty_rating":"hard"},{"id":42774,"difficulty_rating":"unrated"},{"id":2291,"difficulty_rating":"unrated"},{"id":1900,"difficulty_rating":"unrated"},{"id":1942,"difficulty_rating":"unrated"}]}}