当前位置:网站首页>P7072 [csp-j2020] live broadcast Award
P7072 [csp-j2020] live broadcast Award
2022-07-02 22:55:00 【Evil_ boy__】
Topic link :
P7072 [CSP-J2020] Live Award - Luogu | New ecology of computer science education (luogu.com.cn)
Topic :
Title Description :
Input description :
Output description :
Examples :
explain :
Tips :
Ideas :
The maximum score is 600, We can open a 605 The array of saves the number of people in each fractional segment so far . Every time you join a person, you can judge the score line
#include<bits/stdc++.h>
using namespace std;
int arr[605] = {0};
int main(){
int n, w;
cin >> n >> w;
for(int i = 1; i <= n; i++){
int a;
cin >> a;
arr[a]++;
int num = i * w / 100;
if(num == 0){
num = 1;
}
int cnt = 0;
for(int j = 600; j >= 0; j--){
cnt += arr[j];
if(cnt >= num){
if(i != 1){
cout << " ";
}
cout << j;
break;
}
}
}
cout << endl;
return 0;
}
边栏推荐
- 悬镜安全在RSAC2022上斩获Global InfoSec Awards四项大奖
- Film and television excerpts
- Introduction to database system Chapter 1 short answer questions - how was the final exam?
- Notes on key vocabulary of the original English book biography of jobs (IX) [chapter seven]
- PHP optimizes SQL queries in foreach
- Oracle cursor
- `${}`的用法
- 杰理之快速触摸不响应问题【篇】
- 【板栗糖GIS】arcmap—为什么使用自定义捕捉的时候,经典捕捉的勾要去掉呢?
- [foreign journal] sleep and weight loss
猜你喜欢
Build your own website (22)
创新实力再获认可!腾讯安全MSS获2022年度云原生安全守护先锋
Higher order operation of bits
【硬件】标准阻值的由来
Analyse des données dossiers d'apprentissage - - analyse simple de la variance à facteur unique avec Excel
分享 10 个 JS 闭包面试题(图解),进来看看你能答对多少
Share 10 JS closure interview questions (diagrams), come in and see how many you can answer correctly
悬镜安全在RSAC2022上斩获Global InfoSec Awards四项大奖
NC50965 Largest Rectangle in a Histogram
电商系统微服务架构
随机推荐
从2022年Q1财报看携程的韧性和远景
首批 | 腾讯云完成国内首个云原生安全成熟度评估
杰理之、产线装配环节【篇】
【板栗糖GIS】global mapper 如何通过dsm批量制作贴地等高线
数据分析学习记录--用EXCEL完成简单的单因素方差分析
分享 10 个 JS 闭包面试题(图解),进来看看你能答对多少
mysql重置密码,忘记密码,重置root密码,重置mysql密码
电商系统微服务架构
Wait to solve the zombie process
Oracle-PL/SQL编程
NC24325 [USACO 2012 Mar S]Flowerpot
位的高阶运算
原生js添加样式的方法
MySQL reset password, forget password, reset root password, reset MySQL password
U++ learning notes - relaxation
[ODX studio edit PDX] -0.1- how to quickly view the differences in supported diagnostic information between variant variants (service, sub function...)
DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
全面解析分享购商业模式逻辑?分享购是如何赋能企业
Go语言sqlx库操作SQLite3数据库增删改查
The kth largest element in the [leetcode] array [215]