随笔分类 -  来源 - Codeforces

摘要:题目描述 An identity permutation of length \(n\) is an array \([1,2,3,\cdots,n]\). We performed the following operations to an identity permutation of len 阅读全文
posted @ 2021-10-05 17:02 lrj124 阅读(95) 评论(0) 推荐(0)
摘要:题目描述 You have an array \(a\) consisting of \(n\) distinct positive integers, numbered from \(1\) to \(n\) . Define \(p_k\) as \(p_k = \sum_{1 \le i, j 阅读全文
posted @ 2021-07-27 15:48 lrj124 阅读(116) 评论(0) 推荐(0)
摘要:题目描述 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 阅读(82) 评论(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 阅读(87) 评论(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 阅读(78) 评论(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 阅读(83) 评论(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 阅读(161) 评论(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 阅读(91) 评论(0) 推荐(0)
摘要:题目描述 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 阅读(107) 评论(0) 推荐(0)
摘要:题面 Given two integers \(n\) and \(x\), construct an array that satisfies the following conditions: for any element ai in the array, \(1\le ai<2^n\); t 阅读全文
posted @ 2019-10-15 20:04 lrj124 阅读(255) 评论(0) 推荐(0)
摘要:Problem - A Tomorrow is a difficult day for Polycarp: he has to attend \(a\) lectures and \(b\) practical classes at the university! Since Polycarp is 阅读全文
posted @ 2019-10-14 21:43 lrj124 阅读(531) 评论(0) 推荐(0)