上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 // 矩阵的STL实现 7 typedef vector vec; 8 typedef vector mat; 9 typedef long long ll; 10 const int MOD = 10000; 11 // 矩阵乘法 ... 阅读全文
posted @ 2016-08-31 23:29 Yan_Bin 阅读(226) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 const int maxn = 100; 4 typedef struct{ 5 long long Mat[maxn][maxn]; 6 }MAT; 7 long long MOD,d; // d是方阵的行数或者列数 8 // 方阵的乘法,模MOD 9 MAT mul(MAT a,MAT b){ 10 MAT c;... 阅读全文
posted @ 2016-08-31 23:24 Yan_Bin 阅读(192) 评论(0) 推荐(0)
摘要: 10870 RecurrencesConsider recurrent functions of the following form:f(n) = a1f(n 􀀀 1) + a2f(n 􀀀 2) + a3f(n 􀀀 3) + : : : + adf(n 􀀀 d); for n > d;wh 阅读全文
posted @ 2016-08-31 01:03 Yan_Bin 阅读(416) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 const int maxn = 100; 5 typedef double Matrix[maxn][maxn]; 6 // 要求系数矩阵可逆 7 // 这里A是增广矩阵,A[i][n]表示第i个方程右边的常数bi 8 // 运行结束后A[i][n]是第i个未知数的值 9 void gauss_eli... 阅读全文
posted @ 2016-08-31 00:23 Yan_Bin 阅读(120) 评论(0) 推荐(0)
摘要: 11077 Find the PermutationsSorting is one of the most used operations in real life, where Computer Science comes into act. It iswell-known that the lo 阅读全文
posted @ 2016-08-29 23:47 Yan_Bin 阅读(302) 评论(0) 推荐(0)
摘要: 12103 Leonardo's Notebook| I just bought Leonardo's secret notebook! Rare object col-lector Stan Ucker was really agitated but his friend, specialinve 阅读全文
posted @ 2016-08-29 22:05 Yan_Bin 阅读(155) 评论(0) 推荐(0)
摘要: 10294 Arif in Dhaka (First Love Part 2)Our hero Arif is now in Dhaka (Look at problem 10244 – First Love if you want to know more aboutArif, but that 阅读全文
posted @ 2016-08-29 15:49 Yan_Bin 阅读(242) 评论(0) 推荐(0)
摘要: 11762 Race to 1Dilu have learned a new thing about integers, which is - any positive integer greater than 1 can bedivided by at least one prime number 阅读全文
posted @ 2016-08-29 00:11 Yan_Bin 阅读(189) 评论(0) 推荐(0)
摘要: 11427 Expect the ExpectedSome mathematical background. This problem asks you to compute the expected value of a randomvariable. If you haven’t seen th 阅读全文
posted @ 2016-08-28 23:34 Yan_Bin 阅读(211) 评论(0) 推荐(0)
摘要: 11722 Joining with FriendYou are going from Dhaka to Chittagong by train and you came to know one of your old friends is goingfrom city Chittagong to 阅读全文
posted @ 2016-08-28 20:15 Yan_Bin 阅读(306) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页