04 2020 档案

ICPC North Central NA Contest 2018
摘要:A 题解 rmq 代码 #include <bits/stdc++.h> #define all(n) (n).begin(), (n).end() #define se second #define fi first #define pb push_back #define mp make_pai
195
0
0
ICPC North Central NA Contest 2018 Pokegene
摘要:思路 题意不就不说了,刚开始用trie妥妥超时(后来看标程, 发现是trie + dp) 我然后又看到长度小于2e5,想后 缀数组的rmq(主要是学rmq部分) , 结果死在了求heigh数组, 毕竟heigh,你往后延伸不能从一个字符串跨到另一个字符串 折磨了半天, 突然想到heigh是求每个位置
216
0
0
单词 (AC自动机)
摘要:题目描述 某人读论文,一篇论文是由许多单词组成。但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次。 输入描述: 第一个一个整数N,表示有多少个单词,接下来N行每行一个单词。每个单词由小写字母组成,N ≤ 200,单词长度不超过10^6 输出描述: 输出N个整数,第i行的
228
0
0
ICPC Southeastern Europe Contest 2019 BDFIJ
摘要:B(DP) 最重要的是状态转移对同一阶段的影响, 就像01背包优化为什么要倒叙,但这道题不光要倒叙,还要把这阶段的转移先存起来,最后统一保存 就避免了转移同一阶段相互影响 至于排序,当然希望升级多余的经验越多越好。 #include <bits/stdc++.h> #define RE regist
225
0
0
ICPC Latin American Regional Contests 2019 EGIKLM
摘要:E (尺取法) #include <bits/stdc++.h> #define ll long long using namespace std; const int maxn = 2e5 + 5; int n; char s[maxn]; int main() { cin >> s + 1 >>
188
0
0
UCF Local Programming Contest 2017 ABCDEFGHI
摘要:A #include <bits/stdc++.h> using namespace std; int a, b , n, c; int main() { cin >> a >> b >> n; for (int i = 1; i <= n; ++i) { cin >> c; cout << c <
231
0
0
Codeforces #631 Dreamoon Likes Coloring
摘要:直接倒着放,然后在正着平移,使得铺满n #include <bits/stdc++.h> #define ll long long using namespace std; const int maxn = 1e5 + 5; int t, n, m, a[maxn], b[maxn]; int ma
217
0
0
Problem Palindrome
摘要:这道题容斥想了半天。。。 拉丁字母共 52个 2^52 = 4e15, 不会爆long long,于是先给字母编号 inline int calc(char c) { if (c < 'a') return c - 'A'; return (c - 'a' + 26); } 这样对于当前状态 ll
150
0
0
Problem Toki’s function
摘要:#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
139
0
0
UCF “Practice” Local Contest — Aug 25, 2018 Boots Exchange 水题
摘要:#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)
174
0
0
UCF “Practice” Local Contest — Aug 25, 2018 Rummy Score
摘要:数据范围很小,搜索即可 #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
220
0
0
UCF “Practice” Local Contest — Aug 25, 2018 Call Me Maybe
摘要:根据题意模拟 #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
180
0
0
UCF-PLC-20180825 A Fold the Paper Nicely 签到题
摘要:水题 #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)
125
0
0
ICPC Asia Taipei-Hsinchu Regional 2019
摘要:A(题解看注释) #include <bits/stdc++.h> #define P pair<int, int> using namespace std; struct mp { int p[7][7]; bool friend operator <(const mp &a, const mp
306
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起