#18976: 想請教一下><


easylin0126@gmail.com (林榮翼)


我的程式碼在DEV-C++上執行會一直return value 3221225477,結果送出答案後竟然AC了!!

想請問一下是哪邊出錯??

以下是我的程式碼:

#include<stdio.h>
struct Node{
    Node *node[26];
};
int main(){
    int i,len,ans=0;
    char str[65];
    Node *root=new Node,*temp;
    while(~scanf(" %s",str)){
        temp=root;
        for(i=0;str[i];i++){
            if(!temp->node[str[i]-'A']){
                ans++;
                temp->node[str[i]-'A']=new Node;
            }
            temp=temp->node[str[i]-'A'];
        }
    }
    printf("%d\n",ans+1);
}