Tap here to switch tabs
Problem
Submissions

Problem: Count All Valid Pickup and Delivery Options

Count All Valid Pickup and Delivery Options asks for the number of event sequences for the given number of orders where every delivery follows its matching pickup, returned modulo a large prime.

Statement

Given an integer n representing the total number of orders, where each order consists of a pickup and a delivery service.

Find the number of all valid sequences of pickup and delivery events such that the delivery of the ii-th order always occurs after its corresponding pickup, for all 1≤i≤1 \le i \le n.

Since the total count may be very large, return the answer modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \le n ≤500\le 500

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count All Valid Pickup and Delivery Options

Count All Valid Pickup and Delivery Options asks for the number of event sequences for the given number of orders where every delivery follows its matching pickup, returned modulo a large prime.

Statement

Given an integer n representing the total number of orders, where each order consists of a pickup and a delivery service.

Find the number of all valid sequences of pickup and delivery events such that the delivery of the ii-th order always occurs after its corresponding pickup, for all 1≤i≤1 \le i \le n.

Since the total count may be very large, return the answer modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \le n ≤500\le 500