Comments

I applied the same concept. However, I have missed some case. Can you let me know some easy test case so that I can figure out my mistake? I am getting WA in test case 3 (23rd token)

0

Nevermind, I understood what the issue was :)

0

Hi SevenDeadlySins, Can you let me know what's wrong with my approach? I am using the properties of & and| OR of two numbers is greater than or equal to the maximum of those two numbers. AND of two numbers is less than or equal to the minimum of those two numbers. so if I do AND of a[i] and the smallest element of B then I will essentially minimize each element of C. And this way we can minimize the OR of all elements of c

Thanks a lot :)

Hi, In the solution for problem B, simply adding a prince to the princess list doesn't ensure if that prince was already in her list or not. Shouldn't we first check if the prince was actually present in her original list or not?

Also, can you help me understand why for the 10th case in this 86899341 I am getting a wrong result? How is that answer not increasing the number of couples? @coder_pulkit_c

Thanks a lot :)

oh yeah! got it , thanks a lot

Hey giorgtarkha, Can you please help debug my code? I think you will get the logic when you read the code. 82855417

Thanks in advance :)

Cool, Thanks a lot :))

Hey Can you help me with this submission https://mirror.codeforces.com/contest/1360/submission/81362630 @darshancool25

What I am doing is, I am creating a 2D array of characters. I am going through each element. If I find a 1 I am checking if the right element or bottom element is 1 or not for cells that are not in the last row or last column. If that is not true I am printing no and breaking out of the loop.

For the cells of last row or last column (i.e r+1==n ||c+1==n) i am just continuing to the next cell I am really stuck with this . please help :)) Thanks in advance

I am following a basic algorithm for question B. But it fails to work for test case 2. Can someone find out the error in logic? 78991112

Let C be the largest coin , so we need to add c-b coins to make b=c and c-a to make a = c. hence in total we need c-a + (c-b)

69433414 for part A ,my code was running fine on IDE but didn't work on codeforces . Can someone suggest me some correction?