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