正文
增加 8 行删除 8 行
108 行未改动全部展开1091101111121131141151161171181191204 行未改动125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163108 行未改动全部展开if (c >= 'a' && c <= 'z') return c - 'a';if (c >= 'A' && c <= 'Z') return c - 'A' + 26;return c - '0' + 52;}void insert(string s){int len = s.size(), u = 0;for (int i = 0; i < len; i++){int c = get_sum(s[i]);if (node[u][c] == 0){4 行未改动}vis[u]++;return;}int search(string s){int len = s.size();int u = 0;for (int i = 0; i < len; i++){int c = get_sum(s[i]);if (node[u][c] == 0) return 0;u = node[u][c];}return vis[u]++;}signed main(){cin >> n;for (int i = 1; i <= n; i++){string s;cin >> s;insert(s);}int m;cin >> m;while(m--){string s;cin >> s;int x = search(s);if (x == 0) cout << "WRONG\n";else if (x == 1) cout << "OK\n";else cout << "REPEAT\n";}return 0;}```108 行未改动全部展开1091101111121131141151161171181191204 行未改动125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163108 行未改动全部展开if (c >= 'a' && c <= 'z') return c - 'a';if (c >= 'A' && c <= 'Z') return c - 'A' + 26;return c - '0' + 52;}void insert(string s){int len = s.size(), u = 0;for (int i = 0; i < len; i++){int c = get_sum(s[i]);if (node[u][c] == 0){4 行未改动}vis[u]++;return;}int search(string s){int len = s.size();int u = 0;for (int i = 0; i < len; i++){int c = get_sum(s[i]);if (node[u][c] == 0) return 0;u = node[u][c];}return vis[u]++;}signed main(){cin >> n;for (int i = 1; i <= n; i++){string s;cin >> s;insert(s);}int m;cin >> m;while(m--){string s;cin >> s;int x = search(s);if (x == 0) cout << "WRONG\n";else if (x == 1) cout << "OK\n";else cout << "REPEAT\n";}return 0;}```