Skip to content

Instantly share code, notes, and snippets.

@Vicfred
Created March 17, 2025 08:21
Show Gist options
  • Select an option

  • Save Vicfred/fb43f20186f418bb71eda606b2c012b2 to your computer and use it in GitHub Desktop.

Select an option

Save Vicfred/fb43f20186f418bb71eda606b2c012b2 to your computer and use it in GitHub Desktop.
types of input in competitive programming
  • read an integer N
  • read a string N
  • read an integer N in one line then read N spaces separated integers in the following line
  • read 2 or more integers in a line and assign them to individual variables
  • read integers N and M in the first line then read M pairs (graph problem)
  • read integers N and M in the first line and then read a NxM matrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment