| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 512 MB | 1654 | 880 | 750 | 55.804% |
In each of $K$ practice sessions (1ドル \leq K \leq 10$), Bessie ranks the $N$ cows according to their performance (1ドル \leq N \leq 20$). Afterward, she is curious about the consistency in these rankings. A pair of two distinct cows is consistent if one cow did better than the other one in every practice session.
Help Bessie compute the total number of consistent pairs.
3 4 4 1 2 3 4 1 3 2 4 2 1 3
4
The consistent pairs of cows are $(1,4),ドル $(2,4),ドル $(3,4),ドル and $(1,3)$.