上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 区间dp 注意len==2的特判问题 1 #include<iostream> 2 #include<algorithm> 3 #include<cmath> 4 #include<cstdio> 5 #define INF 1e9 6 using namespace std; 7 const in 阅读全文
posted @ 2020-10-11 16:29 LegendN 阅读(90) 评论(0) 推荐(0)
摘要: 前缀和+离散化+端点维护 为什么现在总是想用树状数组?!!! 服了画蛇添足 离散化数组开两倍空间竟然写成 maxn >> 1 WA了两罚 1 #include<iostream> 2 #include<algorithm> 3 #include<cstdio> 4 #define ll long l 阅读全文
posted @ 2020-10-11 14:17 LegendN 阅读(101) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<vector> 5 #include<cmath> 6 using namespace std; 7 int n, q; 8 int main(){ 9 阅读全文
posted @ 2020-10-09 20:27 LegendN 阅读(78) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cmath> 3 #include<cstdio> 4 #include<algorithm> 5 #include<iomanip> 6 #define pi acos(-1) 7 using namespace std; 8 9 i 阅读全文
posted @ 2020-10-08 16:57 LegendN 阅读(83) 评论(0) 推荐(0)
摘要: https://www.acwing.com/blog/content/31/ 服了 每次有二分的题总归写错... 小本本上记好! 1 int l = 0, r = mx; 2 while(l < r){ 3 int mid = (l + r) >> 1; 4 if(check(mid)){ 5 l 阅读全文
posted @ 2020-10-07 16:45 LegendN 阅读(76) 评论(0) 推荐(0)
摘要: 洛谷p2345 奶牛叫不出の痛 1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const int maxn = 2e5 + 10; 5 int n; 6 ll cnt[maxn];//cnt[i]表 阅读全文
posted @ 2020-10-07 15:02 LegendN 阅读(124) 评论(0) 推荐(0)
摘要: 听上去很高端,实则就是将多次询问读入后,再统一进行处理;而不是读一个解决一个。 洛谷p1972 HH的项链 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<string> 5 #include<cma 阅读全文
posted @ 2020-10-04 14:00 LegendN 阅读(317) 评论(0) 推荐(0)
摘要: int sz; for(int i = 1 ; i <= n ; i++){ scanf("%d%d%d%d",&X1,&Y1,&X2,&Y2); //X1++;Y1++; M[X1][Y1]++; if(Y2 + 1 <= sz) M[X1][Y2 + 1]--; if(X2 + 1 <= sz) 阅读全文
posted @ 2020-10-03 22:50 LegendN 阅读(183) 评论(0) 推荐(0)
摘要: 今天碰到一个有趣的问题,数据大概是3e4,DEV本地自测开了3e5的maxn,结果在执行solve()的时候炸了? QWORD PTR [rcx],0x0 ??啥子意思哦 想了想调回3e4就好了......请未来的自己告诉我这是为什么? 阅读全文
posted @ 2020-10-03 21:53 LegendN 阅读(584) 评论(0) 推荐(0)
摘要: 2020.10.02 学字典树几天了,但还是做不出什么题目。但好歹能看懂别人的代码,这么弱的我只能靠这样来一点点进步了。 国庆在家写代码的节奏也放慢了,没有学校里机房里效率高。虽然平时机房里也没几个人。 虽然我真的很弱,但我真心希望自己和身边的人都能够变强,能一起努力,一起在机房熬夜。或许这样我才能 阅读全文
posted @ 2020-10-02 22:59 LegendN 阅读(102) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页