#include <iostream>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
int main() {
// Чтение входных данных
int n, m, k;
cin >> n >> m >> k;
// Создание массива счетчиков
vector<int> tracks(n-1, 0);
for (int i = 0; i < m; i++) {
int s;
cin >> s;
for (int j = 0; j < s; j++) {
int a;
cin >> a;
// Увеличение счетчика трассы на 1
tracks[a-1]++;
}
}
// Создание вектора результата
vector<int> res;
for (int i = 0; i < n-1; i++) {
// Если счетчик трассы больше или равен k, то добавляем трассу в вектор результата
if (tracks[i] >= k) {
res.push_back(i+1);
}
}
cout<<res.size()<<endl;
for(int i=0;i<(int)res.size();i++)
cout<<res[i]<<' ';
cout<<endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
81 ms |
2468 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1081 ms |
2460 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1081 ms |
2460 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |