Want small test case when my logic fails for "Bear and Different Names(codeforces)" problem?

Правка en1, от codeDominus, 2017-03-22 16:38:19

link to problem

I solved the problem using DSU; My logic: let suppose there is two disjoint set of size M and N where each member is a friend of every other in the set. now suppose one member of 1st set become friend of a member of 2nd set. we need total of m*n such friendship for every member of 1st set to become friends with every other member of 2nd set.

is there any mistake in my logic ?(posting me solution just for logic not for debugging)

my solution

thanks in advance

Теги dsu

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский codeDominus 2017-03-22 16:38:52 27
en1 Английский codeDominus 2017-03-22 16:38:19 693 Initial revision (published)