Logo
(追記) (追記ここまで)

14165번 - Team Building 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB64029321543.611%

문제

Every year, Farmer John brings his N cows to compete for "best in show" at the state fair. His arch-rival, Farmer Paul, brings his M cows to compete as well (1≤N≤1000,1≤M≤1000).

Each of the N+M cows at the event receive an individual integer score. However, the final competition this year will be determined based on teams of K cows (1≤K≤10), as follows: Farmer John and Farmer Paul both select teams of K of their respective cows to compete. The cows on these two teams are then paired off: the highest-scoring cow on FJ's team is paired with the highest-scoring cow on FP's team, the second-highest-scoring cow on FJ's team is paired with the second-highest-scoring cow on FP's team, and so on. FJ wins if in each of these pairs, his cow has the higher score.

Please help FJ count the number of different ways he and FP can choose their teams such that FJ will win the contest. That is, each distinct pair (set of KK cows for FJ, set of KK cows for FP) where FJ wins should be counted. Print your answer modulo 1,000,000,009.

입력

The first line of input contains N, M, and K. The value of K will be no larger than N or M.

The next line contains the N scores of FJ's cows.

The final line contains the M scores of FP's cows.

Each score is an integer from 1 to 100000.

출력

Print the number of ways FJ and FP can pick teams such that FJ wins, modulo 1,000,000,009.

제한

예제 입력 1

10 10 3
1 2 2 6 6 7 8 9 14 17
1 3 8 10 10 16 16 18 19 19

예제 출력 1

382

힌트

출처

Olympiad > USA Computing Olympiad > 2016-2017 Season > USACO 2016 December Contest > Platinum 2번

  • 빠진 조건을 찾은 사람: jh05013
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /