Блог пользователя ask_1171

Автор ask_1171, 11 лет назад, По-английски

Sometimes i wish to see the only the standings of the participants from my country. Is the any option in codeforces to do it ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +33
  • Проголосовать: не нравится

Автор ask_1171, 12 лет назад, По-английски

   Is there any place in codeforces where the contest editorials can be found in a organized way ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор ask_1171, 13 лет назад, По-английски


I tried to solve this problem. But may be not getting it right... I believe my algo is very close to correcrt.. Any suggestion would be highly appreciated...

This is what i did.


//mapped all the 12 sticks to  bit of mask
//ith bit in mask  represents the stick is not removed  if 0 , and removed if 1


bool iswin(mask,mouse,cheese)
{
      // checked weather the mouse is reachable to cheese in present mask condition using dfs
      if(reachable)
          return false..

      flag = 0;
      
      for(i=0;i<12;i++)
       {
if(!(mask&(1<<i)))   // checked if the ith stick is already removed or not... if not it goes to next step..
                  {
                       if(!iswin(mask|(1<<i))) // checks is it a loosing position if ith stick is removed by the player..
                          {
                                flag=1;      // if he gets a reachable loosing position ...he is in winning position for sure....
                                break;
                          }
                  }
       } 

       return flag;
}

if SOHA is in winning position he is the winner else it is TARA

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится