bhaag_milkha's blog

By bhaag_milkha, history, 9 months ago, In English,

Can some one help me on how to solve this problem?

Editorial is given in Japanese, i used google translater to understand it but some sentence doesn't make any sense to me and i couldn't understand solution from editorial.

Read more »

 
 
 
 
  • Vote: I like it
  • +10
  • Vote: I do not like it

By bhaag_milkha, history, 15 months ago, In English,

I made two submission for this problem with only one different line in which i was taking "OR" operation of two different bitset with different way

sub is array of bitset

  1. sub[s]=sub[s]|sub[a]

  2. sub[s]|=sub[a]

but first case cost me Segmentation fault for some test case and second case resulted AC.

Here are my submission 1 case and 2 case. only difference in the code is at line 51.

Does anyone know why this happened, because both the operation always give the same result, i know how both operator works but that shouldn't effect the result.

Those who can't watch my submission here is link on ideone 1 case 2 case

Thanks

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it