四维偏序:CDQ解法 摘要:CDQ 跟八叉树一样都是 $$O(n \log^3 n)$$ 的。CDQ 内尽可能用归并排序,常数较小,在某 OJ 跑到了第三优解(八叉树是第五优),可惜 dotcpp 上 CDQ 跑不过八叉树。 …… 题解列表 2022年02月23日 0 点赞 0 评论 55 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素 摘要:解题思路:若找到一个元素为0,则数组内此元素后的数往前挪一个,且设置一个flag=0,使循环起始数不再+1,而是保持原来的起始数。同时循环的数组总数-1(因为往前挪动了)注意事项:参考代码:#incl…… 题解列表 2022年02月23日 0 点赞 0 评论 387 浏览 评分:0.0
其实和之前做的拦截导弹一题简直一模一样 摘要:解题思路:注意事项:参考代码:# main n = int(input()) food = [0 for _ in range(n)] line = input().split() for i…… 题解列表 2022年02月23日 0 点赞 0 评论 384 浏览 评分:0.0
报数问题c++ 摘要:解题思路:因为不知道数据范围,所以使用vector动态数组判断读入的数是否被筛掉。cnt记录被筛的数的个数,tmp记录目前的报数。注意事项:参考代码:#include<iostream>#includ…… 题解列表 2022年02月23日 0 点赞 0 评论 357 浏览 评分:0.0
很简单的思路 有需要可以看看 摘要:解题思路:注意事项:参考代码:import java.util.ArrayList;import java.util.Collections;import java.util.Scanner;publ…… 题解列表 2022年02月23日 0 点赞 0 评论 400 浏览 评分:0.0
数的划分c++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>…… 题解列表 2022年02月23日 0 点赞 0 评论 511 浏览 评分:0.0
不是我在装,这道题目真的很简单(捂脸) 摘要:解题思路:这个属实没啥算法,就是正向按照他说的来注意事项:参考代码:# main height = input().split() h = int(input()) total = 0 f…… 题解列表 2022年02月23日 0 点赞 0 评论 353 浏览 评分:0.0
周期计算距离 摘要:```python m, n = map(int, input().split()) s = 0 for i in range(1, n + 1): s += m + m / 2 #…… 题解列表 2022年02月23日 0 点赞 0 评论 287 浏览 评分:0.0
题解 1434: 蓝桥杯历届试题-回文数字 摘要:解题思路:看注释注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >>n; if(n>54…… 题解列表 2022年02月23日 0 点赞 0 评论 401 浏览 评分:0.0
很简单的思路啦其实 摘要:![在这里插入图片描述](https://img-blog.csdnimg.cn/8b34d7db0f6d4147933af77a96f4886a.png?x-oss-process=image/wa…… 题解列表 2022年02月23日 0 点赞 0 评论 390 浏览 评分:0.0