1、显示当前系统上root、fedora或user1用户的默认shell;#grep"^\(root\|fedora\|user1\)"/etc/passwd2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();#grep"[[:alpha:]].*()"/etc/rc.d/init.d/functions3、使用echo命令输出一个绝对路径,..
分类:
其他好文 时间:
2016-09-01 00:19:35
阅读次数:
171
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times. You may assume that the ...
分类:
其他好文 时间:
2016-09-01 00:13:42
阅读次数:
106
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2016-08-31 23:58:22
阅读次数:
473
题目: Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorit ...
分类:
其他好文 时间:
2016-08-31 23:56:36
阅读次数:
154
A friend without faults will never be found. 没有缺点的朋友是永远找不到的。 You can't find a friends without faults, and you can't find a lover without faults. In pe ...
分类:
其他好文 时间:
2016-08-31 23:51:14
阅读次数:
169
给定一个进制分数 求是否是循环小数,且求出循环节长度 暴力 il int find(int p){ int head=last[p%mod]; while(head&&pr[head].p!=p)head=pr[head].next; if(!head)head=++siz; return head... ...
分类:
其他好文 时间:
2016-08-31 22:24:30
阅读次数:
331
1、shell实现找到当前目录以及子目录中名字包含king的文件 find ./ | grep king 2、tcpdump抓包参数 -nne分别代表什么意思 -nn:直接以 IP 及 port number 显示,而非主机名称服务和名称 -e : 每行的打印输出中将包括数据包的数据链路层头部信息 ...
分类:
系统相关 时间:
2016-08-31 22:20:15
阅读次数:
236
输入一个序列,求第一个a[i]>a[i-1]&&a[i]>a[i+1]的元素 遍历一遍 ...
分类:
其他好文 时间:
2016-08-31 20:41:26
阅读次数:
123
Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 27177 Accepted: 11309 Special Judge Description Given a positive integer ...
分类:
其他好文 时间:
2016-08-31 20:27:14
阅读次数:
167
和上题一样,本题的序列中可能有重复的元素,不过用上题的代码能过 ...
分类:
其他好文 时间:
2016-08-31 20:27:07
阅读次数:
136