上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 171 下一页
摘要: ##$Lights$ 灯 一、题目大意 给出一个$n*m$的矩阵,再给出$N$个点,问其中的任意两个点 $(x_1,y_1)$ 与 $(x_2,y_2)$ 之间,最短路径为 $|x_1-x_2| + |y_1-y_2|$ , 是否存在一条最短路径,使得拐弯的地方都存在着点。 视频讲解 目前状态:理解 阅读全文
posted @ 2022-05-04 12:46 糖豆爸爸 阅读(28) 评论(0) 推荐(0)
摘要: 题目传送门 视频讲解 先挖坑待填吧,没有AC /* 要想求出每个点存放最多的是哪种类型的物品,需要求出每个点上存放的每种物品的数量。 朴素做法,对物品的类型进行离散化(最多 M 种不同物品),然后对每个点 x 建立一个计数数组 c[x][1~M]。 依次执行每个发放操作,对 x 到 y 的路径上的每 阅读全文
posted @ 2022-04-30 16:01 糖豆爸爸 阅读(60) 评论(0) 推荐(0)
摘要: 题目传送门 视频讲解 #include <bits/stdc++.h> using namespace std; typedef long long LL; //重定向输入输出 #define FILE_OUT freopen("P5494.out", "w", stdout); #define F 阅读全文
posted @ 2022-04-30 15:58 糖豆爸爸 阅读(73) 评论(0) 推荐(0)
摘要: ##$P2824$ [$HEOI2016$/$TJOI2016$]排序 一、题目大意 给一个序列, 两种操作, 一种是将$[l, r]$里所有数升序排列, 一种是降序排列。 所有操作完了之后, 问你$a[k]$等于多少。 二、解题思路 由于将一个普通序列排序很慢,需要$nlogn$的时间,可以转化为 阅读全文
posted @ 2022-04-29 15:48 糖豆爸爸 阅读(57) 评论(0) 推荐(0)
摘要: ##[$GSS5$ - $Can$ $you$ $answer$ $these$ $queries$ $V$](https://www.spoj.com/problems/GSS5/) [洛谷](https://www.luogu.com.cn/problem/SP2916) ### 一、题目大意 阅读全文
posted @ 2022-04-29 12:33 糖豆爸爸 阅读(39) 评论(0) 推荐(0)
摘要: ## [$GSS3$ - $Can$ $you$ $answer$ $these$ $queries$ $III$](https://www.luogu.com.cn/problem/SP1716) [SPOJ](https://www.spoj.com/problems/GSS3/en/) 与$G 阅读全文
posted @ 2022-04-28 22:08 糖豆爸爸 阅读(46) 评论(0) 推荐(0)
摘要: ## [$GSS1$ - $Can$ $you$ $answer$ $these$ $queries$ $I$](https://www.luogu.com.cn/problem/SP1043) [SPOJ](https://www.spoj.com/problems/GSS1/en/) 看题意看洛 阅读全文
posted @ 2022-04-28 18:26 糖豆爸爸 阅读(65) 评论(0) 推荐(0)
摘要: 题目传送门 一、题目大意 给你一个序列,你要在这个序列上进行操作。 操作$1$ 给定区间$[l,r]$,对序列中这个区间中每个数字累加求和。 操作$2$ 给定区间$[l,r]$ 和 $x$,对区间每个数字对$x$取模。 操作$3$ 给定两个数$i,k$,将$a[i]$的值修改为$k$。 二、思路 注 阅读全文
posted @ 2022-04-28 15:05 糖豆爸爸 阅读(40) 评论(0) 推荐(0)
摘要: #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <cmath> using namespace std; typedef long long LL; const int N 阅读全文
posted @ 2022-04-28 11:17 糖豆爸爸 阅读(33) 评论(0) 推荐(0)
摘要: ##$GSS4$ - $Can$ $you$ $answer$ $these$ $queries$ $IV$ 一、题目描述 给定的$n$个数,我们定义两个操作,分别是区间开根号以及区间求和。共有$m$次查询,其中$n,m≤1e5$。 二、解题思路 一个$1e18$以内的数,经过最多$6$次开平方操作 阅读全文
posted @ 2022-04-28 11:04 糖豆爸爸 阅读(73) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 171 下一页
Live2D