03 2023 档案

摘要:魔法 C 国由 n 座城市与 m 条有向道路组成,城市与道路都从 1 开始编号,经过 i 号道路需要 ti 的费用。 现在你要从 1 号城市出发去 n 号城市,你可以施展最多 K 次魔法,使得通过下一条道路时,需要的费用变为原来的相反数,即费用从 ti阅读全文
posted @ 2023-03-30 12:28 onlyblues 阅读(29) 评论(0) 推荐(0) 编辑
摘要:记录下由 min+ 运算转换成类似于矩阵乘法的推导过程,有错误请在评论区指出 qwq。 我们先简单证明一下矩阵乘法的结合律。设有矩阵 An×mBm×pCp×q,要证明 (AB)C=A(BC)。等价于证 阅读全文
posted @ 2023-03-30 12:25 onlyblues 阅读(421) 评论(2) 推荐(0) 编辑
摘要:佳佳的斐波那契 佳佳对数学,尤其对数列十分感兴趣。 在研究完 Fibonacci 数列后,他创造出许多稀奇古怪的数列。 例如用 S(n) 表示 Fibonacci 前 n 项和 mod m 的值,即 S(n)=(F1+F2++Fn)modm,其中 $ 阅读全文
posted @ 2023-03-28 20:26 onlyblues 阅读(40) 评论(0) 推荐(0) 编辑
摘要:C. Candy Store The store sells n types of candies with numbers from 1 to n. One candy of type i costs bi coins. In total, there are ai c 阅读全文
posted @ 2023-03-27 23:00 onlyblues 阅读(129) 评论(0) 推荐(0) 编辑
摘要:D. Binary String Sorting You are given a binary string s consisting of only characters 0 and/or 1. You can perform several operations on this string 阅读全文
posted @ 2023-03-24 10:08 onlyblues 阅读(171) 评论(0) 推荐(0) 编辑
摘要:最长公共上升子序列 熊大妈的奶牛在小沐沐的熏陶下开始研究信息题目。 小沐沐先让奶牛研究了最长上升子序列,再让他们研究了最长公共子序列,现在又让他们研究最长公共上升子序列了。 小沐沐说,对于两个数列 AB,如果它们都包含一段位置不一定连续的数,且数值是严格递增的,那么称这一段数是两个数列 阅读全文
posted @ 2023-03-21 12:00 onlyblues 阅读(52) 评论(0) 推荐(0) 编辑
摘要:C. Sequence Master For some positive integer m, YunQian considers an array q of 2m (possibly negative) integers good, if and only if for every p 阅读全文
posted @ 2023-03-19 18:01 onlyblues 阅读(206) 评论(0) 推荐(0) 编辑
摘要:关押罪犯 S 城现有两座监狱,一共关押着 N 名罪犯,编号分别为 1N。 他们之间的关系自然也极不和谐。 很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。 我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。 阅读全文
posted @ 2023-03-17 20:06 onlyblues 阅读(38) 评论(0) 推荐(0) 编辑
摘要:E. Music Festival The boy Vitya loves to listen to music very much. He knows that n albums are due to be released this Friday, i-th of which conta 阅读全文
posted @ 2023-03-15 12:17 onlyblues 阅读(30) 评论(0) 推荐(0) 编辑
摘要:C. The Very Beautiful Blanket Kirill wants to weave the very beautiful blanket consisting of n×m of the same size square patches of some colo 阅读全文
posted @ 2023-03-15 09:18 onlyblues 阅读(114) 评论(0) 推荐(0) 编辑
摘要:C. Pull Your Luck While James is gone on business, Vesper takes her time and explores what the legendary Casino Royale has to offer to people who are 阅读全文
posted @ 2023-03-14 20:11 onlyblues 阅读(231) 评论(0) 推荐(0) 编辑
摘要:A. Lame King You are given a checkerboard of size 201×201, i. e. it has 201 rows and 201 columns. The rows of this checkerboard are numbe 阅读全文
posted @ 2023-03-14 17:07 onlyblues 阅读(55) 评论(0) 推荐(0) 编辑
摘要:前言 由于解决这个问题的做法完全是我个人主观完成的,因此可能会存在很严重的错误,如果发现任何的问题与错误请在评论区进行提出指正。还有这个问题在数论中应该有个专业的名词,如果有人知道的话也麻烦在评论区留言告知。 正文 本文尝试解决的问题为:对于 xZ阅读全文
posted @ 2023-03-14 15:20 onlyblues 阅读(51) 评论(0) 推荐(0) 编辑
摘要:最短路之和 给定一个 n 个点的加权有向图,点的编号为 1n。 图中任意两点之间都有两条方向相反的边连接两点。 从点 i 到点 j 的边的长度为 aij。 给定一个 1n 的排列 x1,x2,,xn。 你需要对该图依次进 阅读全文
posted @ 2023-03-12 17:53 onlyblues 阅读(50) 评论(0) 推荐(0) 编辑
摘要:聪明的燕姿 城市中人们总是拿着号码牌,不停寻找,不断匹配,可是谁也不知道自己等的那个人是谁。 可是燕姿不一样,燕姿知道自己等的人是谁,因为燕姿数学学得好! 燕姿发现了一个神奇的算法:假设自己的号码牌上写着数字 S,那么自己等的人手上的号码牌数字的所有正约数之和必定等于 S。 所以燕姿总是拿着 阅读全文
posted @ 2023-03-11 15:54 onlyblues 阅读(98) 评论(0) 推荐(0) 编辑
摘要:D. Buying gifts Little Sasha has two friends, whom he wants to please with gifts on the Eighth of March. To do this, he went to the largest shopping c 阅读全文
posted @ 2023-03-09 23:43 onlyblues 阅读(282) 评论(2) 推荐(0) 编辑
摘要:城市通电 平面上遍布着 n 座城市,编号 1n。 第 i 座城市的位置坐标为 (xi,yi)。 不同城市的位置有可能重合。 现在要通过建立发电站和搭建电线的方式给每座城市都通电。 一个城市如果建有发电站,或者通过电线直接或间接的与建有发电站的城市保持连通,则该城市通电 阅读全文
posted @ 2023-03-09 14:36 onlyblues 阅读(33) 评论(0) 推荐(0) 编辑
摘要:构造有向无环图 给定一个由 n 个点和 m 条边构成的图。 不保证给定的图是连通的。 图中的一部分边的方向已经确定,你不能改变它们的方向。 剩下的边还未确定方向,你需要为每一条还未确定方向的边指定方向。 你需要保证在确定所有边的方向后,生成的图是一个有向无环图(即所有边都是有向的且没有有向环 阅读全文
posted @ 2023-03-08 20:01 onlyblues 阅读(302) 评论(0) 推荐(0) 编辑
摘要:作物杂交 作物杂交是作物栽培中重要的一步。 已知有 N 种作物 (编号 1N),第 i 种作物从播种到成熟的时间为 Ti。 作物之间两两可以进行杂交,杂交时间取两种中时间较长的一方。 如作物 A 种植时间为 5 天,作物 B 种植时间为 7 天,则 $AB 阅读全文
posted @ 2023-03-08 12:02 onlyblues 阅读(173) 评论(0) 推荐(0) 编辑
摘要:异或值 给定一个长度为 n 的整数序列 a1,a2,,an。 请你找到一个非负整数 X,使得 max1in{aiX} 的值尽可能小,其中 表示按位异或。 输出 $\max 阅读全文
posted @ 2023-03-05 20:44 onlyblues 阅读(99) 评论(0) 推荐(0) 编辑
摘要:F. Dasha and Nightmares Dasha, an excellent student, is studying at the best mathematical lyceum in the country. Recently, a mysterious stranger broug 阅读全文
posted @ 2023-03-04 16:43 onlyblues 阅读(98) 评论(0) 推荐(0) 编辑
摘要:D. Remove Two Letters Dmitry has a string s, consisting of lowercase Latin letters. Dmitry decided to remove two consecutive characters from the str 阅读全文
posted @ 2023-03-04 14:36 onlyblues 阅读(164) 评论(0) 推荐(0) 编辑
摘要:D. Maximum Subarray You are given an array a1,a2,,an, consisting of n integers. You are also given two integers k and x. You have t 阅读全文
posted @ 2023-03-04 10:14 onlyblues 阅读(134) 评论(0) 推荐(0) 编辑
摘要:C. Maximum Set A set of positive integers S is called beautiful if, for every two integers x and y from this set, either x divides y or y 阅读全文
posted @ 2023-03-03 21:53 onlyblues 阅读(57) 评论(0) 推荐(0) 编辑
摘要:D. Serval and Shift-Shift-Shift Serval has two n-bit binary integer numbers a and b. He wants to share those numbers with Toxel. Since Toxel lik 阅读全文
posted @ 2023-03-01 21:05 onlyblues 阅读(66) 评论(0) 推荐(0) 编辑
摘要:最大数量 一个无向图有 n 个点,编号 1n。 这些点之间没有任何边。 给定 d 个需求,编号 1d。 其中,第 i 个需求是让点 xi 和点 yi 连通。 需求可能存在重复。 在本题中,你需要依次解决 d 个问题,编号 $1 \sim d 阅读全文
posted @ 2023-03-01 10:46 onlyblues 阅读(12) 评论(0) 推荐(0) 编辑

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