随笔分类 -  暴力/状态压缩/二进制枚举

摘要:2020-CCPC- 长春站 - J. Abstract Painting(状态压缩dp) 题面: 题意: 给定一个整数$\mathit n$,让你在二维平面上画圆,需要满足以下要求: 1、 圆心都在x轴上的整数点。 2、所有圆上的点的x坐标都应该在范围:\([0,n]\) 3、圆的半径需要是一个正 阅读全文
posted @ 2020-11-13 00:44 茄子Min 阅读(410) 评论(0) 推荐(0)
摘要:[2020-CCPC Changchun Onsite]-F. Strange Memory(dsu on tree) 题面: 题意: 给定一个含有$\mathit n$个节点的数,求下式的值。 \[ \sum\limits_{i=1}^n\sum\limits_{j=i+1}^n [a_i \op 阅读全文
posted @ 2020-11-09 17:35 茄子Min 阅读(594) 评论(1) 推荐(1)
摘要:[Grakn Forces 2020]-D. Searchlights (暴力+DP) 题面: 思路: 设数组$c_i$ 代表将所有机器人右移$\mathit i$ 步后,将所有机器人移除探照灯的监视范围至少多少步上移。 那么如何获得数组$\mathit c$呢? 我们$O(n*m)\(枚举每一对机 阅读全文
posted @ 2020-10-03 15:04 茄子Min 阅读(190) 评论(0) 推荐(0)
摘要:hdu-6749 Mosquito (二分,最大流,优化建图) 2020 年百度之星·程序设计大赛 - 初赛一0 Mosquito Problem Description 房间是个 n∗m 的网格,一共有 k 个窗户,都在上下左右四条边上。在第 0 时刻,每个窗户对应的格子上都会出现若干只蚊子。 蚊 阅读全文
posted @ 2020-07-22 01:28 茄子Min 阅读(232) 评论(0) 推荐(0)
摘要:AtCoder Beginner Contest 172-F - Unfair Nim(nim博弈,二进制构造) 题意: 有$\mathit n$堆石子,每一堆有$A_i$个石头,问最少从第一堆中拿出多少个石子(也不能拿完,即拿出的石子数为$[0,A_1-1]\()放在第二堆中可以使\)\mathi 阅读全文
posted @ 2020-07-03 01:47 茄子Min 阅读(301) 评论(0) 推荐(0)
摘要:[Educational Codeforces Round 56 (Rated for Div. 2)] —G. Multidimensional Queries(二进制状压,线段树) Multidimensional Queries time limit per test 6 seconds me 阅读全文
posted @ 2020-06-25 16:08 茄子Min 阅读(184) 评论(0) 推荐(0)
摘要:Codeforces Round #628 (Div. 2)] D-Ehab the Xorcist 题意: 给定两个整数$u,v(0 \le u,v \le 10^{18})$ 让你构造一个长度$\mathit n$最小的数组$arr$,使其: 1、\(arr_1 \oplus arr_2 \op 阅读全文
posted @ 2020-06-19 16:24 茄子Min 阅读(186) 评论(0) 推荐(0)
摘要:[Educational Codeforces Round 82 (Rated for Div. 2)] D. Fill The Bag (二进制拆分,贪心) D. Fill The Bag time limit per test 2 seconds memory limit per test 25 阅读全文
posted @ 2020-02-14 23:09 茄子Min 阅读(193) 评论(0) 推荐(0)
摘要:C. Make a Square time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a positive in 阅读全文
posted @ 2019-07-30 19:25 茄子Min 阅读(273) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/946/B 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262875K,其他语言525750K 64bit IO Format: %lld 题目描述 筱玛是一个热爱阅读的好筱玛,他最喜欢的 阅读全文
posted @ 2019-07-08 19:24 茄子Min 阅读(196) 评论(0) 推荐(0)
摘要:(Noip提高组及以下),有意者请联系Lydsy2012@163.com,仅限教师及家长用户。 2560: 串珠子 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 915 Solved: 603 [Submit][Status][Discuss] De 阅读全文
posted @ 2019-07-08 18:11 茄子Min 阅读(287) 评论(0) 推荐(0)
摘要:题目描述 司令部的将军们打算在N M的网格地图上部署他们的炮兵部队。一个N M的地图由N行M列组成,地图的每一格可能是山地(用“H” 表示),也可能是平原(用“P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示 阅读全文
posted @ 2019-07-08 00:52 茄子Min 阅读(193) 评论(0) 推荐(0)
摘要:题目描述 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子。 注:数据有加强(2018/4/25) 输入输出格式 输入格式: 只有一行,包含两个数N,K ( 1 题意: 思路: 动态规划, 定义状态d 阅读全文
posted @ 2019-07-07 22:02 茄子Min 阅读(205) 评论(0) 推荐(0)
摘要:题目描述 Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy 阅读全文
posted @ 2019-07-07 18:14 茄子Min 阅读(274) 评论(0) 推荐(0)
摘要:24.02% 1000ms 262144K “因材施教”的教育方式自古有之,互联网时代,要实现真正意义上的个性化教育,离不开大数据技术的扶持。VIPKID 英语 2020 多万学员每月在课前预习、课中教学、课后复习、作业、答题测评等环节会产生超过 100100 TB 的数据增量,在对庞大数据进行分析 阅读全文
posted @ 2019-06-17 16:25 茄子Min 阅读(402) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/1/L 来源:牛客网 选择困难症 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 小L有严重的选择困难症。 早上 阅读全文
posted @ 2019-06-10 21:58 茄子Min 阅读(355) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/1/D 来源:牛客网 小M和天平 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 小M想知道某件物品的重量,但是 阅读全文
posted @ 2019-06-09 22:39 茄子Min 阅读(258) 评论(0) 推荐(0)
摘要:Lara Croft, the fiercely independent daughter of a missing adventurer, must push herself beyond her limits when she discovers the island where her fat 阅读全文
posted @ 2019-05-04 13:59 茄子Min 阅读(568) 评论(0) 推荐(0)
摘要:On the way to school, Karen became fixated on the puzzle game on her phone! The game is played as follows. In each level, you have a grid with n rows 阅读全文
posted @ 2019-01-26 11:43 茄子Min 阅读(255) 评论(0) 推荐(0)
摘要:The only difference between easy and hard versions is a number of elements in the array. You are given an array aa consisting of nn integers. The valu 阅读全文
posted @ 2019-01-24 12:34 茄子Min 阅读(650) 评论(0) 推荐(0)