04 2018 档案

摘要:A.1-偏差排列 dp? 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 LL f[55][3]; 5 6 int main(){ 7 int N; 8 scanf("%d", &N); 9 f[ 阅读全文
posted @ 2018-04-29 19:51 Aguin 阅读(200) 评论(2) 推荐(0) 编辑
摘要:A - Zero-Sum Ranges 暴力 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 map<LL, LL> cnt; 5 const int maxn = 2e5 + 10; 6 LL 阅读全文
posted @ 2018-04-29 19:34 Aguin 阅读(175) 评论(0) 推荐(0) 编辑
摘要:A.字典序最大的子序列 倒着贪心 1 #include <bits/stdc++.h> 2 using namespace std; 3 char s[111111]; 4 5 int main(){ 6 string ans = ""; 7 scanf("%s", s + 1); 8 int le 阅读全文
posted @ 2018-04-28 08:41 Aguin 阅读(242) 评论(0) 推荐(0) 编辑
摘要:C - Half and Half 随便判判 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int main(){ 5 int A, B, C, X, Y, ans = 0; 6 scanf("%d %d %d %d %d", &A, & 阅读全文
posted @ 2018-04-22 20:12 Aguin 阅读(166) 评论(0) 推荐(0) 编辑
摘要:A. No Nine 数位dp 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 5 int d[22]; 6 LL po[22], f[22][2][9]; 7 LL cal(LL x){ 8 i 阅读全文
posted @ 2018-04-22 17:03 Aguin 阅读(562) 评论(0) 推荐(0) 编辑
摘要: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 阅读(195) 评论(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 阅读(313) 评论(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 阅读(2030) 评论(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 阅读(548) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示