Invitation to Dementia 2020 (Rated for Div. 2) on CodeChef

In the question Helping hand how is the output for 7 is 8 when it should be 7, could anyone explain?

How are you getting 7?

(6,7)=42
(4,5)=20
(4,6)=420
(5,7)=420
(1,7)=420
(2,7)=420
(3,7)=420

How to solve the circle questions?

This looks correct

1 Like

So again weak/wrong test case in one of the problem

1 Like

yes mine is coming 7
1 2 3 4 5 6 7
LCM(4,5)=20;
LCM(6,7)=42;
1 2 3 20 20 42 4 2
LCM(20,42);
LCM(20,42)=420;
1 2 3 420 420 420 420
4 + 3 = 7 operations.
can anybody tell where i am wrong

there should not be wrong test cases its very disappointing

Actually this is the worst situation
Not only incorrect solutions are accepted
But correct solutions are rejected
@dj_r_1 What is your say in this, will it be rated?
@admin There should be rejudge for helping hands.

For N = 7,
[1,2,3,4,5,6,7] -> [1,2,3,4,35,6,35] -> [1,2,3,140,140,6,35] ->[1,2,3,140,420,420,35] -> [1,2,3,140,420,420,420] -> [1,2,3,420,420,420,420] ->[1,2,420,420,420,420,420]->[1,420,420,420,420,420,420]->[420,420,420,420,420,420,420].
So, answer is 8.

1 Like

Test Cases are correct. Check solution outline.

1 Like

All numbers will not become 420 after the 3rd step.

1 Like

What about this

Prove it wrong

@humane Check this Document: solution outlines - Google Docs

@dj_r_1 can you please help me out in the 3rd problem. Help required in Problem- BEACIRC (Beautiful Circles)

I have already used #define int long long :sweat_smile:

You are correct. Answer for N = 7 is 7.
Initially: [1,2,3,4,5,6,7].
Perform (6,7): [1,2,3,4,5,42,42]
Perform (4,5): [1,2,3,20,20, 42,42]
Perform (4,6): [1,2,3,420,20,420,42]
Perform (5,7): [1,2,3,420,420,420,420]
Perform (1,7): [420,2,3,420,420,420,420]
Perform (2,7): [420,420,3,420,420,420,420]
Perform (3,7): [420,420,420,420,420,420,420]

2 Likes

It is 420

We are looking into this.

2 Likes

yep my bad :sweat_smile: :sweat_smile: :pensive: :pensive: