- Time limit: 1.00 s
- Memory limit: 512 MB
A company has employees with certain salaries. Your task is to keep track of the salaries and process queries.
Input
The first input line contains two integers and : the number of employees and queries. The employees are numbered .
The next line has integers : each employee's salary.
After this, there are lines describing the queries. Each line has one of the following forms:
!
: change the salary of employee to?
: count the number of employees whose salary is between
Output
Print the answer to each ?
query.
Constraints
Example
Input:
5 3 3 7 2 2 5 ? 2 3 ! 3 6 ? 2 3
Output:
3 2