- 博客(27)
- 收藏
- 关注
转载 关于python虚拟环境的管理
VirtualEnv 是什么VirtualEnv用于在一台机器上创建多个独立的python运行环境,VirtualEnvWrapper为前者提供了一些便利的命令行上的封装。为什么要用- 隔离项目之间的第三方包依赖,如A项目依赖django1.2.5,B项目依赖django1.3。- 为部署应用提供方便,把开发环境的虚拟环境打包到生产环境即可,不需要在服务器上再折腾一翻。
2014-12-21 01:32:41
481
转载 虚拟实时
CFS中的虚拟运行时间2013年4月28日 由 edsionte留言 »一直对CFS(Completely Fair Scheduling,完全公平调度)中的虚拟运行时间(vruntime)不太理解,最近在看cgroup中的cpu子系统算是搞清楚了它是怎么回事。先简单说一下CFS调度算法的思想:理想状态下每个进程都能获得相同的时间片,并且同时运行在CPU上,但实际上
2014-08-14 15:37:02
516
原创 错位排问题
光棍节的快乐时间限制:1000 ms | 内存限制:65535 KB难度:2描述光棍们,今天是光棍节。聪明的NS想到了一个活动来丰富这个光棍节。规则如下:每个光棍在一个纸条上写一个自己心仪女生的名字,然后把这些纸条装进一个盒子里,这些光 棍依次抽取一张纸条,如果上面的名字就是自己心仪的女生,那么主持人就在现场给该女生打电话,告诉这个光棍对她的爱慕之情,并让光棍当场表
2014-04-24 21:09:03
466
原创 系统优先QUEUE
#include#include#include#include#include#includeusing namespace std;char map[30][30];int step;int havet;int s1, s2, f1, f2;int X, Y;int dir[4][2] = {{-1, 0}, {0, 1}, {1
2014-01-02 21:30:16
457
原创 系统QUEUE
#include#include#includeusing namespace std;int main(){int i;int e;queue q;for(i = 1; i q.push(i);}for(i = 0; i e = q.front();q.pop();printf(" 1 %d\n",e);}whi
2014-01-02 21:25:03
422
原创 系统SORT
#include#include#include#includeusing namespace std;int a[1000010];int main(){int n1, n2, i;int temp1, temp2, m, n, flag1;scanf("%d%d", &n1, &n2);for(i = 0; i scanf
2014-01-02 21:23:26
489
原创 系统QSORT
#include#include#includechar a[100];typedef struct node{int x;int y;}node;node str[100];int cmp(const void *a, const void *b){// return *(char *)a - *(char *)b;no
2014-01-02 21:22:50
530
原创 大数_高精度阶乘
#include#include#includeint a[20000] = {0};int carry = 0;int digit = 1;void jiecheng(int m){ int i, j; int k; a[0] = 1; for(i = 2; i for(j = 0; j
2014-01-02 21:19:39
485
原创 大数_高精度除法
#include#include#includeint main(){ char *str; int temp; int N; int i; scanf("%d", &N); while(N--){ str = (char*)malloc(sizeof(char) * 1000000);
2014-01-02 21:18:25
609
原创 大数_高精度乘法
#include#includeint main(){ char n1[1000] = "", n2[1000] = ""; int n3[2000] = {0}; int i, j, k = 0, l = 0; int m, n, p = 0; scanf("%s%s", &n1, &n2); getchar();
2014-01-02 21:12:25
420
原创 递归无序全排列
#includevoid swap(int *a, int *b){ int c; c = *a; *a = *b; *b = c;}void perm(int a[], int num1, int num2){ int i; if(num1 > num2){ for(i = 0; i
2014-01-02 21:10:55
653
原创 非递归全排列
#include#define Number 4void swap(int *a, int *b){ int temp; temp = *a; *a = *b; *b = temp;}void daozhi(int a[], int N, int count){ int i,j; for(i = count
2014-01-02 21:09:30
428
原创 有序全排列
#include#include#include#define N 5int a[N] = {0};int b[N] = {0};void full_array(int n, int j){ int i; if(j == N){ for(i = 0; i printf("%d\t",
2014-01-02 21:08:10
704
原创 有序组合
#include#include#includeint *a;int N;void zuhe(int m, int n){ int i; if(n == N){ for(i = 0; i printf("%d", a[i]); } printf("\n");
2014-01-02 21:07:24
674
原创 有序子集
#include#include#include#define N 5int a[100];void ziji(int m, int n){ int i; for(i = 0; i printf("%-4d", a[i]); } printf("\n"); if(n == N){
2014-01-02 21:06:39
978
原创 康拓展开逆运算
#include#include#includeint a[13];int b[13];int jiecheng(int n){ if(n == 1){ a[n] = 1; return a[n]; } a[n] = n * jiecheng(n - 1); return a[n];
2014-01-02 20:55:10
796
原创 康拓展开
#include#include#includeint a[13];int fac(int m){ if(m == 1){ a[m] = 1; return 1; } a[m] = m * fac(m - 1); return m * fac(m - 1);}int main
2014-01-02 20:53:57
779
原创 PREV_IN_POST
#include#include#includechar a[28];char b[28];int count;int all;int step;void search(int m, int n){int i;if(count == all){return ;}for(i = m; i if(b[i] == a[step]
2014-01-02 20:51:59
439
原创 POST_IN_PREV
#include#include#includechar a[28] = "";char b[28] = "";char c[28] = "";int count;int step;int N;int hehe;void search(int m, int n){int i;if(count == N){return ;}
2014-01-02 20:51:22
435
原创 其他排序
#include#include#include#define maxsize 5int main(){ int a[maxsize]; int i, j, temp1; printf("Enter %d number\n", maxsize); for(i = 1; i scanf("%d", &a[
2014-01-02 20:41:35
393
原创 快速排序
//快速排序#include#include#includeint a[10];void search(int m, int n){ int i; int temp1, temp2, temp3; temp1 = m; temp2 = n - 1; if(m >= n){ return ;
2014-01-02 20:41:00
352
原创 归并排序
#include#include#includeint a[100];int b[100];void my_copy(int m, int n){ int i; for(i = m; i a[i] = b[i - m]; }}void merge_sort(int m, int n){
2014-01-02 20:40:19
396
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人