暴力枚举
阿晴0917
这个作者很懒,什么都没留下…
展开
-
Codeforces1247C. p-binary __builtin_popcount()二进制下1的个数
http://codeforces.com/contest/1247/problem/C#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5;ll n,p;int main(){ cin>>n>>p; for(int i...原创 2019-10-30 15:17:56 · 138 阅读 · 0 评论 -
2019CometOJ 例题 暴力枚举 取最值(误以为dp 分析当前状态取决于上一次可行)
#include&amp;amp;lt;iostream&amp;amp;gt;#include&amp;amp;lt;cstdio&amp;amp;gt;#include&amp;amp;lt;string&amp;amp;gt;#include&amp;amp;lt;cstring&amp;amp;gt;#include&amp;amp;lt原创 2019-01-31 16:31:00 · 217 阅读 · 0 评论 -
CodeForces1005C.Summarize to the Power of Two(2次幂位运算枚举暴力)
#include<iostream>#include<cstdio>#include<algorithm>#include<string>#include<cstring>#include<vector>#include<set>#include<map>#inclu原创 2019-02-22 00:05:04 · 190 阅读 · 0 评论 -
gym101972
E. Stupid Submissions (暴力模拟)https://codeforces.com/gym/101972/problem/EWhen Abed gets a wrong answer on test x (x ≤ n), he can see all the tests up to test number x. If Abed gets accepted, he can se...原创 2019-04-26 00:17:36 · 257 阅读 · 0 评论 -
Codeforces 831D Office Keys 贪心枚举
暴力2e6复杂度先排序 左边人尽量拿左边钥匙 右边人尽量拿右边的 用n个人长度滑窗钥匙长度为k的区间 所有方案枚举比如2人 4把钥匙1-2 2-3 3-4 3种方案O(kn)=20001000=2e6ll a[maxn],b[maxn],vis[maxn];ll n,k,p,maxx=0;int main(){ cin>>n>>k...原创 2019-05-30 22:33:57 · 185 阅读 · 0 评论