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

18426번 - Zapina 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB49302769.231%

문제

There is a total of N young programmers which are preparing for the second part of competitive season during a winter camp in Krapina Zagreb. Mr. Malnar, a big promoter of order, discipline and hard work, told the programmers to form a line and gave each of them a certain number (possibly zero) tasks. He gave away a total of N different tasks and he knows that the i-th programmer in line will be happy if they got exactly i tasks.

In how many different ways could Mr. Malnar give out the tasks in such a way that at least one programmer was happy? Two ways of giving out the tasks are considered different if there exists a programmer and a task such that in one way that programmer received that task while in the other one they didn’t.

입력

The first line contains an integer N (1 ≤ N ≤ 350) from task description.

출력

Output the sought number of ways modulo 109 + 7.

제한

서브태스크

번호배점제한
122

1 ≤ N ≤ 7

233

1 ≤ N ≤ 20

355

No additional constraints.

예제 입력 1

1

예제 출력 1

1

예제 입력 2

2

예제 출력 2

3

Ways of giving out the tasks in which at least one programmer is happy are:

  1. First task to first programmer, second task to the second one.
  2. Second task to the first programmer, first task to the second one.
  3. Both tasks to the second programmer.

예제 입력 3

314

예제 출력 3

192940893

힌트

출처

Contest > Croatian Open Competition in Informatics > COCI 2019/2020 > Contest #5 5번

채점 및 기타 정보

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

출처

대학교 대회

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

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