#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int N=505;
int v[N][N]{};
int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n,t;cin>>n>>t;
int ans=0;
vector<int> a,b,h;
for(int i=0;i<n;i++){
int id;cin>>id;
if(id==1){
int c,d;cin>>c>>d;
c^=(t*ans);
d^=(t*ans);
a.push_back(c);
b.push_back(d);
h.push_back(1);
}
if(id==2){
int p;cin>>p;
h[p-1]=0;
}
if(id==3){
int c,d,k;cin>>c>>d>>k;
c^=(t*ans);
d^=(t*ans);
ans=0;
int sz=a.size();
for(int j=0;j<sz;j++){
if(min(b[j],d)-max(a[j],c)+1>=k){
ans++;
}
}
cout<<ans<<endl;
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3607 ms |
4752 KB |
Output is correct |
2 |
Correct |
3595 ms |
4736 KB |
Output is correct |
3 |
Correct |
3591 ms |
4668 KB |
Output is correct |
4 |
Correct |
3563 ms |
5036 KB |
Output is correct |
5 |
Correct |
777 ms |
5140 KB |
Output is correct |
6 |
Correct |
408 ms |
5168 KB |
Output is correct |
7 |
Correct |
3577 ms |
4740 KB |
Output is correct |
8 |
Correct |
3575 ms |
4708 KB |
Output is correct |
9 |
Correct |
3615 ms |
4548 KB |
Output is correct |
10 |
Correct |
2293 ms |
4368 KB |
Output is correct |
11 |
Correct |
2906 ms |
4380 KB |
Output is correct |
12 |
Correct |
3023 ms |
4928 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
862 ms |
3788 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
843 ms |
3856 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |