11.06水题比赛

题目 描述 做法
\(BSOJ5150\) 求\(n\)个数两两之差的中位数 二分中位数,双指针判定\(\le x\)差值对数
\(BSOJ5151\) 求树的最大匹配和其个数 来一遍\(dp\),转移中途计数
\(BSOJ5152\) 求丢一张麻将后最大听牌数 爆搜

\(T1\)

二分中位数,从小到大求出每个点与最小的使得他们差值小于等于\(x\)的位置累加区间,判定两倍是否多于\(\frac{n(n-1)}{2}\)

注意偶数还要二分一次以\(\frac{n(n-1)}{2}\)为基准

\(T2\)

模拟最大匹配即可

注意什么时候该加

懒得打公式

\(T3\)

爆搜

11.06水题Test的更多相关文章

  1. Comet OJ - Contest #11 A 水题

    Code: #include <bits/stdc++.h> #define N 3000000 using namespace std; char str[N]; int main() ...

  2. 11.07图论水题Test

    11.07图论水题Test 题目 描述 做法 \(BSOJ6378\) 在\(i\)位置可以到\(i+a_i\)或\(i+b_i\)求\(1\rightarrow n\)字典序最小路径 判可达性后贪心 ...

  3. [poj2247] Humble Numbers (DP水题)

    DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...

  4. 烟大 Contest1024 - 《挑战编程》第一章:入门 Problem A: The 3n + 1 problem(水题)

    Problem A: The 3n + 1 problem Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 14  Solved: 6[Submit][St ...

  5. ytu 1304:串的简单处理(水题)

    串的简单处理 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 39  Solved: 11[Submit][Status][Web Board] Desc ...

  6. ytu 1301:Excel地址转换(水题,进制转换)

    Excel地址转换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 41  Solved: 11[Submit][Status][Web Board] D ...

  7. hdu 2041:超级楼梯(水题,递归)

    超级楼梯 Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Su ...

  8. fzuoj Problem 2182 水题

    http://acm.fzu.edu.cn/problem.php?pid=2182 Problem 2182 水题 Accept: 188    Submit: 277Time Limit: 100 ...

  9. Codeforces Gym 100531G Grave 水题

    Problem G. Grave 题目连接: http://codeforces.com/gym/100531/attachments Description Gerard develops a Ha ...

随机推荐

  1. APUE之第5章——标准I/O库

    一.知识回顾:文件I/O 文件 I/O 是不带缓冲的 I/O(unbuffered I/O),指每个 read 和 write 都调用内核中的一个系统调用. 对于内核而言,所有打开的文件都通过文件描述 ...

  2. [shell] while read line 与for循环的区别

    [shell] while read line 与for循环的区别 while read line 与for循环的区别---转载整理 while read line 是一次性将文件信息读入并赋值给变量 ...

  3. Oracle的视图和索引

    学习笔记: ##视图     * 概念:视图就是提供一个查询的窗口,所有数据来自于原表.     * 方法:         * 查询语句创建表:             * create table ...

  4. 前端1-----HTML了解,内联标签(图片,超链接锚点,超链接邮箱)

    前端1-----HTML了解,内联标签(图片,超链接锚点,超链接邮箱) 一丶自定制B/S # -*-coding:utf-8-*- # Author:Ds import socket IP_PORT= ...

  5. [Linux] 树莓派编译python3.7.4

    python3.7.4 源码编译后遇到ssl错误: pip is configured with locations that require TLS/SSL, however the ssl mod ...

  6. Nginx 开启status用以监控状态信息

    Nginx 可以通过with-http_stub_status_module模块来监控nginx的一些状态信息.1.通过nginx -V来查看是否有with-http_stub_status_modu ...

  7. 禁用浏览器自动给input填充账号和密码

    如果input输入框type为text,设置autoComplete="off" <el-input v-model="ruleForm.loginId" ...

  8. Python列表,元组,字典,集合

    列表 Python中列表是可变的,这是它区别于字符串和元组的最重要的特点,一句话概括即:列表可以修改,而字符串和元组不能. 列表追加数据的方法:append(),extend(数组),insert(位 ...

  9. GitHub Python项目推荐|瓦力Devops开源项目代码部署平台持续部署

    GitHub Python项目推荐|walle - 瓦力 Devops开源项目代码部署平台 项目热度 标星(star):8418 (很不错的实用项目,大神作品,建议关注) 标星趋势 关注(watch) ...

  10. 解决vue多次提交

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <template>  <button @click="subm ...