1072. 开学寄语(20)
2017-10-15 17:06
288 查看
// 2017/10/14 NCU // PAT-B 1072 // scienceZ #include <cstdio> #include <set> #include <cstring> #include <iostream> using namespace std; int bi[10000]; char str[10]; int n, m, men, item; int main() { cin >> n >> m; for (int i = 0; i < m; i++){ int j; cin >> j; bi[j] = 1; } for (int i = 0; i < n; i++){ cin >> str; int z = 0, key = 1; cin >> z; for (int j = 0; j < z; j++){ int t; cin >> t; if(bi[t]){ if (key){ printf("%s:", str); key = 0; } printf(" %04d", t); item++; } } if(!key) { cout << endl; men++; } } printf("%d %d", men, item); }
相关文章推荐
- 乙级 PAT 1072. 开学寄语(20)
- PAT 1072. 开学寄语(20) JAVA
- 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- PAT (Basic Level) Practise (中文)1072. 开学寄语(20)
- PAT 乙级 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- PAT (Basic Level) Practise (中文)1072. 开学寄语(20)
- 1072. 开学寄语(20)
- pat乙级真题 1072. 开学寄语(20)
- 1072. 开学寄语(20)
- PAT乙级1072. 开学寄语(20)
- 1072. 开学寄语(20)——C语言
- 1072. 开学寄语(20) PAT乙级真题
- 1072. 开学寄语(20)
- 1072. 开学寄语(20)