摘要: 题目描述 By the age of three Smart Beaver mastered all arithmetic operations and got this summer homework from the amazed teacher: You are given a sequenc 阅读全文
posted @ 2021-02-02 17:26 lrj124 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 阅读(60) 评论(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 阅读(66) 评论(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 阅读(118) 评论(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 阅读(75) 评论(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 阅读(1350) 评论(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 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 其实就是把二进制数放在 Trie 上面,然后就可以解决很多问题 最大 xor 数对 就是把所有的数插到 Trie 上,每次查询每一位上有不同就走不同的边 #include <algorithm> #include <cstdio> using namespace std; const int max 阅读全文
posted @ 2020-11-25 22:40 lrj124 阅读(126) 评论(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 阅读(76) 评论(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) 编辑