文章分类 -  水题

洗刷刷
摘要:#include<iostream>#include<cstdio>#include<memory>#include<cstring>#include<algorithm>using namespace std;#define INF 10005int num[1005],re[1005];int main(){ int n; while(~scanf("%d",&n)) { for(int i=0; i<n; ++i) scanf("%d",&num[i]); for(i 阅读全文
posted @ 2013-03-01 16:27 小仪在努力~ 阅读(82) 评论(0) 推荐(0)
摘要:T TORZ 出题人#include<iostream>#include<cstring>#include<cmath>#include<cstdio>#include<algorithm>#include<vector>using namespace std;int lena,lenb,next[1005];void getnext(char b[]){ int j=0,k=-1; next[0]=-1; while(j<lenb) { if(k==-1||b[j]==b[k]||next[k]==k||b[j]= 阅读全文
posted @ 2012-12-20 12:38 小仪在努力~ 阅读(143) 评论(0) 推荐(0)
摘要:出题人威武,各种坑害~http://acm.buaa.edu.cn/problem/225/#include<iostream>#include<cstring>#include<cmath>#include<cstdio>#include<algorithm>#include<vector>using namespace std;int lena,lenb,next[1005];void getnext(char b[]){ int j=0,k=-1; next[0]=-1; while(j<lenb) { if( 阅读全文
posted @ 2012-12-20 12:25 小仪在努力~ 阅读(116) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/diy/contest_showproblem.php?pid=1006&cid=18128&hide=0题目叫排序,这题排序真的可以做~思路是这样的:假如是一个长串,一个短串,从前往后,长串消去连续短串后,两个串字典序比较大小,比如说,101210121,和1012,最后比较的串是1和1012若是556和443,最后比较的串是556和443若是1012,10121012,那么这两个串视为相等的哦,因为最后比较大小的串是0,0#include<stdio.h>#include<string.h>#include 阅读全文
posted @ 2012-12-05 22:40 小仪在努力~ 阅读(137) 评论(0) 推荐(0)