摘要: 这道题容斥想了半天。。。 拉丁字母共 52个 2^52 = 4e15, 不会爆long long,于是先给字母编号 inline int calc(char c) { if (c < 'a') return c - 'A'; return (c - 'a' + 26); } 这样对于当前状态 ll 阅读全文
posted @ 2020-04-05 13:28 洛绫璃 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define ll long long using namespace std; int n, mod = 1000000007; char s[200005]; int main() { cin >> n >> s + 1; ll ans = 0 阅读全文
posted @ 2020-04-05 12:16 洛绫璃 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; int n; set <int> a; map <int,int> cnt; int main() { cin >> n; int ans = 0; for (int i = 1; i <= n; ++i) 阅读全文
posted @ 2020-04-05 12:08 洛绫璃 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 数据范围很小,搜索即可 #include<bits/stdc++.h> #define sc(n) scanf("%d",&n) #define ll long long #define db double #define P pair<int,int> using namespace std; i 阅读全文
posted @ 2020-04-05 12:05 洛绫璃 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 根据题意模拟 #include <bits/stdc++.h> #define ull unsigned long long #define P pair<int, int> #define sc(n) scanf("%d", &n) using namespace std; const int p 阅读全文
posted @ 2020-04-05 11:58 洛绫璃 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 水题 #include<bits/stdc++.h> using namespace std; int a, b, k; int main(){ cin >> a >> b >> k; while(k--) if(a>b) a /= 2; else b /= 2; cout << max(a,b) 阅读全文
posted @ 2020-04-05 11:54 洛绫璃 阅读(123) 评论(0) 推荐(0) 编辑