摘要:
【题目描述】: "蚯蚓" 思路: 我觉得堆的思路还是比较容易看得出来的,毕竟题面描述说每次取最大的,砍成两截在扔进堆里,~~然后GG~~ ,还是有$80dpts$(~~真水~~) cpp include include include define F(x) floor(1.0 x); using 阅读全文
摘要:
继续存模板。。 倍增版: cpp include using namespace std; typedef long long ll; const int MAXN = 500000+1; int fa[MAXN][21];int deep[MAXN];int n,m,s; inline void 阅读全文
摘要:
【题面】: "解方程" 【思路】: 首先你会发现数据非常毒瘤,$a[i]'9'){if(c==' ')f= 1;c=getchar();} while(c ='0' && c include using namespace std; typedef long long ll; const int m 阅读全文
摘要:
贴一个高精度的模板,支持$ + /$ $\%$ orz 太强辣!! cpp include include include include using namespace std; const int W = 10000; const int s = 4; const int WS[4] = {10 阅读全文
摘要:
赤裸裸的水题 把所有的边反向,dfs出终点到达不了的点,把这些点及其所连点置为 “黑点”,即代码中的 $black$ 数组,然后 $spfa$ 过滤掉黑点就ok了 code: cpp include include include define inf 0x3f3f3f3f using namesp 阅读全文