#include <bits/stdc++.h> using namespace std; int ar[300002]; int main() { #ifdef De freopen("../../toutiao_1/data/a.in", "r", stdin); //输入重定向,输入数据将从in.txt文件中读取 #endif int n, m; while (~scanf("%d", &n)) { for (int i = 1; i <=n; ++i) { scanf("%d", &ar[i]); //输入单值 } scanf("%d", &m); while (m--){ int start,end,target; scanf("%d %d %d",&start,&end,&target); int count = 0; for(int i=start;i<=end;++i){ if(ar[i]==target) count++; } cout<<count<<endl; } } }
点赞 1

相关推荐

用微笑面对困难:你一定很懂劳务法 是不是因为这个hr不敢要
点赞 评论 收藏
分享
程序员花海:实习和校招简历正确格式应该是教育背景+实习+项目经历+个人评价 其中项目经历注意要体现业务 实习经历里面的业务更是要自圆其说 简历模板尽可能保持干净整洁 不要太花哨的
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务