acgo题库
  • 首页
  • 题库
  • 学习
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情提交记录(0)
  • 两个函数搞定

    #include<bits/stdc++.h> using namespace std; long long a[1000009]; int main(){ long long n,m; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>m; sort(a+1,a+1+n); for(int i=1;i<=m;i++){ int x; cin>>x; int pos2=upper_bound(a+1,a+1+n,x)-a; int pos1=lower_bound(a+1,a+1+n,x)-a; cout<<pos2-pos1<<endl; } return 0; }

    userId_undefined

    13nc

    36阅读
    0回复
    3点赞
  • 简单|一个桶解决

    userId_undefined

    🎈🎈🎈🎈🎈🎈🎈🎈

    出道萌新I/O·IO入门者秩序白银
    35阅读
    0回复
    2点赞
  • 题解

    userId_undefined

    zsy

    7月全勤卷王8月全勤卷王题解仙人时空双修者快乐小狗秩序白银
    8阅读
    0回复
    1点赞
  • 题解 100% AC

    userId_undefined

    飞的智动

    8月全勤卷王题解仙人时空双修者模拟·模拟练习生秩序白银快乐小狗
    8阅读
    0回复
    1点赞
暂无数据

提交答案之后,这里将显示提交结果~

首页