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

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

So, I was looking at the editorial of 167E - Wizards and Bets, It askes us to find total number of simple paths from every node (with indegree zero) to every node (with outdegree zero). How do we solve this ?. Also can we solve for any given directed graph the total number of simple paths b/w every pair of nodes in polynomial time ?

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

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

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

I was trying to solve this number theory problem from 2012-2013 ACM-ICPC, NEERC, Western Subregional Contest. The problem name is L : sum. In this problem we given a number N and we want K(any K that works) natural numbers such that their sum is N and sum of their reciprocal is 1. How to solve this ? I tried various approaches but wasn't able to generalize for all N.

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

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

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

I was solving this problem https://www.codechef.com/problems/COVERING and sort of came with a subproblem which I am not sure if it helps to solve the original problem but seems very interesting anyways.

Given an array A and array B with size (2^N) . Compute another array X of size (2^N) such that

X[mask] = sum of (A[i] * B[j]) such that ( (i&j) == mask ) .

How can one solve this for N <= 20 .

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

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

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

I am implementing an ordered multiset but I am not able to erase elements from it . https://ideone.com/pnx4R3 From above code, after erasing the number of elements shown are same as without erasing .

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

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

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

What are some strategies to give team contest during pandemic when team members are not present at a single location ?

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

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

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

How to solve the following problem ? Given an array of size N having integer elements A[1], A[2] , …, A[N] find the maximum value of ( (A[1] xor X) + (A[2] xor X) + (A[3] xor X)+ … + (A[N-1] xor X) + (A[N] xor X) ) for some X belonging to [L,R] . constraints- N <= 100000, 1 <= A[i], L, R <= 1000000000 . A good follow up ques to try is https://www.codechef.com/problems/CHANDF

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

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

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

I have been trying to solve this problem for a while now but made no progress. Can anybody help with TRENDGCD — Trending GCD at spoj.it is related to mobius function. here is link to the problem https://www.spoj.com/problems/TRENDGCD/

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

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