2020年8月9日

摘要: 题意: 分别找到 a 类和 b 类中的最小值,判断当前 a 和 b 变到最小值的最大值,最后累加即可。 #include<iostream> using namespace std; const int maxn=1e6+20; int a[100],b[100]; #define inf 0x3f 阅读全文
posted @ 2020-08-09 19:33 YovM_21 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 题意: 暴力枚举 #include <iostream> #include<algorithm> #include<cstring> using namespace std; int a[55], ans, mc[105]; bool vis[55]; int main() { int t; cin 阅读全文
posted @ 2020-08-09 19:05 YovM_21 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题意 给定一个01串s,完全分割成若干子序列,其中的子序列不包含两个相邻的0或1(eg:"0101","1010")。对s按这样的分割方式,最少能分出多少串子序列?同时,还要求输出s串中每一字符所在的分割出的子序列编号 #include <iostream> #include <vector> #i 阅读全文
posted @ 2020-08-09 18:15 YovM_21 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题意:排序后,若有两数差大于一的,则输出“NO”,反则输出“YES”。 #include<iostream> #include<algorithm> using namespace std; int a[105]; int n,t; int main() { cin>>t; while(t--){ 阅读全文
posted @ 2020-08-09 18:05 YovM_21 阅读(138) 评论(0) 推荐(0) 编辑

2020年8月6日

摘要: C. Uncle Bogdan and Country Happiness time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Un 阅读全文
posted @ 2020-08-06 16:34 YovM_21 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Captain Flint and his crew keep heading to a savage shore of Byteland for several months already, drinking rum and telling stories. In such moments un 阅读全文
posted @ 2020-08-06 14:52 YovM_21 阅读(164) 评论(0) 推荐(0) 编辑
摘要: A - Captain Flint and Crew Recruitment Despite his bad reputation, Captain Flint is a friendly person (at least, friendly to animals). Now Captain Fli 阅读全文
posted @ 2020-08-06 13:42 YovM_21 阅读(160) 评论(0) 推荐(0) 编辑

2020年7月27日

摘要: question: InputThe first line of input gives the number of cases, T. T test cases follow, each on a separate line. Each test case contains one positiv 阅读全文
posted @ 2020-07-27 23:35 YovM_21 阅读(95) 评论(0) 推荐(0) 编辑

2020年7月26日

摘要: question: 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。另一方面, 阅读全文
posted @ 2020-07-26 23:10 YovM_21 阅读(187) 评论(0) 推荐(0) 编辑
摘要: question: A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edge 阅读全文
posted @ 2020-07-26 20:17 YovM_21 阅读(125) 评论(0) 推荐(0) 编辑

导航