摘要:
栈模拟View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>#include <stack>using namespace std;#define maxn 1005int n;int f[maxn];void input(){ for (int i = 1; i < n; i++) scanf("%d", &f[i]);}bool ok(){ stack<int> stk; in 阅读全文
posted @ 2013-01-18 11:11
undefined2024
阅读(441)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>using namespace std;#define maxn 55int n;int f[maxn];int main(){ //freopen("t.txt", "r", stdin); int t = 0; while (scanf("%d", &n), n) { for (int i = 0; i &l 阅读全文
posted @ 2013-01-18 10:52
undefined2024
阅读(279)
评论(0)
推荐(0)
摘要:
递推View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 15#define maxk 1005#define maxd 35#define inf 0x3f3f3f3fint n, m;int f[maxn][maxk];int flight_num[maxn][maxn];int flight[maxn][maxn][maxd];void input(){ for (i 阅读全文
posted @ 2013-01-18 10:35
undefined2024
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号