← All problemsSign in

Compare and Connect

CodeChefRating 1719Open on judge ↗

There is a multiset $S$ containing $N + M$ strings, $N$ of which are "$<$" and $M$ of which are "$>$". For two strings $s$ and $t$, $f(s, t)$ is defined as: - If $s$ is smaller than $t$ in lexicographical order, $f(s, t) = s +$ "$<$" $+ t$; - If $s$ is equal to $t$ in lexicographical order, $f(s, t) = s +$ "$=$" $+ t$; - If $s$ is larger than $t$ in lexicographical order, $f(s, t) = s +$ "$>$"

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start