Блог пользователя hpfdf

Автор hpfdf14 месяцев назад, По-английски
You're given matrices A and B, in which the elements are either 0 or 1.
The task is to determine whether A can change into B via swapping it's rows and columns.

How to solve this question...?

Полный текст »

 
 
 
 

Автор hpfdf19 месяцев назад, По-английски
There are N integers, in range [0, M).
Select 2 distinct integers (p and q) from them, and maximize:

1. p OR q
2. p AND q
3. p XOR q
4. p NOR q

NOTE: M can be very large, so please take simple operating into efficient consideration. i.e. It takes O(logM) time to compute (p OR q)

Can anyone come out with solutions less than O(N^2logM) ?

Полный текст »

 
 
 
 
  • Проголосовать: нравится  
  • +1
  • Проголосовать: не нравится