Greater and Greater
题号:NC207145
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Given a sequence of size and a sequence of size , determine the number of subintervals(called ) of size in satisfying .

输入描述:

The first line contains two integers .
The second line contains integers , denoting the sequence .
The third line contains integers , denoting the sequence .

输出描述:

Only one line containing one integer, denoting the answer.
示例1

输入

复制
6 3
1 4 2 8 5 7
2 3 3

输出

复制
2

说明

The two subintervals are {[2, 8, 5], [8, 5, 7]}.