Strugglers
Strugglers
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Strugglers的博客
全部文章
/ 题解
(共4篇)
也不难理解
#include <iostream> #include <cstdio> #define ll long long using namespace std; ll n,k,pre[1005],f[1005][1005]; string h,s; int main() { ...
2020-03-28
0
774
其实很好理解的
#include <iostream>//核心见注释 #include <cstdio> #include <cmath> #define ll long long using namespace std; int n; ll ans; struct pos { ...
2020-03-28
1
602
简单的烦恼题解
每人发,我就来解释一下吧!由读题可发现,若想听时间尽可能长的歌,在背包容量这一块儿不能设为t,就像样例那样:t=3+4,那就转化成了01背包(原版)。所以在这里背包容量设为t-1;访问的物品数量因为背包容量,所以被设为了n-1又因为抛弃了原版,所以在输入完毕后sort摆个序,最后的结果也就是f[t-...
2020-02-11
14
1008
CSP-J 2019公交换乘题解
#include <iostream> using namespace std; int n,f,h,t,ans,price[100005],tm[100005]; struct node { int pr,time; bool flag; }q[100005]; int...
2019-11-23
0
842