1 条题解
-
0
C++ :
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> using namespace std; const int N = (int) 10005, mod = (int) 0; string s[N]; int cnt[N]; int main() { // freopen("kartomat.in", "r", stdin); // freopen("kartomat.out", "w", stdout); int n; cin >> n; for (int j = 0; j < n; ++j) { cin >> s[j]; } string t; cin >> t; for (int j = 0; j < n; ++j) { int flag = 1; if (s[j].size() <= t.size()) continue; for (int i = 0; i < (int) t.size(); ++i) { if (s[j][i] != t[i]) { flag = 0; } } if (flag) { cnt[s[j][(int) t.size()]]++; } } string x = "***ABCDEFGHIJKLMNOPQRSTUVWXYZ***"; for (int j = 0; j < (int) x.size(); ++j) { cout << (cnt[x[j]]? x[j]: '*'); if (j % 8 == 7) cout << endl; } return 0; }
- 1
信息
- ID
- 948
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者