随笔分类 -  算法与数据结构

相关学习总结
摘要:思路很简单,先是输入并统一大小写,然后在表中找到字串的第一个字符,并以此展开(FC()函数),确定了第二个元素方向后,调用CF()函数按方向一直查找下去。若完全匹配,则输出第一元素的位置。但是一直是WA,自己设的几组数据也不能通过。以下是代码:#include<iostream>#include<string>#include<cctype>using namespace std;int FC(int i,int j);int CF(int t,int x,int y);char a[50][50];int n,m;string s;int main(){ 阅读全文
posted @ 2012-05-25 08:19 Demon、 阅读(822) 评论(0) 推荐(0)
摘要:在一个博客上看到说这题最简单,然后就想“嚣张”的刷掉它。。。。。。。。。。。结果,被刷了~~~~(>_<)~~~~基本结构很容易写出,但也有几点要注意的:1、数据类型用unsigned long long2、不能用swap模板自己遇到的问题就这么些。哎 觉得好坑爹啊。。睡觉去了~The 3n+ 1 problemBackgroundProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive) 阅读全文
posted @ 2012-05-17 01:08 Demon、 阅读(235) 评论(0) 推荐(0)