04 2023 档案
摘要:https://codeforces.com/contest/1144/problem/F 题目大意: 给定n个点,m条边; 每一条边都连接了两个点。 现在需要我们染色,要求是做到所有有向图不包含长度为2或者更长的路径。 input 6 5 1 5 2 1 1 4 3 1 6 1 output YE
阅读全文
摘要:https://codeforces.com/contest/1320/problem/A ###A. Journey Planning 题目大意: 给定一组数,问我们ai-aj==i-j的时候就可以把ai的值加起来,问我们可以凑到的最大总值是多少? input 6 10 7 1 9 10 15 o
阅读全文
摘要:https://codeforces.com/contest/1820 ###A. Yura's New Name 题目大意: 给定一个字符串,每次这个表情^^或者这个表情^_^就是合法的 问我们这个字符串至少要添加多少东西使得怎么看都是合法的? input 7 ^______^ ___^_^^^_
阅读全文
摘要:https://codeforces.com/contest/1535/problem/C 题目大意: 给定一个字符串s,由 1 0 ?组成:?每次都可以任意替换成0或者1 问我们这个子字符串中,能够组成010101这样两两互不相等的字符串的数量最大是多少? input 3 0?10 ??? ?10
阅读全文
摘要: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
阅读全文
摘要:https://pintia.cn/problem-sets/994805046380707840/exam/problems/994805050709229568 输入样例: 7 5 4 1 2 2 3 3 1 4 5 5 6 1 4 5 7 输出样例: 2 6 4 0 #include<bits
阅读全文
摘要:https://pintia.cn/problem-sets/994805046380707840/exam/problems/994805052626026496 输入样例: 3 4 5 2 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1
阅读全文
摘要:https://codeforces.com/contest/1433/problem/E 题目大意: n个人(n是偶数)跳了两轮舞,每轮舞正好有n/2个人。你的任务是找出n个人跳两轮舞的方法,如果每轮舞正好由n/2个人组成。每个人都应该属于这两种圆舞中的一种。 人相同位置不同也算是同一种方案。 i
阅读全文
摘要:https://www.acwing.com/activity/content/competition/problem_list/3128/ ###4947. 大整数 题目大意: 给定n,k。输出n个k。 输入样例: 3 2 输出样例: 222 #include<bits/stdc++.h> usi
阅读全文
摘要:https://ac.nowcoder.com/acm/contest/49030 这套题目质量挺好的,E过了200+,状态不佳,改天补补 ###A-子序列的权值最小值 输入 6 1 1 4 5 1 4 输出 0 #include<bits/stdc++.h> using namespace std
阅读全文
摘要:https://ac.nowcoder.com/acm/contest/46597 ###A-超市里扫货 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; const
阅读全文
摘要:https://codeforces.com/contest/1352 不知道怎么的复制过来的代码容易歪,观看效果可能不大好。 这场古早div4,大题极其友好,除了E卡空间卡到我爆炸,别的都体验感极好。 ###A. Sum of Round Numbers #include<bits/stdc++.
阅读全文
摘要:https://codeforces.com/contest/1516/problem/B 题目大意: 给定长度为n的数组a,问我们能不能一直选择两个相邻的元素进行异或后,删除这两个值,把异或值留下来, 最后剩下>=2个数字,它们都是相同的? 可以做到输出YES,不能的话输出NO。 input 2
阅读全文
摘要:https://ac.nowcoder.com/acm/contest/47266#question ###A-幼稚园的树 输入 2 6 1 10 100 200 120 230 5 230 200 7 5 1 2 3 4 5 10 5 2 1 输出 31 40 130 230 150 225 1
阅读全文
摘要:https://atcoder.jp/contests/abc296 ###A - Alternately #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; cons
阅读全文
摘要:https://www.acwing.com/activity/content/competition/problem_list/3088/ 果然绩点成绩和竞赛水平总得寄一个(to me ###4944. 热身计算 #include<bits/stdc++.h> using namespace st
阅读全文