acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 竞赛
  • 讨论
  • 团队
  • 商城
登录
注册
题目详情提交记录(0)
  • momo严选

    userId_undefined
    momo
    出道萌新倔强青铜模拟·模拟练习生时间刺客空间掌握者快乐小狗
    177阅读
    1回复
    5点赞
  • 正确题解

    #include <bits/stdc++.h> using namespace std; int main() { int n,w; cin>>n>>w; int cnt[1000]={0}; for (int i=1;i<=n;i++) { int momo; cin>>momo; cnt[momo]++; int people=max(1,(i*w)/100); int sum=0; int line=600; while(line>=0 && sum<people) { sum+=cnt[line]; line--; } cout<<line+1<<" "; } return 0; }

    userId_undefined
    陈景越
    出道萌新模拟·模拟练习生贪心·贪心尝试者I/O·IO入门者倔强青铜枚举·枚举小能手
    103阅读
    2回复
    1点赞
  • [CSP-J 2020] 直播获奖-题解

    分析题意 一眼对顶堆 a<=600; 那好办啦,直接桶排

    userId_undefined
    yeye
    2月全勤卷王10月全勤卷王11月全勤卷王12月全勤卷王1月全勤卷王快乐小狗
    10阅读
    3回复
    2点赞
  • 隐居归来

    本人:(计数排序) deepseek:

    userId_undefined
    林德铭MCjinyu
    8月全勤卷王CSP-J一等奖模拟·模拟练习生I/O·IO入门者倔强青铜
    27阅读
    0回复
    0点赞
  • AC

    #include <bits/stdc++.h> using namespace std; int main() { int n,w; cin>>n>>w; int cnt[1000]={0}; for (int i=1;i<=n;i++) { int m; cin>>m; cnt[m]++; int people=max(1,(i*w)/100); int s=0; int l=600; while(l>=0 && s<people) { s+=cnt[l]; l--; } cout<<l+1<<" "; } return 0; }

    userId_undefined
    ༺ཌༀཉི༒权·威༒༃ༀད༻
    时间刺客空间掌握者模拟·模拟练习生冒泡宗师→排序元老位操作忍者循环·循环打卡人
    1阅读
    0回复
    0点赞
暂无数据

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

首页