上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页
摘要: A.卡片游戏 暴力 1 #include <bits/stdc++.h> 2 using namespace std; 3 map<int, int> mp; 4 set<int> S; 5 const int maxn = 1e5 + 10; 6 int A[maxn], B[maxn]; 7 8 阅读全文
posted @ 2018-04-22 15:40 Aguin 阅读(193) 评论(0) 推荐(0) 编辑
摘要: A.直角三棱锥 枚举推式子 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 LL gcd(LL a, LL b){ 5 return a % b ? gcd(b, a % b) : b; 6 } 阅读全文
posted @ 2018-04-20 22:14 Aguin 阅读(311) 评论(0) 推荐(1) 编辑
摘要: 我重写行不? Comma Sprinkler 签到题,类似于BFS用两个队列维护每种单词前/后是否有逗号向前/后扩展,需要注意如果有句号挡着是不能扩展过去的,不过样例有。 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int ma 阅读全文
posted @ 2018-04-19 15:55 Aguin 阅读(1995) 评论(1) 推荐(0) 编辑
摘要: A.双人取数 预处理四个角,枚举重叠段,发现可以前缀max 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int INF = 1e9; 4 int G[1111][1111], lu[1111][1111], ru[1111][1 阅读全文
posted @ 2018-04-17 10:38 Aguin 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 10.17 HYSBZ - 4999 看似在线,实际每个数字独立,可以每种数字拆出来考虑,转变为树上单点修改询问链。 维护差分,变为子树修改,单点询问,排好dfs序后用线段树维护。 1 #include <iostream> 2 #include <cstdio> 3 #include <vecto 阅读全文
posted @ 2017-10-17 22:52 Aguin 阅读(374) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页