上一页 1 ··· 88 89 90 91 92 93 94 95 96 ··· 106 下一页
摘要: #include using namespace std; const int Max=99999999; int map[105][105]; int d[105]; int middist; bool s[105]; void dijkstra(int n,int m) { for(int i=1;i>N>>M&&N!=0&&M!=0) { for(int ... 阅读全文
posted @ 2018-08-09 08:33 小学弟- 阅读(117) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #define N 110 #define INF 0x7ffffff using namespace std; int n,val[N],mp[N][N],d[N],v[N],num[N],r[N][N]; void floyd() { for(int k=1;k q; q.push(s... 阅读全文
posted @ 2018-08-09 08:33 小学弟- 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1、os.path.getsize可以获取文件大小 import os file_name = 'XXXXXX'print(os.path.getsize(file_name)) 2、获取文件夹大小,即遍历文件夹,将所有文件大小加和。遍历文件夹使用os.walk函数 os.walk()可以得到一个三 阅读全文
posted @ 2018-08-08 20:12 小学弟- 阅读(1848) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-08-08 17:50 小学弟- 阅读(120) 评论(0) 推荐(0) 编辑
摘要: datetime模块 datetime模块重新封装了time模块,提供更多接口,提供的类有:date,time,datetime,timedelta,tzinfo。 1、date类 datetime.date(year, month, day) 静态方法和字段 date.max、date.min:date对象所能表示的最大、最小日期; date.resolution:date对象表示日... 阅读全文
posted @ 2018-08-08 17:28 小学弟- 阅读(200) 评论(0) 推荐(0) 编辑
摘要: #时间模块 import time #常用方法 #time.sleep(secs)#(线程)推迟指定的时间运行。单位为秒 #print(time.time())#获取当前时间戳 #表示时间的三种方式 #在python中,通常有三种方式来表示时间:时间戳,元组(结构化时间),格式化的时间字符串: #1.时间戳(timestamp):通常来说,时间戳表示的是从1970年1月1日00:00:00... 阅读全文
posted @ 2018-08-08 16:49 小学弟- 阅读(160) 评论(0) 推荐(0) 编辑
摘要: # sys模块是与python解释器交互的一个接口 import sys print(sys.argv) # 命令行参数list,第一个元素是程序本身路径 # (第一个元素就是执行文件的时候,写在python命令后的第一个值,之后的元素在执行 # python的启动的时候可以写多个值,这些值都会依次添加到列表中) # sys.exit() #t退出程序,正常退出时exit(0),错误退出s... 阅读全文
posted @ 2018-08-08 15:45 小学弟- 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #os模块 用于提供系统级别的操作 #当前执行这个python文件的工作目录相关的工作路径 os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径(在哪里执行就是那个路径) os.chdir("dirname") 改变当前脚本工作目录;相当于shell下cd os.curdi 阅读全文
posted @ 2018-08-08 15:14 小学弟- 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Go 是一个开源的编程语言,它能让构造简单、可靠且高效的软件变得容易。 Go是从2007年末由Robert Griesemer, Rob Pike, Ken Thompson主持开发,后来还加入了Ian Lance Taylor, Russ Cox等人,并最终于2009年11月开源,在2012年早些时候发布了Go 1稳定版本。现在Go的开发已经是完全开放的,并且拥有一个活跃的社区。 Go... 阅读全文
posted @ 2018-08-08 14:52 小学弟- 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include "iostream" #include "algorithm" #include "cstdio" using namespace std; const int maxn=200; typedef struct { int a,b,v,c; }node; int ans; node graph[maxn*(maxn-1)/2]; int father[maxn]; in... 阅读全文
posted @ 2018-08-08 14:47 小学弟- 阅读(70) 评论(0) 推荐(0) 编辑
上一页 1 ··· 88 89 90 91 92 93 94 95 96 ··· 106 下一页