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

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

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

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

Can someone please help.

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

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

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

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

Any help would be much appreciated.

Thanks!

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

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

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

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
  • Проголосовать: не нравится

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

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
  • Проголосовать: не нравится

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

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
  • Проголосовать: не нравится

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

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
  • Проголосовать: не нравится

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

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

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

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

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

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

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

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

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

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
  • Проголосовать: не нравится

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

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
  • Проголосовать: не нравится

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

How do I generate all the submasks for a given mask?

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

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

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

When will the editorial for the CROC Finals be released?

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

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

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

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
  • Проголосовать: не нравится

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

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.

I couldn't understand a word of it. Can anyone please help ?

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

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

Автор skpro19, история, 8 лет назад, По-английски
  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

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

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

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

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

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

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

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

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

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

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
  • Проголосовать: не нравится