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. ThinkPHP部分内置函数

    D.F.S.C.L.A.I 他们都在functions.php这个文件家下面我分别说明一下他们的功能 D() 加载Model类M() 加载Model类 A() 加载Action类L() 获取语言定义C ...

  2. influxDB---数据库操作SQL

    查询 查询不能只查tag标签,一定要加上fields. 如:select val,"班组" FROM "测试表" WHERE dev = 'cs123' and ...

  3. 第六课作业——主从复制和sentinel高可用

    第六课时作业 静哥 by 2016.3.21~2016.4.3   [作业描述] 1.配置主从复制,截图看日志 2.配置一个哨兵,一主一从结构,并实现主宕机从接管的过程,截图显示 3.总结哨兵的原理 ...

  4. ASIHttprequest 报错

    (void)requestReceivedResponseHeaders:(NSMutableDictionary *)newResponseHeaders { if ([self error] || ...

  5. Avoiding Full Table Scans

    w MySQL :: MySQL 5.7 Reference Manual :: 9.2.1.19 Avoiding Full Table Scanshttps://dev.mysql.com/doc ...

  6. diy 重要的不是这个工具怎么解决了问题

    w 0-这个工具解决了什么问题? 1-diy,怎么解决这个工具解决了的问题? 2-是否diy实现?实现了,对比,优化:反之,分析借鉴,吸收优化. 重要的不是git怎样解决了git已经解决的问题.

  7. JdbcUtils 小工具

    // 第一版 // src 目录下 dbconfig.properties 配置文件, 用来配置四大参数 // 注意 properties 配置文件中没有分号结尾, 也没有引号 driverClass ...

  8. Android系统移植与调试之------->如何修改Android设备存储盘符名称与Android设备的型号

    一.修改Android设备存储盘符名称 (注:TBDG1073为我的项目名称) 1.修改device/other/TBDG1073/system.prop 文件 2.修改ro.media.patiti ...

  9. 解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra

    直接运行命令:python -m pip install --upgrade pip

  10. python并发编程之多线程2---(死锁与递归锁,信号量等)

    一.死锁现象与递归锁 进程也是有死锁的 所谓死锁: 是指两个或两个以上的进程或线程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用, 它们都将无法推进下去.此时称系统处于死锁状态或系统 ...