随笔分类 - 二分/三分
摘要:[IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2)] -D. Delivery Bears (二分+最大流) 题面: 题意: 给定一个含有$\mathit n$个节点$\mathit m$个有向边的图和$\mathit x$个工作小熊。保证有一个$
阅读全文
摘要:2020ICPC·小米 网络选拔赛第二场 A-2020(二分答案) 题面: 题意: 给定一个只含有$0,1,2$的字符串,现在问你可以把字符串最多分成多少个互不相交的子序列,其中每一个子序列是$2020$. 思路: 在区间$[0,\frac{4}]$ 中二分答案,对于当前的需要check的答案$mi
阅读全文
摘要:[HDU - 5954 ] Do not pour out( 几何,二分法,积分) HDU - 5954 题意: 你有一个圆柱杯。底部直径为2个单位,高度为2个单位。 杯中的液位高度为d(0≤d≤2)。当您将杯子倾斜到最大角度以致没有倒出内部液体时,液体表面的面积是多少? 思路: 代码: #incl
阅读全文
摘要:Rebuild-HDU - 5531 (计算几何) 题目链接: HDU - 5531 题意: 给定一个含有$\mathit n$ 个节点的闭合图形(\(i-i+1\) 连边,\(\text 1\) 和$\mathit n$ 连边),要求你以每一个节点为圆心做一个半径值大于零的圆,且相邻节点的圆相切。
阅读全文
摘要:2020杭电多校6,HDU- 6830- Asteroid in Love (几何,凸包) Problem Description During the summer vacation, the geoscience community launched a constellation observ
阅读全文
摘要:hdu-6749 Mosquito (二分,最大流,优化建图) 2020 年百度之星·程序设计大赛 - 初赛一0 Mosquito Problem Description 房间是个 n∗m 的网格,一共有 k 个窗户,都在上下左右四条边上。在第 0 时刻,每个窗户对应的格子上都会出现若干只蚊子。 蚊
阅读全文
摘要:牛客练习赛61 E 相似的子串(hash+二分) 链接:https://ac.nowcoder.com/acm/contest/5026/E 来源:牛客网 题目描述 给定一个字符串,要求取出k个位置不相交的子串,且他们之间任意两个的最长公共前缀的长度均不小于x。现在给出k,求最大的x。 两个
阅读全文
摘要:[Codeforces Round 320 (Div. 2) E. Weakness and Poorness (三分/二分) E. Weakness and Poorness time limit per test 2 seconds memory limit per test 256 megab
阅读全文
摘要:AtCoder Beginner Contest 155 D Pairs , E Payment 题解 D Pairs We have NN integers A1,A2,...,ANA1,A2,...,AN. There are N(N−1)2N(N−1)2 ways to choose two
阅读全文
摘要:AtCoder Beginner Contest 063 D Widespread (二分答案) Time Limit: 2 sec / Memory Limit: 256 MB Score : 400 points Problem Statement You are going out for a
阅读全文
摘要:[Hello 2020] D. New Year and Conference (ST表,排序) D. New Year and Conference time limit per test 2 seconds memory limit per test 1024 megabytes input s
阅读全文
摘要:牛客练习赛51 E 数列 链接:https://ac.nowcoder.com/acm/contest/1083/E来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %ll
阅读全文
摘要:G. Castle Defense time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output standard output Today you are going
阅读全文
摘要:G. List Of Integers time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output Let's denote as L (
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/894/B?&headNav=acm 来源:牛客网 华华送奕奕小礼物 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/148/J?&headNav=acm 来源:牛客网 Rikka with Nickname 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Form
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/881/A 来源:牛客网 Equivalent Prefixes 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描
阅读全文
摘要:There are N schedules, the i th schedule has start time si and end time ei (1 题意: 思路: 先把每一个任务按照起始时间排序,然后用一个multiset维护每一个机器在做任务的终止时间, 对于每一个任务,我们去multis
阅读全文
摘要:You are given an array a consisting of n integers, and additionally an integer m. You have to choose some sequence of indices b1, b2, ..., bk (1 ≤ b1
阅读全文
摘要:Problem Statement You are given two integer sequences, each of length N: a1,…,aN and b1,…,bN. There are N2 ways to choose two integers i and j such th
阅读全文

浙公网安备 33010602011771号