A 按rank给出每个人的赛前分数和赛后分数 如果一个人打败了比他分数高的人 他的分数必然升高 问比赛rated吗 如果一个人的分数改变了肯定rate 如果全都没改的话 也可能是rated 这时候check分数是否递增

B 给出一个伪代码 用你的分数放进去可以生成25个rank 给出你的rank 你的现在分数x 你的最低分数y 问你hack(成功 +100 失败 - 50)成功最少多少次能够让自己的分数变化后放入这个伪代码生成的25个rank里面包含你的rank

先枚举只失败的 直到不能再失败

如果不行就枚举 成功次数 (每次都尝试失败一次)

C 你现在提交了b次 对了a次 你期望AC/SUBMIT比值是p/q 问最少提交多少次可以 或者确定不可以

让这个比值翻倍 二分翻的倍数并最小化  check 条件是 当b -> ans * q  可否实现 a -> p * ans

D 一场比赛有五道题 每道题的分数由一个通过人数和比赛总人数的比值决定 每个人在一道题上的分数由通过时间和题目总分决定 有n个人比赛 1想通过建小号的方式打败2 问最少建多少个或者确定不可以

可以看到比值最小是1/32 最大是1/2 并且n<=120 所以可以想到如果想并且有能力调控题目分数的话 需要建的小号不会太多 所以直接枚举check

需要注意的是 如果我想让A题多几个AC人数来刷低题目分数 这些人将被视为参赛者 会影响其余的题目的分数

没有看明白这个条件的我敲了一天的暴力搜索每题的总分。。打出一万个BUG。。可能已经是一条咸鱼了。。

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<math.h>
#include<map>
#include<string>
#include<vector>
#include<queue>
#include<iostream>
using namespace std ;
#define L long long
#define pb push_back int n ;
int a[130][10] ;
int b[10] ;
int m ; int fs[8] = {0,500,1000,1500,2000,2500,3000} ;
int js[8] = {0,1,2,4,8,16,32} ; int zh(int x , int nn) {
if(x * 32 <= nn) return 6 ;
if(x * 16 <= nn) return 5 ;
if(x * 8 <= nn) return 4 ;
if(x * 4 <= nn) return 3 ;
if(x * 2 <= nn) return 2 ;
return 1 ;
} int vol[10][10] ; int lv[20] ;
int c[20] ;
int d[20] ; int main () {
cin >> n ;
memset(b, 0 , sizeof(b)) ;
for(int i = 1 ; i <= n ; i ++ ) {
for(int j = 1 ; j <= 5 ; j ++ ) {
cin >> a[i][j] ;
if(a[i][j] != -1) {
b[j] ++ ;
}
}
} for(int ans = 0 ; ans <= 3200000 ; ans ++ ) {
int df1 = 0 , df2 = 0 ;
for(int i = 1 ; i <= 5 ; i ++ ) {
d[i] = b[i] ;
if(a[1][i] == -1) continue ;
if(a[2][i] == -1) continue ;
if(a[1][i] > a[2][i]) {
d[i] = b[i] + ans ;
}
}
for(int i = 1 ; i <= 5 ; i ++ ) {
if(a[1][i] != -1) df1 += fs[zh(d[i] , n + ans)] / 250 * (250 - a[1][i]) ;
if(a[2][i] != -1) df2 += fs[zh(d[i] , n + ans)] / 250 * (250 - a[2][i]) ;
}
if(df1 > df2) {
printf("%d\n" , ans) ;
return 0;
}
if(ans == 3200000) {
printf("-1\n") ;
}
}
}

Codeforces Round #412 div2 ABCD的更多相关文章

  1. Codeforces Round #539 div2

    Codeforces Round #539 div2 abstract I 离散化三连 sort(pos.begin(), pos.end()); pos.erase(unique(pos.begin ...

  2. 【前行】◇第3站◇ Codeforces Round #512 Div2

    [第3站]Codeforces Round #512 Div2 第三题莫名卡半天……一堆细节没处理,改一个发现还有一个……然后就炸了,罚了一啪啦时间 Rating又掉了……但是没什么,比上一次好多了: ...

  3. Codeforces Round#320 Div2 解题报告

    Codeforces Round#320 Div2 先做个标题党,骗骗访问量,结束后再来写咯. codeforces 579A Raising Bacteria codeforces 579B Fin ...

  4. Codeforces Round #564(div2)

    Codeforces Round #564(div2) 本来以为是送分场,结果成了送命场. 菜是原罪 A SB题,上来读不懂题就交WA了一发,代码就不粘了 B 简单构造 很明显,\(n*n\)的矩阵可 ...

  5. Codeforces Round #361 div2

    ProblemA(Codeforces Round 689A): 题意: 给一个手势, 问这个手势是否是唯一. 思路: 暴力, 模拟将这个手势上下左右移动一次看是否还在键盘上即可. 代码: #incl ...

  6. Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3)(A.B.C,3道暴力题,C可二分求解)

    A. Is it rated? time limit per test:2 seconds memory limit per test:256 megabytes input:standard inp ...

  7. Codeforces Round#412 Div.2

    A. Is it rated? 题面 Is it rated? Here it is. The Ultimate Question of Competitive Programming, Codefo ...

  8. Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3) A B C D 水 模拟 二分 贪心

    A. Is it rated? time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  9. Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3) D - Dynamic Problem Scoring

    地址:http://codeforces.com/contest/807/problem/D 题目: D. Dynamic Problem Scoring time limit per test 2 ...

随机推荐

  1. Python2.6升级Python2.7

    Python2.6升级2.7 由于Centos6系列自带的python版本为2.6.6,然而有很多应用需要依赖于python2.7来实现,所以有了这个升级的需求.升级原理很简单,无非就是下载.编译.安 ...

  2. PNG透明兼容IE6的几种方法

    方法一:css方式,写一个属性hack,使用滤镜来解决png在ie6下不兼容的问题. _filter: progid:DXImageTransform.Microsoft.AlphaImageLoad ...

  3. fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory

    stdint.h是c99标准的头文件,vc不支持,所以肯定会提示“No such file or directory”的. stdint.h是C99的标准,主要用于统一跨平台数据定义. MSVC中不带 ...

  4. getTrim(strMz)-我的JavaScript函数库-mazey.js

    因为一些旧版本的浏览器对于JS的trim()不支持,所以可以用正则代替此功能. 参数:strMz,字符串,必需. function getTrim(strMz) {    return strMz.r ...

  5. python并发编程&IO模型

    一 IO模型介绍 为了更好地了解IO模型,可先回顾下:同步.异步.阻塞.非阻塞 同步(synchronous) IO和异步(asynchronous) IO,阻塞(blocking) IO和非阻塞(n ...

  6. pycharm 用鼠标滚动调整字体大小

  7. PyNest——part 2: populations of neurons

    part 2: populations of neurons introduction 在这篇讲义中,我们着眼于创建和参数化神经元批次,并将它们连接起来. 当你完成这些材料时,你会知道如何: 创建具有 ...

  8. redis3.2.11单机多实例集群部署并测试连接情况

    配置准备: redis3.2.11安装配置规划 机器 192.168.169.135(本机虚拟机) 系统 Red Hat Enterprise Linux Server release 6.4 (Sa ...

  9. SQL SERVER 2005 Express版, 精简版 下载

      Microsoft SQL Server 2005 Express Edition(数据库) https://www.microsoft.com/zh-CN/download/details.as ...

  10. Yii2.0数据库查询实例(三)

    常用查询: // WHERE admin_id >= 10 LIMIT 0,10 User::find()->])->offset()->limit()->all() / ...