#includeint main(){ int i,k=-1; char a[100]; while(scanf("%s",&a)!=EOF) { int sum=0; for(i=0;a[i]!='\0';i++) { if((a[i]=='o'&&...
分类:
其他好文 时间:
2014-10-27 14:03:59
阅读次数:
202
python3.4端口检测: import?sys,time,socket
#a=‘sys.argv[0]‘
#b=‘sys.argv[1]‘
#c=‘sys.argv[2]‘
while?1:
????time.sleep(1)
????try:
????????sc=socket.socket(socket.AF_INET,socket.SO...
分类:
编程语言 时间:
2014-10-27 12:58:52
阅读次数:
195
编写程序,根据以下公式求e的值。要求用两种方法计算:
1)for循环,计算前50项
2)while循环,直至最后一项的值小于10-4...
分类:
其他好文 时间:
2014-10-27 11:00:05
阅读次数:
177
# include # include # include # define max(x,y) x>y?x:y;int v[1001];//价值int w[1001];//重量int dp[1001][1001];int main(){ int n,m; while(scanf("%d%...
分类:
其他好文 时间:
2014-10-27 10:41:08
阅读次数:
222
这里以spfa为例;//都用邻接表存边;指针:int h=1,t=1; q[h]=x; while(hdist[u]+e[i].w){ dist[v]=dist[u]+e[i].w; if(!vis[v]){ vis[v]=1; q[+...
分类:
其他好文 时间:
2014-10-27 10:39:11
阅读次数:
198
一、基本语句C语言的基本语句跟Java中的差不多,所以,这里只是简单地提一下循环语句(do while、while、for)条件语句(if 、if-else、switch)goto语句二、基本运算计算机的基本能力就是计算,所以一门语言的计算能力十分重要。C语言之所以无所不能,很大原因在于它有强大的计...
分类:
其他好文 时间:
2014-10-27 01:42:29
阅读次数:
205
At that point you can drop the semicolons(分号): C'swhileis spelledforin Go.package main import "fmt"func main() { sum := 1 for sum < 1000 { ...
分类:
其他好文 时间:
2014-10-27 00:10:05
阅读次数:
213
STAlertViewThe idea of this component is to improve the readability while using the native UIAlertView. The UIKit alert view works with delegates. Whe...
分类:
其他好文 时间:
2014-10-26 21:08:40
阅读次数:
180
二分查找int binary_search(int a[],int len,int goal){ int beg = 0; int end = len - 1; while(beg goal) end = middle - 1; else ...
分类:
编程语言 时间:
2014-10-26 18:17:20
阅读次数:
145
eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(...
分类:
移动开发 时间:
2014-10-26 18:15:32
阅读次数:
383