2013年3月2日 星期六

TCO 2012 Round 3B - TopCoder Wiki

TCO 2012 Round 3B - TopCoder Wiki:

對於CrossingTheRiver這題,
我嘗試去寫,卻一直Time Limit Exceed(超過2 seconds),
最後只好上網看解答…
我把我的TLE code貼在Ideone上:

看了AC code,原來我根本搞錯題意了,

這題的Blocks似乎不一定要擺完,
只要Blocks有辦法填滿Depth就可以直接過去了。 
CrossingTheRiver cr;
int my[] = {3, 3, 3, 3, 3, 4};
vector c(my, my + sizeof(my) / sizeof(int));
//AC code is possible, but my code is impossible.

沒有留言:

張貼留言

個人合成作品