摘要: 题目链接:https://vjudge.net/contest/162220#problem/E 题解: 1.只要字符串 比z字符串的元素小就是 NO直接输出-1就行了 2.其实这题有点sb,a字符串在大于x【】只要比x【】大就行 AC code: #include <stdio.h>#includ 阅读全文
posted @ 2017-05-06 22:13 Demon2017 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/contest/162220#problem/D 题解: 1.构造两个函数(1-> 判断是否已经达到目的 2->计算达到目标字符串所需要多少步)//详见代码 2.主函数利用双重for循环来找到最少所需要的步数 AC code: #include <io 阅读全文
posted @ 2017-05-06 22:10 Demon2017 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/contest/162220#problem/C 题解: 1.利用数组标记是否有人入住 2.以二丫为中心,分两次线性扫描得出前后两个最短距离 3.两个比较得出min AC code: #include <stdio.h>#include <string 阅读全文
posted @ 2017-05-06 22:04 Demon2017 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/contest/162220#problem/B 题解: 1.线性扫描如果是VK利用新数组标记特殊,若是单独V K用其他标记 2.特殊的++,其他标记的若有相同的V || K在一起的话++ AC code: #include <stdio.h>#inc 阅读全文
posted @ 2017-05-06 21:59 Demon2017 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://vjudge.net/contest/162220#problem/A 题解: 1.水题 2.前后对称扫描,不同++ 3.分奇偶 AC code: #include <stdio.h> #include <string.h> int main() { char a[30] 阅读全文
posted @ 2017-05-06 21:52 Demon2017 阅读(100) 评论(0) 推荐(0) 编辑