Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
98605 CSYZ_GanRZ Old Driver Tree C++ 运行超时 40 1000 MS 1808 KB 335 2023-08-16 12:08:14

Tests(8/10):


#include<bits/stdc++.h> #define int long long #define N 200010 using namespace std; int n,m,l,r,c; int a[N]; signed main(){ cin>>n>>m; for(int i=1;i<=n;i++) cin>>a[i]; while(m--){ cin>>l>>r>>c; int ans=0; for(int i=l;i<=r;i++) ans+=(a[i]==c); cout<<ans<<endl; for(int i=l;i<=r;i++) a[i]=c; } return 0; }


测评信息: