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) 编辑

导航