摘要: Werewolf PAT-1148 题目的要点是不管n规模多大,始终只有两个狼人 说谎的是一个狼人和一个好人 紧紧抓住这两点进行实现和分析 #include <iostream> #include <vector> #include <cmath> using namespace std; int 阅读全文
posted @ 2020-09-19 21:19 Garrett_Wale 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Cut Integer PAT-1132 #include<iostream> #include<cstring> #include<string> #include<algorithm> #include<cstdio> #include<sstream> #include<cstdlib> us 阅读全文
posted @ 2020-09-19 19:44 Garrett_Wale 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Look-and-say Sequence PAT-1140 #include<iostream> #include<cstring> #include<string> #include<algorithm> #include<cstdio> #include<sstream> using name 阅读全文
posted @ 2020-09-19 19:14 Garrett_Wale 阅读(102) 评论(0) 推荐(0) 编辑
摘要: A Delayed Palindrome PAT-1136 我这里将数字转换为字符串使用的是stringstream字符串流 扩充:将字符串转换为数字可以使用stoi函数,函数头为cstdlib #include<iostream> #include<cstring> #include<string 阅读全文
posted @ 2020-09-19 17:39 Garrett_Wale 阅读(152) 评论(0) 推荐(0) 编辑