上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 89 下一页
摘要: import re n = input() for i in range(int(n)): str = input() if re.match(r'A*PA+TA*',str): a = re.split(r'[P|T]',str)if (a[0] * len(a[1]) == a[2]): pri 阅读全文
posted @ 2019-11-25 22:42 王清河 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 公共部分代码 /* common.h */ #ifndef COMMON_H #define COMMON_H #include <arpa/inet.h> #include <ctype.h> #include <dirent.h> #include <errno.h> #include <fcn 阅读全文
posted @ 2019-11-25 21:23 王清河 阅读(4848) 评论(2) 推荐(1) 编辑
摘要: 打印root可以使用可执行文件数。 echo "root's bins: $(find ./ -type f | xargs ls -l | sed '/-..x/p' | wc -l)" 命令解释 1.echo 输出后面双引号的的内容 2. find ./ -type f 查找当前目录下文件类型为 阅读全文
posted @ 2019-11-25 14:37 王清河 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation tha 阅读全文
posted @ 2019-11-24 22:02 王清河 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 配置文件读写系统方法和测试函数 #include"readConfig.h" #define CFGNAME "./test.txt" void mymenu() { printf(" \n"); printf("1 Test Write Config file\n"); printf("2 Tes 阅读全文
posted @ 2019-11-23 22:56 王清河 阅读(347) 评论(0) 推荐(0) 编辑
摘要: The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist 阅读全文
posted @ 2019-11-23 10:46 王清河 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 给定公司N名员工的工龄,要求按工龄增序输出每个工龄段有多少员工。 输入格式: 输入首先给出正整数N(≤10​^5),即员工总人数;随后给出N个整数,即每个员工的工龄,范围在[0, 50]。 输出格式: 按工龄的递增顺序输出每个工龄的员工个数,格式为:“工龄:人数”。每项占一行。如果人数为0则不输出该 阅读全文
posted @ 2019-11-23 09:18 王清河 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 函数原型: #include <sys/types.h > #include <sys/socket.h> int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); 参数说明: 阅读全文
posted @ 2019-11-19 16:21 王清河 阅读(254) 评论(0) 推荐(0) 编辑
摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2019-11-18 22:37 王清河 阅读(154) 评论(0) 推荐(0) 编辑
摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2019-11-17 21:36 王清河 阅读(147) 评论(0) 推荐(0) 编辑
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 89 下一页