oj注意事项
Couple things to remember:
- Remove all the test codes before submit it. This sounds silly but I've done it couple of times.
- 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.
- 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.)