Simple

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

You are given a sequence of N numbers and Q queries:

  • 0 a b val : the number val will be added to all of the numbers from the interval [a,b]
  • 1 a b : you need to print the minimum even number and the maximum odd number form the interval [a,b]; if one of these numbers does not exist, -1 will be printed in its place

Answer all of the type 1 queries.

입력

The first line contains one integer: N. The second line contains N integers, representing the numbers from the sequence. The third line contains one integer: Q, and the following Q lines contain Q queries, as described in the statement.

출력

The output contains the answers to all of the type 1 queries, one per line.

제한

  • The numbers from the sequence are between 1 and 2.000.000.000.
  • The numbers “val” from type 0 queries are between 1 and 2.000.000.000.
  • WARNING!! If one of the answers to a type 1 query cannot be calculated, -1 will be printed in its place!!