上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 题目链接:http://poj.org/problem?id=3461 大概意思就是标题那个意思,给样例数,给模式串,给主串,求模式串在主串出现的次数。数据量大,所以要用到KMP,然后简单变形下 #include#include#includeusing namespace std;char ... 阅读全文
posted @ 2016-10-22 14:44 弃用博客 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include "iostream"#include "stdlib.h"#include using namespace std;int main(){// map, char>mp;// mp[{'a','a'}]='a;// cout > mp; mp['a... 阅读全文
posted @ 2016-10-10 22:53 弃用博客 阅读(278) 评论(0) 推荐(0) 编辑
摘要: /*1.有一个单链表(不同结点的数据域值可能相同),其头指针为head,编写一个函数计算数据域为x的结点个数*/#include #include using namespace std;struct node{ int data; struct node *next; };struct ... 阅读全文
posted @ 2016-10-05 18:06 弃用博客 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 相比SDK编程MFC中省了那么多代码是如何实现的?都调用了那些函数?顺序是什么?博主整理集合: 一、MFC应用程序中处理消息的顺序 1.AfxWndProc():该函数负责接收消息,找到消息所属的CWnd对象,然后调用 AfxCallWndProc 2.AfxCall... 阅读全文
posted @ 2016-09-22 23:59 弃用博客 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=1061 裸扩展欧几里德算法,可做模板 根据题意可列出一个等式: (x+m*s) - (y+n*s) = k*L(k = 0,1,2,.....) 变形后: (n-m)*s + k*L =x-y 令 a = n - m,b = L,c... 阅读全文
posted @ 2016-09-07 22:22 弃用博客 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 首先回顾下C语言在控制台下通过标准输入输出函数输出"Hello,world!"的程序, 代码如下 #include int main(){ printf( "Hello,world!\n" ) ; return 0 ;} 然后今天上了第一趟VC++课后,学会了Windows版Hel... 阅读全文
posted @ 2016-09-05 23:44 弃用博客 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=2739、 直接用筛选法打表,然后双重循环判断多个情况,符合就cnt++。 #include #include #include #include using namespace std;const int maxn = 10000;i... 阅读全文
posted @ 2016-09-02 22:18 弃用博客 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=1248 题意:给定字符串,从字符串中选择字符转换成整形满足密码公式,要求输出结果按照最大字典序输出。 因为没有重复的字符,所以最多有26个字符,5重循环直接暴力不会超时。 注意的是排序的时候吧字符串从大到小排序扫描循环的时候vwxy... 阅读全文
posted @ 2016-08-31 17:06 弃用博客 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=1250 题意:有n个位置,每个字母第一次出现代表客人的进来,第二次出现代表离开 , 统计流失了几个客户 我一直纠结的是Tanning是什么意思?题目为简单题,不要想到队列和栈,完全模拟即能过。只是有一句话不好理解,“Custom... 阅读全文
posted @ 2016-08-30 23:12 弃用博客 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 传送门:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4813 只有1的时候,会出现Impossible; ... 阅读全文
posted @ 2016-08-22 17:59 弃用博客 阅读(134) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 17 下一页