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

Binary matrix 2

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of binary matrices having $n$ rows and $m$ columns that each row and each column have at least one number $1$. ### Input - A single line contains 2 integers $n, m$. ### Output - Print the answer, modulo $998244353$. ### Constraints - $1 \le n \times m \le 10^9$. ### Example Input: ``` 2 3 ``` Output: ``` 25 ```
Inclusion-exclusion principle
Divisibility
Divisibility 2
Coprime query
GCD pairs counting
Good string pairs
Permutation problem
Restricted equation
Moving through matrix
Restricted equation 2
Binary matrix 2
Permutation Counting 2
Topic
Math
Combinatorics
Rating 1900
Solution (2) Solution