摘要: View Code 1 /* 2 欧拉函数+求与之互素的数的个数 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<vector>11 #include<map>12 #include<math.h>13 typedef long long ll;14 //typ 阅读全文
posted @ 2013-04-26 19:56 xxx0624 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 题意不难理解dp[ i ][ j ] = dp[ i-1 ][ j ]+dp[ i ][ j-1 ];View Code 1 /* 2 dp 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 const int maxn = 1005; 7 int dp[ maxn ][ maxn ]; 8 int mat[ maxn ][ maxn ]; 9 int main(){10 int ca;11 scanf("%d",&ca);12 while( ca-- ){13 int n,m;14 sca... 阅读全文
posted @ 2013-04-26 19:08 xxx0624 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 给n个矩阵,求出相乘后的结果View Code 1 #include<stdio.h> 2 const int maxn = 105; 3 struct node{ 4 int row,col; 5 int mat[ maxn ][ maxn ]; 6 }; 7 node res; 8 int main(){ 9 int ca;10 scanf("%d",&ca);11 while( ca-- ){12 int x;13 scanf("%d",&x);14 node a,b;15 int ... 阅读全文
posted @ 2013-04-26 19:05 xxx0624 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 注意重边!!!!View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #include<algorithm> 5 #include<iostream> 6 #include<queue> 7 using namespace std; 8 const int maxn = 505; 9 int mat[ maxn ][ maxn ];10 int ind[ maxn ];11 int res[ maxn ];12 int vis[ 阅读全文
posted @ 2013-04-26 16:34 xxx0624 阅读(210) 评论(0) 推荐(0) 编辑