随笔分类 -  模拟

poj zoj hdoj
摘要:1 #include 2 #include 3 using namespace std; 4 #define max 5000 5 6 int t[max];//目标串 7 int p[max];//模式串 8 int next[max];//前缀函数 9 int n,m;//n为目标串的数目,... 阅读全文
posted @ 2014-07-29 00:24 future_hero 阅读(863) 评论(0) 推荐(0)
摘要:一 思路分析:本题属于简单的模拟题型。需要自己抽象出模拟路线:本题需要抽象出以下模型:向右动:(x,y)->(x+1,y):s[x][y-1]=1;x++;向上动:(x,y)->(x,y+1):s[x][y]=1;y++;向下动:(x,y)->(x,y-1):s[x-1][y-1]=1;y--;向左... 阅读全文
posted @ 2014-07-21 21:18 future_hero 阅读(216) 评论(0) 推荐(0)
摘要:解题心得:1.看清题意是关键;2.题目中有很多细节需要注意包括num[i]是否为0,以及转换的长度是否超出三个区间所含字符本身的长度等;3.Transfer函数的书写时关键,注意体会。 1 1 #include 2 3 2 #include 4 5 3 char s[85],r... 阅读全文
posted @ 2014-07-18 09:06 future_hero 阅读(182) 评论(0) 推荐(0)
摘要:Programmer, Rank ThyselfTime Limit:1000MSMemory Limit:10000KTotal Submissions:1174Accepted:448DescriptionImplement a ranking program similar to the on... 阅读全文
posted @ 2014-07-18 08:58 future_hero 阅读(162) 评论(0) 推荐(0)