摘要:
石子合并,入门区间dp 1 #include <cstdio> 2 #include <cstring> 3 #define maxn 305 4 #define min(a, b) a < b ? a : b 5 6 int n; 7 int sum[maxn]; 8 int f[maxn][ma 阅读全文
摘要:
自然数拆分,完全背包 1 #include <cstdio> 2 #define ll long long 3 #define mod 2147483648 4 #define rep(i, a, b) for (int i = a; i <= b; i++) 5 6 int n; 7 ll f[4 阅读全文
摘要:
I have a set of super poker cards, consisting of an infinite number of cards. For each positive composite integer p, there are exactly four cards whose 阅读全文
摘要:
Joyoi Mobile Service,第一维:阶段,第几时刻;第二第三维:不安定因素,两个服务员的位置;省略第四维:肯定在p[i-1]。 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define rep(i, a, b) for (i 阅读全文