1.L1-8 静静的推荐 - 2024团体程序设计天梯赛(历年真题)练习集 (pintia.cn)
//碎碎念:主要还是理解题意吧,,为什么每一个字我都认识但合起来就看不懂了呢,,(・∀・(・∀・(・∀・*),,一个高中语文经常70+的语文差生的疑惑,,,,#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=2e5+6;
const int inf=0x3f3f3f3f;
const double pi=acos(-1.0);
priority_queue<int>qu;
int a[500];
void solve()
{int n,k,s,cn=0;cin>>n>>k>>s;//理解题意:/*1.”如果有的学生天梯赛成绩虽然与前一个人相同,但其参加过 PAT 考试,且成绩达到了该企业的面试分数线,则也可以接受。“所以:即:(tt>=175&&pat>=s)2."一共接受 K 批次的推荐名单;同一批推荐名单上的学生的成绩原则上应严格递增;"【这个意思是:满足要求分数的可以被推荐的最多为k,类似:a[175+][k],这个感觉】*/while(n--){int tt,pat;cin>>tt>>pat;if(tt>=175){if(pat>=s)cn++;else if(a[tt]<k)a[tt]++,cn++;}}cout<<cn;
}
signed main()
{ios_base::sync_with_stdio(false);cin.tie(nullptr),cout.tie(nullptr);int t=1;//cin>>t;while(t--){solve();}return 0;
}
困,,待续......