#W

redis集群报错:(error) CLUSTERDOWN Hash slot not served

错误关键信息:(error)CLUSTERDOWNHashslotnotserved错误原因:没有分配槽,因为redis集群要分配16384个槽来储存数据,那么没有分配槽则报如上错误解决办法:CanIsettheaboveconfiguration?(type'yes'toaccept):你需要输入yes,而并非缩写y...

Error creating bean with name 'entityManagerFactory' defined in class path resource

错误详细信息:Errorcreatingbeanwithname'entityManagerFactory'definedinclasspathresource[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.cl...

java.lang.IllegalStateException: Service id not legal hostname (/test-gw-aqa)

错误信息:java.lang.IllegalStateException:Serviceidnotlegalhostname(/test-gw-aqa)错误原因和解决方案:FeignClient错误写法:@FeignClient("/test-gw-aqa")FeignClient正确写法:@FeignClient("...

org.springframework.context.ApplicationContextException: Unable to start web server; nested exceptio

详细错误信息:org.springframework.context.ApplicationContextException:Unabletostartwebserver;nestedexceptionisorg.springframework.context.ApplicationContextException:U...

SpringCloudGateWay之网关跨域问题解决

应用场景:所有的微服务是通过网关这个入口,在和前端对接口时,必然设计到有关跨域的问题。关于服务端跨域有很多方案,可以加注解(指定具体的路径允许跨域),也可以统一配置。另外如果不在网关入口这配置,势必会造成一个很大的影响,那就是前端通过网关入口调用其它微服务,通常会出现如下错误:AccesstoXMLHttpReques...

js实现导出word

FileSaver.js:/*FileSaver.js*AsaveAs()FileSaverimplementation.*1.3.2*2016-06-1618:25:19**ByEliGrey,http://eligrey.com*License:MIT*Seehttps://github.com/eligrey/F...
代码星球 代码星球·2020-12-27

Following Orders(拓扑+dfs)

FollowingOrders(拓扑+dfs)  AC_Code:1#include<bits/stdc++.h>2usingnamespacestd;3typedeflonglongll;4constintmaxn=25;5constintinf=0x3f3f3f3f;6constin...
代码星球 代码星球·2020-12-27

关于lowbit

我们知道,任何一个正整数都可以被表示成一个二进制数。如:[left(8ight)_{10}= left(1000ight)_{2}]那么定义一个函数[f=lowbit(x)]代表x的二进制表达式中最低位的1所对应的值比如:(lowbit(left(8ight)_{10})=lowbitleft(left(10...
代码星球 代码星球·2020-12-27

Sereja and Swaps(贪心+暴力枚举区间)

SerejaandSwaps  AC_Code: 1//枚举区间,o(n^2),然后将区间内最小的数逐个和区间外面最大的数交换2#include<bits/stdc++.h>3usingnamespacestd;4typedeflonglongll;5constintmaxn=...

F. Tree with Maximum Cost(换根)

F.TreewithMaximumCost     学习博客:https://blog.csdn.net/LJD201724114126/article/details/85240762?utm_source=app题解:换根我们先设sum[u]等于 以u为根...

Wall

Wall        题目大意:给定n个点和一个距离L,要求围墙距离任意点的距离大于等于L,求出最小围墙长度。最短的周长=凸包的周长+半径为L的圆的周长(顶点处加起来刚好为圆) 1#include<cstdio>2#...
代码星球 代码星球·2020-12-27

Halloween Costumes

HalloweenCostumes    基础区间dpAC_Code1#include<bits/stdc++.h>2usingnamespacestd;3typedeflonglongll;4constintmaxn=110;5intdp[maxn][maxn];6...
代码星球 代码星球·2020-12-27

石子合并,GarsiaWachs算法优化

   思路:可以发现朴素的区间dp已经不足以解决这个问题了。对于石子合并问题,有一个最好的算法,那就是GarsiaWachs算法。时间复杂度为O(n^2)。设序列是stone[maxn],从左往右,找到一个最小的且满足stone[k-1]<=stone[k+1]的k,找到后合并sto...

Wormhole

Wormhole      注意精度,不要用longlong输出,用%.0f输出AC_Code1#include<iostream>2#include<cstdio>3#include<string>4#include<...
代码星球 代码星球·2020-12-27

Meteor Flow(贪心+优先队列)

MeteorFlow(贪心+优先队列)AC_Code1///既然只要发射一次,就可以打掉,那么就要打掉那个耗费经历最多的,以保留更多的精力(所以用优先队列,先弹出耗费经历最多的)2///其次,只要有能力打就先不发射(所以先入栈)34#include<iostream>5#include<cstdio&...
首页上一页...457458459460461...下一页尾页