02 2024 档案
摘要:错综的统一 题目描述 小红拿到了一个仅由 'r'、'e'、'd' 三种字母组成的矩阵,共 行 列。 小红定义一个矩形区域是美丽的,当且仅当:在该矩形区域中,任意横向或者纵向取一个长度大于1的连续子串时,该字符串都不是回文的。 现在小红有若干次询问,每次给定一个矩形区域,问最少修改多少
阅读全文
摘要:THUSCH2017] 大魔法师 题目描述 大魔法师小 L 制作了 个魔力水晶球,每个水晶球有水、火、土三个属性的能量值。小 L 把这 个水晶球在地上从前向后排成一行,然后开始今天的魔法表演。 我们用 分别表示从前向后第 个水晶球(下标从
阅读全文
摘要:C. Sasha and Array Sasha has an array of integers . You have to perform m queries. There might be queries of two types:
阅读全文
摘要:tomorin的字符串迷茫值 题目描述 tomorin定义一个字符串的迷茫值为该字符串包含"mygo"连续子串的个数。例如"mygomygo"、"itsmygo"的迷茫值分别为 2,1,而"bangdream"的迷茫值为 0。 现在tomorin有一个字符串,她准备删除一些字符,但不能删除两个连续字
阅读全文
摘要:方块掉落 题目描述 最近阿宁对一个名叫“方块掉落”的游戏感兴趣,沉迷于此。 每局游戏一开始,有一条无限长的水平线、一个箭头、一个操作序列 ,没有任何方块。 操作序列 是一个字符串,仅包含"YBR"三种字符,分别代表颜色黄蓝红。依次按照操作序列 掉落不同颜色的方块。 如果即将掉落
阅读全文
摘要:G. Moving Platforms There is a game where you need to move through a labyrinth. The labyrinth consists of platforms, connected by passages. Ea
阅读全文
摘要:F - Breakdown Problem Statement You are given a simple undirected graph consisting of vertices and edges. For , the -t
阅读全文
摘要:Minimize OR of Remaining Elements Using Operations You are given a 0-indexed integer array nums and an integer k. In one operation, you can pick any i
阅读全文
摘要:小苯的逆序对 题目描述 小苯有一个长度为 的排列 。他很想知道这个排列中有多少个逆序对满足互素。 形式化的,有多少个满足 且 且 的 对。 输入描述: 输入包含两行。 第一行一个正整数
阅读全文
摘要:D. Sasha and a Walk in the City Sasha wants to take a walk with his girlfriend in the city. The city consists of intersections, numbered from
阅读全文
摘要:数组成鸡 题目描述 小鸡有一个由整数组成的数组,小鸡可以对这个数组进行任意次(可以不进行)全数组每个数加一或全数组每个数减一的操作。 现在,小鸡想让你回答 次询问,每次询问给出一个整数 ,你需要回答任意次(可以不操作)操作后是否可以使得给定数组的乘积等于给出的整数 。 输入描述:
阅读全文
摘要:G. One-Dimensional Puzzle You have a one-dimensional puzzle, all the elements of which need to be put in one row, connecting with each other. All the
阅读全文
摘要:D. Lonely Mountain Dungeons Once, the people, elves, dwarves, and other inhabitants of Middle-earth gathered to reclaim the treasures stolen from them
阅读全文
摘要:E. Space Harbour There are points numbered to on a straight line. Initially, there are harbours. The -th harbour is at point
阅读全文
摘要:E. Klever Permutation You are given two integers and (), where is even. A permutation of length is an array consisting of
阅读全文
摘要:G. Paint Charges A horizontal grid strip of cells is given. In the -th cell, there is a paint charge of size . This charge can be: either
阅读全文
摘要:Tokitsukaze and Slash Draw 题目描述 在游戏王中有一张魔法卡叫做「一击必杀!居合抽卡」。 简单来说,当你发动这张卡后,你会从卡组最上方抽取一张卡,如果那张卡是「一击必杀!居合抽卡」的情况下,有大概率''一击必杀''打败对手。通常这张卡被玩家们称作''拔刀''。 在游戏王中,
阅读全文
摘要:F - Product Equality Problem Statement You are given integers .Find the number of triples of integers that satis
阅读全文
摘要:G - Smaller Sum Problem Statement You are given a sequence of length . Answer the following queries. The -th query i
阅读全文
摘要:[SDOI2009] HH的项链 题目描述 HH 有一串由各种漂亮的贝壳组成的项链。HH 相信不同的贝壳会带来好运,所以每次散步完后,他都会随意取出一段贝壳,思考它们所表达的含义。HH 不断地收集新的贝壳,因此,他的项链变得越来越长。 有一天,他突然提出了一个问题:某一段贝壳中,包含了多少种不同的贝
阅读全文
摘要:C. Did We Get Everything Covered? You are given two integers and along with a string . Your task is to check whether all possible strings o
阅读全文
摘要:D. Good Trip There are children in a class, pairs among them are friends. The -th pair who are friends have a friendship value of . Th
阅读全文
摘要:E - Revenge of "The Salary of AtCoder Inc." Problem Statement Aoki, an employee at AtCoder Inc., has his salary for this month determined by an intege
阅读全文