上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: 比完看acdream说这题是签到题 怎么都不会写 我现在补完也觉得 这不是傻逼题么 我我这个这么快5题的人真的不应该啊 #include<bits/stdc++.h> using namespace std; typedef long long ll; #define sz(X) ((int)X.s 阅读全文
posted @ 2016-10-06 21:43 basasuya 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 这个dp题很有学问,我也是照着标称写的 还需要学习 补: if(order[i] < order[i-1]) pre[j] += now[j]; 这句的解释 首先order表示的是每个数字排序之后的数组 order[0] 就是最小的那个数字是原来数组哪一个 但是会有等于的情况 所以这里定义的是如果 阅读全文
posted @ 2016-10-05 21:59 basasuya 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 能把 not working now 写成 not working hard now 还查一晚上也是没谁了 我的做法是维护两个set 分别是前20% 和后80% #include<iostream> #include<algorithm> #include<set> #include<cmath> 阅读全文
posted @ 2016-10-05 19:24 basasuya 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 贴下以前写的代码 比赛前我准备着重看的 主席树 树dp 字符串 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 1e5+5; const int MOD = 1e9+7; int 阅读全文
posted @ 2016-10-04 01:30 basasuya 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 这题真的有毒 首先你忽略 N-M < 100 的条件你就gg吧 其次就算你知道了怎么做之后 还有可能因为写vector或者各种常数大的原因被卡 #include<iostream> #include<cstdio> #include<algorithm> #include<vector> #incl 阅读全文
posted @ 2016-10-03 11:08 basasuya 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 贪心 如果有0先变成非0 如果负数的个数 应该变为偶数 之后就是每次将绝对值最小的值加K #include<bits/stdc++.h> using namespace std; const int MAXN = 2e5+5; typedef long long ll; int N,K,X; ll 阅读全文
posted @ 2016-10-01 13:50 basasuya 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 技不如人甘拜下风 这题网上说法有 建反向边和先拓扑 都是为了每个点之前将其前驱都遍历到 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 5005; const int INF = 阅读全文
posted @ 2016-10-01 11:37 basasuya 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 重温了这道cdq+FFT 讲白了就是不断对 dp[l~mid] 和 sh[1~r] 进行fft 得到 dp[mid+1~r] #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 1e5 阅读全文
posted @ 2016-09-29 18:34 basasuya 阅读(125) 评论(0) 推荐(0) 编辑
摘要: FFT 就可以了 比赛时候没时间做了 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int MAXN = 6e4+5; int A[MAXN<< 阅读全文
posted @ 2016-09-25 15:16 basasuya 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题解的那种前缀和以前没学过,感觉是种套路 #include<bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; const int MAXN = 1e4+5; #define lson l,m,rt<<1 #define r 阅读全文
posted @ 2016-09-25 14:16 basasuya 阅读(121) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页