How was HackWithInfy round 2

I had only done 1 question and 1 half…dont think that it is worthy
I feel question a little bit tougher than the previous round…

2 Likes

bit easy, I have done all three.:smile:
waiting for the result!

1 Like

Can anyone explain me how to do “Slay the Dragons” question.

How many have you done?

2 questions completely.

I had done 1 completely and one with 8 test cases passee from 13 and one with only 3 passes :sweat_smile:.
Is there any chance ?

we have to rotate him in any one adjacent pair of elements. so i tried every adjacent pairs and printed out maximum result.

1 Like

Can you explain with an example? And if its possible, mail me the code (amritshrivastava1@gmail.com).

code for slay the dragons

Thanks a lot :slight_smile:

Hii neeraj… I want to know how many questions u did?in round 1 and 2

all 3 in both rounds.

no problem :slight_smile:

Hey , did anyone solved this question in hackwithinfy round2

Given L , R ( 1<=L,R <= 1000000000000000000) . Count the numbers in [L,R] such that each number satisfies two properties

  • The total count of odd digits are even

  • The total count of even digits are odd

Do not consider zero in MSB position

Testcase :
1 9
Output :
4

Explanation :

The numbers that satisfy both the properties are 2,4,6,8 . In each of these numbers , the count of odd digits are even (i.e 0 ) and count of even digits are odd (i.e 1 )

Thanks in advance :slight_smile:

I have done 2 questions correctly. My third question is "colouring grid ".It is problem of permutation and combination. any one done this? can anyone provide me solution of this question?

3rd present on net Google it

hey guys i have try to solve one question but i end up with time limit exceed in python . so help me how to remove this error in future.only few test cases run

I don’t know about the contest and I didn’t solve this question but I can think of a solution using digit DP. I think rather than explaining digit DP here and then the solution, I would recommend you to read about digit DP on the internet and see a few questions on it. You should be able to get the solution of the given problem after that yourself. If not, then let me know.

1 Like

Okay !! Thanks :slight_smile:

Which question? I couldn’t find any on the internet.