Q: Given a sequence A, find the number of i, j satisfying . Find the number of i, j satisfying [$ A_i = A_j (i < j)
-
Constraints |A| = 10^7, 0 < Ai < 100
-
Create a frequency table and find it by trigonometric number. Linear order.
This page is auto-translated from /nishio/é »ĺş¦â†’ä¸‰č§’ć•° using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.