Disgust Minimization
You have a matrix $A$ with dimensions $N \times N$. Let the *disgust* of the matrix be defined as: $\sum_{i=1}^{N} \sum_{j=1}^{N} (A_{(i, j)} - A_{(j, i)})^2$ You also have $M$ tuples with you. Each tuple consists of $3$ integers $X_i, Y_i,$ ans $Z_i$ $(1\le i \le M)$. In one operation, you can: - Choose an element $(p, q)$ $(1\le p,q \le N)$ such that the value of the element $A_{(p,q)} = X_i
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.
Sign in to chat with the tutor and save your progress.
Sign in to start