![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
甦萌
这个作者很懒,什么都没留下…
展开
-
Educational Codeforces Round 81 (Rated for Div. 2) C. Obtain The String
主要思想就是 用dp记录下t中的这个字母在s中那个位置找到#include<bits/stdc++.h>using namespace std;#define ll long longint dp[100005][30];int main(){ std::ios::sync_with_stdio(false); int t,i,j; cin&g...原创 2020-04-08 22:18:49 · 115 阅读 · 0 评论 -
51nod 1432 独木舟 贪心
题目链接: http://www.51nod.com/Challenge/Problem.html#!#problemId=1432排序匹配就行#include<cstdio>#include<algorithm>#include<iostream>#include<cmath>#include<cstdlib>#in...原创 2019-03-02 12:50:01 · 92 阅读 · 0 评论 -
51nod 1428 活动安排 贪心
题目链接: http://www.51nod.com/Challenge/Problem.html#!#problemId=1428排序之后用vector容器模拟教室,每次记住教室使用结束时间然后每次都找一个可以使用的教室如果都有冲突就重新开一个教室最后输出容器的size就行#include<cstdio>#include<algorithm>...原创 2019-03-02 13:15:02 · 105 阅读 · 0 评论 -
落谷 P2695 骑士的工作 简单贪心
题目链接 : https://www.luogu.org/problemnew/show/P2695骑士排个序遍历每个头用lower_bound 二分查找一个大于等于他的骑士需要注意的是每个骑士只能上场一次所以用一个数组标记下#include<iostream>#include<cstdio>#include<cmath>#...原创 2019-03-03 11:07:04 · 316 阅读 · 0 评论