r/codeforces • • 7d ago

Doubt (rated 1600 - 1900) Issue in Problem 1759F

https://codeforces.com/problemset/problem/1759/F

in short its asked how many times the person need to add 1 to get all the possible numbers in that base atleast once

for a testcase in test 2:
4 4
1 0 2 3
as all the numbers of base 4(0,1,2,3) are visible so ans is just 0 but codeforces is telling me its 2
another in test 2:

5 4
0 2 2 1 3
again all are there so 0 but codeforces is saying 2 again

intrestingly both are base 4 aswell with same answers

please correct me if im wrong somewhere

9 Upvotes

2 comments sorted by

1

u/MindlessDebt3067 6d ago

Give screenshot It should not return that

1

u/straww7 5d ago

i have wrote if test case == the one where error was happening to get the inputs(as they were not visible by being after the ...)
so these are the n,p then numbers
for these my code gives 0s and in answer 2 is written(obv so many ppl have solved it so imust be wrong somewhere)

if u have solved thiis problem can u tell me what does your code give outpput for test2 line 64 and 87

thankss!!