Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
98782 CSYZ_WanYL Old Driver Tree C++ 运行超时 40 1000 MS 1048 KB 842 2023-08-16 14:28:32

Tests(8/10):


#include<bits/stdc++.h> using namespace std; const int N=2e5+5; int n,m; int a[N]; struct node{ int lt,rt,k; }q[N]; //ÅÅÐò£¿Ê²Ã´ÅÅÐò£¿mutable ÊÇʲô£¿ÎÒÓÖÊÇʲô£¿ //ÎÒÎªÊ²Ã´×øÔÚÕâÀΪʲôÔÚд×ÅÕâÒ»·Ý´úÂ룿 //ΪʲôÎÒÒª×ÔÌÖ¿à³Ô£¬ÎÒÓÖ²»Íæ»Æ¸Ç //Çë±Þó×ÎÒ°É //ΪʲôÎÒҪ˵ÉÏÃæÕâ¾ä»° //ΪʲôÎÒÒª¿ªT1 int main(){ // freopen("ODT.in","r",stdin); // froepen("ODT.out","w",stdout); ios::sync_with_stdio(false); cin>>n>>m; for(int i=1;i<=n;i++) cin>>a[i]; for(int x=1;x<=m;x++){ int l,r,k; cin>>l>>r>>k; int sum=0; for(int i=l;i<=r;i++){ if(a[i]==k) sum++; a[i]=k; } cout<<sum<<"\n"; } return 0; } //³¡ÍÆçæ¶äÀò£¿


测评信息: