摘要: 题目描述 You must have heard of the two brothers dreaming of ruling the world. With all their previous plans failed, this time they decided to cooperate w 阅读全文
posted @ 2021-02-01 17:05 lrj124 阅读(55) 评论(0) 推荐(1) 编辑
摘要: 题目描述 You've got an array, consisting of nn integers: \(a_{1},a_{2},...,a_{n}\). Your task is to quickly run the queries of two types: Assign value \(x 阅读全文
posted @ 2021-01-31 16:01 lrj124 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Old MacDonald has a farm and a large potato field, \((10^{10}+1)\times(10^{10}+1)\) square meters in size. The field is divided into square garde 阅读全文
posted @ 2021-01-30 11:33 lrj124 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A process RAM is a sequence of bytes that are indexed from 1 to \(n\) . Polycarpus's program contains such instructions as "memset", that is, the 阅读全文
posted @ 2021-01-29 15:22 lrj124 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 图标需下载 nerd 字体否则会乱码 Plugin 'scrooloose/nerdtree' set termencoding=utf-8 set fileencoding=chinese set fileencodings=ucs-bom,utf-8,chinese set langmenu=z 阅读全文
posted @ 2020-11-27 14:48 lrj124 阅读(1273) 评论(0) 推荐(1) 编辑
摘要: 题目描述 You are given an array aa consisting of \(n\) non-negative integers. You have to choose a non-negative integer \(x\) and form a new array \(b\) o 阅读全文
posted @ 2020-11-26 22:21 lrj124 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 其实就是把二进制数放在 Trie 上面,然后就可以解决很多问题 最大 xor 数对 就是把所有的数插到 Trie 上,每次查询每一位上有不同就走不同的边 #include <algorithm> #include <cstdio> using namespace std; const int max 阅读全文
posted @ 2020-11-25 22:40 lrj124 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Farmer John 计划建造 N 个农场,用 N-1 条道路连接,构成一棵树。每个农场有一头奶牛,品种为 1 到 N 之间的一个整数 Ti Farmer John 的 M 个朋友经常前来拜访他。在朋友 i 拜访之时,Farmer John 会与他的朋友沿着从农场 Ai 到农场 Bi 之 阅读全文
posted @ 2020-11-25 10:42 lrj124 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 题目大意 Snuke 将 \(N\) 个标志放在一条线上。 第 \(i\) 个标志可以放置在坐标 \(x_i\) 或坐标 $y_i$上。 Snuke 认为当他们中的两个之间的最小距离 \(d\) 更大时,标志看起来更好。找出 \(d\) 的最大可能值。 题解 二分最小值,然后用 2-SAT chec 阅读全文
posted @ 2020-10-29 09:13 lrj124 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题目大意 桌上有 N 堆糖果,第 i 堆糖果有Ai 个糖。两人在玩游戏,轮流进行,每次进行下列两个操作中的一个 将当前最大的那堆糖果全部吃完 将每堆糖果吃掉一个 吃完的人输,假设两人足够聪明,问谁能必胜 1<=n<=105 1<=ai<=109 输出 First(表示第一个人必胜),或 Second 阅读全文
posted @ 2020-08-15 16:16 lrj124 阅读(234) 评论(0) 推荐(0) 编辑