KMP总结

模板

先贴一段代码:当做模板即可

阅读更多

Jetbrains实用技巧汇总

Jetbrains Tools 关闭 vim模式

菜单栏 :tools->vim emulator

阅读更多

int128模板

int128的使用

提示1: 在windows下 用mingw64可以编译int128
提示2: devc++自带mingw64, codeblocks自带mingw32 。

阅读更多

ICPC Southeastern Europe Contest 2019 H - Absolute Game(贪心)

题目大意

题目链接

A和B分别有一个长度为n的序列, 一共进行n - 1轮, 每轮每人拿掉一个数字,A想要最后剩下的数字的绝对值差尽量小, B反之, 问俩人都采取最优策略,最后差值的绝对值是多少?

阅读更多

HYSBZ - 1098 bzoj - 1098 办公楼biu

题目大意

题目链接

阅读更多

hexo遇到的各种坑

执行hexo d 命令时出现 Untracked files 错误

同时当你部署完成之后, 虽然你的博客里有了, 但是点进去就是404
解决方案: 把你即将要上传的文件的文件名中的空格删掉就可以了。

阅读更多

HDU2049-不容易系列之(4)——考新郎

题目大意

题目链接

假设一共有N对新婚夫妇,其中有M个新郎找错了新娘,求发生这种情况一共有多少种可能.

就是求 从 n中选m 个然后对m错排

阅读更多

HDU-5879(打表 + 找规律)

题目描述:

题目链接

阅读更多

HDU-2874Connections between cities(lca模板题,注意是森林)

题目大意

题目链接
After World War X, a lot of cities have been seriously damaged, and we need to rebuild those cities. However, some materials needed can only be produced in certain places. So we need to transport these materials from city to city. For most of roads had been totally destroyed during the war, there might be no path between two cities, no circle exists as well.
Now, your task comes. After giving you the condition of the roads, we want to know if there exists a path between any two cities. If the answer is yes, output the shortest path between them.

阅读更多

HDU-2586How far away ?(lca模板)

题目大意

题目链接
There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this “How far is it if I want to go from house A to house B”? Usually it hard to answer. But luckily int this village the answer is always unique, since the roads are built in the way that there is a unique simple path(“simple” means you can’t visit a place twice) between every two houses. Yout task is to answer all these curious people.

阅读更多