| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 98656 | CSYZ_YangXY | Old Driver Tree | C++ | Time Limit Exceeded | 40 | 1000 MS | 1028 KB | 525 | 2023-08-16 12:14:48 |
#include<bits/stdc++.h> #define ll long long using namespace std; int n,m; const int N=2e5+7; int a[N]; int main() { // freopen("ODT.in","r",stdin); // freopen("ODT.out","w",stdout); cin>>n>>m; for(int i=1;i<=n;i++) cin>>a[i]; while(m--) { int l,r,c; cin>>l>>r>>c; int ans=0; for(int i=l;i<=r;i++) { if(a[i]==c) ans++; a[i]=c; } cout<<ans<<endl; } return 0; }