10 2024 档案

摘要:G. Sakurako and Chefir Given a tree with n vertices rooted at vertex 1. While walking through it with her cat Chefir, Sakurako got distracted, and 阅读全文
posted @ 2024-10-25 17:44 onlyblues 阅读(64) 评论(0) 推荐(1) 编辑
摘要:小红的树上路径查询(hard) 题目描述 本题和 hard 难度的区别是,询问的次数有多次! 小红拿到了一棵树,她有多次询问,每次询问输入一条简单路径 x,y,她想知道树上所有节点到该路径的最短路之和是多少,你能帮帮她吗? 定义节点到路径的最短路为:节点到路径上所有点的最短路中,值最小的那个 阅读全文
posted @ 2024-10-23 20:50 onlyblues 阅读(103) 评论(0) 推荐(0) 编辑
摘要:区间缩小 题目描述 给定一个正整数 n,我们初始设定两个变量 lr,其中 l=1r=n。我们将执行以下步骤: 如果 l=r,则结束操作;否则,执行步骤 2。 从区间 [l,r] 中等概率地选取一个正整数 x。然后,以下两种情况互斥地发生:以概率 p阅读全文
posted @ 2024-10-20 22:42 onlyblues 阅读(26) 评论(0) 推荐(1) 编辑
摘要:E. Card Game In the most popular card game in Berland, a deck of n×m cards is used. Each card has two parameters: suit and rank. Suits in the 阅读全文
posted @ 2024-10-16 19:34 onlyblues 阅读(79) 评论(0) 推荐(0) 编辑
摘要:k - 路径(mid vension) 题目描述 这是问题的中等版本。三个版本的做法之间可能有交集。 给定一颗 n 个点的无根树,每个节点有类型和权值,分别用 cw 表示。一条简单路径的权值为这条路径包含的节点权值之和。 对于一个长度为 len+1(len>1) 的序列 a 阅读全文
posted @ 2024-10-15 17:02 onlyblues 阅读(9) 评论(0) 推荐(0) 编辑
摘要:城中分支 题目描述 “城市处于建设中......” 预言之子的你获得了一个拥有 n 个元素的数组。 天神赋予你 q 次操作: Modifylrx 对于每个 i (lir),将 ai 乘以 xQuerylr 阅读全文
posted @ 2024-10-07 22:20 onlyblues 阅读(6) 评论(0) 推荐(0) 编辑
摘要:E. Expected Power You are given an array of n integers a1,a2,,an. You are also given an array p1,p2,,pn. Let S denote the 阅读全文
posted @ 2024-10-07 10:34 onlyblues 阅读(103) 评论(0) 推荐(0) 编辑
摘要:C2. Adjust The Presentation (Hard Version) This is the hard version of the problem. In the two versions, the constraints on q and the time limit are 阅读全文
posted @ 2024-10-06 21:03 onlyblues 阅读(327) 评论(1) 推荐(0) 编辑

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