锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久久久人妻无码中文字幕爆 ,99久久99这里只有免费的精品,成人国内精品久久久久影院VRhttp://www.shnenglu.com/hoolee/If you believe, you can!zh-cnWed, 07 May 2025 00:54:54 GMTWed, 07 May 2025 00:54:54 GMT60Linux select()鍑芥暟浣跨敤http://www.shnenglu.com/hoolee/archive/2014/03/26/206351.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Wed, 26 Mar 2014 08:25:00 GMThttp://www.shnenglu.com/hoolee/archive/2014/03/26/206351.htmlhttp://www.shnenglu.com/hoolee/comments/206351.htmlhttp://www.shnenglu.com/hoolee/archive/2014/03/26/206351.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/206351.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/206351.html

鍒╃敤select鍑芥暟鍙互瀹屾垚闈為樆濉為氫俊錛屽畠鍙互鍦ㄧ敤鎴鋒寚瀹氱殑鏃墮棿鍐呯洃鍚竴浜涘彞鏌勶紙鏂囦歡鎻忚堪絎︼紵錛夛紙涓涓彞鏌勫氨鏄綘緇欎竴涓枃浠訛紝璁懼錛屽鎺ュ瓧(socket)鎴栫閬撶殑涓涓悕瀛? 浠ヤ究甯姪浣犺浣忎綘姝e鐞嗙殑鍚嶅瓧, 騫墮殣钘忔煇浜涚紦瀛樼瓑鐨勫鏉傛с傦級錛屽綋readfds鎴杦ritefds涓槧璞$殑鏂囦歡鍙鎴栧彲鍐欐垨瓚呮椂錛屾湰嬈elect()灝辯粨鏉熻繑鍥炪傜▼搴忓憳鍒╃敤涓緇勭郴緇熸彁渚涚殑瀹忓湪select()緇撴潫鏃朵究鍙垽鏂摢涓鏂囦歡鍙鎴栧彲鍐欍?/p>

銆?/p>

鍑芥暟鍘熷瀷錛?

int select(int nfds, fd_set *readfds, fd_set *writefds,

fd_set *exceptfds, struct timeval *timeout);

ndfs錛歴elect鐩戣鐨勬枃浠跺彞鏌勬暟錛岃榪涚▼涓墦寮鐨勬枃浠舵暟鑰屽畾,涓鑸涓轟綘瑕佺洃瑙嗗悇鏂囦歡

涓殑鏈澶ф枃浠跺彿鍔犱竴銆?

readfds錛歴elect鐩戣鐨勫彲璇繪枃浠跺彞鏌勯泦鍚堛?

writefds: select鐩戣鐨勫彲鍐欐枃浠跺彞鏌勯泦鍚堛?

exceptfds錛歴elect鐩戣鐨勫紓甯告枃浠跺彞鏌勯泦鍚堛?

timeout錛氭湰嬈elect()鐨勮秴鏃剁粨鏉熸椂闂淬?/p>

鍑芥暟榪斿洖鍊鹼細

0琛ㄧず瓚呮椂

-1琛ㄧず鍑洪敊

姝f暟琛ㄧず鏂囦歡鍙鎴栧彲鍐?/p>


鐩稿叧鐨勫畯錛?/strong>

FD_ZERO(fd_set *fdset)錛氭竻絀篺dset涓庢墍鏈夋枃浠跺彞鏌勭殑鑱旂郴銆?

FD_SET(int fd, fd_set *fdset)錛氬緩绔嬫枃浠跺彞鏌刦d涓巉dset鐨勮仈緋匯?

FD_CLR(int fd, fd_set *fdset)錛氭竻闄ゆ枃浠跺彞鏌刦d涓巉dset鐨勮仈緋匯?

FD_ISSET(int fd, fd_set *fdset)錛氭鏌dset鑱旂郴鐨勬枃浠跺彞鏌刦d鏄惁鍙鍐欙紝褰?gt;0琛ㄧず鍙鍐欍?/p>


select鍙兘鐩戝惉鏂囦歡鎻忚堪絎︼紙file descriptors錛夛紝鏂囦歡鎸囬拡鏄笉琛岀殑銆傞氳繃int fileno(FILE* fp)鍑芥暟鍙互瀹屾垚鏂囦歡鎸囬拡鍒版枃浠舵弿榪扮鐨勮漿鎹€?/p>

#include<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<sys/time.h>
#include
<sys/types.h>
#include
<unistd.h>

int main(){
    
int fno = fileno(stdin);
// 寰楀埌sdtin鐨勬枃浠舵弿榪扮
    fd_set fdR;
    
struct timeval timeout = {.tv_sec = 10, .tv_usec = 0};
    FD_ZERO(
&fdR);
    FD_SET(fno, 
&fdR);
    
char str[64];
    
int goOn = 1;
    
while(goOn){
        printf(
"goOning\n");
        
switch(select(fno + 1&fdR, NULL, NULL, &timeout)){
            
case -1:
                printf(
"select fail\n");
                goOn 
= 0;
                
break;
            
case 0:
                printf(
"select end\n");
                goOn 
= 0;
                
break;
            
default:
                scanf(
"%s", str);
                printf(
"str=%s\n", str);

        }
    }
}

浠g爜鐗囨錛戯細鍦ㄦ寚瀹氭椂闂村唴璇誨彇stdin鐨勬暟鎹?/p>


浠g爜鐗囨錛掞細鏈嶅姟鍣ㄥ湪涓瀹氭椂闂村唴鎺ユ敹瀛愯妭鐐瑰彂鏉ョ殑鏁版嵁鎶ャ?/p>


 

int socketfd = socket(AF_INET, SOCK_DGRAM, 0);
    …
    …
    fd_set fdR;
    
struct timeval timeout = {tv_sec:10, tv_usec:0};// 絳夊緟鎺ユ敹涓瀹氭椂闂翠箣鍚庣粨鏉?/span>
    int goOn = 1;
    FD_ZERO(
&fdR);
    FD_SET(sockfd, 
&fdR);
    
while(goOn){
    
switch(select(sockfd + 1&fdR, NULL, NULL, &timeout)){
        
case -1:
            printf(
"select fail\n");
            goOn 
= 0;
            
break;
        
case 0:
            printf(
"select timeout\n");
            goOn 
= 0;
            
break;
        
default:
// 姝e父鎯呭喌錛岃鍙栦俊鎭?/span>
            if((numbytes = recvfrom(sockfd, &cdt, sizeof(cdt), 0
                    (
struct sockaddr *)&their_addr, &addr_len)) == -1){
                printf(
"recvfrom fail\n");
            }
    }

鍙傞槄錛?br />http://www.tuicool.com/articles/Rfeaie

]]>
緙栬緫璺濈http://www.shnenglu.com/hoolee/archive/2013/07/09/201645.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 09 Jul 2013 11:26:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/09/201645.htmlhttp://www.shnenglu.com/hoolee/comments/201645.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/09/201645.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201645.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201645.html    鑴辨哀鏍哥硸鏍擱吀鍗沖父璇寸殑DNA錛屾槸涓綾誨甫鏈夐仐浼犱俊鎭殑鐢熺墿澶у垎瀛愩傚畠鐢?縐嶄富瑕佺殑鑴辨哀鏍歌嫹閰?dAMP銆乨GMP銆乨CMT鍜宒TMP)閫氳繃紓烽吀浜岄叝閿繛鎺ヨ屾垚銆傝繖4縐嶆牳鑻烽吀鍙互鍒嗗埆璁頒負錛欰銆丟銆丆銆乀銆?/p>

    DNA鎼哄甫鐨勯仐浼犱俊鎭彲浠ョ敤褰㈠錛欰GGTCGACTCCA.... 鐨勪覆鏉ヨ〃紺恒侱NA鍦ㄨ漿褰曞鍒剁殑榪囩▼涓彲鑳戒細鍙戠敓闅忔満鐨勫亸宸紝榪欐墠鏈緇堥犲氨浜嗙敓鐗╃殑澶氭牱鎬с?/p>

    涓轟簡綆鍖栭棶棰橈紝鎴戜滑鍋囪錛孌NA鍦ㄥ鍒剁殑鏃跺欏彲鑳藉嚭鐜扮殑鍋忓樊鏄紙鐞嗚涓婏紝瀵規瘡涓⒈鍩鴻澶嶅埗鏃訛紝閮藉彲鑳藉嚭鐜板亸宸級錛?/p>

銆銆1. 婕忔帀鏌愪釜鑴辨哀鏍歌嫹閰搞備緥濡傛妸 AGGT 澶嶅埗鎴愪負錛欰GT

    2. 閿欑爜錛屼緥濡傛妸 AGGT 澶嶅埗鎴愪簡錛欰GCT

    3. 閲嶇爜錛屼緥濡傛妸 AGGT 澶嶅埗鎴愪簡錛欰AGGT


    濡傛灉鏌怐NA涓瞐錛屾渶灝戣緇忚繃 n 嬈″嚭閿欙紝鎵嶈兘鍙樹負DNA涓瞓錛屽垯縐拌繖涓や釜DNA涓茬殑璺濈涓?n銆?/p>

    渚嬪錛欰GGTCATATTCC 涓?CGGTCATATTC 鐨勮窛紱諱負 2

    浣犵殑浠誨姟鏄細緙栧啓紼嬪簭錛屾壘鍒頒袱涓狣NA涓茬殑璺濈銆?/p>


銆愯緭鍏ャ佽緭鍑烘牸寮忚姹傘?/p>

    鐢ㄦ埛鍏堣緭鍏ユ暣鏁皀(n<100)錛岃〃紺烘帴涓嬫潵鏈?n琛屾暟鎹?/p>

    鎺ヤ笅鏉ヨ緭鍏ョ殑2n琛屾瘡2琛岃〃紺轟竴緇勮姣斿鐨凞NA銆傦紙姣忚鏁版嵁闀垮害<10000錛?/p>

    紼嬪簭鍒欒緭鍑簄琛岋紝琛ㄧず榪檔緇凞NA鐨勮窛紱匯?/p>

    渚嬪錛氱敤鎴瘋緭鍏ワ細
3
AGCTAAGGCCTT
AGCTAAGGCCT
AGCTAAGGCCTT
AGGCTAAGGCCTT
AGCTAAGGCCTT
AGCTTAAGGCTT

    鍒欑▼搴忓簲杈撳嚭錛?br />1
1
2

緇撻鎬濊礬錛氬弬闃呯櫨搴︾櫨縐?a >http://baike.baidu.com/view/2020247.htm
浠g爜濡備笅錛?/p>

import java.util.*;


public class Main {
    
    
    
static String instr0;
    
static String instr1;
    
public static void main(String[] args)
    
{
        Scanner sc 
= new Scanner(System.in);
        
int N = sc.nextInt();
        sc.nextLine();
        
for(int ii = 0; ii < N; ii++){
            instr0 
= sc.nextLine();
            instr1 
= sc.nextLine();
            
int rs = pro();
            System.out.println(rs);
        }

        
    }

    
static int pro(){
        
int[][] dis = new int[instr0.length()][instr1.length()];
        
for(int i = 0; i < instr0.length(); i++)
            dis[i][
0= i;
        
for(int j = 0; j < instr1.length(); j++)
            dis[
0][j] = j;
        
for(int i = 1; i < instr0.length(); i++){
            
for(int j = 1; j < instr1.length(); j++){
                
int cost = 0;
                
if(instr0.charAt(i) != instr1.charAt(j))
                    cost 
= 1;
                dis[i][j] 
= min3(dis[i - 1][j] + 1, dis[i][j - 1+ 1
                        dis[i 
- 1][j - 1+ cost);
            }

        }

        
return dis[instr0.length() - 1][instr1.length() - 1];
        
    }

    
static int min3(int a, int b, int c){
        
return Math.min(Math.min(a, b), c);
    }


    
}


 



]]>
GB2312緙栫爜璇嗗埆http://www.shnenglu.com/hoolee/archive/2013/07/09/201635.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 09 Jul 2013 03:04:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/09/201635.htmlhttp://www.shnenglu.com/hoolee/comments/201635.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/09/201635.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201635.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201635.html    鍦ㄥ緢澶氳蔣浠朵腑錛岃緭鍏ユ嫾闊崇殑棣栧啓瀛楁瘝灝卞彲浠ュ揩閫熷畾浣嶅埌鏌愪釜璇嶆潯銆傛瘮濡傦紝鍦ㄩ搧璺敭紲ㄨ蔣浠朵腑錛岃緭鍏? “bj”灝卞彲浠ュ畾浣嶅埌“鍖椾含”銆傛庢牱鍦ㄨ嚜宸辯殑杞歡涓疄鐜拌繖涓姛鑳藉憿錛熼棶棰樼殑鍏抽敭鍦ㄤ簬錛氬姣忎釜姹夊瓧蹇呴』鑳借綆楀嚭瀹冪殑鎷奸煶棣栧瓧姣嶃?/p>

    GB2312姹夊瓧緙栫爜鏂瑰紡涓紝涓綰ф眽瀛楃殑3755涓槸鎸夌収鎷奸煶欏哄簭鎺掑垪鐨勩傛垜浠彲浠ュ埄鐢ㄨ繖涓壒寰侊紝瀵瑰父鐢ㄦ眽瀛楁眰鎷奸煶棣栧瓧姣嶃?/p>

    GB2312緙栫爜鏂規瀵規瘡涓眽瀛楅噰鐢ㄤ袱涓瓧鑺傝〃紺恒傜涓涓瓧鑺備負鍖哄彿錛岀浜屼釜瀛楄妭涓哄尯涓殑鍋忕Щ鍙楓備負浜嗚兘涓庡凡鏈夌殑ASCII緙栫爜鍏煎錛堜腑瑗挎枃娣鋒帓錛夛紝鍖哄彿鍜屽亸縐葷紪鍙烽兘浠?xA1寮濮嬨?/p>

    鎴戜滑鍙鎵懼埌鎷奸煶a,b,c,...x,y,z 姣忎釜瀛楁瘝鎵瀵瑰簲鐨凣B2312緙栫爜鐨勭涓涓眽瀛楋紝灝卞彲浠ュ畾浣嶆墍鏈変竴綰ф眽瀛楃殑鎷奸煶棣栧瓧姣嶄簡錛堜笉鑰冭檻澶氶煶瀛楃殑鎯呭喌錛夈備笅闈㈣繖涓〃緇欏嚭浜嗗墠榪頒俊鎭傝浣犲埄鐢ㄨ琛ㄧ紪鍐欑▼搴忥紝姹傚嚭甯哥敤姹夊瓧鐨勬嫾闊抽瀛楁瘝銆?br />


a 鍟?B0A1
b 鑺?B0C5
c 鎿?B2C1
d 鎼?B4EE
e 铔?B6EA
f 鍙?B7A2
g 鍣?B8C1
h 鍝?B9FE
j 鍑?BBF7
k 鍠 BFA6
l 鍨?C0AC
m 濡?C2E8
n 鎷?C4C3
o 鍝?C5B6
p 鍟?C5BE
q 鏈?C6DA
r 鐒?C8BB
s 鎾?C8F6
t 濉?CBFA
w 鎸?CDDA
x 鏄?CEF4
y 鍘?D1B9
z 鍖?D4D1


銆愯緭鍏ャ佽緭鍑烘牸寮忚姹傘?/p>

    鐢ㄦ埛鍏堣緭鍏ヤ竴涓暣鏁皀 (n<100)錛岃〃紺烘帴涓嬫潵灝嗘湁n琛屾枃鏈傛帴鐫杈撳叆n琛屼腑鏂囦覆錛堟瘡涓覆涓嶈秴榪?0涓眽瀛楋級銆?/p>

    紼嬪簭鍒欒緭鍑簄琛岋紝姣忚鍐呭涓虹敤鎴瘋緭鍏ョ殑瀵瑰簲琛岀殑姹夊瓧鐨勬嫾闊抽瀛楁瘝銆?/p>

    瀛楁瘝闂翠笉鐣欑┖鏍鹼紝鍏ㄩ儴浣跨敤澶у啓瀛楁瘝銆?/p>

    渚嬪錛?br />    鐢ㄦ埛杈撳叆錛?br />3
澶у鐖辯瀛?br />鍖椾含澶╁畨闂ㄥ箍鍦?br />杞歡澶ц禌

    鍒欑▼搴忚緭鍑猴細
DJAKX
BJTAMGC
RJDS

 


緇撻鎬濊礬錛?br />C璇█涓殑涓涓眽瀛楀崰涓や釜瀛楄妭錛堜袱涓猚har錛夛紝鎴戜滑鍙渶鎶婅繖涓や釜瀛楄妭瀵瑰簲鐨刬nt鍨嬫暟瀛楃畻鍑烘潵錛岀劧鍚庡埌緙栫爜琛ㄩ噷鍘繪瘮杈冨嵆鍙傝綆楄鏁板瓧鏃惰鐢ㄥ埌縐諱綅錛屼笌錛屾垨絳変綅榪愮畻鎿嶄綔銆?br />浠g爜濡備笅錛?
#include<stdio.h>
#include
<string.h>
int N;
char str[200];
void pro(){
    
    
for(int i = 0; i < strlen(str) - 1; )
    
{
        
char c0 = str[i++];
        
char c1 = str[i++];
        
int t = (int)c0 << 8;//寰楀埌楂樺叓浣?nbsp;
        
        t 
= t | (0x000000ff & (int)c1);//寰楀埌浣庡叓浣?nbsp;
        t &= 0x0000ffff;//鍘繪帀璐熷彿 
        
        
if(t >= 0xB0A1 && t < 0xB0C5){
            printf(
"A");    
        }

        
else if(t < 0xB2C1)
            printf(
"B");
        
else if(t < 0xB4EE)
            printf(
"C");
        
else if(t < 0xB6EA)
            printf(
"D");
        
else if(t < 0xB7A2)
            printf(
"E");
        
else if(t < 0xB8C1)
            printf(
"F");
        
else if(t < 0xB9FE)
            printf(
"G");
        
else if(t < 0xBBF7)
            printf(
"H");
        
else if(t < 0xBFA6)
            printf(
"J");
        
else if(t < 0xC0AC)
            printf(
"K");
        
else if(t < 0xC2E8)
            printf(
"L");
        
else if(t < 0xC4C3)
            printf(
"M");
        
else if(t < 0xC5B6)
            printf(
"N");
        
else if(t < 0xC5BE)
            printf(
"O");
        
else if(t < 0xC6DA)
            printf(
"P");
        
else if(t < 0xC8BB)
            printf(
"Q");
        
else if(t < 0xC8F6)
            printf(
"R");
        
else if(t < 0xCBFA)
            printf(
"S");
        
else if(t < 0xCDDA)
            printf(
"T");
        
else if(t < 0xCEF4)
            printf(
"W");
        
else if(t < 0xD1B9)
            printf(
"X");
        
else if(t < 0xD4D1)
            printf(
"Y");
        
else 
            printf(
"Z");
            
    }

    printf(
"\n");
        
}


int main()
{    
    scanf(
"%d"&N);
    getchar();
    
for(int i = 0; i < N; i++)
    
{
        gets(str);
        pro();
    }

    
    
//getchar();
}






]]>
闂板勾鍒ゆ柇http://www.shnenglu.com/hoolee/archive/2013/07/09/201633.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 09 Jul 2013 01:22:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/09/201633.htmlhttp://www.shnenglu.com/hoolee/comments/201633.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/09/201633.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201633.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201633.html    1949騫寸殑鍥藉簡鑺傦紙10鏈?鏃ワ級鏄槦鏈熷叚銆?

    浠婂勾錛?012錛夌殑鍥藉簡鑺傛槸鏄熸湡涓銆?/p>

    閭d箞錛屼粠寤哄浗鍒扮幇鍦紝鏈夊嚑嬈″浗搴嗚妭姝eソ鏄槦鏈熸棩鍛紵


涓嶅璇翠簡錛岀洿鎺ヤ笂浠g爜錛?
import java.util.*;


public class Main {
    
    
public static void main(String[] args)
    
{
        
int count = 0;
        
int weekd = 5;
        
for(int i = 1950; i < 2013; i++){
            
int y = 365;
            
if(isRN(i))
                y
++;
            weekd 
= (weekd + y) % 7;
            
if(weekd == 6){
                count
++;
                System.out.println(
"i=" + i);
            }

        }

        System.out.println(
"count=" +  count);
    }

    
static boolean isRN(int y){
        
if(y % 4 == 0 && y % 100 != 0 || y % 400 == 0)
            
return true;
        
return false;
    }


    
}



]]>
姝e垯琛ㄨ揪寮忕畝鍗曠瑪璁?/title><link>http://www.shnenglu.com/hoolee/archive/2013/07/09/201632.html</link><dc:creator>灝忛紶鏍?/dc:creator><author>灝忛紶鏍?/author><pubDate>Tue, 09 Jul 2013 01:00:00 GMT</pubDate><guid>http://www.shnenglu.com/hoolee/archive/2013/07/09/201632.html</guid><wfw:comment>http://www.shnenglu.com/hoolee/comments/201632.html</wfw:comment><comments>http://www.shnenglu.com/hoolee/archive/2013/07/09/201632.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hoolee/comments/commentRss/201632.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hoolee/services/trackbacks/201632.html</trackback:ping><description><![CDATA[鎴彇JDK鏂囨。涓殑涓閮ㄥ垎錛屾劅瑙夎繖浜涗笢瑗挎垜浠ュ悗浼氱敤鍒般?br /> <table border="0" cellspacing="0" summary="Regular expression constructs, and what they match" cellpadding="1"> <tbody> <tr align="left"> <th id="classes" colspan="2">瀛楃綾?/th></tr> <tr> <td valign="top" headers="construct classes"><tt>[abc]</tt></td> <td headers="matches"><tt>a</tt>銆?tt>b</tt> 鎴?<tt>c</tt>錛堢畝鍗曠被錛?/td></tr> <tr> <td valign="top" headers="construct classes"><tt>[^abc]</tt></td> <td headers="matches">浠諱綍瀛楃錛岄櫎浜?<tt>a</tt>銆?tt>b</tt> 鎴?<tt>c</tt>錛堝惁瀹氾級</td></tr> <tr> <td valign="top" headers="construct classes"><tt>[a-zA-Z]</tt></td> <td headers="matches"><tt>a</tt> 鍒?<tt>z</tt> 鎴?<tt>A</tt> 鍒?<tt>Z</tt>錛屼袱澶寸殑瀛楁瘝鍖呮嫭鍦ㄥ唴錛堣寖鍥達級</td></tr> <tr> <td valign="top" headers="construct classes"><tt>[a-d[m-p]]</tt></td> <td headers="matches"><tt>a</tt> 鍒?<tt>d</tt> 鎴?<tt>m</tt> 鍒?<tt>p</tt>錛?tt>[a-dm-p]</tt>錛堝茍闆嗭級</td></tr> <tr> <td valign="top" headers="construct classes"><tt>[a-z&&[def]]</tt></td> <td headers="matches"><tt>d</tt>銆?tt>e</tt> 鎴?<tt>f</tt>錛堜氦闆嗭級</td> <tr> <td valign="top" headers="construct classes"><tt>[a-z&&[^bc]]</tt></td> <td headers="matches"><tt>a</tt> 鍒?<tt>z</tt>錛岄櫎浜?<tt>b</tt> 鍜?<tt>c</tt>錛?tt>[ad-z]</tt>錛堝噺鍘伙級</td></tr> <tr> <td valign="top" headers="construct classes"><tt>[a-z&&[^m-p]]</tt></td> <td headers="matches"><tt>a</tt> 鍒?<tt>z</tt>錛岃岄潪 <tt>m</tt> 鍒?<tt>p</tt>錛?tt>[a-lq-z]</tt>錛堝噺鍘伙級</td></tr></tbody></table><br /> <table border="0" cellspacing="0" summary="Regular expression constructs, and what they match" cellpadding="1"> <tbody> <tr align="left"> <th id="greedy" colspan="2">Greedy 鏁伴噺璇?/th></tr> <tr> <td valign="top" headers="construct greedy"><em>X</em><tt>?</tt></td> <td headers="matches"><em>X</em>錛屼竴嬈℃垨涓嬈′篃娌℃湁</td></tr> <tr> <td valign="top" headers="construct greedy"><em>X</em><tt>*</tt></td> <td headers="matches"><em>X</em>錛岄浂嬈℃垨澶氭</td></tr> <tr> <td valign="top" headers="construct greedy"><em>X</em><tt>+</tt></td> <td headers="matches"><em>X</em>錛屼竴嬈℃垨澶氭</td></tr> <tr> <td valign="top" headers="construct greedy"><em>X</em><tt>{</tt><em>n</em><tt>}</tt></td> <td headers="matches"><em>X</em>錛屾伆濂?<em>n</em> 嬈?/td></tr> <tr> <td valign="top" headers="construct greedy"><em>X</em><tt>{</tt><em>n</em><tt>,}</tt></td> <td headers="matches"><em>X</em>錛岃嚦灝?<em>n</em> 嬈?/td></tr> <tr> <td valign="top" headers="construct greedy"><em>X</em><tt>{</tt><em>n</em><tt>,</tt><em>m</em><tt>}</tt></td> <td headers="matches"><em>X</em>錛岃嚦灝?<em>n</em> 嬈★紝浣嗘槸涓嶈秴榪?<em>m</em> 嬈?/td></tr></tbody></table><br />榪欎簺鐩墠鏉ヨ澶熺敤鍟︺?img src ="http://www.shnenglu.com/hoolee/aggbug/201632.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hoolee/" target="_blank">灝忛紶鏍?/a> 2013-07-09 09:00 <a href="http://www.shnenglu.com/hoolee/archive/2013/07/09/201632.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Excel鏍煎紡鍦板潃杞崲http://www.shnenglu.com/hoolee/archive/2013/07/07/201597.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sun, 07 Jul 2013 12:27:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/07/201597.htmlhttp://www.shnenglu.com/hoolee/comments/201597.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/07/201597.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201597.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201597.html
銆愮紪紼嬮銆?婊″垎21鍒?

    Excel鏄渶甯哥敤鐨勫姙鍏蔣浠躲傛瘡涓崟鍏冩牸閮芥湁鍞竴鐨勫湴鍧琛ㄧず銆傛瘮濡傦細絎?2琛岀4鍒楄〃紺轟負錛?#8220;D12”錛岀5琛岀255鍒楄〃紺轟負“IU5”銆?br />   
    浜嬪疄涓婏紝Excel鎻愪緵浜嗕袱縐嶅湴鍧琛ㄧず鏂規硶錛岃繕鏈変竴縐嶈〃紺烘硶鍙仛RC鏍煎紡鍦板潃銆?絎?2琛岀4鍒楄〃紺轟負錛?#8220;R12C4”錛岀5琛岀255鍒楄〃紺轟負“R5C255”銆?/p>

    浣犵殑浠誨姟鏄細緙栧啓紼嬪簭錛屽疄鐜頒粠RC鍦板潃鏍煎紡鍒板父瑙勫湴鍧鏍煎紡鐨勮漿鎹€?/p>

銆愯緭鍏ャ佽緭鍑烘牸寮忚姹傘?/p>

    鐢ㄦ埛鍏堣緭鍏ヤ竴涓暣鏁皀錛坣<100錛夛紝琛ㄧず鎺ヤ笅鏉ユ湁n琛岃緭鍏ユ暟鎹?/p>

    鎺ョ潃杈撳叆鐨刵琛屾暟鎹槸RC鏍煎紡鐨凟xcel鍗曞厓鏍煎湴鍧琛ㄧず娉曘?/p>

    紼嬪簭鍒欒緭鍑簄琛屾暟鎹紝姣忚鏄漿鎹㈠悗鐨勫父瑙勫湴鍧琛ㄧず娉曘?/p>

    渚嬪錛氱敤鎴瘋緭鍏ワ細
2
R12C4
R5C255

    鍒欑▼搴忓簲璇ヨ緭鍑猴細
D12
IU5

緇撻鎬濊礬錛氬瓧絎︿覆澶勭悊錛?6榪涘埗杞崲銆傜壒鍒敞鎰?6瑕佽杞崲鎴怹錛屽洜涓篈琛ㄧず鐨勬槸1鑰屼笉鏄?銆?br />浠g爜濡備笅錛?br />錛堜唬鐮佸疄鐜頒簡涓ょ鏍煎紡鐨勪簰鎹㈤棶棰橈級

import java.util.*;


public class Main {
    
    
    
static int N;
    
static String instr1;
    
public static void main(String[] args)
    
{
        Scanner sc 
= new Scanner(System.in);
        N 
= sc.nextInt();
        sc.nextLine();
        
for(int i = 0; i < N; i++){
            instr1 
= sc.nextLine();
            
if(isRC(instr1)){
                toAN();
            }

            
else{
                toRC();
            }

        }

        
    }

    
static void toRC(){
        
/*
         * D12-->R12C4
         
*/

        
int i = 0;
        
int numc = 0;
        
while(Character.isLetter(instr1.charAt(i))){
            numc 
*= 26;
            numc 
+= instr1.charAt(i) - 'A' + 1;
            i
++;
        }

        
int numr = Integer.parseInt(instr1.substring(i));
        System.out.println(
"R" + numr + "C" + numc);
    }

    
static void toAN(){
        
/*
         * R12C4-->D12
         
*/

        StringBuffer sbuf 
= new StringBuffer();
        String[] strs 
= instr1.split("[RC]");//姝e垯寮忓緢鏈夎叮
        int numc = Integer.parseInt(strs[2]);
        
while(numc > 0){
            
char c = (char)((numc - 1% 26 + 'A');//num - 1錛岄伩鍏?6琚漿鎹負A
            sbuf.append(c);
            numc 
= (numc - 1/ 26;//num - 1錛岄伩鍏?6琚漿鎹負AZ
        }

        System.out.println(sbuf.reverse() 
+ strs[1]);
    }

    
    
static boolean isRC(String instr){
        
int count = 0;
        
boolean isnumbg = false;
        
for(int i = 0; i < instr.length(); ){
            
if(Character.isDigit(instr.charAt(i))){
                
if(isnumbg){
                    i
++;
                }

                
else{
                    isnumbg 
= true;
                    count
++;
                    i
++;
                }

            }

            
else{
                
if(isnumbg){
                    isnumbg 
= false;
                }

                i
++;
            }

        }

        
if(count == 2)
            
return true;
        
return false;
    }

        
}


 



]]>
涓閬撴ā鎷熼鈥斺旀満鍣ㄤ漢琛岃蛋璺濈璁$畻http://www.shnenglu.com/hoolee/archive/2013/07/07/201595.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sun, 07 Jul 2013 09:16:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/07/201595.htmlhttp://www.shnenglu.com/hoolee/comments/201595.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/07/201595.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201595.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201595.html
    鏌愬皯騫村寮曡繘浜嗕竴鎵規満鍣ㄤ漢灝忚濺銆傚彲浠ユ帴鍙楅鍏堣緭鍏ョ殑鎸囦護錛屾寜鎸囦護琛屽姩銆傚皬杞︾殑鍩烘湰鍔ㄤ綔寰堢畝鍗曪紝鍙湁3縐嶏細宸﹁漿錛堣涓篖錛夛紝鍙寵漿錛堣涓篟錛夛紝鍚戝墠璧拌嫢騫插帢綾籌紙鐩存帴璁版暟瀛楋級銆?/p>

    渚嬪錛屾垜浠彲浠ュ灝忚濺杈撳叆濡備笅鐨勬寚浠わ細

    15L10R5LRR10R20

    鍒欙紝灝忚濺鍏堢洿琛?5鍘樼背錛屽乏杞紝鍐嶈蛋10鍘樼背錛屽啀鍙寵漿錛?..

    涓嶉毦鐪嬪嚭錛屽浜庢鎸囦護涓詫紝灝忚濺鍙堝洖鍒頒簡鍑哄彂鍦般?/p>

    浣犵殑浠誨姟鏄細緙栧啓紼嬪簭錛岀敱鐢ㄦ埛杈撳叆鎸囦護錛岀▼搴忚緭鍑烘瘡鏉℃寚浠ゆ墽琛屽悗灝忚濺浣嶇疆涓庢寚浠ゆ墽琛屽墠灝忚濺浣嶇疆鐨勭洿綰胯窛紱匯?/p>

銆愯緭鍏ャ佽緭鍑烘牸寮忚姹傘?/p>

    鐢ㄦ埛鍏堣緭鍏ヤ竴涓暣鏁皀錛坣<100錛夛紝琛ㄧず鎺ヤ笅鏉ュ皢鏈塶鏉℃寚浠ゃ?/p>

    鎺ヤ笅鏉ヨ緭鍏鏉℃寚浠ゃ傛瘡鏉℃寚浠ゅ彧鐢盠銆丷鍜屾暟瀛楃粍鎴愶紙鏁板瓧鏄?~100涔嬮棿鐨勬暣鏁幫級

    姣忔潯鎸囦護鐨勯暱搴︿笉瓚呰繃256涓瓧絎︺?/p>

    紼嬪簭鍒欒緭鍑簄琛岀粨鏋溿?/p>

    姣忔潯緇撴灉琛ㄧず灝忚濺鎵ц鐩稿簲鐨勬寚浠ゅ墠鍚庝綅緗殑鐩寸嚎璺濈銆傝姹傚洓鑸嶄簲鍏ュ埌灝忔暟鍚?浣嶃?/p>

    渚嬪錛氱敤鎴瘋緭鍏ワ細
5
L100R50R10
3LLL5RR4L12
LL
100R
5L5L5L5

    鍒欑▼搴忚緭鍑猴細
102.96
9.06
0.00
100.00
0.00

緇撻鎬濊礬錛?br />妯℃嫙鏈哄櫒浜鴻璧板嵆鍙紝鐢ㄦ暟瀛楄〃紺烘満鍣ㄤ漢鐨勬柟鍚戯紝鍚戜笂涓?錛屽悜鍙充負1錛屼笅涓?錛屽乏涓?銆傝鍒濆鐘舵佹満鍣ㄤ漢鏂瑰悜涓?錛屽垯閬囧埌R灝卞皢褰撳墠鏂瑰悜鍔?錛岄亣鍒癓灝嗗綋鍓嶆柟鍚戝噺1銆倄杞村悜鍙沖澶э紝y杞村悜涓婂澶с?br />浠g爜濡備笅錛?
import java.util.*;

public class Main {
    
static int x = 0;
    
static int y = 0;
    
static int nowdir = 0;
    
static int N;
    
static String instr;
    
public static void main(String[] args)
    
{
        Scanner sc 
= new Scanner(System.in);
        N 
= sc.nextInt();
        sc.nextLine();
        
for(int i = 0; i < N; i++){
            instr 
= sc.nextLine();
            x 
= 0;
            y 
= 0;
            nowdir 
= 0;
            pro();
            
double dis0 = Math.sqrt(x * x + y * y);
            System.out.printf(
"%.2f\n", dis0);
        }

    }

    
static void pro(){
        
boolean isnumbg = false;
        
int numbgp = 0;
        instr 
= instr + "#";
        
for(int i = 0; i < instr.length();){
            
if(Character.isDigit(instr.charAt(i))){
                
if(isnumbg){
                    i
++;
                    
continue;
                }

                
else{
                    numbgp 
= i++;
                    isnumbg 
= true;
                }

            }

            
else{
                
if(isnumbg){
                    isnumbg 
= false;
                    String str1 
= instr.substring(numbgp, i);
                    
int dis = Integer.parseInt(str1);
                    
if(nowdir == 0){
                        y 
+= dis;
                    }

                    
else if(nowdir == 2){
                        y 
-= dis; 
                    }

                    
else if(nowdir  == 1){
                        x 
+= dis;
                    }

                    
else
                        x 
-= dis;
                }

                
else{
                    
char c = instr.charAt(i);
                    
if(c == 'R'){
                        nowdir 
= (nowdir + 1% 4;
                    }

                    
else if(c == 'L'){
                        nowdir 
= (nowdir + 3% 4;
                    }

                    i
++;
                }

            }

        }

    }

}





]]>
鎺掑垪緇冧範2http://www.shnenglu.com/hoolee/archive/2013/07/07/201593.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sun, 07 Jul 2013 08:08:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/07/201593.htmlhttp://www.shnenglu.com/hoolee/comments/201593.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/07/201593.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201593.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201593.html    鐪嬭繖涓畻寮忥細
 
    ☆☆☆ + ☆☆☆ = ☆☆☆

    濡傛灉姣忎釜浜旇鏄熶唬琛?1 ~ 9 鐨勪笉鍚岀殑鏁板瓧銆?/p>

    榪欎釜綆楀紡鏈夊灝戠鍙兘鐨勬紜~鍐欐柟娉曪紵

    173 + 286 = 459
    295 + 173 = 468
    173 + 295 = 468
    183 + 492 = 675

    浠ヤ笂閮芥槸姝g‘鐨勫~鍐欐硶錛?/p>

    娉ㄦ剰錛?br />    111 + 222 = 333 鏄敊璇殑濉啓娉曪紒
    鍥犱負姣忎釜鏁板瓧蹇呴』鏄笉鍚岀殑錛?
    涔熷氨鏄錛?~9涓殑鎵鏈夋暟瀛楋紝姣忎釜蹇呴』鍑虹幇涓斾粎鍑虹幇涓嬈★紒

緇撻鎬濊礬錛?br />鎺掑垪1~9錛屽啓鍑虹鍚堟潯浠剁殑緇撴灉銆?br />浠g爜濡備笅錛?/p>


public class Main {
    
    
static int bs[] = {123456789};
    
static int count = 0;
    
public static void main(String[] args)
    
{
        count 
= 0;
        DFS(
0);
        System.out.println(
"count=" + count);
    }

    
static void DFS(int nowp){
        
if(nowp == bs.length){
            
int n1 = bs[0* 100 + bs[1* 10 + bs[2];
            
int n2 = bs[3* 100 + bs[4* 10 + bs[5];
            
int n3 = bs[6* 100 + bs[7* 10 + bs[8];
            
if(n1 + n2 == n3){
                System.out.println(n1 
+ " + " + n2 + " = " + n3);
                count
++;
            }

        }

        
else{
            
for(int i = nowp; i < bs.length; i++){
                swap(nowp, i);
                DFS(nowp 
+ 1);
                swap(nowp, i);
            }

        }

    }

    
static void swap(int a, int b){
        
int t = bs[a];
        bs[a] 
= bs[b];
        bs[b] 
= t;
    }

}



 



]]>
绱犳暟絳涙硶http://www.shnenglu.com/hoolee/archive/2013/07/06/201576.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sat, 06 Jul 2013 11:38:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/06/201576.htmlhttp://www.shnenglu.com/hoolee/comments/201576.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/06/201576.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201576.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201576.html

姹傜100002涓礌鏁般傦紙2鏄涓涓礌鏁幫級

 

緇撻鎬濊礬錛氱礌鏁扮瓫娉?/span>

浠g爜濡備笅錛?/p>

import java.util.Arrays;


public class Copy_2_of_Main {
    
    
static int N = 10000000;
    
static int count;
    
static int rs[] = new int[N];
    
static boolean tg[] = new boolean[N];//is prime
    
    
public static void main(String[] args) {
        
        Arrays.fill(tg, 
true);
        
int ed = (int)Math.sqrt(N) + 1;
        
for(int i = 2; i <= ed; i++){//绱犳暟絳涙硶
            if(tg[i]){
                
for(int j = i * 2; j < N; j += i){// j += i
                    tg[j] = false;
                }

            }

        }

        count 
= 0;
        
for(int i = 2; i < N; i++){
            
if(tg[i] == true){
                rs[count
++= i;
            }

        }

        System.out.println(
"count=" + count);
        System.out.println(
"result=" + rs[100001]);
//        for(int i = 0; i < count; i++)
//            System.out.println(rs[i]);
    }

        
}




]]>
鎺掑垪緇勫悎緇冧範http://www.shnenglu.com/hoolee/archive/2013/07/06/201562.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sat, 06 Jul 2013 07:43:00 GMThttp://www.shnenglu.com/hoolee/archive/2013/07/06/201562.htmlhttp://www.shnenglu.com/hoolee/comments/201562.htmlhttp://www.shnenglu.com/hoolee/archive/2013/07/06/201562.html#Feedback0http://www.shnenglu.com/hoolee/comments/commentRss/201562.htmlhttp://www.shnenglu.com/hoolee/services/trackbacks/201562.html闃呰鍏ㄦ枃

]]>
久久久黄色大片| 久久久久久久国产免费看| 国产成人久久精品麻豆一区| 国内精品人妻无码久久久影院导航| 国产高潮久久免费观看| 久久午夜电影网| 久久婷婷国产麻豆91天堂| 97精品久久天干天天天按摩| 无码人妻精品一区二区三区久久久| 色妞色综合久久夜夜| 手机看片久久高清国产日韩| 综合久久给合久久狠狠狠97色| 久久综合偷偷噜噜噜色| 久久天天躁狠狠躁夜夜不卡| 亚洲精品乱码久久久久久蜜桃不卡| 中文国产成人精品久久不卡| 久久久无码人妻精品无码| 久久精品麻豆日日躁夜夜躁| 精品久久久久久中文字幕| 久久不射电影网| 色综合久久88色综合天天 | 国产A三级久久精品| www性久久久com| 久久婷婷五月综合色99啪ak| 思思久久好好热精品国产| 亚洲狠狠婷婷综合久久蜜芽| 国产99精品久久| 偷偷做久久久久网站| 久久久久久久99精品免费观看| 久久精品国产色蜜蜜麻豆| 久久久久精品国产亚洲AV无码| 91精品国产综合久久久久久| 亚洲天堂久久精品| 久久久亚洲欧洲日产国码是AV| 精品久久久无码人妻中文字幕豆芽 | 午夜精品久久久内射近拍高清| 国内精品伊人久久久久网站| 国产69精品久久久久久人妻精品| 97精品伊人久久久大香线蕉| 欧美国产成人久久精品| 国产高潮国产高潮久久久91|