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

Автор Abhibansal53, история, 9 лет назад, По-английски

Given two arithmetic sequences (a1,d1 i.e. first term and common difference of first sequence and similarly a2,d2),what is the best algorithm to tell whether they have any common term,and if yes then tell the lowest one.

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

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

Автор Abhibansal53, история, 9 лет назад, По-английски

Can anybody please explain me the following part of this Solution:- int t = H[h][l].second ^ H[h][r].second; bool ok = t — (t & -t); if(!ok) printf("Yes\n"); else printf("No\n");

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

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