Comments

You're confused about the meaning of the word require.

That's very consistent progress, keep it up!

By the way, C doesn't require DP. D does require DP (I think).

That would be quite a thing to need to divide by zero...

Anyways, you want your program to blow up on coding mistakes, not fail silently.

I'm not saying that no technique is needed to solve all the problems. But problems A and B usually don't require any previous knowledge.

That's why it's called the beginner contest.

Python solution:

cnt = [Counter(map(int, input().split())) for _ in range(3)]

print(sum(prod(cnt[i][p[i]] / 6 for i in range(3)) for p in permutations([4, 5, 6])))

There are no prerequisite techniques to compete in the beginner contest. He's learning this idea by upsolving the problem.

Why do you return zero for division by zero? That's a weird function.

Make it n + 1 if you prefer. The point is that consecutive numbers are always coprime.

Or you can choose n — 1.

Closeness is not transitive.

On MladenPthe ko_osaga interview, 6 months ago
+3

Your interviews are a great contribution to the community, thank you! Hope you keep doing them, even if online!

-8

Now that you're a master, have you crossed out any item of the list? :-)

Persistence in problem solving is a good thing. As long a you have ideas to investigate, keep working on it. And if you use ChatGPT, make sure it doesn't spoil the problem, and only provides hints, and ideas to investigate.

If we're talking about problems that you expect to solve, e.g. A or B, then it's better if you can come up with the solution on your own. If you're upsolving and you get stuck for a while, you can consider asking ChatGPT for hints, before giving up.

If you have trouble performing under contest pressure, don't just practice calmly, do more contests or virtual participations. But also upsolve the problems you couldn't solve during the (virtual) contests.

Yes, of course. And still LeetCode detects hundreds of cheaters on every contest with this technique. No cheating detection technique is perfect.

Have you considered using prompt injection for cheating detection? LeetCode uses that technique very effectively.