|
|
back to boardWhat is the answer for this test? Posted by Al.Cash 18 Aug 2008 20:42 Test: [[], [], []] I think it would help to understand the problem correctly. Re: What is the answer for this test? Answer is 5 Re: What is the answer for this test? Posted by Al.Cash 23 Aug 2008 15:10 Thank you very much! And what is the problem with test 6? Can there be such test: [[[], []], []] ? Re: What is the answer for this test? No, this test is incorrect: "You may assume that the given string will be a string representation of multidimensional array with constant dimensions created with the construction new Object[a1][a2]…[an][0]." Re: What is the answer for this test? Posted by Al.Cash 23 Aug 2008 15:55 Ok, I thought such too. But what is test 6? I've checked the case [] separately but still WA6. Re: What is the answer for this test? In 6th test depth of array is 1 ([[],[],...,[]]) Test 6 Posted by Al.Cash 24 Aug 2008 14:33 Here are some answers that my program gives for one-dimensional array. Tell me please if there's something wrong. 1: 1 2: 2 3: 5 4: 15 5: 52 6: 203 7: 877 8: 4140 9: 1133 10: 5898 11: 8101 12: 650 13: 5103 14: 5790 15: 1152 16: 1180 17: 4974 18: 6383 19: 1559 20: 1717 ... 500: 4577 501: 5142 502: 5160 503: 8549 504: 2721 505: 741 506: 7306 507: 3247 508: 7975 509: 5867 510: 7816 511: 4696 512: 1512 Re: Test 6 Looks correct. Check your parser perhaps... Edited by author 09.09.2008 08:47 Re: Test 6 Posted by Al.Cash 20 Jan 2009 13:33 AC at last!!! Very stupid mistake in logic. This test helped me to avoid WA6: [[[[], []], [[], []]], [[[], []], [[], []]], [[[], []], [[], []]]] Answer: 3096 Edited by author 18.04.2009 00:38 |
|
|