上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 35 下一页
摘要: 比赛链接:https://ac.nowcoder.com/acm/contest/10743#question 阅读全文
posted @ 2021-02-04 17:56 Tartarus_li 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1476/problem/E 题目大意: 给定 \(n\) 个模式串和 \(m\) 个匹配串,其中模式串由小写字母和通配符'_'组成,匹配串由小写字母组成, 同时,为每个匹配串指定一个$mj$, 要求重新排列模式串顺序以后,按顺 阅读全文
posted @ 2021-02-01 22:04 Tartarus_li 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.luogu.com.cn/problem/P1903 带修莫队在莫队基础上增加一个时间维即可 注意排序的时候右端点也要按块排序 #include<bits/stdc++.h> using namespace std; typedef long long ll; co 阅读全文
posted @ 2021-02-01 17:02 Tartarus_li 阅读(61) 评论(0) 推荐(1) 编辑
摘要: 题目链接:https://codeforces.com/contest/617/problem/E 莫队模板题 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2000010; i 阅读全文
posted @ 2021-02-01 00:13 Tartarus_li 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/86/problem/D 莫队模板题。 莫队主要思想是对询问分块,块与块直接按左端点升序排列,块内按右端点升序排列 #include<bits/stdc++.h> using namespace std; typedef lon 阅读全文
posted @ 2021-01-31 22:41 Tartarus_li 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.luogu.com.cn/problem/P1962 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int M = 1000000007; ll n, m; stru 阅读全文
posted @ 2021-01-28 11:02 Tartarus_li 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1474/problem/E 开始以为答案是 \(1^2 + 2 ^ 2 + ... + (n - 1) ^ 2\) 看题解以后发现没有这么简单。。 因为每次交换必定会让一个位置还原,所以每个位置都要尽量和当前没有还原位置中的最 阅读全文
posted @ 2021-01-26 18:59 Tartarus_li 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1474/problem/C 枚举第一次是用哪一个和最大值组成 \(x\), 此后每一次都要选当前序列中最大值做为 \(x\) 使用 \(multiset\) 即可 #include<bits/stdc++.h> using n 阅读全文
posted @ 2021-01-25 20:13 Tartarus_li 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1467/problem/E 对于每一对同色点对,点对内部的点是合法点,外部点是不合法点,将不合法点标记,最后未被标记的即为合法点 1.如果当前点子树内有同色点,那么当前点的子树外所有点不合法 2.如果当前点子树外有同色点,那么 阅读全文
posted @ 2021-01-25 17:05 Tartarus_li 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/contest/10845/F 如图: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1000010; cons 阅读全文
posted @ 2021-01-24 11:57 Tartarus_li 阅读(93) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 35 下一页