Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
35970 | daimo | 【S】T1 | C++ | 解答错误 | 40 | 253 MS | 1816 KB | 1220 | 2025-02-07 12:23:35 |
#include<bits/stdc++.h> #define int long long using namespace std; int n,q,l,r; int a[200010]; void readin(){ cin>>n>>q>>l>>r; for(int i=1;i<=n;i++)cin>>a[i]; sort(a+1,a+1+n); } void solve(){ if(n<=5000){ for(int i=1;i<=q;i++){ int opt,x,s,t; cin>>opt>>x>>s>>t; if(opt==1){ for(int j=1;j<=n;j++){ if(a[j]>=x){ a[j]=(a[j]+s)*t; } } }else{ for(int j=1;j<=n;j++){ if(a[j]<=x){ a[j]=(a[j]-s)/t; } } } } int ans=0; for(int i=1;i<=n;i++){ if(l<=a[i]&&a[i]<=r)ans++; } cout<<ans<<endl; }else{ for(int i=1;i<=q;i++){ int opt,x,s,t; cin>>opt>>x>>s>>t; if(opt==1){ if(x<l){ }else if(l<=x<=r){ }else{ } }else{ } } } } signed main(){ readin(); solve(); return 0; }