摘要: ```cpp include using namespace std; const int N=500005; int n,m,u,v,fa[N],tmp=0x3f3f3f3f; bool can,ring[N],vis[N],huis; vector mp[N]; inline void dfss 阅读全文
posted @ 2019-10-15 16:42 アインツベルン 阅读(102) 评论(0) 推荐(0) 编辑
摘要: ```cpp include define inf 0x3f3f3f3f using namespace std; const int N=100005; struct node{int tow,val;}; int t,n,m,k,mod,dis[N],u,v,w,dp[N][52]; bool 阅读全文
posted @ 2019-10-15 16:41 アインツベルン 阅读(96) 评论(0) 推荐(0) 编辑
摘要: ```cpp include define int long long using namespace std; const int N=300005; inline int read() { int x=0,f=1;char c=getchar(); while(c'9'){if(c==' ')f 阅读全文
posted @ 2019-10-15 16:41 アインツベルン 阅读(100) 评论(0) 推荐(0) 编辑
摘要: NOIP 2017 时间复杂度 模拟+字符串 作为一个代码能力极其一般的蒟蒻,这道题算是整个代码能力训练中比较好写的一道了。注意读入部分要预处理很多细节,正如先辈们说的,写一点调一点就能极大程度减少后期调代码的难度。 开始说细节: 1. 读入一定要离线后再进行预处理,如果在线会导致整个细节非常复杂, 阅读全文
posted @ 2019-10-15 16:40 アインツベルン 阅读(138) 评论(0) 推荐(0) 编辑
摘要: ```cpp include using namespace std; const int N=10; int n,mp[N][N],u,ansx[N],ansy[N],ansd[N]; inline void confirm() { bool flag=true; for(int i=1;i=3) 阅读全文
posted @ 2019-10-15 16:39 アインツベルン 阅读(90) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include using namespace std; const int N=30; int n,t[5][N],tmp[N],vis[N]; string s1,s2,s3; inline void dfs(int h,int l,int j) { if(!h) { if(!j) { for(int i=1;i=1;i--) { int t1=tmp[... 阅读全文
posted @ 2019-10-15 16:38 アインツベルン 阅读(143) 评论(0) 推荐(0) 编辑
摘要: ```cpp include using namespace std; const int N=20; int t,n,ans,a,b,card[N]; inline void dp(int now); inline void bl3(int now) { for(int i=3;i=3)len++ 阅读全文
posted @ 2019-10-15 16:37 アインツベルン 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】 定义一个长度为n的正整数序列A是“好”的序列,当且仅当其满足如下条件: 1.序列中每个数均满足 1≤A[i]≤n 2.i≠j⇔A[i]≠A[j] 3.最长下降子序列长度不超过2 现在有T组询问,每组询问的形式是:有多少个长度为n的“好”的序列,满足A[x]=y。这个答案可能很大,请你求 阅读全文
posted @ 2019-08-28 15:54 アインツベルン 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: ```cpp include using namespace std; const int N=500005; struct node{ int pos,val,id; bool operator pos;} }; struct data{int l,r,pos;}q[N]; int n,m,a[N 阅读全文
posted @ 2019-08-05 23:20 アインツベルン 阅读(191) 评论(0) 推荐(0) 编辑
摘要: ```cpp include include include include using namespace std; const int N=50005; int t,n,c,val[N],tp[N],dp[N][5][2],ans,u,v; std::vector mp[N]; / 树形dp,d 阅读全文
posted @ 2019-07-03 09:17 アインツベルン 阅读(116) 评论(0) 推荐(0) 编辑
Live2D