1359.cpp (218B)
1 class Solution { 2 public: 3 int countOrders(const int n) { 4 long res = 1, mod = (long)1E9 + 7; 5 for (int i = 1; i <= n; i++) 6 res = res * (i * 2 - 1) * i % mod; 7 return res; 8 } 9 };