摘要:
结构体为: struct A { int a; char b; double c; }; struct B { int a; double c; char b; }; int main() { printf("%d %d", sizeof(A), sizeof(B)); } 在64位系统下,输出了 阅读全文
摘要:
题目链接:https://leetcode.cn/problems/sliding-window-median/ 面试的时候不会手撕treap,原来两个multiset就能搞定!我是笨蛋。 代码: class Solution { public: multiset<long long> lst, r 阅读全文
摘要:
问题描述 mysql报错: ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0 redis报错:(总之就是本地连不上docker中 阅读全文
摘要:
~~怎么有人选题迟了么得FFT啊。~~好久没更新博客了,来水一发! 参考资料: NTT:https://oi-wiki.org/math/poly/ntt/ CUDA实现FFT并行计算:https://blog.csdn.net/Liadrinz/article/details/106695275 阅读全文
摘要:
题目链接:https://codeforces.com/gym/103107/problem/E 题解连接:https://www.zhihu.com/question/459398759/answer/1887431805 补题过程 这里参考了题解的第二种解法,记录一下自己在补题过程中遇到的坑。 阅读全文
摘要:
本博客不会再更新ACM-ICPC/XCPC相关内容 原回答载于https://www.zhihu.com/question/436832940/answer/1893167343 开场开了一个B题,读不懂,换题,K比较短+看起来是字符串,然后冲了上去,然后被一个prefix读成每个字符串都一个唯一标 阅读全文
摘要:
题目链接&中文翻译:https://www.luogu.com.cn/problem/CF840D 杂谈 在一些题目中,转化成是否为众数,例如CF1514D这道题。 洛谷上给出的复杂度是 \(O(nKlogn)\)。 AC代码 #include <bits/stdc++.h> using names 阅读全文
摘要:
题目链接:https://codeforces.ml/gym/102832/problem/B 官方题解:https://zhuanlan.zhihu.com/p/279287505 参考了用户 smallling 的提交。 题目大意 给定 \(n\) 个数,数的范围为 \([1,m)\),共 \( 阅读全文
摘要:
题目链接:https://codeforces.ml/contest/293/problem/E 思路 首先想到点分治,提炼出在子树中,记 \(dis\) 为树上路径值,\(wis\) 为树上weight之和的路径值,使得 \(dis[x] + dis[y] \leq l\) 并且 \(wis[x] 阅读全文
摘要:
题目链接:https://zoj.pintia.cn/problem-sets/91827364500/problems/1384062980244979712 官方题解:https://www.zhihu.com/question/455125989/answer/1840256385 思路 对于 阅读全文