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

11156번 - Candy Store 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB68382755.102%

문제

Little Anne loves candy and she wants to buy candy at the local candy store. Fortunately, she also happens to be extremely rich, which enables her to buy all the candy she could ever want. She wants to buy candy for at least C kroner, and she also wants to buy at most one of each type.

There are many ways to buy candy for at least C kroner, so she wants to consider the possibilities before buying. Since her parents think she is too young to use a computer, she has asked you to write a program that calculates the number of possibilities.

Anne doesn’t like large numbers like 1,000,000,007, so you instead calculate the number of possibilities modulo 65537, a less intimidating number.

입력

The first line of the input consists of a single integer T, the number of test cases. Each test case begins with a line containing two integers N and C, the number of available candy types and the least amount of money Anne wants to spend. The next line contains N space-separated integers ai, the cost of candy type i in kroner.

  • 0 < T ≤ 100
  • 0 < N ≤ 200
  • 0 < C ≤ 10000
  • 0 < ai ≤ 200

출력

For each test case, output on its own line the number of ways Anne can buy candy for at least C kroner, modulo 65537.

제한

예제 입력 1

2
5 10
5 6 7 8 9
10 100
10 10 10 10 10 10 10 10 11 9

예제 출력 1

26
1

힌트

출처

Contest > IDI Open Contest > IDI Open 2012 I번

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

출처

대학교 대회

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

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