上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: hdu2138 How many prime numbers 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 5 ll prime[6] = {2,3,5,233,331}; 6 ll qmul( 阅读全文
posted @ 2019-10-31 13:16 麻辣猪仔 阅读(170) 评论(0) 推荐(0)
摘要: P3390 【模板】矩阵快速幂 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 105, mod = 1e9+7; 5 ll n, k; 6 struct MAT 阅读全文
posted @ 2019-10-31 13:01 麻辣猪仔 阅读(113) 评论(0) 推荐(0)
摘要: POJ1948 Triangular Pastures 1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 const int maxn = 805; 5 bool dp[maxn][maxn]; 6 int a[max 阅读全文
posted @ 2019-10-30 16:30 麻辣猪仔 阅读(104) 评论(0) 推荐(0)
摘要: 最短Hamilton路径 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxn = 21; 4 int dp[1<<maxn][maxn]; 5 int maps[maxn][maxn]; 6 int main() { 7 阅读全文
posted @ 2019-10-30 12:11 麻辣猪仔 阅读(105) 评论(0) 推荐(0)
摘要: hdu3652 B-number 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 15; 4 int dp[maxn][maxn][maxn][maxn]; 5 // dp[i][j][state][r] i表 阅读全文
posted @ 2019-10-29 22:13 麻辣猪仔 阅读(88) 评论(0) 推荐(0)
摘要: hdu2089 不要62 1 #include <bits/stdc++.h> 2 using namespace std; 3 int dp[15][15], d[15]; 4 void init() { 5 dp[0][0] = 1; 6 for (int i = 1; i <= 7; i++) 阅读全文
posted @ 2019-10-29 21:31 麻辣猪仔 阅读(150) 评论(0) 推荐(0)
摘要: P1880 [NOI1995]石子合并 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 205; 4 const int inf = 0x3f3f3f3f; 5 int cost1[maxn][maxn], c 阅读全文
posted @ 2019-10-29 21:14 麻辣猪仔 阅读(132) 评论(0) 推荐(0)
摘要: P2444 [POI2000]病毒 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 35000; 4 5 struct Aho_Corasock_Automaton { 6 struct node { 7 in 阅读全文
posted @ 2019-10-29 17:07 麻辣猪仔 阅读(158) 评论(0) 推荐(0)
摘要: noi7219 复杂的整数划分问题 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 55; 4 int dp1[maxn][maxn], dp2[maxn][maxn], dp3[maxn][maxn], dp 阅读全文
posted @ 2019-10-27 22:04 麻辣猪仔 阅读(156) 评论(0) 推荐(0)
摘要: POJ3468 A Simple Problem with Integers 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cmath> 5 using namespace std; 6 ty 阅读全文
posted @ 2019-10-26 21:47 麻辣猪仔 阅读(135) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页