且歌且行,眉目轻盈。何妨吟啸且徐行|

胖柚の工作室

园龄:2年1个月粉丝:2关注:15

随笔分类 -  AtCoder

AtCoder Beginner Contest 053
摘要:A - ABC/ARC #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); int x; ci
13
0
0
AtCoder Beginner Contest 052
摘要:A - Two Rectangles #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); in
4
0
0
AtCoder Beginner Contest 051
摘要:A - Haiku 直接模拟。 #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); strin
6
0
0
AtCoder Beginner Contest 049
摘要:A - UOIAUAI #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); char c; c
8
0
0
AtCoder Beginner Contest 050
摘要:基本上独立做出来了。 A - Addition and Subtraction Easy 模拟。 #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdi
10
0
0
AtCoder Beginner Contest 048
摘要:A - AtCoder *** Contest 先输出首字母,然后遍历字符串,遇到空格就输出后面的第一个字符。 #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_wi
6
0
0
AtCoder Beginner Contest 047
摘要:A - Fighting over Candies 简单排序。 #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie
9
0
0
AtCoder Beginner Contest 046
摘要:A - AtCoDeer and Paint Cans 可由 set 的性质轻松解决。 #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_s
13
0
0
AtCoder Beginner Contest 045
摘要:A - Trapezoids #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); int a,
10
0
0
AtCoder Beginner Contest 044
摘要:A - Tak and Hotels (ABC Edit) #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(n
7
0
0
AtCoder Beginner Contest 043
摘要:D - Unbalanced 只需要找到形如 XXXYX 的字串即可。即两个相同字符之间最多间隔一个字符。 证明:若不然,AXYA,每加一个字符 A,都要增加多余字符 XY,不可能符合要求。 #include <bits/stdc++.h> using na
5
0
0
AtCoder Beginner Contest 042
摘要:C - Iroha's Obsession 用一个 st 数组把每一位标记,然后枚举大于 n 的数,一旦有各位都满足要求的数出现就 break。 #include <bits/stdc++.h> using namespace std; using i64 =
13
0
0
Atcoder Beginner Contest 356
摘要:A - Subsegment Reverse #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr)
10
0
0
Atcoder Beginner Contest 355
摘要:A - Who Ate the Cake? #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr);
16
0
0
Atcoder Beginner Contest 354
摘要:A - Exponential Plant #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false), cin.tie(nullptr);
18
0
0
ABC 288 D - Range Add Query
摘要:题目链接: 设 a[i] 表示下标对 k 取模为 i 的所有数的和。那每次操作就是将数组 a 的所有数都加 c。最终为 0 的充分必要条件就是 a 的所有数都是一样的。 因此,对于每组询问,统计 [l,r] 中数字下标对 k
22
0
0
ABC 288 C - Don't be cycle
摘要:题目链接: 题目大意:给定一个简单无向图,要求删除最小的边数(可以不删)使得图中没有环。 每增加一条边,看这条边的端点 ab 是否在一个连通块中,在的话就答案 +1(属于废边),否则将连通块合并。 #include <bits/stdc++.h> using namespa
19
0
0
ABC 287 E - Karuta
摘要:题目链接: 方法一、Trie 由于 LCP(Si,Sj) 表示两字符串最长公共前缀的长度,首先第一反应就是字典树。 这题比较特殊,需要对每一个字符串求解其对其他所有字符串最长公共前缀的最大值。 思路:先将所有字符串插入字典树中,然后对于每个字符串,忽略字典树里它独有的结点
16
0
0
ABC 287 D - Match or Not
摘要:题目链接: 第一次提交:依据题意直接模拟,喜提 TLE。 #include <bits/stdc++.h> using namespace std; bool check(string a, string b) { for (int i = 0; i < a.size(); i++)
9
0
0
ABC 287 B - Postal Card
摘要:题目链接: 由于是可以和 T 的多个字符串相同而仅计数一次,考虑把 T 中的字符串用 set 存储已达到去重的目的。 注:setcount 返回 1 表示找到了该元素,返回 0 则说明没找到。 #include <
17
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起