Problem Link: https://toph.co/p/keep-moving Solution Link: http://ideone.com/L7pxbT

My solve() method where I'm trying to implement dp is wrong. Any help to correctly implement the dp portion will be really appreciated.

# | User | Rating |
---|---|---|

1 | tourist | 3534 |

2 | LHiC | 3279 |

3 | moejy0viiiiiv | 3196 |

4 | ainta | 3174 |

5 | Petr | 3135 |

6 | Um_nik | 3098 |

7 | -XraY- | 3086 |

8 | W4yneb0t | 3068 |

9 | Merkurev | 3055 |

10 | I_love_Tanya_Romanova | 3037 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 177 |

2 | rng_58 | 171 |

3 | Petr | 160 |

4 | csacademy | 155 |

5 | Swistakk | 153 |

6 | Zlobober | 150 |

7 | GlebsHP | 148 |

8 | zscoder | 137 |

8 | Um_nik | 137 |

10 | cgy4ever | 134 |

10 | Xellos | 134 |

10 | matthew99 | 134 |

10 | Radewoosh | 134 |

10 | lewin | 134 |

Problem Link: https://toph.co/p/keep-moving Solution Link: http://ideone.com/L7pxbT

My solve() method where I'm trying to implement dp is wrong. Any help to correctly implement the dp portion will be really appreciated.

Link: https://uva.onlinejudge.org/external/129/12998.pdf

I was thinking of solving using euler tour technique (link: http://ideone.com/OEoGL2) but I'm not getting how to update the nodes correctly. Any hints on how to solve this problem will be really appreciated. Thanks in advance.

Problem: http://www.spoj.com/problems/ADACLEAN/ Solution: http://ideone.com/TracEP Verdict: Wrong Answer

I just learned about hashing and tried to solve this problem using the technique. My idea is I will pre-process _hash array with the hash values and afterwards I will just extract hashes of all the k-length strings and keep that in a map. Afterwards, I just output the size of the map. Any help to identify my mistake is really appreciated.

Problem Link: https://uva.onlinejudge.org/external/125/12546.pdf

I understand that LCM is a multiplicative function. So, for the case where n = 6, it should be like f(6) = f(2) * f(3), f(2) = (1 + 2) + (2 + 2) = 7, f(3) = (1 + 3) + (3 + 3) = 10, therefore f(6) = f(2) * f(3) = 7 * 10 = 70. But this is the wrong answer. Someone please help me out to figure out the right solution. Any help is really appreciated.

What are some recommended problems from Kattis online judge?

Problem link: http://www.spoj.com/problems/PATULJCI/

Solution link: http://ideone.com/NqSI3j

Verdict: TLE

I tried to use Mo's algorithm and segment tree to solve the problem. How do I further optimize my solution? Any help is really appreciated.

Link: https://uva.onlinejudge.org/external/117/11774.pdf

I understand that the for n == m answer is 2. But I can't figure out the solution when n != m. I mean I basically do not understand the theory behind the solution (apart from trying out for small test cases). Any help is really appreciated.

Link: https://uva.onlinejudge.org/external/108/10883.pdf

I could figure out that let's say for 5 numbers the answer is (Arr[1] + 4 * Arr[2] + 6 * Arr[3] + 4 * Arr[4] + Arr[5])/2^16. So the problem basically reduces to finding the values in the nth row of pascal's triangle and power of 2. But I am not very sure as to how to implement the solution. Any help is really appreciated.

Problem Link: https://uva.onlinejudge.org/external/12/1223.pdf

My implementation: http://ideone.com/bLGTpc

Verdict: WA

Anyone please help me to figure out my mistake. I learned Suffix Array today and this is my first implementation. Any help is really appreciated.

Anyone please suggest me some beginner-level/basic problems on DP on Trees. Thanks in advance.

Any hint is really appreciated.

Problem link: https://uva.onlinejudge.org/external/17/1734.pdf

Problem name: Count LCM

Link: https://uva.onlinejudge.org/external/128/12888.pdf

Let's say n < m. Then the answer is for each integers i, from 1 to n, how many integers up to m are co-prime with i. I tried solving the problem but it got me a TLE. How do I optimize my solution? Any help is really appreciated.

Solution Link: http://ideone.com/mMoWMS

Problem link: https://www.hackerrank.com/challenges/digit-products

My solution: http://ideone.com/wXDPi3

I got a verdict of TLE. How can I optimize my code further? Any help is really appreciated.

Problem Link: https://uva.onlinejudge.org/external/124/12429.pdf

Any hints to solve the problem is really appreciated.

I do understand the query, i.e, query of type 1 A means adding 1 to the value at A, query of type 2 X means how many queue has pilgrims of length >= X and query of type 3 Y means to subtract 1 from each of the queues having >= Y pilgrims. I'm just not sure how to process my original arrays so that I can easily update using BIT. Any hint will be really appreciated.

Problem Link: http://www.spoj.com/problems/TEMPLEQ/

Problem Link: http://www.spoj.com/problems/SEGSQRSS/

While I do understand that the merge operation can be deduced from the equation (a + b)^2 = a^2 + b^2 — 2ab I could not specifically figure out how would I formulate the merge operation. Any help is really appreciated.

Problem Name: KQUERY — K-query

Problem Link: http://www.spoj.com/problems/KQUERY/

My solution: http://ideone.com/4COpOu

verdict: TLE

How do I further optimize my solution?

Any help is really appreciated.

Problem Link: http://www.spoj.com/problems/NUMTSN/

My solution: http://ideone.com/7fKLqx

Any help is really appreciated.

Problem Link: http://codeforces.com/problemset/problem/731/F

Solution Link: http://ideone.com/3UYOmF

I got WA in test case 7. What is wrong with my solution?

UVA 13085

Problem Name: Forming Teams

Problem link: https://uva.onlinejudge.org/contests/364-bb2339ba/13085.pdf

I understand that for a number n I need to find out all of its divisors and then I need to find out the possible combinations for each divisor. I could not figure out how to come up with the combinations. Any help is really appreciated.

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/30/2017 14:09:28 (c4).

Desktop version, switch to mobile version.
User lists

Name |
---|