11 2023 档案

摘要:D2. Xor-Subsequence (hard version) It is the hard version of the problem. The only difference is that in this version ai109. You are given an 阅读全文
posted @ 2023-11-29 17:40 onlyblues 阅读(12) 评论(0) 推荐(0) 编辑
摘要:D1. Xor-Subsequence (easy version) It is the easy version of the problem. The only difference is that in this version ai200. You are given an 阅读全文
posted @ 2023-11-29 16:21 onlyblues 阅读(11) 评论(0) 推荐(0) 编辑
摘要:Count Beautiful Substrings II You are given a string s and a positive integer k. Let vowels and consonants be the number of vowels and consonants in a 阅读全文
posted @ 2023-11-28 09:17 onlyblues 阅读(22) 评论(0) 推荐(0) 编辑
摘要:Make Lexicographically Smallest Array by Swapping Elements You are given a 0-indexed array of positive integers nums and a positive integer limit. In 阅读全文
posted @ 2023-11-28 09:17 onlyblues 阅读(34) 评论(0) 推荐(0) 编辑
摘要:D. Small GCD Let a, b, and c be integers. We define function f(a,b,c) as follows: Order the numbers a, b, c in such a way that $a \le 阅读全文
posted @ 2023-11-27 18:30 onlyblues 阅读(210) 评论(1) 推荐(1) 编辑
摘要:D. Ones and Twos You are given a 1-indexed array a of length n where each element is 1 or 2. Process q queries of the following two types: 阅读全文
posted @ 2023-11-26 21:17 onlyblues 阅读(32) 评论(0) 推荐(0) 编辑
摘要:D. Letter Picking Alice and Bob are playing a game. Initially, they are given a non-empty string s, consisting of lowercase Latin letters. The lengt 阅读全文
posted @ 2023-11-25 14:19 onlyblues 阅读(5) 评论(0) 推荐(0) 编辑
摘要:【模板】可持久化线段树 2 题目背景 这是个非常经典的可持久化权值线段树入门题——静态区间第 k 小。 数据已经过加强,请使用可持久化权值线段树。同时请注意常数优化。 题目描述 如题,给定 n 个整数构成的序列 a,将对于指定的闭区间 [l,r] 查询其区间内的第 k 小值。 阅读全文
posted @ 2023-11-23 20:08 onlyblues 阅读(60) 评论(0) 推荐(0) 编辑
摘要:F. A Growing Tree You are given a rooted tree with the root at vertex 1, initially consisting of a single vertex. Each vertex has a numerical value, 阅读全文
posted @ 2023-11-22 15:04 onlyblues 阅读(31) 评论(0) 推荐(1) 编辑
摘要:D. Absolute Beauty Kirill has two integer arrays a1,a2,,an and b1,b2,,bn of length n. He defines the absolute beauty of the ar 阅读全文
posted @ 2023-11-21 18:27 onlyblues 阅读(27) 评论(0) 推荐(0) 编辑
摘要:G. Unusual Entertainment A tree is a connected graph without cycles. A permutation is an array consisting of n distinct integers from 1 to n in 阅读全文
posted @ 2023-11-21 09:55 onlyblues 阅读(45) 评论(1) 推荐(1) 编辑
摘要:最近接触到一些 DFS 序的题,它可以用来解决一些关于子树的问题。 DFS 序本质就是一棵树在深度优先搜索时访问节点的顺序。比如有下面一棵树,其 DFS 序就是 124785369。 DFS 序有一个很重要的性质,以节点 u阅读全文
posted @ 2023-11-19 22:17 onlyblues 阅读(40) 评论(0) 推荐(0) 编辑
摘要:[SHOI2007] 园丁的烦恼 题目背景 很久很久以前,在遥远的大陆上有一个美丽的国家。统治着这个美丽国家的国王是一个园艺爱好者,在他的皇家花园里种植着各种奇花异草。 有一天国王漫步在花园里,若有所思,他问一个园丁道: “最近我在思索一个问题,如果我们把花坛摆成六个六角形,那么……” “那么本质上 阅读全文
posted @ 2023-11-19 16:53 onlyblues 阅读(48) 评论(0) 推荐(0) 编辑
摘要:F - Apples Problem Statement There are apple trees lined up on a number line, and N apples fall from the trees.Specifically, for each $1\leq i\leq N 阅读全文
posted @ 2023-11-17 18:32 onlyblues 阅读(23) 评论(0) 推荐(0) 编辑
摘要:【模板】扫描线 题目描述 求 n 个四边平行于坐标轴的矩形的面积并。 输入格式 第一行一个正整数 n。 接下来 n 行每行四个非负整数 x1,y1,x2,y2,表示一个矩形的四个端点坐标为 $(x_1, y_1),(x_1, y_2),(x_2, y_2),(x_2, 阅读全文
posted @ 2023-11-16 13:46 onlyblues 阅读(149) 评论(0) 推荐(0) 编辑
摘要:D. Score of a Tree You are given a tree of n nodes, rooted at 1. Every node has a value of either 0 or 1 at time t=0. At any integer time $t 阅读全文
posted @ 2023-11-14 16:35 onlyblues 阅读(13) 评论(0) 推荐(0) 编辑
摘要:D. Counting Factorizations The prime factorization of a positive integer m is the unique way to write it as $\displaystyle m=p_1^{e_1}\cdot p_2^{e_2 阅读全文
posted @ 2023-11-13 20:04 onlyblues 阅读(10) 评论(0) 推荐(0) 编辑
摘要:[USACO22OPEN] Apple Catching G 题目描述 天上下苹果了!在某些时刻,一定数量的苹果会落到数轴上。在某些时刻,Farmer John 的一些奶牛将到达数轴并开始接苹果。 如果一个苹果在没有奶牛接住的情况下落到数轴上,它就会永远消失。如果一头奶牛和一个苹果同时到达,奶牛就会 阅读全文
posted @ 2023-11-10 18:11 onlyblues 阅读(42) 评论(0) 推荐(0) 编辑
摘要:[BalticOI 2019 Day2] 汤姆的餐厅 题目背景 译自 BalticOI 2019 Day2 T1. Tom's Kitchen 题目描述 Tom's Kitchen 是一家非常受欢迎的餐厅,其受欢迎的原因之一是每份菜都由至少 K 名厨师进行准备。今天有 N 份菜需要准 阅读全文
posted @ 2023-11-10 16:20 onlyblues 阅读(14) 评论(0) 推荐(0) 编辑
摘要:D. Neutral Tonality You are given an array a consisting of n integers, as well as an array b consisting of m integers. Let LIS(c) den 阅读全文
posted @ 2023-11-10 10:02 onlyblues 阅读(9) 评论(0) 推荐(0) 编辑
摘要:城市环路 题目描述 一座城市,往往会被人们划分为几个区域,例如住宅区、商业区、工业区等等。 B 市就被分为了以下的两个区域——城市中心和城市郊区。在这两个区域的中间是一条围绕 B 市的环路,环路之内便是 B 市中心。 整个城市可以看做一个 n 个点,n 条边的单圈图(保证图连通),唯一的环便 阅读全文
posted @ 2023-11-08 21:15 onlyblues 阅读(11) 评论(0) 推荐(0) 编辑
摘要:[NOI2016] 区间 题目描述 在数轴上有 n 个闭区间从 1n 编号,第 i 个闭区间为 [li,ri]。 现在要从中选出 m 个区间,使得这 m 个区间共同包含至少一个位置。换句话说,就是使得存在一个 x ,使得对于每一个被选中的区间 $[l_i,r 阅读全文
posted @ 2023-11-06 17:50 onlyblues 阅读(58) 评论(0) 推荐(0) 编辑
摘要:G. wxhtzdy ORO Tree After (finally) qualifying for the IOI 2023, wxhtzdy was very happy, so he decided to do what most competitive programmers do: try 阅读全文
posted @ 2023-11-06 11:34 onlyblues 阅读(25) 评论(0) 推荐(0) 编辑
摘要:E1. Doremy's Drying Plan (Easy Version) The only differences between the two versions of this problem are the constraint on k, the time limit and th 阅读全文
posted @ 2023-11-05 21:56 onlyblues 阅读(65) 评论(0) 推荐(1) 编辑
摘要:D. XOR Construction You are given n1 integers a1,a2,,an1. Your task is to construct an array b1,b2,,bn such that: ever 阅读全文
posted @ 2023-11-05 16:48 onlyblues 阅读(49) 评论(0) 推荐(0) 编辑

Web Analytics
点击右上角即可分享
微信分享提示