B'There are n cities in Berland, and they are connected by two railroads -- the Main railroad and the Auxiliary railroad. Each city has two railway stations, one connected to the Main railroad (called the Main station), and the other connected to the Auxiliary railroad. The railroads are identical in their structure. The Main railroad consists of n-1 railroad segments; the i -th railroad segment connects the Main station of the city i with the Main station of the city i+1 . Similarly, the Auxiliary railroad consists of n-1 railroad segments; the i -th railroad segment connects the Auxiliary station of the city i with the Auxiliary station of the city i+1 . These railroads are used to transfer different goods and resources from one city to another. In particular, the Ministry of Energetics is interested in using these railroads to transfer coal. The Ministry has estimated the following capabilities of the railroads: To analyze the capacity of the whole railroad network, the Ministry requires a software that would process and answer queries of the following format: Your task is to implement this software. The first line contains one integer n ( 2 <= n <= 3 cdot 10^5 ) -- the number of cities. The second line contains n-1 integers a_1, a_2, ... , a_{n-1} ( 1 <= a_i <= 10^9 ). The third line contains n-1 integers b_1, b_2, ... , b_{n-1} ( 1 <= b_i <= 10^9 ). The fourth line contains n integers c_1, c_2, ... , c_{n} ( 1 <= c_i <= 10^9 ). The fifth line contains one integer q ( 1 <= q <= 3 cdot 10^5 ) -- the number of queries. Then q lines follow, the i -th line contains two integers l_i and r_i ( 1 <= l_i < r_i <= n ) -- the parameters of the i -th query. Print q integers, where the i -th integer should be the answer to the i -th query, i. xe2 x80 x89e. the maximum number of tons of coal '... |