Sweety

Practice makes perfect

导航

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 62 下一页

2017年5月24日

摘要: 最近需要大量的数据分析,但是需要执行一个GCC名令对所有文件生成中间文件,但是Makefile不会写,所以就只能直接调用Linux终端的命令了,所以使用到了popen()函数,但是执行的时候,每次都会执行一部分然后显示出错,什么原因?google后才发现这个函数的功能是fork子进程,但是每次我的没... 阅读全文

posted @ 2017-05-24 19:06 蓝空 阅读(692) 评论(0) 推荐(0) 编辑

2017年5月22日

摘要: 今天需要测试一下OJ产生的数据,文件太多,所以需要通过文件递归遍历调用shell命令,所以网上找了递归访问的,比之前window下的程序更简单清爽。借鉴:http://www.cnblogs.com/xudong-bupt/p/3504442.htmlLinux C 下面读取文件夹要用到结构体st... 阅读全文

posted @ 2017-05-22 08:03 蓝空 阅读(721) 评论(0) 推荐(0) 编辑

2017年5月13日

摘要: 变量特点 a b的id是一样的 a=1 b=1 print id(a) print id(b) print "sssss",5 预算符 ** 平方 a=int(raw_input("input number")); type(num) num=... 阅读全文

posted @ 2017-05-13 20:44 蓝空 阅读(144) 评论(0) 推荐(0) 编辑

2017年5月5日

摘要: 设正整数两两互素,则同余方程组 有整数解。并且在模下的解是唯一的,解为 其中,而为模的逆元。int CRT(int a[],int m[],int n){ int M =... 阅读全文

posted @ 2017-05-05 10:19 蓝空 阅读(151) 评论(0) 推荐(0) 编辑

摘要: Easy Tree Query时间限制: 3 Sec 内存限制: 128 MB提交: 130 解决: 15[提交][状态][讨论版]题目描述You are given a binary search tree with depth k, whose nodes are valued from 1... 阅读全文

posted @ 2017-05-05 09:56 蓝空 阅读(333) 评论(0) 推荐(0) 编辑

摘要: Grid时间限制: 1 Sec 内存限制: 128 MB提交: 318 解决: 40[提交][状态][讨论版]题目描述Pong is wandering in the grids, and we take his initial position as (0,0). Each step he c... 阅读全文

posted @ 2017-05-05 09:49 蓝空 阅读(146) 评论(0) 推荐(0) 编辑

摘要: Pong’s Birds时间限制: 1 Sec 内存限制: 128 MB提交: 98 解决: 24[提交][状态][讨论版]题目描述In order to train his birds, Pong is holding a competition for them. (He have bird... 阅读全文

posted @ 2017-05-05 09:38 蓝空 阅读(162) 评论(0) 推荐(0) 编辑

2017年5月4日

摘要: (一)欧拉函数用途:对正整数n,欧拉函数是小于或等于n的正整数中与n互质的数的数目。通式: ,其中p1, p2……pn为x的所有质因数,x是不为0的整数。φ(1)=1(唯一和1互质的数(小于等于1)就是1本身)。 (注意:每种质因数只一个。比如12=2*2*3那么φ(12)=12*(1-1/2)*... 阅读全文

posted @ 2017-05-04 16:51 蓝空 阅读(249) 评论(0) 推荐(0) 编辑

摘要: 题意:判断最小生成树是否唯一。思路:求出次小生成树,如果与最小生成树相等,则不唯一。ps博客#include#include#includeusing namespace std;/*求最小生成树时,用数组Max[i][j]来表示MST中i到j路径中的最大权边求完后,直接枚举所有不在MST中的边,替... 阅读全文

posted @ 2017-05-04 15:33 蓝空 阅读(127) 评论(0) 推荐(0) 编辑

摘要: 题解链接 ProblemRank (05:00:00)0 CommentsSettingFavoriteClone Stat#OriginTitlehere222 / 700AHDU 5971Wrestling Match 24 / 226BHDU 5972Regular Numberhere38 ... 阅读全文

posted @ 2017-05-04 10:45 蓝空 阅读(182) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 62 下一页