[diary]一点小小的吐槽 哎。马上去银川了。今天是周一 感冒感觉明天差不多能好不想学习。又很菜。今天拿感冒当理由。?呵呵。真恶心。全靠队友吗。真垃圾啊。王之山。感冒的理由大概就是吴凯欣说的那样吧。撸管着凉了。烦。手机上立的flag就不在这里再说一遍了。赶快好起来。起码对得起自己的内心吧。 2019-10-14 杂文类?大概
[2019牛客国庆day2]2018湘潭邀请赛 https://ac.nowcoder.com/acm/contest/1107#question 没学会点分治。。。傻了。。。最后那个DFS的做法也不是很会 好像就是搜到一个点就和之前的所有的点比 同时更新后面的点。。。好难啊 今天更新下day2的题解 day2 读题场。。。 A-Easy h-index题意:h-index 为至少有h篇论文被引用次数不小于h很绕的一句话。。。之后给一个数组 2019-10-09 uncategorized > 牛客竞赛
[2019牛客国庆day1]2019HNCPC https://ac.nowcoder.com/acm/contest/1099#question emmm…10月8日…昨晚失眠….今天写写水题解。。。好垃圾啊。。。 关于这个题那个点分治明天一定学…. A-全1子矩阵 签到题 给一个n*m的矩阵 一开始全是0 之后把一个矩阵的元素全部设为1 给一个矩阵 判断是不是这样产生的矩阵思路:输入的时候扫一遍 确定最小的x y(该点并非为1)同时确定 2019-10-09 uncategorized > 牛客竞赛
KMP算法的自己的一点点理解 KMP主要是利用匹配失败的串的相同前缀。 string t;string s;int nxt[maxn];//nxt数组求匹配串的前缀的那个值 void prekmp(string x) {//处理匹配串memset(nxt, 0, sizeof(nxt));int i, j;//前后指针j = nxt[0] = -1 2019-09-25 %e7%bc%96%e7%a8%8b%e8%af%ad%e8%a8%80 > 算法学习
[徐州网络赛][序列自动机?]M- Longest subsequence https://nanti.jisuanke.com/t/41395 题意:给定s和t 寻找s的子序列 目标子序列字典序大于t 如果不存在输出-1 否则输出字符串的长度。。。题解:有一说一 这个题看了半天我还是不会 半会不会的 还差很多东西阿copy一份题解思路 对于答案来说,一定是 前 i-1 个字符和 t的前 i 个一样,然后第 i 个字符比 t的 大 i∈[1,m]i∈[1,m] 前缀 2019-09-25 uncategorized > 2019Icpc选拔赛
[徐州网络赛][平面几何]K- Center https://nanti.jisuanke.com/t/41393 题意:给你n个点 让你加最少的点 让这个图中心对称 问 最少加几个点 思路:暴力枚举 N*N 寻找两个点的中间点 输入的时候乘2保证中间的点的坐标没有小数 然后用总点数-最多的中间点数即可PS 这个题没有重点 有重点这样做不对的哦 #include <bits/stdc++.h>using namespac 2019-09-24 uncategorized > 2019Icpc选拔赛
[徐州网络赛][单调栈+二分]E- XKC's basketball team https://nanti.jisuanke.com/t/41387 题目大意:从左到右1-n个数字 每个数字都有自己的权值 寻找出每个数字右边比自己至少大m的数字之间的距离 思路:见AC代码 #include#include#include#include#include#include#include#include#include#include#include#include#includ 2019-09-24 uncategorized > 2019Icpc选拔赛
[徐州网络赛][水]C-Buy Watermelon https://nanti.jisuanke.com/t/41385 将一个西瓜切成两块 每块的重量都是2的倍数 问是否可以 #include#include#include#include#include#include#include#include#include#include#include#include#include#include <unordered_set>#in 2019-09-19 uncategorized > 2019Icpc选拔赛
[徐州网络赛][并查集]B-so easy https://nanti.jisuanke.com/t/41384 比赛时WA到飞的一道题题目:N个点从左到右为1–n 有两种操作1. 让x点不可达2.查询x(包括x)后第一个可达的点用Map模拟并查集 删除一个点时 令x的父亲等于x+1的父亲 查询时直接输出x的父亲 #include <bits/stdc++.h>using namespace std;const int 2019-09-19 uncategorized > 2019Icpc选拔赛
[徐州网络赛][KMP]D-Carneginon https://nanti.jisuanke.com/t/41386 给你一个字符串 再给你n个字符串 查询是否是字串 一道裸的KMP 用了Kuangbin的板子 很基础 #include#include#include#include#include#include#include#include#include#include#include#include#include#include & 2019-09-19 uncategorized > 2019Icpc选拔赛