原创 Codeforces Round #651 (Div. 2)(A,B,C,D,E)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 HDU 5452 Minimum Cut (樹鏈剖分)

#include<bits/stdc++.h> using namespace std; #define debug cout<<"YES\n"; #define rep(x,y,z) for(int (x)=(y);(x)<(z);(

原创 CodeForces 208E Blood Cousins (啓發式合併+倍增)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 ZOJ 4053 Couleur (啓發式合併+主席樹)

#include<bits/stdc++.h> using namespace std; #define debug cout<<"YES\n"; #define rep(x,y,z) for(int (x)=(y);(x)<(z);(

原创 CodeForces 284E Coin Troubles (DP+判環+揹包)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 CodeForces 1260F Colored Tree (樹剖+計數思維+一點點DP思維)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 HDU 5029 Relief grain (樹鏈剖分+權值線段樹思想)

#include<bits/stdc++.h> using namespace std; #define debug cout<<"YES\n"; #define rep(x,y,z) for(int (x)=(y);(x)<(z);(

原创 在使用tensorflow和keras玩轉機器學習時候遇到的錯誤

cannot import name 'dump_age' 2020.4.1  我解決的方法:可能有多個werkzeug的存在,我在命令行裏面卸載了werkzeug就沒有這個錯誤了   tensorflow,keras與python

原创 P3808 【模板】AC自動機(簡單版)(AC自動機模板)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 CodeForces 239E World Eater Brothers (DP)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 HDU 4866 Shooting (主席樹+離散化優化+初始化問題)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 CodeForces 853C Boredom (主席樹+分類討論)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 P3796 【模板】AC自動機(加強版)(AC自動機模板)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)

原创 HDU 5296 Annoying problem (樹剖求LCA+鏈的距離)

#include<bits/stdc++.h> using namespace std; #define debug cout<<"YES\n"; #define rep(x,y,z) for(int (x)=(y);(x)<(z);(

原创 CodeForces 373D Counting Rectangles is Fun (四維DP)

#include<bits/stdc++.h> using namespace std; #define debug puts("YES"); #define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)