上一页 1 ··· 76 77 78 79 80 81 82 83 84 ··· 97 下一页
摘要: 模型1:区间加法,单点询问 问题:给出一个长为 n 的数列,以及 n 个操作,操作涉及区间加法,单点查值。 对每个块设置一个加法标记,记录这个块中元素一共加了多少,每次操作对整块直接 O(1) 标记,而不完整块元素较少,暴力修改元素的值即可,每次询问时返回元素... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(305) 评论(0) 推荐(0)
摘要: 【题目描述】 给出一个长为 n 的数列,以及 n 个操作,操作涉及询问区间的最小众数。 【输入格式】 第一行输入一个数字 n。 第二行输入 n 个数字,第 i 个数字为 ai,以空格隔开。 接下来输入 n 行询问,每行输入两个数字 l、r,以空格... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(25) 评论(0) 推荐(0)
摘要: 【题目描述】 给出一个长为 n 的数列,以及 n 个操作,操作涉及区间询问等于一个数 c 的元素,并将这个区间的所有元素改为 c。 【输入格式】 第一行输入一个数字 n。 第二行输入 n 个数字,第 i 个数字为 ai,以空格隔开。 接下来输入 ... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(31) 评论(0) 推荐(0)
摘要: 【题目描述】 给出一个长为 n 的数列,以及 n 个操作,操作涉及区间乘法,区间加法,单点询问。 【输入格式】 第一行输入一个数字 n。 第二行输入 n 个数字,第 i 个数字为 ai,以空格隔开。 接下来输入 n 行询问,每行输入四个数字 op... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(10) 评论(0) 推荐(0)
摘要: Problem Description You desperately need to build some string t. For that you've got n more strings s1, s2, ..., sn. To build s... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(19) 评论(0) 推荐(0)
摘要: Problem Description You've got a undirected tree s, consisting of n nodes. Your task is to build an optimal T-decomposition for... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(14) 评论(0) 推荐(0)
摘要: Problem Description You're playing a game called Osu! Here's a simplified version of it. There are n clicks in a game. For each... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(0) 评论(0) 推荐(1)
摘要: Problem Description You've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number ... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(31) 评论(0) 推荐(0)
摘要: Problem Description Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times ... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(37) 评论(0) 推荐(0)
摘要: 【题目描述】 给出一个长为 n 的数列,以及 n 个操作,操作涉及单点插入、单点询问、数据随机生成。 【输入格式】 第一行输入一个数字 n。 第二行输入 n 个数字,第 i 个数字为 ai,以空格隔开。 接下来输入 n 行询问,每行输入四个数字 ... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(16) 评论(0) 推荐(0)
上一页 1 ··· 76 77 78 79 80 81 82 83 84 ··· 97 下一页