#include <iostream> #include<ctime>#define Num 10000using namespace std; int DTGH_Sum(int a[],int n) //动态规划法求子段和函数{ int sum = 0; int *b = (int *) mall ...
分类:
编程语言 时间:
2018-11-04 19:10:17
阅读次数:
170
1、chattr命令的用法:chattr [+-=] [ASacdistu] File/Directory 参数说明: +-= :分别为 [+ 增加] [- 减少] [= 设定] 属性的意思 A :当设定了 A 这个属性时,这个档案(或目录)的存取时间atime (access) 将不可被修改, 可 ...
分类:
其他好文 时间:
2018-11-02 13:10:58
阅读次数:
325
题目:http://acm.hdu.edu.cn/showproblem.php?pid=3932 找一个位置使距离最远的点的距离最小; 上模拟退火; 每次向距离最远的点移动,注意判断一下距离最远的点距离为0的情况。 代码如下: ...
分类:
其他好文 时间:
2018-10-31 23:26:37
阅读次数:
147
Java virtual machine [TOC] 内存溢出: 拍照,设置程序初始化时内存栈大小,和程序最大的内存栈大小 Idea下载Memory Analyzer的插件来查看拍照得到的文件,看是哪个object占用的内存最多。 Java技术体系:Java程序设计语言, 个硬件平台上的Java虚拟 ...
分类:
编程语言 时间:
2018-10-29 20:08:45
阅读次数:
213
一 cd : 二mkdir: 三touch: modification time (mtime): 当该文件的 内容数据 变更时,就会更新这个时间!内容数据指的是文件的内容,而不是文件的属性或权限! status time (ctime): 当该文件的 状态 (status) 改变时,就会更新这个时 ...
分类:
系统相关 时间:
2018-10-29 16:03:48
阅读次数:
227
#include<iostream> #include<cstdio> #include<cstring> #include<ctime> #include<algorithm> #include<iomanip> #include<map> #include<string> #include<st ...
分类:
其他好文 时间:
2018-10-29 14:11:59
阅读次数:
150
os模块中关于文件/目录常用的函数使用方法 函数名 使用方法 以下是支持路径操作中常用到的一些定义,支持所有平台 os.path模块中关于路径常用的函数使用方法 函数名 使用方法 以下为函数返回 True 或 False ...
分类:
其他好文 时间:
2018-10-27 19:48:53
阅读次数:
160
import time time.(b) 三类 时间获取 time() 当前时间戳 ctime() 当前时间易读 gmtime() 当前时间计算机识别 时间格式化 strftime() strptime() 将字符串->时间 程序计时 sleep() perf_counter() strftime( ...
分类:
其他好文 时间:
2018-10-25 14:23:28
阅读次数:
231
主要内容: 一. 锁 二. 信号量 三. 事件 通过event来完成红绿灯模型 四. 队列(重点) 队列实现进程间的通信 五. 生产者消费者模型 1. 初始版本(程序会阻塞住) 2. 升级版本一(通过抛出异常信号的方式结束进程) 3. 升级版本二(通过发送结束信号的方式结束进程) 第一种: 生产者发 ...
分类:
编程语言 时间:
2018-10-25 00:36:58
阅读次数:
199