시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 256 MB 157 29 22 40.741%

문제

준수는 생일선물을 맞아 새로운 공기총을 샀다. 그리고 공기총의 성능을 시험해보기 위해 맥주캔을 쌓아놓고 시험해보기로 하였다.

맥주캔은 총 검은색, 회색, 흰색으로 총 3가지 종류가 있다. 그리고 이를 N개의 열에 따라 쌓아올렸다. 쌓아올릴 때 순서는 아래에서부터 검은캔, 회색캔, 흰캔 순서로 쌓아올렸다. (한 열에 어느 색 캔이 모두 없을 수는 있지만 색깔 순서에 위배되도록 캔을 쌓는 일은 없다.)

이렇게 맥주캔을 쌓아올린 뒤 준수는 어느 높이를 정하여 공기총을 발사하였다. 이 공기총은 성능이 뛰어나기에 어느 한 높이를 쏘면 해당 높이의 캔들은 모두 바깥으로 떨어지고 위쪽의 캔들이 쓰러지지 않은채 그대로 내려온다.

준수는 성능 시험을 위해 각 높이를 쏘았을 때 점수를 구하고자 한다. 점수 구하는 법은 검은캔을 1점, 회색캔을 2점, 흰캔을 5점이라 할 때 해당높이의 캔 점수의 총 합으로 구해진다.

위 그림은 초기에 맥주캔을 쌓은 상태라고 하자. 여기서 만약 2번 높이를 총으로 쏜다면 아래와 같이 된다.

여기서 검은캔이 3개, 회색캔이 2개, 흰캔이 1개 쓰러졌으므로 총 19점을 얻게 된다. 또한 현 상태에서 4번 높이에 총을 쏘면 아래와 같이 된다.

마찬가지로 계산하면 4번 높이를 쏘았을 때는 7점을 얻게 된다.

초기 캔을 쌓은 정보와 쏘는 높이를 순서대로 입력하면 각 높이를 쏠 때 얻어지는 점수를 구하여보다.

입력

첫째 줄에 열의 개수 N(1 ≤ N ≤ 300,000)이 주어진다. 두 번째 줄에는 각 열 쌓여진 검은 캔의 개수를 나타내는 N개의 정수가 주어진다. 세 번째 줄에는 각 열 쌓여진 회색 캔의 개수를 나타내는 N개의 정수가 주어진다. 네 번째 줄에는 각 열 쌓여진 흰 캔의 개수를 나타내는 N개의 정수가 주어진다. 모든 수는 106이하이다. 다음 줄에는 준수가 쏘는 횟수 M(1 ≤ M ≤ 300,000)이 주어진다. 다음 줄에는 차례대로 준수가 쏘는 높이를 나타내는 M개의 정수가 입력된다.
 

출력

첫째 줄부터 M번째 줄까지 해당 높이를 쐈을 때 얻어지는 점수를 차례대로 출력한다.

예제 입력 1

6
2 1 2 0 3 1
1 2 2 2 2 0
1 0 1 2 0 3
2
2 4

예제 출력 1

12
7
W3sicHJvYmxlbV9pZCI6IjEyNzMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMwZjciLCJkZXNjcmlwdGlvbiI6IjxwPlx1YzkwMFx1YzIxOFx1YjI5NCBcdWMwZGRcdWM3N2NcdWMxMjBcdWJiM2NcdWM3NDQgXHViOWRlXHVjNTQ0IFx1YzBjOFx1Yjg1Y1x1YzZiNCBcdWFjZjVcdWFlMzBcdWNkMWRcdWM3NDQgXHVjMGMwXHViMmU0LiBcdWFkZjhcdWI5YWNcdWFjZTAgXHVhY2Y1XHVhZTMwXHVjZDFkXHVjNzU4IFx1YzEzMVx1YjJhNVx1Yzc0NCBcdWMyZGNcdWQ1ZDhcdWQ1NzRcdWJjZjRcdWFlMzAgXHVjNzA0XHVkNTc0IFx1YjllNVx1YzhmY1x1Y2U5NFx1Yzc0NCBcdWMzMTNcdWM1NDRcdWIxOTNcdWFjZTAgXHVjMmRjXHVkNWQ4XHVkNTc0XHViY2Y0XHVhZTMwXHViODVjIFx1ZDU1OFx1YzYwMFx1YjJlNC48XC9wPlxyXG5cclxuPHA+XHViOWU1XHVjOGZjXHVjZTk0XHVjNzQwIFx1Y2QxZCBcdWFjODBcdWM3NDBcdWMwYzksIFx1ZDY4Y1x1YzBjOSwgXHVkNzcwXHVjMGM5XHVjNzNjXHViODVjIFx1Y2QxZCAzXHVhYzAwXHVjOWMwIFx1Yzg4NVx1Yjk1OFx1YWMwMCBcdWM3ODhcdWIyZTQuIFx1YWRmOFx1YjlhY1x1YWNlMCBcdWM3NzRcdWI5N2M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JzcDs8XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

Olympiad > Croatian Highschool Competitions in Informatics > 2008 > Final Exam #1 1번

  • 문제의 오타를 찾은 사람: appa
  • 문제를 번역한 사람: author6