比赛 期末考试0 评测结果 EWEWEEEEEE
题目名称 学姐的下午茶 最终得分 0
用户昵称 zcx 运行时间 1.120 s
代码语言 C++ 内存使用 3.47 MiB
提交时间 2026-02-07 08:41:20
显示代码纯文本
#include<bits/stdc++.h>
using namespace std;
int ch[202][2],cnt=1;
void insert(string s){
    int len=s.size(),p=1;
    for(int i=0;i<len;i++){
        int u=s[i]-'0';
        if(ch[p][u]==0) ch[p][u]=++cnt;
        p=ch[p][u];
    }
}
int main()
{
    freopen("lowtea.in","r",stdin);
    freopen("lowtea.out","w",stdout);
    int n;
    cin>>n;
    while(n--){
        string s;
        cin>>s;
        insert(s);
    }
    cout<<cnt;
    return 0;
}