symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2013年3月2日

摘要: 这题有2个时间,分别是开始时间和结束时间,如果按照开始时间排序显然不行,那就得是按照结束时间排序了,至于为什么,就是i%^*^%$^##^#$&$。 然后还有个nowTime,排序后,如果当前时间小于开始时间的话,那么就可以观看该节目。 1 #include <stdio.h> 2 #include <iostream> 3 #include <algorithm> 4 using namespace std; 5 struct node 6 { 7 int begin,end; 8 }a[100+10]; 9 typedef struct node 阅读全文
posted @ 2013-03-02 19:34 symons 阅读(189) 评论(0) 推荐(0)

摘要: 1 /* 2 自己来写字典树 3 */ 4 #include <stdio.h> 5 #include <malloc.h> 6 #include <string.h> 7 struct node 8 { 9 int size; //该结点上的前缀单词的个数 10 struct node *child[26]; //下一个单词的结点 11 }a; 12 typedef struct node NODE; 13 NODE *root; //表示根节点。(根... 阅读全文
posted @ 2013-03-02 17:03 symons 阅读(185) 评论(0) 推荐(0)

摘要: 然后还翻看了之前AC的,一看,原来之前是用别人的模板来AC的,好无耻啊,这把是自己写的。 1 /* 2 自己来写字典树 3 */ 4 #include <stdio.h> 5 #include <malloc.h> 6 #include <string.h> 7 struct node 8 { 9 int size; //该结点上的前缀单词的个数10 struct node *child[26]; //下一个单词的结点11 }a;12 typedef struct node NODE;13 NODE *root; ... 阅读全文
posted @ 2013-03-02 16:49 symons 阅读(158) 评论(0) 推荐(0)

摘要: 将每个字符串分割,查找,如果分割后的2个字符串均存在的话输出这个字符串。墨迹了一些。 1 #include <map> 2 #include <string> 3 #include <iostream> 4 using namespace std; 5 int main() 6 { 7 string temp; 8 string a[50000+10]; 9 string t1,t2;10 int l;11 map<string,int>haha;12 int k,i,j,q,cnt=0;13 while(cin>>temp)14 . 阅读全文
posted @ 2013-03-02 12:40 symons 阅读(158) 评论(0) 推荐(0)