시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 605 283 234 47.561%

문제

상근이는 혼자 보드 게임을 하고 있다. 이 보드 게임의 보드는 N칸으로 이루어져 있고, 출발점은 1칸, 도착점은 N칸이다. 각 칸에는 지시 사항이 적혀있다. 지시 사항은 말을 얼만큼 이동해야 하는지가 써있다. 

상근이는 도착점에 도착할 때까지 주사위를 굴려 나온 눈의 수만큼 그 칸으로 이동한다. 이 때, 도착한 칸에 써있는 지시만큼 말을 다시 이동시킨다. 지시 사항으로 이동해서 도착한 칸에 써있는 지시는 따르지 않는다.

N칸에 도착했을 때와 그 칸을 넘는 경우도 도착한 것이다.

상근이가 던졌을 때 나온 주사위의 눈과 보드판의 지시사항이 주어졌을 때, 몇 번 만에 도착하는지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 N과 M이 주어진다. M은 상근이가 주사위를 던짓 횟수이다. (2 ≤ N ≤ 1000, 1 ≤ M ≤ 1000)

다음 N개 줄에는 -999이상 999이하의 정수가 하나씩 적혀있다. i번째 정수는 i번 칸에 써있는 지시사항 X이다. 이 때, X가 0이면 아무것도 하지 않고 그 자리에 멈춰 있는다. X가 양수인 경우에는 X칸 더 앞으로 진행하는 것을, 음수인 경우에는 |X|칸 뒤로 진행하는 것을 나타낸다.

다음 M개 줄에는 1이상 6이하의 정수가 주어진다. j번째 정수는 상근이가 주사위를 j번째로 던졌을 때, 나온 눈이다.

1번 칸과 N번 칸에 써있는 지시사항은 항상 0이다. 또, 항상 주사위를 M번 이하로 던져서 도착할 수 있다.  또, 1보다 작은 칸으로 이동하라는 지시가 있는 경우도 없다.

출력

주사위를 몇 번 던져서 도착할 수 있는지 출력한다.

예제 입력 1

10 5
0
0
5
6
-3
8
1
8
-4
0
1
3
5
1
5

예제 출력 1

5

힌트

W3sicHJvYmxlbV9pZCI6IjU1NjYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM4ZmNcdWMwYWNcdWM3MDQgXHVhYzhj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zMDU5XHUzMDhiXHUzMDRiXHUzMDkyXHU4ODY4XHUzMDU5XHU2NTc0XHU2NTcwXHUzMDZlXHUzMDdmXHUzMDkyXHU1NDJiXHUzMDgwIDEgXHU4ODRjXHUzMDRiXHUzMDg5XHUzMDZhXHUzMDhiXHVmZjBlPFwvcD5cclxuXHJcbjxwPiZuYnNwOzxcL3A+XHJcbiIsImhpbnQiOiI8cD48aW1nIGFsdD1cIlwiIHNyYz1cIlwvdXBsb2FkXC9pbWFnZXNcLzIwMTAteW8tdDItZmlnMDEucG5nXCIgc3R5bGU9XCJoZWlnaHQ6MjYxcHg7IHdpZHRoOjUwNHB4XCIgXC8+PFwvcD5cclxuIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM3N2NcdWJjZjhcdWM1YjQifV0=

출처

Olympiad > 일본정보올림피아드 예선 > JOI 2010 예선 2번

  • 문제를 번역한 사람: baekjoon
  • 어색한 표현을 찾은 사람: topology