摘要: 题目链接比赛的时候题给看错了。。当作神题了,看了一下题解,思考了好一会,终于在虎哥的帮助下,明白了。求出所有的位置上s1[i]>=s2[i]的情况数,s1[i] <= s2[i]的情况数,小小的容斥一下,即可。中间各种错误,各种WA。 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 using namespace std; 5 #define LL __int64 6 #define MOD 1000000007 7 char s1[100001],s2[10000 阅读全文
posted @ 2013-04-16 21:14 Naix_x 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 题目链接看这个题解:http://blog.csdn.net/zhang20072844/article/details/8145588对于Tarjan还是不太理解。 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 #include <cstdlib> 5 using namespace std; 6 #define N 10001 7 #define M 50001 8 struct node 9 {10 int u,v,next;11 } edge[M+10]; 阅读全文
posted @ 2013-04-16 19:52 Naix_x 阅读(136) 评论(0) 推荐(0) 编辑