ACM Meeting Minutes 2007.11.05
From Computer Science Community
Notes on preparing for participating in programming contests:
Things to watch out for...
- Boundary conditions? → extremes
- Output format
- Excess/unnecessary data/information
- Overlaps — e.g., "he", "headache"
- Duplicates — e.g., with sorting
- Don't assume expected input regularity — e.g., example input may be in sorted order, but directions don't specify (don't assume)
- Runtime limit? → 1 or 2 minutes?
- Sometimes a crude algorithm is what you want — e.g., approximation method
- NCNA → 4 years ago ±? — Fence/max area problem
- Works on hard cases, but not on trivial cases — e.g., single character, 0
- User input validation
- User input and evaluation:
- What if I put the input data in another order?
- Reverse order?
- "Middle" order?
- E.g., numbers between 2 and 7: user may input "2 7" or "7 2"
- E.g., Don't assume integers for numerical input; may be of the Reals (use doubles)
- What if I put the input data in another order?
- Know: shortest path, traveling salesman
- Also know: linear algebra, geometry/trigonometry
- Java Classes: Hash tables, String, Regular expressions, BigInteger, BigDecimal, BigNumber, Array, Arrays, ArrayLists, Vectors, Math, Parser

