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

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

Hello again,

Google's Kick Start 2020 season is here! Kick Start hosts online rounds throughout the year, giving participants the opportunity to test and grow their coding abilities while getting a sample of the programming skills needed for a technical career at Google. Top candidates might be invited for interviews.

We have some exciting updates for 2020:

  • We’re removing Hidden Verdict Test Sets. All submissions will receive instant feedback.
  • You'll see an easiest fourth problem added to each round.
  • We have a new scoreboard feature of filtering by location and people you choose to follow!

I invite you to solve some fun and interesting problems on Apr 18 2020, 23:00 UTC (i.e. within next hour or so).

Dashboard can be accessed here during the contest. Problem analyses will be published after the contest.

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

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

Good luck to all :))) Wish y'all good scores!

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +60 Проголосовать: не нравится

Giving a well-known problem as C!? Kickstarts used to be much much better than this.

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Hi, can someone please explain, why my last submission receives WA on TC #2 for Prob 3?

I have attached it below.

EDIT: Figured out the solution, mod when multiplying.

Thanks to all that helped.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve D(last problem) without overflow??

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Did anyone else solved D using FFT ?? I want to know their implementation of FFT. (Yes it was an overkill and took me upto last 2 minutes to optimize)

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In the problem Robot Path Decoding we have the following restrictions for each test case set:

Test set 1 The total number of moves the robot will make in a single test case is at most 104.

Test set 2 No additional constraints.

But in the analyses it is written:

Test Set 2 Now it is possible that the number of moves is exponential in the length of the original program. Thus it would be impossible to execute the moves one by one in the given time.

Am i the only one who didn't understand this? Can anyone explain it to me?

  • »
    »
    6 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +4 Проголосовать: не нравится

    Think of WorstCase: 2(2(......(2(E))))...) with length 2000 no of 2's b4 E is (2000-1)/3 since multiplication with power(2,(2000-1)/3) is not possible therefore using modulo property.

    • »
      »
      »
      6 лет назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится 0 Проголосовать: не нравится

      I know what he mean by exponential in the length of the original program. I interpreted the text in the wrong way. Because it is written:

      Test set 2 No additional constraints.

      I understood that the test set 2 would have the same contraints as test set 1, because it was not changing them. Thank you.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to Solve D.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve C without recursion using stack ?

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

darkshadows it is better if you post a day before. I mean every one is not expected to be on codeforces for 24*7.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I was getting WA with this code https://pastebin.com/06caGcn4 for 1st problem of kickstart round A. After changing the if condition from

if (checkpts[k] > checkpts[k - 1] && checkpts[k] > checkpts[k + 1] && checkpts[k] > checkpts[0] && checkpts[k] > checkpts[n])

to

if (checkpts[k] > checkpts[k - 1] && checkpts[k] > checkpts[k + 1])

answer came right. I am confused about this. Can anyone provide some edge case that will fail in initial if condition?

@darkshadows

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In the last test case of sample test cases in problem D, how come the answer is 0.3125 I'm getting 0.375

I'm calculating the probability of falling into the hole and subtracting it from 1 to get the probability of success.

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Can Someone explain me 5 3 1 2 4 2 test case of Last problem of kickstart when i calculate there is only 1 ways to reach from (1,1) to (5,3).right? so answer should be 1

  • »
    »
    6 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    You assume that the robot will always walk along this single available path, but it is not the case since the robot walks randomly.

    The robot starts at cell (1,1). With 50% chance it will either move down and fall into the hole, or move right to cell (1,2). So the probability of reaching (1,2) is 0.5.

    From cell (1,2), again with 50% chance it will either move down and fall into the hole, or move right to cell (1,3). Since the probability of reaching cell (1,2) is 0.5, the probability of reaching (1,3) will be 0.5*0.5=0.25.

    Similarly, the probability of reaching (1,4) is 0.25*0.5=0.125 and the probability of reaching (1,5) is 0.125*0.5=0.0625.

    After reaching cell (1,5) the robot will always move down with 100% probability, so the probability of reaching cell (2,5) is 0.0625*1=0.0625 and the probability of reaching (3,5) is also 0.0625*1=0.0625.

»
6 лет назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

D was really nice

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Here a stack approach of C with explanation if anyone is interested Here