06 2018 档案
摘要:题目链接:https://www.luogu.org/problemnew/show/P1774 归并排序求逆序对。 include define livelove long long using namespace std; const int maxn = 600001; livelove a[
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1462 记住HP=0也叫死。 include include include include include using namespace std; const int maxn = 5000001; con
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3808 include include include include include using namespace std; const int maxn = 1000010; int n, trie[ma
阅读全文
摘要:$Scapegoat$_$Tree$ ——(替罪羊树) ——识替罪羊树之算法乃吾生之幸也! $First$.引子: 知乎上面有个问题问最优雅的算法是什么,我觉得 暴力即是优雅。 当然这里说的暴力并不是指那种不加以思考的无脑的暴力,而是说用繁琐而技巧性的工作可以实现的事,我用看似简单的思想和方法,也可
阅读全文
摘要:``` #include #include #include #include #define alpha 0.8 #define maxn 2000001 #define ri register #define il inline using namespace std; struct scapegoat{ int son[2], val, valid, total;//valid(有...
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1801 替罪羊树吼啊! include include include include define il inline using namespace std; const int maxn = 200000
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P2590 我想学树剖QAQ include include include include using namespace std; const int maxn = 31000; int fa[maxn], d
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3398 辣鸡树剖1300ms 倍增大法吼啊
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3884 对方不想和你说话并向你扔了一个lca模板。 include include include include using namespace std; const int maxlog = 10; con
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3375 精华:在每次失配后不从头匹配而是尝试找一个新的开始并且是新开始的位置最长的相同前缀和后缀。 实际上KMP是一种自己匹配自己的模式。好好理解qaq include include include incl
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3879 我先说一句: 我永远都喜欢~~Stella~~STL _______ 这个题,很明显就是 ~~trie树~~ ~~hash~~ map+vector _______ 思路: 直接用map 代替这题里的t
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3709 离散化+区间众数..? include include include include using namespace std; const int maxn = 500000+10; inline i
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P2580 我真的永远都爱stl 后来我发现,trie也很棒棒哦qaq
阅读全文
摘要:我永远都爱STL ! 我爱PB_DS ! 其实还可以用set,vector做... 我永远都喜欢stl
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P4113 为什么要卡莫队!为什么加强的这么毒瘤! 莫队可以拿100分剩下三个点没治了 // luogu judger enable o2 include include include include inclu
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1972 真是不懂为什么要卡莫队! include include include include include using namespace std; const int maxn = 2000100; i
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1137 topsort + DP include include include include include using namespace std; const int maxn = 100001; st
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1186 邻接表开大开小真的奇妙,毒瘤玩意,再您妈的见。 include include include include include using namespace std; const int maxn =
阅读全文
摘要:微积分 微积分(Calculus)是高等数学中研究函数的微分(Differentiation)、积分(Integration)以及有关概念和应用的数学分支.它是数学的一个基础学科.内容主要包括极限、微分学、积分学及其应用.微分学包括求导数的运算,是一套关于变化率的理论.它使得函数、速度、加速度和曲线
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1807 求最大路?就是把权值取相反数跑最短路。 include include include include include include using namespace std; const int ma
阅读全文
摘要:题目链接: "https://www.luogu.org/problemnew/show/P1040" 今天考试考了一个区间DP...没错就是这个... 太蒟了真是连区间DP都不会...看了看题解也看不懂,于是请了某獴dalao给补充了一下。 在这里把自己的理解写下来,算是给一些像我一样不会区间DP
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P4711 要细心模拟 include include include include include using namespace std; char s[10001]; int k; double nans1
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P2319 include include include include using namespace std; const int maxn = 2001; int vis[maxn], a[maxn][ma
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P1640 数据有点水吧,从属性值连向对应武器编号。 枚举属性值匹配,遇到第一个无法匹配的直接跳出就好惹~。 include include include include using namespace std;
阅读全文
摘要:题目链接:https://www.luogu.org/problemnew/show/P3369 include include include define ri register define il inline using namespace std; const int maxn = 100
阅读全文
摘要:题目链接: "https://www.luogu.org/problemnew/show/P2234" 本来是一道打算练习splay的题目 发现暴力可以过啊。。 include include include include define inf 0x7fffffff define ri regis
阅读全文

浙公网安备 33010602011771号