report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Binary matrix - MarisaOJ: Marisa Online Judge

Binary matrix

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of binary matrices having $n$ rows and $m$ columns that each row has at least one number $1$ and each column has at least one number $0$. ### Input - A single line contains 2 integers $n, m$. ### Output - Print the answer, modulo $10^9+7$. ### Constraints - $1 \le n, m \le 10^9$. ### Example Input: ``` 2 3 ``` Output: ``` 12 ```
Introduction to combinatorics
Binomial coefficient
Fork and knife
Binomial coefficient 2
Equation
Array rearrangement
Value of subsequences
Inequation
Growing mushrooms
Binary matrix
Broken board
Triangles counting
Minecraft graph
Restricted path
Heavenly Peach Garden
Topic
Math
Combinatorics
Rating 1600
Solution (1) Solution