跳至内容
CVBB ACM Team
用户工具
注册
登录
站点工具
搜索
工具
显示页面
修订记录
Copy this page
导出 PDF
反向链接
最近更改
媒体管理器
网站地图
注册
登录
>
最近更改
媒体管理器
网站地图
您在这里:
front_page
»
2020-2021
»
teams
»
too_low
»
0725-0731
2020-2021:teams:too_low:0725-0731
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== 2020/07/25 – 2020/07/31 周报 ====== <html><br/></html> ===== 团队训练 ===== * [[niukediwuchang00|牛客多校第五场]] ''%%pro: 5/6/11%%'' ''%%rk: 54/1145%%'' * [[niukediliuchang00|牛客多校第六场]] ''%%pro: 5/5/11%%'' ''%%rk: 92/1120%%'' <html><br/></html> ===== 李英龙 ===== ==== 专题 ==== [[https://blog.csdn.net/dragonylee/article/details/107660418|生成函数]] ==== 比赛 ==== * [[https://blog.csdn.net/dragonylee/article/details/107707121|Codeforces Round #660 (Div. 2)]] ''%%pro: 4/4/5%%'' ''%%rk: 963/18771%%'' * [[https://blog.csdn.net/dragonylee/article/details/107711732|M-SOLUTIONS Programming Contest 2020]] ''%%pro: 6/6%%'' ''%%rk: NaN%%'' **FINISHED** ==== 题目 ==== 无 <html><br/></html> ===== 陈源 ===== ==== 专题 ==== [[swdp_cy|数位dp]] ==== 比赛 ==== * [[cf660_cy|Codeforces Round #660 (Div. 2)]] ''%%pro: 3/4/5%%'' ''%%rk: 1572/18771%%'' ==== 题目 ==== 无 <html><br/></html> ===== 胡琎 ===== ==== 专题 ==== 无 ==== 比赛 ==== * [[2020-2021:teams:too_low:cf659_hj|Codeforces Round #659 (Div. 2)]] ''%%pro: 2/4/7%%'' ''%%rank 2380/10822%%'' * [[2020-2021:teams:too_low:cfedu92hj|Educational Codeforces Round 92]] ''%%pro: 4/4/7%%'' ''%%rank 989/13827%%'' ==== 题目 ==== 无 <html><br/></html> ===== 本周推荐 ===== ==== 李英龙 ==== [[https://blog.csdn.net/dragonylee/article/details/107660418|生成函数的一些总结]] ==== 陈源 ==== [[swdp_cy|数位dp小结]] ==== 胡琎 ==== CF 659 B2 Koa and the Beach (Hard Version) [[https://codeforces.com/contest/1384/problem/B2]] ** 题意 ** 需要从海滩游到海岛上,给定初始时波浪高度等于0时的水深分布,波浪高度在0-k-0-k之间连续变动,已知最深能够游的水深D,求是否可以游到小岛 ** 题解 ** 设波浪高度为k-0-k,维护到达位置i时,可能的波浪时间范围[l, r]。位置i+1时,波浪的范围为[l+1, r+1]和 [k - (D - d[i]), k + (D - d[i])]的交,如果长度为0则不可游到。特别的,如果D大于d[i]+k则时间范围为[0,2k-1],即整个长度 特别要注意D - d[i]小于0的情况。这里pretest没有测结果B2 System test的时候WA了 ** Tag ** dp ** Comment ** 这道题需要基于位置思考,而不是基于时间思考,因为波浪的变化是周期性有规律的,便于处理,而水深的变化是任意的。 <hidden> <code cpp> #include <bits/stdc++.h> using namespace std; int d[300005]; int main(){ int t = 0; cin>>t; while(t--){ int n, k, l; cin>>n>>k>>l; for (int i = 1; i <= n; ++i) { cin>>d[i]; } int t1 = 0, t2 = 2*k-1; bool ok = true; for (int i = 1; i <= n; ++i) { if(l - d[i] >= k){ t1 = 0, t2 = 2*k-1; } else{ if(l < d[i]){ ok = false;break; } int tt1 = k - (l - d[i]); int tt2 = k + (l - d[i]); t1++, t2++; if(tt2 < t1 || tt1 > t2) { ok = false; break; } t1 = max(tt1, t1); t2 = min(tt2, t2); } } cout<<(ok ? "Yes" : "No")<<endl; } } </code> </hidden>
2020-2021/teams/too_low/0725-0731.txt
· 最后更改: 2020/08/02 11:27 由
dragonylee
页面工具
显示页面
修订记录
反向链接
Copy this page
导出 PDF
回到顶部