随笔分类 -  ABC合集

摘要:https://atcoder.jp/contests/abc297/tasks/abc297_d ###D - Count Subtractions 题目大意: 给定一个n和一个m,每次如果n>m,n-=m;如果n<m,m-=n; 问我们多少次操作才能使n=m? Sample Input 1 3 阅读全文
posted @ 2023-04-11 20:54 Vijurria 阅读(31) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc296 ###A - Alternately #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; cons 阅读全文
posted @ 2023-04-01 23:31 Vijurria 阅读(29) 评论(0) 推荐(0) 编辑
摘要:###A - Swap Odd and Even #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; const LL MAXN=1e18,MINN=-1e18; co 阅读全文
posted @ 2023-03-13 19:31 Vijurria 阅读(41) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc292/tasks 来水一篇题解嘻嘻🤭 ###A - CAPS LOCK #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<L 阅读全文
posted @ 2023-03-07 17:46 Vijurria 阅读(12) 评论(1) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc286/tasks/abc286_d 题目大意: 给定n种钱,一共需要我们凑到x元。 n种类型的钱中每一种钱币值为ai,有bi张。 问我们能不能够凑到x元?可以的话输出Yes,不行的话就输出No。 Sample Input 1 2 19 阅读全文
posted @ 2023-03-02 17:15 Vijurria 阅读(50) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc287/tasks/abc287_e ###E - Karuta 题目大意: 给定n个字符串数组Si,问每个字符串与其他字符串的最长公共前缀是多少。 Sample Input 2 11 abracadabra bracadabra rac 阅读全文
posted @ 2023-03-01 21:38 Vijurria 阅读(29) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc291/tasks/abc291_e 题目大意: 长度为n的全排列A(A1,A2,A3,,,An)。 给定m条标记,每一条标记中有x和y,表示x这个位置上的数字会小于y这个位置上的数字, 问我们A能唯一确定吗?如果可以,随便找一个。不可以 阅读全文
posted @ 2023-02-28 21:58 Vijurria 阅读(52) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc291/tasks/abc291_d 题目大意: n张卡片排成一行。每张卡片正面是数字ai,背面是数字bi。最初,所有的牌都处于正面状态。 随机翻转>=0张卡片。问这一列是否相邻中的数字都是不同的,是就可行,求出这样可行的方法数量(以99 阅读全文
posted @ 2023-02-27 23:04 Vijurria 阅读(43) 评论(0) 推荐(0) 编辑
摘要:半个多月没写题,连暴力dfs都忘记了,完蛋,烂菜地里了 https://atcoder.jp/contests/abc289/tasks/abc289_c 题目大意: 给定一个N,M个集合,然后分别给出M个集合里面的数字个数以及每个数, 问我们怎样选集合能达到1到N的每一个数字都存在,问我们这样的选 阅读全文
posted @ 2023-02-23 20:43 Vijurria 阅读(32) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc290/tasks/abc290_d 题目大意: 一开始总共有N个方块,下标为0,1,2,3,4...n-1,一开始都没有标记。 给定整数D和K,执行K次操作,问第K次标记的方块是第几个? 具体规则: 第一次操作:给0标记 然后:给(la 阅读全文
posted @ 2023-02-22 21:24 Vijurria 阅读(59) 评论(0) 推荐(0) 编辑
摘要:来水一篇博客,前面虽然打了挺多比赛,但是一直在忙项目和考试,没补题,那些就等补完题目再写完整的题解咯(:水多了也不好哈哈 https://atcoder.jp/contests/abc288 今天这场断层了,D直接ac人数不超过1k,unrated的我慢悠悠造完三题下班~ ###A - Many A 阅读全文
posted @ 2023-02-04 23:43 Vijurria 阅读(53) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc285/tasks ###A - Edge Checker 2 题目大意: 二叉树,给定两个数字,问其中一个是否和另一个数字直接连线?也即是是否是父节点? Sample Input 1 1 2 Sample Output 1 Yes #i 阅读全文
posted @ 2023-01-15 21:54 Vijurria 阅读(58) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc283 ###A - Power 题目大意: 输出a的b次方。 Sample Input 1 4 3 Sample Output 1 64 #include<bits/stdc++.h> using namespace std; type 阅读全文
posted @ 2022-12-25 12:05 Vijurria 阅读(24) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc267/tasks/abc267_d 题目大意: 给定长度为n的数组a,让我们从中选择m个数字,按顺序 组成B(a1 am)之后,sum=1*a1+……+m*am; 问我们sum最大值是多少? Sample Input 1 4 2 5 4 阅读全文
posted @ 2022-11-11 16:49 Vijurria 阅读(57) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc270/tasks/abc270_e 题目大意: 有n个篮子排列成一个圆圈,每个篮子里面有ai个苹果🍎 高桥从1号篮筐前开始,重复以下动作。 如果他面对的篮子里有一个苹果,拿一个吃了它。然后,不管他现在是否已经吃了一个苹果,继续到紧挨着 阅读全文
posted @ 2022-11-11 14:40 Vijurria 阅读(49) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc270/tasks/abc270_d 题目大意: 给定我们总共n个石子,我们每次拿的数量都必须是数组a中的一个,高桥先手,青木后手。 问我们高桥可以拿到的最大数量的石子数是多少? Sample Input 1 10 2 1 4 Sampl 阅读全文
posted @ 2022-11-09 21:13 Vijurria 阅读(17) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc271 A - 484558 题目大意: 将数字转化成两位的16进制数字,字符需要大写。 可补前导0。 Sample Input 2 12 Sample Output 2 0C #include<bits/stdc++.h> using 阅读全文
posted @ 2022-11-09 20:12 Vijurria 阅读(52) 评论(0) 推荐(0) 编辑
摘要:A - Rightmost #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; const LL MAXN=1e18; const LL INF=1e9; const 阅读全文
posted @ 2022-11-08 18:28 Vijurria 阅读(34) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc273 A - A Recursive Function #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII 阅读全文
posted @ 2022-11-04 21:34 Vijurria 阅读(63) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc274/tasks A - Batting Average #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PI 阅读全文
posted @ 2022-11-04 17:49 Vijurria 阅读(46) 评论(0) 推荐(0) 编辑