摘要:
动态规划 方案数问题 例题:P1002 [NOIP2002 普及组] 过河卒 参考代码 #include <cstdio> typedef long long LL; const int N = 25; int dx[8] = {-2, -2, -1, -1, 1, 1, 2, 2}; int dy 阅读全文
摘要:
#include <cstdio> #include <algorithm> using namespace std; const int N = 10005; const int M = 1005; const int INF = 1e9; int up[N], down[N], low[N], 阅读全文
摘要:
#include <cstdio> #include <algorithm> using namespace std; const int N = 105; const int A = 25005; int a[N]; bool dp[A]; int main() { int t; scanf("% 阅读全文
摘要:
暴力枚举 枚举国内和国外的廊桥数量配额,再模拟航班停机过程 #include <cstdio> #include <algorithm> using namespace std; const int N = 100005; struct Flight { int l, r; // l 抵达时刻,r 阅读全文