#include<bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define db double
using namespace std;
int n,t;
int id=0;
int ans=0;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>n>>t;
pair<int,int> a[n+1];
for(int k=1;k<=n;k++){
int ind;
cin>>ind;
if(ind==1){
int x,y;
cin>>x>>y;
x=x^(t*ans);
y=y^(t*ans);
if(x>y)
swap(x,y);
id++;
a[id].ff=x;
a[id].ss=y;
}
if(ind==2){
int pos;
cin>>pos;
a[pos].ff=0;
a[pos].ss=0;
}
if(ind==3){
int x,y,f;
cin>>x>>y>>f;
x=x^(t*ans);
y=y^(t*ans);
if(x>y)
swap(x,y);
ans=0;
for(int i=1;i<=id;i++){
if(min(y,a[i].ss)-max(x,a[i].ff)+1>=f)
ans++;
}
cout<<ans<<"\n";
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Jury has the better answer : jans = 3, pans = 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |