上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页
摘要: 首先接触的就是欧几里得求最大公约数(GCD) 递归的写法: 在扩展欧几里得中,设法求 ax + by = gcd(a, b) 中的一组 x 和 y 的解 当 b = 0 的时候, gcd(a, b) = a,此时的 x = 1, y = 0为其中的一组的解 当 b ≠ 0 的时候 , 设 ax1 + 阅读全文
posted @ 2018-06-02 19:05 ouyang_wsgwz 阅读(167) 评论(0) 推荐(1) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 typedef long long ll; 5 6 int a[20]; 7 int dp[20][15][3]; 8 9 //pos:当前位置 10 //mod:余数 11 //have :0:前一位不是1 1:前一位是1 2:有13 12 ll dfs(int pos,in... 阅读全文
posted @ 2018-06-02 18:16 ouyang_wsgwz 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 #define LL long long 11 const int MOD = 2520; 12 ... 阅读全文
posted @ 2018-06-02 17:42 ouyang_wsgwz 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1 //反向62 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 typedef long long ll; 10 // const int maxn = 1e5+5; 11 ll n; 12 ll a[100]; 13 ll dp[100][100]... 阅读全文
posted @ 2018-05-31 19:46 ouyang_wsgwz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 const int maxn = 2*1e9+5; 9 int dp[100][100]; 10 int a[100]; 11 12 //lead是否有前导0 13 int dfs(int pos,in... 阅读全文
posted @ 2018-05-30 20:58 ouyang_wsgwz 阅读(123) 评论(0) 推荐(0) 编辑
摘要: H - F(x) 阅读全文
posted @ 2018-05-30 19:37 ouyang_wsgwz 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 口算训练 1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <string> 6 #include <map> 7 #include <cmath> 8 # 阅读全文
posted @ 2018-05-29 18:24 ouyang_wsgwz 阅读(303) 评论(0) 推荐(0) 编辑
摘要: A. Easy h-index 1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <string> 6 #include <map> 7 #include 阅读全文
posted @ 2018-05-27 18:46 ouyang_wsgwz 阅读(228) 评论(0) 推荐(0) 编辑
摘要: dalao博客:https://blog.csdn.net/wust_zzwh/article/details/52100392 阅读全文
posted @ 2018-05-26 14:08 ouyang_wsgwz 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1 //SPFA 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 11 const int maxn = 50; 12 const double Start = 100; 13 ... 阅读全文
posted @ 2018-05-22 20:17 ouyang_wsgwz 阅读(174) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页