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

31324번 - Construction of Chand Baori 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB211816638.596%

문제

The Indian stepped well Chand Baori is, with some simplifications, a pyramid tapering down. Faces of the pyramid are made up of rows of trapezoid stairs which can be used to descend to reach the water. The first (lowest) level is a single stairway with two flights of stairs on the left and on the right. The second level has two such stairways, etc.

To visit the "Harshat Mata" shrine dedicated to the goddess of happiness and joy pilgrims need to cleanse themselves in the waters of the well, that is, to descend to the very bottom. Pilgrims on their way to the water can only descend or walk horizontally along the current level, but not climb up.

The builders of the well want to construct it in such a way that the number of possible ways of descend would be no less than the number of pilgrims. Two paths are considered different if there exists a level with a different stairway used for descending, or different flight of the same stairway used.

입력

The first line of the input file contains two integers $N$ and $M$ -- the number of levels in the well and the number of pilgrims descending along the single face, respectively (1ドル \le N \le 20,ドル 0ドル \le M \le 1.5 \cdot 10^{18}$).

출력

The output file must contain "Harshat Mata", if the number of possible ways to descend along one face of the well is less than the given number of pilgrims (also for one face), otherwise it must contain "Nope".

제한

예제 입력 1

1 2

예제 출력 1

Harshat Mata

예제 입력 2

1 3

예제 출력 2

Nope

예제 입력 3

2 9

예제 출력 3

Nope

예제 입력 4

2 8

예제 출력 4

Harshat Mata

힌트

For a two-level well there exist eight different ways of descent shown in the picture (parts of the same route are marked with the same digit).

출처

Contest > Open Cup > 2014/2015 Season > Stage 2: Grand Prix of Siberia L번

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

출처

대학교 대회

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

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