11090

    [백준 10090] Counting Inversion C++

    [백준 10090] Counting Inversion C++

    10090번: Counting Inversions A permutation of integers from 1 to n is a sequence a1, a2, ..., an, such that each integer from 1 to n is appeared in the sequence exactly once. Two integers in а permutation form an inversion, when the bigger one is before the smaller one. As an example www.acmicpc.net 분할 정복 1. 문제해결 아이디어 임의의 수열에서 자신보다 뒤에 있는데 자신보다 작은 수의 개수의 총 합을 구하는 문제이다 N^2로 풀면 너무 쉽겠지만 N