摘要: 题目描述 Manao came up with a solution that produces the correct answers but is too slow. You are given the pseudocode of his solution, where the function 阅读全文
posted @ 2021-02-17 21:19 lrj124 阅读(72) 评论(0) 推荐(0)
摘要: 题目描述 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 阅读(86) 评论(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 阅读(75) 评论(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 阅读(70) 评论(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 阅读(145) 评论(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 阅读(81) 评论(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 阅读(1427) 评论(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 阅读(99) 评论(0) 推荐(0)
摘要: 其实就是把二进制数放在 Trie 上面,然后就可以解决很多问题 最大 xor 数对 就是把所有的数插到 Trie 上,每次查询每一位上有不同就走不同的边 #include <algorithm> #include <cstdio> using namespace std; const int max 阅读全文
posted @ 2020-11-25 22:40 lrj124 阅读(138) 评论(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 阅读(94) 评论(0) 推荐(0)