08 2019 档案
摘要:我又打了一个猝死场.... 不过猝死倒是没有,就是自闭了..... 自闭过程如下: 当L_Y_T刚刚做完A,B打了一半时........ kr : 您C题会做嘛? L_Y_T : 还没看啊 kr : wucstdio 切到D题了..... ___ A 仔细考虑一下就会发现,这个玩意是三个一循环的,然
阅读全文
摘要:我竟然近前100辣!!!有没有top100的牌子和500石头啊! ____ 不知不觉邦邦中毒了2333 ____ 所以,我们一起开始我们的自闭之旅吧! ___ T1 "永夜的报应" 这道题官评是个黄题,pjT2难度,所以十分的简单 这道题的评价是$\color{red}{暴力分奇高,正解简单易想}$
阅读全文
摘要:代码存档 cpp include define maxn 100 using namespace std ; int n , m , flag = 0 , tim ; struct dy{ int x , y ; }ans[maxn maxn] ; int a[maxn][maxn] , vis[m
阅读全文
摘要:代码 cpp include using namespace std ; int T , b , p , f , h , c , ans ; int main () { cin T ; while(T ) { ans = 0 ; cin b p f h c ; if(h c) { int rest
阅读全文
摘要:____ 双指针,一个从前往后扫,一个从后往前扫,如果过到最后撑起来答案都是一样的,就yes否则no ____ cpp include include include include include define int long long using namespace std ; int x ,
阅读全文
摘要:___ 思路 非常容易发现.只有相邻的差值是1或者(n 1),而且n 1只能有一个的时候才成立,然后就,, 代码 cpp include using namespace std ; int a[205] ; int main() { int q ; bool flag1 , flag2 ; cin
阅读全文
摘要:___ 思路 根据所谓的抽屉原理,当n特别大的时候,就会出现几个三元环,这时的答案就是3 其他的跑floyd暴力 ___ 溜了溜了
阅读全文
摘要:思路 ___ 看样例的话,是不是可能偶数没用了?? 然后考虑奇数的话,照着样例模拟模拟试试?? 反正我打的vp,,不会掉分哒! 随便打了个代码结果AC了233 ____ cpp include define maxn 200010 using namespace std ; int n , a[ma
阅读全文
摘要:___ 思路 有一个很显然的思路就是分正负 如果是零的话,我们就把他转化成1,反正答案一定会+1 如果是正数,就传话为1 如果是负数,就转化为 1 如果负数的个数是偶数个,那当然最好,如果是奇数个,那就处理一下 ___ cpp include define int long long using n
阅读全文
摘要:思路: 找两遍最大的加起来肯定符合条件啊 ~~sd题~~ cpp include using namespace std ; int n , m ; int maxn , maxm ; int main () { cin n ; for(int i = 1 ; i x; maxn = max(max
阅读全文
摘要:题意 在给定的序列P中求一个子序列,使得在图中按照该子序列进行最短路径移动时可以完整经过原序列P code cpp include include include include define maxn 105 define maxm 1000010 define inf 0x3f3f3f3f us
阅读全文
摘要:思路 易发现在一个区间中,比较靠前的一可以换成0 cpp include include include include define maxn 100100 using namespace std ; int tmpp ; char s[maxn] , t[maxn] ; int main ()
阅读全文
摘要:___ 思路 最小就是达到下限之后其他全是1 , 最大就是达到上限后全是最大的那个 ___ 代码 cpp include using namespace std ; int n , l , r ; int minn = 1, maxx = 1; int main () { cin n l r ; f
阅读全文
摘要:___ 思路 数学题,就是找4的多少次方,由于是二进制数,直接输出(长度+1)/2就行啦! 真的吗 ? 还有这些奇怪的情况 一 . 当二进制是0的时候 二.当只有一个1的时候 ___ 总之最后上代码 ___ cpp include define int long long using namespa
阅读全文
摘要:"卢姥爷NB" ____ "卢姥爷NB" ____ "卢姥爷NB" ____ 这道题看隔壁卢姥爷在做,然后就跟着做了 题意 解释 cpp include include include include define int long long define maxn 1010 define maxm
阅读全文
摘要:其实那,我是被标题吸引来的 你康康,最大子矩阵!多么人畜无害的名字啊~~~ 然后发生了什么吗大家都应该猜到啦!然后一读题,让你求出k个子矩阵的最大值! 但是呢?发现这是一个n m的矩阵~~废话!~~然后.. m = 1 或者 2 !! ~~你 说 话 怎 么 带 空 格 啊 啊 啊~~ 第一种 m
阅读全文
摘要:看了一篇题解!来练习单调队列优化的DP 用单调队列分别维护行与列 在维护的同事随便维护最大值和最小值 cpp include include include include define maxn 1010 using namespace std ; int n , m , k , front ,
阅读全文
摘要:设$A_{sum} = \sum_{i=1}^{n+m 1}A_i$ 然后 : $(n+m 1)\sum_{i=1}^{n+m 1}(A_i A_{avg})^2 \\ = (n+m 1)\sum_{i=1}^{n+m 1}(A_i^2 2A_iA_{avg}+A_{avg}^2) \\ = A_{
阅读全文
摘要:状态 : 我自闭啦! 感想 : 张老板太强了! "代码"
阅读全文
摘要:思路 这种类似的字符串匹配的问题,可以... 在s中记录每个字符的出现次数和对应次数的出现位置,然后用t去一一对应 首先,设lop[x][i] 储存 第i个x + 'a' 对应的字符在s中出现的位置,k代表t中我们要进行搜索的字符的位置 对于这道题,那就是记录完每个字符的出现位置之后,就枚举t串的每
阅读全文
摘要:"张老板!" "张老板!" "张老板!" "张老板!" "张老板!" ___ 存一下代码8 ___ ____ ___ cpp include include include using namespace std; const int maxn = 100010; const int maxm =
阅读全文
摘要:"题解" "视频" $\color{red}A$ 题意? 输入一个数,如果这个数大于3200,那么就输出后面的字符串,否则输出red 代码 cpp include include include include define maxn 120 using namespace std ; int a[
阅读全文
摘要:____ 是的,有是一个DP ~~只是为了刷试炼场~~ 然后呢....看了一下题目,,..感觉,, 首个思路...要排个序,按照吃饭速度排 设f[i][j][k]代表前i个人,j个人在一号,k个人在二号...然后..? 哎?那么三维就有带点累赘了哎! ~~然后想不出来怎么写了~~ cpp inclu
阅读全文
摘要:Dp 悬线法 悬线法(好像)是可以解决给定矩阵中满足条件的最大子矩阵的样子 ___ ~~先就提论题~~ 设个状态 设 f[i][j] 为从(i,j) 点扩展最多能达到的最左端的点 $\color{red}{然后呢?}$ 设l[i][j] 为从(i,j) 点扩展能达到的最右端的点 $\color{bl
阅读全文
摘要:T1 思路 换算成相同的单位直接相加减 代码 cpp include include include include using namespace std ; int T , n ; int main () { freopen("water.in","r",stdin) ; freopen("wa
阅读全文
摘要:$\color{blue}{暂时看来我只做了值么一道题(大雾)}$ 思路: 根据导数的知识,(而且只是这种的不带log不带根号的比较好看的函数),每次求导都会使x的每个项降次 当然,每次降次都会把x的0次方项给搞没 ....... 所以,我们可以把f(x) 和 g(x) 的x的最高项找出来,最高项次
阅读全文
摘要:思路:二分 ; 因为是要增大中位数,所以,我们发现,想要让中位数变大,就只能让中位数变成和后面的数一样大,而且想让它最大,于是就想到让该中位数在加完k后和后面的x个数相同 当然如果可以让中位数和最后一个数相同时最好不过的 __代码来了__ cpp include define maxn 200010
阅读全文
摘要:== $\color{yellow}{只写给自己看防止自己忘了的emmm}$ == 主要思路是从叶节点开始向根节点进行转移 一共有五个状态,f[i][0...4] 0 状态表示当前节点为消防站,可以管理以i节点的子树以及i的爷爷 1 状态表示当前节点的儿子v为消防站,可以管理以v为根的子树和i号节点
阅读全文
摘要:因为所有的节点都是叶节点,因此每个叶节点都是从已有的节点中分出来的 而每个节点都可以从 1 ~ j (j 设i为要插入的节点 , j为dis[1][j] 中最小的那个(j floyd的话是 cpp include include include include define maxn 100 usi
阅读全文
浙公网安备 33010602011771号