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

12600번 - Qualification Round (Large) 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 512 MB64222234.921%

문제

You've just advanced from the Qualification Round of Google Code Jam Africa 2010, and you want to know how many of your fellow contestants advanced with you. To give yourself a challenge, you've decided only to look at how many people solved each problem.

The Qualification Round consisted of P problems; the ith problem was fully solved by Sicontestants. Contestants had to solve C problems in order to advance to the next round. Your job is to figure out, using only that information, the maximum number of contestants who could have advanced.

입력

The first line of the input gives the number of test cases, T. T lines follow. Each will consist only of space-separated integers: first P, then C, then P integers S0...SP-1.

Limits

  • 1 ≤ T ≤ 100
  • 1 ≤ C ≤ P
  • 1 ≤ P ≤ 60
  • 0 ≤ Si ≤ 1017

출력

For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y is the maximum number of contestants who could have advanced (in other words, the maximum number of contestants who could have solved at least Cproblems).

제한

예제 입력 1

2
2 2 73 100
3 2 245 272 238

예제 출력 1

Case #1: 73
Case #2: 377

힌트

출처

Contest > Google > Google's Coding Competitions > Google Code Jam Africa 2010 > Online Competition C2번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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