This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/README.md
2020-06-02 20:42:04 -07:00

5.5 KiB
Raw Blame History

Stuff

Italics = mostly appears in higher divisions but still good to learn

Intro

  • Assumed Prerequisites
    • first half of AP Computer Science A
    • for loops, ifs
  • Containers
    • Arrays (C++11)
    • Vector / ArrayList
    • C++ pairs
    • Structs?
  • What is Competitive Programming?
    • how to practice, debug
    • good practices for contests
    • contest format
  • Introduction to Contests
    • format
    • plenty of examples involving file I/O
    • submitting, verdicts
  • Introductory Problems

Bronze

  • Rectangle Geometry :o
    • see book ch 7
    • ex. Billboard
    • usually just loop over 2D array
  • Simulation
  • Brute Force (Complete Search)
    • CPH 5.1, 5.2, 5.3
    • try all possibilities
    • ex. Tracing
    • iterating through permutations
      • next_permutation
      • generating recursively
    • subsets with bitwise operations??
      • not sure when this is applicable
  • "Observation"
    • actually have to think a bit :D
    • ex. Mad Scientist
    • usually considered to be silver?

Silver

  • Greedy
    • CPH 6
  • Containers from C++ standard template library (STL)
    • CPH 4
    • Linear
      • Queues / Deques
      • C++ Lists?
      • Linked List
      • Stacks
    • Log
      • Priority Queues
      • BST / TreeSet / TreeMap (Python doesnt have log n map)
      • Sets / Maps
      • Multiset (F FOR JAVA) (just teach a workaround or smthn ig) TreeMap<value,numoccrances> (erase by value pitfall)
      • Custom comparator (prerequisite for basically all silver topics in Java)
    • HashSets / HashMaps
  • Sorting, Binary Search (BinSearch)
  • Two Pointers (2P)
  • Prefix Sums (Psum)
  • Graphs
    • CSAcademy Lessons
    • CPH 11, 12
    • Terminology
      • ex. bipartite graphs??
    • Flood Fill (FF)
      • finding the number of connected components in a graph
      • frequently on grid
      • Depth First Search (DFS)
    • Breadth First Search (BFS)
    • Disjoint Set Union (DSU)
      • no silver question should require either of the last two, but good to know
  • Permutations

Gold

  • Dynamic Programming (DP)
    • CPH 7
    • Knapsack
    • LIS
    • on tree?
    • Bitmasks??
    • Range DP???
  • Amortized Analysis?
    • CPH 8.2, 8.3
  • Graphs
    • Shortest Path (SP)
      • Dijkstra
      • Bellman-Ford
      • Floyd-Warshall
      • SPFA??
      • CPH 13
    • Lowest Common Ancestor (LCA)
      • CPH 14, 18?
      • hasnt been required aside from cowland
        • probably won't see a repeat of this
      • Milk Visits also mentions it
        • but no binary jumping required ...
    • Minimum Spanning Tree (MST)
    • Topological Sort (TopoSort)
  • 1D Range Queries (1DRQ)
    • mostly point update and sum query
    • ex. Haircut
  • Number Theory
    • Prime factorization, GCD, LCM
    • Modular Arithmetic
    • Fast Exponentiation
    • ex. Cow Poetry
  • Other
    • Bitset??
    • Combinatorics
      • Principle of Inclusion and Exclusion (PIE) once?
      • ex. Cowpatibility
    • Geometry
      • Cross product, dot product, geometry primitives (shoelace, etc.)
      • Sweepline
      • CPH 29, 30.1?
    • Strings
      • CPH 26.1, 26.2, 26.3
      • Hashing (once)?
      • Trie?