摘要:
This blog is a derivative of 数位dp总结 之 从入门到模板 by wust_wenhao (csdn) #51 D. Beautiful numbers (数位dp+离散化)under CC 4.0 BY-SA, example codes are modified, 阅读全文
摘要:
高斯消元 模板 luogu P3389 #include<bits/stdc++.h> using namespace std; const double eps=1e-6; const int N=100+5; double a[N][N]; int n; int gauss(){ int c,r 阅读全文
摘要:
```cpp #include #define LOCAL //无参宏 //条件编译 #ifdef LOCAL int a=1; #else int a=2; #endif #ifndef LOCAL int b=1; #else int b=2; #endif #define PI 3.1415926535 //有参宏 #define max_wrong(a,b) a>b?a:b #define 阅读全文
摘要:
退役后无聊自制了一个游戏... 本想打个2048,限于能力,就照着半成品改成了这个。 Cmd输出太慢有点晃眼。 cpp include include include include include include include using namespace std; const int MAX 阅读全文
摘要:
The cows, who always have an inferiority complex about their intelligence, have a new guessing game to sharpen their brains.A designated 'Hay Cow' hid 阅读全文
摘要:
Sorting a Three Valued Sequence IOI'96 Day 2 Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem 阅读全文
摘要:
Arithmetic Progressions USACO1.4 An arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a 阅读全文
摘要:
"原题链接" 经典贪心,转化为问题为,对于所有的区间,求最小的点数能使每个区间都至少有一个点。 cpp include include include include include include using namespace std; const int MAXN=100000+5; cons 阅读全文
摘要:
"题目链接" 考虑正序去除点去掉其所有连边十分复杂,可以倒序离线处理,每次新建一个点,连接其连边,用并查集统计联通块的个数。 附代码 cpp include include include using namespace std; const int MAXN=400000+5; int ans[M 阅读全文