制作U盘启动的FREEBSD完全版[转]
2009-04-28 11:13
169 查看
/* THE PROGRAM IS MADE BY PYY */ /*----------------------------------------------------------------------------// Copyright (c) 2012 panyanyany All rights reserved. URL : http://poj.org/problem?id=1887 Name : 1887 Testing the CATCHER Classification : 最长非升子序列 Date : Wednesday, July 11, 2012 Time Stage : half an hour Result: 10420937 panyanyany 1887 Accepted 224K 16MS C++ 1692B 2012-07-11 09:59:34 10420935 panyanyany 1887 Accepted 224K 16MS C++ 1692B 2012-07-11 09:59:09 10420931 panyanyany 1887 Runtime Error C++ 1691B 2012-07-11 09:58:54 10420923 panyanyany 1887 Accepted 340K 0MS C++ 1692B 2012-07-11 09:58:22 Test Data : Review : 数组开到40005,用时0MS,减少到10005的时候,用时却是16MS……郁闷,求解释…… //----------------------------------------------------------------------------*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <vector> #include <algorithm> #include <iostream> #include <queue> #include <set> #include <string> using namespace std ; #define MEM(a, v) memset (a, v, sizeof (a)) // a for address, v for value #define max(x, y) ((x) > (y) ? (x) : (y)) #define min(x, y) ((x) < (y) ? (x) : (y)) #define INF (0x3f3f3f3f) #define MAXN (1005) #define L(x) ((x)<<1) #define R(x) (((x)<<1)|1) #define M(x, y) (((x)+(y)) >> 1) #define DB // int a[MAXN], order[MAXN]; int LNotIncS(int a[], int n) { int i, len, r, l, m; MEM(order, 0); len = 1; for (i = 0; i < n; ++i) { l = 1; r = len; while (l <= r) { m = (l + r) >> 1; if (order[m] >= a[i]) l = m + 1; else r = m - 1; } if (order[l] < a[i]) order[l] = a[i]; if (len < l) len = l; } return len; } int main() { int x, n, tc; n = 0; tc = 1; while (scanf("%d", &x)) { if (0 == n && x == -1) break; if (x != -1) { a[n++] = x; } else { if (tc != 1) putchar('\n'); printf("Test #%d:\n", tc++); printf(" maximum possible interceptions: %d\n", LNotIncS(a, n)); n = 0; } } return 0; }
相关文章推荐
- 制作freebsd U盘启动过程。官方文档摘录
- [FreeBSD] 制作U盘启动
- 制作ubuntu的U盘启动
- 教你如何制作OS X Lion启动U盘与使用U盘安装系统
- 装机员U盘启动PE制作工具V5.0(UEFI+UD+自动安装MSDN版系统)
- U盘启动系统制作详细方法(MaxDOS+WinPE
- 在win7下制作MAC启动u盘
- 制作OS X 10.10.3启动安装U盘
- 利用大白菜制作多系统启动U盘(ubuntu+windows)
- 适合制作U盘/硬盘启动的WinPE系统大搜集【都可以配合V3使用】
- CDLinux制作U盘启动
- Linux下制作系统启动U盘
- 如何制作U盘启动安装系统
- 梦想成真 高兼容性启动U盘制作实例与分析
- 双系统安装ubuntu教程(制作U盘启动)
- U盘启动的PE系统的制作方法
- 制作U盘启动的并可保持更改更新和设置的BT4最终版完全手册
- [转载]梦想成真 高兼容性启动U盘制作实例与分析 用ULTRAISO刻录ISO到U盘
- 大白菜制作多系统启动U盘(win+ubuntu+PE)
- 使用UNetbootin工具制作的CentOS 6.9镜像U盘在启动安装过程中出现:unable to read package metadata.this may be due to a missing repodata directory