| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 435532 | 钟宜辰 | 26年2月-B组(才俊)A. 岗位统计 | C++ | 运行超时 | 40 | 1000 MS | 464 KB | 409 | 2026-04-07 21:00:47 |
#include<bits/stdc++.h> using namespace std; long long n,q,a[100086],x,y; int main(){ cin>>n>>q; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=q;i++){ int s1=0,s2=0,s3=0; cin>>x>>y; for(int j=x;j<=y;j++){ if(a[j]==1){ s1++; } else if(a[j]==2){ s2++; } else if(a[j]==3){ s3++; } } cout<<s1<<" "<<s2<<" "<<s3<<endl; } return 0; }