### skpro19's blog

By skpro19, history, 6 years ago,

I am stuck in this problem for the past one week -> Problem

I am unable to detect the bug in my solution-> Solution

• -6

By skpro19, history, 7 years ago,

I am unable to solve the Problem B Large and problem C small and large.

Any help would be much appreciated.

Thanks!

• 0

By skpro19, history, 7 years ago,

The question is this.

I went through one of the submitted solutions:

I understood that for the solution to exist C must be divisible by g = gcd(A, B);

But, how are we getting the final values for x and y ?

Also, it would be very nice if someone can suggest some nice problems to practice on this topic.

Thanks!

• +5

By skpro19, history, 7 years ago,

The problem is this

After going through the submitted solution, I found the answer is this-> w! * b! * (w -1)* C(w + b — 3, n — 3)

Can someone please explain how this solution is coming.

Thanks!

• 0

By skpro19, history, 7 years ago,

The problem is 294C.

The tutorial says this:

The third sample is ...#...#... where # is a switched on lamp and . is a switched off lamp. As you can see we have three different types of lights. The first three lights (Type A), the 5th to 8th lights (Type B) and the last three lights (Type C). We have to switch on the lights three times for each type of lights. Aside from the order of moves for each type there are possible permutations of the string AAABBBCCC which tells us how to combine the steps of different types. Switching on the lights is done uniquely for types 1 and 3. But for type 2 each time we have to possible options until we're left with one off light. So there are 2^(3 - 1) ways to do this. So the answer would be 1680*1*4*1 = 6720.

I can not understand the part. A little help would be very much appreciated.

• 0

By skpro19, history, 7 years ago,

The problem is this.

The tutorial says this:

"If a fraction can be obtained with k resistors, then it is simple to calculate that we can obtain fractions and with k + 1 resistors. So adding one resistor means performing one operation backwards in Euclidean algorithm. That means that the answer is equal to the number of steps in standard Euclidean algorithm.

At first we thought about the major problem (any two elements can be joined), but had a moment of eureka and got that the given problem unexpectedly naturally can be reduced to GCD. "

I do not understand the tutorial. A little help will be really appreciated.

Thanks!

• +1

By skpro19, history, 7 years ago,

Is it possible to solve this question using recursion + memoisation instead of bottom up approach, without exceeding the given memory limit?

• -1

By skpro19, history, 7 years ago,

In this question, DIV 2C, Is is possible to solve this using recursive approach without exceeding the memory limit??

• +3

By skpro19, history, 7 years ago,

The question is this. It appeared in the latest Hackerrank Week of Code. I went through the editorial and implemented my solution. What is wrong with my solution? Thanks!

• -2

By skpro19, history, 7 years ago,

I participated in the Google 2017 APAC Round A. I was wondering if Google releases any kind of editorial for the same or not?

Thanks!

• +3

By skpro19, history, 7 years ago,

• +10

By skpro19, history, 7 years ago,

When will the editorial for the CROC Finals be released?

• +15

By skpro19, history, 7 years ago,

The problem is Chef and Frogs. I have solved it using DFS and I am getting a WA. Can someone please point out the error ?

My solution is My Solution

• -1

By skpro19, history, 7 years ago,

I was solving this problem -> Problem C

I went through the tutorial which says this ->

The problem was suggested by Lewin Gan lewin. The proof of the transitivity also belongs to him. Let's sort all the strings by comparator a + b < b + a and concatenate them. Let's prove that it's the optimal answer. Let that operator be transitive (so if ). Consider an optimal answer with two strings in reverse order by that operator. Because of the transitivity of operator we can assume that pair of strings are neighbouring. But then we can swap them and get the better answer. Let's prove the transitivity of operator. Consider the strings as the 26-base numbers. Then the relation a + b < b + a equivalent to . The last is simply the relation between real numbers. So we proved the transitivity of the relation a + b < b + a.

• +1

By skpro19, history, 7 years ago,

The problem is Almost Arithmetic Sequences.

Accepted Solution

Time limit exceeded

Can someone please figure out why is this happening?

• -6

By skpro19, history, 7 years ago,

Why has Codeforces blocked access to the ProblemSet? I think it has been blocked since the last contest ended.

• -15

By skpro19, history, 7 years ago,

Why are submissions not getting checked? How long is it gonna take?

• +11

By skpro19, history, 8 years ago,

Is it something temporary or they are actually going ahead with it full time. I wish not. I kind of like the previous setitng. It would be very kind if somebody, officially with codeforces could answer this.

• 0