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

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

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

    编者团队:https://www.acgo.cn/team/1894657430811287552

    userId_undefined
    波加曼的训练家
    出道萌新题解仙人12月全勤卷王秩序白银分支·分支解题者循环·循环打卡人
    7阅读
    1回复
    1点赞
  • 直接干拉!!!

    #include<bits/stdc++.h> #include<cmath> using namespace std; struct stu{ int id; int sc; }; bool cmp(stu a, stu b){ if(a.sc != b.sc){ return a.sc > b.sc; } return a.id < b.id; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int m, n; cin >> m >> n; stu st[114514]; for(int i = 0; i < m; i++){ cin >> st[i].id >> st[i].sc; } sort(st, st + m, cmp); //计算面试分数线 int li = (int)(n * 1.5) - 1; int ls = st[li].sc; //统计面试人数 int cnt = 0; for(int i = 0; i < m; i++){ if(st[i].sc >= ls){ cnt++; }else{ break; } } cout << ls << " " << cnt << endl; for(int i = 0; i < cnt; i++){ cout << st[i].id << " " << st[i].sc << endl; } return 0; }

    userId_undefined
    Dream,还我10万美刀!!!
    时间刺客ASCII炼金师循环·循环打卡人数组·数组操作员维度操控者分支·分支解题者
    1阅读
    0回复
    0点赞
  • 看起来很难,实际上很水

    userId_undefined
    A飞行员
    出道萌新空间掌握者秩序白银
    9阅读
    0回复
    1点赞
  • 分数线题解

    userId_undefined
    Dream(王瀚册)
    出道萌新时间刺客快乐小狗分支·分支解题者秩序白银贪心·贪心尝试者
    3阅读
    0回复
    1点赞
  • 没有废话的极简解法

    userId_undefined
    solitūdō
    1阅读
    0回复
    0点赞
  • 题解

    代码如下

    userId_undefined
    Lan YY(互关)
    出道萌新时间刺客空间掌握者贪心·贪心尝试者题解仙人字符串·魔法使
    0阅读
    0回复
    0点赞

共26条

  • 1
  • 2
20条/页
跳至页
暂无数据

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

首页