tag:blogger.com,1999:blog-29632375.post7429209764614392969..comments2023-06-19T19:45:40.281-07:00Comments on vexorian's blog: The trick: Resetting arrays in no time.Unknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-29632375.post-54775340513009953462011-11-13T05:26:35.716-08:002011-11-13T05:26:35.716-08:00Yes, that works too. Well enough actually. In my c...Yes, that works too. Well enough actually. In my case I had to keep overhead low, very low in the judge solution , because it is java and you don't want to go over 1s in it.<br /><br />At the end , the challenge case that ended bmerry's submission turned out to be very strong against meet in the middle, it is the only case in which my solution takes more than a second.vexorianhttps://www.blogger.com/profile/09588316922172217808noreply@blogger.comtag:blogger.com,1999:blog-29632375.post-12883183796670840372011-11-12T22:25:19.888-08:002011-11-12T22:25:19.888-08:00There is another trick for resetting the array whi...There is another trick for resetting the array which seems more appropriate for this problem. Since at each of the 21x21 iterations one only visits some (comparatively small) number of elements (otherwise the solution itself would time out), he could remember the indices of the visited elements and then nullify only them. This way the complexity stays exactly the same. This is not "in no time" any more, but I still felt it was worth mentioning.Anonymousnoreply@blogger.com