摘要: Problem A. The Third Cup is Free 签到 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int inf=0x3f3f3f3f; 4 const int maxn=100005; 5 int T,n,a 阅读全文
posted @ 2017-09-26 21:26 myhappinessisall 阅读(282) 评论(0) 推荐(0) 编辑
摘要: A 签到,注意%k 1 #include <bits/stdc++.h> 2 const long long mod = 1e9+7; 3 const double ex = 1e-10; 4 #define inf 0x3f3f3f3f 5 using namespace std; 6 long 阅读全文
posted @ 2017-09-26 21:12 myhappinessisall 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 2017 Multi-University Training Contest - Team 10 rank 71 1002 Array Challenge BM算法 View Code 1008 Monkeys 二二猴子配对 View Code 1010 Schedule 贪心 View Code 阅读全文
posted @ 2017-09-26 21:04 myhappinessisall 阅读(126) 评论(0) 推荐(0) 编辑
摘要: A 暴力 bitset #include <bits/stdc++.h> using namespace std; int T,n; char s[2055][2055]; bitset<2017> bit1[2017],bit2[2017]; int main() { scanf("%d",&T) 阅读全文
posted @ 2017-09-17 20:30 myhappinessisall 阅读(151) 评论(0) 推荐(0) 编辑
摘要: A 状压暴力 #include <bits/stdc++.h> using namespace std; typedef pair<int,int> pii; const int dx[2][4]={1,-1,-1,1,0,0,0,0}; const int dy[2][4]={0,0,0,0,1, 阅读全文
posted @ 2017-09-17 20:14 myhappinessisall 阅读(106) 评论(0) 推荐(0) 编辑
摘要: A #include <bits/stdc++.h> using namespace std; int T,n,m; char s[1005]; int main() { scanf("%d",&T); while (T--) { scanf("%d%d%s",&n,&m,s); int c=0; 阅读全文
posted @ 2017-09-17 20:07 myhappinessisall 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1002 Ch’s gift 垃圾题。暴力和主题树都能过。 #include <bits/stdc++.h> using namespace std; const int maxn=100005; int n,m,fa[maxn],s,t,x,y,d[maxn],head[maxn],nxt[max 阅读全文
posted @ 2017-08-22 20:18 myhappinessisall 阅读(168) 评论(0) 推荐(1) 编辑
摘要: rank:217/883 我们(kugwzk)好菜啊....怎么又被学弟们打爆了啊。。。学弟们都嚷嚷着要去区域赛了啊。。。 1001 线段树合并,预先处理出每个值在最终的序列中的位置,维护一个前缀和的和的标记,然后在dfs的过程中线段树合并。时间复杂度为O(nlogn),空间复杂度就大了一点,补题的 阅读全文
posted @ 2017-08-19 22:55 myhappinessisall 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 一场挺傻逼的比赛。。。。被一群省队学弟吊起来打。250/735 惨哦。 1002 Build a tree 【待补】 暴力建图题,好像坑点较多。 1005 Euler theorem 简单签到 #include <bits/stdc++.h> using namespace std; int T; 阅读全文
posted @ 2017-08-16 20:33 myhappinessisall 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 206/734 1002.Mindis【补】 图上一点关于圆心的反演 #include <bits/stdc++.h> using namespace std; const int maxn=500005; const long double eps=1e-15; int sgn ( long do 阅读全文
posted @ 2017-08-16 13:51 myhappinessisall 阅读(151) 评论(0) 推荐(0) 编辑