#include <bits/stdc++.h>
#define bug printf("************************\n");
#define fuck(x) cout << #x << " -> " << x << endl
#define endl '\n'
#define int long long
using namespace std;
constexpr int N = 1e6, inf = 0x3f3f3f3f;
#define x first
#define y second
typedef pair<int, int> pii;
vector<pii> arr;
void solve()
{
int n, k;
cin >> n >> k;
while (n--)
{
int op;
cin >> op;
if (op == 1)
{
int p;
cin >> p;
while (p--)
{
int a, b;
cin >> a >> b;
arr.push_back({b, a});
}
}
else
{
int ans = 0;
int tar;
cin >> tar;
int low, high;
cin >> low >> high;
for (auto it : arr)
{
if (it.first <= high && it.first >= low)
{
if (it.second == tar)
{
ans++;
}
}
}
cout << ans << endl;
}
}
}
signed main()
{
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
solve();
return 0;
}
02-03
12-19
20万+
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交