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

Автор I_Hate_Swaps, история, 2 года назад, По-английски

Given a Tree with n vertices(1 <= n <= 2e5) and all the vertices have some values assigned to them , we need to find the sum of xor of the paths between all the pairs of vertices. Can Anyone Please Help me in this problem..

If You can't help atleast don't downvote ^_^

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

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

Автор I_Hate_Swaps, 3 года назад, По-английски

Given two arrays a[n] , b[m] and q queries : In each query we have to update b[a[i]] to x for i = {l......r}

If not segment trees ,is there any efficient method to process such queries ?

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

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

Автор I_Hate_Swaps, история, 3 года назад, По-английски

Please help me to solve this problem :

Given an array A containing n non-negative integers, check if there exists any subsequence of length exactly equal to K such that its sum is atleast S

Constraints:

1<=n<=1e5

1<=k<=n

0<=A[i]<=1e9

0<=S<=1e11

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

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