code_tourist's blog

By code_tourist, history, 9 years ago, In English

In a party N people are invited. Some person can engage with some other person in party. You are given a matrix of 'Y' and 'N' . If the (i,j) is 'Y' then person i can engage with person j throughout the day and if (i,j) is 'N' then person i cannot engage with person j throughout the day. You have to find maximum number of people engaged in party.

Note : if a person is engaged with other person then he is engaged
whole day. he can't switch in between.

Ex.

N=4
N Y N N
Y N Y Y 
N Y N N
N Y N N  
Ans is = 2 because 2 nd person can engaged with one other person only  (2,1)
or (2,3) or (2,4)

Please help me with some ideas for this question .

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By code_tourist, history, 10 years ago, In English

Due to this I'm unable to submit at last minute and my solution was correct. I think there should be warning like %lld use. http://mirror.codeforces.com/contest/550/submission/11432538

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it