摘要: 判断s2是否为s1的字串。若是则输出1,否则输出0#include #include using namespace std;int main() { string s1; cin >> s1; int n; cin >> n; while (n --) { ... 阅读全文
posted @ 2016-05-18 21:27 Tovi 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Binary String Matching 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task i... 阅读全文
posted @ 2016-05-18 19:24 Tovi 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 一、定义 std:: string ::npos的定义:static const size_t npos = -1;表示 size_t 的最大值( Maximum value for size_t ) ,如果对 -1 表示size_t的最大值有疑问可以采用如下代码验证:#inclu... 阅读全文
posted @ 2016-05-18 19:13 Tovi 阅读(1569) 评论(0) 推荐(0) 编辑
摘要: skiing时间限制:3000 ms | 内存限制:65535 KB难度:5描述Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡... 阅读全文
posted @ 2016-05-18 14:24 Tovi 阅读(251) 评论(0) 推荐(0) 编辑