시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 732 334 279 45.964%

문제

상근이는 혼자 보드 게임을 하고 있다. 이 보드 게임의 보드는 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
W3sicHJvYmxlbV9pZCI6IjU1NjYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM4ZmNcdWMwYWNcdWM3MD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cdTMwOGRcdTMwNjdcdTMwYjRcdTMwZmNcdTMwZWJcdTMwNTlcdTMwOGJcdTMwNGJcdTMwOTJcdTg4NjhcdTMwNTlcdTY1NzRcdTY1NzBcdTMwNmVcdTMwN2ZcdTMwOTJcdTU0MmJcdTMwODAgMSBcdTg4NGNcdTMwNGJcdTMwODlcdTMwNmFcdTMwOGJcdWZmMGU8XC9wPlxyXG5cclxuPHA+Jm5ic3A7PFwvcD5cclxuIiwiaGludCI6IjxwPjxpbWcgYWx0PVwiXCIgc3JjPVwiXC91cGxvYWRcL2ltYWdlc1wvMjAxMC15by10Mi1maWcwMS5wbmdcIiBzdHlsZT1cImhlaWdodDoyNjFweDsgd2lkdGg6NTA0cHhcIiBcLz48XC9wPlxyXG4iLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1Yzc3Y1x1YmNmOFx1YzViNCJ9XQ==

출처

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

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