
topcoder
make_it_for_good
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
topcoder 乱作系列1 srm500 srm501 srm502
SRM 500 250pts答案一定是被选次数最多的人被选的概率,模拟第一次后的结果,考虑剩下的个数。以后每次剩下的都是用n%当前的个数。#include <bits/stdc++.h>using namespace std;#define N 510int val[N];class MafiaGame{ public: double probabilityToLose(i原创 2016-08-24 18:59:01 · 4403 阅读 · 0 评论 -
topcoder乱作系列2 srm503 srm504
srm 503 250pts注意到答案只能是-1或1或2,判一下就行了。#include <bits/stdc++.h>using namespace std;class ToastXToast{public: int bake(vector<int>a1,vector<int>a2) { sort(a1.begin(),a1.end());原创 2016-09-07 09:53:28 · 1103 阅读 · 0 评论 -
2015年集训队作业
听说今年集训队作业是TC所以就从SRM699往前做好了。SRM 699 250pts按位处理。#include <bits/stdc++.h>using namespace std;#define ll long long int n,a[41];int cal(int x){ int ret=0,sum=0,cnt=0; for(int i=0;i<n;i++)原创 2016-10-05 20:15:03 · 1206 阅读 · 0 评论 -
SRM 565 div1
250pts直接dp,f[i][j]表示到i花费为j怪的最大价值和。#include <bits/stdc++.h>using namespace std;#define ll long longint n;ll f[51][110],ans;void upd(ll &x,ll y){x=max(x,y);}class MonstersValley{public: int m原创 2016-11-10 09:29:48 · 340 阅读 · 0 评论 -
SRM 552 Div1
250pts答案就是min(Rn∗(n+1)/6,Gn∗(n+1)/6,Bn∗(n+1)/6,R+G+Bn∗(n+1)/2)min(\frac{R}{n*(n+1)/6},\frac{G}{n*(n+1)/6},\frac{B}{n*(n+1)/6},\frac{R+G+B}{n*(n+1)/2})#include <bits/stdc++.h>using namespace std;#defi原创 2016-11-10 14:34:45 · 321 阅读 · 0 评论 -
SRM 553 Div1
250pts把那个东西当成一个变量带进去,单独考虑0的情况。#include <bits/stdc++.h>using namespace std;#define ll long longstruct node{ ll x,y; node(){} node(ll x,ll y):x(x),y(y){} friend node operator + (const原创 2016-11-10 20:52:21 · 612 阅读 · 0 评论 -
SRM 551 Div1
noip d2t3 没清数组实力滚粗,赶紧做一波SRM 冷静一下。。。。250pts最终答案里至少有一个点没改变位置。因此枚举没改变位置的点,然后把两边和他同色的点移过来的花费排个序,从小到大往里加,直到超过最大花费,更新一下答案。#include <bits/stdc++.h>using namespace std;int n,top,cnt,sum,ans;int st[110];cla原创 2016-11-22 14:42:54 · 469 阅读 · 0 评论