i was trying to solve this problem , http://mirror.codeforces.com/problemset/problem/515/B and i was confused in the part of determining how many days i need to make sure that i make complete test for all friends i think it is confusing part because i see many different formulas n*m*2 , m*m , ( n+m )*n*m ! can any one simply explain it to me ?