摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4655先以最大的来算为 N*所有的排列数 再减掉重复的 重复的计算方法:取相邻的两个数的最小值再与它前面的组合数和后面的组合数相乘注意负值 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 #define LL long long 8 #define N 1000100 9 #define mod 100000000710 LL s1[N],s2[N],a[N],b[N];11 int main(). 阅读全文
posted @ 2013-08-09 10:30 _雨 阅读(173) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4662I+3*U模6为2或4的都可以 一个U相当于3个I 而I只能1-》2-》4-》8。。如此变换 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 char s[100010]; 7 int main() 8 { 9 int i,n;10 cin>>n;11 while(n--)12 {13 cin>>s;int a=0,b=0;14 int k = st... 阅读全文
posted @ 2013-08-09 09:19 _雨 阅读(191) 评论(0) 推荐(0) 编辑