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. 43、android:screenOrientation

    android:screenOrientationThe orientation of the activity's display on the device. The value can be a ...

  2. iOS学习笔记(四)——iOS应用程序生命周期

    开发应用程序都要了解其生命周期,开始接触android时也是从应用程序生命周期开始的,android的应用程序生命周期更多是其组件的生命周期,例如Activity.Service.今天我们接触一下iO ...

  3. 项目中调用ExcelCom组件时的配置流程

    异常提示如下:         Microsoft Office Excel 不能访问文件“*.xls”. 可能的原因有:        1 文件名称或路径不存在.       2 文件正被其他程序使 ...

  4. window.XMLHttpRequest对象详解

    来自:http://blog.csdn.net/lccone/article/details/7743946 window.XMLHttpRequest XMLHttpRequest对象是当今所有AJ ...

  5. UTF-8, UTF-16, UTF-32 & BOM

    FAQ - UTF-8, UTF-16, UTF-32 & BOM http://www.unicode.org/faq/utf_bom.html General questions, rel ...

  6. ASP非法赋值

    Microsoft VBScript 运行时错误 错误 '800a01f5' 非法赋值: 'isCloudSpeedupMz' /records/config/class-records.asp,行 ...

  7. 2014-08-28——PC端几款主流浏览器的内核

    Trident(IE浏览器) Mozilla(Gecko)(熟悉的有Firefox,Flock等浏览器) WebKit(熟悉的有Safari.Chrome等浏览器) Opera(presto)(Ope ...

  8. MySQL版本与工具

    MySQL各个版本区别 MySQL 的官网下载地址:http://www.mysql.com/downloads/ 在这个下载界面会有几个版本的选择. 1. MySQL Community Serve ...

  9. dataTables的导出Excel功能

    Datatables它是一款基于jQuery表格插件,钟情于它操作dom的灵活.做后台的同学想必使用它能事半功倍,而且交互强.容易扩展. 我也是最近要做公司后台界面,表格涉及的很多,所以考虑使用DT, ...

  10. linux下查看cpu,内存,硬盘等硬件信息的方法

    说明:Linux下可以在/proc/cpuinfo中看到每个cpu的详细信息.但是对于双核的cpu,在cpuinfo中会看到两个cpu.常常会让人误以为是两个单核的cpu. 一.linux CPU大小 ...