ayzmkk / blog

oj blog
0 stars 0 forks source link

[HDU1251] trie_note #1

Open ayzmkk opened 9 years ago

ayzmkk commented 9 years ago

c语言读取空行

http://acm.hdu.edu.cn/showproblem.php?pid=1251

    while(fgets(word,100,stdin)!=NULL&&word[0]!='\n'){
        word[strlen(word)-1] = 0;
    //  printf("%s\n",word);
        insert(thead,word);
    }

fgets是读取一行,包括回车\n,读入后还要把回车符去掉

tire应用场景

visionthinking commented 9 years ago

po主你好!