摘要:
成绩: (惨败) A题,写成一个函数,题目怎么说就怎么做。 B题,直接 枚举,调了好久,最后发现是欧式距离写错了。于是我得到了经验,欧式距离不能再记错了()。 C题一看,拿出计算器算了一下前几个样例,发 阅读全文
摘要:
题目链接 题目 一年一度的展会要来临了,Farmer John 想要把 ()只奶牛和公牛安排在单独的一行中。 John 发现最近公牛们非常好斗;假如两只公牛在这一行中靠的太近,他们就会吵架,以至于斗殴,破坏这和谐的环境。 John 非常的足 阅读全文
摘要:
GDKOI前我的算法复习情况: 好了,GDKOI死了。 这个是根据一本通提高篇章节制定的。 练习 剩余题量 备注 练习 剩余题量 备注 练习 剩余题量 备注 练习 剩余题量 备注 贪心算法 已完成 区间DP 1 质数 5 同余 8 二分三分 已完成 RMQ 1 我做出的两题都不是用平衡树 状压dp 阅读全文
摘要:
丽泽普及2022交流赛day1总结 提交情况 8:52 T1 9:19 T3 9:26 T4 9:28 T4 10:32 T2 10:49 T1 A. Efim与奇怪的成绩 题目 众所周知,每当我们看见自己糟糕的成绩时,我们总希望以奇怪的方式将其四舍五入。 Efim同样如此。在晴朗的一天,Efim拿 阅读全文
摘要:
题目链接 题目 Peter decided to wish happy birthday to his friend from Australia and send him a card. To make his present more mysterious, he decided to make 阅读全文
摘要:
题目链接 题目 This is yet another problem on regular bracket sequences. A bracket sequence is called regular, if by inserting "+" and "1" into it we get a c 阅读全文
摘要:
题目链接 题目 Certainly, everyone is familiar with tic-tac-toe game. The rules are very simple indeed. Two players take turns marking the cells in a 3 × 3 g 阅读全文
摘要:
题目链接 题目 A group of tourists is going to kayak and catamaran tour. A rented lorry has arrived to the boat depot to take kayaks and catamarans to the po 阅读全文
摘要:
题目链接 题目 There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it that starts in the upper left cel 阅读全文
摘要:
T1 Closest Cow Wins 题目 Farmer John owns a long farm along the highway that can be considered somewhat like a one-dimensional number line. Along the fa 阅读全文
摘要:
题目 The cows are hard at work trying to invent interesting new games to play. One of their current endeavors involves a set of intervals (\(1\le 阅读全文
摘要:
题目 Farmer John's farm consists of a set of fields , conveniently numbered . Between these fields are 阅读全文
摘要:
题目 Farmer John owns a long farm along the highway that can be considered somewhat like a one-dimensional number line. Along the farm, there are 阅读全文
摘要:
T1 Lonely Photo 题目 Farmer John has recently acquired N new cows (3≤N≤5×105), each of whose breed is either Guernsey or Holstein. The cows are currentl 阅读全文
摘要:
题目 Bessie the cow is trying to walk from her favorite pasture back to her barn. The pasture and farm are on an N×N grid (2≤N≤50 ), with her pasture in 阅读全文
摘要:
题目 Farmer John's cows N are very particular about the room temperature in their barn. Some cows like the temperature to be on the cooler side, while o 阅读全文
摘要:
题目 Farmer John has recently acquired N new cows (3≤N≤5×105), each of whose breed is either Guernsey or Holstein. The cows are currently standing in a 阅读全文
摘要:
题目链接 题目 The winner of the card game popular in Berland "Berlogging" is determined according to the following rules. If at the end of the game there is 阅读全文
摘要:
二分 对于一个存在单调性的函数,我们要枚举满足条件的最小/最大值,我们通过枚举中间值缩小范围来定位。 while(l<r) { mid=(l+r+1)>>1; if(check(mid)) l=mid; else r=mid-1; } 三分 对于一个存在单峰/单谷性的函数,我们可以通过枚举两个端点通 阅读全文
摘要:
题目链接 题目 将整数 分成 份,且每份不能为空,任意两个方案不相同(不考虑顺序)。 例如:,,下面三种分法被认为是相同的。 ; ; . 问有多少种不同的分法。 思路 首先我们可以打出一个暴力。 阅读全文
摘要:
题目链接 题目 有 个问题,其中有 个问题的答案是 YES, 个问题的答案是 NO。当你回答一个问题之后,会知道这个问题的答案,求最优策略下期望对多少。 答案对 取模。 思路 首先假设撇开算期望,就一个贪心,如果 ,我们 阅读全文
摘要:
题目链接 题目 Snuke is having another barbeque party. This time, he will make one serving of Skewer Meal. He has a stock of N Skewer Meal Packs. The i-th Sk 阅读全文
摘要:
题目链接 由于BZOJ已挂,这里是黑暗爆炸和hydro的备份 黑暗爆炸: 国王奇遇记 国王奇遇记加强版 hydro: 国王奇遇记 国王奇遇记加强版 题目 Katharon 国有着悠久的历史,每个慕名而来的游客都渴望能在 Katharon 国发现一些奇怪的宝藏。而作为国王的 Kanari 君也梦想着有 阅读全文
摘要:
求: 阅读全文
摘要:
题目链接 题目 相比 的家,他的弟弟 比较穷。他的房子是狭窄的,而且在他的房间里仅有一个灯泡。每天晚上,他徘徊在自己狭小的房子里,思考如何赚更多的钱。有一天,他发现他的影子的长度随着他在灯泡和墙壁之间走动时会发生变化。一个突然的想法出现 阅读全文
摘要:
题目链接 题目 一个点每过一个单位时间就会向四个方向扩散一个距离,如图。 两个点a、b连通,记作e(a,b),当且仅当a、b的扩散区域有公共部分。连通块的定义是块内的任意两个点u、v都必定存在路径e(u,a0),e(a0,a1),…,e(ak,v)。给定平面上的n给点,问最早什么时刻它们形成一个连通 阅读全文
摘要:
题目链接 题目 对于给定的一个长度为N的正整数数列 ,现要将其分成 ()段,并要求每段连续,且每段和的最大值最小。 关于最大值最小: 例如一数列 要分成 段。 将其如下分段: \([4\ 2 阅读全文
摘要:
题目链接 题目 明明做作业的时候遇到了 nnn 个二次函数 Si(x)=ax2+bx+cS_i(x)= ax^2 + bx + cSi(x)=ax2+bx+c,他突发奇想设计了一个新的函数 F(x)=max{Si(x)},i=1…nF(x) = max{S_i(x)}, i = 1ldo 阅读全文
摘要:
题目链接 题目 给定长度为 n 的数列 a,如果 (按位与),则在 i,j 之间存在一条长度为 的边,求 1 至所有点的最短路。 思路 暴力连边,边太多,最多 条,MLE+TLE。 于是考虑减少边的数量。 首先建32个虚点。 然后加入 在第 位上为1,就在 阅读全文
摘要:
题目链接 题目 给定一个长度为 nnn 的非负整数序列 AAA ,求一个平均数最大的,长度不小于 LLL 的子段。 思路 先二分平均值。 然后是判断。 如何判断一段数中是否存在长度大于等于 且平均值大于某个数的子段呢? 我们可以先让序列中的数都减去二分中的值,然后就转化为: 序列中是否存 阅读全文