A + B Queries

시간 제한1초메모리 제한2048 MB

요약
두 배열과 인덱스 쌍이 주어질 때 각 질의에 대해 A[i] + B[j]를 출력한다.
난이도

쉬움10점 중 1점

유형
배열, 구현
정답자
아직 제출이 없습니다

문제

The Quechuas welcome you to IOI 2025 with a special gift: two arrays, AA and BB, each of length NN. The elements in both arrays are indexed from 00 to N−1N − 1.

To ensure that you are taking good care of their gift, they will ask you QQ questions, one at a time. Each question consists of two indices, ii and jj, and asks: What is the sum of A\[i]A\[i] and B\[j]B\[j]?

제한

  • 1≤N≤200,0001 ≤ N ≤ 200\\, 000
  • 0≤A\[k],B\[k]≤100 ≤ A\[k],B\[k] ≤ 10 for each kk such that 0≤k<N0 ≤ k < N.
  • 1≤Q≤200,0001 ≤ Q ≤ 200\\, 000
  • 0≤i,j<N0 ≤ i, j < N in each question.

예제

이 문제는 공개된 예제가 없습니다.