oj注意事项

Couple things to remember:

  1. Remove all the test codes before submit it. This sounds silly but I've done it couple of times.
  2. Read the problem statement carefully, as some of them are vague intentionally. e.g. In the poker hands one, it doesn't say duplicate cards are not valid.
  3. Don't worry too much about the time efficiency and memory cost. If the algorithm is right (using backtracking instead of brute-forcing), you will have an answer within the time limit (3 sec). The memory limit is usually quite large, as long as you are not running into a dead loop and forcing the computer to malloc a gigantic array every time, it's fine. This is not an optimization competition, so too much thinking about that could be real harm. (Not to mention UVA has the O2 flag on when compiling the code.)
posted @ 2011-08-23 14:04  天堂一梦  阅读(291)  评论(0编辑  收藏  举报